@pushchain/core 5.1.7 → 5.1.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/package.json +1 -1
- package/src/lib/constants/abi/feeLocker.json +1 -2579
- package/src/lib/constants/abi/universalGatewayV0.json +1 -3009
- package/src/lib/constants/chain.d.ts +3 -0
- package/src/lib/constants/chain.js +54 -1
- package/src/lib/constants/tokens.js +25 -0
- package/src/lib/generated/uexecutor/v1/types.d.ts +0 -6
- package/src/lib/generated/uexecutor/v1/types.js +0 -267
- package/src/lib/generated/uexecutor/v2/index.d.ts +1 -1
- package/src/lib/generated/uexecutor/v2/index.js +1 -9
- package/src/lib/generated/uexecutor/v2/types.d.ts +1 -7
- package/src/lib/generated/uexecutor/v2/types.js +1 -287
- package/src/lib/generated/v1/tx.d.ts +0 -4
- package/src/lib/generated/v1/tx.js +0 -205
- package/src/lib/orchestrator/internals/cascade.js +3 -3
- package/src/lib/orchestrator/internals/route-handlers.js +5 -5
- package/src/lib/orchestrator/orchestrator.types.d.ts +0 -7
- package/src/lib/orchestrator/payload-builders.d.ts +0 -45
- package/src/lib/orchestrator/payload-builders.js +1 -111
- package/src/lib/push-client/push-client.js +12 -11
- package/src/lib/universal/account/account.js +10 -2
- package/src/lib/utils.d.ts +14 -10
- package/src/lib/utils.js +45 -23
- package/src/lib/vm-client/evm-client.d.ts +1 -1
- package/src/lib/vm-client/evm-client.js +2 -1
- package/src/lib/vm-client/vm-client.types.d.ts +2 -1
- package/src/lib/universal-tx-detector/__tests__/fixtures/builders.d.ts +0 -32
- package/src/lib/universal-tx-detector/__tests__/fixtures/builders.js +0 -65
- package/src/lib/universal-tx-detector/__tests__/fixtures/scenarios.d.ts +0 -72
- package/src/lib/universal-tx-detector/__tests__/fixtures/scenarios.js +0 -669
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Parametric scenario catalogue for universal-tx-detector specs.
|
|
3
|
-
*
|
|
4
|
-
* Each ScenarioFixture declares a deterministic tx (receipt + optional
|
|
5
|
-
* mocked cosmos state) plus the assertions every consumer should check.
|
|
6
|
-
*
|
|
7
|
-
* Adding coverage for a new event shape or cascade topology = append one
|
|
8
|
-
* row here. The driver spec (__tests__/scenarios.spec.ts) picks it up
|
|
9
|
-
* automatically via describe.each.
|
|
10
|
-
*/
|
|
11
|
-
import type { TransactionReceipt } from 'viem';
|
|
12
|
-
import { CHAIN } from '../../../constants/enums';
|
|
13
|
-
import type { DecodedIdentifiers, MatchingLog, UniversalTxKind } from '../../types';
|
|
14
|
-
import { deriveChildUniversalTxId, derivePcUniversalTxId } from '../../child-inbounds';
|
|
15
|
-
import { type EventDef } from './builders';
|
|
16
|
-
export type LogSpec = {
|
|
17
|
-
event: EventDef;
|
|
18
|
-
args: Record<string, unknown>;
|
|
19
|
-
address: `0x${string}`;
|
|
20
|
-
logIndex: number;
|
|
21
|
-
};
|
|
22
|
-
export type ReceiptEntry = {
|
|
23
|
-
txHash: `0x${string}`;
|
|
24
|
-
chain: CHAIN;
|
|
25
|
-
to: `0x${string}`;
|
|
26
|
-
logs: LogSpec[];
|
|
27
|
-
};
|
|
28
|
-
export type UtxRecordFixture = {
|
|
29
|
-
/** 32-byte hex id (no 0x prefix) or prefix; matcher lowercases and strips. */
|
|
30
|
-
id: string;
|
|
31
|
-
record: Record<string, unknown> | null;
|
|
32
|
-
};
|
|
33
|
-
export type ExpectedCascade = {
|
|
34
|
-
outboundCount?: number;
|
|
35
|
-
refundCount?: number;
|
|
36
|
-
childInboundCount?: number;
|
|
37
|
-
totalFlatNodes?: number;
|
|
38
|
-
rootKind?: UniversalTxKind;
|
|
39
|
-
/** For each outbound edge, the destinationChain CAIP (order-insensitive). */
|
|
40
|
-
outboundDestinations?: string[];
|
|
41
|
-
};
|
|
42
|
-
export type ScenarioFixture = {
|
|
43
|
-
id: string;
|
|
44
|
-
name: string;
|
|
45
|
-
kind: UniversalTxKind;
|
|
46
|
-
chain: CHAIN;
|
|
47
|
-
txHash: `0x${string}`;
|
|
48
|
-
to: `0x${string}`;
|
|
49
|
-
logs: LogSpec[];
|
|
50
|
-
/** Additional receipts the cascade walker will fetch when recursing. */
|
|
51
|
-
extraReceipts?: ReceiptEntry[];
|
|
52
|
-
/** Cosmos utx records keyed by id (hex without 0x prefix). */
|
|
53
|
-
utxRecords?: UtxRecordFixture[];
|
|
54
|
-
expectedDecoded?: Partial<DecodedIdentifiers>;
|
|
55
|
-
expectedClassifyAll?: UniversalTxKind[];
|
|
56
|
-
expectedCascade?: ExpectedCascade;
|
|
57
|
-
};
|
|
58
|
-
export declare function matchingLogsForFixture(f: ScenarioFixture): MatchingLog[];
|
|
59
|
-
export declare function receiptForFixture(f: ScenarioFixture): TransactionReceipt;
|
|
60
|
-
export declare function receiptForExtra(r: ReceiptEntry): TransactionReceipt;
|
|
61
|
-
/**
|
|
62
|
-
* Flatten all utxRecord entries across a scenario and its linked fixtures
|
|
63
|
-
* into a single Map keyed by the lowercased id (no 0x prefix).
|
|
64
|
-
*/
|
|
65
|
-
export declare function utxRecordMap(fixtures: ScenarioFixture[]): Map<string, Record<string, unknown> | null>;
|
|
66
|
-
/**
|
|
67
|
-
* Build a Map<txHashLower, TransactionReceipt> covering the primary tx +
|
|
68
|
-
* all extraReceipts across every fixture.
|
|
69
|
-
*/
|
|
70
|
-
export declare function receiptMap(fixtures: ScenarioFixture[]): Map<string, TransactionReceipt>;
|
|
71
|
-
export declare const SCENARIOS: ScenarioFixture[];
|
|
72
|
-
export { deriveChildUniversalTxId, derivePcUniversalTxId };
|