Configure backend-held credentials for embedded-wallet or custom-signer sponsorship.
Sponsorship configuration differs by client. Embedded wallets give Rhinestone a short-lived application token and a separate, single-use sponsorship grant. Custom signer integrations prepare sponsored transactions on a backend that holds the project API key.
Keep private signing keys and API keys on your backend. Never put either
credential in browser or mobile code.
Embedded wallets use two endpoints on your backend:
Endpoint
Purpose
Typical lifetime
GET /api/sponsorship/access-token
Mints the app and project identity token.
1 hour
POST /api/sponsorship/extension-token
Mints a single-use grant from the wallet’s canonical draft input or prepared transaction envelope.
5 minutes
Use the values from the JWT key registered on the Dashboard’s JWT keys screen:
Value
Purpose
Private JWK
Signs tokens. Store it only on the backend.
Integrator ID
JWT iss claim.
Project ID
JWT sub claim. It must match the project that owns the registered key.
App ID
A label you choose for the deployment, such as production.
Key ID
JWT kid header. It selects the registered public key.
@rhinestone/wallet/server reads these values from RHINESTONE_JWT_PRIVATE_KEY, RHINESTONE_INTEGRATOR_ID, RHINESTONE_PROJECT_ID, RHINESTONE_APP_ID, and RHINESTONE_KEY_ID. Its extensionToken() helper normalizes both embedded-wallet request shapes to the canonical intent input before signing.
These are application-owned handlers for the embedded-wallet SDK, not Caucasus quote bodies. requireApplicationSession represents your application’s session validation.
This minimal route shape is not a production policy. Configure issuance
checks, bind the requested account to the authenticated session, and
understand the current enforcement boundary described in Policies and
security.
The embedded wallet sends cookies to these endpoint URLs. Your backend still decides how to authenticate the application session and whether to issue a sponsorship grant.
The same endpoints sponsor wallet.deploy({ chain }) for managed Solana setup, including transaction fees and wallet rent. Setup is app-paid and has no user-paid fallback. Each creation or enrollment can request a separate grant; retries can request more.Your backend must accept the current canonical Solana input and validate it through shouldSponsor.intent. EVM account, calls, or appFees filters reject Solana-only setup and spends even when their callbacks would return true. See Solana issuance policy and Set up a Solana wallet. Follow Migration when upgrading the client and sponsorship backend.
The access token identifies the app and project. The embedded wallet needs it for both sponsored and user-paid intents. Only an extension token grants permission to spend sponsorship, and each jti can be redeemed once.Validate the full request before minting and use compatible client and server helpers for intent-bound grants. A digest in a token is not sufficient unless it matches the contract enforced downstream. See Policies and security before exposing token endpoints to an untrusted client.
Run the sponsorship-enabled SDK flow on your backend with its project API key:
import { RhinestoneSDK } from "@rhinestone/sdk";const rhinestone = new RhinestoneSDK({ auth: { mode: "apiKey", apiKey: process.env.RHINESTONE_API_KEY!, },});
Authenticate your application’s request, validate the account and transaction, then use this backend SDK instance to prepare, sign, and submit according to your signer architecture. Follow the Custom signer quickstart for account initialization; do not duplicate its signer configuration in a browser-facing sponsorship client.
The SDK’s experimental_jwt mode authenticates direct clients. SDK v3 uses
the sdk-3.0.0-caucasus approval contract. Upgrade backend helpers before
clients: getIntentExtensionToken runs once per sponsored prepare, before
the quote request, never at submission. Denied or failed approval stops
preparation without a user-paid fallback. Authentication alone does not
authorize an intent. See Custom signer policies.
Keep API keys backend-only and pin x-api-version: 2026-09.caucasus on quotes, submission, and reads. Request fee coverage with options.sponsorship.For singular intent-bound grants, validate the exact received account, optional source, nested destination, and options against your application’s policy before issuance. Use sponsorship scope intent and the sdk-3.0.0-caucasus approval contract. The sponsorship migration defines the canonical input and SHA-256 digest over RFC 8785 JSON, encoded as lowercase hex. Preserve wire values, explicit false flags, and array order; omit absent source and default absent options to {}. Do not reuse Blanc digests.The orchestrator verifies this binding when an intent-scoped grant requests sponsorship. Setting the HTTP header alone does not make SDK browser grants intent-bound. Intent-bound grants cannot authorize sponsored estimates.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Rhinestone","colors":{"primary":"#4f41ef","light":"#8479ff","dark":"#3428d1"},"logo":{"light":"https://mintcdn.com/rhinestone/IVpDy9zUkncYAe5u/logo/light.svg?fit=max\u0026auto=format\u0026n=IVpDy9zUkncYAe5u\u0026q=85\u0026s=6868a5854576ff60d371d5fdc0ae55c9","dark":"https://mintcdn.com/rhinestone/IVpDy9zUkncYAe5u/logo/dark.svg?fit=max\u0026auto=format\u0026n=IVpDy9zUkncYAe5u\u0026q=85\u0026s=2f9bff4fef6da993b8782b8e5d7357c5"},"favicon":"https://mintcdn.com/rhinestone/BVnq0VV8MigHINpS/favicon.svg?fit=max\u0026auto=format\u0026n=BVnq0VV8MigHINpS\u0026q=85\u0026s=25439e41b789b8369c52fa15ceae2644","appearance":{"default":"dark","strict":true},"background":{"color":{"dark":"#0C0C0C"}},"navbar":{"links":[{"href":"https://dashboard.rhinestone.dev","label":"Dashboard"},{"href":"https://github.com/rhinestonewtf","label":"GitHub"}]},"icons":{"library":"lucide"},"contextual":{"options":["copy","view","claude","chatgpt"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Create API Key","icon":"key","href":"https://tally.so/r/wg22x4"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"rhinestone","hasAudioNarration":false,"actualSubdomain":"rhinestone","customDomains":["docs.rhinestone.dev"],"gitSource":{"type":"github","owner":"rhinestonewtf","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aeb4295a60f76c94453464a","collectionId":"7618524b-8144-4f55-a620-58d79fbeddf2","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aeb4295a60f76c94453464a"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aeb4295a60f76c94453464a","clientVersion":"0.0.4074","searchFilterCounts":[{"language":"default","tag":"Wallets","count":153},{"language":"default","tag":"Custom signer","count":107},{"language":"default","tag":"Deposits","count":88},{"language":"default","tag":"SDK reference","count":74},{"language":"default","tag":"API Reference","count":67},{"language":"default","tag":"Transactions","count":30},{"language":"default","tag":"Account","count":28},{"language":"default","tag":"Overview","count":25},{"language":"default","tag":"Actions","count":25},{"language":"default","tag":"Session keys","count":21}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":":root{--background: #0C0C0C}.vm-code-group{--vm-menu-bg: #fff;--vm-menu-border: rgb(0 0 0 / 10%);--vm-hover: rgb(0 0 0 / 5%);margin:1.5rem 0;border:1px solid #404045;border-radius:12px}.dark .vm-code-group{--vm-menu-bg: #171717;--vm-menu-border: rgb(255 255 255 / 10%);--vm-hover: rgb(255 255 255 / 7%)}.vm-code-group-header{display:flex;align-items:center;justify-content:space-between;gap:0.75rem;padding:0.375rem 0.75rem;border-bottom:1px solid #404045;font-size:0.8125rem}.vm-code-caption{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:0.65}.vm-code-selector{position:relative;flex:none}.vm-code-trigger,.vm-code-option{display:flex;align-items:center;gap:0.5rem;min-height:32px;padding:0.375rem 0.5rem;border:0;border-radius:6px;background:transparent;color:inherit;font:inherit;line-height:1.25;cursor:pointer}.vm-code-trigger:hover,.vm-code-trigger[aria-expanded=\"true\"],.vm-code-option:hover,.vm-code-option:focus{background:var(--vm-hover)}.vm-code-trigger:focus-visible,.vm-code-option:focus-visible{outline:2px solid #8b7bf7;outline-offset:2px}.vm-code-group .vm-code-icon{display:block;flex:none;width:16px;height:16px;margin:0;border-radius:0}.vm-code-chevron{margin-left:0.125rem;opacity:0.55;transition:transform 150ms ease}.vm-code-trigger[aria-expanded=\"true\"] .vm-code-chevron{transform:rotate(180deg)}.vm-code-menu{position:absolute;top:calc(100% + 6px);right:0;z-index:30;min-width:156px;padding:4px;border:1px solid var(--vm-menu-border);border-radius:10px;background:var(--vm-menu-bg);box-shadow:0 8px 24px rgb(0 0 0 / 18%)}.vm-code-option{width:100%;text-align:left}.vm-code-check{margin-left:auto;opacity:0.65}@media (pointer: coarse){.vm-code-trigger,.vm-code-option{min-height:44px}}@media (prefers-reduced-motion: reduce){.vm-code-chevron{transition:none}}.vm-code-group-panel>*{margin:0!important;border:0!important;border-radius:0 0 12px 12px;box-shadow:none!important}.vm-code-group-panel[hidden]{display:none}.prose table{display:table}table{border-collapse:separate;border-spacing:0;border:1px solid #404045;border-radius:8px;width:fit-content!important}table th,table td{border-right:1px solid #404045;border-bottom:1px solid #404045;padding:12px 16px!important}table th:last-child,table td:last-child{border-right:none}table tr:last-child td{border-bottom:none}table th{background-color:#201E2C}table th:first-child{border-radius:8px 0 0 0}table th:last-child{border-radius:0 8px 0 0}[data-component-name=\"mermaid-controls-wrapper\"]{display:none!important}.mermaid svg .actor{fill:#17132E!important;stroke:#373352!important}.mermaid svg rect.actor{rx:6;ry:6}.mermaid svg text.actor>tspan{fill:#D3CFF7!important}.mermaid svg .actor-line{stroke:#464359!important;stroke-width:1!important}.mermaid svg .messageLine0,.mermaid svg .messageLine1{stroke:#464359!important;stroke-width:1.5!important}.mermaid svg #arrowhead path,.mermaid svg [id$=\"-arrowhead\"] path{fill:#464359!important;stroke:#464359!important}.mermaid svg #crosshead path,.mermaid svg [id$=\"-crosshead\"] path{stroke:#464359!important}.mermaid svg .messageText{fill:#C7C6CC!important}.mermaid svg .activation0,.mermaid svg .activation1,.mermaid svg .activation2{fill:#17132E!important;stroke:#373352!important}.mermaid svg .note{fill:#17132E!important;stroke:#373352!important}.mermaid svg .noteText,.mermaid svg .noteText>tspan{fill:#C7C6CC!important}.mermaid svg .loopText,.mermaid svg .loopText>tspan{fill:#C7C6CC!important}.mermaid svg .loopLine{stroke:#373352!important}.mermaid svg .labelBox{fill:#17132E!important;stroke:#373352!important}.mermaid svg .labelText,.mermaid svg .labelText>tspan{fill:#C7C6CC!important}.mermaid svg .sequenceNumber{fill:#D3CFF7!important}.mermaid svg .node rect,.mermaid svg .node circle,.mermaid svg .node ellipse,.mermaid svg .node polygon,.mermaid svg .node path{fill:#17132E!important;stroke:#373352!important}.mermaid svg .nodeLabel,.mermaid svg .node .label{color:#D3CFF7!important;fill:#D3CFF7!important}.mermaid svg .flowchart-link{stroke:#464359!important}.mermaid svg .edgeLabel,.mermaid svg .edge-label{color:#C7C6CC!important;fill:#C7C6CC!important}.mermaid .labelBkg,.mermaid .labelBkg *{background:transparent!important}.mermaid svg .marker{fill:#464359!important;stroke:#464359!important}.dark #sidebar [data-active=\"true\"]{background-color:#141414!important;border-radius:6px}.deposit-demo{container-type:inline-size}.deposit-demo-loading{position:absolute;inset:0;display:grid;place-items:center;margin:0}.deposit-demo-stage:has(iframe[data-ready=\"true\"]) .deposit-demo-loading{visibility:hidden}@container (max-width: 411px){.deposit-demo-stage{--deposit-demo-height: 629px}}"}],"page":{"pagePath":"transactions/sponsorship/set-up","slug":"/transactions/sponsorship/set-up","pageMetadata":{"title":"Set up","description":"Configure backend-held credentials for embedded-wallet or custom-signer sponsorship.","href":"/transactions/sponsorship/set-up"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Configure backend-held credentials for embedded-wallet or custom-signer sponsorship.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Note,Tab,Table,Tabs,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Sponsorship configuration differs by client. Embedded wallets give Rhinestone a short-lived application token and a separate, single-use sponsorship grant. Custom signer integrations prepare sponsored transactions on a backend that holds the project API key.`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Keep private signing keys and API keys on your backend. Never put either\ncredential in browser or mobile code.`})}),`\n`,_jsx(Heading,{level:`2`,id:`configure-sponsorship`,children:`Configure sponsorship`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Embedded wallet`,id:`embedded-wallet`,\"data-child-heading-ids\":`[\"embedded-wallets-backend\",\"embedded-wallets-client\",\"managed-solana-setup\",\"application-authentication-is-not-sponsorship\"]`,children:[_jsx(Heading,{level:`3`,id:`embedded-wallets-backend`,children:`Embedded wallets backend`}),_jsx(_components.p,{children:`Embedded wallets use two endpoints on your backend:`}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Endpoint`}),_jsx(_components.th,{children:`Purpose`}),_jsx(_components.th,{children:`Typical lifetime`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`GET /api/sponsorship/access-token`})}),_jsx(_components.td,{children:`Mints the app and project identity token.`}),_jsx(_components.td,{children:`1 hour`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`POST /api/sponsorship/extension-token`})}),_jsx(_components.td,{children:`Mints a single-use grant from the wallet’s canonical draft input or prepared transaction envelope.`}),_jsx(_components.td,{children:`5 minutes`})]})]})]}),_jsxs(_components.p,{children:[`Use the values from the JWT key registered on the Dashboard’s `,_jsxs(_components.a,{href:`https://dashboard.rhinestone.dev/keys/jwt`,children:[_jsx(_components.strong,{children:`JWT keys`}),` screen`]}),`:`]}),_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Value`}),_jsx(_components.th,{children:`Purpose`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Private JWK`}),_jsx(_components.td,{children:`Signs tokens. Store it only on the backend.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Integrator ID`}),_jsxs(_components.td,{children:[`JWT `,_jsx(_components.code,{children:`iss`}),` claim.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Project ID`}),_jsxs(_components.td,{children:[`JWT `,_jsx(_components.code,{children:`sub`}),` claim. It must match the project that owns the registered key.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`App ID`}),_jsxs(_components.td,{children:[`A label you choose for the deployment, such as `,_jsx(_components.code,{children:`production`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Key ID`}),_jsxs(_components.td,{children:[`JWT `,_jsx(_components.code,{children:`kid`}),` header. It selects the registered public key.`]})]})]})]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`@rhinestone/wallet/server`}),` reads these values from `,_jsx(_components.code,{children:`RHINESTONE_JWT_PRIVATE_KEY`}),`, `,_jsx(_components.code,{children:`RHINESTONE_INTEGRATOR_ID`}),`, `,_jsx(_components.code,{children:`RHINESTONE_PROJECT_ID`}),`, `,_jsx(_components.code,{children:`RHINESTONE_APP_ID`}),`, and `,_jsx(_components.code,{children:`RHINESTONE_KEY_ID`}),`. Its `,_jsx(_components.code,{children:`extensionToken()`}),` helper normalizes both embedded-wallet request shapes to the canonical intent input before signing.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// lib/sponsorship.ts`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createSponsorshipSigner`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@rhinestone/wallet/server\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` sponsorshipSigner`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createSponsorshipSigner`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),_jsx(_components.p,{children:`Mount each operation at the URL used by your client. Authenticate your normal application session before minting:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// app/api/sponsorship/access-token/route.ts`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sponsorshipSigner`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@/lib/sponsorship\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` GET`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`request`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` requireApplicationSession`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`token:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sponsorshipSigner`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`accessToken`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() });`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// app/api/sponsorship/extension-token/route.ts`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`sponsorshipSigner`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@/lib/sponsorship\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` function`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` POST`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`request`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` requireApplicationSession`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`intentOp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` Response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` token:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sponsorshipSigner`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`extensionToken`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`intentOp`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsxs(_components.p,{children:[`These are application-owned handlers for the embedded-wallet SDK, not Caucasus quote bodies. `,_jsx(_components.code,{children:`requireApplicationSession`}),` represents your application’s session validation.`]}),_jsx(Warning,{children:_jsxs(_components.p,{children:[`This minimal route shape is not a production policy. Configure issuance\nchecks, bind the requested account to the authenticated session, and\nunderstand the current enforcement boundary described in `,_jsx(_components.a,{href:`/transactions/sponsorship/policies-and-security`,children:`Policies and\nsecurity`}),`.`]})}),_jsx(Heading,{level:`3`,id:`embedded-wallets-client`,children:`Embedded wallets client`}),_jsxs(_components.p,{children:[`Use these endpoint URLs in the shared `,_jsx(_components.a,{href:`/wallets/embedded-wallets/accounts#initialize-the-client`,children:`client initialization`}),`:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`WalletClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@rhinestone/wallet\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` wallet`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` WalletClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` providerUrl:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://passkey.1auth.app\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` clientId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"my-app\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sponsorship:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` accessTokenUrl:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"/api/sponsorship/access-token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` extensionTokenUrl:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"/api/sponsorship/extension-token\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsx(_components.p,{children:`The embedded wallet sends cookies to these endpoint URLs. Your backend still decides how to authenticate the application session and whether to issue a sponsorship grant.`}),_jsx(Heading,{level:`3`,id:`managed-solana-setup`,children:`Managed Solana setup`}),_jsxs(_components.p,{children:[`The same endpoints sponsor `,_jsx(_components.code,{children:`wallet.deploy({ chain })`}),` for managed Solana setup, including transaction fees and wallet rent. Setup is app-paid and has no user-paid fallback. Each creation or enrollment can request a separate grant; retries can request more.`]}),_jsxs(_components.p,{children:[`Your backend must accept the current canonical Solana input and validate it through `,_jsx(_components.code,{children:`shouldSponsor.intent`}),`. EVM `,_jsx(_components.code,{children:`account`}),`, `,_jsx(_components.code,{children:`calls`}),`, or `,_jsx(_components.code,{children:`appFees`}),` filters reject Solana-only setup and spends even when their callbacks would return `,_jsx(_components.code,{children:`true`}),`. See `,_jsx(_components.a,{href:`/transactions/sponsorship/policies-and-security#managed-solana-issuance`,children:`Solana issuance policy`}),` and `,_jsx(_components.a,{href:`/wallets/embedded-wallets/accounts#set-up-a-solana-wallet`,children:`Set up a Solana wallet`}),`. Follow `,_jsx(_components.a,{href:`/wallets/embedded-wallets/migration-guide`,children:`Migration`}),` when upgrading the client and sponsorship backend.`]}),_jsx(Heading,{level:`3`,id:`application-authentication-is-not-sponsorship`,children:`Application authentication is not sponsorship`}),_jsxs(_components.p,{children:[`The access token identifies the app and project. The embedded wallet needs it for both sponsored and user-paid intents. Only an extension token grants permission to spend sponsorship, and each `,_jsx(_components.code,{children:`jti`}),` can be redeemed once.`]}),_jsxs(_components.p,{children:[`Validate the full request before minting and use compatible client and server helpers for intent-bound grants. A digest in a token is not sufficient unless it matches the contract enforced downstream. See `,_jsx(_components.a,{href:`/transactions/sponsorship/policies-and-security#current-enforcement-boundary`,children:`Policies and security`}),` before exposing token endpoints to an untrusted client.`]})]}),_jsxs(Tab,{title:`Custom signer`,id:`custom-signer`,children:[_jsx(_components.p,{children:`Run the sponsorship-enabled SDK flow on your backend with its project API key:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`RhinestoneSDK`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@rhinestone/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` rhinestone`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` RhinestoneSDK`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` auth:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` mode:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"apiKey\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`RHINESTONE_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),_jsxs(_components.p,{children:[`Authenticate your application’s request, validate the account and transaction, then use this backend SDK instance to prepare, sign, and submit according to your signer architecture. Follow the `,_jsx(_components.a,{href:`/wallets/custom-signer/quickstart`,children:`Custom signer quickstart`}),` for account initialization; do not duplicate its signer configuration in a browser-facing sponsorship client.`]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`The SDK’s `,_jsx(_components.code,{children:`experimental_jwt`}),` mode authenticates direct clients. SDK v3 uses\nthe `,_jsx(_components.code,{children:`sdk-3.0.0-caucasus`}),` approval contract. Upgrade backend helpers before\nclients: `,_jsx(_components.code,{children:`getIntentExtensionToken`}),` runs once per sponsored prepare, before\nthe quote request, never at submission. Denied or failed approval stops\npreparation without a user-paid fallback. Authentication alone does not\nauthorize an intent. See `,_jsx(_components.a,{href:`/transactions/sponsorship/policies-and-security#sdk-jwt-approval`,children:`Custom signer policies`}),`.`]})})]}),_jsxs(Tab,{title:`REST API`,id:`rest-api`,\"data-child-heading-ids\":`[\"bind-sponsorship-grants\"]`,children:[_jsx(Heading,{level:`3`,id:`bind-sponsorship-grants`,children:`Bind sponsorship grants`}),_jsxs(_components.p,{children:[`Keep API keys backend-only and pin `,_jsx(_components.code,{children:`x-api-version: 2026-09.caucasus`}),` on quotes, submission, and reads. Request fee coverage with `,_jsx(_components.a,{href:`/transactions/sponsorship/sponsor-fees#request-fee-coverage`,children:_jsx(_components.code,{children:`options.sponsorship`})}),`.`]}),_jsxs(_components.p,{children:[`For singular intent-bound grants, validate the exact received `,_jsx(_components.code,{children:`account`}),`, optional `,_jsx(_components.code,{children:`source`}),`, nested `,_jsx(_components.code,{children:`destination`}),`, and `,_jsx(_components.code,{children:`options`}),` against your application’s policy before issuance. Use sponsorship scope `,_jsx(_components.code,{children:`intent`}),` and the `,_jsx(_components.code,{children:`sdk-3.0.0-caucasus`}),` approval contract. The `,_jsx(_components.a,{href:`/api-reference/api-versioning#update-sponsorship`,children:`sponsorship migration`}),` defines the canonical input and SHA-256 digest over RFC 8785 JSON, encoded as lowercase hex. Preserve wire values, explicit `,_jsx(_components.code,{children:`false`}),` flags, and array order; omit absent `,_jsx(_components.code,{children:`source`}),` and default absent `,_jsx(_components.code,{children:`options`}),` to `,_jsx(_components.code,{children:`{}`}),`. Do not reuse Blanc digests.`]}),_jsx(_components.p,{children:`The orchestrator verifies this binding when an intent-scoped grant requests sponsorship. Setting the HTTP header alone does not make SDK browser grants intent-bound. Intent-bound grants cannot authorize sponsored estimates.`})]})]}),`\n`,_jsxs(_components.p,{children:[`Next, choose `,_jsx(_components.a,{href:`/transactions/sponsorship/sponsor-fees`,children:`which fees to sponsor`}),` and configure `,_jsx(_components.a,{href:`/transactions/sponsorship/policies-and-security`,children:`policies and budgets`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Set up","description":"Configure backend-held credentials for embedded-wallet or custom-signer sponsorship.","href":"/transactions/sponsorship/set-up"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Configure sponsorship","slug":"configure-sponsorship","depth":2,"children":[{"title":"Embedded wallets backend","slug":"embedded-wallets-backend","depth":3,"children":[],"tabId":"embedded-wallet"},{"title":"Embedded wallets client","slug":"embedded-wallets-client","depth":3,"children":[],"tabId":"embedded-wallet"},{"title":"Managed Solana setup","slug":"managed-solana-setup","depth":3,"children":[],"tabId":"embedded-wallet"},{"title":"Application authentication is not sponsorship","slug":"application-authentication-is-not-sponsorship","depth":3,"children":[],"tabId":"embedded-wallet"},{"title":"Bind sponsorship grants","slug":"bind-sponsorship-grants","depth":3,"children":[],"tabId":"rest-api"}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"rhinestone","siteName":"Rhinestone","title":"Set up - Rhinestone","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-14T10:31:00.039Z","originalFileLocation":"transactions/sponsorship/set-up.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"dark\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Configure backend-held credentials for embedded-wallet or custom-signer sponsorship.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Rhinestone\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/rhinestone/3aadr-awyf35tysK/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/rhinestone/3aadr-awyf35tysK/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/rhinestone/3aadr-awyf35tysK/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/rhinestone/3aadr-awyf35tysK/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/rhinestone/3aadr-awyf35tysK/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/rhinestone/3aadr-awyf35tysK/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/rhinestone/3aadr-awyf35tysK/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/rhinestone/3aadr-awyf35tysK/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/rhinestone/3aadr-awyf35tysK/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Set up - Rhinestone\">\u003cmeta data-mint-head property=\"og:description\" content=\"Configure backend-held credentials for embedded-wallet or custom-signer sponsorship.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Rhinestone\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.rhinestone.dev/transactions/sponsorship/set-up\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://rhinestone.mintlify.site/_mintlify/api/og/v2?division=Sponsorship\u0026amp;title=Set+up\u0026amp;description=Configure+backend-held+credentials+for+embedded-wallet+or+custom-signer+sponsorship.\u0026amp;theme=480304d2cd15a3be6f477401\u0026amp;signature=f0b46281a49c17dcf84e055cc8e18a1a45bdc6b57ba979fa8893acd2d0e02560\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Set up - Rhinestone\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Configure backend-held credentials for embedded-wallet or custom-signer sponsorship.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://rhinestone.mintlify.site/_mintlify/api/og/v2?division=Sponsorship\u0026amp;title=Set+up\u0026amp;description=Configure+backend-held+credentials+for+embedded-wallet+or+custom-signer+sponsorship.\u0026amp;theme=480304d2cd15a3be6f477401\u0026amp;signature=f0b46281a49c17dcf84e055cc8e18a1a45bdc6b57ba979fa8893acd2d0e02560\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/rhinestone/3aadr-awyf35tysK/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Rhinestone\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4f41ef\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.rhinestone.dev/transactions/sponsorship/set-up\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/transactions/sponsorship/set-up.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.rhinestone.dev/#organization\",\"name\":\"Rhinestone\",\"url\":\"https://docs.rhinestone.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/rhinestone/IVpDy9zUkncYAe5u/logo/light.svg?fit=max\u0026auto=format\u0026n=IVpDy9zUkncYAe5u\u0026q=85\u0026s=6868a5854576ff60d371d5fdc0ae55c9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.rhinestone.dev#website\",\"name\":\"Rhinestone\",\"url\":\"https://docs.rhinestone.dev\",\"publisher\":{\"@id\":\"https://docs.rhinestone.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.rhinestone.dev/transactions/sponsorship/set-up#webpage\",\"url\":\"https://docs.rhinestone.dev/transactions/sponsorship/set-up\",\"name\":\"Set up\",\"description\":\"Configure backend-held credentials for embedded-wallet or custom-signer sponsorship.\",\"dateModified\":\"2026-10-14T10:31:00.039Z\",\"isPartOf\":{\"@id\":\"https://docs.rhinestone.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.rhinestone.dev/transactions/sponsorship/set-up#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.rhinestone.dev/transactions/sponsorship/set-up#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Sponsorship\",\"item\":\"https://docs.rhinestone.dev/transactions/sponsorship/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Set up\",\"item\":\"https://docs.rhinestone.dev/transactions/sponsorship/set-up\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.rhinestone.dev/transactions/sponsorship/set-up#article\",\"headline\":\"Set up\",\"name\":\"Set up\",\"description\":\"Configure backend-held credentials for embedded-wallet or custom-signer sponsorship.\",\"url\":\"https://docs.rhinestone.dev/transactions/sponsorship/set-up\",\"mainEntityOfPage\":{\"@id\":\"https://docs.rhinestone.dev/transactions/sponsorship/set-up#webpage\"},\"dateModified\":\"2026-10-14T10:31:00.039Z\",\"publisher\":{\"@id\":\"https://docs.rhinestone.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.rhinestone.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Rhinestone\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Rhinestone","nav":{"global":{"anchors":[{"anchor":"Create API Key","icon":"key","href":"https://tally.so/r/wg22x4"}]},"tabs":[{"tab":"Home","pages":[{"title":"Home","href":"/home/introduction"}]},{"tab":"Wallets","menu":[{"item":"Overview","pages":[{"title":"Overview","href":"/wallets/overview"}]},{"item":"Embedded wallets","pages":[{"title":"Embedded wallets","href":"/wallets/embedded-wallets/overview"}]},{"item":"Session keys","pages":[{"title":"Session keys","href":"/wallets/session-keys/overview"}]},{"item":"Recovery","pages":[{"title":"Recovery","href":"/wallets/recovery/overview"}]},{"item":"Custom signer","pages":[{"title":"Custom signer","href":"/wallets/custom-signer/overview"}]}],"pages":[{"title":"Wallets","href":"/wallets/overview"}]},{"tab":"Transactions","menu":[{"item":"Overview","pages":[{"title":"Overview","href":"/transactions/overview"}]},{"item":"Relaying","pages":[{"title":"Relaying","href":"/transactions/relaying/overview"}]},{"item":"Multichain","pages":[{"title":"Multichain","href":"/transactions/multichain/overview"}]},{"item":"Trading","pages":[{"title":"Trading","href":"/transactions/trading/overview"}]},{"item":"Sponsorship \u0026 monetization","pages":[{"group":"Sponsorship","public":true,"pages":[{"title":"Sponsorship","sidebarTitle":"Overview","description":"Cover transaction fees for your users and manage sponsorship spending across your projects.","href":"/transactions/sponsorship/overview"},{"title":"Set up","href":"/transactions/sponsorship/set-up"},{"title":"Sponsor fees","description":"Choose which transaction costs your application pays and when users pay instead","href":"/transactions/sponsorship/sponsor-fees"},{"title":"Policies and security","href":"/transactions/sponsorship/policies-and-security"}]},{"group":"Monetization","public":true,"pages":[{"title":"Monetization","sidebarTitle":"Overview","href":"/transactions/monetization/overview"},{"title":"Set up","href":"/transactions/monetization/set-up"},{"title":"Monetize the flow","href":"/transactions/monetization/monetize-the-flow"}]}]}]},{"tab":"Deposits","menu":[{"item":"Overview","pages":[{"title":"Overview","href":"/deposits/overview/overview"}]},{"item":"Onramps","pages":[{"title":"Onramps","href":"/deposits/onramps/overview"}]},{"item":"Crypto","pages":[{"title":"Crypto","href":"/deposits/crypto/overview"}]},{"item":"Exchanges","pages":[{"title":"Exchanges","href":"/deposits/exchanges/overview"}]},{"item":"Headless","pages":[{"title":"Headless","href":"/deposits/headless/overview"}]}],"pages":[{"title":"Deposits","href":"/deposits/overview/overview"}]},{"tab":"Fiat integrations","pages":[{"title":"Fiat integrations","href":"/fiat/overview"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Set up - Rhinestone","buildId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","deploymentId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","dynamics":[],"chunks":[]}