send()
Send specified asset(s) to specified user
Parameters
export type AssetSendProps = {
receiver: string; // userId or handle of the receiver
walletUserId?: string; // specifies walletId if user is an app-owned wallet
assetId?: string;
assetIds?: string[];
collectionId?: string;
}
Examples
const asset= await assetlayer.assets.send({
receiver: 'receiverHandle',
assetId: 'assetId'
});
const assets = await assetlayer.assets.send({
receiver: 'receiverHandle',
assetIds: ['assetId_1', 'assetId_2']
});
Return Types
type ReturnType = SendAssetResponseBody | SendAssetsResponseBody;
Alternatives
sendAsset()sendAssets()sendCollectionAssets()Last updated