Interface: WrapTokenOptions
GalaChain core SDK 1.0.0-rc.8 / bridge / WrapTokenOptions
Interface: WrapTokenOptions
Defined in: packages/gala-core-sdk/dist/bridge.d.ts:1208
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
amount
amount:
string
Defined in: packages/gala-core-sdk/dist/bridge.d.ts:1216
Amount to wrap (decimal string, e.g., "100.5")
recipient?
optionalrecipient?:string
Defined in: packages/gala-core-sdk/dist/bridge.d.ts:1218
Optional GalaChain recipient address (defaults to the sender)
tokenId
tokenId:
TokenClassKeyInput
Defined in: packages/gala-core-sdk/dist/bridge.d.ts:1214
Token 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.