Class: WrapService
GalaChain core SDK 1.0.0-rc.8 / bridge / WrapService
Class: WrapService
Defined in: packages/gala-core-sdk/dist/bridge.d.ts:2138
Service for cross-channel wrap and unwrap.
Constructors
Constructor
new WrapService(
config):WrapService
Defined in: packages/gala-core-sdk/dist/bridge.d.ts:2146
Parameters
config
Wrap service configuration
Returns
WrapService
Methods
estimateUnwrapFee()
estimateUnwrapFee(
tokenId,amount):Promise<WrapUnwrapFeeEstimate>
Defined in: packages/gala-core-sdk/dist/bridge.d.ts:2175
The fee and authorization of an unwrap (see estimateWrapFee).
Parameters
tokenId
The token to unwrap
amount
string
The amount (checked like an unwrap's)
Returns
Promise<WrapUnwrapFeeEstimate>
estimateWrapFee()
estimateWrapFee(
tokenId,amount):Promise<WrapUnwrapFeeEstimate>
Defined in: packages/gala-core-sdk/dist/bridge.d.ts:2168
The fee and authorization of a wrap. The fee is the constant "0" GALA launchpad-sdk reported (the channel bridge charges no fee the SDK can see).
Parameters
tokenId
The token to wrap
amount
string
The amount (checked like a wrap's)
Returns
Promise<WrapUnwrapFeeEstimate>
unwrapToken()
unwrapToken(
options):Promise<WrapUnwrapResult>
Defined in: packages/gala-core-sdk/dist/bridge.d.ts:2160
Unwrap a token: from the asset channel back to its own channel (e.g. GMUSIC → MUSIC).
Parameters
options
The token, the amount, an optional recipient
Returns
Promise<WrapUnwrapResult>
The completed unwrap
wrapToken()
wrapToken(
options):Promise<WrapUnwrapResult>
Defined in: packages/gala-core-sdk/dist/bridge.d.ts:2153
Wrap a token: from its own channel to the asset channel (e.g. MUSIC → GMUSIC).
Parameters
options
The token, the amount, an optional recipient
Returns
Promise<WrapUnwrapResult>
The completed wrap