moltspay 1.2.0 → 1.3.0
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 +161 -17
- package/dist/cdp/index.d.mts +1 -1
- package/dist/cdp/index.d.ts +1 -1
- package/dist/cdp/index.js +60 -30408
- package/dist/cdp/index.js.map +1 -1
- package/dist/cdp/index.mjs +44 -30400
- package/dist/cdp/index.mjs.map +1 -1
- package/dist/cdp-DeohBe1o.d.ts +66 -0
- package/dist/cdp-p_eHuQpb.d.mts +66 -0
- package/dist/chains/index.d.mts +1 -1
- package/dist/chains/index.d.ts +1 -1
- package/dist/chains/index.js +36 -40
- package/dist/chains/index.js.map +1 -1
- package/dist/chains/index.mjs +36 -40
- package/dist/chains/index.mjs.map +1 -1
- package/dist/cli/index.js +997 -174
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +1001 -174
- package/dist/cli/index.mjs.map +1 -1
- package/dist/client/index.d.mts +27 -4
- package/dist/client/index.d.ts +27 -4
- package/dist/client/index.js +217 -60
- package/dist/client/index.js.map +1 -1
- package/dist/client/index.mjs +207 -60
- package/dist/client/index.mjs.map +1 -1
- package/dist/facilitators/index.d.mts +15 -47
- package/dist/facilitators/index.d.ts +15 -47
- package/dist/facilitators/index.js +273 -34
- package/dist/facilitators/index.js.map +1 -1
- package/dist/facilitators/index.mjs +272 -34
- package/dist/facilitators/index.mjs.map +1 -1
- package/dist/{index-B3v8IWjM.d.mts → index-On9ZaGDW.d.mts} +2 -1
- package/dist/{index-B3v8IWjM.d.ts → index-On9ZaGDW.d.ts} +2 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +792 -30657
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +782 -30657
- package/dist/index.mjs.map +1 -1
- package/dist/server/index.d.mts +17 -0
- package/dist/server/index.d.ts +17 -0
- package/dist/server/index.js +513 -48
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +513 -48
- package/dist/server/index.mjs.map +1 -1
- package/dist/verify/index.d.mts +1 -1
- package/dist/verify/index.d.ts +1 -1
- package/dist/verify/index.js +36 -40
- package/dist/verify/index.js.map +1 -1
- package/dist/verify/index.mjs +36 -40
- package/dist/verify/index.mjs.map +1 -1
- package/dist/wallet/index.d.mts +1 -1
- package/dist/wallet/index.d.ts +1 -1
- package/dist/wallet/index.js +36 -40
- package/dist/wallet/index.js.map +1 -1
- package/dist/wallet/index.mjs +36 -40
- package/dist/wallet/index.mjs.map +1 -1
- package/package.json +5 -2
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { B as BaseFacilitator, a as FacilitatorConfig, H as HealthCheckResult, X as X402PaymentPayload, f as X402PaymentRequirements, V as VerifyResult, e as SettleResult, b as FacilitatorFee } from './registry-OsEO2dOu.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* CDP Facilitator
|
|
5
|
+
*
|
|
6
|
+
* Coinbase Developer Platform x402 facilitator implementation.
|
|
7
|
+
* Auto-detects mainnet vs testnet from chain ID in request.
|
|
8
|
+
*
|
|
9
|
+
* Supported networks:
|
|
10
|
+
* - Base mainnet (eip155:8453)
|
|
11
|
+
* - Polygon mainnet (eip155:137)
|
|
12
|
+
* - Base Sepolia testnet (eip155:84532)
|
|
13
|
+
*
|
|
14
|
+
* @see https://docs.cdp.coinbase.com/x402/core-concepts/facilitator
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
interface CDPFacilitatorConfig extends FacilitatorConfig {
|
|
18
|
+
/** CDP API Key ID (required) */
|
|
19
|
+
apiKeyId?: string;
|
|
20
|
+
/** CDP API Key Secret (required) */
|
|
21
|
+
apiKeySecret?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* CDP (Coinbase Developer Platform) Facilitator
|
|
25
|
+
*
|
|
26
|
+
* Handles payment verification and settlement via Coinbase's x402 facilitator.
|
|
27
|
+
*/
|
|
28
|
+
declare class CDPFacilitator extends BaseFacilitator {
|
|
29
|
+
readonly name = "cdp";
|
|
30
|
+
readonly displayName = "Coinbase CDP";
|
|
31
|
+
readonly supportedNetworks: string[];
|
|
32
|
+
private endpoint;
|
|
33
|
+
private apiKeyId?;
|
|
34
|
+
private apiKeySecret?;
|
|
35
|
+
constructor(config?: CDPFacilitatorConfig);
|
|
36
|
+
/**
|
|
37
|
+
* Get auth headers for CDP API requests
|
|
38
|
+
*/
|
|
39
|
+
private getAuthHeaders;
|
|
40
|
+
/**
|
|
41
|
+
* Health check - verify facilitator is reachable
|
|
42
|
+
*/
|
|
43
|
+
healthCheck(): Promise<HealthCheckResult>;
|
|
44
|
+
/**
|
|
45
|
+
* Verify payment signature with facilitator
|
|
46
|
+
*/
|
|
47
|
+
verify(paymentPayload: X402PaymentPayload, requirements: X402PaymentRequirements): Promise<VerifyResult>;
|
|
48
|
+
/**
|
|
49
|
+
* Settle payment on-chain via facilitator
|
|
50
|
+
*/
|
|
51
|
+
settle(paymentPayload: X402PaymentPayload, requirements: X402PaymentRequirements): Promise<SettleResult>;
|
|
52
|
+
/**
|
|
53
|
+
* Get CDP fee information
|
|
54
|
+
*/
|
|
55
|
+
getFee(): Promise<FacilitatorFee>;
|
|
56
|
+
/**
|
|
57
|
+
* Check if a chain ID is testnet
|
|
58
|
+
*/
|
|
59
|
+
static isTestnet(chainId: number): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Get configuration summary (for logging)
|
|
62
|
+
*/
|
|
63
|
+
getConfigSummary(): string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { CDPFacilitator as C, type CDPFacilitatorConfig as a };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { B as BaseFacilitator, a as FacilitatorConfig, H as HealthCheckResult, X as X402PaymentPayload, f as X402PaymentRequirements, V as VerifyResult, e as SettleResult, b as FacilitatorFee } from './registry-OsEO2dOu.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* CDP Facilitator
|
|
5
|
+
*
|
|
6
|
+
* Coinbase Developer Platform x402 facilitator implementation.
|
|
7
|
+
* Auto-detects mainnet vs testnet from chain ID in request.
|
|
8
|
+
*
|
|
9
|
+
* Supported networks:
|
|
10
|
+
* - Base mainnet (eip155:8453)
|
|
11
|
+
* - Polygon mainnet (eip155:137)
|
|
12
|
+
* - Base Sepolia testnet (eip155:84532)
|
|
13
|
+
*
|
|
14
|
+
* @see https://docs.cdp.coinbase.com/x402/core-concepts/facilitator
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
interface CDPFacilitatorConfig extends FacilitatorConfig {
|
|
18
|
+
/** CDP API Key ID (required) */
|
|
19
|
+
apiKeyId?: string;
|
|
20
|
+
/** CDP API Key Secret (required) */
|
|
21
|
+
apiKeySecret?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* CDP (Coinbase Developer Platform) Facilitator
|
|
25
|
+
*
|
|
26
|
+
* Handles payment verification and settlement via Coinbase's x402 facilitator.
|
|
27
|
+
*/
|
|
28
|
+
declare class CDPFacilitator extends BaseFacilitator {
|
|
29
|
+
readonly name = "cdp";
|
|
30
|
+
readonly displayName = "Coinbase CDP";
|
|
31
|
+
readonly supportedNetworks: string[];
|
|
32
|
+
private endpoint;
|
|
33
|
+
private apiKeyId?;
|
|
34
|
+
private apiKeySecret?;
|
|
35
|
+
constructor(config?: CDPFacilitatorConfig);
|
|
36
|
+
/**
|
|
37
|
+
* Get auth headers for CDP API requests
|
|
38
|
+
*/
|
|
39
|
+
private getAuthHeaders;
|
|
40
|
+
/**
|
|
41
|
+
* Health check - verify facilitator is reachable
|
|
42
|
+
*/
|
|
43
|
+
healthCheck(): Promise<HealthCheckResult>;
|
|
44
|
+
/**
|
|
45
|
+
* Verify payment signature with facilitator
|
|
46
|
+
*/
|
|
47
|
+
verify(paymentPayload: X402PaymentPayload, requirements: X402PaymentRequirements): Promise<VerifyResult>;
|
|
48
|
+
/**
|
|
49
|
+
* Settle payment on-chain via facilitator
|
|
50
|
+
*/
|
|
51
|
+
settle(paymentPayload: X402PaymentPayload, requirements: X402PaymentRequirements): Promise<SettleResult>;
|
|
52
|
+
/**
|
|
53
|
+
* Get CDP fee information
|
|
54
|
+
*/
|
|
55
|
+
getFee(): Promise<FacilitatorFee>;
|
|
56
|
+
/**
|
|
57
|
+
* Check if a chain ID is testnet
|
|
58
|
+
*/
|
|
59
|
+
static isTestnet(chainId: number): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Get configuration summary (for logging)
|
|
62
|
+
*/
|
|
63
|
+
getConfigSummary(): string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { CDPFacilitator as C, type CDPFacilitatorConfig as a };
|
package/dist/chains/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ChainName, a as ChainConfig, T as TokenSymbol, b as TokenConfig } from '../index-
|
|
1
|
+
import { C as ChainName, a as ChainConfig, T as TokenSymbol, b as TokenConfig } from '../index-On9ZaGDW.mjs';
|
|
2
2
|
|
|
3
3
|
declare const CHAINS: Record<ChainName, ChainConfig>;
|
|
4
4
|
/**
|
package/dist/chains/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as ChainName, a as ChainConfig, T as TokenSymbol, b as TokenConfig } from '../index-
|
|
1
|
+
import { C as ChainName, a as ChainConfig, T as TokenSymbol, b as TokenConfig } from '../index-On9ZaGDW.js';
|
|
2
2
|
|
|
3
3
|
declare const CHAINS: Record<ChainName, ChainConfig>;
|
|
4
4
|
/**
|
package/dist/chains/index.js
CHANGED
|
@@ -39,12 +39,15 @@ var CHAINS = {
|
|
|
39
39
|
USDC: {
|
|
40
40
|
address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
41
41
|
decimals: 6,
|
|
42
|
-
symbol: "USDC"
|
|
42
|
+
symbol: "USDC",
|
|
43
|
+
eip712Name: "USD Coin"
|
|
44
|
+
// EIP-712 domain name
|
|
43
45
|
},
|
|
44
46
|
USDT: {
|
|
45
47
|
address: "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2",
|
|
46
48
|
decimals: 6,
|
|
47
|
-
symbol: "USDT"
|
|
49
|
+
symbol: "USDT",
|
|
50
|
+
eip712Name: "Tether USD"
|
|
48
51
|
}
|
|
49
52
|
},
|
|
50
53
|
usdc: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
@@ -61,12 +64,15 @@ var CHAINS = {
|
|
|
61
64
|
USDC: {
|
|
62
65
|
address: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
|
|
63
66
|
decimals: 6,
|
|
64
|
-
symbol: "USDC"
|
|
67
|
+
symbol: "USDC",
|
|
68
|
+
eip712Name: "USD Coin"
|
|
65
69
|
},
|
|
66
70
|
USDT: {
|
|
67
71
|
address: "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
|
|
68
72
|
decimals: 6,
|
|
69
|
-
symbol: "USDT"
|
|
73
|
+
symbol: "USDT",
|
|
74
|
+
eip712Name: "(PoS) Tether USD"
|
|
75
|
+
// Polygon uses this name
|
|
70
76
|
}
|
|
71
77
|
},
|
|
72
78
|
usdc: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
|
|
@@ -74,27 +80,6 @@ var CHAINS = {
|
|
|
74
80
|
explorerTx: "https://polygonscan.com/tx/",
|
|
75
81
|
avgBlockTime: 2
|
|
76
82
|
},
|
|
77
|
-
ethereum: {
|
|
78
|
-
name: "Ethereum",
|
|
79
|
-
chainId: 1,
|
|
80
|
-
rpc: "https://eth.llamarpc.com",
|
|
81
|
-
tokens: {
|
|
82
|
-
USDC: {
|
|
83
|
-
address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
84
|
-
decimals: 6,
|
|
85
|
-
symbol: "USDC"
|
|
86
|
-
},
|
|
87
|
-
USDT: {
|
|
88
|
-
address: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
|
89
|
-
decimals: 6,
|
|
90
|
-
symbol: "USDT"
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
usdc: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
94
|
-
explorer: "https://etherscan.io/address/",
|
|
95
|
-
explorerTx: "https://etherscan.io/tx/",
|
|
96
|
-
avgBlockTime: 12
|
|
97
|
-
},
|
|
98
83
|
// ============ Testnet ============
|
|
99
84
|
base_sepolia: {
|
|
100
85
|
name: "Base Sepolia",
|
|
@@ -104,13 +89,17 @@ var CHAINS = {
|
|
|
104
89
|
USDC: {
|
|
105
90
|
address: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
|
|
106
91
|
decimals: 6,
|
|
107
|
-
symbol: "USDC"
|
|
92
|
+
symbol: "USDC",
|
|
93
|
+
eip712Name: "USDC"
|
|
94
|
+
// Testnet USDC uses 'USDC' not 'USD Coin'
|
|
108
95
|
},
|
|
109
96
|
USDT: {
|
|
110
97
|
address: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
|
|
111
98
|
// Same as USDC on testnet (no official USDT)
|
|
112
99
|
decimals: 6,
|
|
113
|
-
symbol: "USDT"
|
|
100
|
+
symbol: "USDT",
|
|
101
|
+
eip712Name: "USDC"
|
|
102
|
+
// Uses same contract as USDC
|
|
114
103
|
}
|
|
115
104
|
},
|
|
116
105
|
usdc: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
|
|
@@ -118,27 +107,34 @@ var CHAINS = {
|
|
|
118
107
|
explorerTx: "https://sepolia.basescan.org/tx/",
|
|
119
108
|
avgBlockTime: 2
|
|
120
109
|
},
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
110
|
+
// ============ Tempo Testnet (Moderato) ============
|
|
111
|
+
tempo_moderato: {
|
|
112
|
+
name: "Tempo Moderato",
|
|
113
|
+
chainId: 42431,
|
|
114
|
+
rpc: "https://rpc.moderato.tempo.xyz",
|
|
125
115
|
tokens: {
|
|
116
|
+
// TIP-20 stablecoins on Tempo testnet (from mppx SDK)
|
|
117
|
+
// Note: Tempo uses USD as native gas token, not ETH
|
|
126
118
|
USDC: {
|
|
127
|
-
address: "
|
|
119
|
+
address: "0x20c0000000000000000000000000000000000000",
|
|
120
|
+
// pathUSD - primary testnet stablecoin
|
|
128
121
|
decimals: 6,
|
|
129
|
-
symbol: "USDC"
|
|
122
|
+
symbol: "USDC",
|
|
123
|
+
eip712Name: "pathUSD"
|
|
130
124
|
},
|
|
131
125
|
USDT: {
|
|
132
|
-
address: "
|
|
133
|
-
//
|
|
126
|
+
address: "0x20c0000000000000000000000000000000000001",
|
|
127
|
+
// alphaUSD
|
|
134
128
|
decimals: 6,
|
|
135
|
-
symbol: "USDT"
|
|
129
|
+
symbol: "USDT",
|
|
130
|
+
eip712Name: "alphaUSD"
|
|
136
131
|
}
|
|
137
132
|
},
|
|
138
|
-
usdc: "
|
|
139
|
-
explorer: "https://
|
|
140
|
-
explorerTx: "https://
|
|
141
|
-
avgBlockTime:
|
|
133
|
+
usdc: "0x20c0000000000000000000000000000000000000",
|
|
134
|
+
explorer: "https://explore.testnet.tempo.xyz/address/",
|
|
135
|
+
explorerTx: "https://explore.testnet.tempo.xyz/tx/",
|
|
136
|
+
avgBlockTime: 0.5
|
|
137
|
+
// ~500ms finality
|
|
142
138
|
}
|
|
143
139
|
};
|
|
144
140
|
function getTokenAddress(chainName, token) {
|
package/dist/chains/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/chains/index.ts"],"sourcesContent":["/**\n * Blockchain Configuration\n */\n\nimport type { ChainConfig, ChainName, TokenSymbol } from '../types/index.js';\n\nexport const CHAINS: Record<ChainName, ChainConfig> = {\n // ============ Mainnet ============\n base: {\n name: 'Base',\n chainId: 8453,\n rpc: 'https://mainnet.base.org',\n tokens: {\n USDC: {\n address: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',\n decimals: 6,\n symbol: 'USDC',\n },\n USDT: {\n address: '0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2',\n decimals: 6,\n symbol: 'USDT',\n },\n },\n usdc: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', // deprecated, for backward compat\n explorer: 'https://basescan.org/address/',\n explorerTx: 'https://basescan.org/tx/',\n avgBlockTime: 2,\n },\n polygon: {\n name: 'Polygon',\n chainId: 137,\n rpc: 'https://polygon-bor-rpc.publicnode.com',\n tokens: {\n USDC: {\n address: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',\n decimals: 6,\n symbol: 'USDC',\n },\n USDT: {\n address: '0xc2132D05D31c914a87C6611C10748AEb04B58e8F',\n decimals: 6,\n symbol: 'USDT',\n
|
|
1
|
+
{"version":3,"sources":["../../src/chains/index.ts"],"sourcesContent":["/**\n * Blockchain Configuration\n */\n\nimport type { ChainConfig, ChainName, TokenSymbol } from '../types/index.js';\n\nexport const CHAINS: Record<ChainName, ChainConfig> = {\n // ============ Mainnet ============\n base: {\n name: 'Base',\n chainId: 8453,\n rpc: 'https://mainnet.base.org',\n tokens: {\n USDC: {\n address: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',\n decimals: 6,\n symbol: 'USDC',\n eip712Name: 'USD Coin', // EIP-712 domain name\n },\n USDT: {\n address: '0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2',\n decimals: 6,\n symbol: 'USDT',\n eip712Name: 'Tether USD',\n },\n },\n usdc: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', // deprecated, for backward compat\n explorer: 'https://basescan.org/address/',\n explorerTx: 'https://basescan.org/tx/',\n avgBlockTime: 2,\n },\n polygon: {\n name: 'Polygon',\n chainId: 137,\n rpc: 'https://polygon-bor-rpc.publicnode.com',\n tokens: {\n USDC: {\n address: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',\n decimals: 6,\n symbol: 'USDC',\n eip712Name: 'USD Coin',\n },\n USDT: {\n address: '0xc2132D05D31c914a87C6611C10748AEb04B58e8F',\n decimals: 6,\n symbol: 'USDT',\n eip712Name: '(PoS) Tether USD', // Polygon uses this name\n },\n },\n usdc: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',\n explorer: 'https://polygonscan.com/address/',\n explorerTx: 'https://polygonscan.com/tx/',\n avgBlockTime: 2,\n },\n // ============ Testnet ============\n base_sepolia: {\n name: 'Base Sepolia',\n chainId: 84532,\n rpc: 'https://sepolia.base.org',\n tokens: {\n USDC: {\n address: '0x036CbD53842c5426634e7929541eC2318f3dCF7e',\n decimals: 6,\n symbol: 'USDC',\n eip712Name: 'USDC', // Testnet USDC uses 'USDC' not 'USD Coin'\n },\n USDT: {\n address: '0x036CbD53842c5426634e7929541eC2318f3dCF7e', // Same as USDC on testnet (no official USDT)\n decimals: 6,\n symbol: 'USDT',\n eip712Name: 'USDC', // Uses same contract as USDC\n },\n },\n usdc: '0x036CbD53842c5426634e7929541eC2318f3dCF7e',\n explorer: 'https://sepolia.basescan.org/address/',\n explorerTx: 'https://sepolia.basescan.org/tx/',\n avgBlockTime: 2,\n },\n // ============ Tempo Testnet (Moderato) ============\n tempo_moderato: {\n name: 'Tempo Moderato',\n chainId: 42431,\n rpc: 'https://rpc.moderato.tempo.xyz',\n tokens: {\n // TIP-20 stablecoins on Tempo testnet (from mppx SDK)\n // Note: Tempo uses USD as native gas token, not ETH\n USDC: {\n address: '0x20c0000000000000000000000000000000000000', // pathUSD - primary testnet stablecoin\n decimals: 6,\n symbol: 'USDC',\n eip712Name: 'pathUSD',\n },\n USDT: {\n address: '0x20c0000000000000000000000000000000000001', // alphaUSD\n decimals: 6,\n symbol: 'USDT',\n eip712Name: 'alphaUSD',\n },\n },\n usdc: '0x20c0000000000000000000000000000000000000',\n explorer: 'https://explore.testnet.tempo.xyz/address/',\n explorerTx: 'https://explore.testnet.tempo.xyz/tx/',\n avgBlockTime: 0.5, // ~500ms finality\n },\n};\n\n/**\n * Get token address for a chain\n */\nexport function getTokenAddress(chainName: ChainName, token: TokenSymbol): string {\n const chain = CHAINS[chainName];\n if (!chain) {\n throw new Error(`Unsupported chain: ${chainName}`);\n }\n const tokenConfig = chain.tokens[token];\n if (!tokenConfig) {\n throw new Error(`Token ${token} not supported on ${chainName}`);\n }\n return tokenConfig.address;\n}\n\n/**\n * Get token config for a chain\n */\nexport function getTokenConfig(chainName: ChainName, token: TokenSymbol) {\n const chain = CHAINS[chainName];\n if (!chain) {\n throw new Error(`Unsupported chain: ${chainName}`);\n }\n return chain.tokens[token];\n}\n\n/**\n * Get chain configuration\n */\nexport function getChain(name: ChainName): ChainConfig {\n const config = CHAINS[name];\n if (!config) {\n throw new Error(`Unsupported chain: ${name}. Supported: ${Object.keys(CHAINS).join(', ')}`);\n }\n return config;\n}\n\n/**\n * List all supported chains\n */\nexport function listChains(): ChainName[] {\n return Object.keys(CHAINS) as ChainName[];\n}\n\n/**\n * Get chain config by chainId\n */\nexport function getChainById(chainId: number): ChainConfig | undefined {\n return Object.values(CHAINS).find(c => c.chainId === chainId);\n}\n\n/**\n * ERC20 ABI (minimal, only required methods)\n */\nexport const ERC20_ABI = [\n 'function balanceOf(address owner) view returns (uint256)',\n 'function transfer(address to, uint256 amount) returns (bool)',\n 'function approve(address spender, uint256 amount) returns (bool)',\n 'function allowance(address owner, address spender) view returns (uint256)',\n 'function decimals() view returns (uint8)',\n 'function symbol() view returns (string)',\n 'function name() view returns (string)',\n 'function nonces(address owner) view returns (uint256)',\n 'function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)',\n 'event Transfer(address indexed from, address indexed to, uint256 value)',\n 'event Approval(address indexed owner, address indexed spender, uint256 value)',\n];\n\nexport type { ChainConfig, ChainName, TokenSymbol };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,IAAM,SAAyC;AAAA;AAAA,EAEpD,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,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AAAA,EACA;AACF;","names":[]}
|
package/dist/chains/index.mjs
CHANGED
|
@@ -9,12 +9,15 @@ var CHAINS = {
|
|
|
9
9
|
USDC: {
|
|
10
10
|
address: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
11
11
|
decimals: 6,
|
|
12
|
-
symbol: "USDC"
|
|
12
|
+
symbol: "USDC",
|
|
13
|
+
eip712Name: "USD Coin"
|
|
14
|
+
// EIP-712 domain name
|
|
13
15
|
},
|
|
14
16
|
USDT: {
|
|
15
17
|
address: "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2",
|
|
16
18
|
decimals: 6,
|
|
17
|
-
symbol: "USDT"
|
|
19
|
+
symbol: "USDT",
|
|
20
|
+
eip712Name: "Tether USD"
|
|
18
21
|
}
|
|
19
22
|
},
|
|
20
23
|
usdc: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
@@ -31,12 +34,15 @@ var CHAINS = {
|
|
|
31
34
|
USDC: {
|
|
32
35
|
address: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
|
|
33
36
|
decimals: 6,
|
|
34
|
-
symbol: "USDC"
|
|
37
|
+
symbol: "USDC",
|
|
38
|
+
eip712Name: "USD Coin"
|
|
35
39
|
},
|
|
36
40
|
USDT: {
|
|
37
41
|
address: "0xc2132D05D31c914a87C6611C10748AEb04B58e8F",
|
|
38
42
|
decimals: 6,
|
|
39
|
-
symbol: "USDT"
|
|
43
|
+
symbol: "USDT",
|
|
44
|
+
eip712Name: "(PoS) Tether USD"
|
|
45
|
+
// Polygon uses this name
|
|
40
46
|
}
|
|
41
47
|
},
|
|
42
48
|
usdc: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
|
|
@@ -44,27 +50,6 @@ var CHAINS = {
|
|
|
44
50
|
explorerTx: "https://polygonscan.com/tx/",
|
|
45
51
|
avgBlockTime: 2
|
|
46
52
|
},
|
|
47
|
-
ethereum: {
|
|
48
|
-
name: "Ethereum",
|
|
49
|
-
chainId: 1,
|
|
50
|
-
rpc: "https://eth.llamarpc.com",
|
|
51
|
-
tokens: {
|
|
52
|
-
USDC: {
|
|
53
|
-
address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
54
|
-
decimals: 6,
|
|
55
|
-
symbol: "USDC"
|
|
56
|
-
},
|
|
57
|
-
USDT: {
|
|
58
|
-
address: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
|
59
|
-
decimals: 6,
|
|
60
|
-
symbol: "USDT"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
usdc: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
64
|
-
explorer: "https://etherscan.io/address/",
|
|
65
|
-
explorerTx: "https://etherscan.io/tx/",
|
|
66
|
-
avgBlockTime: 12
|
|
67
|
-
},
|
|
68
53
|
// ============ Testnet ============
|
|
69
54
|
base_sepolia: {
|
|
70
55
|
name: "Base Sepolia",
|
|
@@ -74,13 +59,17 @@ var CHAINS = {
|
|
|
74
59
|
USDC: {
|
|
75
60
|
address: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
|
|
76
61
|
decimals: 6,
|
|
77
|
-
symbol: "USDC"
|
|
62
|
+
symbol: "USDC",
|
|
63
|
+
eip712Name: "USDC"
|
|
64
|
+
// Testnet USDC uses 'USDC' not 'USD Coin'
|
|
78
65
|
},
|
|
79
66
|
USDT: {
|
|
80
67
|
address: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
|
|
81
68
|
// Same as USDC on testnet (no official USDT)
|
|
82
69
|
decimals: 6,
|
|
83
|
-
symbol: "USDT"
|
|
70
|
+
symbol: "USDT",
|
|
71
|
+
eip712Name: "USDC"
|
|
72
|
+
// Uses same contract as USDC
|
|
84
73
|
}
|
|
85
74
|
},
|
|
86
75
|
usdc: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
|
|
@@ -88,27 +77,34 @@ var CHAINS = {
|
|
|
88
77
|
explorerTx: "https://sepolia.basescan.org/tx/",
|
|
89
78
|
avgBlockTime: 2
|
|
90
79
|
},
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
80
|
+
// ============ Tempo Testnet (Moderato) ============
|
|
81
|
+
tempo_moderato: {
|
|
82
|
+
name: "Tempo Moderato",
|
|
83
|
+
chainId: 42431,
|
|
84
|
+
rpc: "https://rpc.moderato.tempo.xyz",
|
|
95
85
|
tokens: {
|
|
86
|
+
// TIP-20 stablecoins on Tempo testnet (from mppx SDK)
|
|
87
|
+
// Note: Tempo uses USD as native gas token, not ETH
|
|
96
88
|
USDC: {
|
|
97
|
-
address: "
|
|
89
|
+
address: "0x20c0000000000000000000000000000000000000",
|
|
90
|
+
// pathUSD - primary testnet stablecoin
|
|
98
91
|
decimals: 6,
|
|
99
|
-
symbol: "USDC"
|
|
92
|
+
symbol: "USDC",
|
|
93
|
+
eip712Name: "pathUSD"
|
|
100
94
|
},
|
|
101
95
|
USDT: {
|
|
102
|
-
address: "
|
|
103
|
-
//
|
|
96
|
+
address: "0x20c0000000000000000000000000000000000001",
|
|
97
|
+
// alphaUSD
|
|
104
98
|
decimals: 6,
|
|
105
|
-
symbol: "USDT"
|
|
99
|
+
symbol: "USDT",
|
|
100
|
+
eip712Name: "alphaUSD"
|
|
106
101
|
}
|
|
107
102
|
},
|
|
108
|
-
usdc: "
|
|
109
|
-
explorer: "https://
|
|
110
|
-
explorerTx: "https://
|
|
111
|
-
avgBlockTime:
|
|
103
|
+
usdc: "0x20c0000000000000000000000000000000000000",
|
|
104
|
+
explorer: "https://explore.testnet.tempo.xyz/address/",
|
|
105
|
+
explorerTx: "https://explore.testnet.tempo.xyz/tx/",
|
|
106
|
+
avgBlockTime: 0.5
|
|
107
|
+
// ~500ms finality
|
|
112
108
|
}
|
|
113
109
|
};
|
|
114
110
|
function getTokenAddress(chainName, token) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/chains/index.ts"],"sourcesContent":["/**\n * Blockchain Configuration\n */\n\nimport type { ChainConfig, ChainName, TokenSymbol } from '../types/index.js';\n\nexport const CHAINS: Record<ChainName, ChainConfig> = {\n // ============ Mainnet ============\n base: {\n name: 'Base',\n chainId: 8453,\n rpc: 'https://mainnet.base.org',\n tokens: {\n USDC: {\n address: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',\n decimals: 6,\n symbol: 'USDC',\n },\n USDT: {\n address: '0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2',\n decimals: 6,\n symbol: 'USDT',\n },\n },\n usdc: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', // deprecated, for backward compat\n explorer: 'https://basescan.org/address/',\n explorerTx: 'https://basescan.org/tx/',\n avgBlockTime: 2,\n },\n polygon: {\n name: 'Polygon',\n chainId: 137,\n rpc: 'https://polygon-bor-rpc.publicnode.com',\n tokens: {\n USDC: {\n address: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',\n decimals: 6,\n symbol: 'USDC',\n },\n USDT: {\n address: '0xc2132D05D31c914a87C6611C10748AEb04B58e8F',\n decimals: 6,\n symbol: 'USDT',\n
|
|
1
|
+
{"version":3,"sources":["../../src/chains/index.ts"],"sourcesContent":["/**\n * Blockchain Configuration\n */\n\nimport type { ChainConfig, ChainName, TokenSymbol } from '../types/index.js';\n\nexport const CHAINS: Record<ChainName, ChainConfig> = {\n // ============ Mainnet ============\n base: {\n name: 'Base',\n chainId: 8453,\n rpc: 'https://mainnet.base.org',\n tokens: {\n USDC: {\n address: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913',\n decimals: 6,\n symbol: 'USDC',\n eip712Name: 'USD Coin', // EIP-712 domain name\n },\n USDT: {\n address: '0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2',\n decimals: 6,\n symbol: 'USDT',\n eip712Name: 'Tether USD',\n },\n },\n usdc: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913', // deprecated, for backward compat\n explorer: 'https://basescan.org/address/',\n explorerTx: 'https://basescan.org/tx/',\n avgBlockTime: 2,\n },\n polygon: {\n name: 'Polygon',\n chainId: 137,\n rpc: 'https://polygon-bor-rpc.publicnode.com',\n tokens: {\n USDC: {\n address: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',\n decimals: 6,\n symbol: 'USDC',\n eip712Name: 'USD Coin',\n },\n USDT: {\n address: '0xc2132D05D31c914a87C6611C10748AEb04B58e8F',\n decimals: 6,\n symbol: 'USDT',\n eip712Name: '(PoS) Tether USD', // Polygon uses this name\n },\n },\n usdc: '0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359',\n explorer: 'https://polygonscan.com/address/',\n explorerTx: 'https://polygonscan.com/tx/',\n avgBlockTime: 2,\n },\n // ============ Testnet ============\n base_sepolia: {\n name: 'Base Sepolia',\n chainId: 84532,\n rpc: 'https://sepolia.base.org',\n tokens: {\n USDC: {\n address: '0x036CbD53842c5426634e7929541eC2318f3dCF7e',\n decimals: 6,\n symbol: 'USDC',\n eip712Name: 'USDC', // Testnet USDC uses 'USDC' not 'USD Coin'\n },\n USDT: {\n address: '0x036CbD53842c5426634e7929541eC2318f3dCF7e', // Same as USDC on testnet (no official USDT)\n decimals: 6,\n symbol: 'USDT',\n eip712Name: 'USDC', // Uses same contract as USDC\n },\n },\n usdc: '0x036CbD53842c5426634e7929541eC2318f3dCF7e',\n explorer: 'https://sepolia.basescan.org/address/',\n explorerTx: 'https://sepolia.basescan.org/tx/',\n avgBlockTime: 2,\n },\n // ============ Tempo Testnet (Moderato) ============\n tempo_moderato: {\n name: 'Tempo Moderato',\n chainId: 42431,\n rpc: 'https://rpc.moderato.tempo.xyz',\n tokens: {\n // TIP-20 stablecoins on Tempo testnet (from mppx SDK)\n // Note: Tempo uses USD as native gas token, not ETH\n USDC: {\n address: '0x20c0000000000000000000000000000000000000', // pathUSD - primary testnet stablecoin\n decimals: 6,\n symbol: 'USDC',\n eip712Name: 'pathUSD',\n },\n USDT: {\n address: '0x20c0000000000000000000000000000000000001', // alphaUSD\n decimals: 6,\n symbol: 'USDT',\n eip712Name: 'alphaUSD',\n },\n },\n usdc: '0x20c0000000000000000000000000000000000000',\n explorer: 'https://explore.testnet.tempo.xyz/address/',\n explorerTx: 'https://explore.testnet.tempo.xyz/tx/',\n avgBlockTime: 0.5, // ~500ms finality\n },\n};\n\n/**\n * Get token address for a chain\n */\nexport function getTokenAddress(chainName: ChainName, token: TokenSymbol): string {\n const chain = CHAINS[chainName];\n if (!chain) {\n throw new Error(`Unsupported chain: ${chainName}`);\n }\n const tokenConfig = chain.tokens[token];\n if (!tokenConfig) {\n throw new Error(`Token ${token} not supported on ${chainName}`);\n }\n return tokenConfig.address;\n}\n\n/**\n * Get token config for a chain\n */\nexport function getTokenConfig(chainName: ChainName, token: TokenSymbol) {\n const chain = CHAINS[chainName];\n if (!chain) {\n throw new Error(`Unsupported chain: ${chainName}`);\n }\n return chain.tokens[token];\n}\n\n/**\n * Get chain configuration\n */\nexport function getChain(name: ChainName): ChainConfig {\n const config = CHAINS[name];\n if (!config) {\n throw new Error(`Unsupported chain: ${name}. Supported: ${Object.keys(CHAINS).join(', ')}`);\n }\n return config;\n}\n\n/**\n * List all supported chains\n */\nexport function listChains(): ChainName[] {\n return Object.keys(CHAINS) as ChainName[];\n}\n\n/**\n * Get chain config by chainId\n */\nexport function getChainById(chainId: number): ChainConfig | undefined {\n return Object.values(CHAINS).find(c => c.chainId === chainId);\n}\n\n/**\n * ERC20 ABI (minimal, only required methods)\n */\nexport const ERC20_ABI = [\n 'function balanceOf(address owner) view returns (uint256)',\n 'function transfer(address to, uint256 amount) returns (bool)',\n 'function approve(address spender, uint256 amount) returns (bool)',\n 'function allowance(address owner, address spender) view returns (uint256)',\n 'function decimals() view returns (uint8)',\n 'function symbol() view returns (string)',\n 'function name() view returns (string)',\n 'function nonces(address owner) view returns (uint256)',\n 'function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)',\n 'event Transfer(address indexed from, address indexed to, uint256 value)',\n 'event Approval(address indexed owner, address indexed spender, uint256 value)',\n];\n\nexport type { ChainConfig, ChainName, TokenSymbol };\n"],"mappings":";AAMO,IAAM,SAAyC;AAAA;AAAA,EAEpD,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,UAAU;AAAA,QACV,QAAQ;AAAA,QACR,YAAY;AAAA;AAAA,MACd;AAAA,MACA,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,UAAU;AAAA,QACV,QAAQ;AAAA,QACR,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IACA,MAAM;AAAA;AAAA,IACN,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,cAAc;AAAA,EAChB;AAAA,EACA,SAAS;AAAA,IACP,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,UAAU;AAAA,QACV,QAAQ;AAAA,QACR,YAAY;AAAA,MACd;AAAA,MACA,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,UAAU;AAAA,QACV,QAAQ;AAAA,QACR,YAAY;AAAA;AAAA,MACd;AAAA,IACF;AAAA,IACA,MAAM;AAAA,IACN,UAAU;AAAA,IACV,YAAY;AAAA,IACZ,cAAc;AAAA,EAChB;AAAA;AAAA,EAEA,cAAc;AAAA,IACZ,MAAM;AAAA,IACN,SAAS;AAAA,IACT,KAAK;AAAA,IACL,QAAQ;AAAA,MACN,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,UAAU;AAAA,QACV,QAAQ;AAAA,QACR,YAAY;AAAA;AAAA,MACd;AAAA,MACA,MAAM;AAAA,QACJ,SAAS;AAAA;AAAA,QACT,UAAU;AAAA,QACV,QAAQ;AAAA,QACR,YAAY;AAAA;AAAA,MACd;AAAA,IACF;AAAA,IACA,MAAM;AAAA,IACN,UAAU;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