curl --request POST \
--url https://test-api.shodai.network/v0/siwe/verify \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"address": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
"message": "api.example.com wants you to sign in with your Ethereum account:\n0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266\n\nProve control of this wallet to Shodai.\n\nURI: https://api.example.com\nVersion: 1\nChain ID: 59141\nNonce: 0123456789abcdef0123456789abcdef\nIssued At: 2026-08-07T20:00:00.000Z",
"signature": "0x1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
}
'
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
message: 'api.example.com wants you to sign in with your Ethereum account:\n0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266\n\nProve control of this wallet to Shodai.\n\nURI: https://api.example.com\nVersion: 1\nChain ID: 59141\nNonce: 0123456789abcdef0123456789abcdef\nIssued At: 2026-08-07T20:00:00.000Z',
signature: '0x1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111'
})
};
fetch('https://test-api.shodai.network/v0/siwe/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
Verifies a signed EIP-4361 message and links the wallet to the authenticated Shodai account. OAuth bearer tokens require agreements.write; API keys require the equivalent account entitlement. Verification proves control only: it does not transfer custody or authorize Shodai to sign agreement inputs.
POST
/
v0
/
siwe
/
verify
cURL
curl --request POST \
--url https://test-api.shodai.network/v0/siwe/verify \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"address": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
"message": "api.example.com wants you to sign in with your Ethereum account:\n0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266\n\nProve control of this wallet to Shodai.\n\nURI: https://api.example.com\nVersion: 1\nChain ID: 59141\nNonce: 0123456789abcdef0123456789abcdef\nIssued At: 2026-08-07T20:00:00.000Z",
"signature": "0x1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
}
'
const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
address: '0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266',
message: 'api.example.com wants you to sign in with your Ethereum account:\n0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266\n\nProve control of this wallet to Shodai.\n\nURI: https://api.example.com\nVersion: 1\nChain ID: 59141\nNonce: 0123456789abcdef0123456789abcdef\nIssued At: 2026-08-07T20:00:00.000Z',
signature: '0x1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111'
})
};
fetch('https://test-api.shodai.network/v0/siwe/verify', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
Use an OAuth bearer access token with the agreements.write scope, or provide X-API-Key as the alternative credential. Verification proves control and links the wallet to the authenticated Shodai account; it does not transfer custody or authorize Shodai to sign agreement inputs. See Authentication for delegated OAuth access and Link a wallet and access agreements for the creator and participant access model.
TypeScript with viem
import { createSiweMessage } from 'viem/siwe';const baseUrl = process.env.SHODAI_API_BASE_URL!.replace(/\/+$/, '');const apiUrl = new URL(baseUrl);const accessToken = process.env.SHODAI_ACCESS_TOKEN!;const headers = { Authorization: `Bearer ${accessToken}`, 'Content-Type': 'application/json',};const address = walletClient.account.address;const nonceResponse = await fetch(`${baseUrl}/v0/siwe/nonce`, { method: 'POST', headers, body: JSON.stringify({ address }),});const { data: challenge } = await nonceResponse.json();const message = createSiweMessage({ domain: apiUrl.host, address, statement: 'Prove control of this wallet to Shodai.', uri: apiUrl.origin, version: '1', chainId: 59141, nonce: challenge.nonce, issuedAt: new Date(challenge.issuedAt),});const signature = await walletClient.signMessage({ account: walletClient.account, message,});const verification = await fetch(`${baseUrl}/v0/siwe/verify`, { method: 'POST', headers, body: JSON.stringify({ address, message, signature, domain: apiUrl.host, chainId: 59141, }),});console.log(await verification.json());// X-API-Key: YOUR_API_KEY is the alternative to Authorization.
Authorizations
ApiKeyAuthOAuthBearerAuth
X-API-Key
string
header
default:YOUR_API_KEY
required
Canonical API-key credential. Send X-API-Key: cns_pk_..., or Authorization: Bearer cns_pk_... only as an API-key compatibility alias.
Body
application/json
address
string
required
Wallet address claimed by the EIP-4361 message.
Pattern: ^0x[0-9a-fA-F]{40}$
message
string
required
Complete EIP-4361 message containing the issued nonce, wallet, domain, URI, chain ID, and issued-at timestamp.
signature
string
required
Hexadecimal signature over the complete EIP-4361 message.
Pattern: ^0x[0-9a-fA-F]+$
domain
string
Optional assertion that must exactly match the domain in the signed message.
chainId
integer
Optional assertion that must match the chain ID in the signed message.
{"docsConfig":{"theme":"linden","$schema":"https://mintlify.com/docs.json","name":"Shodai Developer Documentation","description":"Agreements API documentation for first-run TypeScript SDK and MCP integrations, agreement JSON authoring, deployment preflight, EIP-712 signing, deployment, and signed input submission.","colors":{"primary":"#73766C","light":"#DAE5C5","dark":"#73766C"},"logo":{"light":"https://mintcdn.com/cnslabs/QoBo9wst-a7Wya5g/images/shodai-logo-light.svg?fit=max\u0026auto=format\u0026n=QoBo9wst-a7Wya5g\u0026q=85\u0026s=3bb56ed1b8eacd010dd50bd09c6da976","dark":"https://mintcdn.com/cnslabs/QoBo9wst-a7Wya5g/images/shodai-logo-dark.svg?fit=max\u0026auto=format\u0026n=QoBo9wst-a7Wya5g\u0026q=85\u0026s=913c7e9ced0751b39a48765a8554748b","href":"https://docs.shodai.network/"},"favicon":"https://mintcdn.com/cnslabs/QoBo9wst-a7Wya5g/images/shodai-favicon.png?fit=max\u0026auto=format\u0026n=QoBo9wst-a7Wya5g\u0026q=85\u0026s=37c6c88456d7a0af5bb167ae052cb28c","api":{"openapi":"openapi.json","params":{"expanded":"closed"},"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","javascript"],"prefill":true,"autogenerate":true},"url":"full"},"appearance":{"default":"system","strict":false},"background":{"color":{"light":"#FAFFEF","dark":"#000000"}},"navbar":{"links":[{"href":"https://docs.shodai.network/","label":"Docs"},{"href":"https://docs.shodai.network/reference/api/system/get-the-openapi-document-for-the-agreements-api","label":"API Reference"},{"href":"https://developers.shodai.network/api-playground/","label":"API Playground"},{"href":"https://app.shodai.network/agreements","label":"Demo App"},{"href":"https://developers.shodai.network","label":"Dev Portal"},{"href":"https://github.com/CNSLabs","label":"GitHub"}]},"seo":{"metatags":{"og:image":"https://docs.shodai.network/images/shodai-og.png","twitter:image":"https://docs.shodai.network/images/shodai-og.png","twitter:card":"summary_large_image"}},"fonts":{"family":"Aeonik Pro","weight":400},"styling":{"eyebrows":"section","codeblocks":{"theme":{"light":"github-light","dark":"github-dark"}},"latex":false},"integrations":{"ga4":{"measurementId":"G-FYXLLRMJG0"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","grok","aistudio","devin","windsurf","cursor","vscode"],"display":"header"},"interaction":{"drilldown":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cnslabs","hasAudioNarration":false,"actualSubdomain":"cnslabs","customDomains":["docs.shodai.network"],"gitSource":{"type":"github","owner":"cnslabs","repo":"cns-service","deployBranch":"master","contentDirectory":"backend/apps/external-api/src/external-api/docs","isPrivate":true,"mountPath":"","label":""},"feedback":{"agentFeedback":false,"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae955ae2422c68a7df46aff:success","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"Reference","count":25},{"language":"default","tag":"API Reference","count":19},{"language":"default","tag":"Webhooks","count":9},{"language":"default","tag":"Start","count":6},{"language":"default","tag":"Architecture","count":6},{"language":"default","tag":"Workflow","count":5},{"language":"default","tag":"Examples","count":3},{"language":"default","tag":"Using Agreements","count":3},{"language":"default","tag":"Migration guides","count":2},{"language":"default","tag":"Agreement Records","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"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":"site-roles","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":"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":"editor-metadata","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":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"@font-face{font-family:\"Aeonik Pro\";src:url(\"/fonts/aeonikpro-regular.woff2\") format(\"woff2\"),\n url(\"/fonts/aeonikpro-regular.woff\") format(\"woff\");font-style:normal;font-weight:400;font-display:swap}@font-face{font-family:\"Aeonik Pro\";src:url(\"/fonts/aeonikpro-regularitalic.woff2\") format(\"woff2\"),\n url(\"/fonts/aeonikpro-regularitalic.woff\") format(\"woff\");font-style:italic;font-weight:400;font-display:swap}@font-face{font-family:\"Aeonik Pro\";src:url(\"/fonts/aeonikpro-medium.woff2\") format(\"woff2\"),\n url(\"/fonts/aeonikpro-medium.woff\") format(\"woff\");font-style:normal;font-weight:500;font-display:swap}@font-face{font-family:\"Aeonik Pro\";src:url(\"/fonts/aeonikpro-mediumitalic.woff2\") format(\"woff2\"),\n url(\"/fonts/aeonikpro-mediumitalic.woff\") format(\"woff\");font-style:italic;font-weight:500;font-display:swap}@font-face{font-family:\"Aeonik Pro\";src:url(\"/fonts/aeonikpro-semibold.woff2\") format(\"woff2\"),\n url(\"/fonts/aeonikpro-semibold.woff\") format(\"woff\");font-style:normal;font-weight:600;font-display:swap}@font-face{font-family:\"Aeonik Pro\";src:url(\"/fonts/aeonikpro-semibolditalic.woff2\") format(\"woff2\"),\n url(\"/fonts/aeonikpro-semibolditalic.woff\") format(\"woff\");font-style:italic;font-weight:600;font-display:swap}@font-face{font-family:\"Aeonik Pro\";src:url(\"/fonts/aeonikpro-semibold.woff2\") format(\"woff2\"),\n url(\"/fonts/aeonikpro-semibold.woff\") format(\"woff\");font-style:normal;font-weight:700;font-display:swap}@font-face{font-family:\"Aeonik Pro\";src:url(\"/fonts/aeonikpro-semibolditalic.woff2\") format(\"woff2\"),\n url(\"/fonts/aeonikpro-semibolditalic.woff\") format(\"woff\");font-style:italic;font-weight:700;font-display:swap}:root{--shodai-black: #000000;--shodai-canvas: #faffef;--shodai-ink-2: #575a51;--shodai-ink-3: #73766c;--shodai-section-label: #8a927d;--shodai-line: #dee6cf;--shodai-dark-ink: #dae5c5;--shodai-dark-section-label: #9aa587}[data-docs-theme=\"linden\"]{--shodai-diagram-bg: var(--shodai-canvas);--shodai-diagram-surface: color-mix(in srgb, var(--shodai-canvas) 92%, white);--shodai-diagram-surface-alt: color-mix(in srgb, var(--shodai-canvas) 86%, var(--shodai-line));--shodai-diagram-ink: var(--shodai-black);--shodai-diagram-muted: var(--shodai-ink-2);--shodai-diagram-accent: rgb(var(--primary));--shodai-diagram-line: var(--shodai-line);--shodai-diagram-connector: color-mix(in srgb, var(--shodai-ink-3) 44%, var(--shodai-line));--shodai-diagram-grid: color-mix(in srgb, var(--shodai-line) 42%, transparent);--shodai-diagram-tint-soft: color-mix(in srgb, var(--shodai-line) 28%, transparent);--shodai-diagram-tint: color-mix(in srgb, var(--shodai-line) 45%, transparent);--shodai-diagram-tint-strong: color-mix(in srgb, var(--shodai-line) 58%, transparent);--shodai-diagram-tint-stronger: color-mix(in srgb, var(--shodai-line) 70%, transparent)}.dark [data-docs-theme=\"linden\"]{--shodai-diagram-bg: var(--shodai-black);--shodai-diagram-surface: color-mix(in srgb, var(--shodai-black) 92%, var(--shodai-dark-ink));--shodai-diagram-surface-alt: color-mix(in srgb, var(--shodai-black) 88%, var(--shodai-dark-ink));--shodai-diagram-ink: var(--shodai-canvas);--shodai-diagram-muted: var(--shodai-dark-ink);--shodai-diagram-accent: rgb(var(--primary-light));--shodai-diagram-line: color-mix(in srgb, var(--shodai-dark-ink) 36%, transparent);--shodai-diagram-connector: color-mix(in srgb, var(--shodai-dark-ink) 62%, transparent);--shodai-diagram-grid: color-mix(in srgb, var(--shodai-dark-ink) 16%, transparent);--shodai-diagram-tint-soft: color-mix(in srgb, var(--shodai-dark-ink) 12%, transparent);--shodai-diagram-tint: color-mix(in srgb, var(--shodai-dark-ink) 16%, transparent);--shodai-diagram-tint-strong: color-mix(in srgb, var(--shodai-dark-ink) 20%, transparent);--shodai-diagram-tint-stronger: color-mix(in srgb, var(--shodai-dark-ink) 26%, transparent)}.shodai-diagram-frame{background:var(--shodai-diagram-bg);border-color:var(--shodai-diagram-line)}.shodai-architecture-svg{display:block;height:auto;width:100%}.shodai-state-machine-frame{color:var(--shodai-diagram-muted);background:var(--shodai-diagram-bg);border-color:var(--shodai-diagram-line)}.shodai-state-machine-shell{background:var(--shodai-diagram-surface)}.shodai-state-machine-header{color:var(--shodai-diagram-ink);background:var(--shodai-diagram-bg);border-color:var(--shodai-diagram-line)}.shodai-state-machine-title{color:var(--shodai-diagram-ink)}.shodai-state-machine-meta{color:var(--shodai-diagram-muted)}.shodai-state-machine-count{color:var(--shodai-diagram-accent);background:var(--shodai-diagram-tint-soft);border-color:var(--shodai-diagram-line)}.shodai-state-machine-canvas-bg{background:var(--shodai-diagram-surface)}.shodai-state-machine-grid-dot{fill:var(--shodai-diagram-line)}.shodai-state-machine-connector{color:var(--shodai-diagram-connector)}.shodai-state-machine-label-bg{fill:var(--shodai-diagram-bg);stroke:var(--shodai-diagram-line)}.shodai-state-machine-label-text,.shodai-state-machine-node-id{fill:var(--shodai-diagram-ink)}.shodai-state-machine-start-node{fill:var(--shodai-diagram-tint-stronger)}.shodai-state-machine-node{fill:var(--shodai-diagram-bg);color:var(--shodai-diagram-line)}.shodai-state-machine-node-name{fill:var(--shodai-diagram-muted)}.shodai-state-machine-controls{background:var(--shodai-diagram-bg);border-color:var(--shodai-diagram-line)}.shodai-state-machine-control{color:var(--shodai-diagram-ink);border-color:var(--shodai-diagram-line)}.shodai-state-machine-control:hover,.shodai-state-machine-control:focus{background:var(--shodai-diagram-tint-soft)}[data-docs-theme=\"linden\"] .navbar-link a{color:var(--shodai-ink-2)!important;font-weight:400!important}[data-docs-theme=\"linden\"] .navbar-link a:hover{color:var(--shodai-black)!important}.dark [data-docs-theme=\"linden\"] .navbar-link a{color:var(--shodai-dark-ink)!important}.dark [data-docs-theme=\"linden\"] .navbar-link a:hover{color:var(--shodai-canvas)!important}[data-docs-theme=\"linden\"] :is(h1,h2,h3,h4,h5,h6),[data-docs-theme=\"linden\"] [id=\"sidebar\"] :is(a,button,div),[data-docs-theme=\"linden\"] [id=\"sidebar-content\"] :is(a,button,div),[data-docs-theme=\"linden\"] :is(.sidebar-group,.sidebar-group-header) :is(a,button,div,h5){font-weight:400!important}[data-docs-theme=\"linden\"] :is(h1,h2,h3,h4,h5,h6),[data-docs-theme=\"linden\"] [id=\"sidebar\"] :is([class*=\"text-gray-900\"],[class*=\"text-gray-950\"]),[data-docs-theme=\"linden\"] [id=\"sidebar-content\"] :is([class*=\"text-gray-900\"],[class*=\"text-gray-950\"]),[data-docs-theme=\"linden\"] .sidebar-group-header{color:var(--shodai-black)!important}.dark [data-docs-theme=\"linden\"] :is(h1,h2,h3,h4,h5,h6),.dark [data-docs-theme=\"linden\"] [id=\"sidebar\"] :is([class*=\"text-gray-900\"],[class*=\"text-gray-950\"],[class*=\"text-gray-200\"]),.dark [data-docs-theme=\"linden\"] [id=\"sidebar-content\"] :is([class*=\"text-gray-900\"],[class*=\"text-gray-950\"],[class*=\"text-gray-200\"]),.dark [data-docs-theme=\"linden\"] .sidebar-group-header{color:var(--shodai-dark-ink)!important}[data-docs-theme=\"linden\"] :is([id=\"sidebar\"],[id=\"sidebar-content\"],.sidebar-group) :is(a,button){color:var(--shodai-ink-2)!important}[data-docs-theme=\"linden\"] :is([id=\"sidebar\"],[id=\"sidebar-content\"],.sidebar-group) :is(a,button):hover,[data-docs-theme=\"linden\"] :is([id=\"sidebar\"],[id=\"sidebar-content\"],.sidebar-group) a[aria-current=\"page\"]{color:var(--shodai-black)!important}[data-docs-theme=\"linden\"] .chat-assistant-floating-input,[data-docs-theme=\"linden\"] .chat-assistant-input,[data-docs-theme=\"linden\"] .chat-assistant-send-button{display:none!important}.dark [data-docs-theme=\"linden\"] :is([id=\"sidebar\"],[id=\"sidebar-content\"],.sidebar-group) :is(a,button){color:var(--shodai-dark-ink)!important}.dark [data-docs-theme=\"linden\"] :is([id=\"sidebar\"],[id=\"sidebar-content\"],.sidebar-group) :is(a,button):hover,.dark [data-docs-theme=\"linden\"] :is([id=\"sidebar\"],[id=\"sidebar-content\"],.sidebar-group) a[aria-current=\"page\"]{color:var(--shodai-canvas)!important}[data-docs-theme=\"linden\"] :is(a,button)[class*=\"text-gray-600\"],[data-docs-theme=\"linden\"] :is(a,button)[class*=\"text-gray-700\"]{color:var(--shodai-ink-2)!important}[data-docs-theme=\"linden\"] :is(a,button)[class*=\"hover:text-gray\"]:hover{color:var(--shodai-black)!important}[data-docs-theme=\"linden\"] :is(button,.group) svg[class*=\"bg-gray\"]{background-color:var(--shodai-ink-2)!important}[data-docs-theme=\"linden\"] :is(button,.group):hover svg[class*=\"bg-gray\"]{background-color:var(--shodai-black)!important}.dark [data-docs-theme=\"linden\"] :is(a,button)[class*=\"dark:text-gray\"]{color:var(--shodai-dark-ink)!important}.dark [data-docs-theme=\"linden\"] :is(a,button)[class*=\"dark:hover:text-gray\"]:hover{color:var(--shodai-canvas)!important}.dark [data-docs-theme=\"linden\"] :is(button,.group) svg[class*=\"bg-gray\"]{background-color:var(--shodai-dark-ink)!important}.dark [data-docs-theme=\"linden\"] :is(button,.group):hover svg[class*=\"bg-gray\"]{background-color:var(--shodai-canvas)!important}[data-docs-theme=\"linden\"] :is([id=\"sidebar\"],[id=\"sidebar-content\"]) :is(h5,.sidebar-group-header){color:var(--shodai-section-label)!important}.dark [data-docs-theme=\"linden\"] :is([id=\"sidebar\"],[id=\"sidebar-content\"]) :is(h5,.sidebar-group-header){color:var(--shodai-dark-section-label)!important}[data-docs-theme=\"linden\"] footer{color:var(--shodai-ink-2)!important}[data-docs-theme=\"linden\"] a[href=\"/sdks/quickstart-with-typescript-sdk\"][class*=\"border\"],[data-docs-theme=\"linden\"] footer a[class*=\"border\"]{color:rgb(var(--primary))!important}.dark [data-docs-theme=\"linden\"] footer{color:var(--shodai-dark-ink)!important}.dark [data-docs-theme=\"linden\"] a[href=\"/sdks/quickstart-with-typescript-sdk\"][class*=\"border\"],.dark [data-docs-theme=\"linden\"] footer a[class*=\"border\"]{color:rgb(var(--primary-light))!important}"}]}
{"page":{"pagePath":"reference/api/wallet-access/verify-and-link-wallet","slug":"/reference/api/wallet-access/verify-and-link-wallet","pageMetadata":{"title":"Verify and link wallet","description":"Verifies a signed EIP-4361 message and links the wallet to the authenticated Shodai account. OAuth bearer tokens require agreements.write; API keys require the equivalent account entitlement. Verification proves control only: it does not transfer custody or authorize Shodai to sign agreement inputs.","deprecated":null,"version":null,"sidebarTitle":"Verify and link wallet","openapi":"/openapi.json post /v0/siwe/verify","href":"/reference/api/wallet-access/verify-and-link-wallet","autogeneratedByOpenApi":true},"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: \"Verifies a signed EIP-4361 message and links the wallet to the authenticated Shodai account. OAuth bearer tokens require agreements.write; API keys require the equivalent account entitlement. Verification proves control only: it does not transfer custody or authorize Shodai to sign agreement inputs.\"\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`,..._provideComponents(),...props.components},{CodeBlock,Heading,Visibility}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Visibility)_missingMdxReference(`Visibility`,true);return _jsxs(_Fragment,{children:[_jsx(Visibility,{for:`agents`,children:_jsxs(_components.p,{children:[`For the complete documentation index, see `,_jsx(_components.a,{href:`https://docs.shodai.network/llms.txt`,children:`llms.txt`}),`.`]})}),`\n`,_jsxs(_components.p,{children:[`Use an OAuth bearer access token with the `,_jsx(_components.code,{children:`agreements.write`}),` scope, or provide `,_jsx(_components.code,{children:`X-API-Key`}),` as the alternative credential. Verification proves control and links the wallet to the authenticated Shodai account; it does not transfer custody or authorize Shodai to sign agreement inputs. See `,_jsx(_components.a,{href:`/authentication`,children:`Authentication`}),` for delegated OAuth access and `,_jsx(_components.a,{href:`/workflow/link-a-wallet-and-access-agreements`,children:`Link a wallet and access agreements`}),` for the creator and participant access model.`]}),`\n`,_jsx(Heading,{level:`3`,id:`typescript-with-viem`,children:`TypeScript with viem`}),`\n`,_jsx(CodeBlock,{numberOfLines:`44`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light github-dark`,style:{backgroundColor:`#fff`,\"--shiki-dark-bg\":`#24292e`,color:`#24292e`,\"--shiki-dark\":`#e1e4e8`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`44`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`import`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { createSiweMessage } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`from`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` 'viem/siwe'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` baseUrl`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` process.env.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`SHODAI_API_BASE_URL`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`!`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`replace`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`/`}),_jsx(_components.span,{style:{color:`#22863A`,\"--shiki-light-font-weight\":`bold`,\"--shiki-dark\":`#85E89D`,\"--shiki-dark-font-weight\":`bold`},children:`\\\\/`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`+$`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`/`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`''`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` apiUrl`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` new`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` URL`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(baseUrl);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` accessToken`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` process.env.`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`SHODAI_ACCESS_TOKEN`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`!`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` headers`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` Authorization: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:\"`Bearer ${\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`accessToken`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:\"}`\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'application/json'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`};`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` address`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` walletClient.account.address;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` nonceResponse`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` await`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` fetch`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:\"`${\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`baseUrl`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:\"}/v0/siwe/nonce`\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` method: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'POST'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` headers,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` body: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`JSON`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`stringify`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`({ address }),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` { `}),_jsx(_components.span,{style:{color:`#E36209`,\"--shiki-dark\":`#FFAB70`},children:`data`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`challenge`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` } `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`=`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` nonceResponse.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`json`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` message`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` createSiweMessage`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`({`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` domain: apiUrl.host,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` address,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` statement: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'Prove control of this wallet to Shodai.'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` uri: apiUrl.origin,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` version: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'1'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` chainId: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`59141`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` nonce: challenge.nonce,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` issuedAt: `}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`new`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` Date`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(challenge.issuedAt),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` signature`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` walletClient.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`signMessage`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`({`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` account: walletClient.account,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` message,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`const`}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:` verification`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` =`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:` await`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:` fetch`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:\"`${\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`baseUrl`}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:\"}/v0/siwe/verify`\"}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` method: `}),_jsx(_components.span,{style:{color:`#032F62`,\"--shiki-dark\":`#9ECBFF`},children:`'POST'`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` headers,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` body: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`JSON`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`stringify`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`({`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` address,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` message,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` signature,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` domain: apiUrl.host,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` chainId: `}),_jsx(_components.span,{style:{color:`#005CC5`,\"--shiki-dark\":`#79B8FF`},children:`59141`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` }),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`});`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`console.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`log`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`(`}),_jsx(_components.span,{style:{color:`#D73A49`,\"--shiki-dark\":`#F97583`},children:`await`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:` verification.`}),_jsx(_components.span,{style:{color:`#6F42C1`,\"--shiki-dark\":`#B392F0`},children:`json`}),_jsx(_components.span,{style:{color:`#24292E`,\"--shiki-dark\":`#E1E4E8`},children:`());`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A737D`,\"--shiki-dark\":`#6A737D`},children:`// X-API-Key: YOUR_API_KEY is the alternative to Authorization.`})}),`\n`]})})})]})}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":{"codeStyling":{"theme":{"light":"github-light","dark":"github-dark"}},"config":{},"pageMetadata":{"title":"Verify and link wallet","description":"Verifies a signed EIP-4361 message and links the wallet to the authenticated Shodai account. OAuth bearer tokens require agreements.write; API keys require the equivalent account entitlement. Verification proves control only: it does not transfer custody or authorize Shodai to sign agreement inputs.","deprecated":null,"version":null,"sidebarTitle":"Verify and link wallet","openapi":"/openapi.json post /v0/siwe/verify","href":"/reference/api/wallet-access/verify-and-link-wallet","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"TypeScript with viem","slug":"typescript-with-viem","depth":3,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/cnslabs/f1f4f74fd7adaa96/hubspot.js"],"openApiReferenceData":{"operation":{"summary":"Verify and link wallet","description":"Verifies a signed EIP-4361 message and links the wallet to the authenticated Shodai account. OAuth bearer tokens require agreements.write; API keys require the equivalent account entitlement. Verification proves control only: it does not transfer custody or authorize Shodai to sign agreement inputs.","tags":["Wallet Access"],"security":["a3b3b0ef-e2d4-4e54-b7fd-12f692320f39","10254d9e-2373-48f9-8178-fa500b813a1c"],"requestBody":"7b0709d3-4aec-4ffe-8228-197b47f426bd","responses":{"201":"9a6b1bb4-c066-465a-b19b-9c06b99df3d3","400":"8f5be31d-6999-420c-9677-fc5c5d2bd1f9","401":"e17de58b-d124-4d71-9921-8d1032401aa4","402":"c2dbf763-b26a-450f-8941-61e9ac961503","403":"57af0c2f-d778-4ec1-9fa1-76a96fa66a10","409":"720995ed-7488-49a6-9f89-ca5b668c329c"},"operationId":"verifySiweWallet","x-mint":{"metadata":{"sidebarTitle":"Verify and link wallet"},"content":"\u003cVisibility for=\"agents\">\nFor the complete documentation index, see [llms.txt](https://docs.shodai.network/llms.txt).\n\u003c/Visibility>\n\nUse an OAuth bearer access token with the `agreements.write` scope, or provide `X-API-Key` as the alternative credential. Verification proves control and links the wallet to the authenticated Shodai account; it does not transfer custody or authorize Shodai to sign agreement inputs. See [Authentication](/authentication) for delegated OAuth access and [Link a wallet and access agreements](/workflow/link-a-wallet-and-access-agreements) for the creator and participant access model.\n\n### TypeScript with viem\n\n```typescript\nimport { createSiweMessage } from 'viem/siwe';\n\nconst baseUrl = process.env.SHODAI_API_BASE_URL!.replace(/\\/+$/, '');\nconst apiUrl = new URL(baseUrl);\nconst accessToken = process.env.SHODAI_ACCESS_TOKEN!;\nconst headers = {\n Authorization: `Bearer ${accessToken}`,\n 'Content-Type': 'application/json',\n};\nconst address = walletClient.account.address;\nconst nonceResponse = await fetch(`${baseUrl}/v0/siwe/nonce`, {\n method: 'POST',\n headers,\n body: JSON.stringify({ address }),\n});\nconst { data: challenge } = await nonceResponse.json();\nconst message = createSiweMessage({\n domain: apiUrl.host,\n address,\n statement: 'Prove control of this wallet to Shodai.',\n uri: apiUrl.origin,\n version: '1',\n chainId: 59141,\n nonce: challenge.nonce,\n issuedAt: new Date(challenge.issuedAt),\n});\nconst signature = await walletClient.signMessage({\n account: walletClient.account,\n message,\n});\nconst verification = await fetch(`${baseUrl}/v0/siwe/verify`, {\n method: 'POST',\n headers,\n body: JSON.stringify({\n address,\n message,\n signature,\n domain: apiUrl.host,\n chainId: 59141,\n }),\n});\nconsole.log(await verification.json());\n\n// X-API-Key: YOUR_API_KEY is the alternative to Authorization.\n```"},"x-codeSamples":[{"lang":"typescript","label":"viem with OAuth bearer","source":"import { createSiweMessage } from 'viem/siwe';\n\nconst baseUrl = process.env.SHODAI_API_BASE_URL!.replace(/\\/+$/, '');\nconst apiUrl = new URL(baseUrl);\nconst accessToken = process.env.SHODAI_ACCESS_TOKEN!;\nconst headers = {\n Authorization: `Bearer ${accessToken}`,\n 'Content-Type': 'application/json',\n};\nconst address = walletClient.account.address;\nconst nonceResponse = await fetch(`${baseUrl}/v0/siwe/nonce`, {\n method: 'POST',\n headers,\n body: JSON.stringify({ address }),\n});\nconst { data: challenge } = await nonceResponse.json();\nconst message = createSiweMessage({\n domain: apiUrl.host,\n address,\n statement: 'Prove control of this wallet to Shodai.',\n uri: apiUrl.origin,\n version: '1',\n chainId: 59141,\n nonce: challenge.nonce,\n issuedAt: new Date(challenge.issuedAt),\n});\nconst signature = await walletClient.signMessage({\n account: walletClient.account,\n message,\n});\nconst verification = await fetch(`${baseUrl}/v0/siwe/verify`, {\n method: 'POST',\n headers,\n body: JSON.stringify({\n address,\n message,\n signature,\n domain: apiUrl.host,\n chainId: 59141,\n }),\n});\nconsole.log(await verification.json());\n\n// X-API-Key: YOUR_API_KEY is the alternative to Authorization."}],"method":"post","type":"path","servers":["6080c7b0-65de-4254-9208-0f6a9134e838","61ebdc51-3903-424f-b54d-3e2737043c8c"],"path":"/v0/siwe/verify","baseUrlOptions":["https://test-api.shodai.network","https://api.shodai.network"],"title":"Verify and link wallet","codeSamples":[{"label":"viem with OAuth bearer","lang":"typescript","source":"import { createSiweMessage } from 'viem/siwe';\n\nconst baseUrl = process.env.SHODAI_API_BASE_URL!.replace(/\\/+$/, '');\nconst apiUrl = new URL(baseUrl);\nconst accessToken = process.env.SHODAI_ACCESS_TOKEN!;\nconst headers = {\n Authorization: `Bearer ${accessToken}`,\n 'Content-Type': 'application/json',\n};\nconst address = walletClient.account.address;\nconst nonceResponse = await fetch(`${baseUrl}/v0/siwe/nonce`, {\n method: 'POST',\n headers,\n body: JSON.stringify({ address }),\n});\nconst { data: challenge } = await nonceResponse.json();\nconst message = createSiweMessage({\n domain: apiUrl.host,\n address,\n statement: 'Prove control of this wallet to Shodai.',\n uri: apiUrl.origin,\n version: '1',\n chainId: 59141,\n nonce: challenge.nonce,\n issuedAt: new Date(challenge.issuedAt),\n});\nconst signature = await walletClient.signMessage({\n account: walletClient.account,\n message,\n});\nconst verification = await fetch(`${baseUrl}/v0/siwe/verify`, {\n method: 'POST',\n headers,\n body: JSON.stringify({\n address,\n message,\n signature,\n domain: apiUrl.host,\n chainId: 59141,\n }),\n});\nconsole.log(await verification.json());\n\n// X-API-Key: YOUR_API_KEY is the alternative to Authorization."}],"requestExampleLanguages":["bash","javascript"],"requiredOnlyExamples":true,"requestExampleType":"codeSamples","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{"body.address":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","body.message":"api.example.com wants you to sign in with your Ethereum account:\n0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266\n\nProve control of this wallet to Shodai.\n\nURI: https://api.example.com\nVersion: 1\nChain ID: 59141\nNonce: 0123456789abcdef0123456789abcdef\nIssued At: 2026-08-07T20:00:00.000Z","body.signature":"0x1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111","body.domain":"api.example.com","body.chainId":59141}],"urlDisplay":"full"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["address","message","signature"],"properties":{"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Wallet address claimed by the EIP-4361 message.","isRequired":true,"uniqueKey":"address","typeLabel":"string"},"message":{"type":"string","description":"Complete EIP-4361 message containing the issued nonce, wallet, domain, URI, chain ID, and issued-at timestamp.","isRequired":true,"uniqueKey":"message","typeLabel":"string"},"signature":{"type":"string","pattern":"^0x[0-9a-fA-F]+$","description":"Hexadecimal signature over the complete EIP-4361 message.","isRequired":true,"uniqueKey":"signature","typeLabel":"string"},"domain":{"type":"string","description":"Optional assertion that must exactly match the domain in the signed message.","uniqueKey":"domain","typeLabel":"string"},"chainId":{"type":"integer","description":"Optional assertion that must match the chain ID in the signed message.","uniqueKey":"chainId","typeLabel":"integer"}},"example":{"address":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","message":"api.example.com wants you to sign in with your Ethereum account:\n0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266\n\nProve control of this wallet to Shodai.\n\nURI: https://api.example.com\nVersion: 1\nChain ID: 59141\nNonce: 0123456789abcdef0123456789abcdef\nIssued At: 2026-08-07T20:00:00.000Z","signature":"0x1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111","domain":"api.example.com","chainId":59141},"uniqueKey":"","typeLabel":"object"},"examples":{"proof":{"title":"proof","summary":"Signed EIP-4361 proof","value":{"address":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","message":"api.example.com wants you to sign in with your Ethereum account:\n0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266\n\nProve control of this wallet to Shodai.\n\nURI: https://api.example.com\nVersion: 1\nChain ID: 59141\nNonce: 0123456789abcdef0123456789abcdef\nIssued At: 2026-08-07T20:00:00.000Z","signature":"0x1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111","domain":"api.example.com","chainId":59141}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"9a6b1bb4-c066-465a-b19b-9c06b99df3d3":{"description":"Verified and linked wallet.","content":{"application/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","required":["wallet","walletBinding","verifiedAt"],"properties":{"wallet":{"type":"string","pattern":"^0x[0-9a-f]{40}$","description":"Verified lowercase wallet address.","isRequired":true,"uniqueKey":"data.wallet","typeLabel":"string"},"walletBinding":{"type":"string","enum":["verified_via_siwe"],"description":"Proof-backed wallet binding method.","isRequired":true,"uniqueKey":"data.walletBinding","typeLabel":"enum\u003cstring>"},"verifiedAt":{"type":"string","format":"date-time","description":"Time the proof was accepted and consumed.","isRequired":true,"uniqueKey":"data.verifiedAt","typeLabel":"string\u003cdate-time>"}},"example":{"wallet":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","walletBinding":"verified_via_siwe","verifiedAt":"2026-08-07T20:01:00.000Z"},"isRequired":true,"uniqueKey":"data","typeLabel":"object"},"meta":{"type":"object","required":["apiVersion","requestId"],"properties":{"apiVersion":{"type":"string","example":"v0","isRequired":true,"uniqueKey":"meta.apiVersion","typeLabel":"string"},"requestId":{"type":"string","description":"Correlation ID for support and debugging.","isRequired":true,"uniqueKey":"meta.requestId","typeLabel":"string"}},"isRequired":true,"uniqueKey":"meta","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"verifiedWallet":{"title":"verifiedWallet","summary":"Verified wallet linked to the authenticated account","value":{"data":{"wallet":"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266","walletBinding":"verified_via_siwe","verifiedAt":"2026-08-07T20:01:00.000Z"},"meta":{"apiVersion":"v0","requestId":"req_123"}}}},"exampleType":"examples"}},"exampleType":"examples"},"8f5be31d-6999-420c-9677-fc5c5d2bd1f9":{"description":"Malformed wallet verification input.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","requestId"],"properties":{"code":{"type":"string","example":"unauthorized","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"Missing API credential","description":"Safe human-readable error summary.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Correlation ID for support and debugging.","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"description":"Optional field errors or upstream-safe context.","uniqueKey":"error.details","typeLabel":"any"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"unauthorized","message":"Missing API credential","requestId":"\u003cstring>","details":"\u003cunknown>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"e17de58b-d124-4d71-9921-8d1032401aa4":{"description":"Missing or invalid API credential, or invalid, expired, replaced, consumed, or mismatched SIWE proof.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","requestId"],"properties":{"code":{"type":"string","example":"unauthorized","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"Missing API credential","description":"Safe human-readable error summary.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Correlation ID for support and debugging.","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"description":"Optional field errors or upstream-safe context.","uniqueKey":"error.details","typeLabel":"any"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"unauthorized","message":"Missing API credential","requestId":"\u003cstring>","details":"\u003cunknown>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"c2dbf763-b26a-450f-8941-61e9ac961503":{"description":"The authenticated Shodai account has paid_required entitlement mode for the requested scope. Per-call x402 settlement is not implemented. Treat this as an entitlement/operator issue.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","requestId"],"properties":{"code":{"type":"string","example":"unauthorized","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"Missing API credential","description":"Safe human-readable error summary.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Correlation ID for support and debugging.","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"description":"Optional field errors or upstream-safe context.","uniqueKey":"error.details","typeLabel":"any"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"unauthorized","message":"Missing API credential","requestId":"\u003cstring>","details":"\u003cunknown>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"57af0c2f-d778-4ec1-9fa1-76a96fa66a10":{"description":"The credential lacks the required OAuth scope, the account lacks entitlement, or the account cannot access the resource.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","requestId"],"properties":{"code":{"type":"string","example":"unauthorized","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"Missing API credential","description":"Safe human-readable error summary.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Correlation ID for support and debugging.","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"description":"Optional field errors or upstream-safe context.","uniqueKey":"error.details","typeLabel":"any"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"unauthorized","message":"Missing API credential","requestId":"\u003cstring>","details":"\u003cunknown>"}}}},"exampleType":"generated"}},"exampleType":"generated"},"720995ed-7488-49a6-9f89-ca5b668c329c":{"description":"The wallet belongs to another Shodai account.","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","requestId"],"properties":{"code":{"type":"string","example":"unauthorized","description":"Stable machine-readable error code.","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","example":"Missing API credential","description":"Safe human-readable error summary.","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"requestId":{"type":"string","description":"Correlation ID for support and debugging.","isRequired":true,"uniqueKey":"error.requestId","typeLabel":"string"},"details":{"description":"Optional field errors or upstream-safe context.","uniqueKey":"error.details","typeLabel":"any"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"unauthorized","message":"Missing API credential","requestId":"\u003cstring>","details":"\u003cunknown>"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"a3b3b0ef-e2d4-4e54-b7fd-12f692320f39":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Canonical API-key credential. Send X-API-Key: cns_pk_..., or Authorization: Bearer cns_pk_... only as an API-key compatibility alias.","x-default":"YOUR_API_KEY","scopes":[]}},"10254d9e-2373-48f9-8178-fa500b813a1c":{"OAuthBearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth access token issued by Shodai.","x-default":"Bearer YOUR_OAUTH_ACCESS_TOKEN","scopes":[]}}},"servers":{"6080c7b0-65de-4254-9208-0f6a9134e838":{"url":"https://test-api.shodai.network","description":"Public base URL for the Agreements API testnet environment."},"61ebdc51-3903-424f-b54d-3e2737043c8c":{"url":"https://api.shodai.network","description":"Public base URL for the Agreements API production environment."}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Canonical API-key credential. Send X-API-Key: cns_pk_..., or Authorization: Bearer cns_pk_... only as an API-key compatibility alias.","x-default":"YOUR_API_KEY","scopes":[]},"schema":{"title":"X-API-Key","type":"string","description":"Canonical API-key credential. Send X-API-Key: cns_pk_..., or Authorization: Bearer cns_pk_... only as an API-key compatibility alias.","isRequired":true,"default":"YOUR_API_KEY","typeLabel":"string","deprecated":false},"schemeName":"ApiKeyAuth","name":"X-API-Key"}],"title":"ApiKeyAuth"},{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth access token issued by Shodai.","x-default":"Bearer YOUR_OAUTH_ACCESS_TOKEN","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"OAuth access token issued by Shodai.","format":"bearer","default":"Bearer YOUR_OAUTH_ACCESS_TOKEN","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"OAuthBearerAuth","name":"Authorization"}],"title":"OAuthBearerAuth"}]},"originalFileLocation":"openapi.json"},"subdomain":"cnslabs","siteName":"Shodai Developer Documentation","title":"Verify and link wallet - Shodai Developer Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-22T12:39:58.650Z","originalFileLocation":"reference/api/wallet-access/verify-and-link-wallet.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;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=\"system\"}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=\"Verifies a signed EIP-4361 message and links the wallet to the authenticated Shodai account. OAuth bearer tokens require agreements.write; API keys require the equivalent account entitlement. Verification proves control only: it does not transfer custody or authorize Shodai to sign agreement inputs.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Shodai Developer Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cnslabs/5TFa4BGy9ODpG9tH/_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/cnslabs/5TFa4BGy9ODpG9tH/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cnslabs/5TFa4BGy9ODpG9tH/_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/cnslabs/5TFa4BGy9ODpG9tH/_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/cnslabs/5TFa4BGy9ODpG9tH/_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/cnslabs/5TFa4BGy9ODpG9tH/_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/cnslabs/5TFa4BGy9ODpG9tH/_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/cnslabs/5TFa4BGy9ODpG9tH/_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/cnslabs/5TFa4BGy9ODpG9tH/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Verify and link wallet - Shodai Developer Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Verifies a signed EIP-4361 message and links the wallet to the authenticated Shodai account. OAuth bearer tokens require agreements.write; API keys require the equivalent account entitlement. Verification proves control only: it does not transfer custody or authorize Shodai to sign agreement inputs.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Shodai Developer Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.shodai.network/reference/api/wallet-access/verify-and-link-wallet\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://docs.shodai.network/images/shodai-og.png\">\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=\"Verify and link wallet - Shodai Developer Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Verifies a signed EIP-4361 message and links the wallet to the authenticated Shodai account. OAuth bearer tokens require agreements.write; API keys require the equivalent account entitlement. Verification proves control only: it does not transfer custody or authorize Shodai to sign agreement inputs.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://docs.shodai.network/images/shodai-og.png\">\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/cnslabs/5TFa4BGy9ODpG9tH/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Shodai Developer Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#73766C\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.shodai.network/reference/api/wallet-access/verify-and-link-wallet\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/reference/api/wallet-access/verify-and-link-wallet.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.shodai.network/#organization\",\"name\":\"Shodai Developer Documentation\",\"url\":\"https://docs.shodai.network\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cnslabs/QoBo9wst-a7Wya5g/images/shodai-logo-light.svg?fit=max\u0026auto=format\u0026n=QoBo9wst-a7Wya5g\u0026q=85\u0026s=3bb56ed1b8eacd010dd50bd09c6da976\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.shodai.network#website\",\"name\":\"Shodai Developer Documentation\",\"url\":\"https://docs.shodai.network\",\"publisher\":{\"@id\":\"https://docs.shodai.network/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.shodai.network/reference/api/wallet-access/verify-and-link-wallet#webpage\",\"url\":\"https://docs.shodai.network/reference/api/wallet-access/verify-and-link-wallet\",\"name\":\"Verify and link wallet\",\"description\":\"Verifies a signed EIP-4361 message and links the wallet to the authenticated Shodai account. OAuth bearer tokens require agreements.write; API keys require the equivalent account entitlement. Verification proves control only: it does not transfer custody or authorize Shodai to sign agreement inputs.\",\"dateModified\":\"2026-08-22T12:39:58.650Z\",\"isPartOf\":{\"@id\":\"https://docs.shodai.network#website\"},\"breadcrumb\":{\"@id\":\"https://docs.shodai.network/reference/api/wallet-access/verify-and-link-wallet#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.shodai.network/reference/api/wallet-access/verify-and-link-wallet#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Reference\",\"item\":\"https://docs.shodai.network/sdks/typescript-client\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API Reference\",\"item\":\"https://docs.shodai.network/reference/api/system/get-the-openapi-document-for-the-agreements-api\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Wallet Access\",\"item\":\"https://docs.shodai.network/reference/api/wallet-access/create-wallet-verification-challenge\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Verify and link wallet\",\"item\":\"https://docs.shodai.network/reference/api/wallet-access/verify-and-link-wallet\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.shodai.network/reference/api/wallet-access/verify-and-link-wallet#apireference\",\"headline\":\"Verify and link wallet\",\"name\":\"Verify and link wallet\",\"description\":\"Verifies a signed EIP-4361 message and links the wallet to the authenticated Shodai account. OAuth bearer tokens require agreements.write; API keys require the equivalent account entitlement. Verification proves control only: it does not transfer custody or authorize Shodai to sign agreement inputs.\",\"url\":\"https://docs.shodai.network/reference/api/wallet-access/verify-and-link-wallet\",\"mainEntityOfPage\":{\"@id\":\"https://docs.shodai.network/reference/api/wallet-access/verify-and-link-wallet#webpage\"},\"image\":\"https://docs.shodai.network/images/shodai-og.png\",\"dateModified\":\"2026-08-22T12:39:58.650Z\",\"publisher\":{\"@id\":\"https://docs.shodai.network/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.shodai.network#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Shodai Developer Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Shodai Developer Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/reference/api/wallet-access/verify-and-link-wallet.md","siteName":"Shodai Developer Documentation","nav":{"global":null,"groups":[{"group":"Start","pages":[{"title":"Overview","href":"/index"},{"title":"Choose an integration surface","href":"/integration-surfaces"},{"title":"Quickstart with TypeScript SDK","href":"/sdks/quickstart-with-typescript-sdk"},{"title":"Quickstart with MCP","href":"/sdks/quickstart-with-mcp"},{"title":"Run an end-to-end agreement workflow","href":"/examples/end-to-end-workflow"},{"title":"Authentication","href":"/authentication"}]},{"group":"Workflow","pages":[{"title":"Author Agreement JSON","href":"/workflow/author-agreement-json"},{"title":"Validate Agreement Structure","href":"/workflow/validate-agreement-structure"},{"title":"Link Wallets and Access Agreements","href":"/workflow/link-a-wallet-and-access-agreements"},{"title":"Deploy an Agreement","href":"/workflow/deploy-an-agreement"},{"title":"Operate a Deployed Agreement","href":"/workflow/operate-a-deployed-agreement"}]},{"group":"Webhooks","pages":[{"title":"Receive webhooks","href":"/webhooks/receive-webhooks"},{"title":"Agreement activity webhooks","href":"/webhooks/agreement-activity-webhooks"},{"title":"Notification webhooks","href":"/webhooks/notification-webhooks"}]},{"group":"Architecture","pages":[{"title":"Architecture overview","mode":"wide","href":"/system-architecture/overview"},{"title":"Agreement data standard","href":"/system-architecture/data-standard"},{"title":"Onchain execution engine","href":"/system-architecture/on-chain"},{"title":"Agreements API","href":"/system-architecture/putting-it-together"},{"title":"Repositories","href":"/system-architecture/repositories"},{"title":"Contracts","href":"/system-architecture/contracts"}]},{"group":"Examples","pages":[{"title":"Simple Agreement","mode":"wide","href":"/examples/simple"},{"title":"Complex Agreement","mode":"wide","href":"/examples/complex"},{"title":"Shodai Reference App","mode":"wide","href":"/examples/reference-app"}]},{"group":"Reference","pages":[{"title":"TypeScript client reference","href":"/sdks/typescript-client"},{"title":"Connect an installed TypeScript client with delegated OAuth","href":"/sdks/delegated-oauth-with-typescript"},{"group":"API Reference","pages":[{"group":"System","pages":[{"title":"Get the OpenAPI document for the Agreements API","deprecated":null,"version":null,"sidebarTitle":"Get OpenAPI document","openapi":"/openapi.json get /v0/openapi.json","href":"/reference/api/system/get-the-openapi-document-for-the-agreements-api"},{"title":"Health check","deprecated":null,"version":null,"sidebarTitle":"Health check","openapi":"/openapi.json get /v0/health","href":"/reference/api/system/health-check"}]},{"group":"Wallet Access","pages":[{"title":"Create wallet verification challenge","description":"Creates an account-bound EIP-4361 nonce for a wallet address. OAuth bearer tokens require agreements.write; API keys require the equivalent account entitlement. The challenge expires after five minutes, and requesting another nonce invalidates the prior nonce for the same authenticated account and address.","deprecated":null,"version":null,"sidebarTitle":"Create wallet challenge","openapi":"/openapi.json post /v0/siwe/nonce","href":"/reference/api/wallet-access/create-wallet-verification-challenge"},{"title":"Verify and link wallet","deprecated":null,"version":null,"sidebarTitle":"Verify and link wallet","openapi":"/openapi.json post /v0/siwe/verify","href":"/reference/api/wallet-access/verify-and-link-wallet"}]},{"group":"Webhooks","pages":[{"title":"List webhooks","description":"Lists webhook subscriptions for the authenticated Shodai account. Signing secrets are not returned after creation.","deprecated":null,"version":null,"sidebarTitle":"List webhooks","openapi":"/openapi.json get /v0/webhooks","href":"/reference/api/webhooks/list-webhooks"},{"title":"Create webhook","deprecated":null,"version":null,"sidebarTitle":"Create webhook","openapi":"/openapi.json post /v0/webhooks","href":"/reference/api/webhooks/create-webhook"},{"title":"Get webhook","deprecated":null,"version":null,"sidebarTitle":"Get webhook","openapi":"/openapi.json get /v0/webhooks/{id}","href":"/reference/api/webhooks/get-webhook"},{"title":"Disable webhook","deprecated":null,"version":null,"sidebarTitle":"Disable webhook","openapi":"/openapi.json delete /v0/webhooks/{id}","href":"/reference/api/webhooks/disable-webhook"},{"title":"Update webhook","deprecated":null,"version":null,"sidebarTitle":"Update webhook","openapi":"/openapi.json patch /v0/webhooks/{id}","href":"/reference/api/webhooks/update-webhook"},{"title":"Send test webhook","deprecated":null,"version":null,"sidebarTitle":"Test webhook","openapi":"/openapi.json post /v0/webhooks/{id}/test","href":"/reference/api/webhooks/send-test-webhook"}]},{"group":"Agreement Records","pages":[{"title":"List agreements","deprecated":null,"version":null,"sidebarTitle":"List agreements","openapi":"/openapi.json get /v0/agreements","href":"/reference/api/agreement-records/list-agreements"},{"title":"Get agreement","deprecated":null,"version":null,"sidebarTitle":"Get agreement","openapi":"/openapi.json get /v0/agreements/{id}","href":"/reference/api/agreement-records/get-agreement"}]},{"group":"Deployment","pages":[{"title":"Preflight deployment request","deprecated":null,"version":null,"sidebarTitle":"Preflight deployment","openapi":"/openapi.json post /v0/agreements/validate","href":"/reference/api/deployment/preflight-deployment-request"},{"title":"Deploy agreement","deprecated":null,"version":null,"sidebarTitle":"Deploy with permit","openapi":"/openapi.json post /v0/agreements/deploy-with-permit","href":"/reference/api/deployment/deploy-agreement"}]},{"group":"Authoring","pages":[{"title":"Validate agreement structure","deprecated":null,"version":null,"sidebarTitle":"Validate agreement structure","openapi":"/openapi.json post /v0/agreements/validate-template","href":"/reference/api/authoring/validate-agreement-structure"}]},{"group":"Agreement Documents","pages":[{"title":"Get agreement document","deprecated":null,"version":null,"openapi":"/openapi.json get /v0/agreements/documents/{documentId}","href":"/reference/api/agreement-documents/get-agreement-document"}]},{"group":"Using Agreements","pages":[{"title":"Get agreement state","deprecated":null,"version":null,"sidebarTitle":"Get agreement state","openapi":"/openapi.json get /v0/agreements/{id}/state","href":"/reference/api/using-agreements/get-agreement-state"},{"title":"Get input history","deprecated":null,"version":null,"sidebarTitle":"Get input history","openapi":"/openapi.json get /v0/agreements/{id}/inputs","href":"/reference/api/using-agreements/get-input-history"},{"title":"Submit input with permit","deprecated":null,"version":null,"sidebarTitle":"Submit input with permit","openapi":"/openapi.json post /v0/agreements/{id}/input","href":"/reference/api/using-agreements/submit-input-with-permit"}]}]},{"title":"EIP-712 Signing Reference","href":"/reference/eip-712-signing"},{"title":"Errors and troubleshooting","href":"/reference/errors-and-troubleshooting"},{"group":"Migration guides","pages":[{"title":"May 2026 API/SDK Response Migration","href":"/reference/migrations/may-2026-api-sdk-response-migration"},{"title":"May 2026 Multi-Chain Migration","href":"/reference/migrations/may-2026-multi-chain-migration"}]}]}]},"basePath":"","title":"Verify and link wallet - Shodai Developer Documentation","deploymentId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","buildId":"dpl_DyXGnKeCjZyA3sUdfMJ7FjkdBefg","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CiUHMMOm.js","snippetPresets-BgfXU7Bw.js","utils-DWvOwgy_.js","style-to-object-BY3JEAdk.js","utils-BN7RXSMJ.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CFw8bq89.js","conditional-requirements-CFM0id0Q.js","cloneDeep-CAwdfOU2.js","_Uint8Array-BJr8e-ZL.js","isObject-FP1Yky1u.js","ApiExamples-XX0UgMZK.js","usePlaygroundInputsStore-DXDFSa1V.js","shallow-CdX5aREi.js","isEqual-CoOaxexF.js","CodeSnippets-Cg2wpzWm.js","CodeSnippet-D_HwgQO_.js","getApiPlaygroundDisplay-CmCoerhe.js","Page-CVJ-f_k1.js","DynamicMarkdown-CQM9Bhbv.js","SectionHeading-DpbrP8nQ.js","icon-BPCgijHy.js","MethodPill-GQ8DuY0c.js","getPastedJson-Cb5mT31m.js","Check2Icon-a7bUI6e8.js","axios-CsQoIw0U.js","Markdown-CX2QY19L.js","AssistantPageLink-CY3bFglh.js","dist-Dl6_zDnT.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}