Remarks
Token approvals are required before any operation that needs to transfer tokens (self-attestation, endorsements, etc.)new BondTokenClient()
new BondTokenClient(publicClient,walletClient,contractAddress):BondTokenClient
Parameters
publicClient
walletClient
contractAddress
`0x${string}`
Returns
BondTokenClient
Methods
mint()
mint(Mints new bond tokens to a specified account (only for testing)account,amount):Promise<`0x${string}`>
Parameters
account
`0x${string}`
Address that will receive the minted tokens
amount
bigint
Amount of tokens to mint
Returns
Promise<`0x${string}`>
Transaction hash
Remarks
This function is only available on test networks. In production/mainnet, tokens must be acquired through proper channels (exchanges, transfers, etc).approve()
approve(Approves an address to spend tokens on behalf of the callerspender,amount):Promise<`0x${string}`>
Parameters
spender
`0x${string}`
Address that will be approved to spend tokens
amount
bigint
Amount of tokens to approve
Returns
Promise<`0x${string}`>
Transaction hash
Example
balanceOf()
balanceOf(Gets the balance of an accountaccount):Promise<bigint>
Parameters
account
`0x${string}`
Address to check balance of
Returns
Promise<bigint>
Balance of the account
Example
allowance()
allowance(Gets the allowance of an account to spend another account’s tokensowner,spender):Promise<bigint>
Parameters
owner
`0x${string}`
Address of the token owner
spender
`0x${string}`
Address of the token spender
Returns
Promise<bigint>
Amount of tokens the spender is allowed to spend

