sf-x402x 0.6.6-patch.4 → 0.7.1
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/cjs/client/index.d.ts +2 -2
- package/dist/cjs/client/index.js +63 -19
- package/dist/cjs/client/index.js.map +1 -1
- package/dist/{esm/config-CFBSAuxW.d.mts → cjs/config-21jxVzCt.d.ts} +1 -0
- package/dist/cjs/facilitator/index.d.ts +1 -1
- package/dist/cjs/facilitator/index.js +63 -19
- package/dist/cjs/facilitator/index.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +63 -19
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/middleware-5zVJ5R-N.d.ts +93 -0
- package/dist/cjs/middleware-BoF9HU5Q.d.ts +93 -0
- package/dist/{esm/network--RYzQfBg.d.mts → cjs/network-BkSsZzNC.d.ts} +3 -3
- package/dist/cjs/network-C6C2pEEd.d.ts +11 -0
- package/dist/cjs/paywall/index.d.ts +1 -1
- package/dist/cjs/paywall/index.js +51 -16
- package/dist/cjs/paywall/index.js.map +1 -1
- package/dist/{esm/rpc-22QIQWIu.d.mts → cjs/rpc-DY0HwxtK.d.ts} +1 -1
- package/dist/cjs/rpc-MOfP_dWc.d.ts +35 -0
- package/dist/cjs/schemes/index.d.ts +3 -3
- package/dist/cjs/schemes/index.js +63 -19
- package/dist/cjs/schemes/index.js.map +1 -1
- package/dist/cjs/shared/evm/index.d.ts +1 -1
- package/dist/cjs/shared/evm/index.js +51 -16
- package/dist/cjs/shared/evm/index.js.map +1 -1
- package/dist/cjs/shared/index.d.ts +5 -5
- package/dist/cjs/shared/index.js +64 -20
- package/dist/cjs/shared/index.js.map +1 -1
- package/dist/cjs/types/index.d.ts +10 -10
- package/dist/cjs/types/index.js +63 -19
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/verify/index.d.ts +3 -3
- package/dist/cjs/verify/index.js +12 -3
- package/dist/cjs/verify/index.js.map +1 -1
- package/dist/cjs/x402Specs-CVJIfBRW.d.ts +1306 -0
- package/dist/{esm/x402Specs-7OH8g851.d.mts → cjs/x402Specs-CqECt1ac.d.ts} +73 -73
- package/dist/esm/{chunk-C7SL4ONO.mjs → chunk-7CR43I2X.mjs} +4 -4
- package/dist/esm/{chunk-SN2GVMJC.mjs → chunk-APGH2ZMG.mjs} +5 -5
- package/dist/esm/{chunk-5UPAZUO6.mjs → chunk-HSK53UIF.mjs} +52 -17
- package/dist/esm/chunk-HSK53UIF.mjs.map +1 -0
- package/dist/esm/{chunk-7CWEZNFA.mjs → chunk-I6CSCN2G.mjs} +2 -2
- package/dist/esm/{chunk-AYSH47JL.mjs → chunk-NIZS4R7S.mjs} +3 -3
- package/dist/esm/{chunk-FVAAYH7O.mjs → chunk-UHOM6DSU.mjs} +16 -7
- package/dist/esm/chunk-UHOM6DSU.mjs.map +1 -0
- package/dist/esm/{chunk-LVNQSDEB.mjs → chunk-XRTZ74UG.mjs} +3 -3
- package/dist/esm/client/index.d.mts +2 -2
- package/dist/esm/client/index.mjs +5 -5
- package/dist/esm/config-21jxVzCt.d.mts +11 -0
- package/dist/esm/facilitator/index.d.mts +1 -1
- package/dist/esm/facilitator/index.mjs +6 -6
- package/dist/esm/index.d.mts +2 -2
- package/dist/esm/index.mjs +7 -7
- package/dist/esm/{middleware-CAOp-bv4.d.mts → middleware-meOELdk2.d.mts} +2 -2
- package/dist/esm/network-C6C2pEEd.d.mts +11 -0
- package/dist/esm/paywall/index.d.mts +1 -1
- package/dist/esm/paywall/index.mjs +1 -1
- package/dist/esm/rpc-CFPA2oz6.d.mts +35 -0
- package/dist/esm/schemes/index.d.mts +3 -3
- package/dist/esm/schemes/index.mjs +5 -5
- package/dist/esm/shared/evm/index.d.mts +1 -1
- package/dist/esm/shared/evm/index.mjs +2 -2
- package/dist/esm/shared/index.d.mts +5 -5
- package/dist/esm/shared/index.mjs +3 -3
- package/dist/esm/types/index.d.mts +10 -10
- package/dist/esm/types/index.mjs +3 -3
- package/dist/esm/verify/index.d.mts +3 -3
- package/dist/esm/verify/index.mjs +3 -3
- package/dist/esm/x402Specs-CVJIfBRW.d.mts +1306 -0
- package/package.json +1 -1
- package/dist/esm/chunk-5UPAZUO6.mjs.map +0 -1
- package/dist/esm/chunk-FVAAYH7O.mjs.map +0 -1
- /package/dist/esm/{chunk-C7SL4ONO.mjs.map → chunk-7CR43I2X.mjs.map} +0 -0
- /package/dist/esm/{chunk-SN2GVMJC.mjs.map → chunk-APGH2ZMG.mjs.map} +0 -0
- /package/dist/esm/{chunk-7CWEZNFA.mjs.map → chunk-I6CSCN2G.mjs.map} +0 -0
- /package/dist/esm/{chunk-AYSH47JL.mjs.map → chunk-NIZS4R7S.mjs.map} +0 -0
- /package/dist/esm/{chunk-LVNQSDEB.mjs.map → chunk-XRTZ74UG.mjs.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RpcDevnet, SolanaRpcApiDevnet, RpcMainnet, SolanaRpcApiMainnet, RpcSubscriptionsFromTransport, SolanaRpcSubscriptionsApi, RpcSubscriptionsTransportFromClusterUrl, ClusterUrl } from '@solana/kit';
|
|
2
|
-
import { N as Network } from './network
|
|
2
|
+
import { N as Network } from './network-C6C2pEEd.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Creates a Solana RPC client for the devnet network.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { RpcDevnet, SolanaRpcApiDevnet, RpcMainnet, SolanaRpcApiMainnet, RpcSubscriptionsFromTransport, SolanaRpcSubscriptionsApi, RpcSubscriptionsTransportFromClusterUrl, ClusterUrl } from '@solana/kit';
|
|
2
|
+
import { N as Network } from './network-BkSsZzNC.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Creates a Solana RPC client for the devnet network.
|
|
6
|
+
*
|
|
7
|
+
* @param url - Optional URL of the devnet network.
|
|
8
|
+
* @returns A Solana RPC client.
|
|
9
|
+
*/
|
|
10
|
+
declare function createDevnetRpcClient(url?: string): RpcDevnet<SolanaRpcApiDevnet>;
|
|
11
|
+
/**
|
|
12
|
+
* Creates a Solana RPC client for the mainnet network.
|
|
13
|
+
*
|
|
14
|
+
* @param url - Optional URL of the mainnet network.
|
|
15
|
+
* @returns A Solana RPC client.
|
|
16
|
+
*/
|
|
17
|
+
declare function createMainnetRpcClient(url?: string): RpcMainnet<SolanaRpcApiMainnet>;
|
|
18
|
+
/**
|
|
19
|
+
* Gets the RPC client for the given network.
|
|
20
|
+
*
|
|
21
|
+
* @param network - The network to get the RPC client for
|
|
22
|
+
* @param url - Optional URL of the network. If not provided, the default URL will be used.
|
|
23
|
+
* @returns The RPC client for the given network
|
|
24
|
+
*/
|
|
25
|
+
declare function getRpcClient(network: Network, url?: string): RpcDevnet<SolanaRpcApiDevnet> | RpcMainnet<SolanaRpcApiMainnet>;
|
|
26
|
+
/**
|
|
27
|
+
* Gets the RPC subscriptions for the given network.
|
|
28
|
+
*
|
|
29
|
+
* @param network - The network to get the RPC subscriptions for
|
|
30
|
+
* @param url - Optional URL of the network. If not provided, the default URL will be used.
|
|
31
|
+
* @returns The RPC subscriptions for the given network
|
|
32
|
+
*/
|
|
33
|
+
declare function getRpcSubscriptions(network: Network, url?: string): RpcSubscriptionsFromTransport<SolanaRpcSubscriptionsApi, RpcSubscriptionsTransportFromClusterUrl<ClusterUrl>>;
|
|
34
|
+
|
|
35
|
+
export { createMainnetRpcClient as a, getRpcSubscriptions as b, createDevnetRpcClient as c, getRpcClient as g };
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Address, Transport, Chain, LocalAccount, Account } from 'viem';
|
|
2
2
|
import { S as SignerWallet, C as ConnectedClient } from '../wallet-BReyvAJs.js';
|
|
3
|
-
import { P as PaymentRequirements, U as UnsignedPaymentPayload, a as PaymentPayload, u as VerifyResponse, S as SettleResponse, b as ErrorReasons, E as ExactSvmPayload } from '../x402Specs-
|
|
3
|
+
import { P as PaymentRequirements, U as UnsignedPaymentPayload, a as PaymentPayload, u as VerifyResponse, S as SettleResponse, b as ErrorReasons, E as ExactSvmPayload } from '../x402Specs-CVJIfBRW.js';
|
|
4
4
|
import { X as X402Config } from '../config-Dfuvno71.js';
|
|
5
5
|
import { KeyPairSigner, signTransaction, RpcDevnet, SolanaRpcApiDevnet, RpcMainnet, SolanaRpcApiMainnet, SendTransactionApi, CompilableTransactionMessage, Instruction, AccountLookupMeta, AccountMeta } from '@solana/kit';
|
|
6
|
-
import { b as getRpcSubscriptions } from '../rpc-
|
|
6
|
+
import { b as getRpcSubscriptions } from '../rpc-DY0HwxtK.js';
|
|
7
7
|
import * as _solana_program_token from '@solana-program/token';
|
|
8
8
|
import { parseTransferCheckedInstruction } from '@solana-program/token-2022';
|
|
9
9
|
import 'viem/chains';
|
|
10
10
|
import 'zod';
|
|
11
|
-
import '../network
|
|
11
|
+
import '../network-C6C2pEEd.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Prepares an unsigned payment header with the given sender address and payment requirements.
|
|
@@ -51,71 +51,106 @@ __export(evm_exports2, {
|
|
|
51
51
|
var config = {
|
|
52
52
|
"84532": {
|
|
53
53
|
usdcAddress: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
|
|
54
|
-
usdcName: "USDC"
|
|
54
|
+
usdcName: "USDC",
|
|
55
|
+
decimals: 6
|
|
55
56
|
},
|
|
56
57
|
"8453": {
|
|
57
58
|
usdcAddress: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
58
|
-
usdcName: "USD Coin"
|
|
59
|
+
usdcName: "USD Coin",
|
|
60
|
+
decimals: 6
|
|
59
61
|
},
|
|
60
62
|
"43113": {
|
|
61
63
|
usdcAddress: "0x5425890298aed601595a70AB815c96711a31Bc65",
|
|
62
|
-
usdcName: "USD Coin"
|
|
64
|
+
usdcName: "USD Coin",
|
|
65
|
+
decimals: 6
|
|
63
66
|
},
|
|
64
67
|
"43114": {
|
|
65
68
|
usdcAddress: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
|
|
66
|
-
usdcName: "USD Coin"
|
|
69
|
+
usdcName: "USD Coin",
|
|
70
|
+
decimals: 6
|
|
67
71
|
},
|
|
68
72
|
"4689": {
|
|
69
73
|
usdcAddress: "0xcdf79194c6c285077a58da47641d4dbe51f63542",
|
|
70
|
-
usdcName: "Bridged USDC"
|
|
74
|
+
usdcName: "Bridged USDC",
|
|
75
|
+
decimals: 6
|
|
71
76
|
},
|
|
72
77
|
// solana devnet
|
|
73
78
|
"103": {
|
|
74
79
|
usdcAddress: "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU",
|
|
75
|
-
usdcName: "USDC"
|
|
80
|
+
usdcName: "USDC",
|
|
81
|
+
decimals: 6
|
|
76
82
|
},
|
|
77
83
|
// solana mainnet
|
|
78
84
|
"101": {
|
|
79
85
|
usdcAddress: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
|
80
|
-
usdcName: "USDC"
|
|
86
|
+
usdcName: "USDC",
|
|
87
|
+
decimals: 6
|
|
81
88
|
},
|
|
82
89
|
"1328": {
|
|
83
90
|
usdcAddress: "0x4fcf1784b31630811181f670aea7a7bef803eaed",
|
|
84
|
-
usdcName: "USDC"
|
|
91
|
+
usdcName: "USDC",
|
|
92
|
+
decimals: 6
|
|
85
93
|
},
|
|
86
94
|
"1329": {
|
|
87
95
|
usdcAddress: "0xe15fc38f6d8c56af07bbcbe3baf5708a2bf42392",
|
|
88
|
-
usdcName: "USDC"
|
|
96
|
+
usdcName: "USDC",
|
|
97
|
+
decimals: 6
|
|
89
98
|
},
|
|
90
99
|
"137": {
|
|
91
100
|
usdcAddress: "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
|
|
92
|
-
usdcName: "USD Coin"
|
|
101
|
+
usdcName: "USD Coin",
|
|
102
|
+
decimals: 6
|
|
93
103
|
},
|
|
94
104
|
"80002": {
|
|
95
105
|
usdcAddress: "0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582",
|
|
96
|
-
usdcName: "USDC"
|
|
106
|
+
usdcName: "USDC",
|
|
107
|
+
decimals: 6
|
|
97
108
|
},
|
|
98
109
|
"3338": {
|
|
99
110
|
usdcAddress: "0xbbA60da06c2c5424f03f7434542280FCAd453d10",
|
|
100
|
-
usdcName: "USDC"
|
|
111
|
+
usdcName: "USDC",
|
|
112
|
+
decimals: 6
|
|
101
113
|
},
|
|
102
114
|
"196": {
|
|
103
115
|
usdcAddress: "0x74b7f16337b8972027f6196a17a631ac6de26d22",
|
|
104
|
-
usdcName: "USD Coin"
|
|
116
|
+
usdcName: "USD Coin",
|
|
117
|
+
decimals: 6
|
|
105
118
|
},
|
|
106
119
|
"1952": {
|
|
107
120
|
usdcAddress: "0xcb8bf24c6ce16ad21d707c9505421a17f2bec79d",
|
|
108
|
-
usdcName: "USDC_TEST"
|
|
121
|
+
usdcName: "USDC_TEST",
|
|
122
|
+
decimals: 6
|
|
123
|
+
},
|
|
124
|
+
// ethereum mainnet
|
|
125
|
+
"1": {
|
|
126
|
+
usdcAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
127
|
+
usdcName: "USD Coin",
|
|
128
|
+
decimals: 6
|
|
109
129
|
},
|
|
110
130
|
// sepolia - using JPYC (JPY Coin)
|
|
111
131
|
"11155111": {
|
|
112
132
|
usdcAddress: "0xE7C3D8C9a439feDe00D2600032D5dB0Be71C3c29",
|
|
113
|
-
usdcName: "JPY Coin"
|
|
133
|
+
usdcName: "JPY Coin",
|
|
134
|
+
decimals: 18
|
|
135
|
+
// JPYC uses 18 decimals
|
|
136
|
+
},
|
|
137
|
+
// filecoin mainnet
|
|
138
|
+
"314": {
|
|
139
|
+
usdcAddress: "0x2421db204968A367CC2C866CD057fA754Cb84EdF",
|
|
140
|
+
usdcName: "USD Coin",
|
|
141
|
+
decimals: 6
|
|
114
142
|
},
|
|
115
143
|
// filecoin-calibration - using USD for Filecoin Community
|
|
116
144
|
"314159": {
|
|
117
145
|
usdcAddress: "0xb3042734b608a1B16e9e86B374A3f3e389B4cDf0",
|
|
118
|
-
usdcName: "USD for Filecoin Community"
|
|
146
|
+
usdcName: "USD for Filecoin Community",
|
|
147
|
+
decimals: 6
|
|
148
|
+
},
|
|
149
|
+
// skale-base-sepolia - using same USDC as Base Sepolia
|
|
150
|
+
"324705682": {
|
|
151
|
+
usdcAddress: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
|
|
152
|
+
usdcName: "USDC",
|
|
153
|
+
decimals: 6
|
|
119
154
|
}
|
|
120
155
|
};
|
|
121
156
|
|
|
@@ -951,13 +986,16 @@ var NetworkSchema = import_zod2.z.enum([
|
|
|
951
986
|
"solana",
|
|
952
987
|
"sei",
|
|
953
988
|
"sei-testnet",
|
|
989
|
+
"ethereum",
|
|
954
990
|
"polygon",
|
|
955
991
|
"polygon-amoy",
|
|
956
992
|
"peaq",
|
|
957
993
|
"x-layer",
|
|
958
994
|
"x-layer-testnet",
|
|
959
995
|
"sepolia",
|
|
960
|
-
"filecoin
|
|
996
|
+
"filecoin",
|
|
997
|
+
"filecoin-calibration",
|
|
998
|
+
"skale-base-sepolia"
|
|
961
999
|
]);
|
|
962
1000
|
var SupportedEVMNetworks = [
|
|
963
1001
|
"base-sepolia",
|
|
@@ -967,13 +1005,16 @@ var SupportedEVMNetworks = [
|
|
|
967
1005
|
"iotex",
|
|
968
1006
|
"sei",
|
|
969
1007
|
"sei-testnet",
|
|
1008
|
+
"ethereum",
|
|
970
1009
|
"polygon",
|
|
971
1010
|
"polygon-amoy",
|
|
972
1011
|
"peaq",
|
|
973
1012
|
"x-layer",
|
|
974
1013
|
"x-layer-testnet",
|
|
975
1014
|
"sepolia",
|
|
976
|
-
"filecoin
|
|
1015
|
+
"filecoin",
|
|
1016
|
+
"filecoin-calibration",
|
|
1017
|
+
"skale-base-sepolia"
|
|
977
1018
|
];
|
|
978
1019
|
var EvmNetworkToChainId = /* @__PURE__ */ new Map([
|
|
979
1020
|
["base-sepolia", 84532],
|
|
@@ -983,13 +1024,16 @@ var EvmNetworkToChainId = /* @__PURE__ */ new Map([
|
|
|
983
1024
|
["iotex", 4689],
|
|
984
1025
|
["sei", 1329],
|
|
985
1026
|
["sei-testnet", 1328],
|
|
1027
|
+
["ethereum", 1],
|
|
986
1028
|
["polygon", 137],
|
|
987
1029
|
["polygon-amoy", 80002],
|
|
988
1030
|
["peaq", 3338],
|
|
989
1031
|
["x-layer", 196],
|
|
990
1032
|
["x-layer-testnet", 1952],
|
|
991
1033
|
["sepolia", 11155111],
|
|
992
|
-
["filecoin
|
|
1034
|
+
["filecoin", 314],
|
|
1035
|
+
["filecoin-calibration", 314159],
|
|
1036
|
+
["skale-base-sepolia", 324705682]
|
|
993
1037
|
]);
|
|
994
1038
|
var SupportedSVMNetworks = ["solana-devnet", "solana"];
|
|
995
1039
|
var SvmNetworkToChainId = /* @__PURE__ */ new Map([
|