### Install SDK Source: https://github.com/aboutcircles/sdk/blob/main/packages/invitations/README.md Install the SDK using npm. ```bash npm install @aboutcircles/sdk-invitations ``` -------------------------------- ### Run Examples Source: https://github.com/aboutcircles/sdk/blob/main/docs/README.md Commands to execute the provided example scripts. ```bash bun run examples # All examples bun run examples/core/01-basic-usage.ts # Specific example ``` -------------------------------- ### Install @aboutcircles/sdk-rpc Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/rpc/README.md Install the SDK using bun. ```bash bun install ``` -------------------------------- ### Install and Build SDK Source: https://github.com/aboutcircles/sdk/blob/main/docs/README.md Commands to install dependencies and build the project using bun. ```bash bun install bun run build ``` -------------------------------- ### Installation Source: https://github.com/aboutcircles/sdk/blob/main/packages/sdk/README.md Instructions on how to install the @aboutcircles/sdk package using npm or bun. ```APIDOC ## Installation ```bash npm install @aboutcircles/sdk # or bun add @aboutcircles/sdk ``` ``` -------------------------------- ### Run Examples with Bun Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/examples/rpc/README.md Instructions on how to run the provided examples using the Bun runtime. Navigate to the examples/rpc directory and execute specific .ts files. ```bash # From the repository root cd examples/rpc # Run any example with bun bun run 01-basic-rpc.ts bun run 08-trust-relations.ts # etc. ``` -------------------------------- ### Install @aboutcircles/sdk Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/sdk/README.md Install the package using npm or bun. ```bash npm install @aboutcircles/sdk # or bun add @aboutcircles/sdk ``` -------------------------------- ### Install Circles SDK Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/core/README.md Install the core package via bun. ```bash bun add @circles/core ``` -------------------------------- ### Install @aboutcircles/sdk-runner Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/runner/README.md Install the SDK runner package using npm. ```bash npm install @aboutcircles/sdk-runner ``` -------------------------------- ### POST setup Source: https://github.com/aboutcircles/sdk/blob/main/docs/abis/src/variables/demurrageCirclesAbi.md Initializes the contract with hub, registry, and avatar addresses. ```APIDOC ## POST setup ### Description Configures the contract settings. ### Method POST ### Parameters #### Request Body - **_hub** (address) - Required - The hub address. - **_nameRegistry** (address) - Required - The name registry address. - **_avatar** (address) - Required - The avatar address. ``` -------------------------------- ### Get ERC20 Wrapper Setup Call Prefix Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/LiftERC20Contract.md Retrieves the constant call prefix for setting up an ERC20 wrapper. Returns a promise that resolves to the call prefix. ```typescript ERC20_WRAPPER_SETUP_CALLPREFIX(): Promise<`0x${string}`>; ``` -------------------------------- ### Run Development Server with Bun Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/rpc/README.md Use this command to start the development server. ```bash bun run dev ``` -------------------------------- ### Basic Setup Source: https://github.com/aboutcircles/sdk/blob/main/packages/sdk/README.md Demonstrates how to create an instance of the Sdk class, with options for default or custom configuration. ```APIDOC ## Basic Setup ```typescript import { Sdk } from '@aboutcircles/sdk'; // Create SDK instance with default configuration (Gnosis Chain) const sdk = new Sdk(); // Or with custom configuration import { circlesConfig } from '@aboutcircles/sdk-core'; const sdk = new Sdk(circlesConfig[100], 'https://custom-rpc.com'); ``` ``` -------------------------------- ### PagedQuery - Event-based Pagination Example Source: https://github.com/aboutcircles/sdk/blob/main/docs/rpc/src/classes/PagedQuery.md Example demonstrating how to use the PagedQuery class for event-based pagination. ```APIDOC ## Example: Event-based Pagination ```typescript // Event-based pagination const query = new PagedQuery(rpc.client, { namespace: 'V_CrcV2', table: 'GroupMemberships', sortOrder: 'DESC', columns: ['blockNumber', 'transactionIndex', 'logIndex', 'group', 'member'], filter: [{ Type: 'FilterPredicate', FilterType: 'Equals', Column: 'group', Value: '0x...' }], limit: 100 }); ``` ``` -------------------------------- ### PagedQuery - Custom Cursor Pagination Example Source: https://github.com/aboutcircles/sdk/blob/main/docs/rpc/src/classes/PagedQuery.md Example demonstrating how to use the PagedQuery class for custom cursor pagination with view tables. ```APIDOC ## Example: Custom Cursor Pagination ```typescript // Custom cursor pagination (for view tables) const viewQuery = new PagedQuery(rpc.client, { namespace: 'V_CrcV2', table: 'GroupTokenHoldersBalance', sortOrder: 'ASC', columns: ['group', 'holder', 'totalBalance'], cursorColumns: [{ name: 'holder', sortOrder: 'ASC' }], filter: [{ Type: 'FilterPredicate', FilterType: 'Equals', Column: 'group', Value: '0x...' }], limit: 100 }); ``` ``` -------------------------------- ### Query Transaction History Example Source: https://github.com/aboutcircles/sdk/blob/main/docs/rpc/src/classes/TransactionMethods.md Example usage of getTransactionHistory to fetch and iterate through transaction pages. ```typescript const query = rpc.transaction.getTransactionHistory('0xAvatar...', 50); // Get first page await query.queryNextPage(); query.currentPage.results.forEach(tx => { console.log(`${tx.from} -> ${tx.to}: ${tx.circles} CRC`); }); // Get next page if available if (query.currentPage.hasMore) { await query.queryNextPage(); // Process next page... } ``` -------------------------------- ### Instantiate PathfinderMethods Source: https://github.com/aboutcircles/sdk/blob/main/docs/rpc/src/classes/PathfinderMethods.md Initialize PathfinderMethods with an RpcClient instance. This is the primary setup for using pathfinding functionalities. ```typescript new PathfinderMethods(client) ``` -------------------------------- ### Get Mintable Personal Token Amount Source: https://github.com/aboutcircles/sdk/blob/main/docs/sdk/src/classes/HumanAvatar.md Retrieves the available amount of personal tokens that can be minted, along with the start and end periods. ```typescript getMintableAmount: () => Promise<{ amount: bigint; startPeriod: bigint; endPeriod: bigint; }>; ``` ```typescript const { amount, startPeriod, endPeriod } = await avatar.personalToken.getMintableAmount(); console.log('Mintable amount:', CirclesConverter.attoCirclesToCircles(amount), 'CRC'); console.log('Start period:', startPeriod.toString()); console.log('End period:', endPeriod.toString()); ``` -------------------------------- ### GET /avatar/transfer/getMaxAmount Source: https://github.com/aboutcircles/sdk/blob/main/docs/sdk/src/classes/HumanAvatar.md Gets the maximum amount that can be transferred to an address using pathfinding. ```APIDOC ## GET /avatar/transfer/getMaxAmount ### Description Get the maximum amount that can be transferred to an address using pathfinding. ### Parameters #### Query Parameters - **to** (0x${string}) - Required - Recipient address ### Response #### Success Response (200) - **bigint** (number) - Maximum transferable amount (in atto-circles) ``` -------------------------------- ### Initialize and Use Sdk Source: https://github.com/aboutcircles/sdk/blob/main/docs/sdk/src/classes/Sdk.md Demonstrates basic usage of the Sdk class, including registration, avatar retrieval, and token operations. ```typescript const sdk = new Sdk(); // Register as a human const avatar = await sdk.register.asHuman('0xInviterAddress', { name: 'Alice', description: 'Developer' }); // Get an avatar const avatar = await sdk.getAvatar('0xAvatarAddress'); // Transfer tokens await avatar.transfer.direct('0xRecipient', 100); // Mint personal tokens await avatar.personalToken.mint(); ``` -------------------------------- ### Retrieve all available namespaces and tables Source: https://github.com/aboutcircles/sdk/blob/main/docs/rpc/src/classes/QueryMethods.md Call this method to get a list of all namespaces and tables that can be queried within the SDK. ```typescript const tables = await rpc.query.tables(); console.log(tables); ``` -------------------------------- ### Sdk Class Initialization Source: https://github.com/aboutcircles/sdk/blob/main/docs/sdk/src/classes/Sdk.md Demonstrates how to create a new instance of the Sdk class. ```APIDOC ## Constructor ### Sdk ```typescript new Sdk(config, contractRunner?): Sdk; ``` #### Description Create a new Sdk instance. #### Parameters ##### config (`CirclesConfig`) Circles configuration (defaults to Gnosis Chain mainnet). ##### contractRunner? (`ContractRunner`) Optional contract runner for executing transactions. #### Returns `Sdk` #### Throws Error if contractRunner is provided but doesn't support sendTransaction or has no address. ``` -------------------------------- ### Initialize Sdk Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/sdk/README.md Create an instance of the Sdk using default or custom configurations. ```typescript import { Sdk } from '@aboutcircles/sdk'; // Create SDK instance with default configuration (Gnosis Chain) const sdk = new Sdk(); // Or with custom configuration import { circlesConfig } from '@aboutcircles/sdk-core'; const sdk = new Sdk(circlesConfig[100], 'https://custom-rpc.com'); ``` -------------------------------- ### Get Available Tables Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/rpc/README.md Retrieve a list of all available namespaces and tables within the Circles RPC. ```typescript // Get available tables const tables = await rpc.query.tables(); ``` -------------------------------- ### Core Class Initialization Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/Core.md How to instantiate the Core SDK class with default or custom configurations. ```APIDOC ## Constructor ### Description Creates a new instance of the Core SDK to manage protocol contract interactions. ### Parameters - **config** (CirclesConfig) - Required - Configuration object for the Circles protocol (defaults to Gnosis Chain mainnet). ### Usage Example ```typescript // Use default Gnosis Chain config const core = new Core(); // Use custom config const customConfig = { ...circlesConfig[100], v2HubAddress: '0x...' }; const core = new Core(customConfig); ``` ``` -------------------------------- ### Convert CIDv0 to Hex Example Source: https://github.com/aboutcircles/sdk/blob/main/docs/utils/src/functions/cidV0ToHex.md Usage example for converting a specific CIDv0 string to its hex representation. ```typescript const hex = cidV0ToHex('QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG'); // Returns: '0x...' (32 bytes / 64 hex characters) ``` -------------------------------- ### Build Project with Bun Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/rpc/README.md Use this command to build the project for deployment. ```bash bun run build ``` -------------------------------- ### Initialize SDK Instance Source: https://github.com/aboutcircles/sdk/blob/main/packages/sdk/README.md Create an SDK instance with default configuration for Gnosis Chain or provide custom configuration and RPC URL. ```typescript import { Sdk } from '@aboutcircles/sdk'; // Create SDK instance with default configuration (Gnosis Chain) const sdk = new Sdk(); ``` ```typescript import { circlesConfig } from '@aboutcircles/sdk-core'; const sdk = new Sdk(circlesConfig[100], 'https://custom-rpc.com'); ``` -------------------------------- ### GET name Source: https://github.com/aboutcircles/sdk/blob/main/docs/abis/src/variables/demurrageCirclesAbi.md Retrieves the name of the token. ```APIDOC ## GET name ### Description Returns the name of the token. ### Method GET ### Response #### Success Response (200) - **name** (string) - The name of the token. ``` -------------------------------- ### groupToken.getMaxMintableAmount() Source: https://github.com/aboutcircles/sdk/blob/main/docs/sdk/src/classes/OrganisationAvatar.md Get the maximum amount that can be minted for a group. ```APIDOC ## groupToken.getMaxMintableAmount() ### Description Calculates the maximum transferable amount to the group's mint handler including wrapped token balances. ### Parameters #### Request Body - **group** (0x${string}) - Required - The group address ### Response #### Success Response (200) - **bigint** (number) - Maximum mintable amount in atto-circles ``` -------------------------------- ### Initialize SDK and Clients Source: https://context7.com/aboutcircles/sdk/llms.txt Configure the main SDK, RPC client, and contract runner for Gnosis Chain interactions. ```typescript // Install packages // bun add @aboutcircles/sdk @aboutcircles/sdk-rpc @aboutcircles/sdk-core @aboutcircles/sdk-runner import { Sdk } from '@aboutcircles/sdk'; import { CirclesRpc } from '@aboutcircles/sdk-rpc'; import { Core, circlesConfig } from '@aboutcircles/sdk-core'; import { SafeContractRunner, chains } from '@aboutcircles/sdk-runner'; // Initialize the main SDK with default Gnosis Chain config const sdk = new Sdk(); // Or with a custom contract runner for transaction execution const runner = await SafeContractRunner.create( 'https://rpc.gnosischain.com', '0xYourPrivateKey...', '0xYourSafeAddress...', chains.gnosis ); const sdkWithRunner = new Sdk(circlesConfig[100], runner); // Initialize RPC client for data queries const rpc = new CirclesRpc('https://rpc.circlesubi.network/'); // Initialize Core for direct contract interaction const core = new Core(); ``` -------------------------------- ### discountedBalances Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/DemurrageCirclesContract.md Gets the discounted balance information for an account. ```APIDOC ## discountedBalances() ### Description Get the discounted balance information for an account. Returns the current discounted balance and when it was last updated. ### Method N/A (This is a contract method, not an HTTP endpoint) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "account": "0x..." } ``` ### Response #### Success Response (200) `Promise` - A promise resolving to a tuple containing the current discounted balance and the day it was last updated. #### Response Example ```json { "balance": "1000000000000000000", "lastUpdatedDay": "100" } ``` ``` -------------------------------- ### Development and Build Commands Source: https://github.com/aboutcircles/sdk/blob/main/docs/README.md Utility commands for building, developing, documenting, and publishing the SDK packages. ```bash # Build bun run build # All packages bun run build:core # Core package bun run build:rpc # RPC package # Development (watch mode) bun run dev # All packages bun run dev:core # Core package # Documentation bun run docs # Generate API docs # Publishing bun run publish # Build and publish all packages # Clean bun run clean # Remove build artifacts ``` -------------------------------- ### Initialize Core SDK Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/Core.md Instantiate the Core SDK class. You can use default configurations for Gnosis Chain or provide custom configurations and RPC URLs. ```typescript const core = new Core(); ``` ```typescript const core = new Core(circlesConfig[100], 'https://custom-rpc.com'); ``` ```typescript const customConfig = { ...circlesConfig[100], v2HubAddress: '0x...' }; const core = new Core(customConfig); ``` -------------------------------- ### get() - Profiles API Source: https://github.com/aboutcircles/sdk/blob/main/docs/profiles/src/classes/Profiles.md Retrieves a profile by its CID. ```APIDOC ## GET /profiles/get ### Description Retrieves a profile by its CID. ### Method GET ### Endpoint /profiles/get ### Parameters #### Query Parameters - **cid** (string) - Required - The CID of the profile to retrieve. ### Response #### Success Response (200) - **profile** (Profile | undefined) - The profile data, or undefined if not found. ### Response Example ```json { "profile": { "name": "Jane Doe", "bio": "Data Scientist" } } ``` ``` -------------------------------- ### accounts() Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/ReferralsModuleContract.md Get the account record for a given signer. ```APIDOC ## accounts() ### Description Get the account record for a given signer. ### Parameters - **signer** (`0x${string}`) - Required - The offchain public address ### Response - **Returns** (Promise<{account: `0x${string}`, claimed: boolean}>) - Object with account address and claimed status ``` -------------------------------- ### Get Token Symbol Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/DemurrageCirclesContract.md Retrieves the symbol of the token. ```ts symbol(): Promise; ``` -------------------------------- ### run() Source: https://github.com/aboutcircles/sdk/blob/main/docs/runner/src/classes/SafeBrowserBatchRun.md Executes all batched transactions and waits for confirmation. The user will be prompted to sign the transaction through their Web3 wallet. ```APIDOC ## POST /run ### Description Executes all batched transactions and waits for confirmation. The user will be prompted to sign the transaction through their Web3 wallet. ### Method `run()` ### Endpoint N/A (Method within a class) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json null ``` ### Response #### Success Response (200) - **TransactionReceipt** (object) - A promise that resolves with the transaction receipt upon successful execution. #### Response Example ```json { "transactionHash": "0x...", "blockHash": "0x...", "blockNumber": 1234567, "status": "success" } ``` #### Error Handling - **Throws**: If transaction reverts or execution fails. ``` -------------------------------- ### Initialize Invitations and Referrals Clients Source: https://github.com/aboutcircles/sdk/blob/main/packages/invitations/README.md Initialize the Invitations and Referrals clients with the appropriate configuration. The Invitations client requires a CirclesConfig object, while the Referrals client needs a base URL. ```typescript import { Invitations, Referrals } from '@aboutcircles/sdk-invitations'; import { circlesConfig } from '@aboutcircles/sdk-utils'; const invitations = new Invitations(circlesConfig[100]); const referrals = new Referrals('https://referrals.circles.example'); ``` -------------------------------- ### Get Token Name Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/DemurrageCirclesContract.md Retrieves the name of the token. ```ts name(): Promise; ``` -------------------------------- ### POST createAccounts Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/ReferralsModuleContract.md Batch pre-deploys Safes for multiple signers. ```APIDOC ## POST createAccounts ### Description Batch pre-deploys Safes for multiple signers. This method is only callable by the Invitation Module Generic Call Proxy. ### Parameters #### Parameters - **signers** (`0x${string}[]`) - Required - The list of public addresses derived from origin inviters' offchain secrets. ### Response - **TransactionRequest** (object) - The transaction request object. ``` -------------------------------- ### Getting an Avatar Source: https://github.com/aboutcircles/sdk/blob/main/docs/sdk/src/classes/Sdk.md Shows how to retrieve an avatar using its address. ```APIDOC ## Get Avatar ### getAvatar() ```typescript getAvatar: (avatarAddress: `0x${string}`) => Promise; ``` #### Description Retrieves an avatar using its address. #### Parameters ##### avatarAddress (`0x${string}`) The address of the avatar to retrieve. #### Returns `Promise` An Avatar instance. ``` -------------------------------- ### Initialize InvitationFarmContract Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/InvitationFarmContract.md Constructor for creating a new instance of the InvitationFarmContract. ```ts new InvitationFarmContract(config): InvitationFarmContract; ``` -------------------------------- ### Get Profile Source: https://github.com/aboutcircles/sdk/blob/main/docs/rpc/src/classes/CirclesRpc.md Retrieve profile information for a specific address. ```APIDOC ## Method: rpc.profile.getProfileByAddress ### Description Fetches the profile details associated with a given blockchain address. ### Parameters #### Path Parameters - **address** (string) - Required - The address to look up. ``` -------------------------------- ### Get Allowance Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/DemurrageCirclesContract.md Retrieves the allowance of a spender for a specific owner. ```ts allowance(owner, spender): Promise; ``` -------------------------------- ### Constructor: ReferralsModuleContract Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/ReferralsModuleContract.md Initializes a new instance of the ReferralsModuleContract. ```APIDOC ## Constructor ### Description Initializes the ReferralsModuleContract with the contract address and RPC URL. ### Parameters #### config - **address** (`0x${string}`) - Required - The contract address. - **rpcUrl** (string) - Required - The RPC URL for network interaction. ``` -------------------------------- ### InvitationFarmContract Constructor Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/InvitationFarmContract.md Initializes a new instance of the InvitationFarmContract. ```APIDOC ## new InvitationFarmContract(config) ### Description Initializes a new instance of the InvitationFarmContract. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "config": { "address": "0x...", "rpcUrl": "https://..." } } ``` ### Response #### Success Response (200) - **InvitationFarmContract** (InvitationFarmContract) - A new instance of InvitationFarmContract. #### Response Example ```json { "instance": "InvitationFarmContract" } ``` ``` -------------------------------- ### Get Account Balance Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/DemurrageCirclesContract.md Retrieves the balance of a specific account. ```ts balanceOf(account): Promise; ``` -------------------------------- ### Get Total Supply Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/DemurrageCirclesContract.md Retrieves the total supply of the token. ```ts totalSupply(): Promise; ``` -------------------------------- ### SDK Initialization Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/sdk/README.md Initialize the SDK to interact with the Circles protocol. ```APIDOC ## SDK Initialization ### Description Initializes the main SDK entry point for interacting with the Circles protocol. ### Request Example ```typescript import { Sdk } from '@aboutcircles/sdk'; const sdk = new Sdk(); ``` ``` -------------------------------- ### Get Token Decimals Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/DemurrageCirclesContract.md Retrieves the number of decimals for the token. ```ts decimals(): Promise; ``` -------------------------------- ### POST createAccount Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/ReferralsModuleContract.md Pre-deploys a Safe for an origin inviter's offchain signer. ```APIDOC ## POST createAccount ### Description Pre-deploys a Safe for an origin inviter's offchain signer. This method is only callable by the Invitation Module Generic Call Proxy. ### Parameters #### Parameters - **signer** (`0x${string}`) - Required - The public address derived from the origin inviter's offchain secret key. ### Response - **TransactionRequest** (object) - The transaction request object. ``` -------------------------------- ### ReferralsModule Methods Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/ReferralsModuleContract.md A collection of asynchronous methods to retrieve configuration and contract addresses from the ReferralsModule. ```APIDOC ## domainSeparator() ### Description Get the EIP-712 domain separator. ### Response - **Returns** (Promise<`0x${string}`>) - The domain separator --- ## welcomeBonus() ### Description Get the welcome bonus amount (target CRC balance after claim). ### Response - **Returns** (Promise) - The welcome bonus amount --- ## hub() ### Description Get the Hub contract address. ### Response - **Returns** (Promise<`0x${string}`>) - The Hub address --- ## invitationModule() ### Description Get the Invitation Module address. ### Response - **Returns** (Promise<`0x${string}`>) - The Invitation Module address --- ## genericCallProxy() ### Description Get the Generic Call Proxy address. ### Response - **Returns** (Promise<`0x${string}`>) - The Generic Call Proxy address --- ## nameRegistry() ### Description Get the Name Registry address. ### Response - **Returns** (Promise<`0x${string}`>) - The Name Registry address --- ## affiliateGroupRegistry() ### Description Get the Affiliate Group Registry address. ### Response - **Returns** (Promise<`0x${string}`>) - The Affiliate Group Registry address --- ## safeProxyFactory() ### Description Get the Safe Proxy Factory address. ### Response - **Returns** (Promise<`0x${string}`>) - The Safe Proxy Factory address --- ## safeSingleton() ### Description Get the Safe Singleton address. ### Response - **Returns** (Promise<`0x${string}`>) - The Safe Singleton address --- ## safe4337Module() ### Description Get the Safe 4337 Module address. ### Response - **Returns** (Promise<`0x${string}`>) - The Safe 4337 Module address --- ## safeModuleSetup() ### Description Get the Safe Module Setup address. ### Response - **Returns** (Promise<`0x${string}`>) - The Safe Module Setup address --- ## safeWebAuthnSharedSigner() ### Description Get the Safe WebAuthn Shared Signer address. ### Response - **Returns** (Promise<`0x${string}`>) - The Safe WebAuthn Shared Signer address ``` -------------------------------- ### totalSupply() Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/HubV2Contract.md Get the total supply for a specific token ID. ```APIDOC ## totalSupply() ### Description Get total supply of a specific token ID ### Method GET (simulated) ### Endpoint /api/hubV2/totalSupply ### Parameters #### Query Parameters - **id** (`bigint`) - Required - The token ID. ### Response #### Success Response (200) - **totalSupply** (`bigint`) - The total supply of the specified token ID. ### Request Example ```json { "id": 12345n } ``` ### Response Example ```json { "totalSupply": 1000000n } ``` ``` -------------------------------- ### Get Total Supply Source: https://github.com/aboutcircles/sdk/blob/main/docs/sdk/src/classes/HumanAvatar.md Retrieves the total supply of CRC tokens. ```typescript getTotalSupply: () => Promise; ``` -------------------------------- ### Create Account Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/ReferralsModuleContract.md Pre-deploy a Safe for an origin inviter's offchain signer. ```ts createAccount(signer): TransactionRequest; ``` -------------------------------- ### Get Total Balance Source: https://github.com/aboutcircles/sdk/blob/main/docs/sdk/src/classes/HumanAvatar.md Retrieves the total balance of CRC tokens. ```typescript getTotal: () => Promise; ``` -------------------------------- ### Query Data with RPC SDK Source: https://github.com/aboutcircles/sdk/blob/main/docs/README.md Initialize the RPC client to fetch balances and find transfer paths. ```typescript import { CirclesRpc } from '@aboutcircles/sdk-rpc'; const rpc = new CirclesRpc('https://rpc.circlesubi.network/'); // Get balance const balance = await rpc.circlesV2.getTotalBalance('0xYourAddress'); // Find transfer path const path = await rpc.circlesV2.findPath({ from: '0xSenderAddress', to: '0xRecipientAddress', targetFlow: BigInt(100) }); ``` -------------------------------- ### balanceOfOnDay Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/DemurrageCirclesContract.md Gets the balance of an account on a specific day, accounting for demurrage. ```APIDOC ## balanceOfOnDay() ### Description Get the balance of an account on a specific day. This is a demurrage-specific feature that calculates historical balance accounting for the demurrage discount applied over time. ### Method N/A (This is a contract method, not an HTTP endpoint) ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json { "account": "0x...", "day": "100" } ``` ### Response #### Success Response (200) `Promise` - A promise resolving to a tuple containing the balance on that day and the discount cost. #### Response Example ```json { "balanceOnDay": "1000000000000000000", "discountCost": "10000000000000000" } ``` ``` -------------------------------- ### Get Available Tables Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/examples/rpc/README.md Retrieve a list of all available tables for querying. ```typescript rpc.query.tables() ``` -------------------------------- ### Initialize Referrals Client Source: https://github.com/aboutcircles/sdk/blob/main/docs/referrals/src/classes/Referrals.md Create a new instance of the Referrals client by providing the service base URL and an optional authentication token provider. ```ts new Referrals(baseUrl, getToken?): Referrals; ``` -------------------------------- ### Create Multiple Accounts Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/ReferralsModuleContract.md Batch pre-deploy Safes for multiple signers. ```ts createAccounts(signers): TransactionRequest; ``` -------------------------------- ### Get Network Snapshot Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/examples/rpc/README.md Obtain a snapshot of the current network state. ```typescript rpc.avatar.getNetworkSnapshot() ``` -------------------------------- ### GET /my-referrals Source: https://github.com/aboutcircles/sdk/blob/main/docs/referrals/src/interfaces/ReferralList.md Retrieves a list of referrals associated with the user account. ```APIDOC ## GET /my-referrals ### Description Returns a list of referrals and the total count of referrals for the authenticated user. ### Method GET ### Endpoint /my-referrals ### Response #### Success Response (200) - **referrals** (Referral[]) - List of referrals - **count** (number) - Total count of referrals #### Response Example { "referrals": [], "count": 0 } ``` -------------------------------- ### Create and Initialize SafeContractRunner Source: https://github.com/aboutcircles/sdk/blob/main/docs/runner/src/classes/SafeContractRunner.md Use the static create method to initialize the runner in a single step with the required network and wallet configuration. ```typescript import { gnosis } from 'viem/chains'; import { SafeContractRunner } from '@aboutcircles/sdk-runner'; const runner = await SafeContractRunner.create( 'https://rpc.gnosischain.com', '0xYourPrivateKey...', '0xYourSafeAddress...', gnosis ); ``` ```ts static create( rpcUrl, privateKey, safeAddress, chain): Promise; ``` -------------------------------- ### Get Nonce Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/DemurrageCirclesContract.md Retrieves the nonce for permit signatures for a given owner. ```ts nonces(owner): Promise; ``` -------------------------------- ### Initialize InvitationMethods Source: https://github.com/aboutcircles/sdk/blob/main/docs/rpc/src/classes/InvitationMethods.md Constructor for the InvitationMethods class, requiring an RpcClient instance. ```ts new InvitationMethods(client); ``` -------------------------------- ### Initialize and Use SafeContractRunner Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/runner/README.md Demonstrates initializing the SafeContractRunner with viem and sending single or batched transactions. Ensure the viem client and chain are correctly configured. ```typescript import { createPublicClient, http } from 'viem'; import { gnosis } from 'viem/chains'; import { SafeContractRunner } from '@aboutcircles/sdk-runner'; // Create a public client const publicClient = createPublicClient({ chain: gnosis, transport: http('https://rpc.gnosischain.com'), }); // Create the runner const runner = new SafeContractRunner( publicClient, '0x...', // private key of Safe signer 'https://rpc.gnosischain.com', '0x...' // Safe address ); // Initialize the runner await runner.init(); // Send a single transaction const receipt = await runner.sendTransaction([{ to: '0x...', data: '0x...', value: 0n, }]); console.log('Transaction hash:', receipt.transactionHash); console.log('Status:', receipt.status); console.log('Gas used:', receipt.gasUsed); // Batch multiple transactions atomically const batchReceipt = await runner.sendTransaction([ { to: '0x...', data: '0x...', value: 0n }, { to: '0x...', data: '0x...', value: 0n }, { to: '0x...', data: '0x...', value: 0n }, ]); ``` -------------------------------- ### balanceOf() Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/HubV2Contract.md Get the balance of a specific token ID for a given account. ```APIDOC ## balanceOf() ### Description Get balance of a specific token ID for an account ### Method GET (simulated) ### Endpoint /api/hubV2/balanceOf ### Parameters #### Query Parameters - **account** (`0x${string}`) - Required - The account address. - **id** (`bigint`) - Required - The token ID. ### Response #### Success Response (200) - **balance** (`bigint`) - The balance of the specified token ID for the account. ### Request Example ```json { "account": "0x123...", "id": 12345n } ``` ### Response Example ```json { "balance": 100n } ``` ``` -------------------------------- ### Get Avatar Info Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/rpc/README.md Retrieve avatar information for a specific address. ```typescript // Get avatar info const avatarInfo = await rpc.avatar.getAvatarInfo('0xde374ece6fa50e781e81aac78e811b33d16912c7'); ``` -------------------------------- ### Contract Class Constructor Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/Contract.md Initializes a new Contract instance with the provided configuration, including contract address, ABI, and RPC URL. ```APIDOC ## new Contract(config) ### Description Initializes a new Contract instance. ### Method Constructor ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **config** (object) - Required - Configuration object for the contract. - **address** (`0x${string}`) - Required - The contract's address. - **abi** (TAbi) - Required - The contract's ABI. - **rpcUrl** (string) - Required - The RPC URL for interacting with the blockchain. ### Request Example ```json { "config": { "address": "0x...", "abi": [...], "rpcUrl": "https://rpc.example.com" } } ``` ### Response #### Success Response (200) - **Contract** (object) - The newly created Contract instance. #### Response Example ```json { "instance": "" } ``` ``` -------------------------------- ### Interact with Core SDK Contracts Source: https://github.com/aboutcircles/sdk/blob/main/docs/README.md Initialize the Core SDK and perform a group mint operation. ```typescript import { Core } from '@aboutcircles/sdk-core'; const core = new Core(); const tx = core.hubV2.groupMint( '0x1234567890123456789012345678901234567890', ['0xRecipient1', '0xRecipient2'], [BigInt(100), BigInt(200)], '0x' ); ``` -------------------------------- ### GET /properties Source: https://github.com/aboutcircles/sdk/blob/main/docs/sdk/src/classes/HumanAvatar.md Retrieves various metadata and configuration addresses for a specific group. ```APIDOC ## GET /properties ### Description Retrieve specific properties of a group, such as the owner, mint handler, treasury, service, fee collection, or membership conditions. ### Parameters #### Query Parameters - **group** (0x${string}) - Required - The group address ### Response #### Success Response (200) - **owner** (0x${string}) - The owner address of the group - **mintHandler** (0x${string}) - The mint handler address of the group - **treasury** (0x${string}) - The treasury address where redemptions are handled - **service** (0x${string}) - The service address of the group - **feeCollection** (0x${string}) - The fee collection address of the group - **membershipConditions** (0x${string}[]) - Array of membership condition addresses ``` -------------------------------- ### Performance Tips Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/examples/rpc/README.md Tips for optimizing performance when using the Circles SDK. ```APIDOC ## Performance Tips 1. **Batch Requests**: Use batch methods when querying multiple addresses 2. **Pagination**: Use limit parameters to avoid large responses 3. **Caching**: Cache avatar info and profiles as they change infrequently 4. **Parallel Queries**: Use `Promise.all()` for independent queries Example: ```typescript const [avatar, balance, trusts] = await Promise.all([ rpc.avatar.getAvatarInfo(address), rpc.balance.getTotalBalance(address), rpc.trust.getMutualTrusts(address) ]); ``` ``` -------------------------------- ### InvitationEscrowContract Constructor Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/InvitationEscrowContract.md Initializes a new instance of the InvitationEscrowContract. ```APIDOC ## InvitationEscrowContract Constructor ### Description Initializes a new instance of the InvitationEscrowContract. ### Method Constructor ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```typescript new InvitationEscrowContract({ address: "0x...", rpcUrl: "http://..." }) ``` ### Response #### Success Response (200) `InvitationEscrowContract` - An instance of the InvitationEscrowContract. #### Response Example ```typescript // Instance of InvitationEscrowContract ``` ``` -------------------------------- ### Get Membership Conditions Source: https://github.com/aboutcircles/sdk/blob/main/docs/sdk/src/classes/OrganisationAvatar.md Retrieves all membership condition addresses for a specific group. ```ts getMembershipConditions: (group) => Promise<`0x${string}`[]>; ``` -------------------------------- ### Initialize and Use Circles SDK Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/core/README.md Initialize the Core instance and interact with HubV2, BaseGroupFactory, and BaseGroup contracts. ```typescript import { Core, circlesConfig, BaseGroupContract } from '@circles/core'; // Use default Gnosis Chain configuration const core = new Core(); console.log('Using RPC:', core.rpcUrl); console.log('HubV2 address:', core.config.v2HubAddress); // Use HubV2 contract (singleton, accessed via core.hubV2) const groupMintTx = core.hubV2.groupMint( '0x1234567890123456789012345678901234567890', ['0x0000000000000000000000000000000000000001', '0x0000000000000000000000000000000000000002'], [BigInt(100), BigInt(200)], '0x' ); console.log('GroupMint Transaction:', groupMintTx); // Create a new BaseGroup using the factory const createGroupTx = core.baseGroupFactory.createBaseGroup( '0x0000000000000000000000000000000000000001', // owner '0x0000000000000000000000000000000000000002', // service '0x0000000000000000000000000000000000000003', // feeCollection [], // initial conditions 'MyGroup', 'MYG', '0x0000000000000000000000000000000000000000000000000000000000000000' ); console.log('CreateGroup Transaction:', createGroupTx); // Use BaseGroup contract (multiple instances, create with specific address) const baseGroup = new BaseGroupContract({ address: '0x1234567890123456789012345678901234567890', // specific BaseGroup instance rpcUrl: core.rpcUrl // reuse the same RPC }); // Create a transaction to trust members with conditions const trustBatchTx = baseGroup.trustBatchWithConditions( ['0x0000000000000000000000000000000000000001', '0x0000000000000000000000000000000000000002'], BigInt(Math.floor(Date.now() / 1000) + 365 * 24 * 60 * 60) // 1 year from now ); console.log('TrustBatch Transaction:', trustBatchTx); // Use custom RPC URL const coreCustomRpc = new Core(circlesConfig[100], 'https://custom-rpc.example.com'); console.log('Custom RPC:', coreCustomRpc.rpcUrl); ``` -------------------------------- ### GET /avatar/history/getTransactions Source: https://github.com/aboutcircles/sdk/blob/main/docs/sdk/src/classes/HumanAvatar.md Retrieves the transaction history for an avatar using cursor-based pagination. ```APIDOC ## GET /avatar/history/getTransactions ### Description Get transaction history for this avatar using cursor-based pagination. Returns incoming/outgoing transactions and minting events. ### Parameters #### Query Parameters - **limit** (number) - Optional - Number of transactions per page (default: 50) - **sortOrder** ("ASC" | "DESC") - Optional - Sort order for results (default: 'DESC') ### Response #### Success Response (200) - **PagedQuery** (object) - PagedQuery instance for iterating through transactions ``` -------------------------------- ### Registering as an Organization Source: https://github.com/aboutcircles/sdk/blob/main/docs/sdk/src/classes/Sdk.md Demonstrates how to register a new organization identity. ```APIDOC ## Register as Organization ### asOrganization() ```typescript asOrganization: (profile) => Promise; ``` #### Description Register as an organization. Organizations can participate in Circles without minting personal tokens and do not require invitations to register. #### Parameters ##### profile (`string` | `Profile`) Profile data for the organization or CID string. #### Returns `Promise` OrganisationAvatar instance for the newly registered organization. #### Example ```typescript const orgAvatar = await sdk.register.asOrganization({ name: 'My Organization', description: 'A Circles organization' }); ``` ``` -------------------------------- ### Get Token Information Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/examples/rpc/README.md Retrieve information about a specific token using its address. ```typescript rpc.token.getTokenInfo(address) ``` -------------------------------- ### Initialize SDK and Get HumanAvatar Source: https://context7.com/aboutcircles/sdk/llms.txt Initializes the AboutCircles SDK and retrieves a HumanAvatar instance. Ensure 'circlesConfig' and 'runner' are properly configured. ```typescript import { Sdk } from '@aboutcircles/sdk'; import type { HumanAvatar } from '@aboutcircles/sdk'; const sdk = new Sdk(circlesConfig[100], runner); const avatar = await sdk.getAvatar('0xYourAddress...') as HumanAvatar; ``` -------------------------------- ### Get Token Balances Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/examples/rpc/README.md Retrieve detailed token balances for a specific address. ```typescript rpc.balance.getTokenBalances(address) ``` -------------------------------- ### Get Available Inviters Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/examples/rpc/README.md Retrieve a list of available inviters for a given address. ```typescript rpc.invitation.getInvitations(address) ``` -------------------------------- ### Initialize ReferralsModuleContract Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/ReferralsModuleContract.md Constructor for creating a new instance of the ReferralsModuleContract. ```ts new ReferralsModuleContract(config): ReferralsModuleContract; ``` -------------------------------- ### Construct Sdk Instance Source: https://github.com/aboutcircles/sdk/blob/main/docs/sdk/src/classes/Sdk.md Instantiates a new Sdk object with optional configuration and contract runner. ```typescript new Sdk(config, contractRunner?): Sdk; ``` -------------------------------- ### invitationFee Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/InvitationFarmContract.md Gets the invitation fee amount in CRC (cost per invite). ```APIDOC ## GET /invitationFee ### Description Gets the invitation fee amount in CRC (cost per invite). ### Method GET ### Endpoint /invitationFee ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```json {} ``` ### Response #### Success Response (200) - **invitationFee** (bigint) - The invitation fee constant in CRC. #### Response Example ```json { "invitationFee": 1000000000000000000 } ``` ``` -------------------------------- ### SafeBrowserRunner.create() Source: https://github.com/aboutcircles/sdk/blob/main/docs/runner/src/classes/SafeBrowserRunner.md A static method to create and initialize a SafeBrowserRunner in a single step. This is a convenient way to set up the runner with all necessary parameters. ```APIDOC ## Static Method create() ### Description Create and initialize a SafeBrowserRunner in one step. ### Parameters #### Parameters - **rpcUrl** (string) - Required - The RPC URL to connect to - **eip1193Provider** (object) - Required - The EIP-1193 provider from the browser (e.g., window.ethereum) - **safeAddress** (string) - Required - The address of the Safe wallet - **chain** (object) - Required - The viem chain configuration (e.g., gnosis from 'viem/chains') ### Returns `Promise` - An initialized SafeBrowserRunner instance ### Example ```typescript import { gnosis } from 'viem/chains'; import { SafeBrowserRunner } from '@aboutcircles/sdk-runner'; const runner = await SafeBrowserRunner.create( 'https://rpc.gnosischain.com', window.ethereum, '0xYourSafeAddress...', gnosis ); ``` ``` -------------------------------- ### Get Inflation Day Zero Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/DemurrageCirclesContract.md Retrieves the inflation day zero timestamp. ```ts inflationDayZero(): Promise; ``` -------------------------------- ### Get Profile by Address Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/rpc/README.md Retrieve a user profile associated with a given address. ```typescript // Get profile by address const profile = await rpc.profile.getProfileByAddress('0xc3a1428c04c426cdf513c6fc8e09f55ddaf50cd7'); ``` -------------------------------- ### SafeBrowserRunner.init() Source: https://github.com/aboutcircles/sdk/blob/main/docs/runner/src/classes/SafeBrowserRunner.md Initializes the runner with a Safe address. This method is useful if the Safe address was not provided during the constructor. It returns a promise that resolves when initialization is complete. ```APIDOC ## Method init() ### Description Initialize the runner with a Safe address. ### Parameters #### Parameters - **safeAddress?** (string) - Optional - The address of the Safe wallet (optional if provided in constructor) ### Returns `Promise` ### Throws If no Safe address is provided and no EIP-1193 provider is available ### Implementation of `ContractRunner.init` ``` -------------------------------- ### GET /transfer/getMaxAmount Source: https://github.com/aboutcircles/sdk/blob/main/docs/sdk/src/classes/BaseGroupAvatar.md Calculates the maximum amount that can be transferred to a specific address using pathfinding. ```APIDOC ## GET /transfer/getMaxAmount ### Description Get the maximum amount that can be transferred to an address using pathfinding. ### Parameters #### Query Parameters - **to** (0x${string}) - Required - Recipient address ### Response #### Success Response (200) - **amount** (bigint) - The maximum transferable amount ``` -------------------------------- ### Instantiate Profiles Class Source: https://github.com/aboutcircles/sdk/blob/main/docs/profiles/src/classes/Profiles.md Initialize the Profiles class with the URL of the profile service. This is the first step before using any profile-related methods. ```typescript new Profiles(profileServiceUrl) ``` -------------------------------- ### Get Group Collateral Source: https://github.com/aboutcircles/sdk/blob/main/docs/sdk/src/classes/Sdk.md Fetches all token balances held in a group's treasury. ```typescript // Get collateral tokens in a group treasury const collateral = await sdk.groups.getCollateral('0xGroupAddress...'); collateral.forEach(balance => { console.log(`Token: ${balance.tokenAddress}`); console.log(`Balance: ${balance.circles} CRC`); }); ``` -------------------------------- ### Get Maximum Transferable Amount Source: https://github.com/aboutcircles/sdk/blob/main/docs/sdk/src/classes/OrganisationAvatar.md Retrieves the maximum amount of tokens that can be transferred from an avatar. ```typescript const maxAmount = await avatar.transfer.getMaxAmount('0x123...'); console.log(`Can transfer up to: ${maxAmount}`); ``` ```typescript const maxAmount = await avatar.transfer.getMaxAmountAdvanced('0x123...', { maxTransfers: 3, maxDistance: 2 }); ``` -------------------------------- ### Advanced Pathfinding with Token Swaps Source: https://context7.com/aboutcircles/sdk/llms.txt Find a path for token swaps, including specifying source and target tokens, and simulating balances. Use BigInt for amounts and valid token addresses. ```typescript // Advanced pathfinding with token swaps (circular path) const swapPath = await rpc.pathfinder.findPath({ from: '0xAddress...', to: '0xAddress...', // Same address for token swap targetFlow: BigInt(100e18), fromTokens: ['0xTokenA...'], toTokens: ['0xTokenB...'], simulatedBalances: [{ holder: '0xAddress...', token: '0xTokenA...', amount: BigInt(100e18), isWrapped: false }] }); ``` -------------------------------- ### Manage IPFS Profiles with Profiles Class Source: https://context7.com/aboutcircles/sdk/llms.txt Initialize the Profiles class to create, pin, and retrieve user profiles from IPFS. ```typescript import { Profiles } from '@aboutcircles/sdk-profiles'; // Initialize with RPC URL (derives profile service URL) const profiles = new Profiles('https://rpc.circlesubi.network/'); // Or with explicit profile service URL const profilesCustom = new Profiles( 'https://rpc.circlesubi.network/', 'https://profiles.circles.garden/' ); // Create and pin a new profile to IPFS const profileData = { name: 'Alice', description: 'Building the future of UBI', avatarUrl: 'https://example.com/avatar.png', previewImageUrl: 'https://example.com/preview.png' }; const cid = await profiles.create(profileData); console.log('Profile pinned with CID:', cid); // Output: Profile pinned with CID: QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG // Retrieve a profile by CID const retrievedProfile = await profiles.get(cid); if (retrievedProfile) { console.log('Name:', retrievedProfile.name); console.log('Description:', retrievedProfile.description); } else { console.log('Profile not found'); } ``` -------------------------------- ### Get Profile by Address Source: https://github.com/aboutcircles/sdk/blob/main/docs/_media/examples/rpc/README.md Retrieve a user's profile information using their address. ```typescript rpc.profile.getProfileByAddress(address) ``` -------------------------------- ### Get active invitees for an inviter Source: https://github.com/aboutcircles/sdk/blob/main/docs/core/src/classes/InvitationEscrowContract.md Retrieves a list of addresses that were invited by the specified user. ```ts getInvitees(inviter): Promise<`0x${string}`[]>; ``` -------------------------------- ### run() Source: https://github.com/aboutcircles/sdk/blob/main/docs/types/src/interfaces/BatchRun.md Executes all transactions currently held in the batch. ```APIDOC ## run() ### Description Executes all batched transactions atomically. ### Returns - **Promise** - A promise that resolves to the single transaction receipt for the entire batch. ```