Skip to content

transferToCluster

Transfer the balance from the chain to the current connected cluster.

Usage

const address = '4.....'
const amount = 1e12
const extrinct = client.transferToCluster(address, amount)

Parameters

address

string | AccountId

The SS58 format address that you want to transfer to. If can be the instance AccountId class from the polkadot-js.

amount

number | BN | bigint

The amount of balance that you want to transfer to the cluster.

Returns

SubmittableExtrinsic

The extrinsic that you can send to the chain to transfer the balance to the cluster. You need use signAndSend from the ApiPromise object or use Provider to processing.

signAndSend
const pair = client.alice
const amount = 1e12
await client.transferToCluster(pair.address, amount).signAndSend(pair)