@sequence0/sdk 1.0.0 → 1.0.2
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 +36 -6
- package/dist/chains/bitcoin.d.ts +15 -3
- package/dist/chains/bitcoin.d.ts.map +1 -1
- package/dist/chains/bitcoin.js +23 -3
- package/dist/chains/bitcoin.js.map +1 -1
- package/dist/chains/ethereum.d.ts +3 -0
- package/dist/chains/ethereum.d.ts.map +1 -1
- package/dist/chains/ethereum.js +108 -16
- package/dist/chains/ethereum.js.map +1 -1
- package/dist/core/client.d.ts +129 -5
- package/dist/core/client.d.ts.map +1 -1
- package/dist/core/client.js +497 -44
- package/dist/core/client.js.map +1 -1
- package/dist/core/types.d.ts +46 -3
- package/dist/core/types.d.ts.map +1 -1
- package/dist/index.d.ts +11 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/discovery.d.ts +28 -1
- package/dist/utils/discovery.d.ts.map +1 -1
- package/dist/utils/discovery.js +76 -10
- package/dist/utils/discovery.js.map +1 -1
- package/dist/utils/errors.d.ts +26 -0
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +32 -1
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/fee.d.ts +107 -0
- package/dist/utils/fee.d.ts.map +1 -0
- package/dist/utils/fee.js +220 -0
- package/dist/utils/fee.js.map +1 -0
- package/dist/utils/http.d.ts +97 -1
- package/dist/utils/http.d.ts.map +1 -1
- package/dist/utils/http.js +238 -6
- package/dist/utils/http.js.map +1 -1
- package/dist/utils/logger.d.ts +43 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +129 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/rate-limiter.d.ts +43 -0
- package/dist/utils/rate-limiter.d.ts.map +1 -0
- package/dist/utils/rate-limiter.js +99 -0
- package/dist/utils/rate-limiter.js.map +1 -0
- package/dist/utils/validation.d.ts +74 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +380 -0
- package/dist/utils/validation.js.map +1 -0
- package/dist/wallet/wallet.d.ts +12 -1
- package/dist/wallet/wallet.d.ts.map +1 -1
- package/dist/wallet/wallet.js +76 -11
- package/dist/wallet/wallet.js.map +1 -1
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# @sequence0/sdk
|
|
2
2
|
|
|
3
3
|
> **Decentralized threshold signatures for any blockchain.**
|
|
4
|
-
> Create wallets, sign transactions, and broadcast to
|
|
4
|
+
> Create wallets, sign transactions, and broadcast to 67 chains — no private keys required.
|
|
5
5
|
|
|
6
6
|
## Install
|
|
7
7
|
|
|
@@ -20,7 +20,7 @@ const s0 = new Sequence0({ network: 'mainnet' });
|
|
|
20
20
|
// 2. Create a threshold wallet (DKG ceremony with 24 agents)
|
|
21
21
|
const wallet = await s0.createWallet({ chain: 'ethereum' });
|
|
22
22
|
console.log('Address:', wallet.address);
|
|
23
|
-
console.log('Threshold:', wallet.threshold); // { t:
|
|
23
|
+
console.log('Threshold:', wallet.threshold); // { t: 16, n: 24 }
|
|
24
24
|
|
|
25
25
|
// 3. Sign and send a transaction
|
|
26
26
|
const txHash = await wallet.sendTransaction({
|
|
@@ -34,7 +34,7 @@ console.log('TX Hash:', txHash);
|
|
|
34
34
|
|
|
35
35
|
| Feature | Description |
|
|
36
36
|
|---------|-------------|
|
|
37
|
-
| **Multi-Chain** | Ethereum, Bitcoin, Solana, Polygon, Arbitrum, Base, and
|
|
37
|
+
| **Multi-Chain** | Ethereum, Bitcoin, Solana, Polygon, Arbitrum, Base, and 60+ more (67 total) |
|
|
38
38
|
| **Threshold Signing** | FROST (t-of-n) — no single point of failure |
|
|
39
39
|
| **No Private Keys** | Keys are sharded across the agent network |
|
|
40
40
|
| **Real-Time Events** | WebSocket subscriptions for signing progress |
|
|
@@ -48,6 +48,8 @@ Ethereum, Polygon, Arbitrum, Optimism, Base, BSC, Avalanche
|
|
|
48
48
|
### Non-EVM
|
|
49
49
|
Bitcoin (Schnorr/Taproot), Solana (Ed25519)
|
|
50
50
|
|
|
51
|
+
> **Note:** Bitcoin, Dogecoin, and Litecoin support wallet creation and raw message signing via `sign()`. However, `sendTransaction()` is not yet supported for UTXO chains — full transaction serialization requires `bitcoinjs-lib`. Use `sign()` to get the Schnorr signature and construct the raw transaction externally.
|
|
52
|
+
|
|
51
53
|
## API Reference
|
|
52
54
|
|
|
53
55
|
### `Sequence0` — Main Client
|
|
@@ -56,11 +58,39 @@ Bitcoin (Schnorr/Taproot), Solana (Ed25519)
|
|
|
56
58
|
const s0 = new Sequence0({
|
|
57
59
|
network: 'mainnet', // 'mainnet' | 'testnet'
|
|
58
60
|
agentUrl: '...', // Agent node URL (optional)
|
|
59
|
-
apiKey: '...', // API key (optional)
|
|
60
61
|
timeout: 30000, // Request timeout (optional)
|
|
61
62
|
});
|
|
62
63
|
```
|
|
63
64
|
|
|
65
|
+
### Ownership Verification
|
|
66
|
+
|
|
67
|
+
Every `/sign` request requires an ownership proof. Configure an `ownerSigner` or `ownerPrivateKey` when creating the SDK instance:
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
// Option 1: Private key (SDK derives signer automatically)
|
|
71
|
+
const s0 = new Sequence0({
|
|
72
|
+
network: 'mainnet',
|
|
73
|
+
ownerPrivateKey: '0xYourPrivateKey...',
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
// Option 2: Custom signer function
|
|
77
|
+
const s0 = new Sequence0({
|
|
78
|
+
network: 'mainnet',
|
|
79
|
+
ownerSigner: async (digest: Uint8Array) => {
|
|
80
|
+
// Sign the 32-byte digest and return 65-byte hex signature
|
|
81
|
+
return myWallet.signDigest(digest);
|
|
82
|
+
},
|
|
83
|
+
});
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
When creating a wallet, pass the `creator` address to record ownership on-chain:
|
|
87
|
+
```typescript
|
|
88
|
+
const wallet = await s0.createWallet({
|
|
89
|
+
chain: 'ethereum',
|
|
90
|
+
creator: '0xYourAddress...',
|
|
91
|
+
});
|
|
92
|
+
```
|
|
93
|
+
|
|
64
94
|
#### Methods
|
|
65
95
|
|
|
66
96
|
| Method | Returns | Description |
|
|
@@ -80,7 +110,7 @@ const s0 = new Sequence0({
|
|
|
80
110
|
```typescript
|
|
81
111
|
const wallet = await s0.createWallet({
|
|
82
112
|
chain: 'ethereum',
|
|
83
|
-
threshold: { t:
|
|
113
|
+
threshold: { t: 16, n: 24 }, // optional, default shown
|
|
84
114
|
curve: 'secp256k1', // auto-detected from chain
|
|
85
115
|
});
|
|
86
116
|
```
|
|
@@ -174,7 +204,7 @@ Full REST API reference: [sequence0.network/docs](https://sequence0.network/docs
|
|
|
174
204
|
|
|
175
205
|
## Economics
|
|
176
206
|
|
|
177
|
-
Signing fees are always paid in
|
|
207
|
+
Signing fees are always paid in **ETH on the Sequence0 chain** (chain 800801). Fees are collected by the FeeCollector contract and distributed to participating agents.
|
|
178
208
|
|
|
179
209
|
## License
|
|
180
210
|
|
package/dist/chains/bitcoin.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bitcoin Chain Adapter
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* and
|
|
4
|
+
* Provides UTXO selection and balance queries via Mempool.space API.
|
|
5
|
+
* Wallet creation and raw message signing work (agent node is curve-agnostic).
|
|
6
|
+
*
|
|
7
|
+
* LIMITATIONS:
|
|
8
|
+
* - Transaction building returns a signing payload, not a wire-format TX.
|
|
9
|
+
* Full P2TR transaction serialization requires bitcoinjs-lib which is
|
|
10
|
+
* not yet integrated. Use sign() for raw Schnorr signatures and
|
|
11
|
+
* construct the final TX externally if needed.
|
|
12
|
+
* - broadcast() will fail until proper TX serialization is added.
|
|
6
13
|
*/
|
|
7
14
|
import { ChainAdapter, BtcTransaction } from '../core/types';
|
|
8
15
|
export declare class BitcoinAdapter implements ChainAdapter {
|
|
@@ -24,7 +31,12 @@ export declare class BitcoinAdapter implements ChainAdapter {
|
|
|
24
31
|
*/
|
|
25
32
|
attachSignature(unsignedTx: string, signature: string): Promise<string>;
|
|
26
33
|
/**
|
|
27
|
-
* Broadcast a signed transaction to the Bitcoin network
|
|
34
|
+
* Broadcast a signed transaction to the Bitcoin network.
|
|
35
|
+
*
|
|
36
|
+
* NOTE: This requires a properly serialized raw Bitcoin transaction (hex).
|
|
37
|
+
* The built-in buildTransaction() returns a signing payload, not a
|
|
38
|
+
* wire-format TX. For full P2TR broadcast support, integrate bitcoinjs-lib
|
|
39
|
+
* to serialize the transaction with witness data before calling this method.
|
|
28
40
|
*/
|
|
29
41
|
broadcast(signedTx: string): Promise<string>;
|
|
30
42
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bitcoin.d.ts","sourceRoot":"","sources":["../../src/chains/bitcoin.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"bitcoin.d.ts","sourceRoot":"","sources":["../../src/chains/bitcoin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAc7D,qBAAa,cAAe,YAAW,YAAY;IAC/C,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,SAAS,CAAU;gBAEf,OAAO,GAAE,SAAS,GAAG,SAAqB,EAAE,MAAM,CAAC,EAAE,MAAM;IAKvE,SAAS,IAAI,MAAM;IAInB;;;;;;;OAOG;IACG,gBAAgB,CAAC,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAqDhF;;OAEG;IACG,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAqB7E;;;;;;;OAOG;IACG,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAiClD;;OAEG;IACG,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAYlD,iCAAiC;YACnB,UAAU;IAMxB,gCAAgC;IAC1B,WAAW,IAAI,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CASpF;AAED,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,SAAS,GAAG,SAAqB,GAAG,cAAc,CAE/F"}
|
package/dist/chains/bitcoin.js
CHANGED
|
@@ -2,8 +2,15 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Bitcoin Chain Adapter
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* and
|
|
5
|
+
* Provides UTXO selection and balance queries via Mempool.space API.
|
|
6
|
+
* Wallet creation and raw message signing work (agent node is curve-agnostic).
|
|
7
|
+
*
|
|
8
|
+
* LIMITATIONS:
|
|
9
|
+
* - Transaction building returns a signing payload, not a wire-format TX.
|
|
10
|
+
* Full P2TR transaction serialization requires bitcoinjs-lib which is
|
|
11
|
+
* not yet integrated. Use sign() for raw Schnorr signatures and
|
|
12
|
+
* construct the final TX externally if needed.
|
|
13
|
+
* - broadcast() will fail until proper TX serialization is added.
|
|
7
14
|
*/
|
|
8
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
16
|
exports.BitcoinAdapter = void 0;
|
|
@@ -93,10 +100,23 @@ class BitcoinAdapter {
|
|
|
93
100
|
}
|
|
94
101
|
}
|
|
95
102
|
/**
|
|
96
|
-
* Broadcast a signed transaction to the Bitcoin network
|
|
103
|
+
* Broadcast a signed transaction to the Bitcoin network.
|
|
104
|
+
*
|
|
105
|
+
* NOTE: This requires a properly serialized raw Bitcoin transaction (hex).
|
|
106
|
+
* The built-in buildTransaction() returns a signing payload, not a
|
|
107
|
+
* wire-format TX. For full P2TR broadcast support, integrate bitcoinjs-lib
|
|
108
|
+
* to serialize the transaction with witness data before calling this method.
|
|
97
109
|
*/
|
|
98
110
|
async broadcast(signedTx) {
|
|
99
111
|
try {
|
|
112
|
+
// Detect if this is our internal JSON format (not a raw BTC TX)
|
|
113
|
+
const decoded = Buffer.from(signedTx, 'hex').toString();
|
|
114
|
+
if (decoded.startsWith('{')) {
|
|
115
|
+
throw new Error('Bitcoin transaction broadcasting requires a properly serialized raw transaction (hex). ' +
|
|
116
|
+
'The built-in transaction builder produces a signing payload only. ' +
|
|
117
|
+
'Use bitcoinjs-lib to construct the final P2TR transaction with the FROST signature, ' +
|
|
118
|
+
'then pass the raw hex to broadcast().');
|
|
119
|
+
}
|
|
100
120
|
const response = await fetch(`${this.apiUrl}/tx`, {
|
|
101
121
|
method: 'POST',
|
|
102
122
|
headers: { 'Content-Type': 'text/plain' },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bitcoin.js","sourceRoot":"","sources":["../../src/chains/bitcoin.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"bitcoin.js","sourceRoot":"","sources":["../../src/chains/bitcoin.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;;;AA6LH,oDAEC;AA5LD,4CAA6C;AAU7C,MAAM,WAAW,GAAG,2BAA2B,CAAC;AAChD,MAAM,WAAW,GAAG,mCAAmC,CAAC;AAExD,MAAa,cAAc;IAIvB,YAAY,UAAiC,SAAS,EAAE,MAAe;QACnE,IAAI,CAAC,SAAS,GAAG,OAAO,KAAK,SAAS,CAAC;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IACzE,CAAC;IAED,SAAS;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,gBAAgB,CAAC,EAAkB,E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AAc,GAAG,IAAI,CAAC,WAAW,EAAE,aAAa,IAAI,CAAC,CAAC;YAC1F,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,EAAE,cAAc,GAAG,IAAI,CAAC,aAAa,EAAE,aAAa,IAAI,CAAC,CAAC;YAChG,OAAO,CAAC,SAAS,GAAG,WAAW,CAAC,CAAC,QAAQ,EAAE,CAAC;QAChD,CAAC;QAAC,MAAM,CAAC;YACL,OAAO,GAAG,CAAC;QACf,CAAC;IACL,CAAC;IAED,iCAAiC;IACzB,KAAK,CAAC,UAAU,CAAC,OAAe;QACpC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,MAAM,YAAY,OAAO,OAAO,CAAC,CAAC;QACvE,IAAI,CAAC,QAAQ,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QAC3D,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAW,CAAC;IAC7C,CAAC;IAED,gCAAgC;IAChC,KAAK,CAAC,WAAW;QACb,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,IAAI,CAAC,MAAM,sBAAsB,CAAC,CAAC;QACnE,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAS,CAAC;QAC1C,OAAO;YACH,OAAO,EAAE,IAAI,CAAC,UAAU;YACxB,QAAQ,EAAE,IAAI,CAAC,WAAW;YAC1B,IAAI,EAAE,IAAI,CAAC,OAAO;SACrB,CAAC;IACN,CAAC;CACJ;AA3KD,wCA2KC;AAED,SAAgB,oBAAoB,CAAC,UAAiC,SAAS;IAC3E,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -42,9 +42,12 @@ export declare class EthereumAdapter implements ChainAdapter {
|
|
|
42
42
|
estimateGas(tx: EvmTransaction, from: string): Promise<bigint>;
|
|
43
43
|
/** Get current gas price info */
|
|
44
44
|
getGasPrice(): Promise<{
|
|
45
|
+
gasPrice: bigint;
|
|
45
46
|
maxFeePerGas: bigint;
|
|
46
47
|
maxPriorityFeePerGas: bigint;
|
|
47
48
|
}>;
|
|
49
|
+
/** Check if this chain uses legacy (type 0) transactions */
|
|
50
|
+
isLegacyChain(): boolean;
|
|
48
51
|
/** Get current block number */
|
|
49
52
|
getBlockNumber(): Promise<number>;
|
|
50
53
|
/** Get transaction receipt */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ethereum.d.ts","sourceRoot":"","sources":["../../src/chains/ethereum.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"ethereum.d.ts","sourceRoot":"","sources":["../../src/chains/ethereum.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AA0I7D,qBAAa,eAAgB,YAAW,YAAY;IAChD,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,OAAO,CAAS;gBAEZ,KAAK,GAAE,MAAmB,EAAE,MAAM,CAAC,EAAE,MAAM;IAOvD,SAAS,IAAI,MAAM;IAKnB;;;;OAIG;IACG,gBAAgB,CAAC,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAgEhF;;;;;;OAMG;IACG,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAoB7E;;;;OAIG;IACG,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAYlD;;;;OAIG;IACG,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAKlD,qCAAqC;IAC/B,WAAW,CAAC,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IASpE,iCAAiC;IAC3B,WAAW,IAAI,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,oBAAoB,EAAE,MAAM,CAAA;KAAE,CAAC;IAStG,4DAA4D;IAC5D,aAAa,IAAI,OAAO;IAIxB,+BAA+B;IACzB,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC;IAIvC,8BAA8B;IACxB,qBAAqB,CAAC,IAAI,EAAE,MAAM;IAIxC,wCAAwC;IAClC,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,SAAI;CAG3D;AAED,mCAAmC;AACnC,wBAAgB,qBAAqB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,eAAe,CAEtE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,eAAe,CAErE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,eAAe,CAEtE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,eAAe,CAElE"}
|
package/dist/chains/ethereum.js
CHANGED
|
@@ -26,10 +26,21 @@ const DEFAULT_RPC = {
|
|
|
26
26
|
celo: 'https://forno.celo.org',
|
|
27
27
|
cronos: 'https://evm.cronos.org',
|
|
28
28
|
moonbeam: 'https://rpc.api.moonbeam.network',
|
|
29
|
+
moonriver: 'https://rpc.api.moonriver.moonbeam.network',
|
|
29
30
|
harmony: 'https://api.harmony.one',
|
|
30
31
|
kava: 'https://evm.kava.io',
|
|
31
32
|
canto: 'https://canto.slingshot.finance',
|
|
32
33
|
aurora: 'https://mainnet.aurora.dev',
|
|
34
|
+
klaytn: 'https://public-en-cypress.klaytn.net',
|
|
35
|
+
okc: 'https://exchainrpc.okex.org',
|
|
36
|
+
fuse: 'https://rpc.fuse.io',
|
|
37
|
+
evmos: 'https://evmos-evm-rpc.publicnode.com',
|
|
38
|
+
core: 'https://rpc.coredao.org',
|
|
39
|
+
flare: 'https://flare-api.flare.network/ext/C/rpc',
|
|
40
|
+
iotex: 'https://babel-api.mainnet.iotex.io',
|
|
41
|
+
rootstock: 'https://public-node.rsk.co',
|
|
42
|
+
telos: 'https://mainnet.telos.net/evm',
|
|
43
|
+
thundercore: 'https://mainnet-rpc.thundercore.com',
|
|
33
44
|
// Layer 2s
|
|
34
45
|
arbitrum: 'https://arb1.arbitrum.io/rpc',
|
|
35
46
|
optimism: 'https://mainnet.optimism.io',
|
|
@@ -45,7 +56,40 @@ const DEFAULT_RPC = {
|
|
|
45
56
|
metis: 'https://andromeda.metis.io/?owner=1088',
|
|
46
57
|
zora: 'https://rpc.zora.energy',
|
|
47
58
|
sei: 'https://evm-rpc.sei-apis.com',
|
|
59
|
+
boba: 'https://mainnet.boba.network',
|
|
60
|
+
taiko: 'https://rpc.mainnet.taiko.xyz',
|
|
61
|
+
opbnb: 'https://opbnb-mainnet-rpc.bnbchain.org',
|
|
62
|
+
fraxtal: 'https://rpc.frax.com',
|
|
63
|
+
worldchain: 'https://worldchain-mainnet.g.alchemy.com/public',
|
|
64
|
+
lisk: 'https://rpc.api.lisk.com',
|
|
65
|
+
redstone: 'https://rpc.redstonechain.com',
|
|
66
|
+
cyber: 'https://cyber.alt.technology',
|
|
67
|
+
mint: 'https://rpc.mintchain.io',
|
|
68
|
+
bob: 'https://rpc.gobob.xyz',
|
|
69
|
+
xai: 'https://xai-chain.net/rpc',
|
|
70
|
+
morph: 'https://rpc.morphl2.io',
|
|
71
|
+
'astar-zkevm': 'https://rpc.startale.com/astar-zkevm',
|
|
48
72
|
};
|
|
73
|
+
/**
|
|
74
|
+
* Chains that do NOT support EIP-1559 (type 2) transactions.
|
|
75
|
+
* These chains require legacy (type 0) transactions with gasPrice.
|
|
76
|
+
*/
|
|
77
|
+
const LEGACY_ONLY_CHAINS = new Set([
|
|
78
|
+
'bsc', // BNB Chain — uses legacy gas model
|
|
79
|
+
'rootstock', // RSK — Bitcoin sidechain, no EIP-1559
|
|
80
|
+
'harmony', // Harmony — does not support EIP-1559
|
|
81
|
+
'klaytn', // Klaytn — uses own gas model
|
|
82
|
+
'okc', // OKX Chain — legacy only
|
|
83
|
+
'canto', // Canto — no EIP-1559 support
|
|
84
|
+
'metis', // Metis — custom gas model
|
|
85
|
+
'cronos', // Cronos — legacy preferred
|
|
86
|
+
'moonriver', // Moonriver — legacy often required
|
|
87
|
+
'fuse', // Fuse — legacy only
|
|
88
|
+
'thundercore', // ThunderCore — legacy only
|
|
89
|
+
'telos', // Telos EVM — legacy only
|
|
90
|
+
'zksync', // zkSync Era — uses own tx type (EIP-712 native)
|
|
91
|
+
'opbnb', // opBNB — legacy preferred
|
|
92
|
+
]);
|
|
49
93
|
/** Default chain IDs */
|
|
50
94
|
const CHAIN_IDS = {
|
|
51
95
|
// Layer 1s
|
|
@@ -58,10 +102,21 @@ const CHAIN_IDS = {
|
|
|
58
102
|
celo: 42220,
|
|
59
103
|
cronos: 25,
|
|
60
104
|
moonbeam: 1284,
|
|
105
|
+
moonriver: 1285,
|
|
61
106
|
harmony: 1666600000,
|
|
62
107
|
kava: 2222,
|
|
63
108
|
canto: 7700,
|
|
64
109
|
aurora: 1313161554,
|
|
110
|
+
klaytn: 8217,
|
|
111
|
+
okc: 66,
|
|
112
|
+
fuse: 122,
|
|
113
|
+
evmos: 9001,
|
|
114
|
+
core: 1116,
|
|
115
|
+
flare: 14,
|
|
116
|
+
iotex: 4689,
|
|
117
|
+
rootstock: 30,
|
|
118
|
+
telos: 40,
|
|
119
|
+
thundercore: 108,
|
|
65
120
|
// Layer 2s
|
|
66
121
|
arbitrum: 42161,
|
|
67
122
|
optimism: 10,
|
|
@@ -77,6 +132,19 @@ const CHAIN_IDS = {
|
|
|
77
132
|
metis: 1088,
|
|
78
133
|
zora: 7777777,
|
|
79
134
|
sei: 1329,
|
|
135
|
+
boba: 288,
|
|
136
|
+
taiko: 167000,
|
|
137
|
+
opbnb: 204,
|
|
138
|
+
fraxtal: 252,
|
|
139
|
+
worldchain: 480,
|
|
140
|
+
lisk: 1135,
|
|
141
|
+
redstone: 690,
|
|
142
|
+
cyber: 7560,
|
|
143
|
+
mint: 185,
|
|
144
|
+
bob: 60808,
|
|
145
|
+
xai: 660279,
|
|
146
|
+
morph: 2818,
|
|
147
|
+
'astar-zkevm': 3776,
|
|
80
148
|
};
|
|
81
149
|
class EthereumAdapter {
|
|
82
150
|
constructor(chain = 'ethereum', rpcUrl) {
|
|
@@ -108,22 +176,41 @@ class EthereumAdapter {
|
|
|
108
176
|
value: tx.value ? BigInt(tx.value) : 0n,
|
|
109
177
|
data: tx.data || '0x',
|
|
110
178
|
}).catch(() => 21000n);
|
|
111
|
-
// Build the transaction object
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
179
|
+
// Build the transaction object — legacy (type 0) or EIP-1559 (type 2)
|
|
180
|
+
const useLegacy = LEGACY_ONLY_CHAINS.has(this.chainName)
|
|
181
|
+
|| tx.gasPrice !== undefined;
|
|
182
|
+
let txObj;
|
|
183
|
+
if (useLegacy) {
|
|
184
|
+
txObj = {
|
|
185
|
+
to: tx.to,
|
|
186
|
+
value: tx.value ? BigInt(tx.value) : 0n,
|
|
187
|
+
data: tx.data || '0x',
|
|
188
|
+
nonce,
|
|
189
|
+
gasLimit,
|
|
190
|
+
chainId: tx.chainId || this.chainId,
|
|
191
|
+
type: 0,
|
|
192
|
+
gasPrice: tx.gasPrice
|
|
193
|
+
? BigInt(tx.gasPrice)
|
|
194
|
+
: (feeData.gasPrice || 5000000000n),
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
txObj = {
|
|
199
|
+
to: tx.to,
|
|
200
|
+
value: tx.value ? BigInt(tx.value) : 0n,
|
|
201
|
+
data: tx.data || '0x',
|
|
202
|
+
nonce,
|
|
203
|
+
gasLimit,
|
|
204
|
+
chainId: tx.chainId || this.chainId,
|
|
205
|
+
type: 2,
|
|
206
|
+
maxFeePerGas: tx.maxFeePerGas
|
|
207
|
+
? BigInt(tx.maxFeePerGas)
|
|
208
|
+
: (feeData.maxFeePerGas || 30000000000n),
|
|
209
|
+
maxPriorityFeePerGas: tx.maxPriorityFeePerGas
|
|
210
|
+
? BigInt(tx.maxPriorityFeePerGas)
|
|
211
|
+
: (feeData.maxPriorityFeePerGas || 1500000000n),
|
|
212
|
+
};
|
|
213
|
+
}
|
|
127
214
|
// Serialize unsigned TX and return the hash for signing
|
|
128
215
|
const unsignedTx = ethers_1.Transaction.from(txObj);
|
|
129
216
|
return unsignedTx.unsignedSerialized;
|
|
@@ -189,10 +276,15 @@ class EthereumAdapter {
|
|
|
189
276
|
async getGasPrice() {
|
|
190
277
|
const feeData = await this.provider.getFeeData();
|
|
191
278
|
return {
|
|
279
|
+
gasPrice: feeData.gasPrice || 5000000000n,
|
|
192
280
|
maxFeePerGas: feeData.maxFeePerGas || 30000000000n,
|
|
193
281
|
maxPriorityFeePerGas: feeData.maxPriorityFeePerGas || 1500000000n,
|
|
194
282
|
};
|
|
195
283
|
}
|
|
284
|
+
/** Check if this chain uses legacy (type 0) transactions */
|
|
285
|
+
isLegacyChain() {
|
|
286
|
+
return LEGACY_ONLY_CHAINS.has(this.chainName);
|
|
287
|
+
}
|
|
196
288
|
/** Get current block number */
|
|
197
289
|
async getBlockNumber() {
|
|
198
290
|
return this.provider.getBlockNumber();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ethereum.js","sourceRoot":"","sources":["../../src/chains/ethereum.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;
|
|
1
|
+
{"version":3,"file":"ethereum.js","sourceRoot":"","sources":["../../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AC,qBAAqB,CAAC,IAAY;QACpC,OAAO,IAAI,CAAC,QAAQ,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACrD,CAAC;IAED,wCAAwC;IACxC,KAAK,CAAC,kBAAkB,CAAC,IAAY,EAAE,aAAa,GAAG,CAAC;QACpD,OAAO,IAAI,CAAC,QAAQ,CAAC,kBAAkB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;IACjE,CAAC;CACJ;AAnLD,0CAmLC;AAED,mCAAmC;AACnC,SAAgB,qBAAqB,CAAC,MAAe;IACjD,OAAO,IAAI,eAAe,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AACnD,CAAC;AAED,SAAgB,oBAAoB,CAAC,MAAe;IAChD,OAAO,IAAI,eAAe,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AAClD,CAAC;AAED,SAAgB,qBAAqB,CAAC,MAAe;IACjD,OAAO,IAAI,eAAe,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AACnD,CAAC;AAED,SAAgB,iBAAiB,CAAC,MAAe;IAC7C,OAAO,IAAI,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC/C,CAAC"}
|
package/dist/core/client.d.ts
CHANGED
|
@@ -25,12 +25,21 @@
|
|
|
25
25
|
import { NetworkConfig, CreateWalletOptions, HealthResponse, StatusResponse, WalletDetail, SignResultResponse } from './types';
|
|
26
26
|
import { Wallet } from '../wallet/wallet';
|
|
27
27
|
import { WsClient } from '../utils/websocket';
|
|
28
|
+
import { UnsignedFeeTx } from '../utils/fee';
|
|
28
29
|
export declare class Sequence0 {
|
|
29
30
|
private config;
|
|
30
31
|
private http;
|
|
31
32
|
private ws;
|
|
32
33
|
private discovery;
|
|
34
|
+
private feeManager;
|
|
33
35
|
private resolvedAgentUrl;
|
|
36
|
+
private circuitBreaker;
|
|
37
|
+
/** Map of agent API URL -> timestamp when the agent was marked as failed */
|
|
38
|
+
private failedAgents;
|
|
39
|
+
/** Optional signer for wallet ownership proofs */
|
|
40
|
+
private ownerSigner;
|
|
41
|
+
/** Owner's Ethereum address (derived from private key when provided) */
|
|
42
|
+
private ownerAddress;
|
|
34
43
|
/**
|
|
35
44
|
* Create a new Sequence0 SDK client
|
|
36
45
|
*
|
|
@@ -39,29 +48,63 @@ export declare class Sequence0 {
|
|
|
39
48
|
*
|
|
40
49
|
* @example
|
|
41
50
|
* ```typescript
|
|
42
|
-
* // Mainnet
|
|
51
|
+
* // Mainnet -- auto-discovers agents from on-chain registry
|
|
43
52
|
* const s0 = new Sequence0({ network: 'mainnet' });
|
|
44
53
|
*
|
|
45
54
|
* // Or specify a specific agent
|
|
46
55
|
* const s0 = new Sequence0({ network: 'mainnet', agentUrl: 'http://my-agent:8080' });
|
|
56
|
+
*
|
|
57
|
+
* // With debug logging and custom rate limit
|
|
58
|
+
* const s0 = new Sequence0({
|
|
59
|
+
* network: 'mainnet',
|
|
60
|
+
* debug: true,
|
|
61
|
+
* maxRetries: 5,
|
|
62
|
+
* rateLimiter: { maxRequestsPerSecond: 20 },
|
|
63
|
+
* });
|
|
47
64
|
* ```
|
|
48
65
|
*/
|
|
49
66
|
constructor(config: NetworkConfig);
|
|
50
67
|
/**
|
|
51
|
-
* Resolve an agent URL
|
|
68
|
+
* Resolve an agent URL -- uses direct URL if set, otherwise discovers from registry.
|
|
69
|
+
* Filters out recently-failed agents during discovery.
|
|
52
70
|
*/
|
|
53
71
|
private getHttp;
|
|
72
|
+
/**
|
|
73
|
+
* Select a healthy agent from the registry, filtering out
|
|
74
|
+
* agents that failed within the last AGENT_EXCLUSION_TTL ms.
|
|
75
|
+
*/
|
|
76
|
+
private selectAgent;
|
|
77
|
+
/**
|
|
78
|
+
* Mark the current agent as failed and switch to a different one.
|
|
79
|
+
* Called internally when a request to the current agent fails
|
|
80
|
+
* after exhausting retries or when the circuit breaker trips.
|
|
81
|
+
*/
|
|
82
|
+
private failoverToNextAgent;
|
|
83
|
+
/**
|
|
84
|
+
* Remove expired entries from the failed agents map.
|
|
85
|
+
*/
|
|
86
|
+
private pruneExpiredFailures;
|
|
87
|
+
/**
|
|
88
|
+
* Create a new HttpClient with the shared circuit breaker and current config.
|
|
89
|
+
*/
|
|
90
|
+
private createHttpClient;
|
|
91
|
+
/**
|
|
92
|
+
* Execute an HTTP request with automatic agent failover.
|
|
93
|
+
* If the current agent's circuit breaker trips or all retries fail,
|
|
94
|
+
* tries to failover to a different agent (up to 2 failover attempts).
|
|
95
|
+
*/
|
|
96
|
+
private withFailover;
|
|
54
97
|
/**
|
|
55
98
|
* Create a new threshold wallet via DKG ceremony
|
|
56
99
|
*
|
|
57
100
|
* Initiates Distributed Key Generation with the agent network.
|
|
58
|
-
* The private key is never assembled
|
|
101
|
+
* The private key is never assembled -- each agent holds a share.
|
|
59
102
|
*
|
|
60
103
|
* @example
|
|
61
104
|
* ```typescript
|
|
62
105
|
* const wallet = await s0.createWallet({ chain: 'ethereum' });
|
|
63
106
|
* console.log(wallet.address); // 0x...
|
|
64
|
-
* console.log(wallet.threshold); // { t:
|
|
107
|
+
* console.log(wallet.threshold); // { t: 16, n: 24 }
|
|
65
108
|
* ```
|
|
66
109
|
*/
|
|
67
110
|
createWallet(options: CreateWalletOptions): Promise<Wallet>;
|
|
@@ -114,13 +157,67 @@ export declare class Sequence0 {
|
|
|
114
157
|
*/
|
|
115
158
|
health(): Promise<HealthResponse>;
|
|
116
159
|
/**
|
|
117
|
-
* Request key refresh for a wallet (proactive security)
|
|
160
|
+
* Request key refresh for a wallet (proactive security).
|
|
161
|
+
* Requires ownerSigner or ownerPrivateKey in config.
|
|
118
162
|
*/
|
|
119
163
|
refreshKeys(walletId: string): Promise<void>;
|
|
120
164
|
/**
|
|
121
165
|
* Discover active agents from the on-chain registry
|
|
122
166
|
*/
|
|
123
167
|
discoverAgents(): Promise<import("../utils/discovery").AgentInfo[]>;
|
|
168
|
+
/**
|
|
169
|
+
* Discover all active agents from the on-chain registry (paginated).
|
|
170
|
+
* Fetches all pages when there are more than 100 agents.
|
|
171
|
+
*/
|
|
172
|
+
discoverAllAgents(): Promise<import("../utils/discovery").AgentInfo[]>;
|
|
173
|
+
/**
|
|
174
|
+
* Get the current per-signature fee from the FeeCollector contract.
|
|
175
|
+
*
|
|
176
|
+
* The fee is paid on the Sequence0 chain (chain ID 800801) in native S0
|
|
177
|
+
* tokens. 80% goes to the signing agents, 10% to protocol treasury,
|
|
178
|
+
* 10% to the reserve fund.
|
|
179
|
+
*
|
|
180
|
+
* Returns 0n on testnet (no fees).
|
|
181
|
+
*
|
|
182
|
+
* @returns Fee in wei as bigint
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```typescript
|
|
186
|
+
* const fee = await s0.getSignatureFee();
|
|
187
|
+
* console.log(`Fee: ${fee} wei`);
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
190
|
+
getSignatureFee(): Promise<bigint>;
|
|
191
|
+
/**
|
|
192
|
+
* Build an unsigned fee-payment transaction for a wallet's signing committee.
|
|
193
|
+
*
|
|
194
|
+
* This looks up the wallet's committee from the agent network, resolves
|
|
195
|
+
* each committee member's Ethereum payment address from the on-chain
|
|
196
|
+
* AgentRegistry, and builds an unsigned `collectFee()` transaction for
|
|
197
|
+
* the FeeCollector contract.
|
|
198
|
+
*
|
|
199
|
+
* **The app developer must sign and send this transaction themselves** on the
|
|
200
|
+
* Sequence0 chain (RPC: https://rpc.sequence0.network, chain ID: 800801).
|
|
201
|
+
* They need S0 native tokens to cover the fee.
|
|
202
|
+
*
|
|
203
|
+
* Returns null on testnet (no fees).
|
|
204
|
+
*
|
|
205
|
+
* @param walletId - The wallet ID that will be signed with
|
|
206
|
+
* @returns Unsigned transaction `{ to, data, value }` or null if no fee required
|
|
207
|
+
*
|
|
208
|
+
* @example
|
|
209
|
+
* ```typescript
|
|
210
|
+
* const feeTx = await s0.buildFeeTx('my-wallet-id');
|
|
211
|
+
* if (feeTx) {
|
|
212
|
+
* // Sign and send with your own wallet on the Sequence0 chain
|
|
213
|
+
* const tx = await signer.sendTransaction(feeTx);
|
|
214
|
+
* await tx.wait();
|
|
215
|
+
* }
|
|
216
|
+
* // Now request the signature
|
|
217
|
+
* const sig = await s0.signAndWait('my-wallet-id', messageHex);
|
|
218
|
+
* ```
|
|
219
|
+
*/
|
|
220
|
+
buildFeeTx(walletId: string): Promise<UnsignedFeeTx | null>;
|
|
124
221
|
/**
|
|
125
222
|
* Subscribe to real-time events from the agent network
|
|
126
223
|
*
|
|
@@ -132,9 +229,36 @@ export declare class Sequence0 {
|
|
|
132
229
|
* ```
|
|
133
230
|
*/
|
|
134
231
|
subscribe(walletId?: string): Promise<WsClient>;
|
|
232
|
+
/**
|
|
233
|
+
* Clean up all resources (HTTP client, rate limiter, WebSocket, circuit breaker).
|
|
234
|
+
* Call this when you are done using the SDK.
|
|
235
|
+
*/
|
|
236
|
+
destroy(): void;
|
|
135
237
|
private getWsClient;
|
|
136
238
|
private getRpcUrl;
|
|
137
239
|
private getCurveForChain;
|
|
240
|
+
/**
|
|
241
|
+
* Build an ownership proof for a sign request.
|
|
242
|
+
*
|
|
243
|
+
* The proof is: sign( keccak256( wallet_id_bytes + message_hex_bytes + timestamp_be_bytes ) )
|
|
244
|
+
*
|
|
245
|
+
* - wallet_id_bytes: UTF-8 encoding of the wallet ID string
|
|
246
|
+
* - message_hex_bytes: the raw bytes of the hex-encoded message (i.e. the message as passed to /sign)
|
|
247
|
+
* - timestamp_be_bytes: 8-byte big-endian encoding of the Unix epoch second
|
|
248
|
+
*
|
|
249
|
+
* Returns null when no ownerSigner is configured (backwards compatible).
|
|
250
|
+
*/
|
|
251
|
+
private signOwnershipProof;
|
|
252
|
+
/**
|
|
253
|
+
* Weighted random sampling without replacement.
|
|
254
|
+
* Agents with higher reputation scores are more likely to be selected.
|
|
255
|
+
* All agents have a minimum weight of 1 so new agents still have a chance.
|
|
256
|
+
*/
|
|
257
|
+
private weightedRandomSample;
|
|
258
|
+
/**
|
|
259
|
+
* Emit a one-time warning if the agent URL uses plain HTTP.
|
|
260
|
+
*/
|
|
261
|
+
private warnIfHttp;
|
|
138
262
|
private generateWalletId;
|
|
139
263
|
}
|
|
140
264
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/core/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EACH,aAAa,EACb,mBAAmB,EAEnB,cAAc,EACd,cAAc,EAEd,YAAY,EAGZ,kBAAkB,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/core/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EACH,aAAa,EACb,mBAAmB,EAEnB,cAAc,EACd,cAAc,EAEd,YAAY,EAGZ,kBAAkB,EAErB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,MAAM,EAAgB,MAAM,kBAAkB,CAAC;AAExD,OAAO,EAAE,QAAQ,EAAa,MAAM,oBAAoB,CAAC;AAEzD,OAAO,EAAc,aAAa,EAAE,MAAM,cAAc,CAAC;AAmHzD,qBAAa,SAAS;IAClB,OAAO,CAAC,MAAM,CAA2D;IACzE,OAAO,CAAC,IAAI,CAA2B;IACvC,OAAO,CAAC,EAAE,CAAyB;IACnC,OAAO,CAAC,SAAS,CAA+B;IAChD,OAAO,CAAC,UAAU,CAA2B;IAC7C,OAAO,CAAC,gBAAgB,CAAuB;IAC/C,OAAO,CAAC,cAAc,CAAwC;IAC9D,4EAA4E;IAC5E,OAAO,CAAC,YAAY,CAAkC;IACtD,kDAAkD;IAClD,OAAO,CAAC,WAAW,CAA4B;IAC/C,wEAAwE;IACxE,OAAO,CAAC,YAAY,CAAuB;IAE3C;;;;;;;;;;;;;;;;;;;;;;OAsBG;gBACS,MAAM,EAAE,aAAa;IAyEjC;;;OAGG;YACW,OAAO;IAYrB;;;OAGG;YACW,WAAW;IAwB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