@circle-fin/usdckit 0.22.0 → 0.23.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/abis/EIP2612.d.ts +197 -0
- package/dist/cjs/abis/EIP2612.js +78 -0
- package/dist/cjs/actions/index.d.ts +67 -1
- package/dist/cjs/actions/index.js +7 -0
- package/dist/cjs/actions/index.test.js +4 -0
- package/dist/cjs/actions/permit.d.ts +19 -0
- package/dist/cjs/actions/permit.js +50 -0
- package/dist/cjs/actions/permit.test.d.ts +1 -0
- package/dist/cjs/actions/permit.test.js +652 -0
- package/dist/cjs/actions/signEIP2612Permit.d.ts +130 -0
- package/dist/cjs/actions/signEIP2612Permit.js +128 -0
- package/dist/cjs/actions/signEIP2612Permit.test.d.ts +1 -0
- package/dist/cjs/actions/signEIP2612Permit.test.js +434 -0
- package/dist/cjs/chains/ARC_TESTNET.d.ts +180 -0
- package/dist/cjs/chains/ARC_TESTNET.js +57 -0
- package/dist/cjs/chains/index.d.ts +21 -18
- package/dist/cjs/chains/index.js +27 -25
- package/dist/cjs/chains/index.test.js +1 -0
- package/dist/cjs/client.d.ts +1 -1
- package/dist/cjs/extractChain.d.ts +1492 -1313
- package/dist/cjs/extractChain.test.js +1 -0
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/metadata.js +1 -1
- package/dist/cjs/providers/circle-wallets/actions/createAccount.d.ts +1109 -930
- package/dist/cjs/providers/circle-wallets/actions/createAccount.js +3 -0
- package/dist/cjs/providers/circle-wallets/actions/estimateContractExecutionFee.d.ts +6 -0
- package/dist/cjs/providers/circle-wallets/actions/estimateTransferFee.d.ts +6 -0
- package/dist/cjs/providers/circle-wallets/actions/getAccounts.d.ts +1109 -930
- package/dist/cjs/providers/circle-wallets/index.d.ts +358 -0
- package/dist/cjs/providers/circle-wallets/index.js +2 -0
- package/dist/cjs/providers/circle-wallets/transports/index.d.ts +12 -0
- package/dist/cjs/utils/createConfig.d.ts +1 -1
- package/dist/cjs/utils/createCustomWalletClient.d.ts +1 -1
- package/dist/cjs/utils/getChainContractByAddress.d.ts +1 -1
- package/dist/cjs/utils/getContract.d.ts +8 -8
- package/dist/esm/abis/EIP2612.d.ts +197 -0
- package/dist/esm/abis/EIP2612.js +76 -0
- package/dist/esm/actions/index.d.ts +67 -1
- package/dist/esm/actions/index.js +7 -0
- package/dist/esm/actions/index.test.js +4 -0
- package/dist/esm/actions/permit.d.ts +19 -0
- package/dist/esm/actions/permit.js +44 -0
- package/dist/esm/actions/permit.test.d.ts +1 -0
- package/dist/esm/actions/permit.test.js +650 -0
- package/dist/esm/actions/signEIP2612Permit.d.ts +130 -0
- package/dist/esm/actions/signEIP2612Permit.js +122 -0
- package/dist/esm/actions/signEIP2612Permit.test.d.ts +1 -0
- package/dist/esm/actions/signEIP2612Permit.test.js +432 -0
- package/dist/esm/chains/ARC_TESTNET.d.ts +180 -0
- package/dist/esm/chains/ARC_TESTNET.js +54 -0
- package/dist/esm/chains/index.d.ts +21 -18
- package/dist/esm/chains/index.js +20 -18
- package/dist/esm/chains/index.test.js +1 -0
- package/dist/esm/client.d.ts +1 -1
- package/dist/esm/extractChain.d.ts +1492 -1313
- package/dist/esm/extractChain.test.js +2 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/metadata.js +1 -1
- package/dist/esm/providers/circle-wallets/actions/createAccount.d.ts +1109 -930
- package/dist/esm/providers/circle-wallets/actions/createAccount.js +3 -0
- package/dist/esm/providers/circle-wallets/actions/estimateContractExecutionFee.d.ts +6 -0
- package/dist/esm/providers/circle-wallets/actions/estimateTransferFee.d.ts +6 -0
- package/dist/esm/providers/circle-wallets/actions/getAccounts.d.ts +1109 -930
- package/dist/esm/providers/circle-wallets/index.d.ts +358 -0
- package/dist/esm/providers/circle-wallets/index.js +3 -1
- package/dist/esm/providers/circle-wallets/transports/index.d.ts +12 -0
- package/dist/esm/utils/createConfig.d.ts +1 -1
- package/dist/esm/utils/createCustomWalletClient.d.ts +1 -1
- package/dist/esm/utils/getChainContractByAddress.d.ts +1 -1
- package/dist/esm/utils/getContract.d.ts +8 -8
- package/package.json +5 -4
- package/dist/cjs/chains.d.ts +0 -2
- package/dist/cjs/chains.js +0 -12
- package/dist/esm/chains.d.ts +0 -2
- package/dist/esm/chains.js +0 -11
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
export declare const chain: {
|
|
2
|
+
blockExplorers: {
|
|
3
|
+
readonly default: {
|
|
4
|
+
readonly name: "ArcScan";
|
|
5
|
+
readonly url: "https://testnet.arcscan.app";
|
|
6
|
+
readonly apiUrl: "https://testnet.arcscan.app/api";
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
blockTime?: number | undefined | undefined;
|
|
10
|
+
contracts: {
|
|
11
|
+
readonly USDC: {
|
|
12
|
+
readonly address: "0x3600000000000000000000000000000000000000";
|
|
13
|
+
readonly abi: readonly [{
|
|
14
|
+
readonly type: "event";
|
|
15
|
+
readonly name: "Approval";
|
|
16
|
+
readonly inputs: readonly [{
|
|
17
|
+
readonly indexed: true;
|
|
18
|
+
readonly name: "owner";
|
|
19
|
+
readonly type: "address";
|
|
20
|
+
}, {
|
|
21
|
+
readonly indexed: true;
|
|
22
|
+
readonly name: "spender";
|
|
23
|
+
readonly type: "address";
|
|
24
|
+
}, {
|
|
25
|
+
readonly indexed: false;
|
|
26
|
+
readonly name: "value";
|
|
27
|
+
readonly type: "uint256";
|
|
28
|
+
}];
|
|
29
|
+
}, {
|
|
30
|
+
readonly type: "event";
|
|
31
|
+
readonly name: "Transfer";
|
|
32
|
+
readonly inputs: readonly [{
|
|
33
|
+
readonly indexed: true;
|
|
34
|
+
readonly name: "from";
|
|
35
|
+
readonly type: "address";
|
|
36
|
+
}, {
|
|
37
|
+
readonly indexed: true;
|
|
38
|
+
readonly name: "to";
|
|
39
|
+
readonly type: "address";
|
|
40
|
+
}, {
|
|
41
|
+
readonly indexed: false;
|
|
42
|
+
readonly name: "value";
|
|
43
|
+
readonly type: "uint256";
|
|
44
|
+
}];
|
|
45
|
+
}, {
|
|
46
|
+
readonly type: "function";
|
|
47
|
+
readonly name: "allowance";
|
|
48
|
+
readonly stateMutability: "view";
|
|
49
|
+
readonly inputs: readonly [{
|
|
50
|
+
readonly name: "owner";
|
|
51
|
+
readonly type: "address";
|
|
52
|
+
}, {
|
|
53
|
+
readonly name: "spender";
|
|
54
|
+
readonly type: "address";
|
|
55
|
+
}];
|
|
56
|
+
readonly outputs: readonly [{
|
|
57
|
+
readonly type: "uint256";
|
|
58
|
+
}];
|
|
59
|
+
}, {
|
|
60
|
+
readonly type: "function";
|
|
61
|
+
readonly name: "approve";
|
|
62
|
+
readonly stateMutability: "nonpayable";
|
|
63
|
+
readonly inputs: readonly [{
|
|
64
|
+
readonly name: "spender";
|
|
65
|
+
readonly type: "address";
|
|
66
|
+
}, {
|
|
67
|
+
readonly name: "amount";
|
|
68
|
+
readonly type: "uint256";
|
|
69
|
+
}];
|
|
70
|
+
readonly outputs: readonly [{
|
|
71
|
+
readonly type: "bool";
|
|
72
|
+
}];
|
|
73
|
+
}, {
|
|
74
|
+
readonly type: "function";
|
|
75
|
+
readonly name: "balanceOf";
|
|
76
|
+
readonly stateMutability: "view";
|
|
77
|
+
readonly inputs: readonly [{
|
|
78
|
+
readonly name: "account";
|
|
79
|
+
readonly type: "address";
|
|
80
|
+
}];
|
|
81
|
+
readonly outputs: readonly [{
|
|
82
|
+
readonly type: "uint256";
|
|
83
|
+
}];
|
|
84
|
+
}, {
|
|
85
|
+
readonly type: "function";
|
|
86
|
+
readonly name: "decimals";
|
|
87
|
+
readonly stateMutability: "view";
|
|
88
|
+
readonly inputs: readonly [];
|
|
89
|
+
readonly outputs: readonly [{
|
|
90
|
+
readonly type: "uint8";
|
|
91
|
+
}];
|
|
92
|
+
}, {
|
|
93
|
+
readonly type: "function";
|
|
94
|
+
readonly name: "name";
|
|
95
|
+
readonly stateMutability: "view";
|
|
96
|
+
readonly inputs: readonly [];
|
|
97
|
+
readonly outputs: readonly [{
|
|
98
|
+
readonly type: "string";
|
|
99
|
+
}];
|
|
100
|
+
}, {
|
|
101
|
+
readonly type: "function";
|
|
102
|
+
readonly name: "symbol";
|
|
103
|
+
readonly stateMutability: "view";
|
|
104
|
+
readonly inputs: readonly [];
|
|
105
|
+
readonly outputs: readonly [{
|
|
106
|
+
readonly type: "string";
|
|
107
|
+
}];
|
|
108
|
+
}, {
|
|
109
|
+
readonly type: "function";
|
|
110
|
+
readonly name: "totalSupply";
|
|
111
|
+
readonly stateMutability: "view";
|
|
112
|
+
readonly inputs: readonly [];
|
|
113
|
+
readonly outputs: readonly [{
|
|
114
|
+
readonly type: "uint256";
|
|
115
|
+
}];
|
|
116
|
+
}, {
|
|
117
|
+
readonly type: "function";
|
|
118
|
+
readonly name: "transfer";
|
|
119
|
+
readonly stateMutability: "nonpayable";
|
|
120
|
+
readonly inputs: readonly [{
|
|
121
|
+
readonly name: "recipient";
|
|
122
|
+
readonly type: "address";
|
|
123
|
+
}, {
|
|
124
|
+
readonly name: "amount";
|
|
125
|
+
readonly type: "uint256";
|
|
126
|
+
}];
|
|
127
|
+
readonly outputs: readonly [{
|
|
128
|
+
readonly type: "bool";
|
|
129
|
+
}];
|
|
130
|
+
}, {
|
|
131
|
+
readonly type: "function";
|
|
132
|
+
readonly name: "transferFrom";
|
|
133
|
+
readonly stateMutability: "nonpayable";
|
|
134
|
+
readonly inputs: readonly [{
|
|
135
|
+
readonly name: "sender";
|
|
136
|
+
readonly type: "address";
|
|
137
|
+
}, {
|
|
138
|
+
readonly name: "recipient";
|
|
139
|
+
readonly type: "address";
|
|
140
|
+
}, {
|
|
141
|
+
readonly name: "amount";
|
|
142
|
+
readonly type: "uint256";
|
|
143
|
+
}];
|
|
144
|
+
readonly outputs: readonly [{
|
|
145
|
+
readonly type: "bool";
|
|
146
|
+
}];
|
|
147
|
+
}];
|
|
148
|
+
readonly read: {
|
|
149
|
+
readonly decimals: () => 6;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
readonly multicall3: {
|
|
153
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
154
|
+
readonly blockCreated: 0;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
ensTlds?: readonly string[] | undefined;
|
|
158
|
+
id: 5042002;
|
|
159
|
+
name: "Arc Testnet";
|
|
160
|
+
nativeCurrency: {
|
|
161
|
+
readonly name: "USDC";
|
|
162
|
+
readonly symbol: "USDC";
|
|
163
|
+
readonly decimals: 18;
|
|
164
|
+
};
|
|
165
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
166
|
+
rpcUrls: {
|
|
167
|
+
readonly default: {
|
|
168
|
+
readonly http: readonly ["https://rpc.testnet.arc.network", "https://rpc.quicknode.testnet.arc.network", "https://rpc.blockdaemon.testnet.arc.network"];
|
|
169
|
+
readonly webSocket: readonly ["wss://rpc.testnet.arc.network", "wss://rpc.quicknode.testnet.arc.network"];
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
sourceId?: number | undefined | undefined;
|
|
173
|
+
testnet: true;
|
|
174
|
+
custom?: Record<string, unknown> | undefined;
|
|
175
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
176
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
177
|
+
readonly blockchainId: "ARC-TESTNET";
|
|
178
|
+
readonly blockchainVm: "EVM";
|
|
179
|
+
readonly formatters?: undefined;
|
|
180
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Copyright (c) 2025, Circle Internet Group, Inc.
|
|
2
|
+
// All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
// Circle Internet Group, Inc. CONFIDENTIAL
|
|
5
|
+
//
|
|
6
|
+
// This file includes unpublished proprietary source code of Circle Internet
|
|
7
|
+
// Group, Inc. The copyright notice above does not
|
|
8
|
+
// evidence any actual or intended publication of such source code. Disclosure
|
|
9
|
+
// of this source code or any related proprietary information is strictly
|
|
10
|
+
// prohibited without the express written permission of Circle Internet Group, Inc.
|
|
11
|
+
import { defineChain, erc20Abi } from 'viem';
|
|
12
|
+
// REF: https://github.com/wevm/viem/blob/00dd2e80646f6253c6d09be6acb7f57b7373737f/src/chains/definitions/arcTestnet.ts#L5
|
|
13
|
+
const arcTestnet = /*#__PURE__*/ defineChain({
|
|
14
|
+
id: 5042002,
|
|
15
|
+
name: 'Arc Testnet',
|
|
16
|
+
nativeCurrency: {
|
|
17
|
+
name: 'USDC',
|
|
18
|
+
symbol: 'USDC',
|
|
19
|
+
decimals: 18,
|
|
20
|
+
},
|
|
21
|
+
rpcUrls: {
|
|
22
|
+
default: {
|
|
23
|
+
http: [
|
|
24
|
+
'https://rpc.testnet.arc.network',
|
|
25
|
+
'https://rpc.quicknode.testnet.arc.network',
|
|
26
|
+
'https://rpc.blockdaemon.testnet.arc.network',
|
|
27
|
+
],
|
|
28
|
+
webSocket: ['wss://rpc.testnet.arc.network', 'wss://rpc.quicknode.testnet.arc.network'],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
blockExplorers: {
|
|
32
|
+
default: {
|
|
33
|
+
name: 'ArcScan',
|
|
34
|
+
url: 'https://testnet.arcscan.app',
|
|
35
|
+
apiUrl: 'https://testnet.arcscan.app/api',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
contracts: {
|
|
39
|
+
multicall3: {
|
|
40
|
+
address: '0xcA11bde05977b3631167028862bE2a173976CA11',
|
|
41
|
+
blockCreated: 0,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
testnet: true,
|
|
45
|
+
});
|
|
46
|
+
export const chain = defineChain({
|
|
47
|
+
...arcTestnet,
|
|
48
|
+
blockchainId: 'ARC-TESTNET',
|
|
49
|
+
blockchainVm: 'EVM',
|
|
50
|
+
contracts: {
|
|
51
|
+
...arcTestnet.contracts,
|
|
52
|
+
USDC: { address: '0x3600000000000000000000000000000000000000', abi: erc20Abi, read: { decimals: () => 6 } },
|
|
53
|
+
},
|
|
54
|
+
});
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { chain as ARB } from './ARB.js';
|
|
2
|
+
import { chain as ARB_SEPOLIA } from './ARB_SEPOLIA.js';
|
|
3
|
+
import { chain as ARC_TESTNET } from './ARC_TESTNET.js';
|
|
4
|
+
import { chain as AVAX } from './AVAX.js';
|
|
5
|
+
import { chain as AVAX_FUJI } from './AVAX_FUJI.js';
|
|
6
|
+
import { chain as BASE } from './BASE.js';
|
|
7
|
+
import { chain as BASE_SEPOLIA } from './BASE_SEPOLIA.js';
|
|
8
|
+
import { chain as ETH } from './ETH.js';
|
|
9
|
+
import { chain as ETH_SEPOLIA } from './ETH_SEPOLIA.js';
|
|
10
|
+
import { chain as MATIC } from './MATIC.js';
|
|
11
|
+
import { chain as MATIC_AMOY } from './MATIC_AMOY.js';
|
|
12
|
+
import { chain as NEAR } from './NEAR.js';
|
|
13
|
+
import { chain as NEAR_TESTNET } from './NEAR_TESTNET.js';
|
|
14
|
+
import { chain as OP } from './OP.js';
|
|
15
|
+
import { chain as OP_SEPOLIA } from './OP_SEPOLIA.js';
|
|
16
|
+
import { chain as SOL } from './SOL.js';
|
|
17
|
+
import { chain as SOL_DEVNET } from './SOL_DEVNET.js';
|
|
18
|
+
import { chain as UNI } from './UNI.js';
|
|
19
|
+
import { chain as UNI_SEPOLIA } from './UNI_SEPOLIA.js';
|
|
20
|
+
export { ARB, ARB_SEPOLIA, ARC_TESTNET, AVAX, AVAX_FUJI, ETH, ETH_SEPOLIA, MATIC, MATIC_AMOY, BASE, BASE_SEPOLIA, OP, OP_SEPOLIA, UNI, UNI_SEPOLIA, NEAR, NEAR_TESTNET, SOL, SOL_DEVNET, };
|
|
21
|
+
export type Chain = typeof ARB | typeof ARB_SEPOLIA | typeof ARC_TESTNET | typeof AVAX | typeof AVAX_FUJI | typeof ETH | typeof ETH_SEPOLIA | typeof MATIC | typeof MATIC_AMOY | typeof BASE | typeof BASE_SEPOLIA | typeof OP | typeof OP_SEPOLIA | typeof UNI | typeof UNI_SEPOLIA | typeof NEAR | typeof NEAR_TESTNET | typeof SOL | typeof SOL_DEVNET;
|
package/dist/esm/chains/index.js
CHANGED
|
@@ -8,21 +8,23 @@
|
|
|
8
8
|
// evidence any actual or intended publication of such source code. Disclosure
|
|
9
9
|
// of this source code or any related proprietary information is strictly
|
|
10
10
|
// prohibited without the express written permission of Circle Internet Group, Inc.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
11
|
+
import { chain as ARB } from './ARB.js';
|
|
12
|
+
import { chain as ARB_SEPOLIA } from './ARB_SEPOLIA.js';
|
|
13
|
+
import { chain as ARC_TESTNET } from './ARC_TESTNET.js';
|
|
14
|
+
import { chain as AVAX } from './AVAX.js';
|
|
15
|
+
import { chain as AVAX_FUJI } from './AVAX_FUJI.js';
|
|
16
|
+
import { chain as BASE } from './BASE.js';
|
|
17
|
+
import { chain as BASE_SEPOLIA } from './BASE_SEPOLIA.js';
|
|
18
|
+
import { chain as ETH } from './ETH.js';
|
|
19
|
+
import { chain as ETH_SEPOLIA } from './ETH_SEPOLIA.js';
|
|
20
|
+
import { chain as MATIC } from './MATIC.js';
|
|
21
|
+
import { chain as MATIC_AMOY } from './MATIC_AMOY.js';
|
|
22
|
+
import { chain as NEAR } from './NEAR.js';
|
|
23
|
+
import { chain as NEAR_TESTNET } from './NEAR_TESTNET.js';
|
|
24
|
+
import { chain as OP } from './OP.js';
|
|
25
|
+
import { chain as OP_SEPOLIA } from './OP_SEPOLIA.js';
|
|
26
|
+
import { chain as SOL } from './SOL.js';
|
|
27
|
+
import { chain as SOL_DEVNET } from './SOL_DEVNET.js';
|
|
28
|
+
import { chain as UNI } from './UNI.js';
|
|
29
|
+
import { chain as UNI_SEPOLIA } from './UNI_SEPOLIA.js';
|
|
30
|
+
export { ARB, ARB_SEPOLIA, ARC_TESTNET, AVAX, AVAX_FUJI, ETH, ETH_SEPOLIA, MATIC, MATIC_AMOY, BASE, BASE_SEPOLIA, OP, OP_SEPOLIA, UNI, UNI_SEPOLIA, NEAR, NEAR_TESTNET, SOL, SOL_DEVNET, };
|
package/dist/esm/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Actions as CoreActions } from './actions/index.js';
|
|
2
|
-
import type { Chain } from './chains.js';
|
|
2
|
+
import type { Chain } from './chains/index.js';
|
|
3
3
|
import type { Actions as CircleWalletsActions } from './providers/circle-wallets/actions/index.js';
|
|
4
4
|
import type { EIP1474Methods as CircleWalletsMethods } from './providers/circle-wallets/transports/index.js';
|
|
5
5
|
import type { Actions as CrossChainTransferProtocolActions } from './providers/cross-chain-transfer-protocol/actions/index.js';
|