Circles Documentation
  • Welcome to Circles
  • Overview
    • Understanding Personal and Group Currencies
      • Personal Currencies
      • Group Currencies
    • Why Build on Circles?
    • Circles Architecture
  • Developer Docs
    • The Circles Stack
    • Circles SDK Overview
    • Quickstart Guide for Circles SDK
    • Setting Circles Profiles
    • Building with different Circles Avatars
      • Personal / Human Avatars
        • Inviting and accepting human avatars
        • Mint personal tokens
        • Fetching profile of an human avatar
        • Manage trust connections
        • Get token balances of an avatar
        • Transfer personal Circles tokens to different avatar
      • Group Avatars
        • Create Base Groups for your community.
          • Vanilla groups with V2 hub
        • Mint group tokens
        • Managing group invites
        • Find groups and memberships
        • Getting total supply of group tokens available
      • Organization Avatars
        • Creation of Organizations
        • Managing trust connections via Org avatar account
  • Tutorials and Examples
    • Setting up Circles SDK with React
  • Querying Circles profiles and data
    • Query Circles Data
    • Subscribing to Avatar events
    • Utilising CirclesQuery Class
    • Query Circles profiles
  • Circles SDK Reference
    • Circles SDK interface
    • SDK Methods
    • Circles Data Methods
    • Circles Events Types
  • Developer Support
    • Glossary
    • Past Hackathon Projects on Circles
Powered by GitBook
On this page
  • Get Maximum amount of transferrable token
  • Transfer CRC tokens

Was this helpful?

Export as PDF
  1. Developer Docs
  2. Building with different Circles Avatars
  3. Personal / Human Avatars

Transfer personal Circles tokens to different avatar

Get Maximum amount of transferrable token

Utilizes the pathfinder to find the maximum Circles amount that can be transferred from this Avatar to the specified avatar. The address of the avatar passed would be the one to which the Circles will be transferred.

const maxTransferable = await avatar.getMaxTransferableAmount(toAvatarAddress)
console.log(`Maximum transferable amount: ${maxTransferable}`);

Transfer CRC tokens

This function will allow you to transfer CRC tokens to the avatars with a valid trust path. The maximum transferable amount can be lower than the avatar's balance depending on its trust relations and token holdings.

const transferReceipt = await avatar.transfer(recipientAddress, amountToTransfer);
console.log(`Transfer successful! Transaction receipt: ${transferReceipt}`);

Direct token transfer (specific token):

// Transfer specific token
await avatar.transfer(recipientAddress, amount, specificTokenAddress);
PreviousGet token balances of an avatarNextGroup Avatars

Last updated 17 hours ago

Was this helpful?