The Believe Flywheel API transforms your project’s tokenomics into a self-reinforcing cycle where user actions automatically trigger tokens operations, creating sustainable engagement and value.
Provide your wallet address (for signing transactions)
Set daily limits (burn/airdrop amounts)
Choose API scopes (burn, airdrop, etc.)
Define proof types for your use cases
Save configuration and receive your API key
Note your vault address for funding
// After web app registration, you'll have:const flywheelApiKey = "your_generated_api_key";const vaultAddress = "your_vault_address_from_web_app";// Use these for all subsequent API calls
Technical questions: Review the detailed endpoint documentation
Business strategy: Explore the use cases for inspiration
Troubleshooting: Check the error codes reference
Community: Connect with other projects using Flywheel
Your flywheel journey starts with a single registration - but grows into a powerful, community-supported tokenomic engine! 🚀
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Believe API","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"favicon":"/favicon.png","logo":{"light":"https://mintcdn.com/believe/kJ8FhCPHcVm_vcZv/logo/light.svg?fit=max\u0026auto=format\u0026n=kJ8FhCPHcVm_vcZv\u0026q=85\u0026s=bc04dddfeacbb5b595539e637a47fafd","dark":"https://mintcdn.com/believe/kJ8FhCPHcVm_vcZv/logo/dark.svg?fit=max\u0026auto=format\u0026n=kJ8FhCPHcVm_vcZv\u0026q=85\u0026s=9e2058a0aee2f1c6e849c6a649d2a5c8"},"footer":{"socials":{"x":"https://x.com/believeapp"}},"navigation":{"global":{"anchors":[{"anchor":"Website","href":"https://believe.app","icon":"book-open-cover"},{"anchor":"iOS App","href":"https://apps.apple.com/us/app/believe/id6737437664","icon":"apple"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"believe","hasAudioNarration":false,"actualSubdomain":"believe","customDomains":["docs.believe.app"],"gitSource":{"type":"github","owner":"b24-eng","repo":"believe-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21e6f3bd0a90f91cb455e8","collectionId":"4c4ff7b0-30b9-4b25-a4b8-8bd717d22db3","schemaVersion":"v2"},"entitlements":{},"buildId":"6a21e6f3bd0a90f91cb455e8:success","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"API Reference","count":13},{"language":"default","tag":"API Documentation","count":6},{"language":"default","tag":"Flywheel V1","count":4},{"language":"default","tag":"Tokenomics (Deprecated)","count":3}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"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":"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":"byok-sep-25","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":"billing-updated-9-15","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}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/getting-started","slug":"/api-reference/getting-started","pageMetadata":{"title":"Getting Started","description":"Complete guide to setting up and using the Believe API","href":"/api-reference/getting-started"},"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: \"Complete guide to setting up and using the Believe API\"\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`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`welcome-to-flywheel`,children:`Welcome to Flywheel`}),`\n`,_jsx(_components.p,{children:`The Believe Flywheel API transforms your project’s tokenomics into a self-reinforcing cycle where user actions automatically trigger tokens operations, creating sustainable engagement and value.`}),`\n`,_jsx(Heading,{level:`2`,id:`how-flywheel-works`,children:`How Flywheel Works`}),`\n`,_jsx(Heading,{level:`3`,id:`the-concept`,children:`The Concept`}),`\n`,_jsx(_components.p,{children:`Think of a flywheel as a perpetual motion machine for your token economy:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`User performs action`}),` (buys product, views ad, engages with content)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Your app calls Flywheel API`}),` with proof of the action`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Tokens are automatically burned/airdropped`}),` based on your configuration`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Token utility increases`}),`, encouraging more user actions`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Cycle continues`}),`, creating sustained engagement`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`security-\u0026-transparency`,children:`Security \u0026 Transparency`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Multi-signature protection`}),`: Requires approval from both you and Believe`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Public vault address`}),`: Anyone can view and verify all transactions`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Proof-based actions`}),`: Every token operation includes verifiable proof data`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Daily limits`}),`: Configurable caps prevent excessive token movements`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`funding-your-flywheel`,children:`Funding Your Flywheel`}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Important`}),`: After registering your flywheel, you must fund the vault address with SOL and your project tokens before any actions can be executed.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`initial-funding-required`,children:`Initial Funding (Required)`}),`\n`,_jsx(_components.p,{children:`As the project owner, you’re responsible for:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`SOL for transaction fees`}),`: Send SOL to cover Solana network fees`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Project tokens`}),`: Deposit tokens that will power your flywheel actions`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Minimum balances`}),`: Ensure sufficient funds for your planned operations`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`community-funding-optional`,children:`Community Funding (Optional)`}),`\n`,_jsxs(_components.p,{children:[`The flywheel wallet address is `,_jsx(_components.strong,{children:`public and transparent`}),`, enabling:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Community contributions`}),`: Anyone can send tokens to support your flywheel`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Transparent operations`}),`: All transactions are visible on Solana explorers`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Plug-and-play experience`}),`: Community members can “plug” tokens into your flywheel`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Shared incentives`}),`: More funding enables more rewards and engagement`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`example-funding-strategy`,children:`Example Funding Strategy`}),`\n`,_jsx(CodeBlock,{numberOfLines:`10`,language:`text`,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:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Initial Setup:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`├── 10 SOL (transaction fees)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`├── 1,000,000 PROJECT_TOKENS (for burns/airdrops)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`└── Daily limits: 10,000 tokens max`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Community Growth:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`├── Supporters add more PROJECT_TOKENS`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`├── Increased capacity for rewards`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`└── Sustainable long-term operations`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`api-endpoint-flow`,children:`API Endpoint Flow`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Base URL`}),`: `,_jsx(_components.code,{children:`https://public.believe.app/v1/`})]}),`\n`,_jsx(_components.p,{children:`The Flywheel API follows a specific sequence that ensures security and proper setup:`}),`\n`,_jsx(Heading,{level:`3`,id:`1-register-flywheel-one-time-setup`,children:`1. Register Flywheel (One-time Setup)`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Platform`}),`: `,_jsx(_components.a,{href:`https://believe.app/projects`,children:`Believe Web App`})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`When to use`}),`: Only once per project (web app only)`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Sets up your flywheel configuration`}),`\n`,_jsx(_components.li,{children:`Creates multisig wallet and vault address`}),`\n`,_jsx(_components.li,{children:`Generates API key with scopes`}),`\n`,_jsx(_components.li,{children:`Defines proof types for your project`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`After registration`}),`: Fund the vault address with SOL + tokens`]}),`\n`,_jsx(Heading,{level:`3`,id:`2-initialize-batch`,children:`2. Initialize Batch`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Endpoint`}),`: `,_jsx(_components.code,{children:`POST https://public.believe.app/v1/flywheel/batch/init`})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`When to use`}),`: Every time you want to execute flywheel actions`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Compile your pipelines into a batch transaction`}),`\n`,_jsx(_components.li,{children:`Get approval transaction to sign`}),`\n`,_jsx(_components.li,{children:`Validate all actions and proof data`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`3-execute-batch`,children:`3. Execute Batch`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Endpoint`}),`: `,_jsx(_components.code,{children:`POST https://public.believe.app/v1/flywheel/batch/execute`})]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`When to use`}),`: After signing the approval transaction`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Process the approved batch`}),`\n`,_jsx(_components.li,{children:`Execute all pipeline actions`}),`\n`,_jsx(_components.li,{children:`Receive detailed execution results`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`optional-monitor-status`,children:`Optional: Monitor Status`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Endpoints`}),`:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`GET https://public.believe.app/v1/flywheel/batch/{batchId}`}),` - Check specific batch`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`GET https://public.believe.app/v1/flywheel/batch/current`}),` - Check current batch for tokens`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`complete-example-walkthrough`,children:`Complete Example Walkthrough`}),`\n`,_jsx(_components.p,{children:`Let’s walk through setting up a flywheel for an e-commerce store:`}),`\n`,_jsx(Heading,{level:`3`,id:`step-1-register-your-flywheel`,children:`Step 1: Register Your Flywheel`}),`\n`,_jsxs(_components.p,{children:[`Registration is now done exclusively through the `,_jsx(_components.a,{href:`https://believe.app/projects`,children:`Believe web app`}),`:`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Navigate to`}),`: `,_jsx(_components.a,{href:`https://believe.app/projects`,children:`https://believe.app/projects`})]}),`\n`,_jsx(_components.li,{children:_jsx(_components.strong,{children:`Create or select your project`})}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Configure your flywheel`}),`:`,`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Select your token`}),`\n`,_jsx(_components.li,{children:`Provide your wallet address (for signing transactions)`}),`\n`,_jsx(_components.li,{children:`Set daily limits (burn/airdrop amounts)`}),`\n`,_jsx(_components.li,{children:`Choose API scopes (burn, airdrop, etc.)`}),`\n`,_jsx(_components.li,{children:`Define proof types for your use cases`}),`\n`]}),`\n`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Save configuration`}),` and receive your API key`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Note your vault address`}),` for funding`]}),`\n`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`javascript`,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:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// After web app registration, you'll have:`})}),`\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:` flywheelApiKey`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"your_generated_api_key\"`}),_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:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` vaultAddress`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"your_vault_address_from_web_app\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Use these for all subsequent API calls`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`step-2-fund-your-vault`,children:`Step 2: Fund Your Vault`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`javascript`,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:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Send SOL for transaction fees`})}),`\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:` sendSol`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`vaultAddress`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 10 SOL`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Send your project tokens`})}),`\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:` sendTokens`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`vaultAddress`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1000000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 1M tokens`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`step-3-create-and-execute-batches`,children:`Step 3: Create and Execute Batches`}),`\n`,_jsx(_components.p,{children:`When a customer makes a purchase:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`48`,language:`javascript`,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:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`48`,children:[_jsxs(_components.span,{className:`line`,children:[_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:` handlePurchase`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`customerId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`productId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`amount`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // 1. Initialize batch with burn + airdrop actions`})}),`\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:` batchInit`}),_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:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://public.believe.app/v1/flywheel/batch/init\"`}),_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:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_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:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-believe-api-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"your_flywheel_api_key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_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.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_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:` pipelines:`}),_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.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"PRODUCT_PURCHASE\"`}),_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:` payload:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_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:` customerId`}),_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:` productId`}),_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:` amount`}),_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:` timestamp:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`toISOString`}),_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.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` actions:`}),_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\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`action:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"BURN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`amount:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 100`}),_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\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`action:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"AIRDROP\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`toAddress:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` customerId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`amount:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 50`}),_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.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.span,{className:`line`,children:_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:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`proposalApproveTx`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`batch`}),_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:` batchInit`}),_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`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // 2. Sign the approval transaction with your registered wallet`})}),`\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:` signedTx`}),_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:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` signTransaction`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`proposalApproveTx`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // 3. Execute the batch`})}),`\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:` execution`}),_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:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://public.believe.app/v1/flywheel/batch/execute\"`}),_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:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_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:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-believe-api-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"your_flywheel_api_key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_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.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_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:` batchId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` batch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`id`}),_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:` signedTx:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` signedTx`}),_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.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:` result`}),_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:` execution`}),_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:` console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Flywheel executed:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_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`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`best-practices`,children:`Best Practices`}),`\n`,_jsx(Heading,{level:`3`,id:`funding-management`,children:`Funding Management`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Monitor balances`}),`: Check vault SOL and token levels regularly`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Set up alerts`}),`: Get notified when balances are low`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Community engagement`}),`: Share vault address for community support`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Emergency reserves`}),`: Keep extra funds for high-activity periods`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`batch-operations`,children:`Batch Operations`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Group related actions`}),`: Combine multiple user actions into single batches`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Monitor daily limits`}),`: Stay within your configured limits`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Handle failures gracefully`}),`: Check execution results and retry if needed`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use proof data effectively`}),`: Include rich context for auditability`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`security`,children:`Security`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Keep wallet private`}),`: Never share your signing wallet private key`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Verify transactions`}),`: Always review approval transactions before signing`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Monitor vault activity`}),`: Watch for unexpected transactions`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Use appropriate scopes`}),`: Only request API key scopes you need`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next Steps`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`https://believe.app/projects`,children:_jsx(_components.strong,{children:`Register your flywheel`})}),` via the web app`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Fund your vault`}),` with SOL and project tokens`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api-reference/use-cases`,children:_jsx(_components.strong,{children:`Review Use Cases`})}),` for specific implementation patterns`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api-reference/error-codes`,children:_jsx(_components.strong,{children:`Check Error Codes`})}),` for troubleshooting`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Join the community`}),` to share experiences and get support`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`need-help`,children:`Need Help?`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Technical questions`}),`: Review the detailed endpoint documentation`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Business strategy`}),`: Explore the use cases for inspiration`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Troubleshooting`}),`: Check the error codes reference`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Community`}),`: Connect with other projects using Flywheel`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Your flywheel journey starts with a single registration - but grows into a powerful, community-supported tokenomic engine! 🚀`})]})}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":"Getting Started","description":"Complete guide to setting up and using the Believe API","href":"/api-reference/getting-started"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Welcome to Flywheel","slug":"welcome-to-flywheel","depth":2,"children":[]},{"title":"How Flywheel Works","slug":"how-flywheel-works","depth":2,"children":[{"title":"The Concept","slug":"the-concept","depth":3,"children":[]},{"title":"Security \u0026 Transparency","slug":"security-\u0026-transparency","depth":3,"children":[]}]},{"title":"Funding Your Flywheel","slug":"funding-your-flywheel","depth":2,"children":[{"title":"Initial Funding (Required)","slug":"initial-funding-required","depth":3,"children":[]},{"title":"Community Funding (Optional)","slug":"community-funding-optional","depth":3,"children":[]},{"title":"Example Funding Strategy","slug":"example-funding-strategy","depth":3,"children":[]}]},{"title":"API Endpoint Flow","slug":"api-endpoint-flow","depth":2,"children":[{"title":"1. Register Flywheel (One-time Setup)","slug":"1-register-flywheel-one-time-setup","depth":3,"children":[]},{"title":"2. Initialize Batch","slug":"2-initialize-batch","depth":3,"children":[]},{"title":"3. Execute Batch","slug":"3-execute-batch","depth":3,"children":[]},{"title":"Optional: Monitor Status","slug":"optional-monitor-status","depth":3,"children":[]}]},{"title":"Complete Example Walkthrough","slug":"complete-example-walkthrough","depth":2,"children":[{"title":"Step 1: Register Your Flywheel","slug":"step-1-register-your-flywheel","depth":3,"children":[]},{"title":"Step 2: Fund Your Vault","slug":"step-2-fund-your-vault","depth":3,"children":[]},{"title":"Step 3: Create and Execute Batches","slug":"step-3-create-and-execute-batches","depth":3,"children":[]}]},{"title":"Best Practices","slug":"best-practices","depth":2,"children":[{"title":"Funding Management","slug":"funding-management","depth":3,"children":[]},{"title":"Batch Operations","slug":"batch-operations","depth":3,"children":[]},{"title":"Security","slug":"security","depth":3,"children":[]}]},{"title":"Next Steps","slug":"next-steps","depth":2,"children":[]},{"title":"Need Help?","slug":"need-help","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"believe","siteName":"Believe API","title":"Getting Started - Believe API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T08:43:00.406Z","originalFileLocation":"api-reference/getting-started.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=\"Complete guide to setting up and using the Believe API\">\u003cmeta data-mint-head name=\"application-name\" content=\"Believe API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/believe/Sb7_B-Hs0itRNxzK/_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/believe/Sb7_B-Hs0itRNxzK/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/believe/Sb7_B-Hs0itRNxzK/_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/believe/Sb7_B-Hs0itRNxzK/_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/believe/Sb7_B-Hs0itRNxzK/_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/believe/Sb7_B-Hs0itRNxzK/_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/believe/Sb7_B-Hs0itRNxzK/_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/believe/Sb7_B-Hs0itRNxzK/_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/believe/Sb7_B-Hs0itRNxzK/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Getting Started - Believe API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Complete guide to setting up and using the Believe API\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Believe API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.believe.app/api-reference/getting-started\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://believe.mintlify.app/_mintlify/api/og/v2?division=API+Documentation\u0026amp;title=Getting+Started\u0026amp;description=Complete+guide+to+setting+up+and+using+the+Believe+API\u0026amp;theme=d26715c49fcb7e1be5f7a635\u0026amp;signature=73fbb0cd63823b612c861a93da3c6218333d017f1b52b3a73c7f3a77e440cc18\">\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=\"Getting Started - Believe API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Complete guide to setting up and using the Believe API\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://believe.mintlify.app/_mintlify/api/og/v2?division=API+Documentation\u0026amp;title=Getting+Started\u0026amp;description=Complete+guide+to+setting+up+and+using+the+Believe+API\u0026amp;theme=d26715c49fcb7e1be5f7a635\u0026amp;signature=73fbb0cd63823b612c861a93da3c6218333d017f1b52b3a73c7f3a77e440cc18\">\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/believe/Sb7_B-Hs0itRNxzK/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Believe API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.believe.app/api-reference/getting-started\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/getting-started.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.believe.app/#organization\",\"name\":\"Believe API\",\"url\":\"https://docs.believe.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/believe/kJ8FhCPHcVm_vcZv/logo/light.svg?fit=max\u0026auto=format\u0026n=kJ8FhCPHcVm_vcZv\u0026q=85\u0026s=bc04dddfeacbb5b595539e637a47fafd\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.believe.app#website\",\"name\":\"Believe API\",\"url\":\"https://docs.believe.app\",\"publisher\":{\"@id\":\"https://docs.believe.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.believe.app/api-reference/getting-started#webpage\",\"url\":\"https://docs.believe.app/api-reference/getting-started\",\"name\":\"Getting Started\",\"description\":\"Complete guide to setting up and using the Believe API\",\"dateModified\":\"2026-01-07T08:43:00.406Z\",\"isPartOf\":{\"@id\":\"https://docs.believe.app#website\"},\"breadcrumb\":{\"@id\":\"https://docs.believe.app/api-reference/getting-started#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.believe.app/api-reference/getting-started#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Documentation\",\"item\":\"https://docs.believe.app/api-reference/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Getting Started\",\"item\":\"https://docs.believe.app/api-reference/getting-started\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.believe.app/api-reference/getting-started#article\",\"headline\":\"Getting Started\",\"name\":\"Getting Started\",\"description\":\"Complete guide to setting up and using the Believe API\",\"url\":\"https://docs.believe.app/api-reference/getting-started\",\"mainEntityOfPage\":{\"@id\":\"https://docs.believe.app/api-reference/getting-started#webpage\"},\"dateModified\":\"2026-01-07T08:43:00.406Z\",\"publisher\":{\"@id\":\"https://docs.believe.app/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.believe.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Believe API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Believe API","nav":{"global":{"anchors":[{"anchor":"Website","href":"https://believe.app","icon":"book-open-cover"},{"anchor":"iOS App","href":"https://apps.apple.com/us/app/believe/id6737437664","icon":"apple"}]},"tabs":[{"tab":"API Reference","groups":[{"group":"API Documentation","pages":[{"title":"Introduction","description":"API Documentation for Believe API v2","href":"/api-reference/introduction"},{"title":"Getting Started","href":"/api-reference/getting-started"},{"title":"Use Cases \u0026 Examples","description":"Real-world business scenarios and complete flywheel implementations","href":"/api-reference/use-cases"},{"title":"Glossary","href":"/api-reference/glossary"},{"title":"Proof Schema Definition","href":"/api-reference/proof-schema"},{"title":"Error Codes","href":"/api-reference/error-codes"}]},{"group":"Flywheel V1","pages":[{"title":"Initialize Batch Transaction","openapi":"POST /v1/flywheel/batch/init","href":"/api-reference/endpoint/flywheel/batch-init"},{"title":"Execute Batch Transaction","openapi":"POST /v1/flywheel/batch/execute","href":"/api-reference/endpoint/flywheel/batch-execute"},{"title":"Get Batch Status","openapi":"GET /v1/flywheel/batch/{batchId}","href":"/api-reference/endpoint/flywheel/batch-status"},{"title":"Get Current Batch","openapi":"GET /v1/flywheel/batch/current","href":"/api-reference/endpoint/flywheel/batch-current"}]},{"group":"Tokenomics (Deprecated)","pages":[{"title":"Burn Tokens (Deprecated)","openapi":"POST /v1/tokenomics/burn","href":"/api-reference/endpoint/tokenomics/burn"},{"title":"Burn Batch Tokens (Deprecated)","openapi":"POST /v1/tokenomics/burn-batch","href":"/api-reference/endpoint/tokenomics/burn-batch"},{"title":"Get Market Summary (Deprecated)","openapi":"GET /v1/tokenomics/market-summary/{address}","href":"/api-reference/endpoint/tokenomics/market-summary"}]}]}]},"basePath":"","title":"Getting Started - Believe API","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":[],"chunks":[]}