sf-x402x 0.7.2 → 0.7.3

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.
Files changed (63) hide show
  1. package/dist/cjs/client/index.d.ts +4 -4
  2. package/dist/cjs/client/index.js +35 -0
  3. package/dist/cjs/client/index.js.map +1 -1
  4. package/dist/cjs/facilitator/index.d.ts +3 -3
  5. package/dist/cjs/facilitator/index.js +35 -0
  6. package/dist/cjs/facilitator/index.js.map +1 -1
  7. package/dist/cjs/index.d.ts +4 -4
  8. package/dist/cjs/index.js +35 -0
  9. package/dist/cjs/index.js.map +1 -1
  10. package/dist/{esm/middleware-meOELdk2.d.mts → cjs/middleware-DbSgn0Ml.d.ts} +3 -3
  11. package/dist/{esm/network-C6C2pEEd.d.mts → cjs/network-CyrdLXOd.d.ts} +2 -2
  12. package/dist/cjs/paywall/index.d.ts +1 -1
  13. package/dist/{esm/rpc-CFPA2oz6.d.mts → cjs/rpc-Bnu3X-oO.d.ts} +1 -1
  14. package/dist/cjs/schemes/index.d.ts +4 -4
  15. package/dist/cjs/schemes/index.js +35 -0
  16. package/dist/cjs/schemes/index.js.map +1 -1
  17. package/dist/cjs/shared/evm/index.d.ts +1 -1
  18. package/dist/cjs/shared/index.d.ts +6 -6
  19. package/dist/cjs/shared/index.js +35 -0
  20. package/dist/cjs/shared/index.js.map +1 -1
  21. package/dist/cjs/types/index.d.ts +14 -11
  22. package/dist/cjs/types/index.js +48 -0
  23. package/dist/cjs/types/index.js.map +1 -1
  24. package/dist/cjs/verify/index.d.ts +4 -4
  25. package/dist/cjs/verify/index.js +35 -0
  26. package/dist/cjs/verify/index.js.map +1 -1
  27. package/dist/cjs/wallet-BzdwL5Ga.d.ts +48 -0
  28. package/dist/{esm/wallet-BReyvAJs.d.mts → cjs/wallet-DCeIaUzf.d.ts} +115 -1
  29. package/dist/{esm/x402Specs-CVJIfBRW.d.mts → cjs/x402Specs-D-jpKgOf.d.ts} +58 -58
  30. package/dist/esm/{chunk-L52JEGJ6.mjs → chunk-EDATYT3W.mjs} +55 -5
  31. package/dist/esm/chunk-EDATYT3W.mjs.map +1 -0
  32. package/dist/esm/{chunk-EDHXRYU2.mjs → chunk-IE2ZDZCW.mjs} +3 -3
  33. package/dist/esm/{chunk-Y3EZA3GQ.mjs → chunk-QX2UH4QV.mjs} +3 -3
  34. package/dist/esm/{chunk-NOKHWFZC.mjs → chunk-UIFGXKZ6.mjs} +2 -2
  35. package/dist/esm/{chunk-VBHDFLZZ.mjs → chunk-WDY2V2V6.mjs} +3 -3
  36. package/dist/esm/client/index.d.mts +4 -4
  37. package/dist/esm/client/index.mjs +3 -3
  38. package/dist/esm/facilitator/index.d.mts +3 -3
  39. package/dist/esm/facilitator/index.mjs +4 -4
  40. package/dist/esm/index.d.mts +4 -4
  41. package/dist/esm/index.mjs +5 -5
  42. package/dist/esm/middleware-DfreTyXz.d.mts +93 -0
  43. package/dist/esm/network-CyrdLXOd.d.mts +11 -0
  44. package/dist/esm/paywall/index.d.mts +1 -1
  45. package/dist/esm/rpc-CzbFK6es.d.mts +35 -0
  46. package/dist/esm/schemes/index.d.mts +4 -4
  47. package/dist/esm/schemes/index.mjs +3 -3
  48. package/dist/esm/shared/evm/index.d.mts +1 -1
  49. package/dist/esm/shared/index.d.mts +6 -6
  50. package/dist/esm/shared/index.mjs +1 -1
  51. package/dist/esm/types/index.d.mts +14 -11
  52. package/dist/esm/types/index.mjs +1 -1
  53. package/dist/esm/verify/index.d.mts +4 -4
  54. package/dist/esm/verify/index.mjs +1 -1
  55. package/dist/esm/{wallet-C9iHSQbd.d.mts → wallet-C1nMdb77.d.mts} +1 -1
  56. package/dist/esm/wallet-DCeIaUzf.d.mts +265 -0
  57. package/dist/esm/x402Specs-D-jpKgOf.d.mts +1306 -0
  58. package/package.json +1 -1
  59. package/dist/esm/chunk-L52JEGJ6.mjs.map +0 -1
  60. /package/dist/esm/{chunk-EDHXRYU2.mjs.map → chunk-IE2ZDZCW.mjs.map} +0 -0
  61. /package/dist/esm/{chunk-Y3EZA3GQ.mjs.map → chunk-QX2UH4QV.mjs.map} +0 -0
  62. /package/dist/esm/{chunk-NOKHWFZC.mjs.map → chunk-UIFGXKZ6.mjs.map} +0 -0
  63. /package/dist/esm/{chunk-VBHDFLZZ.mjs.map → chunk-WDY2V2V6.mjs.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { z } from 'zod';
2
- import { N as Network } from './network-C6C2pEEd.mjs';
3
- import { E as EvmSigner } from './wallet-BReyvAJs.mjs';
4
- import { a as PaymentPayload, P as PaymentRequirements, u as VerifyResponse, S as SettleResponse, F as SupportedPaymentKindsResponse, w as ListDiscoveryResourcesRequest, z as ListDiscoveryResourcesResponse, m as HTTPRequestStructure } from './x402Specs-CVJIfBRW.mjs';
2
+ import { N as Network } from './network-CyrdLXOd.js';
3
+ import { E as EvmSigner } from './wallet-DCeIaUzf.js';
4
+ import { a as PaymentPayload, P as PaymentRequirements, u as VerifyResponse, S as SettleResponse, F as SupportedPaymentKindsResponse, w as ListDiscoveryResourcesRequest, z as ListDiscoveryResourcesResponse, m as HTTPRequestStructure } from './x402Specs-D-jpKgOf.js';
5
5
 
6
6
  declare const moneySchema: z.ZodPipeline<z.ZodUnion<[z.ZodEffects<z.ZodString, string, string>, z.ZodNumber]>, z.ZodNumber>;
7
7
  type Money = z.input<typeof moneySchema>;
@@ -3,9 +3,9 @@ import { z } from 'zod';
3
3
  declare const NetworkSchema: z.ZodEnum<["base-sepolia", "base", "avalanche-fuji", "avalanche", "iotex", "solana-devnet", "solana", "sei", "sei-testnet", "ethereum", "polygon", "polygon-amoy", "peaq", "x-layer", "x-layer-testnet", "sepolia", "filecoin", "filecoin-calibration", "skale-base-sepolia"]>;
4
4
  type Network = z.infer<typeof NetworkSchema>;
5
5
  declare const SupportedEVMNetworks: Network[];
6
- declare const EvmNetworkToChainId: Map<"base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "x-layer" | "x-layer-testnet" | "solana-devnet" | "solana" | "ethereum" | "sepolia" | "filecoin" | "filecoin-calibration" | "skale-base-sepolia", number>;
6
+ declare const EvmNetworkToChainId: Map<"base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "x-layer" | "x-layer-testnet" | "sepolia" | "ethereum" | "filecoin" | "filecoin-calibration" | "skale-base-sepolia" | "solana-devnet" | "solana", number>;
7
7
  declare const SupportedSVMNetworks: Network[];
8
- declare const SvmNetworkToChainId: Map<"base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "x-layer" | "x-layer-testnet" | "solana-devnet" | "solana" | "ethereum" | "sepolia" | "filecoin" | "filecoin-calibration" | "skale-base-sepolia", number>;
8
+ declare const SvmNetworkToChainId: Map<"base-sepolia" | "avalanche-fuji" | "base" | "avalanche" | "sei" | "sei-testnet" | "polygon" | "polygon-amoy" | "peaq" | "iotex" | "x-layer" | "x-layer-testnet" | "sepolia" | "ethereum" | "filecoin" | "filecoin-calibration" | "skale-base-sepolia" | "solana-devnet" | "solana", number>;
9
9
  declare const ChainIdToNetwork: Record<number, Network>;
10
10
 
11
11
  export { ChainIdToNetwork as C, EvmNetworkToChainId as E, type Network as N, SupportedEVMNetworks as S, NetworkSchema as a, SupportedSVMNetworks as b, SvmNetworkToChainId as c };
@@ -1,4 +1,4 @@
1
- import { P as PaymentRequirements } from '../x402Specs-CVJIfBRW.js';
1
+ import { P as PaymentRequirements } from '../x402Specs-D-jpKgOf.js';
2
2
  import 'zod';
3
3
 
4
4
  interface PaywallOptions {
@@ -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-C6C2pEEd.mjs';
2
+ import { N as Network } from './network-CyrdLXOd.js';
3
3
 
4
4
  /**
5
5
  * Creates a Solana RPC client for the devnet network.
@@ -1,14 +1,14 @@
1
1
  import { Address, Transport, Chain, LocalAccount, Account } from 'viem';
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-CVJIfBRW.js';
2
+ import { S as SignerWallet, C as ConnectedClient } from '../wallet-DCeIaUzf.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-D-jpKgOf.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-DY0HwxtK.js';
6
+ import { b as getRpcSubscriptions } from '../rpc-Bnu3X-oO.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-C6C2pEEd.js';
11
+ import '../network-CyrdLXOd.js';
12
12
 
13
13
  /**
14
14
  * Prepares an unsigned payment header with the given sender address and payment requirements.
@@ -969,6 +969,41 @@ var xLayerTestnet = (0, import_viem.defineChain)({
969
969
  },
970
970
  testnet: true
971
971
  });
972
+ var filecoin = (0, import_viem.defineChain)({
973
+ id: 314,
974
+ name: "Filecoin",
975
+ nativeCurrency: { name: "Filecoin", symbol: "FIL", decimals: 18 },
976
+ rpcUrls: {
977
+ default: { http: ["https://api.node.glif.io/rpc/v1"] }
978
+ },
979
+ blockExplorers: {
980
+ default: { name: "Filfox", url: "https://filfox.info" }
981
+ }
982
+ });
983
+ var filecoinCalibration = (0, import_viem.defineChain)({
984
+ id: 314159,
985
+ name: "Filecoin Calibration",
986
+ nativeCurrency: { name: "Filecoin", symbol: "FIL", decimals: 18 },
987
+ rpcUrls: {
988
+ default: { http: ["https://api.calibration.node.glif.io/rpc/v1"] }
989
+ },
990
+ blockExplorers: {
991
+ default: { name: "Filfox", url: "https://calibration.filfox.info" }
992
+ },
993
+ testnet: true
994
+ });
995
+ var skaleBaseSepolia = (0, import_viem.defineChain)({
996
+ id: 324705682,
997
+ name: "SKALE Base Sepolia",
998
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
999
+ rpcUrls: {
1000
+ default: { http: ["https://mainnet.skalenodes.com/v1/elated-tan-skat"] }
1001
+ },
1002
+ blockExplorers: {
1003
+ default: { name: "SKALE Explorer", url: "https://elated-tan-skat.explorer.mainnet.skalenodes.com" }
1004
+ },
1005
+ testnet: true
1006
+ });
972
1007
  function isSignerWallet(wallet) {
973
1008
  return typeof wallet === "object" && wallet !== null && "chain" in wallet && "transport" in wallet;
974
1009
  }