@pushchain/core 6.0.23 → 6.0.25
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/CHANGELOG.md +84 -0
- package/package.json +1 -1
- package/src/lib/constants/abi/index.d.ts +1 -0
- package/src/lib/constants/abi/index.js +4 -1
- package/src/lib/constants/abi/prc20.evm.d.ts +32 -0
- package/src/lib/constants/abi/prc20.evm.js +20 -0
- package/src/lib/constants/abi/uea-factory.d.ts +31 -0
- package/src/lib/constants/abi/uea-factory.js +19 -0
- package/src/lib/constants/abi/universalCallback.evm.d.ts +561 -0
- package/src/lib/constants/abi/universalCallback.evm.js +247 -0
- package/src/lib/constants/abi/universalGatewayV0.json +1 -1
- package/src/lib/constants/abi/universalReadRegistry.evm.d.ts +247 -0
- package/src/lib/constants/abi/universalReadRegistry.evm.js +38 -0
- package/src/lib/constants/chain.d.ts +12 -0
- package/src/lib/constants/chain.js +23 -1
- package/src/lib/constants/enums.d.ts +7 -0
- package/src/lib/constants/enums.js +11 -0
- package/src/lib/constants/index.d.ts +52 -0
- package/src/lib/constants/index.js +37 -8
- package/src/lib/constants/read-state.d.ts +53 -0
- package/src/lib/constants/read-state.js +59 -0
- package/src/lib/generated/ucallback/v1/index.d.ts +2 -0
- package/src/lib/generated/ucallback/v1/index.js +6 -0
- package/src/lib/generated/ucallback/v1/query.d.ts +47 -0
- package/src/lib/generated/ucallback/v1/query.js +131 -0
- package/src/lib/generated/ucallback/v1/types.d.ts +99 -0
- package/src/lib/generated/ucallback/v1/types.js +366 -0
- package/src/lib/generated/uexecutor/v1/query.d.ts +29 -0
- package/src/lib/generated/uexecutor/v1/query.js +98 -1
- package/src/lib/index.d.ts +9 -0
- package/src/lib/index.js +37 -1
- package/src/lib/orchestrator/internals/cascade.js +5 -2
- package/src/lib/orchestrator/internals/errors.d.ts +6 -0
- package/src/lib/orchestrator/internals/errors.js +13 -1
- package/src/lib/orchestrator/internals/index.d.ts +1 -0
- package/src/lib/orchestrator/internals/index.js +6 -1
- package/src/lib/orchestrator/internals/push-chain-tx.js +81 -61
- package/src/lib/orchestrator/internals/read-state.d.ts +24 -0
- package/src/lib/orchestrator/internals/read-state.js +47 -0
- package/src/lib/orchestrator/internals/route-handlers.js +6 -1
- package/src/lib/orchestrator/internals/svm-helpers.js +24 -0
- package/src/lib/orchestrator/orchestrator.d.ts +26 -0
- package/src/lib/orchestrator/orchestrator.js +22 -0
- package/src/lib/orchestrator/orchestrator.types.d.ts +2 -0
- package/src/lib/orchestrator/route-detector.js +4 -0
- package/src/lib/progress-hook/progress-hook.js +271 -0
- package/src/lib/progress-hook/progress-hook.types.d.ts +32 -0
- package/src/lib/progress-hook/progress-hook.types.js +34 -0
- package/src/lib/push-chain/push-chain.d.ts +70 -0
- package/src/lib/push-chain/push-chain.js +27 -0
- package/src/lib/push-client/push-client.d.ts +35 -2
- package/src/lib/push-client/push-client.js +117 -4
- package/src/lib/read-state/budget.d.ts +16 -0
- package/src/lib/read-state/budget.js +32 -0
- package/src/lib/read-state/destination.d.ts +12 -0
- package/src/lib/read-state/destination.js +51 -0
- package/src/lib/read-state/envelopes/evm.d.ts +24 -0
- package/src/lib/read-state/envelopes/evm.js +148 -0
- package/src/lib/read-state/envelopes/index.d.ts +12 -0
- package/src/lib/read-state/envelopes/index.js +45 -0
- package/src/lib/read-state/envelopes/svm.d.ts +32 -0
- package/src/lib/read-state/envelopes/svm.js +107 -0
- package/src/lib/read-state/envelopes/web2.d.ts +29 -0
- package/src/lib/read-state/envelopes/web2.js +149 -0
- package/src/lib/read-state/errors.d.ts +70 -0
- package/src/lib/read-state/errors.js +116 -0
- package/src/lib/read-state/index.d.ts +13 -0
- package/src/lib/read-state/index.js +38 -0
- package/src/lib/read-state/preflight.d.ts +21 -0
- package/src/lib/read-state/preflight.js +70 -0
- package/src/lib/read-state/read-events.d.ts +27 -0
- package/src/lib/read-state/read-events.js +135 -0
- package/src/lib/read-state/read-executor.d.ts +18 -0
- package/src/lib/read-state/read-executor.js +212 -0
- package/src/lib/read-state/read-params.d.ts +205 -0
- package/src/lib/read-state/read-params.js +120 -0
- package/src/lib/read-state/read-state.types.d.ts +417 -0
- package/src/lib/read-state/read-state.types.js +50 -0
- package/src/lib/read-state/read-tracker.d.ts +50 -0
- package/src/lib/read-state/read-tracker.js +415 -0
- package/src/lib/read-state/registry.d.ts +21 -0
- package/src/lib/read-state/registry.js +54 -0
- package/src/lib/read-state/result-decoder.d.ts +16 -0
- package/src/lib/read-state/result-decoder.js +73 -0
- package/src/lib/read-state/spec-builder.d.ts +47 -0
- package/src/lib/read-state/spec-builder.js +251 -0
- package/src/lib/read-state/validate.d.ts +22 -0
- package/src/lib/read-state/validate.js +80 -0
- package/src/lib/universal-tx-detector/child-inbounds.d.ts +3 -1
- package/src/lib/universal-tx-detector/child-inbounds.js +4 -5
- package/src/lib/universal-tx-detector/detector-svm.js +29 -20
- package/src/lib/universal-tx-detector/svm-events.d.ts +17 -5
- package/src/lib/universal-tx-detector/svm-events.js +81 -6
- package/src/lib/vm-client/evm-client.js +27 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,87 @@
|
|
|
1
|
+
@pushchain/core@6.0.25 (2026-09-16)
|
|
2
|
+
|
|
3
|
+
- docs: document read-state and transaction fixes
|
|
4
|
+
- feat: align read-state API with v3 review
|
|
5
|
+
- test: consolidate read-state e2e harnesses
|
|
6
|
+
- feat: integrate universal read registry
|
|
7
|
+
- fix: harden gasless and cross-chain transaction handling
|
|
8
|
+
- feat: align read-state API with v2 spec
|
|
9
|
+
- fix: validate prepared reads and infer typed results
|
|
10
|
+
- fix: preserve read-state recovery and expand test coverage
|
|
11
|
+
- feat: read-state PR7 — custom-receiver read() / executeReads(), review fixes
|
|
12
|
+
- feat: read-state PR6 — live e2e tree, CI `read` group, wait() option fix
|
|
13
|
+
- feat: read-state PR5 — public universal surface, CONSTANTS.READ, exports
|
|
14
|
+
- feat: read-state PR4 — trackRead, wait/refresh, READ-TX progress band
|
|
15
|
+
- feat: prepareRead — validated ReadSpec builder, refundTo default, simulate
|
|
16
|
+
- feat: read-state chain client — ucallback queries, preflight, budget sizing
|
|
17
|
+
- feat: read-state foundation — envelopes, decoders, ucallback codecs, ABIs, constants
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
@pushchain/core (unreleased)
|
|
22
|
+
|
|
23
|
+
Changes merged on 2026-09-16: [#265](https://github.com/pushchain/push-chain-sdk/pull/265), [#266](https://github.com/pushchain/push-chain-sdk/pull/266).
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- Added Universal Read through `client.universal.read()`, `prepareRead()`,
|
|
28
|
+
`executeReads()`, and `trackRead()`. Supports EVM native/token balances, typed
|
|
29
|
+
contract calls and storage slots; Solana native/token balances, including
|
|
30
|
+
Token-2022; and HTTPS JSON extraction through `CHAIN.WEB2`.
|
|
31
|
+
- Integrated the canonical UniversalReadRegistry on Donut. Reads use it by default
|
|
32
|
+
with 500,000 callback gas, configurable up to 1,000,000. Custom application
|
|
33
|
+
receivers use `callback: { target, gasLimit, abi, functionName, args? }`.
|
|
34
|
+
Other networks require an explicitly configured application receiver.
|
|
35
|
+
- Added typed read results, resumable tracking by transaction hash or request ID,
|
|
36
|
+
ordered batch results, and `READ-TX-*` progress events. Read responses report
|
|
37
|
+
callback delivery/failure separately from consensus status, plus protocol fees,
|
|
38
|
+
callback budget, gas burned and observed refunds.
|
|
39
|
+
- Added live read-state E2E coverage for EVM, Solana, Web2, registry storage,
|
|
40
|
+
UEA/CEA execution, batching, callback reverts, expiry and recovery, plus an
|
|
41
|
+
offline compatibility-check command: `node scripts/check-read-state-drift.mjs`.
|
|
42
|
+
|
|
43
|
+
### Improved
|
|
44
|
+
|
|
45
|
+
- Validate read query options and ABI argument/result types, including overloaded
|
|
46
|
+
functions. Revalidate prepared reads against current chain state before sending
|
|
47
|
+
without changing their query, block pin, expiry or payment.
|
|
48
|
+
- Calculate default read polling timeouts from remaining Push blocks plus a
|
|
49
|
+
10-second observation margin, capped at 180 seconds and recalculated on resume.
|
|
50
|
+
Explicit timeouts take precedence; a client timeout does not cancel the request.
|
|
51
|
+
- Preserve mined transaction hashes and any pending transaction hash when a
|
|
52
|
+
sequential batch fails, so callers can recover completed calls and check an
|
|
53
|
+
uncertain broadcast before resubmitting. Read-batch mismatches also retain all
|
|
54
|
+
transaction hashes.
|
|
55
|
+
|
|
56
|
+
### Fixed
|
|
57
|
+
|
|
58
|
+
- Confirm expired-read refunds from Cosmos EndBlock events across execution-attempt
|
|
59
|
+
heights. Missing blocks or unrelated malformed logs no longer hide valid refund
|
|
60
|
+
evidence; unknown refund amounts are not assumed to have been paid.
|
|
61
|
+
- Respect the on-chain gasless transaction gas limit for `MsgExecutePayload`,
|
|
62
|
+
bounded by the SDK's 100-million-gas ceiling, with a cached query and fallback
|
|
63
|
+
when chain parameters are unavailable.
|
|
64
|
+
- Estimate gas for empty-calldata native transfers to contracts and EIP-7702
|
|
65
|
+
delegated accounts instead of assuming 21,000 gas. Explicit gas overrides remain
|
|
66
|
+
supported.
|
|
67
|
+
- Surface reverted Push transaction receipts as execution failures.
|
|
68
|
+
- Decode Solana gateway events from Anchor `emit_cpi!` inner instructions while
|
|
69
|
+
retaining support for older log events. Use the gateway event index consistently
|
|
70
|
+
for transaction detection, PC20 tracking and child inbounds, and update the
|
|
71
|
+
bundled gateway IDL.
|
|
72
|
+
- Resolve the destination SPL mint before calculating Solana account rent for
|
|
73
|
+
outbound transfers and cascades.
|
|
74
|
+
|
|
75
|
+
### Read State notes
|
|
76
|
+
|
|
77
|
+
- `FULFILLED` alone does not prove a usable result: check `raw.status` and
|
|
78
|
+
`callbackDelivered`. Terminal read failures resolve as statuses; validation,
|
|
79
|
+
transaction, RPC and timeout errors can still reject.
|
|
80
|
+
- Registry query-key and storage-lookup helpers are internal. Prepared reads retain
|
|
81
|
+
`queryKey`; direct storage lookups use the exported registry ABI.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
1
85
|
@pushchain/core@6.0.23 (2026-09-01)
|
|
2
86
|
|
|
3
87
|
- docs: changelog entry for the EVM PC20 burn routing fix
|
package/package.json
CHANGED
|
@@ -15,3 +15,4 @@ export { UEA_FACTORY_ABI } from './uea-factory';
|
|
|
15
15
|
export { PC20_FACTORY_EVM, PC20_WRAPPER_EVM, EXTERNAL_GATEWAY_PC20_EVM, VAULT_PC20_FACTORY_EVM, } from './pc20.evm';
|
|
16
16
|
export { WPC_EVM } from './wpc.evm';
|
|
17
17
|
export { UNIV3_SWAP_ROUTER_EVM } from './uniswap-v3-router.evm';
|
|
18
|
+
export { UNIVERSAL_CALLBACK_EVM } from './universalCallback.evm';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UNIV3_SWAP_ROUTER_EVM = exports.WPC_EVM = exports.VAULT_PC20_FACTORY_EVM = exports.EXTERNAL_GATEWAY_PC20_EVM = exports.PC20_WRAPPER_EVM = exports.PC20_FACTORY_EVM = exports.UEA_FACTORY_ABI = exports.UNIVERSAL_CORE_EVM = exports.UNIVERSAL_GATEWAY_PC = exports.CEA_FACTORY_EVM = exports.CEA_EVM = exports.SVM_GATEWAY_IDL = exports.ERC20_EVM = exports.UNIVERSAL_GATEWAY_V1_SEND = exports.UNIVERSAL_GATEWAY_V0 = exports.UEA_SVM = exports.UEA_EVM = exports.FACTORY_V1 = exports.FEE_LOCKER_SVM = exports.FEE_LOCKER_EVM = void 0;
|
|
3
|
+
exports.UNIVERSAL_CALLBACK_EVM = exports.UNIV3_SWAP_ROUTER_EVM = exports.WPC_EVM = exports.VAULT_PC20_FACTORY_EVM = exports.EXTERNAL_GATEWAY_PC20_EVM = exports.PC20_WRAPPER_EVM = exports.PC20_FACTORY_EVM = exports.UEA_FACTORY_ABI = exports.UNIVERSAL_CORE_EVM = exports.UNIVERSAL_GATEWAY_PC = exports.CEA_FACTORY_EVM = exports.CEA_EVM = exports.SVM_GATEWAY_IDL = exports.ERC20_EVM = exports.UNIVERSAL_GATEWAY_V1_SEND = exports.UNIVERSAL_GATEWAY_V0 = exports.UEA_SVM = exports.UEA_EVM = exports.FACTORY_V1 = exports.FEE_LOCKER_SVM = exports.FEE_LOCKER_EVM = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
var feeLocker_evm_1 = require("./feeLocker.evm");
|
|
6
6
|
Object.defineProperty(exports, "FEE_LOCKER_EVM", { enumerable: true, get: function () { return feeLocker_evm_1.FEE_LOCKER_EVM; } });
|
|
@@ -42,4 +42,7 @@ var wpc_evm_1 = require("./wpc.evm");
|
|
|
42
42
|
Object.defineProperty(exports, "WPC_EVM", { enumerable: true, get: function () { return wpc_evm_1.WPC_EVM; } });
|
|
43
43
|
var uniswap_v3_router_evm_1 = require("./uniswap-v3-router.evm");
|
|
44
44
|
Object.defineProperty(exports, "UNIV3_SWAP_ROUTER_EVM", { enumerable: true, get: function () { return uniswap_v3_router_evm_1.UNIV3_SWAP_ROUTER_EVM; } });
|
|
45
|
+
// Read state (cross-chain reads)
|
|
46
|
+
var universalCallback_evm_1 = require("./universalCallback.evm");
|
|
47
|
+
Object.defineProperty(exports, "UNIVERSAL_CALLBACK_EVM", { enumerable: true, get: function () { return universalCallback_evm_1.UNIVERSAL_CALLBACK_EVM; } });
|
|
45
48
|
//# sourceMappingURL=index.js.map
|
|
@@ -430,4 +430,36 @@ export declare const UNIVERSAL_CORE_EVM: readonly [{
|
|
|
430
430
|
readonly type: "error";
|
|
431
431
|
readonly name: "NonDigitCharacter";
|
|
432
432
|
readonly inputs: readonly [];
|
|
433
|
+
}, {
|
|
434
|
+
readonly type: "function";
|
|
435
|
+
readonly name: "chainHeightByChainNamespace";
|
|
436
|
+
readonly inputs: readonly [{
|
|
437
|
+
readonly name: "chainNamespace";
|
|
438
|
+
readonly type: "string";
|
|
439
|
+
readonly internalType: "string";
|
|
440
|
+
}];
|
|
441
|
+
readonly outputs: readonly [{
|
|
442
|
+
readonly name: "";
|
|
443
|
+
readonly type: "uint256";
|
|
444
|
+
readonly internalType: "uint256";
|
|
445
|
+
}];
|
|
446
|
+
readonly stateMutability: "view";
|
|
447
|
+
}, {
|
|
448
|
+
readonly type: "function";
|
|
449
|
+
readonly name: "readBaseFeeByChainNamespace";
|
|
450
|
+
readonly inputs: readonly [{
|
|
451
|
+
readonly name: "chainNamespace";
|
|
452
|
+
readonly type: "string";
|
|
453
|
+
readonly internalType: "string";
|
|
454
|
+
}, {
|
|
455
|
+
readonly name: "chainId";
|
|
456
|
+
readonly type: "string";
|
|
457
|
+
readonly internalType: "string";
|
|
458
|
+
}];
|
|
459
|
+
readonly outputs: readonly [{
|
|
460
|
+
readonly name: "";
|
|
461
|
+
readonly type: "uint256";
|
|
462
|
+
readonly internalType: "uint256";
|
|
463
|
+
}];
|
|
464
|
+
readonly stateMutability: "view";
|
|
433
465
|
}];
|
|
@@ -217,5 +217,25 @@ exports.UNIVERSAL_CORE_EVM = [
|
|
|
217
217
|
{ type: 'error', name: 'TransferFailed', inputs: [] },
|
|
218
218
|
{ type: 'error', name: 'EmptyString', inputs: [] },
|
|
219
219
|
{ type: 'error', name: 'NonDigitCharacter', inputs: [] },
|
|
220
|
+
// ---- read state (verified against UniversalCore @ 0x…C0 on Donut, 2026-09-09) ----
|
|
221
|
+
{
|
|
222
|
+
type: 'function',
|
|
223
|
+
name: 'chainHeightByChainNamespace',
|
|
224
|
+
// NOTE: despite the parameter name, the oracle keys this by the FULL CAIP-2 id
|
|
225
|
+
// ("eip155:11155111"), not the bare namespace. The SDK always passes CAIP-2.
|
|
226
|
+
inputs: [{ name: 'chainNamespace', type: 'string', internalType: 'string' }],
|
|
227
|
+
outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
|
|
228
|
+
stateMutability: 'view',
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
type: 'function',
|
|
232
|
+
name: 'readBaseFeeByChainNamespace',
|
|
233
|
+
inputs: [
|
|
234
|
+
{ name: 'chainNamespace', type: 'string', internalType: 'string' },
|
|
235
|
+
{ name: 'chainId', type: 'string', internalType: 'string' },
|
|
236
|
+
],
|
|
237
|
+
outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }],
|
|
238
|
+
stateMutability: 'view',
|
|
239
|
+
},
|
|
220
240
|
];
|
|
221
241
|
//# sourceMappingURL=prc20.evm.js.map
|
|
@@ -27,4 +27,35 @@ export declare const UEA_FACTORY_ABI: readonly [{
|
|
|
27
27
|
readonly internalType: "address";
|
|
28
28
|
}];
|
|
29
29
|
readonly stateMutability: "view";
|
|
30
|
+
}, {
|
|
31
|
+
readonly type: "function";
|
|
32
|
+
readonly name: "getOriginForUEA";
|
|
33
|
+
readonly inputs: readonly [{
|
|
34
|
+
readonly name: "addr";
|
|
35
|
+
readonly type: "address";
|
|
36
|
+
readonly internalType: "address";
|
|
37
|
+
}];
|
|
38
|
+
readonly outputs: readonly [{
|
|
39
|
+
readonly name: "account";
|
|
40
|
+
readonly type: "tuple";
|
|
41
|
+
readonly internalType: "struct UniversalAccountId";
|
|
42
|
+
readonly components: readonly [{
|
|
43
|
+
readonly name: "chainNamespace";
|
|
44
|
+
readonly type: "string";
|
|
45
|
+
readonly internalType: "string";
|
|
46
|
+
}, {
|
|
47
|
+
readonly name: "chainId";
|
|
48
|
+
readonly type: "string";
|
|
49
|
+
readonly internalType: "string";
|
|
50
|
+
}, {
|
|
51
|
+
readonly name: "owner";
|
|
52
|
+
readonly type: "bytes";
|
|
53
|
+
readonly internalType: "bytes";
|
|
54
|
+
}];
|
|
55
|
+
}, {
|
|
56
|
+
readonly name: "isUEA";
|
|
57
|
+
readonly type: "bool";
|
|
58
|
+
readonly internalType: "bool";
|
|
59
|
+
}];
|
|
60
|
+
readonly stateMutability: "view";
|
|
30
61
|
}];
|
|
@@ -21,5 +21,24 @@ exports.UEA_FACTORY_ABI = [
|
|
|
21
21
|
outputs: [{ name: '', type: 'address', internalType: 'address' }],
|
|
22
22
|
stateMutability: 'view',
|
|
23
23
|
},
|
|
24
|
+
{
|
|
25
|
+
type: 'function',
|
|
26
|
+
name: 'getOriginForUEA',
|
|
27
|
+
inputs: [{ name: 'addr', type: 'address', internalType: 'address' }],
|
|
28
|
+
outputs: [
|
|
29
|
+
{
|
|
30
|
+
name: 'account',
|
|
31
|
+
type: 'tuple',
|
|
32
|
+
internalType: 'struct UniversalAccountId',
|
|
33
|
+
components: [
|
|
34
|
+
{ name: 'chainNamespace', type: 'string', internalType: 'string' },
|
|
35
|
+
{ name: 'chainId', type: 'string', internalType: 'string' },
|
|
36
|
+
{ name: 'owner', type: 'bytes', internalType: 'bytes' },
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
{ name: 'isUEA', type: 'bool', internalType: 'bool' },
|
|
40
|
+
],
|
|
41
|
+
stateMutability: 'view',
|
|
42
|
+
},
|
|
24
43
|
];
|
|
25
44
|
//# sourceMappingURL=uea-factory.js.map
|