### setup Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Sets up the smart account on a specified chain by installing any necessary modules. ```APIDOC ## setup ### Description Sets up the account on a given chain by installing missing modules. ### Method `setup(chain: Chain): Promise` ### Parameters #### Path Parameters - **chain** (Chain) - Required - Chain to set up the account on ### Returns `Promise` - True if setup succeeded. ``` -------------------------------- ### Complete Server and Frontend Example Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/jwt-server.md A comprehensive example showing both the backend server setup with `createExpressRouter` and JWT configuration, and the frontend SDK initialization for making sponsored transactions. ```typescript import express from 'express' import { createExpressRouter } from '@rhinestone/sdk/jwt-server' import { RhinestoneSDK } from '@rhinestone/sdk' // Backend with signing key const app = express() app.use(express.json()) const jwtRouter = createExpressRouter({ jwt: { privateKey: JSON.parse(process.env.PRIVATE_KEY_JWK), integratorId: process.env.INTEGRATOR_ID, projectId: process.env.PROJECT_ID, appId: process.env.APP_ID, keyId: process.env.KEY_ID, }, shouldSponsor: { chain: ({ id }) => [1, 8453, 10].includes(id), account: async (address) => { const user = await db.getUserBalance(address) return user.credits > 0 }, }, }) app.use('/api/auth', jwtRouter) app.listen(3000) // Frontend with SDK async function initializeSDK() { const rhinestone = new RhinestoneSDK({ auth: { mode: 'experimental_jwt', accessToken: async () => { const res = await fetch('/api/auth/token') const { token } = await res.json() return token }, getIntentExtensionToken: async (intentInput) => { const res = await fetch('/api/auth/extension-token', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ intentInput }), }) const { token } = await res.json() return token }, }, }) const account = await rhinestone.createAccount({ account: { type: 'nexus' }, owners: { type: 'ecdsa', accounts: [signer] }, }) // Send sponsored transaction const result = await account.sendTransaction({ targetChain: mainnet, calls: [...], sponsored: true, // Extension token will be fetched }) } ``` -------------------------------- ### Setup Rhinestone Account Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Sets up the account on a given chain by installing any missing modules. Returns true if setup succeeded. ```typescript setup(chain: Chain): Promise ``` -------------------------------- ### Install Rhinestone SDK with bun Source: https://github.com/rhinestonewtf/sdk/blob/main/README.md Install the Rhinestone SDK and viem using bun. ```bash bun install viem @rhinestone/sdk ``` -------------------------------- ### Example: Get Rhinestone Account Initialization Data Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md An example demonstrating how to retrieve and use the factory address and initialization data from the account. ```typescript const { factory, factoryData } = account.getInitData() // factory: 0x1234... // factoryData: 0x5678... ``` -------------------------------- ### Install Rhinestone SDK with npm Source: https://github.com/rhinestonewtf/sdk/blob/main/README.md Install the Rhinestone SDK and viem using npm. ```bash npm install viem @rhinestone/sdk ``` -------------------------------- ### Wait For Execution Example Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Example demonstrating how to wait for the execution of a transaction and access its on-chain hash and claim transactions. ```typescript const result = await account.sendTransaction(transaction) const status = await account.waitForExecution(result) console.log(status.fill.hash) // Fill transaction hash on target chain console.log(status.claims) // Claim transactions on source chains ``` -------------------------------- ### Install Custom Module Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/actions.md Use this function to install a custom module on the account. Provide the module configuration, including its address and initialization data. ```typescript function installModule(module: ModuleInput): LazyCallInput ``` -------------------------------- ### Express Router Example Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/jwt-server.md An example demonstrating how to integrate the JWT router into an Express application. Ensure you have a way to fetch your JWK private key. ```typescript import express from 'express' import { createExpressRouter } from '@rhinestone/sdk/jwt-server' const app = express() app.use(express.json()) const jwtRouter = createExpressRouter({ jwt: { privateKey: await getJwkFromSecretManager(), integratorId: 'int_abc', projectId: 'proj_xyz', appId: 'app_prod', keyId: 'key_1', }, }) app.use('/api/rhinestone', jwtRouter) app.listen(3000) ``` -------------------------------- ### Multi-Chain Permit2 Signing Example Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/README.md Sign multiple Permit2 approvals sequentially across different chains using the SDK. ```typescript import { signPermit2Sequential } from '@rhinestone/sdk' const result = await signPermit2Sequential({ approvals: [ { chainId: 1, token: USDC, spender: PERMIT2, signingAccount: signer }, { chainId: 8453, token: USDC, spender: PERMIT2, signingAccount: signer }, ], }) ``` -------------------------------- ### Handle Account Setup Errors Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/errors.md Manage potential errors during account deployment or setup. Specifically catch `AccountConfigurationNotSupportedError` and use the general `isAccountError` type guard for other account-related issues. ```typescript try { const deployed = await account.deploy(chain) if (deployed) { console.log('Account deployed') } else { console.log('Account already deployed') } } catch (error) { if (error instanceof AccountConfigurationNotSupportedError) { console.error('This account type is not supported on this chain') } else if (isAccountError(error)) { console.error('Account setup failed:', error.message) } } ``` -------------------------------- ### Send Transaction Example Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Example demonstrating how to send a transaction with multiple calls and token requests using the sendTransaction method. ```typescript const result = await account.sendTransaction({ targetChain: arbitrum, calls: [ { to: '0xUsdc...', data: encodeFunctionData({ abi: erc20Abi, functionName: 'transfer', args: [recipient, amount], }), }, ], tokenRequests: [{ address: 'USDC', amount }], }) ``` -------------------------------- ### Example: Initialize SDK with JWT Signer Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/jwt-server.md Demonstrates how to create a JWT signer and integrate it into the Rhinestone SDK for authentication. Includes filtering for specific chains and custom account verification for sponsorship. ```typescript import { createJwtSigner } from '@rhinestone/sdk/jwt-server' import { RhinestoneSDK } from '@rhinestone/sdk' const signer = createJwtSigner({ jwt: { privateKey: myJwk, // RS256 private key from environment integratorId: 'int_abc123', projectId: 'proj_xyz789', appId: 'app_prod', keyId: 'key_1', }, shouldSponsor: { chain: ({ id }) => [1, 8453, 10].includes(id), // Only mainnet, Base, Optimism account: async (address) => { return await isVerifiedUser(address) // Custom verification }, }, }) const sdk = new RhinestoneSDK({ auth: { mode: 'experimental_jwt', ...signer, // Spreads accessToken and getIntentExtensionToken }, }) ``` -------------------------------- ### Install Custom Modules Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/configuration.md Install custom ERC-7579 modules for an account, specifying module type, address, and initialization data. ```typescript const account = await sdk.createAccount({ account: { type: 'nexus' }, owners: { type: 'ecdsa', accounts: [signer] }, modules: [ { type: 'hook', address: '0xCustomHookModule...', initData: '0x...', }, { type: 'executor', address: '0xCustomExecutor...', initData: '0x...', }, ], }) ``` -------------------------------- ### Modules Actions Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/INDEX.md Provides functions for installing, uninstalling, and deploying modules. ```APIDOC ## Modules Actions ### Description This group of actions manages the installation, uninstallation, and deployment of modules for smart accounts. ### Methods - `installModule(moduleAddress)`: Installs a module at the specified address. - `uninstallModule(moduleAddress)`: Uninstalls a module from the specified address. - `deploy(moduleConfig)`: Deploys a new module with the given configuration. ``` -------------------------------- ### Server-Side JWT Authentication Setup Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/OVERVIEW.md Set up server-side JWT authentication using `createJwtSigner`. This involves configuring JWT details and optional sponsorship conditions. ```typescript import { createJwtSigner } from '@rhinestone/sdk/jwt-server' const signer = createJwtSigner({ jwt: { privateKey: process.env.PRIVATE_KEY_JWK, integratorId: 'int_abc', projectId: 'proj_xyz', appId: 'app_prod', keyId: 'key_1', }, shouldSponsor: { chain: ({ id }) => [1, 8453].includes(id), account: async (address) => await isWhitelisted(address), }, }) const sdk = new RhinestoneSDK({ auth: { mode: 'experimental_jwt', ...signer, }, }) ``` -------------------------------- ### Get Account Portfolio Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Fetches the account's portfolio across all chains. Optionally query testnet balances. ```typescript getPortfolio(onTestnets?: boolean): Promise ``` -------------------------------- ### Module Management Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/actions.md Functions for installing and uninstalling custom modules on an account. ```APIDOC ## installModule ### Description Install a custom module on the account. ### Method ```typescript function installModule(module: ModuleInput): LazyCallInput ``` ### Parameters #### Path Parameters - **module** (ModuleInput) - Yes - Module configuration with address and init data ### Returns `LazyCallInput` - Lazy call to install the module. ``` ```APIDOC ## uninstallModule ### Description Uninstall a module from the account. ### Method ```typescript function uninstallModule(module: ModuleInput): LazyCallInput ``` ### Parameters #### Path Parameters - **module** (ModuleInput) - Yes - Module configuration to uninstall ### Returns `LazyCallInput` - Lazy call to uninstall the module. ``` -------------------------------- ### experimental_getSessionDetails Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Gets details about smart sessions. This is an experimental feature. ```APIDOC ## experimental_getSessionDetails ### Description Gets details about smart sessions. This is an experimental feature. ### Method POST (assumed) ### Endpoint /account/sessions/details ### Parameters #### Request Body - **sessions** (Session[]) - Required - Sessions to get details for ### Request Example ```json { "sessions": [ { "chainId": 1, "address": "0x..." } ] } ``` ### Response #### Success Response (200) - **sessionDetails** (SessionDetails) - Session details and validation state. ### Response Example ```json { "sessionDetails": { "address": "0x...", "validUntil": 1678886400, "state": "enabled" } } ``` ``` -------------------------------- ### Development Setup with Local Test Chains Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/configuration.md Configure the SDK to use local test chains with Prool for development. This involves creating a Prool pool and specifying the local RPC endpoint. ```typescript // Using local test chains with prool import { createPool } from 'prool' const pool = createPool() const sdk = new RhinestoneSDK({ auth: { mode: 'apiKey', apiKey: 'dev-key' }, provider: { type: 'custom', urls: { [pool.chainId]: `http://127.0.0.1:${pool.rpcPort}`, }, }, }) ``` -------------------------------- ### Load SDK Configuration from Environment Variables Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/configuration.md Initialize the Rhinestone SDK using environment variables for authentication, provider, bundler, and paymaster configurations. This is a common setup for production environments. ```typescript const sdk = new RhinestoneSDK({ auth: { mode: 'apiKey', apiKey: process.env.RHINESTONE_API_KEY, }, provider: { type: 'alchemy', apiKey: process.env.ALCHEMY_API_KEY, }, bundler: { type: 'pimlico', apiKey: process.env.PIMLICO_API_KEY, }, paymaster: { type: 'pimlico', apiKey: process.env.PIMLICO_PAYMASTER_KEY, }, }) ``` -------------------------------- ### Module Input Interface Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/types.md Defines the data structure for installing or uninstalling modules, including type, address, and initialization/deinitialization data. ```typescript interface ModuleInput { type: ModuleType address: Address initData?: Hex deInitData?: Hex additionalContext?: Hex } ``` -------------------------------- ### Express Example: Access Token Handler Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/jwt-server.md Sets up an Express router to handle requests for generating JWT access tokens. The router is mounted at a specified API path. ```typescript import express from 'express' import { createExpressRouter } from '@rhinestone/sdk/jwt-server' const app = express() const jwtRouter = createExpressRouter({ jwt: { privateKey: myJwk, integratorId: 'int_abc', projectId: 'proj_xyz', appId: 'app_prod', keyId: 'key_1', }, }) app.use('/api/auth', jwtRouter) // POST /api/auth/token - Returns { token: '...' } ``` -------------------------------- ### Store Environment Variables Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/jwt-server.md Example of storing JWT configuration details in a `.env` file. These variables are used to configure the JWT handler. ```bash PRIVATE_KEY_JWK='{"kty":"RSA",...}' INTEGRATOR_ID='int_abc' PROJECT_ID='proj_xyz' APP_ID='app_prod' KEY_ID='key_1' ``` -------------------------------- ### Install ERC-7579 Module on an Account Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/README.md Use the installModule action to add an ERC-7579 module, such as a hook, to an account. ```typescript import { installModule } from '@rhinestone/sdk/actions' const result = await account.sendTransaction({ chain: mainnet, calls: [ installModule({ type: 'hook', address: '0xCustomModule...', initData: '0x...', }), ], }) ``` -------------------------------- ### Get Installed Executor Modules Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Fetches the list of addresses for installed executor modules on a given chain. ```typescript getExecutors(chain: Chain): Promise ``` -------------------------------- ### Rhinestone SDK Error Handling Example Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/README.md Demonstrates how to handle potential errors during transaction execution, including specific IntentFailedError and general ExecutionError. ```typescript import { isExecutionError, IntentFailedError } from '@rhinestone/sdk/errors' try { const result = await account.sendTransaction(transaction) await account.waitForExecution(result) } catch (error) { if (error instanceof IntentFailedError) { console.error('Intent failed:', error.context?.intentId) } else if (isExecutionError(error)) { console.error('Execution error:', error.message) } } ``` -------------------------------- ### Get Installed Validator Modules Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Fetches the list of addresses for installed validator modules on a given chain. ```typescript getValidators(chain: Chain): Promise ``` -------------------------------- ### Get All Supported Chains and Tokens Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/orchestrator.md Retrieves a mapping of all supported chain IDs to their respective token configurations. Useful for initializing or validating token support. ```typescript function getAllSupportedChainsAndTokens(): { [chainId: number]: TokenConfig[] } ``` ```typescript const supportedChains = getAllSupportedChainsAndTokens() console.log('Supported chains:', Object.keys(supportedChains)) for (const [chainId, tokens] of Object.entries(supportedChains)) { console.log(`Chain ${chainId}: ${tokens.map(t => t.symbol).join(', ')}`) } ``` -------------------------------- ### Typical .env Configuration for SDK Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/configuration.md Set up essential environment variables for SDK authentication, RPC providers, and bundler/paymaster services. Ensure all required keys are present for your chosen services. ```bash # SDK Authentication RHINESTONE_API_KEY=key_... # RPC Provider ALCHEMY_API_KEY=alchemy_... # ERC-4337 Bundler PIMLICO_API_KEY=pk_... # Gas Paymaster PIMLICO_PAYMASTER_KEY=pk_... # JWT Server (if using JWT mode) PRIVATE_KEY_JWK='{"kty":"RSA",...}' INTEGRATOR_ID=int_... PROJECT_ID=proj_... APP_ID=app_prod KEY_ID=key_1 ``` -------------------------------- ### Web Handler Example: Access Token Handler Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/jwt-server.md Implements a POST request handler for a Web API to create JWT access tokens using the `createAccessTokenHandler` function. ```typescript import { createAccessTokenHandler, createExtensionTokenHandler } from '@rhinestone/sdk/jwt-server' export async function POST(request: Request) { const handler = createAccessTokenHandler({ jwt: { privateKey: myJwk, integratorId: 'int_abc', projectId: 'proj_xyz', appId: 'app_prod', keyId: 'key_1', }, }) return handler(request) } ``` -------------------------------- ### Express Example: Extension Token Handler Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/jwt-server.md Configures an Express router to handle requests for generating intent extension tokens. The endpoint expects a JSON body containing `intentInput`. ```typescript import { createExpressRouter } from '@rhinestone/sdk/jwt-server' const jwtRouter = createExpressRouter({ jwt: { privateKey: myJwk, integratorId: 'int_abc', projectId: 'proj_xyz', appId: 'app_prod', keyId: 'key_1', }, }) app.use('/api/auth', jwtRouter) // POST /api/auth/extension-token with { intentInput: {...} } // Returns { token: '...' } ``` -------------------------------- ### getExecutors Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Gets the account's installed executor modules for a specified chain. ```APIDOC ## getExecutors ### Description Gets the account's installed executor modules. ### Method GET (assumed) ### Endpoint /account/executors ### Parameters #### Query Parameters - **chain** (Chain) - Required - Chain to get executors from ### Response #### Success Response (200) - **executors** (Address[]) - List of executor module addresses. ### Response Example ```json { "executors": ["0x..."] } ``` ``` -------------------------------- ### getValidators Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Gets the account's installed validator modules for a specified chain. ```APIDOC ## getValidators ### Description Gets the account's installed validator modules. ### Method GET (assumed) ### Endpoint /account/validators ### Parameters #### Query Parameters - **chain** (Chain) - Required - Chain to get validators from ### Response #### Success Response (200) - **validators** (Address[]) - List of validator module addresses. ### Response Example ```json { "validators": ["0x..."] } ``` ``` -------------------------------- ### Initialize SDK with Biconomy Bundler Configuration Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/configuration.md Configure the SDK to use the Biconomy ERC-4337 bundler. You will need to provide your Biconomy API key. ```typescript const sdk = new RhinestoneSDK({ bundler: { type: 'biconomy', apiKey: 'your-biconomy-key', }, }) ``` -------------------------------- ### Create Startale Account Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/configuration.md Configure and create a Startale account. Specify account type, salt, and owner configuration. ```typescript const account = await sdk.createAccount({ account: { type: 'startale', salt: '0x...', }, owners: { type: 'ecdsa', accounts: [signer], }, }) ``` -------------------------------- ### Initialize SDK with Biconomy Paymaster Configuration Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/configuration.md Configure the SDK to use the Biconomy paymaster for gas sponsorship. You will need to provide your Biconomy API key. ```typescript const sdk = new RhinestoneSDK({ paymaster: { type: 'biconomy', apiKey: 'your-biconomy-key', }, }) ``` -------------------------------- ### Initialize SDK with Pimlico Bundler Configuration Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/configuration.md Configure the SDK to use the Pimlico ERC-4337 bundler. You will need to provide your Pimlico API key. ```typescript const sdk = new RhinestoneSDK({ auth: { mode: 'apiKey', apiKey: 'your-key' }, bundler: { type: 'pimlico', apiKey: 'your-pimlico-key', }, }) ``` -------------------------------- ### getInitData Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Retrieves the factory address and initialization data required for deploying the smart account. ```APIDOC ## getInitData ### Description Returns the factory address and init data for deploying the account. ### Method `getInitData(): { factory: Address; factoryData: Hex }` ### Returns Factory address and encoded initialization data. ### Example ```typescript const { factory, factoryData } = account.getInitData() // factory: 0x1234... // factoryData: 0x5678... ``` ``` -------------------------------- ### Initialize SDK with Custom Paymaster Configuration Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/configuration.md Configure the SDK to use a custom paymaster for gas sponsorship by providing its RPC URL. ```typescript const sdk = new RhinestoneSDK({ paymaster: { type: 'custom', url: 'https://your-paymaster.example.com/rpc', }, }) ``` -------------------------------- ### shouldSponsor Example Usage Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/jwt-server.md Example of how to define sponsorship filters and use the `shouldSponsor` function to check eligibility. This demonstrates filtering by chain ID and account address. ```typescript const filters: SponsorshipFilter = { chain: ({ id }) => [1, 8453].includes(id), account: async (addr) => { return await isWhitelisted(addr) }, } if (await shouldSponsor(userAddress, arbitrum, filters)) { // User is eligible for sponsorship } ``` -------------------------------- ### Get Supported Tokens by Chain ID Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/utilities.md Retrieves all token configurations supported on a specified blockchain. Use this to get a list of tokens and their details for a given chain. ```typescript import { getSupportedTokens } from '@rhinestone/sdk' const mainnetTokens = getSupportedTokens(1) for (const token of mainnetTokens) { console.log(`${token.symbol}: ${token.address} (${token.decimals} decimals)`) } ``` -------------------------------- ### Initialize SDK with Custom Bundler Configuration Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/configuration.md Configure the SDK to use a custom ERC-4337 bundler by providing its RPC URL. ```typescript const sdk = new RhinestoneSDK({ bundler: { type: 'custom', url: 'https://your-bundler.example.com/rpc', }, }) ``` -------------------------------- ### RhinestoneAccount.getAddress() Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/INDEX.md Gets the address of the smart account. ```APIDOC ## RhinestoneAccount.getAddress() ### Description Retrieves the blockchain address of the smart account. ### Method ```javascript RhinestoneAccount.getAddress() ``` ``` -------------------------------- ### Create a Smart Account Source: https://github.com/rhinestonewtf/sdk/blob/main/README.md Use this snippet to initialize the Rhinestone SDK and create a new smart account. Ensure you replace 'your-api-key' with your actual API key and 'signer' with your wallet's signer object. ```typescript import { RhinestoneSDK } from '@rhinestone/sdk' const rhinestone = new RhinestoneSDK({ apiKey: 'your-api-key' }) const account = await rhinestone.createAccount({ owners: { type: 'ecdsa', accounts: [signer], }, }) ``` -------------------------------- ### Initialize SDK with Pimlico Paymaster Configuration Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/configuration.md Configure the SDK to use the Pimlico paymaster for gas sponsorship. You will need to provide your Pimlico API key. ```typescript const sdk = new RhinestoneSDK({ auth: { mode: 'apiKey', apiKey: 'your-key' }, paymaster: { type: 'pimlico', apiKey: 'your-pimlico-key', }, }) ``` -------------------------------- ### Initialize SDK with Server-Side JWT Authentication Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/configuration.md Initialize the SDK for server-side applications using JWT authentication. This requires setting up a JWT signer with your private key, integrator ID, project ID, app ID, and key ID. ```typescript import { createJwtSigner } from '@rhinestone/sdk/jwt-server' const signer = createJwtSigner({ jwt: { privateKey: JSON.parse(process.env.PRIVATE_KEY_JWK), integratorId: 'int_abc', projectId: 'proj_xyz', appId: 'app_prod', keyId: 'key_1', }, }) const sdk = new RhinestoneSDK({ auth: { mode: 'experimental_jwt', ...signer, }, }) ``` -------------------------------- ### getTokenAddress Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/orchestrator.md Get the contract address of a token by its symbol and chain. ```APIDOC ## getTokenAddress ### Description Get token contract address by symbol and chain. ### Method GET ### Endpoint /getTokenAddress ### Parameters #### Query Parameters - **chainId** (number) - Required - Chain ID - **symbol** (TokenSymbol) - Required - Token symbol (ETH, USDC, USDT, etc.) ### Response #### Success Response (200) - **address** (Address | null) - Token contract address or null if not supported. #### Response Example ```json { "address": "0x..." } ``` ``` -------------------------------- ### Run Unit Tests with Bun Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/README.md Execute unit tests using the Bun runtime. You can run all tests or target specific files. ```bash # Unit tests bun run test ``` ```bash # Specific test file bun run test -- src/actions/ecdsa.test.ts ``` -------------------------------- ### deployAccountsForOwners(configs, chain, rhinestoneConfig) Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/INDEX.md Deploys smart accounts for a list of owners. ```APIDOC ## deployAccountsForOwners(configs, chain, rhinestoneConfig) ### Description Deploys smart accounts for multiple owners in a batch operation. ### Method ```javascript deployAccountsForOwners(configs, chain, rhinestoneConfig) ``` ### Parameters #### Request Body - **configs** (array) - Required - An array of owner configurations. - **chain** (string) - Required - The chain on which to deploy the accounts. - **rhinestoneConfig** (object) - Required - Rhinestone SDK configuration. ``` -------------------------------- ### Run Linting with Bun Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/README.md Check code style and quality using the linting command. ```bash # Linting bun run check ``` -------------------------------- ### RhinestoneAccount.getPortfolio() Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/INDEX.md Gets the current portfolio of assets held by the smart account. ```APIDOC ## RhinestoneAccount.getPortfolio() ### Description Retrieves the current asset portfolio, including token balances and potentially NFTs, held by the smart account. ### Method ```javascript RhinestoneAccount.getPortfolio() ``` ``` -------------------------------- ### getTokenDecimals Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/orchestrator.md Get the number of decimals for a token by its contract address and chain. ```APIDOC ## getTokenDecimals ### Description Get token decimals by address and chain. ### Method GET ### Endpoint /getTokenDecimals ### Parameters #### Query Parameters - **chainId** (number) - Required - Chain ID - **tokenAddress** (Address) - Required - Token contract address ### Response #### Success Response (200) - **decimals** (number | null) - Token decimals or null if not found. #### Response Example ```json { "decimals": 6 } ``` ``` -------------------------------- ### StartaleAccount Interface Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/types.md Configuration for Startale smart accounts. An optional salt can be provided for deterministic addresses. ```typescript interface StartaleAccount { type: 'startale' salt?: Hex } ``` -------------------------------- ### getOwners Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Gets the account's ECDSA owners and their threshold for a specified chain. ```APIDOC ## getOwners ### Description Gets the account's ECDSA owners. ### Method GET (assumed) ### Endpoint /account/owners ### Parameters #### Query Parameters - **chain** (Chain) - Required - Chain to get owners from ### Response #### Success Response (200) - **accounts** (Address[]) - Array of owner addresses. - **threshold** (number) - The threshold for multi-signature. ### Response Example ```json { "accounts": ["0x..."], "threshold": 1 } ``` ``` -------------------------------- ### Initialize Rhinestone SDK with API Key Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneSDK.md Initialize the Rhinestone SDK using an API key for authentication. Requires configuration for both the SDK and the RPC provider. ```typescript import { RhinestoneSDK } from '@rhinestone/sdk' // API Key authentication const rhinestone = new RhinestoneSDK({ auth: { mode: 'apiKey', apiKey: 'your-api-key-from-dashboard', }, provider: { type: 'alchemy', apiKey: 'your-alchemy-key', }, }) ``` -------------------------------- ### Get Account Address Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Retrieves the smart account's address. This is a fundamental method for identifying the account. ```typescript getAddress(): Address ``` -------------------------------- ### Create Kernel Account Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/configuration.md Configure and create a Kernel account. Specify account type, version, salt, and owner configuration. ```typescript const account = await sdk.createAccount({ account: { type: 'kernel', version: '3.2', salt: '0x...', }, owners: { type: 'ecdsa', accounts: [signer], }, }) ``` -------------------------------- ### Create and Deploy a Nexus Account Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/OVERVIEW.md Create a new Nexus account and deploy it on the specified network. Requires a signer for ownership. ```typescript const account = await rhinestone.createAccount({ account: { type: 'nexus' }, owners: { type: 'ecdsa', accounts: [signer], }, }) await account.deploy(mainnet) // Deploys onchain ``` -------------------------------- ### utilities.getAllSupportedChainsAndTokens() Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/INDEX.md Retrieves a comprehensive list of all supported chains and their associated tokens. ```APIDOC ## utilities.getAllSupportedChainsAndTokens() ### Description Fetches a comprehensive list of all chains supported by the Rhinestone SDK, along with the tokens available on each chain. ### Method ```javascript utilities.getAllSupportedChainsAndTokens() ``` ``` -------------------------------- ### SessionSignerSet Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/types.md Defines session-based signing configurations, allowing for single session or per-chain session setups with optional execution verification. ```APIDOC ## SessionSignerSet ### Description Session-based signing (scoped permissions). ### Types - **SingleSessionSignerSet**: `{ type: 'experimental_session'; session: Session; enableData?: SessionEnableData; verifyExecutions?: boolean }` - **PerChainSessionSignerSet**: `{ type: 'experimental_session'; sessions: Record; verifyExecutions?: boolean }` ``` -------------------------------- ### Initialize Rhinestone SDK with API Key Source: https://github.com/rhinestonewtf/sdk/blob/main/README.md Initialize the Rhinestone SDK using an API key for authentication. Obtain your API key from the Rhinestone dashboard. ```typescript const rhinestone = new RhinestoneSDK({ auth: { mode: 'apiKey', apiKey: 'your-api-key', }, }) ``` -------------------------------- ### Set Sub-Validator for MFA (TypeScript) Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/actions.md Configure or modify a sub-validator within the multi-factor authentication setup by providing its ID and configuration. ```typescript function setSubValidator( id: Hex | number, validator: OwnableValidatorConfig | WebauthnValidatorConfig, ): CalldataInput ``` -------------------------------- ### Import Rhinestone SDK Main Entry Points Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/README.md Imports the main RhinestoneSDK class and the createRhinestoneAccount utility function from the SDK package. ```typescript import { RhinestoneSDK, createRhinestoneAccount } from '@rhinestone/sdk' ``` -------------------------------- ### getPortfolio Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Gets the account's portfolio across all chains. Allows querying testnet balances by setting `onTestnets` to true. ```APIDOC ## getPortfolio ### Description Gets the account's portfolio across all chains. Query testnet balances instead of mainnet by setting `onTestnets` to true. ### Method GET (assumed) ### Endpoint /account/portfolio ### Parameters #### Query Parameters - **onTestnets** (boolean) - Optional - Query testnet balances instead of mainnet. Default: false ### Response #### Success Response (200) - **Portfolio** - Array of tokens with balances per chain. ### Response Example ```json { "portfolio": [ { "chain": "ethereum", "tokens": [ { "address": "0x...", "balance": "1000000000000000000" } ] } ] } ``` ``` -------------------------------- ### Get Account Owners Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Retrieves the account's ECDSA owners and their threshold on a specified chain. Returns null if not configured. ```typescript getOwners(chain: Chain): Promise<{ accounts: Address[]; threshold: number } | null> ``` -------------------------------- ### Initialize SDK with Alchemy Provider Configuration Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/configuration.md Configure the SDK to use Alchemy as the RPC provider. You will need to provide your Alchemy API key. ```typescript const sdk = new RhinestoneSDK({ auth: { mode: 'apiKey', apiKey: 'your-key' }, provider: { type: 'alchemy', apiKey: 'your-alchemy-key', }, }) ``` -------------------------------- ### Full Rhinestone SDK Configuration Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/README.md Initialize the Rhinestone SDK with full configuration, including authentication, provider, bundler, paymaster, and custom headers. ```typescript const sdk = new RhinestoneSDK({ auth: { mode: 'apiKey', apiKey: 'your-key' }, provider: { type: 'alchemy', apiKey: 'alchemy-key' }, bundler: { type: 'pimlico', apiKey: 'pimlico-key' }, paymaster: { type: 'pimlico', apiKey: 'pimlico-key' }, headers: { 'X-Custom-Header': 'value' }, }) ``` -------------------------------- ### Get Deploy Call for Account Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/actions.md Use this function to retrieve the deployment call for a given Rhinestone account. This is necessary before deploying an account. ```typescript function deploy(account: RhinestoneAccount): LazyCallInput ``` -------------------------------- ### Create Nexus Account Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/configuration.md Configure and create a Nexus account. Specify account type, version, salt, and owner configuration. ```typescript const account = await sdk.createAccount({ account: { type: 'nexus', version: '1.2.0', salt: '0x...', }, owners: { type: 'ecdsa', accounts: [signer], }, }) ``` -------------------------------- ### deploy Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Deploys the smart account on a specified chain. It can optionally take a session to enable and a flag to indicate if the deployment is sponsored. ```APIDOC ## deploy ### Description Deploys the account on a given chain. ### Method `deploy(chain: Chain, params?: { session?: Session; sponsored?: boolean }): Promise` ### Parameters #### Path Parameters - **chain** (Chain) - Required - Target chain for deployment - **params.session** (Session) - Optional - Session to enable on deployment - **params.sponsored** (boolean) - Optional - Whether deployment is sponsored ### Returns `Promise` - True if deployment succeeded, false if already deployed. ``` -------------------------------- ### Get Supported Tokens Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/orchestrator.md Retrieve a list of all supported tokens for a given chain ID. The configuration includes symbols, addresses, and decimals. ```typescript function getSupportedTokens(chainId: number): TokenConfig[] ``` -------------------------------- ### Minimal Rhinestone SDK Configuration Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/README.md Initialize the Rhinestone SDK with minimal configuration using an API key for authentication. ```typescript const sdk = new RhinestoneSDK({ auth: { mode: 'apiKey', apiKey: 'your-key' }, }) ``` -------------------------------- ### Get Smart Session Details Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Retrieves details and validation state for a given set of smart sessions. Requires an array of Session objects. ```typescript experimental_getSessionDetails(sessions: Session[]): Promise ``` -------------------------------- ### Get Transaction Messages for Signing Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Retrieves the typed data messages that need to be signed for a prepared transaction, separated for origin and destination chains. ```typescript getTransactionMessages(preparedTransaction: PreparedTransactionData): { origin: TypedDataDefinition[] destination: TypedDataDefinition } ``` -------------------------------- ### Get Rhinestone Account Initialization Data Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Retrieves the factory address and initialization data required for deploying the account. Useful for off-chain preparation. ```typescript getInitData(): { factory: Address; factoryData: Hex } ``` -------------------------------- ### Initialize Rhinestone SDK with JWT (Client-Server) Source: https://github.com/rhinestonewtf/sdk/blob/main/README.md Initialize the Rhinestone SDK for JWT authentication when the SDK runs on the client and a backend handles token signing. Access tokens are fetched via HTTP. ```typescript const rhinestone = new RhinestoneSDK({ auth: { mode: 'experimental_jwt', accessToken: async () => { const res = await fetch('/api/auth/token') const { token } = await res.json() return token }, // Only needed for sponsored intents: getIntentExtensionToken: async (intentInput) => { const res = await fetch('/api/auth/extension-token', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ intentInput }), }) const { token } = await res.json() return token }, }, }) ``` -------------------------------- ### Get Account Portfolio Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/orchestrator.md Retrieves an account's token balances across all supported chains. Useful for displaying a user's assets. ```typescript async getPortfolio( accountAddress: Address, options?: { chainIds?: number[] }, ): Promise ``` ```typescript type Portfolio = PortfolioToken[] interface PortfolioToken { symbol: string decimals: number balances: { locked: bigint; unlocked: bigint } chains: Array<{ chain: number address: Address locked: bigint unlocked: bigint }> } ``` ```typescript const portfolio = await orchestrator.getPortfolio(accountAddress) for (const token of portfolio) { console.log(`${token.symbol}: ${token.balances.unlocked} (locked: ${token.balances.locked})`) for (const chain of token.chains) { console.log(` Chain ${chain.chain}: ${chain.unlocked}`) } } ``` -------------------------------- ### Initialize Rhinestone SDK Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/OVERVIEW.md Initialize the Rhinestone SDK with API keys for authentication and a provider for blockchain interaction. ```typescript const rhinestone = new RhinestoneSDK({ auth: { mode: 'apiKey', apiKey: 'your-key' }, provider: { type: 'alchemy', apiKey: 'alchemy-key' }, }) ``` -------------------------------- ### Get WETH Address Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/orchestrator.md Retrieve the contract address for Wrapped Ether (WETH) on a specific chain. Returns null if WETH is not supported on that chain. ```typescript function getWethAddress(chainId: number): Address | null ``` -------------------------------- ### Initialize Rhinestone SDK with JWT (Same-Host) Source: https://github.com/rhinestonewtf/sdk/blob/main/README.md Initialize the Rhinestone SDK for JWT authentication when the SDK and signing key are on the same server. Uses createJwtSigner for in-process token signing. ```typescript import { createJwtSigner } from '@rhinestone/sdk/jwt-server' const signer = createJwtSigner({ jwt: { privateKey: myJwk, // RS256 private key in JWK format integratorId: 'int_abc', projectId: 'proj_xyz', appId: 'app_prod', keyId: 'key_1', }, }) const rhinestone = new RhinestoneSDK({ auth: { mode: 'experimental_jwt', ...signer }, }) ``` -------------------------------- ### Get Token Address by Symbol Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/orchestrator.md Find the contract address for a specific token symbol on a given chain. Returns null if the token is not supported. ```typescript function getTokenAddress(chainId: number, symbol: TokenSymbol): Address | null ``` -------------------------------- ### Get Permit2 Contract Address Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/permit2.md Retrieves the Permit2 contract address for a given chain ID. Returns null if Permit2 is not deployed on that chain. ```typescript function getPermit2Address(chainId: number): Address | null ``` ```typescript import { getPermit2Address } from '@rhinestone/sdk' const permit2 = getPermit2Address(1) console.log('Permit2 on mainnet:', permit2) ``` -------------------------------- ### signEip7702InitData Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneAccount.md Prepares and signs the initialization data according to the EIP-7702 standard. ```APIDOC ## signEip7702InitData ### Description Prepares and signs EIP-7702 account initialization data. ### Method `signEip7702InitData(): Promise` ### Returns `Promise` - Signed init data. ``` -------------------------------- ### Import Core SDK Utilities Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/README.md Import utility functions for retrieving token information, supported chains, and Permit2 related operations. ```typescript import { getSupportedTokens, getTokenAddress, getTokenDecimals, getAllSupportedChainsAndTokens, checkERC20AllowanceDirect, getPermit2Address, signPermit2Batch, signPermit2Sequential, } from '@rhinestone/sdk' ``` -------------------------------- ### Get Token Symbol by Address and Chain Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/utilities.md Fetches the symbol for a token at a given contract address on a specific chain. Returns null if the token is not found. ```typescript function getTokenSymbol(chainId: number, tokenAddress: Address): string | null ``` -------------------------------- ### Enable Passkeys for an Account Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/OVERVIEW.md Enable passkey authentication for an account by providing WebAuthn credential details. This is submitted as a transaction. ```typescript import { enable } from '@rhinestone/sdk/actions/passkeys' const webauthnCredential = { pubKey: '0x...', authenticatorId: '0x...', } const result = await account.sendTransaction({ chain: mainnet, calls: [enable(webauthnCredential)], }) ``` -------------------------------- ### Run Single Test File Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/OVERVIEW.md Execute tests for a specific file within the SDK using the bun test command with a file path. ```bash bun run test -- path/to/file ``` -------------------------------- ### Get Intent Operation Status Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/orchestrator.md Retrieve the current status of a submitted intent using its ID. This returns status details and transaction hashes if available. ```typescript const status = await orchestrator.getIntentOpStatus(intentId) console.log('Status:', status.status) if (status.fillTransactionHash) { console.log('Fill tx:', status.fillTransactionHash) ``` -------------------------------- ### enable (Recovery) Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/actions.md Set up social recovery with guardian accounts. This action allows configuring guardians and a threshold for account recovery. ```APIDOC ## enable (Recovery) ### Description Set up social recovery with guardian accounts. ### Method ```typescript function enable(guardians: Account[], threshold?: number): LazyCallInput ``` ### Parameters #### Path Parameters * **guardians** (Array) - Required - Guardian accounts for recovery * **threshold** (number) - Optional - Number of guardians needed to approve recovery (defaults to 1) ### Returns `LazyCallInput` - Lazy call to enable recovery module. ``` -------------------------------- ### Get Token Decimals by Address and Chain Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/utilities.md Retrieves the number of decimals for a token at a given contract address on a specific chain. Returns null if the token is not found. ```typescript import { getTokenDecimals } from '@rhinestone/sdk' const usdcDecimals = getTokenDecimals(1, USDC_ADDRESS) console.log('USDC decimals:', usdcDecimals) // 6 ``` -------------------------------- ### RhinestoneSDK Constructor Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneSDK.md Initializes the Rhinestone SDK. Configuration requires either an API key (deprecated) or an authentication object, along with optional provider, bundler, and paymaster configurations. ```APIDOC ## RhinestoneSDK Constructor Initializes the Rhinestone SDK with the provided configuration. ### Parameters #### options (`RhinestoneSDKConfig`) - **options** (RhinestoneSDKConfig) - Required - Configuration object for the SDK. ### Configuration Options The `RhinestoneSDKConfig` requires one of two authentication modes: `apiKey` (deprecated) or `auth`. Optional configurations include `provider`, `bundler`, `paymaster`, `endpointUrl`, `useDevContracts`, and `headers`. ### Example ```typescript import { RhinestoneSDK } from '@rhinestone/sdk' // API Key authentication const rhinestone = new RhinestoneSDK({ auth: { mode: 'apiKey', apiKey: 'your-api-key-from-dashboard', }, provider: { type: 'alchemy', apiKey: 'your-alchemy-key', }, }) // JWT authentication (client-side) const rhinestone = new RhinestoneSDK({ auth: { mode: 'experimental_jwt', accessToken: async () => { const res = await fetch('/api/auth/token') const { token } = await res.json() return token }, }, }) ``` ``` -------------------------------- ### Get Token Address by Symbol and Chain Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/utilities.md Fetches the contract address for a given token symbol on a specific chain. Returns null if the token is not supported on that chain. ```typescript import { getTokenAddress } from '@rhinestone/sdk' const usdcOnBase = getTokenAddress(8453, 'USDC') console.log('USDC on Base:', usdcOnBase) const usdcOnArbitrum = getTokenAddress(42161, 'USDC') console.log('USDC on Arbitrum:', usdcOnArbitrum) ``` -------------------------------- ### Get Token Decimals by Address Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/orchestrator.md Determine the number of decimal places for a token given its contract address and chain ID. Returns null if the token is not found. ```typescript function getTokenDecimals(chainId: number, tokenAddress: Address): number | null ``` -------------------------------- ### Get Intent Route Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/orchestrator.md Obtain optimal routing and settlement details for a transaction intent. This includes the intent operation, cost breakdown, and total fee in USD. ```typescript const route = await orchestrator.getIntentRoute({ account: { address: accountAddress, chainId: 1 }, destinationChainId: 42161, destinationExecutions: calls, tokenRequests: [{ tokenAddress: USDC_ADDRESS, amount: 1000n }], options: { topupCompact: true }, }) console.log('Settlement fee (USD):', route.totalFeeUSD) ``` -------------------------------- ### Run Tests Source: https://github.com/rhinestonewtf/sdk/blob/main/AGENTS.md Executes tests using Vitest. ```bash bun run test ``` -------------------------------- ### Build Project Source: https://github.com/rhinestonewtf/sdk/blob/main/AGENTS.md Builds the project by cleaning and running TypeScript compilation. ```bash bun run build ``` -------------------------------- ### Get Intent Status Source: https://github.com/rhinestonewtf/sdk/blob/main/_autodocs/api-reference/RhinestoneSDK.md Retrieve the status of a submitted intent using its ID. The returned status includes fill transaction details and the current state of the intent. ```typescript const status = await rhinestone.getIntentStatus(result.id) console.log(status.status) // 'COMPLETED' console.log(status.fill.hash) // Transaction hash on target chain ```