@sequence0/sdk 1.1.2 → 2.0.0
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 +1 -1
- package/dist/chains/algorand.d.ts +44 -0
- package/dist/chains/algorand.d.ts.map +1 -0
- package/dist/chains/algorand.js +148 -0
- package/dist/chains/algorand.js.map +1 -0
- package/dist/chains/aptos.d.ts +39 -0
- package/dist/chains/aptos.d.ts.map +1 -0
- package/dist/chains/aptos.js +168 -0
- package/dist/chains/aptos.js.map +1 -0
- package/dist/chains/cardano.d.ts +42 -0
- package/dist/chains/cardano.d.ts.map +1 -0
- package/dist/chains/cardano.js +188 -0
- package/dist/chains/cardano.js.map +1 -0
- package/dist/chains/cosmos.d.ts +42 -0
- package/dist/chains/cosmos.d.ts.map +1 -0
- package/dist/chains/cosmos.js +216 -0
- package/dist/chains/cosmos.js.map +1 -0
- package/dist/chains/dogecoin-litecoin.d.ts +57 -0
- package/dist/chains/dogecoin-litecoin.d.ts.map +1 -0
- package/dist/chains/dogecoin-litecoin.js +521 -0
- package/dist/chains/dogecoin-litecoin.js.map +1 -0
- package/dist/chains/ethereum.d.ts.map +1 -1
- package/dist/chains/ethereum.js +16 -0
- package/dist/chains/ethereum.js.map +1 -1
- package/dist/chains/hedera.d.ts +113 -0
- package/dist/chains/hedera.d.ts.map +1 -0
- package/dist/chains/hedera.js +302 -0
- package/dist/chains/hedera.js.map +1 -0
- package/dist/chains/icp.d.ts +95 -0
- package/dist/chains/icp.d.ts.map +1 -0
- package/dist/chains/icp.js +520 -0
- package/dist/chains/icp.js.map +1 -0
- package/dist/chains/kaspa.d.ts +152 -0
- package/dist/chains/kaspa.d.ts.map +1 -0
- package/dist/chains/kaspa.js +790 -0
- package/dist/chains/kaspa.js.map +1 -0
- package/dist/chains/multiversx.d.ts +143 -0
- package/dist/chains/multiversx.d.ts.map +1 -0
- package/dist/chains/multiversx.js +524 -0
- package/dist/chains/multiversx.js.map +1 -0
- package/dist/chains/near.d.ts +40 -0
- package/dist/chains/near.d.ts.map +1 -0
- package/dist/chains/near.js +170 -0
- package/dist/chains/near.js.map +1 -0
- package/dist/chains/polkadot.d.ts +43 -0
- package/dist/chains/polkadot.d.ts.map +1 -0
- package/dist/chains/polkadot.js +179 -0
- package/dist/chains/polkadot.js.map +1 -0
- package/dist/chains/ripple.d.ts +41 -0
- package/dist/chains/ripple.d.ts.map +1 -0
- package/dist/chains/ripple.js +190 -0
- package/dist/chains/ripple.js.map +1 -0
- package/dist/chains/stellar.d.ts +40 -0
- package/dist/chains/stellar.d.ts.map +1 -0
- package/dist/chains/stellar.js +156 -0
- package/dist/chains/stellar.js.map +1 -0
- package/dist/chains/sui.d.ts +44 -0
- package/dist/chains/sui.d.ts.map +1 -0
- package/dist/chains/sui.js +157 -0
- package/dist/chains/sui.js.map +1 -0
- package/dist/chains/tezos.d.ts +43 -0
- package/dist/chains/tezos.d.ts.map +1 -0
- package/dist/chains/tezos.js +162 -0
- package/dist/chains/tezos.js.map +1 -0
- package/dist/chains/ton.d.ts +40 -0
- package/dist/chains/ton.d.ts.map +1 -0
- package/dist/chains/ton.js +168 -0
- package/dist/chains/ton.js.map +1 -0
- package/dist/chains/tron.d.ts +41 -0
- package/dist/chains/tron.d.ts.map +1 -0
- package/dist/chains/tron.js +124 -0
- package/dist/chains/tron.js.map +1 -0
- package/dist/core/atomic.d.ts +76 -0
- package/dist/core/atomic.d.ts.map +1 -0
- package/dist/core/atomic.js +39 -0
- package/dist/core/atomic.js.map +1 -0
- package/dist/core/client.d.ts +238 -0
- package/dist/core/client.d.ts.map +1 -1
- package/dist/core/client.js +536 -4
- package/dist/core/client.js.map +1 -1
- package/dist/core/delegation.d.ts +184 -0
- package/dist/core/delegation.d.ts.map +1 -0
- package/dist/core/delegation.js +37 -0
- package/dist/core/delegation.js.map +1 -0
- package/dist/core/programmable.d.ts +66 -0
- package/dist/core/programmable.d.ts.map +1 -0
- package/dist/core/programmable.js +36 -0
- package/dist/core/programmable.js.map +1 -0
- package/dist/core/solvency.d.ts +223 -0
- package/dist/core/solvency.d.ts.map +1 -0
- package/dist/core/solvency.js +267 -0
- package/dist/core/solvency.js.map +1 -0
- package/dist/core/types.d.ts +172 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/universal-account.d.ts +438 -0
- package/dist/core/universal-account.d.ts.map +1 -0
- package/dist/core/universal-account.js +597 -0
- package/dist/core/universal-account.js.map +1 -0
- package/dist/core/witness.d.ts +197 -0
- package/dist/core/witness.d.ts.map +1 -0
- package/dist/core/witness.js +298 -0
- package/dist/core/witness.js.map +1 -0
- package/dist/erc4337/types.js +2 -2
- package/dist/index.d.ts +30 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +91 -4
- package/dist/index.js.map +1 -1
- package/dist/settlement/settlement.d.ts +152 -0
- package/dist/settlement/settlement.d.ts.map +1 -0
- package/dist/settlement/settlement.js +172 -0
- package/dist/settlement/settlement.js.map +1 -0
- package/dist/utils/eip712.js +2 -2
- package/dist/utils/fee.d.ts +2 -2
- package/dist/utils/fee.js +2 -2
- package/dist/utils/optional-deps.d.ts +9 -0
- package/dist/utils/optional-deps.d.ts.map +1 -0
- package/dist/utils/optional-deps.js +21 -0
- package/dist/utils/optional-deps.js.map +1 -0
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +6 -1
- package/dist/utils/validation.js.map +1 -1
- package/dist/wallet/wallet.d.ts +52 -0
- package/dist/wallet/wallet.d.ts.map +1 -1
- package/dist/wallet/wallet.js +265 -33
- package/dist/wallet/wallet.js.map +1 -1
- package/package.json +35 -1
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* K6: WITNESS — Decentralized Cryptographic Witness Network
|
|
3
|
+
*
|
|
4
|
+
* Any fact from any chain, witnessed and signed by 16 independent agents.
|
|
5
|
+
* The world's first trustless notary across 81 blockchains.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { WitnessClient } from '@sequence0/sdk';
|
|
10
|
+
*
|
|
11
|
+
* const witness = new WitnessClient({ baseUrl: 'http://agent:8080' });
|
|
12
|
+
*
|
|
13
|
+
* // Request a witness attestation for a Bitcoin transaction
|
|
14
|
+
* const result = await witness.requestWitness({
|
|
15
|
+
* sourceChain: 'bitcoin',
|
|
16
|
+
* txHash: 'abc123...',
|
|
17
|
+
* minConfirmations: 6,
|
|
18
|
+
* });
|
|
19
|
+
*
|
|
20
|
+
* // Use the attestation on Ethereum
|
|
21
|
+
* const attestation = await witness.getAttestation(result.attestationId);
|
|
22
|
+
* // Submit attestation.signature to Ethereum WitnessVerifier contract
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
/**
|
|
26
|
+
* High-level chain type classification for witness attestations.
|
|
27
|
+
*/
|
|
28
|
+
export type ChainType = 'evm' | 'bitcoin' | 'solana' | 'cosmos' | 'other';
|
|
29
|
+
/**
|
|
30
|
+
* The type of on-chain result that was witnessed.
|
|
31
|
+
*/
|
|
32
|
+
export type ResultType = 'transfer' | 'contract_call' | 'state_read' | 'event_emission';
|
|
33
|
+
/**
|
|
34
|
+
* Options for requesting a witness attestation.
|
|
35
|
+
* The agent network will read the specified transaction from the source
|
|
36
|
+
* chain, verify it has the required confirmations, and produce a
|
|
37
|
+
* threshold-signed attestation of the result.
|
|
38
|
+
*/
|
|
39
|
+
export interface WitnessRequestOptions {
|
|
40
|
+
/** Source blockchain where the transaction occurred */
|
|
41
|
+
sourceChain: string;
|
|
42
|
+
/** Transaction hash to witness */
|
|
43
|
+
txHash: string;
|
|
44
|
+
/** Minimum confirmations required before witnessing (default: 1) */
|
|
45
|
+
minConfirmations?: number;
|
|
46
|
+
/** Timeout in milliseconds for the witness request (default: 60000) */
|
|
47
|
+
timeout?: number;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* A completed witness attestation — a threshold-signed proof that
|
|
51
|
+
* a specific transaction occurred on a specific chain with the
|
|
52
|
+
* attested result.
|
|
53
|
+
*/
|
|
54
|
+
export interface WitnessAttestation {
|
|
55
|
+
/** Unique attestation identifier */
|
|
56
|
+
attestationId: string;
|
|
57
|
+
/** Source chain where the transaction was witnessed */
|
|
58
|
+
sourceChain: string;
|
|
59
|
+
/** High-level type of the source chain */
|
|
60
|
+
sourceChainType: ChainType;
|
|
61
|
+
/** Transaction hash that was witnessed */
|
|
62
|
+
txHash: string;
|
|
63
|
+
/** Block number containing the transaction */
|
|
64
|
+
blockNumber: number;
|
|
65
|
+
/** Block hash containing the transaction */
|
|
66
|
+
blockHash: string;
|
|
67
|
+
/** Number of confirmations at the time of witnessing */
|
|
68
|
+
confirmations: number;
|
|
69
|
+
/** Type of result that was witnessed */
|
|
70
|
+
resultType: ResultType;
|
|
71
|
+
/** Hex-encoded hash of the result data */
|
|
72
|
+
resultHash: string;
|
|
73
|
+
/** Hex-encoded raw result data */
|
|
74
|
+
resultData: string;
|
|
75
|
+
/** Unix timestamp of the attestation */
|
|
76
|
+
timestamp: number;
|
|
77
|
+
/** Epoch number in which the attestation was produced */
|
|
78
|
+
epoch: number;
|
|
79
|
+
/** Number of agents that participated in the witness */
|
|
80
|
+
witnessCount: number;
|
|
81
|
+
/** Hex-encoded threshold signature from the witness committee */
|
|
82
|
+
signature: string;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Status of an in-progress witness request.
|
|
86
|
+
*
|
|
87
|
+
* - `pending` — request received, agents are being coordinated
|
|
88
|
+
* - `gathering` — agents are reading the source chain and collecting votes
|
|
89
|
+
* - `attested` — threshold reached, attestation is finalized
|
|
90
|
+
* - `failed` — attestation could not be completed
|
|
91
|
+
* - `expired` — request timed out before threshold was reached
|
|
92
|
+
*/
|
|
93
|
+
export type WitnessStatus = 'pending' | 'gathering' | 'attested' | 'failed' | 'expired';
|
|
94
|
+
/**
|
|
95
|
+
* Response for polling the status of a witness request.
|
|
96
|
+
*/
|
|
97
|
+
export interface WitnessStatusResponse {
|
|
98
|
+
/** The witness request ID */
|
|
99
|
+
requestId: string;
|
|
100
|
+
/** Current status of the witness process */
|
|
101
|
+
status: WitnessStatus;
|
|
102
|
+
/** Number of agent votes received so far (only during 'gathering' status) */
|
|
103
|
+
votesReceived?: number;
|
|
104
|
+
/** Number of agent votes needed for threshold (only during 'gathering' status) */
|
|
105
|
+
votesNeeded?: number;
|
|
106
|
+
/** The completed attestation (only when status is 'attested') */
|
|
107
|
+
attestation?: WitnessAttestation;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Client for the K6 WITNESS decentralized cryptographic witness network.
|
|
111
|
+
*
|
|
112
|
+
* Communicates with witness endpoints on the agent node to request
|
|
113
|
+
* attestations, poll status, and verify signatures locally.
|
|
114
|
+
*/
|
|
115
|
+
export declare class WitnessClient {
|
|
116
|
+
private baseUrl;
|
|
117
|
+
/**
|
|
118
|
+
* Create a new WitnessClient.
|
|
119
|
+
*
|
|
120
|
+
* @param options - Client configuration
|
|
121
|
+
* @param options.baseUrl - Agent node REST API URL (e.g., 'http://agent:8080')
|
|
122
|
+
*/
|
|
123
|
+
constructor(options: {
|
|
124
|
+
baseUrl: string;
|
|
125
|
+
});
|
|
126
|
+
/**
|
|
127
|
+
* Request a witness attestation for a transaction on a source chain.
|
|
128
|
+
*
|
|
129
|
+
* Agents will read the transaction from the source chain, verify
|
|
130
|
+
* it has the required confirmations, and coordinate a threshold
|
|
131
|
+
* signing of the result.
|
|
132
|
+
*
|
|
133
|
+
* @param options - Witness request details
|
|
134
|
+
* @returns The request ID for polling status
|
|
135
|
+
*
|
|
136
|
+
* @throws {Sequence0Error} If the request parameters are invalid
|
|
137
|
+
* @throws {NetworkError} If the agent is unreachable
|
|
138
|
+
*/
|
|
139
|
+
requestWitness(options: WitnessRequestOptions): Promise<{
|
|
140
|
+
requestId: string;
|
|
141
|
+
}>;
|
|
142
|
+
/**
|
|
143
|
+
* Get the current status of a witness request.
|
|
144
|
+
*
|
|
145
|
+
* @param requestId - The witness request ID
|
|
146
|
+
* @returns Current status and, if attested, the attestation
|
|
147
|
+
*
|
|
148
|
+
* @throws {Sequence0Error} If the request ID is invalid
|
|
149
|
+
* @throws {NetworkError} If the agent is unreachable
|
|
150
|
+
*/
|
|
151
|
+
getStatus(requestId: string): Promise<WitnessStatusResponse>;
|
|
152
|
+
/**
|
|
153
|
+
* Get a completed witness attestation by ID.
|
|
154
|
+
*
|
|
155
|
+
* @param attestationId - The attestation ID
|
|
156
|
+
* @returns The attestation, or null if not found
|
|
157
|
+
*
|
|
158
|
+
* @throws {NetworkError} If the agent is unreachable
|
|
159
|
+
*/
|
|
160
|
+
getAttestation(attestationId: string): Promise<WitnessAttestation | null>;
|
|
161
|
+
/**
|
|
162
|
+
* Wait for a witness attestation to complete by polling.
|
|
163
|
+
*
|
|
164
|
+
* Polls the witness status endpoint at 2-second intervals until
|
|
165
|
+
* the attestation is finalized or the timeout is exceeded.
|
|
166
|
+
*
|
|
167
|
+
* @param requestId - The witness request ID to wait for
|
|
168
|
+
* @param timeout - Max time to wait in ms (default: 60000)
|
|
169
|
+
* @returns The completed attestation
|
|
170
|
+
*
|
|
171
|
+
* @throws {TimeoutError} If the attestation is not completed within the timeout
|
|
172
|
+
* @throws {Sequence0Error} If the witness request fails or expires
|
|
173
|
+
* @throws {NetworkError} If the agent is unreachable
|
|
174
|
+
*/
|
|
175
|
+
waitForAttestation(requestId: string, timeout?: number): Promise<WitnessAttestation>;
|
|
176
|
+
/**
|
|
177
|
+
* Verify a witness attestation locally by checking its signature
|
|
178
|
+
* structure and internal consistency.
|
|
179
|
+
*
|
|
180
|
+
* This performs basic structural verification:
|
|
181
|
+
* - Attestation has all required fields
|
|
182
|
+
* - Signature is present and non-empty
|
|
183
|
+
* - Timestamp is reasonable
|
|
184
|
+
* - Witness count meets minimum threshold
|
|
185
|
+
*
|
|
186
|
+
* For full cryptographic verification, submit the attestation to
|
|
187
|
+
* the on-chain WitnessVerifier contract.
|
|
188
|
+
*
|
|
189
|
+
* @param attestation - The attestation to verify
|
|
190
|
+
* @returns True if the attestation passes local verification
|
|
191
|
+
*/
|
|
192
|
+
verifyLocal(attestation: WitnessAttestation): Promise<boolean>;
|
|
193
|
+
private get;
|
|
194
|
+
private post;
|
|
195
|
+
private mapAttestationResponse;
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=witness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"witness.d.ts","sourceRoot":"","sources":["../../src/core/witness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAI1E;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,eAAe,GAAG,YAAY,GAAG,gBAAgB,CAAC;AAIxF;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IAClC,uDAAuD;IACvD,WAAW,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAID;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAC/B,oCAAoC;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,uDAAuD;IACvD,WAAW,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,eAAe,EAAE,SAAS,CAAC;IAC3B,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,SAAS,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,aAAa,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,UAAU,EAAE,UAAU,CAAC;IACvB,0CAA0C;IAC1C,UAAU,EAAE,MAAM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;;;;;;OAeG;IACG,WAAW,CAAC,WAAW,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;YAqDtD,GAAG;YA0BH,IAAI;IA6BlB,OAAO,CAAC,sBAAsB;CAkCjC"}
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* K6: WITNESS — Decentralized Cryptographic Witness Network
|
|
4
|
+
*
|
|
5
|
+
* Any fact from any chain, witnessed and signed by 16 independent agents.
|
|
6
|
+
* The world's first trustless notary across 81 blockchains.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* import { WitnessClient } from '@sequence0/sdk';
|
|
11
|
+
*
|
|
12
|
+
* const witness = new WitnessClient({ baseUrl: 'http://agent:8080' });
|
|
13
|
+
*
|
|
14
|
+
* // Request a witness attestation for a Bitcoin transaction
|
|
15
|
+
* const result = await witness.requestWitness({
|
|
16
|
+
* sourceChain: 'bitcoin',
|
|
17
|
+
* txHash: 'abc123...',
|
|
18
|
+
* minConfirmations: 6,
|
|
19
|
+
* });
|
|
20
|
+
*
|
|
21
|
+
* // Use the attestation on Ethereum
|
|
22
|
+
* const attestation = await witness.getAttestation(result.attestationId);
|
|
23
|
+
* // Submit attestation.signature to Ethereum WitnessVerifier contract
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.WitnessClient = void 0;
|
|
28
|
+
const errors_1 = require("../utils/errors");
|
|
29
|
+
// ── Witness Client ──
|
|
30
|
+
/**
|
|
31
|
+
* Client for the K6 WITNESS decentralized cryptographic witness network.
|
|
32
|
+
*
|
|
33
|
+
* Communicates with witness endpoints on the agent node to request
|
|
34
|
+
* attestations, poll status, and verify signatures locally.
|
|
35
|
+
*/
|
|
36
|
+
class WitnessClient {
|
|
37
|
+
/**
|
|
38
|
+
* Create a new WitnessClient.
|
|
39
|
+
*
|
|
40
|
+
* @param options - Client configuration
|
|
41
|
+
* @param options.baseUrl - Agent node REST API URL (e.g., 'http://agent:8080')
|
|
42
|
+
*/
|
|
43
|
+
constructor(options) {
|
|
44
|
+
this.baseUrl = options.baseUrl.replace(/\/+$/, '');
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Request a witness attestation for a transaction on a source chain.
|
|
48
|
+
*
|
|
49
|
+
* Agents will read the transaction from the source chain, verify
|
|
50
|
+
* it has the required confirmations, and coordinate a threshold
|
|
51
|
+
* signing of the result.
|
|
52
|
+
*
|
|
53
|
+
* @param options - Witness request details
|
|
54
|
+
* @returns The request ID for polling status
|
|
55
|
+
*
|
|
56
|
+
* @throws {Sequence0Error} If the request parameters are invalid
|
|
57
|
+
* @throws {NetworkError} If the agent is unreachable
|
|
58
|
+
*/
|
|
59
|
+
async requestWitness(options) {
|
|
60
|
+
if (!options.sourceChain || typeof options.sourceChain !== 'string') {
|
|
61
|
+
throw new errors_1.Sequence0Error('sourceChain must be a non-empty string');
|
|
62
|
+
}
|
|
63
|
+
if (!options.txHash || typeof options.txHash !== 'string') {
|
|
64
|
+
throw new errors_1.Sequence0Error('txHash must be a non-empty string');
|
|
65
|
+
}
|
|
66
|
+
const response = await this.post('/witness/request', {
|
|
67
|
+
source_chain: options.sourceChain,
|
|
68
|
+
tx_hash: options.txHash,
|
|
69
|
+
min_confirmations: options.minConfirmations ?? 1,
|
|
70
|
+
timeout: options.timeout,
|
|
71
|
+
});
|
|
72
|
+
if (!response || typeof response.request_id !== 'string') {
|
|
73
|
+
throw new errors_1.Sequence0Error('Invalid response from /witness/request: missing request_id');
|
|
74
|
+
}
|
|
75
|
+
return { requestId: response.request_id };
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Get the current status of a witness request.
|
|
79
|
+
*
|
|
80
|
+
* @param requestId - The witness request ID
|
|
81
|
+
* @returns Current status and, if attested, the attestation
|
|
82
|
+
*
|
|
83
|
+
* @throws {Sequence0Error} If the request ID is invalid
|
|
84
|
+
* @throws {NetworkError} If the agent is unreachable
|
|
85
|
+
*/
|
|
86
|
+
async getStatus(requestId) {
|
|
87
|
+
if (!requestId || typeof requestId !== 'string') {
|
|
88
|
+
throw new errors_1.Sequence0Error('requestId must be a non-empty string');
|
|
89
|
+
}
|
|
90
|
+
const response = await this.get(`/witness/status/${requestId}`);
|
|
91
|
+
const validStatuses = ['pending', 'gathering', 'attested', 'failed', 'expired'];
|
|
92
|
+
const status = validStatuses.includes(response.status)
|
|
93
|
+
? response.status
|
|
94
|
+
: 'pending';
|
|
95
|
+
return {
|
|
96
|
+
requestId: response.request_id,
|
|
97
|
+
status,
|
|
98
|
+
votesReceived: response.votes_received,
|
|
99
|
+
votesNeeded: response.votes_needed,
|
|
100
|
+
attestation: response.attestation
|
|
101
|
+
? this.mapAttestationResponse(response.attestation)
|
|
102
|
+
: undefined,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Get a completed witness attestation by ID.
|
|
107
|
+
*
|
|
108
|
+
* @param attestationId - The attestation ID
|
|
109
|
+
* @returns The attestation, or null if not found
|
|
110
|
+
*
|
|
111
|
+
* @throws {NetworkError} If the agent is unreachable
|
|
112
|
+
*/
|
|
113
|
+
async getAttestation(attestationId) {
|
|
114
|
+
if (!attestationId || typeof attestationId !== 'string') {
|
|
115
|
+
throw new errors_1.Sequence0Error('attestationId must be a non-empty string');
|
|
116
|
+
}
|
|
117
|
+
try {
|
|
118
|
+
const response = await this.get(`/witness/attestation/${attestationId}`);
|
|
119
|
+
if (!response || !response.attestation_id) {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
return this.mapAttestationResponse(response);
|
|
123
|
+
}
|
|
124
|
+
catch (err) {
|
|
125
|
+
// 404 means the attestation does not exist
|
|
126
|
+
if (err instanceof errors_1.NetworkError && err.statusCode === 404) {
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
throw err;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Wait for a witness attestation to complete by polling.
|
|
134
|
+
*
|
|
135
|
+
* Polls the witness status endpoint at 2-second intervals until
|
|
136
|
+
* the attestation is finalized or the timeout is exceeded.
|
|
137
|
+
*
|
|
138
|
+
* @param requestId - The witness request ID to wait for
|
|
139
|
+
* @param timeout - Max time to wait in ms (default: 60000)
|
|
140
|
+
* @returns The completed attestation
|
|
141
|
+
*
|
|
142
|
+
* @throws {TimeoutError} If the attestation is not completed within the timeout
|
|
143
|
+
* @throws {Sequence0Error} If the witness request fails or expires
|
|
144
|
+
* @throws {NetworkError} If the agent is unreachable
|
|
145
|
+
*/
|
|
146
|
+
async waitForAttestation(requestId, timeout) {
|
|
147
|
+
if (!requestId || typeof requestId !== 'string') {
|
|
148
|
+
throw new errors_1.Sequence0Error('requestId must be a non-empty string');
|
|
149
|
+
}
|
|
150
|
+
const maxWait = timeout ?? 60000;
|
|
151
|
+
const pollInterval = 2000;
|
|
152
|
+
const startTime = Date.now();
|
|
153
|
+
while (Date.now() - startTime < maxWait) {
|
|
154
|
+
const statusResponse = await this.getStatus(requestId);
|
|
155
|
+
if (statusResponse.status === 'attested' && statusResponse.attestation) {
|
|
156
|
+
return statusResponse.attestation;
|
|
157
|
+
}
|
|
158
|
+
if (statusResponse.status === 'failed') {
|
|
159
|
+
throw new errors_1.Sequence0Error(`Witness request ${requestId} failed`);
|
|
160
|
+
}
|
|
161
|
+
if (statusResponse.status === 'expired') {
|
|
162
|
+
throw new errors_1.Sequence0Error(`Witness request ${requestId} expired before reaching threshold`);
|
|
163
|
+
}
|
|
164
|
+
// Wait before polling again
|
|
165
|
+
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
166
|
+
}
|
|
167
|
+
throw new errors_1.TimeoutError(`Witness attestation for request ${requestId} did not complete within ${maxWait}ms`);
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Verify a witness attestation locally by checking its signature
|
|
171
|
+
* structure and internal consistency.
|
|
172
|
+
*
|
|
173
|
+
* This performs basic structural verification:
|
|
174
|
+
* - Attestation has all required fields
|
|
175
|
+
* - Signature is present and non-empty
|
|
176
|
+
* - Timestamp is reasonable
|
|
177
|
+
* - Witness count meets minimum threshold
|
|
178
|
+
*
|
|
179
|
+
* For full cryptographic verification, submit the attestation to
|
|
180
|
+
* the on-chain WitnessVerifier contract.
|
|
181
|
+
*
|
|
182
|
+
* @param attestation - The attestation to verify
|
|
183
|
+
* @returns True if the attestation passes local verification
|
|
184
|
+
*/
|
|
185
|
+
async verifyLocal(attestation) {
|
|
186
|
+
if (!attestation) {
|
|
187
|
+
return false;
|
|
188
|
+
}
|
|
189
|
+
// Check required fields are present and well-formed
|
|
190
|
+
if (!attestation.attestationId || typeof attestation.attestationId !== 'string') {
|
|
191
|
+
return false;
|
|
192
|
+
}
|
|
193
|
+
if (!attestation.sourceChain || typeof attestation.sourceChain !== 'string') {
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
if (!attestation.txHash || typeof attestation.txHash !== 'string') {
|
|
197
|
+
return false;
|
|
198
|
+
}
|
|
199
|
+
if (!attestation.signature || typeof attestation.signature !== 'string') {
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
if (!attestation.resultHash || typeof attestation.resultHash !== 'string') {
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
// Verify witness count meets minimum threshold (at least 1 witness)
|
|
206
|
+
if (typeof attestation.witnessCount !== 'number' || attestation.witnessCount < 1) {
|
|
207
|
+
return false;
|
|
208
|
+
}
|
|
209
|
+
// Verify timestamp is reasonable (not in the far future, not before 2024)
|
|
210
|
+
const now = Math.floor(Date.now() / 1000);
|
|
211
|
+
const minTimestamp = 1704067200; // 2024-01-01 00:00:00 UTC
|
|
212
|
+
if (typeof attestation.timestamp !== 'number' ||
|
|
213
|
+
attestation.timestamp < minTimestamp ||
|
|
214
|
+
attestation.timestamp > now + 300 // 5 minute future tolerance
|
|
215
|
+
) {
|
|
216
|
+
return false;
|
|
217
|
+
}
|
|
218
|
+
// Verify block number is positive
|
|
219
|
+
if (typeof attestation.blockNumber !== 'number' || attestation.blockNumber < 0) {
|
|
220
|
+
return false;
|
|
221
|
+
}
|
|
222
|
+
// Verify confirmations is non-negative
|
|
223
|
+
if (typeof attestation.confirmations !== 'number' || attestation.confirmations < 0) {
|
|
224
|
+
return false;
|
|
225
|
+
}
|
|
226
|
+
return true;
|
|
227
|
+
}
|
|
228
|
+
// ── Internal HTTP helpers ──
|
|
229
|
+
async get(path) {
|
|
230
|
+
const url = `${this.baseUrl}${path}`;
|
|
231
|
+
let res;
|
|
232
|
+
try {
|
|
233
|
+
res = await fetch(url, {
|
|
234
|
+
method: 'GET',
|
|
235
|
+
headers: { 'Content-Type': 'application/json' },
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
catch (err) {
|
|
239
|
+
throw new errors_1.NetworkError(`Failed to reach agent at ${url}: ${err.message}`);
|
|
240
|
+
}
|
|
241
|
+
if (!res.ok) {
|
|
242
|
+
const body = await res.text().catch(() => '');
|
|
243
|
+
throw new errors_1.NetworkError(`GET ${path} failed with status ${res.status}: ${body}`, res.status);
|
|
244
|
+
}
|
|
245
|
+
return res.json();
|
|
246
|
+
}
|
|
247
|
+
async post(path, body) {
|
|
248
|
+
const url = `${this.baseUrl}${path}`;
|
|
249
|
+
let res;
|
|
250
|
+
try {
|
|
251
|
+
res = await fetch(url, {
|
|
252
|
+
method: 'POST',
|
|
253
|
+
headers: { 'Content-Type': 'application/json' },
|
|
254
|
+
body: JSON.stringify(body),
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
catch (err) {
|
|
258
|
+
throw new errors_1.NetworkError(`Failed to reach agent at ${url}: ${err.message}`);
|
|
259
|
+
}
|
|
260
|
+
if (!res.ok) {
|
|
261
|
+
const errBody = await res.text().catch(() => '');
|
|
262
|
+
throw new errors_1.NetworkError(`POST ${path} failed with status ${res.status}: ${errBody}`, res.status);
|
|
263
|
+
}
|
|
264
|
+
return res.json();
|
|
265
|
+
}
|
|
266
|
+
// ── Response Mapper ──
|
|
267
|
+
mapAttestationResponse(response) {
|
|
268
|
+
if (!response || typeof response.attestation_id !== 'string') {
|
|
269
|
+
throw new errors_1.Sequence0Error('Invalid witness attestation response: missing attestation_id');
|
|
270
|
+
}
|
|
271
|
+
const validChainTypes = ['evm', 'bitcoin', 'solana', 'cosmos', 'other'];
|
|
272
|
+
const sourceChainType = validChainTypes.includes(response.source_chain_type)
|
|
273
|
+
? response.source_chain_type
|
|
274
|
+
: 'other';
|
|
275
|
+
const validResultTypes = ['transfer', 'contract_call', 'state_read', 'event_emission'];
|
|
276
|
+
const resultType = validResultTypes.includes(response.result_type)
|
|
277
|
+
? response.result_type
|
|
278
|
+
: 'transfer';
|
|
279
|
+
return {
|
|
280
|
+
attestationId: response.attestation_id,
|
|
281
|
+
sourceChain: response.source_chain,
|
|
282
|
+
sourceChainType,
|
|
283
|
+
txHash: response.tx_hash,
|
|
284
|
+
blockNumber: response.block_number,
|
|
285
|
+
blockHash: response.block_hash,
|
|
286
|
+
confirmations: response.confirmations,
|
|
287
|
+
resultType,
|
|
288
|
+
resultHash: response.result_hash,
|
|
289
|
+
resultData: response.result_data,
|
|
290
|
+
timestamp: response.timestamp,
|
|
291
|
+
epoch: response.epoch,
|
|
292
|
+
witnessCount: response.witness_count,
|
|
293
|
+
signature: response.signature,
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
exports.WitnessClient = WitnessClient;
|
|
298
|
+
//# sourceMappingURL=witness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"witness.js","sourceRoot":"","sources":["../../src/core/witness.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;;;AAEH,4CAA6E;AAsG7E,uBAAuB;AAEvB;;;;;GAKG;AACH,MAAa,aAAa;IAGtB;;;;;OAKG;IACH,YAAY,OAA4B;QACpC,IAAI,C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AAC,CAAE,QAAQ,CAAC,WAA0B;YACtC,CAAC,CAAC,UAAU,CAAC;QAEjB,OAAO;YACH,aAAa,EAAE,QAAQ,CAAC,cAAc;YACtC,WAAW,EAAE,QAAQ,CAAC,YAAY;YAClC,eAAe;YACf,MAAM,EAAE,QAAQ,CAAC,OAAO;YACxB,WAAW,EAAE,QAAQ,CAAC,YAAY;YAClC,SAAS,EAAE,QAAQ,CAAC,UAAU;YAC9B,aAAa,EAAE,QAAQ,CAAC,aAAa;YACrC,UAAU;YACV,UAAU,EAAE,QAAQ,CAAC,WAAW;YAChC,UAAU,EAAE,QAAQ,CAAC,WAAW;YAChC,SAAS,EAAE,QAAQ,CAAC,SAAS;YAC7B,KAAK,EAAE,QAAQ,CAAC,KAAK;YACrB,YAAY,EAAE,QAAQ,CAAC,aAAa;YACpC,SAAS,EAAE,QAAQ,CAAC,SAAS;SAChC,CAAC;IACN,CAAC;CACJ;AA3UD,sCA2UC"}
|
package/dist/erc4337/types.js
CHANGED
|
@@ -18,8 +18,8 @@ exports.ENTRYPOINT_V07_ADDRESS = '0x0000000071727De22E5E9d8BAf0edAc6f37da032';
|
|
|
18
18
|
* These are the factory contracts that deploy Sequence0 AA wallets.
|
|
19
19
|
*/
|
|
20
20
|
exports.FACTORY_ADDRESSES = {
|
|
21
|
-
mainnet: '
|
|
22
|
-
testnet: '
|
|
21
|
+
mainnet: '0x05b4df6ab0684bcc82a4a92677e4b46007638604',
|
|
22
|
+
testnet: '0x0fdb2d2147b80fd2e9ad4b8d1a70b68c1353afe3',
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
25
25
|
* Default bundler URLs per chain.
|
package/dist/index.d.ts
CHANGED
|
@@ -39,14 +39,42 @@
|
|
|
39
39
|
export { Sequence0 } from './core/client';
|
|
40
40
|
export { Wallet } from './wallet/wallet';
|
|
41
41
|
export type { WalletConfig } from './wallet/wallet';
|
|
42
|
-
export type { Chain, NetworkConfig, OwnerSigner, Threshold, CreateWalletOptions, SignOptions, SignedTransaction, EvmTransaction, BtcTransaction, SolTransaction, ChainAdapter, HealthResponse, StatusResponse, WalletDetail, WalletsResponse, DkgResponse, SignResponse, SignResultResponse, AgentInfo, } from './core/types';
|
|
42
|
+
export type { Chain, NetworkConfig, OwnerSigner, Threshold, CreateWalletOptions, SignOptions, SignedTransaction, EvmTransaction, BtcTransaction, SolTransaction, CosmosTransaction, TronTransaction, RippleTransaction, NearTransaction, SuiTransaction, AptosTransaction, StellarTransaction, TonTransaction, AlgorandTransaction, TezosTransaction, CardanoTransaction, PolkadotTransaction, DogeTransaction, LtcTransaction, ChainAdapter, HealthResponse, StatusResponse, WalletDetail, WalletsResponse, DkgResponse, SignResponse, SignResultResponse, AgentInfo, } from './core/types';
|
|
43
43
|
export { EthereumAdapter, createEthereumAdapter, createPolygonAdapter, createArbitrumAdapter, createBaseAdapter } from './chains/ethereum';
|
|
44
44
|
export { BitcoinAdapter, createBitcoinAdapter } from './chains/bitcoin';
|
|
45
45
|
export { SolanaAdapter, createSolanaAdapter, createSolanaDevnetAdapter } from './chains/solana';
|
|
46
|
+
export { CosmosAdapter, createCosmosAdapter, createOsmosisAdapter } from './chains/cosmos';
|
|
47
|
+
export { TronAdapter, createTronAdapter, createTronShastaAdapter } from './chains/tron';
|
|
48
|
+
export { RippleAdapter, createRippleAdapter, createRippleTestnetAdapter } from './chains/ripple';
|
|
49
|
+
export { NearAdapter, createNearAdapter, createNearTestnetAdapter } from './chains/near';
|
|
50
|
+
export { SuiAdapter, createSuiAdapter, createSuiTestnetAdapter } from './chains/sui';
|
|
51
|
+
export { AptosAdapter, createAptosAdapter, createAptosTestnetAdapter } from './chains/aptos';
|
|
52
|
+
export { StellarAdapter, createStellarAdapter, createStellarTestnetAdapter } from './chains/stellar';
|
|
53
|
+
export { TonAdapter, createTonAdapter, createTonTestnetAdapter } from './chains/ton';
|
|
54
|
+
export { AlgorandAdapter, createAlgorandAdapter, createAlgorandTestnetAdapter } from './chains/algorand';
|
|
55
|
+
export { TezosAdapter, createTezosAdapter, createTezosGhostnetAdapter } from './chains/tezos';
|
|
56
|
+
export { CardanoAdapter, createCardanoAdapter, createCardanoPreprodAdapter } from './chains/cardano';
|
|
57
|
+
export { PolkadotAdapter, createPolkadotAdapter, createKusamaAdapter, createPolkadotWestendAdapter } from './chains/polkadot';
|
|
58
|
+
export { DogecoinLitecoinAdapter, createDogecoinAdapter, createLitecoinAdapter, createBitcoinCashAdapter, createBitcoinSVAdapter } from './chains/dogecoin-litecoin';
|
|
59
|
+
export { MultiversXAdapter, createMultiversXAdapter, createMultiversXDevnetAdapter } from './chains/multiversx';
|
|
60
|
+
export { KaspaAdapter, createKaspaAdapter, createKaspaTestnetAdapter } from './chains/kaspa';
|
|
61
|
+
export { HederaAdapter, createHederaAdapter, createHederaTestnetAdapter } from './chains/hedera';
|
|
62
|
+
export { IcpAdapter, createIcpAdapter } from './chains/icp';
|
|
46
63
|
export { BitcoinTaprootAdapter, createBitcoinTaprootAdapter, createBitcoinTestnetTaprootAdapter, } from './chains/bitcoin-taproot';
|
|
47
64
|
export type { BitcoinNetwork, BitcoinTaprootOptions, TaprootUtxo, TaprootAddressInfo, UnsignedTaprootTx, SignedTaprootTx, TaprootTxInput, TaprootTxOutput, FeeRateEstimate, } from './chains/bitcoin-taproot';
|
|
48
65
|
export { Sequence0Account, ENTRYPOINT_V07_ADDRESS, FACTORY_ADDRESSES, DEFAULT_BUNDLER_URLS, AA_CHAIN_IDS, } from './erc4337';
|
|
49
66
|
export type { PackedUserOperation, UserOperationParams, AccountTransaction, Sequence0AccountOptions, UserOperationGasEstimate, UserOperationReceipt, } from './erc4337';
|
|
67
|
+
export type { ProgramDeployOptions, ProgramInfo, WalletProgramsResponse } from './core/programmable';
|
|
68
|
+
export type { AtomicOperation, AtomicSignOptions, AtomicSignResult, AtomicOperationResult } from './core/atomic';
|
|
69
|
+
export { SettlementClient } from './settlement/settlement';
|
|
70
|
+
export type { SettlementIntent, SettlementCycle, NetPosition, SettlementResult } from './settlement/settlement';
|
|
71
|
+
export type { DelegateOptions, SubDelegateOptions, DelegationGrant, DelegationTree, AuthorityStatus, DelegationConstraints, DeadMansSwitchConfig } from './core/delegation';
|
|
72
|
+
export { SolvencyClient } from './core/solvency';
|
|
73
|
+
export type { RegisterExchangeOptions, ExchangeInfo, AttestationRequest, BalanceProof, SolvencyAttestation, AttestationStatus, AttestationStatusResponse } from './core/solvency';
|
|
74
|
+
export { WitnessClient } from './core/witness';
|
|
75
|
+
export type { ChainType as WitnessChainType, ResultType as WitnessResultType, WitnessRequestOptions, WitnessAttestation, WitnessStatus, WitnessStatusResponse } from './core/witness';
|
|
76
|
+
export { UniversalAccountClient } from './core/universal-account';
|
|
77
|
+
export type { UniversalAccountInfo, ChainAddressInfo, ChainBalance, TokenBalance, UnifiedBalance, UniversalSendOptions, RoutingDecision, SendResult, CreateUniversalAccountOptions, UniversalAccountStats, SendStatus } from './core/universal-account';
|
|
50
78
|
export { HttpClient, CircuitBreaker, CircuitBreakerError } from './utils/http';
|
|
51
79
|
export type { HttpOptions, CircuitBreakerOptions, CircuitState } from './utils/http';
|
|
52
80
|
export { WsClient } from './utils/websocket';
|
|
@@ -62,5 +90,5 @@ export { DebugLogger, NullLogger, maskAddress, maskSensitive } from './utils/log
|
|
|
62
90
|
export type { Logger } from './utils/logger';
|
|
63
91
|
export { validateDkgResponse, validateSignResponse, validateSignResultResponse, validateHealthResponse, validateStatusResponse, validateWalletsResponse, validateRefreshResponse, validateWalletId, validateChain, validateAddress, validateAmount, validateStringAmount, validateHexMessage, validateThreshold, } from './utils/validation';
|
|
64
92
|
export { Sequence0Error, NetworkError, DkgError, SigningError, TimeoutError, ChainError, InvalidResponseError, ValidationError, } from './utils/errors';
|
|
65
|
-
export declare const VERSION = "
|
|
93
|
+
export declare const VERSION = "2.0.0";
|
|
66
94
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRo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