@armory-sh/client-ethers 0.2.13 → 0.2.15
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/index.d.ts +18 -37
- package/dist/index.js +19 -183
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,60 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { Address, BalanceOfParams, CAIP2ChainId, CAIPAssetId, EIP712_TYPES, ERC20_ABI, Extensions, NETWORKS, NetworkConfig, PayToV2, PaymentPayload,
|
|
1
|
+
import { PaymentRequirementsV2, Address, PaymentPayloadV2, CustomToken } from '@armory-sh/base';
|
|
2
|
+
export { Address, BalanceOfParams, CAIP2ChainId, CAIPAssetId, EIP712_TYPES, ERC20_ABI, Extensions, NETWORKS, NetworkConfig, PayToV2, PaymentPayload, PaymentPayloadV2, PaymentRequirements, PaymentRequirementsV2, SettlementResponse, SettlementResponseV2, Signature, TransferWithAuthorizationParams, V2_HEADERS, createEIP712Domain, createTransferWithAuthorization, decodePayment, decodePaymentV2, decodeSettlementV2, detectPaymentVersion, encodePaymentV2, encodeSettlementV2, getMainnets, getNetworkByChainId, getNetworkConfig, getTestnets, getTxHash, isCAIP2ChainId, isCAIPAssetId, isPaymentV2, isSettlementSuccessful, isSettlementV2, isX402V2PaymentRequired, safeBase64Decode, validateTransferWithAuthorization } from '@armory-sh/base';
|
|
3
3
|
import { Signer, Provider } from 'ethers';
|
|
4
4
|
export { Provider, Signer } from 'ethers';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* X402 Protocol Implementation for Ethers Client
|
|
7
|
+
* X402 Protocol Implementation for Ethers Client (V2 Only)
|
|
8
8
|
*
|
|
9
|
-
* Handles parsing x402
|
|
10
|
-
* and generating x402
|
|
9
|
+
* Handles parsing x402 V2 PAYMENT-REQUIRED headers
|
|
10
|
+
* and generating x402 V2 PAYMENT-SIGNATURE payloads
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Detect x402 protocol version from response headers
|
|
15
|
+
* V2-only: Always returns 2
|
|
15
16
|
*/
|
|
16
|
-
declare function detectX402Version(
|
|
17
|
+
declare function detectX402Version(_response: Response): 2;
|
|
18
|
+
/**
|
|
19
|
+
* Get payment header name for protocol version
|
|
20
|
+
*/
|
|
21
|
+
declare function getPaymentHeaderName(_version: 2): string;
|
|
17
22
|
interface ParsedPaymentRequirements {
|
|
18
|
-
version:
|
|
19
|
-
requirements:
|
|
23
|
+
version: 2;
|
|
24
|
+
requirements: PaymentRequirementsV2;
|
|
20
25
|
}
|
|
21
26
|
/**
|
|
22
27
|
* Parse x402 PAYMENT-REQUIRED header from response
|
|
23
|
-
*
|
|
28
|
+
* V2 only
|
|
24
29
|
*/
|
|
25
30
|
declare function parsePaymentRequired(response: Response): ParsedPaymentRequirements;
|
|
26
31
|
/**
|
|
27
|
-
* Create x402
|
|
28
|
-
*/
|
|
29
|
-
declare function createX402V1Payment(signer: Signer, requirements: X402PaymentRequirementsV1, fromAddress: Address, nonce: `0x${string}`, validBefore: number, domainName?: string, domainVersion?: string): Promise<X402PaymentPayloadV1>;
|
|
30
|
-
/**
|
|
31
|
-
* Create x402 V2 payment payload
|
|
32
|
+
* Create x402 payment payload (V2-only wrapper)
|
|
32
33
|
*/
|
|
33
|
-
declare function
|
|
34
|
-
/**
|
|
35
|
-
* Create x402 payment payload (auto-detects version)
|
|
36
|
-
*/
|
|
37
|
-
declare function createX402Payment(signer: Signer, parsed: ParsedPaymentRequirements, fromAddress: Address, nonce?: `0x${string}`, validBefore?: number, domainName?: string, domainVersion?: string): Promise<X402PaymentPayloadV1 | PaymentPayloadV2>;
|
|
34
|
+
declare function createX402Payment(signer: Signer, parsed: ParsedPaymentRequirements, fromAddress: Address, nonce?: `0x${string}`, validBefore?: number, domainName?: string, domainVersion?: string): Promise<PaymentPayloadV2>;
|
|
38
35
|
/**
|
|
39
36
|
* Encode x402 payment payload to Base64 for transport
|
|
40
37
|
*/
|
|
41
|
-
declare function encodeX402Payment(payload:
|
|
42
|
-
/**
|
|
43
|
-
* Get the correct header name for payment based on version
|
|
44
|
-
*/
|
|
45
|
-
declare function getPaymentHeaderName(version: 1 | 2): string;
|
|
46
|
-
/**
|
|
47
|
-
* @deprecated Use createX402Payment instead
|
|
48
|
-
*/
|
|
49
|
-
declare function createPaymentPayload(requirements: unknown, signer: Signer, from: string): Promise<[string, string]>;
|
|
50
|
-
/**
|
|
51
|
-
* @deprecated Use parsePaymentRequired instead
|
|
52
|
-
*/
|
|
53
|
-
declare function parsePaymentRequirements(response: Response): Promise<unknown>;
|
|
54
|
-
/**
|
|
55
|
-
* @deprecated Use detectX402Version instead
|
|
56
|
-
*/
|
|
57
|
-
declare function detectProtocolVersion(requirements: unknown): 1 | 2;
|
|
38
|
+
declare function encodeX402Payment(payload: PaymentPayloadV2): string;
|
|
58
39
|
|
|
59
40
|
declare class X402ClientError extends Error {
|
|
60
41
|
readonly cause?: unknown;
|
|
@@ -217,4 +198,4 @@ declare function createX402Client(config: X402ClientConfig & SignerClientConfig
|
|
|
217
198
|
}): X402Client;
|
|
218
199
|
declare function createX402Client(config: X402ClientConfig & ProviderClientConfig): X402Client;
|
|
219
200
|
|
|
220
|
-
export { AuthorizationError, type ClientConfig, type ParsedPaymentRequirements, PaymentError, ProviderRequiredError, SignerRequiredError, SigningError, type X402Client, type X402ClientConfig, X402ClientError, type X402RequestInit, type X402Transport, type X402TransportConfig,
|
|
201
|
+
export { AuthorizationError, type ClientConfig, type ParsedPaymentRequirements, PaymentError, ProviderRequiredError, SignerRequiredError, SigningError, type X402Client, type X402ClientConfig, X402ClientError, type X402RequestInit, type X402Transport, type X402TransportConfig, createX402Client, createX402Payment, createX402Transport, detectX402Version, encodeX402Payment, getPaymentHeaderName, parsePaymentRequired, recoverEIP3009Signer, signEIP3009, signEIP3009WithDomain, signPayment };
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
2
|
import {
|
|
3
|
-
V1_HEADERS as V1_HEADERS3,
|
|
4
3
|
V2_HEADERS as V2_HEADERS3,
|
|
5
|
-
isV1,
|
|
6
|
-
isV2,
|
|
7
|
-
getPaymentVersion,
|
|
8
|
-
getRequirementsVersion,
|
|
9
|
-
getSettlementVersion,
|
|
10
|
-
getPaymentHeaderName as getPaymentHeaderName2,
|
|
11
|
-
getPaymentResponseHeaderName,
|
|
12
|
-
getPaymentRequiredHeaderName,
|
|
13
4
|
isSettlementSuccessful as isSettlementSuccessful2,
|
|
14
5
|
getTxHash,
|
|
15
6
|
NETWORKS,
|
|
@@ -18,41 +9,28 @@ import {
|
|
|
18
9
|
getMainnets,
|
|
19
10
|
getTestnets,
|
|
20
11
|
ERC20_ABI,
|
|
21
|
-
encodePaymentV1,
|
|
22
|
-
decodePaymentV1,
|
|
23
|
-
encodeSettlementV1,
|
|
24
|
-
decodeSettlementV1,
|
|
25
12
|
encodePaymentV2,
|
|
26
13
|
decodePaymentV2,
|
|
27
14
|
encodeSettlementV2,
|
|
28
|
-
decodeSettlementV2,
|
|
15
|
+
decodeSettlementV2 as decodeSettlementV22,
|
|
29
16
|
detectPaymentVersion,
|
|
30
17
|
decodePayment,
|
|
31
|
-
decodeSettlementLegacy as decodeSettlementLegacy2,
|
|
32
|
-
isPaymentV1,
|
|
33
18
|
isPaymentV2,
|
|
34
|
-
isSettlementV1,
|
|
35
19
|
isSettlementV2,
|
|
36
|
-
isX402V1PaymentRequired as isX402V1PaymentRequired2,
|
|
37
20
|
isX402V2PaymentRequired as isX402V2PaymentRequired2,
|
|
38
|
-
isX402V1Requirements as isX402V1Requirements2,
|
|
39
21
|
EIP712_TYPES as EIP712_TYPES2,
|
|
40
22
|
createEIP712Domain as createEIP712Domain3,
|
|
41
23
|
createTransferWithAuthorization as createTransferWithAuthorization2,
|
|
42
24
|
validateTransferWithAuthorization,
|
|
43
25
|
isCAIP2ChainId,
|
|
44
26
|
isCAIPAssetId,
|
|
45
|
-
safeBase64Decode
|
|
27
|
+
safeBase64Decode
|
|
46
28
|
} from "@armory-sh/base";
|
|
47
29
|
|
|
48
30
|
// src/protocol.ts
|
|
49
31
|
import {
|
|
50
|
-
V1_HEADERS,
|
|
51
32
|
V2_HEADERS,
|
|
52
|
-
safeBase64Decode,
|
|
53
|
-
isX402V1PaymentRequired,
|
|
54
33
|
isX402V2PaymentRequired,
|
|
55
|
-
isX402V1Requirements,
|
|
56
34
|
getNetworkByChainId,
|
|
57
35
|
getNetworkConfig,
|
|
58
36
|
createEIP712Domain as createEIP712Domain2,
|
|
@@ -173,71 +151,32 @@ async function recoverEIP3009Signer(params, signature, domain) {
|
|
|
173
151
|
}
|
|
174
152
|
|
|
175
153
|
// src/protocol.ts
|
|
176
|
-
function detectX402Version(
|
|
177
|
-
const v2Header = response.headers.get(V2_HEADERS.PAYMENT_REQUIRED);
|
|
178
|
-
if (v2Header) {
|
|
179
|
-
try {
|
|
180
|
-
const parsed = JSON.parse(v2Header);
|
|
181
|
-
if (parsed.x402Version === 2) return 2;
|
|
182
|
-
} catch {
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
const v1Header = response.headers.get(V1_HEADERS.PAYMENT_REQUIRED);
|
|
186
|
-
if (v1Header) {
|
|
187
|
-
try {
|
|
188
|
-
const decoded = safeBase64Decode(v1Header);
|
|
189
|
-
const parsed = JSON.parse(decoded);
|
|
190
|
-
if (parsed.x402Version === 1) return 1;
|
|
191
|
-
return 1;
|
|
192
|
-
} catch {
|
|
193
|
-
}
|
|
194
|
-
}
|
|
154
|
+
function detectX402Version(_response) {
|
|
195
155
|
return 2;
|
|
196
156
|
}
|
|
157
|
+
function getPaymentHeaderName(_version) {
|
|
158
|
+
return V2_HEADERS.PAYMENT_SIGNATURE;
|
|
159
|
+
}
|
|
197
160
|
function parsePaymentRequired(response) {
|
|
198
|
-
const
|
|
199
|
-
if (
|
|
200
|
-
|
|
201
|
-
if (!v2Header) {
|
|
202
|
-
throw new PaymentError("No PAYMENT-REQUIRED header found in 402 response");
|
|
203
|
-
}
|
|
204
|
-
try {
|
|
205
|
-
const parsed = JSON.parse(v2Header);
|
|
206
|
-
if (!isX402V2PaymentRequired(parsed)) {
|
|
207
|
-
throw new PaymentError("Invalid x402 V2 payment required format");
|
|
208
|
-
}
|
|
209
|
-
if (!parsed.accepts || parsed.accepts.length === 0) {
|
|
210
|
-
throw new PaymentError("No payment requirements found in accepts array");
|
|
211
|
-
}
|
|
212
|
-
return {
|
|
213
|
-
version: 2,
|
|
214
|
-
requirements: parsed.accepts[0]
|
|
215
|
-
};
|
|
216
|
-
} catch (error) {
|
|
217
|
-
if (error instanceof PaymentError) throw error;
|
|
218
|
-
throw new PaymentError(`Failed to parse V2 PAYMENT-REQUIRED header: ${error}`);
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
const v1Header = response.headers.get(V1_HEADERS.PAYMENT_REQUIRED);
|
|
222
|
-
if (!v1Header) {
|
|
223
|
-
throw new PaymentError("No X-PAYMENT-REQUIRED header found in 402 response");
|
|
161
|
+
const v2Header = response.headers.get(V2_HEADERS.PAYMENT_REQUIRED);
|
|
162
|
+
if (!v2Header) {
|
|
163
|
+
throw new PaymentError("No PAYMENT-REQUIRED header found in V2 response");
|
|
224
164
|
}
|
|
225
165
|
try {
|
|
226
|
-
const
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
throw new PaymentError("Invalid x402 V1 payment required format");
|
|
166
|
+
const parsed = JSON.parse(v2Header);
|
|
167
|
+
if (!isX402V2PaymentRequired(parsed)) {
|
|
168
|
+
throw new PaymentError("Invalid x402 V2 payment required format");
|
|
230
169
|
}
|
|
231
170
|
if (!parsed.accepts || parsed.accepts.length === 0) {
|
|
232
171
|
throw new PaymentError("No payment requirements found in accepts array");
|
|
233
172
|
}
|
|
234
173
|
return {
|
|
235
|
-
version:
|
|
174
|
+
version: 2,
|
|
236
175
|
requirements: parsed.accepts[0]
|
|
237
176
|
};
|
|
238
177
|
} catch (error) {
|
|
239
178
|
if (error instanceof PaymentError) throw error;
|
|
240
|
-
throw new PaymentError(`Failed to parse
|
|
179
|
+
throw new PaymentError(`Failed to parse V2 PAYMENT-REQUIRED header: ${error}`);
|
|
241
180
|
}
|
|
242
181
|
}
|
|
243
182
|
function toAtomicUnits(amount) {
|
|
@@ -253,56 +192,10 @@ function extractChainId(network) {
|
|
|
253
192
|
}
|
|
254
193
|
throw new PaymentError(`Unsupported network: ${network}`);
|
|
255
194
|
}
|
|
256
|
-
function getNetworkSlug(network) {
|
|
257
|
-
if (network.startsWith("eip155:")) {
|
|
258
|
-
const chainId = parseInt(network.split(":")[1], 10);
|
|
259
|
-
const net = getNetworkByChainId(chainId);
|
|
260
|
-
if (!net) {
|
|
261
|
-
throw new PaymentError(`No network config found for chainId: ${chainId}`);
|
|
262
|
-
}
|
|
263
|
-
return normalizeNetworkName(net.name);
|
|
264
|
-
}
|
|
265
|
-
return normalizeNetworkName(network);
|
|
266
|
-
}
|
|
267
195
|
function createNonce() {
|
|
268
196
|
const now = Math.floor(Date.now() / 1e3);
|
|
269
197
|
return `0x${(now * 1e3).toString(16).padStart(64, "0")}`;
|
|
270
198
|
}
|
|
271
|
-
async function createX402V1Payment(signer, requirements, fromAddress, nonce, validBefore, domainName, domainVersion) {
|
|
272
|
-
const network = getNetworkSlug(requirements.network);
|
|
273
|
-
const contractAddress = requirements.asset;
|
|
274
|
-
const chainId = extractChainId(requirements.network);
|
|
275
|
-
const domain = createEIP712Domain2(chainId, contractAddress);
|
|
276
|
-
const customDomain = domainName || domainVersion ? { ...domain, name: domainName ?? domain.name, version: domainVersion ?? domain.version } : domain;
|
|
277
|
-
const authorization = {
|
|
278
|
-
from: fromAddress,
|
|
279
|
-
to: requirements.payTo,
|
|
280
|
-
value: toAtomicUnits(requirements.maxAmountRequired),
|
|
281
|
-
validAfter: "0",
|
|
282
|
-
validBefore: validBefore.toString(),
|
|
283
|
-
nonce
|
|
284
|
-
};
|
|
285
|
-
const authParams = {
|
|
286
|
-
from: authorization.from,
|
|
287
|
-
to: authorization.to,
|
|
288
|
-
value: BigInt(authorization.value),
|
|
289
|
-
validAfter: BigInt(authorization.validAfter),
|
|
290
|
-
validBefore: BigInt(authorization.validBefore),
|
|
291
|
-
nonce: BigInt(authorization.nonce)
|
|
292
|
-
};
|
|
293
|
-
const signature = await signEIP3009(signer, authParams, customDomain);
|
|
294
|
-
const combinedSignature = `0x${signature.r.slice(2)}${signature.s.slice(2)}${signature.v.toString(16).padStart(2, "0")}`;
|
|
295
|
-
const payload = {
|
|
296
|
-
signature: combinedSignature,
|
|
297
|
-
authorization
|
|
298
|
-
};
|
|
299
|
-
return {
|
|
300
|
-
x402Version: 1,
|
|
301
|
-
scheme: "exact",
|
|
302
|
-
network,
|
|
303
|
-
payload
|
|
304
|
-
};
|
|
305
|
-
}
|
|
306
199
|
async function createX402V2Payment(signer, requirements, fromAddress, nonce, validBefore, domainName, domainVersion) {
|
|
307
200
|
const contractAddress = requirements.asset;
|
|
308
201
|
const chainId = extractChainId(requirements.network);
|
|
@@ -340,17 +233,6 @@ async function createX402V2Payment(signer, requirements, fromAddress, nonce, val
|
|
|
340
233
|
async function createX402Payment(signer, parsed, fromAddress, nonce, validBefore, domainName, domainVersion) {
|
|
341
234
|
const effectiveNonce = nonce ?? createNonce();
|
|
342
235
|
const effectiveValidBefore = validBefore ?? Math.floor(Date.now() / 1e3) + 3600;
|
|
343
|
-
if (parsed.version === 1) {
|
|
344
|
-
return createX402V1Payment(
|
|
345
|
-
signer,
|
|
346
|
-
parsed.requirements,
|
|
347
|
-
fromAddress,
|
|
348
|
-
effectiveNonce,
|
|
349
|
-
effectiveValidBefore,
|
|
350
|
-
domainName,
|
|
351
|
-
domainVersion
|
|
352
|
-
);
|
|
353
|
-
}
|
|
354
236
|
return createX402V2Payment(
|
|
355
237
|
signer,
|
|
356
238
|
parsed.requirements,
|
|
@@ -364,34 +246,11 @@ async function createX402Payment(signer, parsed, fromAddress, nonce, validBefore
|
|
|
364
246
|
function encodeX402Payment(payload) {
|
|
365
247
|
return Buffer.from(JSON.stringify(payload)).toString("base64");
|
|
366
248
|
}
|
|
367
|
-
function getPaymentHeaderName(version) {
|
|
368
|
-
return version === 1 ? V1_HEADERS.PAYMENT : V2_HEADERS.PAYMENT_SIGNATURE;
|
|
369
|
-
}
|
|
370
|
-
async function createPaymentPayload(requirements, signer, from) {
|
|
371
|
-
const parsed = isX402V1Requirements(requirements) ? { version: 1, requirements } : { version: 2, requirements };
|
|
372
|
-
const payload = await createX402Payment(signer, parsed, from);
|
|
373
|
-
const encoded = encodeX402Payment(payload);
|
|
374
|
-
return [encoded, getPaymentHeaderName(parsed.version)];
|
|
375
|
-
}
|
|
376
|
-
async function parsePaymentRequirements(response) {
|
|
377
|
-
const parsed = parsePaymentRequired(response);
|
|
378
|
-
return parsed.requirements;
|
|
379
|
-
}
|
|
380
|
-
function detectProtocolVersion(requirements) {
|
|
381
|
-
if (typeof requirements === "object" && requirements !== null) {
|
|
382
|
-
if ("x402Version" in requirements && requirements.x402Version === 2) {
|
|
383
|
-
return 2;
|
|
384
|
-
}
|
|
385
|
-
if ("chainId" in requirements && "assetId" in requirements && !("contractAddress" in requirements)) {
|
|
386
|
-
return 2;
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
return 1;
|
|
390
|
-
}
|
|
391
249
|
|
|
392
250
|
// src/transport.ts
|
|
393
251
|
import {
|
|
394
|
-
|
|
252
|
+
decodeSettlementV2,
|
|
253
|
+
V2_HEADERS as V2_HEADERS2
|
|
395
254
|
} from "@armory-sh/base";
|
|
396
255
|
var defaultConfig = {
|
|
397
256
|
baseURL: "",
|
|
@@ -443,7 +302,7 @@ var handlePaymentRequired = async (state, response) => {
|
|
|
443
302
|
},
|
|
444
303
|
state.config.timeout
|
|
445
304
|
);
|
|
446
|
-
const settlement =
|
|
305
|
+
const settlement = decodeSettlementV2(paymentResponse.headers.get(V2_HEADERS2.PAYMENT_RESPONSE) || "");
|
|
447
306
|
return { success: true, settlement };
|
|
448
307
|
} catch (error) {
|
|
449
308
|
return { success: false, error: error instanceof Error ? error : new Error(String(error)) };
|
|
@@ -544,59 +403,36 @@ export {
|
|
|
544
403
|
ProviderRequiredError,
|
|
545
404
|
SignerRequiredError,
|
|
546
405
|
SigningError,
|
|
547
|
-
V1_HEADERS3 as V1_HEADERS,
|
|
548
406
|
V2_HEADERS3 as V2_HEADERS,
|
|
549
407
|
X402ClientError,
|
|
550
408
|
createEIP712Domain3 as createEIP712Domain,
|
|
551
|
-
createPaymentPayload,
|
|
552
409
|
createTransferWithAuthorization2 as createTransferWithAuthorization,
|
|
553
410
|
createX402Client,
|
|
554
411
|
createX402Payment,
|
|
555
412
|
createX402Transport,
|
|
556
|
-
createX402V1Payment,
|
|
557
|
-
createX402V2Payment,
|
|
558
413
|
decodePayment,
|
|
559
|
-
decodePaymentV1,
|
|
560
414
|
decodePaymentV2,
|
|
561
|
-
|
|
562
|
-
decodeSettlementV1,
|
|
563
|
-
decodeSettlementV2,
|
|
415
|
+
decodeSettlementV22 as decodeSettlementV2,
|
|
564
416
|
detectPaymentVersion,
|
|
565
|
-
detectProtocolVersion,
|
|
566
417
|
detectX402Version,
|
|
567
|
-
encodePaymentV1,
|
|
568
418
|
encodePaymentV2,
|
|
569
|
-
encodeSettlementV1,
|
|
570
419
|
encodeSettlementV2,
|
|
571
420
|
encodeX402Payment,
|
|
572
421
|
getMainnets,
|
|
573
422
|
getNetworkByChainId2 as getNetworkByChainId,
|
|
574
423
|
getNetworkConfig2 as getNetworkConfig,
|
|
575
424
|
getPaymentHeaderName,
|
|
576
|
-
getPaymentHeaderName2 as getPaymentHeaderNameBase,
|
|
577
|
-
getPaymentRequiredHeaderName,
|
|
578
|
-
getPaymentResponseHeaderName,
|
|
579
|
-
getPaymentVersion,
|
|
580
|
-
getRequirementsVersion,
|
|
581
|
-
getSettlementVersion,
|
|
582
425
|
getTestnets,
|
|
583
426
|
getTxHash,
|
|
584
427
|
isCAIP2ChainId,
|
|
585
428
|
isCAIPAssetId,
|
|
586
|
-
isPaymentV1,
|
|
587
429
|
isPaymentV2,
|
|
588
430
|
isSettlementSuccessful2 as isSettlementSuccessful,
|
|
589
|
-
isSettlementV1,
|
|
590
431
|
isSettlementV2,
|
|
591
|
-
isV1,
|
|
592
|
-
isV2,
|
|
593
|
-
isX402V1PaymentRequired2 as isX402V1PaymentRequired,
|
|
594
|
-
isX402V1Requirements2 as isX402V1Requirements,
|
|
595
432
|
isX402V2PaymentRequired2 as isX402V2PaymentRequired,
|
|
596
433
|
parsePaymentRequired,
|
|
597
|
-
parsePaymentRequirements,
|
|
598
434
|
recoverEIP3009Signer,
|
|
599
|
-
|
|
435
|
+
safeBase64Decode,
|
|
600
436
|
signEIP3009,
|
|
601
437
|
signEIP3009WithDomain,
|
|
602
438
|
signPayment,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@armory-sh/client-ethers",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.15",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Sawyer Cutler <sawyer@dirtroad.dev>",
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"directory": "packages/client-ethers"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@armory-sh/base": "^0.2.
|
|
30
|
+
"@armory-sh/base": "^0.2.16",
|
|
31
31
|
"ethers": "6.16.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|