@gala-chain/gala-core-sdk 1.1.0-beta.7 → 1.1.0-beta.9
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 +5 -4
- package/dist/bridge.cjs +1 -1
- package/dist/bridge.cjs.map +1 -1
- package/dist/bridge.mjs +2 -2
- 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/index.js +1 -1
- package/dist/browser/utils/dto_operation.js +1 -1
- package/dist/browser/utils/dto_operation.js.map +1 -1
- package/dist/browser/utils/pre_send.js +1 -1
- package/dist/browser/utils/pre_send.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/browser/writes/submit.js +1 -1
- package/dist/browser/writes/submit.js.map +1 -1
- package/dist/index.cjs +47 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -8
- package/dist/index.d.ts +31 -8
- package/dist/index.mjs +47 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ key.fill(0);
|
|
|
40
40
|
|
|
41
41
|
| Area | Exports |
|
|
42
42
|
| --- | --- |
|
|
43
|
-
| Signers | `PrivateKeySigner`, `createLazyPrivateKeySigner`, `GalaWalletSigner`, `BrowserWalletSigner`, `signPreSend`, type `GalaChainSigner` |
|
|
43
|
+
| Signers | `PrivateKeySigner`, `createLazyPrivateKeySigner`, `GalaWalletSigner`, `BrowserWalletSigner`, `signPreSend`, `signPreSendFor`, type `GalaChainSigner` |
|
|
44
44
|
| Signing | `serialize`, `getPayloadToSign`, `signNative`, `signPersonalMessage`, `personalSignPrefixFor`, `fixpointPrefixFor`, `signChainDto*`, `signRawObject`, `generateEIP712Types`, `buildEIP712Payload`, `hashTypedData`, `signTypedDataPayload`; the signed `dtoOperation`: `withDtoOperation`, `dtoOperationOf`, `CHAIN_CONTRACT_OPERATION_PREFIXES`, type `ChainContractPath` |
|
|
45
45
|
| Transport | `fetchRequestor`, `requestWithTimeout` (`kind: { write: false }` makes a read's timeout and transport failure say `write: false`), `buildRequestHeaders`, `buildQueryString`, `readRetryAfter`, `httpRequestorFromAxios`, `eip1193ProviderFromEthers`, `isFetchTransportFailure`, types `HttpRequestor`, `WireOptions`, `RequestKind` |
|
|
46
46
|
| Gateway reads | `GatewayReads` (`fetchBalances`, `fetchTokenBalance`, `fetchNftBalances`, `fetchTokenClasses`, `fetchTokenClassesWithSupply`, `fetchTokenClass`, `fetchTokenDetails`, `fetchTokenClassesPage`, `fetchAllTokenClasses`, `fetchNftCollectionAuthorizationsPage`, `fetchAllNftCollectionAuthorizations`, `fetchPublicKey`), `GATEWAY_READ_METHODS`, `GATEWAY_READ_LIMITS`, types `GalaChainTokenBalance`, `GalaChainTokenBalanceSummary`, `GalaChainTokenClass`, `GalaChainTokenDetails`, `GalaChainPage`, `GalaChainPublicKey` |
|
|
@@ -215,8 +215,9 @@ await writes.lockTokens({ tokens: [{ tokenClassKey: 'GALA|Unit|none|none', quant
|
|
|
215
215
|
signed to call X operation, but the current operation is Y"). The URL of a write and its operation
|
|
216
216
|
come from one table (`CHAIN_CONTRACT_OPERATION_PREFIXES`), so they cannot disagree. For a call the
|
|
217
217
|
SDK does not make, use `withDtoOperation(contractPath, method, dto)` (the contract path is the
|
|
218
|
-
route's `<channel>/<contract>`, such as `asset/token-contract`) or `
|
|
219
|
-
contractPath, method, dto)`, which sets it and signs
|
|
218
|
+
route's `<channel>/<contract>`, such as `asset/token-contract`) or `signPreSendFor(signer,
|
|
219
|
+
contractPath, method, dto)`, which sets it and signs (`signPreSend(signer, method, dto)` keeps its 1.0.0
|
|
220
|
+
signature and signs the DTO as given); a DTO that already names a different
|
|
220
221
|
operation is refused as `SIGNING_FAILED`. Never add it after signing: the signature would not
|
|
221
222
|
cover it. Inside a launchpad bundle the operation is the bundler's `BatchSubmit`
|
|
222
223
|
(`asset-channel_basic-asset_Launchpad:BatchSubmit`), not the inner DTO's own method: launchpad-sdk sets it.
|
|
@@ -302,7 +303,7 @@ gzipped, before `ethers` and `@solana/*`) are loaded only by an app that imports
|
|
|
302
303
|
|
|
303
304
|
## Status
|
|
304
305
|
|
|
305
|
-
<!-- docs:var version -->1.1.0-beta.
|
|
306
|
+
<!-- docs:var version -->1.1.0-beta.9<!-- /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()`;
|
|
306
307
|
rc.5: every Ethereum account a read, write or GalaConnect client sends is
|
|
307
308
|
`eth|<EIP-55>`, the only spelling the gateway accepts, and `galaChainUserRef` is exported; rc.4:
|
|
308
309
|
`bridgeableTokenService` is required). In: signing, signers, transport and the error model (rc.0, from gswap-sdk); the
|
package/dist/bridge.cjs
CHANGED
|
@@ -4841,7 +4841,7 @@ var WrapService = class {
|
|
|
4841
4841
|
recipient,
|
|
4842
4842
|
uniqueKey
|
|
4843
4843
|
};
|
|
4844
|
-
const requestBody = await (0, _gala_chain_gala_core_sdk.
|
|
4844
|
+
const requestBody = await (0, _gala_chain_gala_core_sdk.signPreSendFor)(this.signer, WRAP_TOKEN_CONTRACT_PATHS[routing.sourceChannel], "RequestTokenBridgeOut", message);
|
|
4845
4845
|
const response = await this.galaConnectClient.requestWrapOut(routing.sourceChannel, requestBody);
|
|
4846
4846
|
assertRequestAccepted("RequestTokenBridgeOut", response, uniqueKey);
|
|
4847
4847
|
return {
|