=== SI Passport Gate ===
Tags: token gate, holders, solana, membership, woocommerce
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show content only to holders. Visitors sign in with the SI Passport, a free message signature, and your server checks their wallet with sicto.si.

== Description ==

SI Passport Gate shows content only to holders of a Solana token or NFT collection. A visitor signs in with the SI Passport, a free message signature that never moves tokens and never approves a transaction. Your server then asks sicto.si whether the visitor's wallet passes your rule. Your site learns pass or fail and the visitor's public SI Passport (number, handle and name), never a wallet address and never an amount.

What you get:

* **Sign in with SI Passport**: the sign-in button as a block, a shortcode and inside every holder notice.
* **Holder-only pages and posts**: one checkbox in the editor. Feeds, excerpts, search results, comments and the REST API are covered too.
* **A block and a shortcode** for part of a page, with your own words for everyone else.
* **A WooCommerce coupon for holders** (when WooCommerce is active): a coupon you choose works only for verified holders, and can apply itself in the cart.

Your rule (a token mint or an NFT collection and a minimum, up to four rules) is set on sicto.si/gate/wordpress/ with the SI Passport that registered your domain. Until you set one, holders means $SI holders.

People who can edit a post always see it, so authors can check their work.

== Installation ==

1. Register your domain at https://sicto.si/passport/connect/ (Sign in with SI Passport) and prove you control it. Paste the token it gives you in Settings, SI Passport Gate: the plugin puts it on your home page as a meta tag.
2. Wait for the team's approval. Settings, SI Passport Gate shows where your site stands.
3. Open https://sicto.si/gate/wordpress/, sign in with the same SI Passport, add your site to the gate and set your rule.
4. Tick Holders only on a post or a page, add the Holders only block, or use the shortcodes.

Shortcodes:

* `[si_holders else="Words for everyone else"]Holder content[/si_holders]`
* `[si_passport_signin]`

== Frequently Asked Questions ==

= Is it free? =

Yes. The plugin is free software under the GPL, and the checks on sicto.si are free.

= Does my site see wallet addresses or balances? =

No. Your server receives pass or fail for your rule and the public SI Passport: number, handle and name.

= Does it work with page caching? =

Holder-only pages are marked as not cacheable, and every check runs on your server. If your cache ignores that mark, exclude your holder-only pages from it.

= What does a visitor without the token see? =

Your notice, with the Sign in with SI Passport button. When your site is on the gate, a link shows the rule.

== External services ==

This plugin connects to SI Passport, run at sicto.si, to sign visitors in and to check them.

* **The sign-in script.** On pages that hold gated content, the Holders only block, the sign-in block or a shortcode (or on every page, if you switch on the floating button), the visitor's browser loads https://sicto.si/assets/js/si-passport-net.js. When the visitor chooses to sign in, their wallet signs a short text message, and the browser sends sicto.si the wallet address, the signed message and your domain, to make the sign-in. Nothing is sent for visitors who do not press the button.
* **The check.** When a visitor has signed in, your server sends https://sicto.si/api/gate.php your domain and the visitor's sign-in token, and receives pass or fail for your rule and the visitor's public SI Passport. This is asked again after the number of minutes set in Settings, SI Passport Gate.
* **The settings page.** It asks https://sicto.si/api/gate.php with your domain where your site stands (partner status and rule), at most every ten minutes.

Terms: https://sicto.si/terms/
Privacy: https://sicto.si/privacy/

The plugin has no analytics, no trackers and no advertising.

== Privacy ==

For a visitor who signs in, the plugin keeps a session for up to seven days in your site's own database: the SI Passport sign-in token for your site, the public SI Passport (number, handle, name) and pass or fail. It sets one cookie, sipg_session, with a random id. Signing out ends the session. Uninstalling the plugin removes every session, setting and mark it made.

== Changelog ==

= 1.0.0 =
* First release: Sign in with SI Passport, holder-only posts and pages, the Holders only block, shortcodes and the WooCommerce holder coupon.
