Skip to main content

Interface: UnwrapTokenOptions

GalaChain core SDK 1.0.0-rc.8


GalaChain core SDK 1.0.0-rc.8 / bridge / UnwrapTokenOptions

Interface: UnwrapTokenOptions

Defined in: packages/gala-core-sdk/dist/bridge.d.ts:1234

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

Unwrapping transfers a token from the asset channel back to its native channel, converting it from the wrapped version to the original.

Example​

const result = await wrapService.unwrapToken({
tokenId: '$GMUSIC|Unit|none|none',
amount: '50',
});

Properties​

amount​

amount: string

Defined in: packages/gala-core-sdk/dist/bridge.d.ts:1242

Amount to unwrap (decimal string, e.g., "50")


recipient?​

optional recipient?: string

Defined in: packages/gala-core-sdk/dist/bridge.d.ts:1244

Optional GalaChain recipient address (defaults to the sender)


tokenId​

tokenId: TokenClassKeyInput

Defined in: packages/gala-core-sdk/dist/bridge.d.ts:1240

Token to unwrap (wrapped token on asset channel), by its class key: the pipe form ("$GMUSIC|Unit|none|none") or the object. A bare symbol is refused (INVALID_TOKEN_REFERENCE).