@fastxyz/allset-sdk 0.1.10 → 0.1.12
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/dist/node/eip7702.d.ts +54 -0
- package/dist/node/eip7702.d.ts.map +1 -0
- package/dist/node/eip7702.js +275 -0
- package/dist/node/index.d.ts +1 -0
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* eip7702.ts — EIP-7702 smartDeposit via AllSet Portal relay
|
|
3
|
+
*
|
|
4
|
+
* Flow:
|
|
5
|
+
* 1. Check ERC-20 balance; throw InsufficientBalanceError if < amount
|
|
6
|
+
* 2. POST /userop/prepare → backend assembles UserOp + paymasterData (3 retries)
|
|
7
|
+
* 3. Pin delegate address against TRUSTED_DELEGATES allowlist
|
|
8
|
+
* 4. Sign EIP-7702 authorization (re-delegate EOA to v0.8 impl)
|
|
9
|
+
* 5. Sign UserOperation (EIP-712, v0.8)
|
|
10
|
+
* 6. POST /userop/submit → backend calls Pimlico eth_sendUserOperation
|
|
11
|
+
*
|
|
12
|
+
* Private key never leaves the SDK.
|
|
13
|
+
* Pimlico API key never touches the SDK.
|
|
14
|
+
* Gas is paid in USDC via ERC-20 Paymaster.
|
|
15
|
+
* Chain is inferred from rpcUrl (backend calls eth_chainId) — no hardcoded chain list.
|
|
16
|
+
*/
|
|
17
|
+
import { type Address, type Hash, type Hex } from 'viem';
|
|
18
|
+
export interface SmartDepositParams {
|
|
19
|
+
/**
|
|
20
|
+
* EOA private key — stays local, never sent to backend.
|
|
21
|
+
* The EOA should be quiescent during this call: do not send other
|
|
22
|
+
* transactions from this key concurrently. EIP-7702 authorization
|
|
23
|
+
* signing binds to the account nonce, and a concurrent tx from
|
|
24
|
+
* another process will silently invalidate the delegation.
|
|
25
|
+
*/
|
|
26
|
+
privateKey: Hex;
|
|
27
|
+
/** EVM JSON-RPC URL — used for balance check and forwarded to backend for chainId detection */
|
|
28
|
+
rpcUrl: string;
|
|
29
|
+
/** AllSet Portal backend base URL, e.g. https://api.allset.xyz */
|
|
30
|
+
allsetApiUrl: string;
|
|
31
|
+
/** ERC-20 token to deposit (e.g. USDC on Base) */
|
|
32
|
+
tokenAddress: Address;
|
|
33
|
+
/** Exact token amount to deposit (raw, with decimals); throws if balance is insufficient */
|
|
34
|
+
amount: bigint;
|
|
35
|
+
/** AllSet bridge contract address */
|
|
36
|
+
bridgeAddress: Address;
|
|
37
|
+
/** Encoded bridge.deposit(...) calldata from encodeDepositCalldata() */
|
|
38
|
+
depositCalldata: Hex;
|
|
39
|
+
/** Per-request HTTP timeout in ms for backend POSTs (default: 60000) */
|
|
40
|
+
requestTimeoutMs?: number;
|
|
41
|
+
}
|
|
42
|
+
export interface SmartDepositResult {
|
|
43
|
+
txHash: Hash;
|
|
44
|
+
userOpHash: Hash;
|
|
45
|
+
userAddress: Address;
|
|
46
|
+
}
|
|
47
|
+
export declare class InsufficientBalanceError extends Error {
|
|
48
|
+
readonly balance: bigint;
|
|
49
|
+
readonly required: bigint;
|
|
50
|
+
readonly tokenAddress: Address;
|
|
51
|
+
constructor(balance: bigint, required: bigint, tokenAddress: Address);
|
|
52
|
+
}
|
|
53
|
+
export declare function smartDeposit(params: SmartDepositParams): Promise<SmartDepositResult>;
|
|
54
|
+
//# sourceMappingURL=eip7702.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eip7702.d.ts","sourceRoot":"","sources":["../../src/node/eip7702.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAML,KAAK,OAAO,EACZ,KAAK,IAAI,EACT,KAAK,GAAG,EACT,MAAM,MAAM,CAAC;AA4Dd,MAAM,WAAW,kBAAkB;IACjC;;;;;;OAMG;IACH,UAAU,EAAE,GAAG,CAAC;IAChB,+FAA+F;IAC/F,MAAM,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,YAAY,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,YAAY,EAAE,OAAO,CAAC;IACtB,4FAA4F;IAC5F,MAAM,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,aAAa,EAAE,OAAO,CAAC;IACvB,wEAAwE;IACxE,eAAe,EAAE,GAAG,CAAC;IACrB,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,IAAI,CAAC;IACb,UAAU,EAAE,IAAI,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,qBAAa,wBAAyB,SAAQ,KAAK;aAE/B,OAAO,EAAE,MAAM;aACf,QAAQ,EAAE,MAAM;aAChB,YAAY,EAAE,OAAO;gBAFrB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,OAAO;CAOxC;AA6HD,wBAAsB,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA2K1F"}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* eip7702.ts — EIP-7702 smartDeposit via AllSet Portal relay
|
|
3
|
+
*
|
|
4
|
+
* Flow:
|
|
5
|
+
* 1. Check ERC-20 balance; throw InsufficientBalanceError if < amount
|
|
6
|
+
* 2. POST /userop/prepare → backend assembles UserOp + paymasterData (3 retries)
|
|
7
|
+
* 3. Pin delegate address against TRUSTED_DELEGATES allowlist
|
|
8
|
+
* 4. Sign EIP-7702 authorization (re-delegate EOA to v0.8 impl)
|
|
9
|
+
* 5. Sign UserOperation (EIP-712, v0.8)
|
|
10
|
+
* 6. POST /userop/submit → backend calls Pimlico eth_sendUserOperation
|
|
11
|
+
*
|
|
12
|
+
* Private key never leaves the SDK.
|
|
13
|
+
* Pimlico API key never touches the SDK.
|
|
14
|
+
* Gas is paid in USDC via ERC-20 Paymaster.
|
|
15
|
+
* Chain is inferred from rpcUrl (backend calls eth_chainId) — no hardcoded chain list.
|
|
16
|
+
*/
|
|
17
|
+
import { createPublicClient, encodeAbiParameters, http, keccak256, parseAbi, } from 'viem';
|
|
18
|
+
import { privateKeyToAccount } from 'viem/accounts';
|
|
19
|
+
import { getUserOperationTypedData } from 'viem/account-abstraction';
|
|
20
|
+
const ENTRY_POINT_V08 = '0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108';
|
|
21
|
+
/**
|
|
22
|
+
* Allowlist of trusted EIP-7702 delegate addresses (lowercase).
|
|
23
|
+
* smartDeposit will throw if the backend returns a delegate not in this set,
|
|
24
|
+
* preventing a compromised backend from delegating EOAs to a malicious contract.
|
|
25
|
+
*/
|
|
26
|
+
const TRUSTED_DELEGATES = new Set([
|
|
27
|
+
'0xe6cae83bde06e4c305530e199d7217f42808555b', // Simple7702Account v0.8
|
|
28
|
+
]);
|
|
29
|
+
const ERC20_BALANCEOF_ABI = parseAbi([
|
|
30
|
+
'function balanceOf(address account) view returns (uint256)',
|
|
31
|
+
]);
|
|
32
|
+
/**
|
|
33
|
+
* Encode a number/bigint as an even-length 0x-prefixed hex string.
|
|
34
|
+
* Some strict bundler parsers expect byte-aligned hex — pad to even length.
|
|
35
|
+
*/
|
|
36
|
+
function toEvenHex(n) {
|
|
37
|
+
let h = n.toString(16);
|
|
38
|
+
if (h.length % 2 !== 0)
|
|
39
|
+
h = `0${h}`;
|
|
40
|
+
return `0x${h}`;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* POST JSON with a hard timeout via AbortController.
|
|
44
|
+
* Node's global fetch has no default timeout.
|
|
45
|
+
*/
|
|
46
|
+
async function postJson(url, body, timeoutMs) {
|
|
47
|
+
const ac = new AbortController();
|
|
48
|
+
const timer = setTimeout(() => ac.abort(), timeoutMs);
|
|
49
|
+
try {
|
|
50
|
+
const res = await fetch(url, {
|
|
51
|
+
method: 'POST',
|
|
52
|
+
headers: { 'Content-Type': 'application/json' },
|
|
53
|
+
body: JSON.stringify(body),
|
|
54
|
+
signal: ac.signal,
|
|
55
|
+
});
|
|
56
|
+
if (!res.ok) {
|
|
57
|
+
const err = await res.text();
|
|
58
|
+
throw new Error(`POST ${url} failed (${res.status}): ${err}`);
|
|
59
|
+
}
|
|
60
|
+
return (await res.json());
|
|
61
|
+
}
|
|
62
|
+
catch (e) {
|
|
63
|
+
if (e.name === 'AbortError') {
|
|
64
|
+
throw new Error(`POST ${url} timed out after ${timeoutMs}ms`);
|
|
65
|
+
}
|
|
66
|
+
throw e;
|
|
67
|
+
}
|
|
68
|
+
finally {
|
|
69
|
+
clearTimeout(timer);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
export class InsufficientBalanceError extends Error {
|
|
73
|
+
balance;
|
|
74
|
+
required;
|
|
75
|
+
tokenAddress;
|
|
76
|
+
constructor(balance, required, tokenAddress) {
|
|
77
|
+
super(`Insufficient token balance: have ${balance}, need ${required} (token ${tokenAddress})`);
|
|
78
|
+
this.balance = balance;
|
|
79
|
+
this.required = required;
|
|
80
|
+
this.tokenAddress = tokenAddress;
|
|
81
|
+
this.name = 'InsufficientBalanceError';
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
// ─── Helpers ──────────────────────────────────────────────────────────────────
|
|
85
|
+
/**
|
|
86
|
+
* Convert the backend's hex-string UserOp to viem's bigint-typed UserOperation<'0.8'>.
|
|
87
|
+
*/
|
|
88
|
+
function parseUserOp(raw) {
|
|
89
|
+
return {
|
|
90
|
+
sender: raw.sender,
|
|
91
|
+
nonce: BigInt(raw.nonce),
|
|
92
|
+
callData: raw.callData,
|
|
93
|
+
callGasLimit: BigInt(raw.callGasLimit),
|
|
94
|
+
verificationGasLimit: BigInt(raw.verificationGasLimit),
|
|
95
|
+
preVerificationGas: BigInt(raw.preVerificationGas),
|
|
96
|
+
maxFeePerGas: BigInt(raw.maxFeePerGas),
|
|
97
|
+
maxPriorityFeePerGas: BigInt(raw.maxPriorityFeePerGas),
|
|
98
|
+
...(raw.paymaster && { paymaster: raw.paymaster }),
|
|
99
|
+
...(raw.paymasterVerificationGasLimit && {
|
|
100
|
+
paymasterVerificationGasLimit: BigInt(raw.paymasterVerificationGasLimit),
|
|
101
|
+
}),
|
|
102
|
+
...(raw.paymasterPostOpGasLimit && {
|
|
103
|
+
paymasterPostOpGasLimit: BigInt(raw.paymasterPostOpGasLimit),
|
|
104
|
+
}),
|
|
105
|
+
...(raw.paymasterData && { paymasterData: raw.paymasterData }),
|
|
106
|
+
...(raw.factory && { factory: raw.factory }),
|
|
107
|
+
...(raw.factoryData && { factoryData: raw.factoryData }),
|
|
108
|
+
signature: '0x',
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Convert UserOperation<'0.8'> bigint fields → hex strings for JSON serialization.
|
|
113
|
+
* The Go backend expects all numeric fields as 0x-prefixed hex strings.
|
|
114
|
+
*/
|
|
115
|
+
function serializeUserOp(op) {
|
|
116
|
+
const toHex = (n) => `0x${n.toString(16)}`;
|
|
117
|
+
return {
|
|
118
|
+
sender: op.sender,
|
|
119
|
+
nonce: toHex(op.nonce),
|
|
120
|
+
callData: op.callData,
|
|
121
|
+
callGasLimit: toHex(op.callGasLimit),
|
|
122
|
+
verificationGasLimit: toHex(op.verificationGasLimit),
|
|
123
|
+
preVerificationGas: toHex(op.preVerificationGas),
|
|
124
|
+
maxFeePerGas: toHex(op.maxFeePerGas),
|
|
125
|
+
maxPriorityFeePerGas: toHex(op.maxPriorityFeePerGas),
|
|
126
|
+
...(op.paymaster && { paymaster: op.paymaster }),
|
|
127
|
+
...(op.paymasterVerificationGasLimit !== undefined && {
|
|
128
|
+
paymasterVerificationGasLimit: toHex(op.paymasterVerificationGasLimit),
|
|
129
|
+
}),
|
|
130
|
+
...(op.paymasterPostOpGasLimit !== undefined && {
|
|
131
|
+
paymasterPostOpGasLimit: toHex(op.paymasterPostOpGasLimit),
|
|
132
|
+
}),
|
|
133
|
+
...(op.paymasterData && { paymasterData: op.paymasterData }),
|
|
134
|
+
...(op.factory && { factory: op.factory }),
|
|
135
|
+
...(op.factoryData && { factoryData: op.factoryData }),
|
|
136
|
+
...(op.signature && { signature: op.signature }),
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
// ─── Main function ─────────────────────────────────────────────────────────────
|
|
140
|
+
export async function smartDeposit(params) {
|
|
141
|
+
const { privateKey, rpcUrl, allsetApiUrl, tokenAddress, amount, bridgeAddress, depositCalldata, requestTimeoutMs = 60_000, } = params;
|
|
142
|
+
const eoa = privateKeyToAccount(privateKey);
|
|
143
|
+
// No chain object needed — chainId is fetched dynamically from the RPC
|
|
144
|
+
const publicClient = createPublicClient({ transport: http(rpcUrl) });
|
|
145
|
+
// Step 1: One-shot balance check — caller is responsible for funding the EOA first
|
|
146
|
+
const tokenBalance = (await publicClient.readContract({
|
|
147
|
+
address: tokenAddress,
|
|
148
|
+
abi: ERC20_BALANCEOF_ABI,
|
|
149
|
+
functionName: 'balanceOf',
|
|
150
|
+
args: [eoa.address],
|
|
151
|
+
}));
|
|
152
|
+
if (tokenBalance < amount) {
|
|
153
|
+
throw new InsufficientBalanceError(tokenBalance, amount, tokenAddress);
|
|
154
|
+
}
|
|
155
|
+
// Fetch chainId once — used for EIP-7702 auth and UserOp signing
|
|
156
|
+
const chainId = await publicClient.getChainId();
|
|
157
|
+
// Step 2: Build request auth signature (proves caller owns the private key).
|
|
158
|
+
// Preimage: abi.encode(domainTag, chainId, nonce, from, tokenAddress, amount, bridgeAddress, depositCalldata, timestamp)
|
|
159
|
+
// - Domain tag prevents cross-protocol signature collisions.
|
|
160
|
+
// - chainId prevents cross-chain replay.
|
|
161
|
+
// - nonce (random 32 bytes) prevents in-protocol replay; backend must track used nonces.
|
|
162
|
+
// - abi.encode (not encodePacked) eliminates dynamic-field collision ambiguity.
|
|
163
|
+
const timestamp = Math.floor(Date.now() / 1000);
|
|
164
|
+
const nonceBytes = crypto.getRandomValues(new Uint8Array(32));
|
|
165
|
+
const nonce = `0x${Array.from(nonceBytes, (b) => b.toString(16).padStart(2, '0')).join('')}`;
|
|
166
|
+
const DOMAIN_TAG = 'AllSet Portal authSig v1';
|
|
167
|
+
const msgHash = keccak256(encodeAbiParameters([
|
|
168
|
+
{ type: 'string' },
|
|
169
|
+
{ type: 'uint256' },
|
|
170
|
+
{ type: 'bytes32' },
|
|
171
|
+
{ type: 'address' },
|
|
172
|
+
{ type: 'address' },
|
|
173
|
+
{ type: 'uint256' },
|
|
174
|
+
{ type: 'address' },
|
|
175
|
+
{ type: 'bytes' },
|
|
176
|
+
{ type: 'uint256' },
|
|
177
|
+
], [
|
|
178
|
+
DOMAIN_TAG,
|
|
179
|
+
BigInt(chainId),
|
|
180
|
+
nonce,
|
|
181
|
+
eoa.address,
|
|
182
|
+
tokenAddress,
|
|
183
|
+
amount,
|
|
184
|
+
bridgeAddress,
|
|
185
|
+
depositCalldata,
|
|
186
|
+
BigInt(timestamp),
|
|
187
|
+
]));
|
|
188
|
+
const authSig = await eoa.signMessage({ message: { raw: msgHash } });
|
|
189
|
+
// Step 3: POST /userop/prepare (3 attempts with exponential backoff: 0, 500, 1500ms)
|
|
190
|
+
const prepareReq = {
|
|
191
|
+
rpcUrl,
|
|
192
|
+
from: eoa.address,
|
|
193
|
+
tokenAddress,
|
|
194
|
+
amount: amount.toString(),
|
|
195
|
+
bridgeAddress,
|
|
196
|
+
depositCalldata,
|
|
197
|
+
chainId,
|
|
198
|
+
nonce,
|
|
199
|
+
timestamp,
|
|
200
|
+
authSig,
|
|
201
|
+
};
|
|
202
|
+
const PREPARE_DELAYS = [0, 500, 1500];
|
|
203
|
+
let prepared;
|
|
204
|
+
for (let attempt = 0; attempt < PREPARE_DELAYS.length; attempt++) {
|
|
205
|
+
if (PREPARE_DELAYS[attempt] > 0) {
|
|
206
|
+
await new Promise((r) => setTimeout(r, PREPARE_DELAYS[attempt]));
|
|
207
|
+
}
|
|
208
|
+
try {
|
|
209
|
+
prepared = await postJson(`${allsetApiUrl}/userop/prepare`, prepareReq, requestTimeoutMs);
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
catch (e) {
|
|
213
|
+
const isLast = attempt === PREPARE_DELAYS.length - 1;
|
|
214
|
+
// Retry on network errors and 5xx/429 (message contains status code)
|
|
215
|
+
const msg = e.message ?? '';
|
|
216
|
+
const isRetryable = !msg.match(/POST .+ failed \([1-4][0-9]{2}\)/) || msg.includes('(429)') || msg.includes('(5');
|
|
217
|
+
if (isLast || !isRetryable)
|
|
218
|
+
throw e;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
// Step 4: Pin delegate address against trusted allowlist
|
|
222
|
+
if (!TRUSTED_DELEGATES.has(prepared.delegate7702Address.toLowerCase())) {
|
|
223
|
+
throw new Error(`smartDeposit: untrusted delegate address returned by backend: ${prepared.delegate7702Address}`);
|
|
224
|
+
}
|
|
225
|
+
// Step 5: Sign EIP-7702 authorization.
|
|
226
|
+
// We always re-sign to ensure the EOA is delegated to the correct v0.8 impl,
|
|
227
|
+
// even if a prior (possibly outdated) delegation exists.
|
|
228
|
+
let eip7702Auth;
|
|
229
|
+
if (prepared.needsAuthorization) {
|
|
230
|
+
// Use 'pending' so mempool txs from this EOA are counted in the nonce.
|
|
231
|
+
const accountNonce = await publicClient.getTransactionCount({
|
|
232
|
+
address: eoa.address,
|
|
233
|
+
blockTag: 'pending',
|
|
234
|
+
});
|
|
235
|
+
const signed = await eoa.signAuthorization({
|
|
236
|
+
address: prepared.delegate7702Address,
|
|
237
|
+
chainId,
|
|
238
|
+
nonce: accountNonce,
|
|
239
|
+
});
|
|
240
|
+
const yParity = signed.yParity ?? 0;
|
|
241
|
+
eip7702Auth = {
|
|
242
|
+
address: prepared.delegate7702Address,
|
|
243
|
+
chainId: toEvenHex(chainId),
|
|
244
|
+
nonce: toEvenHex(accountNonce),
|
|
245
|
+
yParity: toEvenHex(yParity),
|
|
246
|
+
r: `0x${BigInt(signed.r).toString(16).padStart(64, '0')}`,
|
|
247
|
+
s: `0x${BigInt(signed.s).toString(16).padStart(64, '0')}`,
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
// Step 6: Parse backend response + sign UserOperation (v0.8 uses EIP-712 typed data)
|
|
251
|
+
const userOpToSign = parseUserOp(prepared.unsignedUserOp);
|
|
252
|
+
// v0.8 requires EIP-712 signTypedData, NOT signMessage/personal_sign
|
|
253
|
+
const typedData = getUserOperationTypedData({
|
|
254
|
+
chainId,
|
|
255
|
+
entryPointAddress: ENTRY_POINT_V08,
|
|
256
|
+
userOperation: { ...userOpToSign, signature: '0x' },
|
|
257
|
+
});
|
|
258
|
+
const signature = await eoa.signTypedData(typedData);
|
|
259
|
+
const signedUserOp = { ...userOpToSign, signature };
|
|
260
|
+
// Step 7: POST /userop/submit (single attempt — UserOps are not idempotent)
|
|
261
|
+
const serialized = serializeUserOp(signedUserOp);
|
|
262
|
+
if (eip7702Auth) {
|
|
263
|
+
serialized.eip7702Auth = eip7702Auth;
|
|
264
|
+
}
|
|
265
|
+
const submitReq = {
|
|
266
|
+
rpcUrl,
|
|
267
|
+
signedUserOp: serialized,
|
|
268
|
+
};
|
|
269
|
+
const { txHash, userOpHash: returnedUserOpHash } = await postJson(`${allsetApiUrl}/userop/submit`, submitReq, requestTimeoutMs);
|
|
270
|
+
return {
|
|
271
|
+
txHash,
|
|
272
|
+
userOpHash: returnedUserOpHash,
|
|
273
|
+
userAddress: eoa.address,
|
|
274
|
+
};
|
|
275
|
+
}
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from '../core/index.js';
|
|
2
|
+
export * from './eip7702.js';
|
|
2
3
|
export { AllSetProvider, getAllSetDir, getEvmKeysDir as getAllSetEvmKeysDir, ensureAllSetDirs, initUserConfig, } from './provider.js';
|
|
3
4
|
export { createEvmExecutor, createEvmWallet, getEvmKeysDir, } from './evm-executor.js';
|
|
4
5
|
export { loadNetworksConfig, getNetworkConfig, getChainConfig, getTokenConfig, clearConfigCache, } from './config.js';
|
package/dist/node/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAE7B,OAAO,EACL,cAAc,EACd,YAAY,EACZ,aAAa,IAAI,mBAAmB,EACpC,gBAAgB,EAChB,cAAc,GACf,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,aAAa,GACd,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,gBAAgB,GACjB,MAAM,aAAa,CAAC;AAErB,YAAY,EACV,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAChE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC9F,YAAY,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE3D,wBAAsB,OAAO,CAC3B,GAAG,IAAI,EAAE,UAAU,CAAC,cAAc,aAAa,EAAE,OAAO,CAAC,GACxD,UAAU,CAAC,cAAc,aAAa,EAAE,OAAO,CAAC,CAGlD;AAED,wBAAsB,aAAa,CACjC,GAAG,IAAI,EAAE,UAAU,CAAC,cAAc,aAAa,EAAE,aAAa,CAAC,GAC9D,UAAU,CAAC,cAAc,aAAa,EAAE,aAAa,CAAC,CAGxD;AAED,wBAAsB,aAAa,CACjC,GAAG,IAAI,EAAE,UAAU,CAAC,cAAc,aAAa,EAAE,aAAa,CAAC,GAC9D,UAAU,CAAC,cAAc,aAAa,EAAE,aAAa,CAAC,CAGxD"}
|
package/dist/node/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from '../core/index.js';
|
|
2
|
+
export * from './eip7702.js';
|
|
2
3
|
export { AllSetProvider, getAllSetDir, getEvmKeysDir as getAllSetEvmKeysDir, ensureAllSetDirs, initUserConfig, } from './provider.js';
|
|
3
4
|
export { createEvmExecutor, createEvmWallet, getEvmKeysDir, } from './evm-executor.js';
|
|
4
5
|
export { loadNetworksConfig, getNetworkConfig, getChainConfig, getTokenConfig, clearConfigCache, } from './config.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fastxyz/allset-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "AllSet SDK for AllSet bridge flows between Fast and EVM testnets",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"allset",
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@fastxyz/sdk": "^0.2.5",
|
|
78
78
|
"@types/node": "^22.19.11",
|
|
79
|
+
"permissionless": "^0.3",
|
|
79
80
|
"tsx": "^4.21.0",
|
|
80
81
|
"typescript": "^5.9.3"
|
|
81
82
|
}
|