XDM
Cross-Domain Transfers
transfer(api: ApiPromise, destination: ChainOrDomain, receiver: string, amount: Amount): Promise<SubmittableExtrinsic>
: Creates a transaction to transfer a specified amount to a receiver on a given destination, which can be either the consensus chain or a specific domain.
Types:
-
Amount:
BigInt | number | string
Represents the amount to be transferred. -
Consensus:
{ type: 'consensus' }
Indicates that the destination is the consensus chain. -
ChainOrDomain:
Consensus | Domain
A union type representing either the consensus chain or a domain. -
Domain:
{ type: 'domain'; domainId: number }
Specifies a domain as the destination, identified by adomainId
.