@gala-chain/gala-core-sdk 1.1.0-beta.2 → 1.1.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -4
- package/dist/bridge.cjs +12 -3
- package/dist/bridge.cjs.map +1 -1
- package/dist/bridge.mjs +12 -3
- package/dist/bridge.mjs.map +1 -1
- package/dist/browser/bridge.js +1 -1
- package/dist/browser/bridge.js.map +1 -1
- package/dist/browser/utils/dto_operation.js.map +1 -1
- package/dist/browser/utils/transport.js +1 -1
- package/dist/browser/version.js +1 -1
- package/dist/browser/version.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/bridge.mjs
CHANGED
|
@@ -2194,6 +2194,16 @@ function destinationChainIdOf(value) {
|
|
|
2194
2194
|
/** The method a bridge-out signing failure names. */
|
|
2195
2195
|
const BRIDGE_OUT_METHOD = "RequestTokenBridgeOut";
|
|
2196
2196
|
/**
|
|
2197
|
+
* The contract path whose operation a `RequestTokenBridgeOut` signs: the TOKEN contract's
|
|
2198
|
+
* (`asset-channel_basic-asset_GalaChainToken:RequestTokenBridgeOut`). Verified on stage (2026-11-02): the
|
|
2199
|
+
* chain refuses `...BridgeContract:RequestTokenBridgeOut` ("signed to call ...BridgeContract:RequestTokenBridgeOut,
|
|
2200
|
+
* but the current operation is asset-channel_basic-asset_GalaChainToken:RequestTokenBridgeOut") and accepts this one.
|
|
2201
|
+
* The table's `asset/bridge-contract` entry is right for `BridgeTokenOut` (seen live on stage:
|
|
2202
|
+
* `asset-channel_bridge-chaincode_BridgeContract:BridgeTokenOut`, signed by GalaConnect, not by this SDK), and the grants
|
|
2203
|
+
* embedded in it sign `asset-channel_bridge-chaincode_GalaChainToken:GrantAllowance`, which the table lacks.
|
|
2204
|
+
*/
|
|
2205
|
+
const BRIDGE_OUT_CONTRACT_PATH = "asset/token-contract";
|
|
2206
|
+
/**
|
|
2197
2207
|
* Signs the bridge-out typed data with the app's signer. Whatever the signer throws that is not
|
|
2198
2208
|
* already an SDK error (a declined or locked wallet, a message ethers cannot encode) is
|
|
2199
2209
|
* `SIGNING_FAILED` (`user_rejected` or `failed`, the original as `cause`), and so is a signature
|
|
@@ -2253,7 +2263,7 @@ async function buildBridgeOutPayload(dto, config) {
|
|
|
2253
2263
|
const message = {
|
|
2254
2264
|
destinationChainId,
|
|
2255
2265
|
destinationChainTxFee: sanitizeObject(sanitizedFeeObj),
|
|
2256
|
-
dtoOperation: dtoOperationOf(
|
|
2266
|
+
dtoOperation: dtoOperationOf(BRIDGE_OUT_CONTRACT_PATH, BRIDGE_OUT_METHOD),
|
|
2257
2267
|
quantity: dto.quantity,
|
|
2258
2268
|
recipient: dto.recipient,
|
|
2259
2269
|
tokenInstance: dto.tokenInstance,
|
|
@@ -4743,10 +4753,9 @@ var WrapService = class {
|
|
|
4743
4753
|
},
|
|
4744
4754
|
destinationChainId: routing.destinationChannelId,
|
|
4745
4755
|
recipient,
|
|
4746
|
-
wrap: true,
|
|
4747
4756
|
uniqueKey
|
|
4748
4757
|
};
|
|
4749
|
-
const requestBody = await signPreSend(this.signer,
|
|
4758
|
+
const requestBody = await signPreSend(this.signer, BRIDGE_OUT_CONTRACT_PATH, "RequestTokenBridgeOut", message);
|
|
4750
4759
|
const response = await this.galaConnectClient.requestBridgeOut(requestBody);
|
|
4751
4760
|
assertRequestAccepted("RequestTokenBridgeOut", response, uniqueKey);
|
|
4752
4761
|
return {
|