Skip to main content

Crosschain

getChannelSendSequence Query

Get the next send sequence for a channel.

paramsdescription
destChainIddestination chain id
channelIdchannel id of the cross chain package
example
await client.crosschain.getChannelSendSequence({
destChainId: '5600',
channelId: '97',
});

getChannelReceiveSequence Query

Get the next receive sequence for a channel.

paramsdescription
destChainIddestination chain id
channelIdchannel id of the cross chain package
example
await client.crosschain.getChannelReceiveSequence({
destChainId: '5600',
channelId: '97',
});

getCrosschainPackage Query

Get the cross-chain package by sequence.

paramsdescription
destChainIddestination chain id
channelIdchannel id of the cross chain package
sequencesequence of the cross chain package
example
await client.crosschain.getCrosschainPackage({
destChainId: '5600',
channelId: '97',
sequence: '111',
});

getInturnRelayer Query

Get the in-turn relayer bls public key and its relay interval.

example
await client.crosschain.getInturnRelayer();

mirrorBucket Tx

Mirror the bucket to BSC as an NFT.

paramsdescription
creatordefines the account address of the grantee who has the DeleteBucket permission of the bucket to be deleted.
iddefines the unique u256 for bucket
bucketNamedefines a globally unique name of bucket
destChainIddestination chain id
example
const tx = await client.crosschain.mirrorBucket({
bucketName: 'bucket_name',
id: 'bucket_id',
creator: '0x00...',
destChainId: '97',
});
tip

This is only construct tx, next need simulate and broadcast

mirrorGroup Tx

Mirror the group to BSC as an NFT.

paramsdescription
operatordefines the account address of the operator who is the owner of the group
idthe unique u256 for group
groupNamethe name of the group
destChainIddestination chain id
example
const tx = await client.crosschain.mirrorGroup({
groupName: 'group_name',
id: 'group_id',
operator: '0x00...',
destChainId: '97',
});
tip

This is only construct tx, next need simulate and broadcast

mirrorObject Tx

Mirror the object to BSC as an NFT.

paramsdescription
operatorthe account address of the operator who has the DeleteObject permission of the object to be deleted
idthe unique u256 for object
bucketNamethe name of the bucket where the object is stored
objectNamethe name of object
destChainIddestination chain id
example
const tx = await client.crosschain.mirrorObject({
bucketName: 'bucket_name',
objectName: 'object_name',
id: 'object_id',
operator: '0x00...',
destChainId: '97',
});
tip

This is only construct tx, next need simulate and broadcast

transferOut Tx

Make a transfer from Greenfield to BSC.

paramsdescription
fromfrom address
toto address
amountCoin
example
const tx = await client.crosschain.transferOut({
from: '0x00...',
to: '0x0000000000000000000000000000000000000001',
amount: {
amount: '1000000000',
denom: 'BNB',
},
});
tip

This is only construct tx, next need simulate and broadcast