Build with Stele.
Prove which terms each user accepted — or make your Solana program require them. Install a package, follow one guide, look things up in the references.
Stele Proof
Prove which terms each user accepted
- 1Publish your terms in the dashboard.
- 2Add the widget: the user signs the exact text, free.
- 3Check acceptances from your server or verify them on Solana.
<div
data-stele-organization="acme.com"
data-stele-document="terms-of-service"
></div>
<script src="https://stele.site/sdk/v1/stele.js" defer></script>import { TermsAcceptance } from "@stelehq/sdk/react";
<TermsAcceptance
apiBaseUrl="https://stele.site/api"
appUrl="https://stele.site"
organization="acme.com"
document="terms-of-service"
/>import { mount } from "@stelehq/sdk";
mount(document.querySelector("#terms"), {
apiBaseUrl: "https://stele.site/api",
appUrl: "https://stele.site",
organization: "acme.com",
document: "terms-of-service",
});Stele Gate
Make your program require the current terms
- 1Create a policy: which document and version an action needs.
- 2Call require_current() in your Solana program.
- 3Wrap the action with gate() in your app: Accept & Continue.
// Cargo.toml: stele-gate = "1"
pub const POLICY: Pubkey = pubkey!("YOUR_POLICY_ADDRESS");
pub fn deposit(ctx: Context<Deposit>, amount: u64) -> Result<()> {
stele_gate::require_current(
&ctx.accounts.access_pass,
&ctx.accounts.policy, // #[account(address = POLICY)]
&ctx.accounts.user,
)?;
// … the protected action
Ok(())
}import { createSteleGate } from "@stelehq/sdk";
const stele = createSteleGate({ apiBaseUrl: "https://stele.site/api", wallet });
await stele.gate({
policy: "YOUR_POLICY_ADDRESS",
action: () => sendDepositTransaction(), // runs once the terms are accepted
});References
SDK reference
Every function of @stelehq/sdk — browser, React and server — with its options and an example.
API explorer
Every REST endpoint, grouped and described. Send real requests from the page.
On-chain reference
The stele-gate crate, the Stele program's instructions, accounts and error codes.
API base URL
Solana Devnetthis site
https://stele.site/api/v1
Solana Mainnet
Not available yet
Each network is a separate Stele app with its own API keys and data. Server endpoints use an API key from the dashboard (API keys).