@gala-chain/gala-core-sdk 1.1.0-beta.2 → 1.1.0-beta.3

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 CHANGED
@@ -99,9 +99,13 @@ bridge-out request was accepted the tokens may be locked: a later failure is
99
99
  `BRIDGE_OUT_OUTCOME_UNKNOWN` (with the step, the bridge request id and the `uniqueKey`), and a
100
100
  deposit that may have been sent is `BRIDGE_DEPOSIT_OUTCOME_UNKNOWN`; neither is ever retried by the
101
101
  SDK. `WrapService` wraps a token from its own channel to the asset channel (MUSIC to GMUSIC) and
102
- back, signed natively by a `GalaChainSigner`. The bridge-out request signs the bridge contract's
103
- `dtoOperation` (`asset-channel_bridge-chaincode_BridgeContract:RequestTokenBridgeOut`) as a field of its
104
- EIP-712 `GalaTransaction` type, so the signature covers it; `buildBridgeOutPayload` does this.
102
+ back, signed natively by a `GalaChainSigner`. A `RequestTokenBridgeOut` (the bridge-out and the wrap /
103
+ unwrap) signs the TOKEN contract's `dtoOperation`
104
+ (`asset-channel_basic-asset_GalaChainToken:RequestTokenBridgeOut`, not the bridge contract's, which the
105
+ chain refuses; verified on stage, 2026-11-02) as a field of its EIP-712 `GalaTransaction` type, so the
106
+ signature covers it; `buildBridgeOutPayload` does this. The bridge contract's entry in the operation table
107
+ is kept for `BridgeTokenOut`, which stage has not yet been seen to accept or refuse (UNVERIFIED); the SDK
108
+ signs nothing under it.
105
109
 
106
110
  TypeScript: the `./bridge` declarations name `@solana/web3.js` types, whose own declarations import
107
111
  Node's `http` and `https`, so a TypeScript app that imports `./bridge` has `@types/node` (with
@@ -283,7 +287,7 @@ gzipped, before `ethers` and `@solana/*`) are loaded only by an app that imports
283
287
 
284
288
  ## Status
285
289
 
286
- <!-- docs:var version -->1.1.0-beta.2<!-- /docs:var --> (rc.7: `eth|0x<hex>` is refused as `INVALID_ETH_USER_REF_PREFIX`, not an address form; rc.6: `fetchPublicKey`, MetaMask and Trust Wallet detection, silent `restore()`;
290
+ <!-- docs:var version -->1.1.0-beta.3<!-- /docs:var --> (rc.7: `eth|0x<hex>` is refused as `INVALID_ETH_USER_REF_PREFIX`, not an address form; rc.6: `fetchPublicKey`, MetaMask and Trust Wallet detection, silent `restore()`;
287
291
  rc.5: every Ethereum account a read, write or GalaConnect client sends is
288
292
  `eth|<EIP-55>`, the only spelling the gateway accepts, and `galaChainUserRef` is exported; rc.4:
289
293
  `bridgeableTokenService` is required). In: signing, signers, transport and the error model (rc.0, from gswap-sdk); the
package/dist/bridge.cjs CHANGED
@@ -2230,6 +2230,15 @@ function destinationChainIdOf(value) {
2230
2230
  /** The method a bridge-out signing failure names. */
2231
2231
  const BRIDGE_OUT_METHOD = "RequestTokenBridgeOut";
2232
2232
  /**
2233
+ * The contract path whose operation a `RequestTokenBridgeOut` signs: the TOKEN contract's
2234
+ * (`asset-channel_basic-asset_GalaChainToken:RequestTokenBridgeOut`). Verified on stage (2026-11-02): the
2235
+ * chain refuses `...BridgeContract:RequestTokenBridgeOut` ("signed to call ...BridgeContract:RequestTokenBridgeOut,
2236
+ * but the current operation is asset-channel_basic-asset_GalaChainToken:RequestTokenBridgeOut") and accepts this one.
2237
+ * The table's `asset/bridge-contract` entry is kept for `BridgeTokenOut`, which stage has not yet been seen to accept
2238
+ * or refuse: it is UNVERIFIED and nothing here signs it.
2239
+ */
2240
+ const BRIDGE_OUT_CONTRACT_PATH = "asset/token-contract";
2241
+ /**
2233
2242
  * Signs the bridge-out typed data with the app's signer. Whatever the signer throws that is not
2234
2243
  * already an SDK error (a declined or locked wallet, a message ethers cannot encode) is
2235
2244
  * `SIGNING_FAILED` (`user_rejected` or `failed`, the original as `cause`), and so is a signature
@@ -2289,7 +2298,7 @@ async function buildBridgeOutPayload(dto, config) {
2289
2298
  const message = {
2290
2299
  destinationChainId,
2291
2300
  destinationChainTxFee: sanitizeObject(sanitizedFeeObj),
2292
- dtoOperation: (0, _gala_chain_gala_core_sdk.dtoOperationOf)("asset/bridge-contract", BRIDGE_OUT_METHOD),
2301
+ dtoOperation: (0, _gala_chain_gala_core_sdk.dtoOperationOf)(BRIDGE_OUT_CONTRACT_PATH, BRIDGE_OUT_METHOD),
2293
2302
  quantity: dto.quantity,
2294
2303
  recipient: dto.recipient,
2295
2304
  tokenInstance: dto.tokenInstance,
@@ -4782,7 +4791,7 @@ var WrapService = class {
4782
4791
  wrap: true,
4783
4792
  uniqueKey
4784
4793
  };
4785
- const requestBody = await (0, _gala_chain_gala_core_sdk.signPreSend)(this.signer, "asset/bridge-contract", "RequestTokenBridgeOut", message);
4794
+ const requestBody = await (0, _gala_chain_gala_core_sdk.signPreSend)(this.signer, BRIDGE_OUT_CONTRACT_PATH, "RequestTokenBridgeOut", message);
4786
4795
  const response = await this.galaConnectClient.requestBridgeOut(requestBody);
4787
4796
  assertRequestAccepted("RequestTokenBridgeOut", response, uniqueKey);
4788
4797
  return {