For the complete documentation index, see llms.txt. This page is also available as Markdown.

SDK Methods

1) getAvatar

Gets an avatar instance by address.

sdk.getAvatar(avatarAddress: string): Promise<Avatar>;
  • Parameters:

    • avatarAddress (required): Avatar wallet address.

  • Returns: HumanAvatar | OrganisationAvatar | BaseGroupAvatar

  • Example:

const avatar = await sdk.getAvatar('0x123...abc');

2) register.asHuman

Registers a human avatar; handles invitation redemption automatically.

sdk.register.asHuman(inviter: string, profile: Profile | string): Promise<HumanAvatar>;
  • Parameters:

    • inviter (required): Address of inviting avatar.

    • profile (required): Profile object or CID string.

  • Returns: HumanAvatar

  • Example:

3) register.asOrganization

Registers an organization avatar with profile data.

  • Parameters:

    • profile (required): Profile object or CID string; must include name.

  • Returns: OrganisationAvatar

  • Example:

4) register.asGroup

Registers a Base Group with profile data.

  • Parameters:

    • owner, service, feeCollection (required): Addresses.

    • initialConditions (required): Array of condition contract addresses (can be empty).

    • name (required, ≤19 chars), symbol (required).

    • profile (required): Profile object or CID.

  • Returns: BaseGroupAvatar

  • Example:

5) profiles.create (global)

Pins profile data and returns CID.

  • Parameters: profile (required): Profile object.

  • Returns: CID string.

  • Example:

6) avatar.profile.update (avatar-bound)

Pins profile data and updates on-chain metadata digest for that avatar.

  • Parameters: profile (required): Profile object.

  • Returns: CID string.

  • Example:

7) tokens.getInflationaryWrapper

Gets the inflationary ERC20 wrapper address for an avatar’s token (or zero address if undeployed).

  • Parameters: address (required): Avatar address.

  • Returns: Wrapper address or zero.

  • Example:

8) tokens.getDemurragedWrapper

Gets the demurraged ERC20 wrapper address for an avatar’s token (or zero address if undeployed).

  • Parameters: address (required): Avatar address.

  • Returns: Wrapper address or zero.

  • Example:

9) Wrapping (avatar.wrap)

Wrap/unwrap ERC1155 CRC into ERC20 wrappers.

  • Wrap demurraged:

  • Wrap inflationary:

  • Unwrap demurraged:

  • Unwrap inflationary:

  • Parameters:

    • avatarAddress / wrapperAddress (required)

    • amount (required, bigint, atto‑CRC)

  • Returns: Transaction receipt.

  • Example:

10) Transfers (avatar.transfer)

  • Advanced (pathfinding + unwrap/rewrap):

  • Direct (no pathfinding):

  • Max flow helpers:

  • Key optional options: useWrappedBalances, fromTokens, toTokens, excludeFromTokens, excludeToTokens, simulatedBalances, maxTransfers, txData.

  • Example:

11) Trust graph (avatar.trust)

  • expiry optional (defaults to max uint96).

  • Example:

12) Balances & history

  • getTransactions uses cursor-based pagination; limit is the page size (default 50). Advance with query.queryNextPage() and read query.currentPage.

  • Example:

13) Events

  • Returns: subscribeToEvents resolves when WS subscription is active; events is an observable stream of Circles events.

14) Invitations (avatar.invitation — Human only)

  • Use getReferralCode() when the invitee has no Safe yet, and invite(invitee) when they already have one but aren't registered.

  • getClaimableFreeInvites() returns 0 unless the avatar is an eligible Gnosis Pay user. When it's > 0, invite() and getReferralCode() automatically take the free-invite path instead of proxy inviters or farm quota.

  • computeAddress is synchronous — it does not return a promise.

  • Example:

15) Group memberships (avatar.group — Human only)

  • limit defaults to 50 in both.

  • getGroupMembershipsWithDetails enriches each membership with the group's name, symbol, owner, treasury, mint handler and member count.

  • Example:

16) Referrals storage (sdk.referrals)

  • Requires referralsServiceUrl in your CirclesConfig; every call throws a config error otherwise.

  • retrieve is a public endpoint (no auth). listMine requires an authenticated token provider.

17) Transfer annotations (sdk.rpc.transaction)

Reads the annotation blobs attached to CRC v2 transfers.

  • limit defaults to 50. Pass null for any filter you want to skip — argument order is positional.

  • Each TransferDataRow carries a hex data blob; decode it with decodeCrcV2TransferData from @aboutcircles/sdk-utils.

  • Example:

Last updated

Was this helpful?