Skip to main content

bridge/interfaces/WrapTokenOptions.md

Options for wrapping a token (e.g., MUSIC → GMUSIC)

Wrapping transfers a token from its native channel to the asset channel, converting it to its wrapped counterpart. This is required for tokens like MUSIC to be traded on the DEX.

Example​

const result = await wrapService.wrapToken({
tokenId: '$MUSIC|Unit|none|none',
amount: '100.5',
});

Properties​

PropertyTypeDescription
amountstringAmount to wrap (decimal string, e.g., "100.5")
recipient?stringOptional GalaChain recipient address (defaults to the sender)
tokenIdTokenClassKeyInputToken to wrap (source token on native channel), by its class key: the pipe form ("$MUSIC|Unit|none|none") or the object ({ collection: '$MUSIC', ... }). A bare symbol ("MUSIC") is refused (INVALID_TOKEN_REFERENCE): symbols are not unique.