@armory-sh/tokens 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Sawyer Cutler
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # @armory-sh/tokens
2
+
3
+ Token address registry for supported networks and assets.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ bun add @armory-sh/tokens
9
+ ```
10
+
11
+ ## Use
12
+
13
+ ```typescript
14
+ import { USDC_BASE, USDC_ETHEREUM } from '@armory-sh/tokens'
15
+
16
+ console.log(USDC_BASE.address) // 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
17
+ ```
18
+
19
+ ---
20
+
21
+ MIT License | Sawyer Cutler 2026 | Provided "AS IS" without warranty
@@ -0,0 +1,42 @@
1
+ import { CustomToken } from '@armory-sh/base';
2
+ export { CustomToken } from '@armory-sh/base';
3
+
4
+ type TokenConfig = CustomToken;
5
+ declare const USDC_BASE: TokenConfig;
6
+ declare const USDC_BASE_SEPOLIA: TokenConfig;
7
+ declare const EURC_BASE: TokenConfig;
8
+ declare const USDC_SKALE_BASE: TokenConfig;
9
+ declare const USDT_SKALE_BASE: TokenConfig;
10
+ declare const WBTC_SKALE_BASE: TokenConfig;
11
+ declare const WETH_SKALE_BASE: TokenConfig;
12
+ declare const SKL_SKALE_BASE_SEPOLIA: TokenConfig;
13
+ declare const USDC_SKALE_BASE_SEPOLIA: TokenConfig;
14
+ declare const USDT_SKALE_BASE_SEPOLIA: TokenConfig;
15
+ declare const WBTC_SKALE_BASE_SEPOLIA: TokenConfig;
16
+ declare const WETH_SKALE_BASE_SEPOLIA: TokenConfig;
17
+ declare const getToken: (chainId: number, contractAddress: string) => TokenConfig | undefined;
18
+ declare const getAllTokens: () => TokenConfig[];
19
+ declare const getTokensBySymbol: (symbol: string) => TokenConfig[];
20
+ declare const getTokensByChain: (chainId: number) => TokenConfig[];
21
+ declare const getUSDCTokens: () => TokenConfig[];
22
+ declare const getEURCTokens: () => TokenConfig[];
23
+ declare const getSKLTokens: () => TokenConfig[];
24
+ declare const getUSDTTokens: () => TokenConfig[];
25
+ declare const getWBTCTokens: () => TokenConfig[];
26
+ declare const getWETHTokens: () => TokenConfig[];
27
+ declare const TOKENS: {
28
+ readonly USDC_BASE: CustomToken;
29
+ readonly USDC_BASE_SEPOLIA: CustomToken;
30
+ readonly EURC_BASE: CustomToken;
31
+ readonly USDC_SKALE_BASE: CustomToken;
32
+ readonly USDT_SKALE_BASE: CustomToken;
33
+ readonly WBTC_SKALE_BASE: CustomToken;
34
+ readonly WETH_SKALE_BASE: CustomToken;
35
+ readonly SKL_SKALE_BASE_SEPOLIA: CustomToken;
36
+ readonly USDC_SKALE_BASE_SEPOLIA: CustomToken;
37
+ readonly USDT_SKALE_BASE_SEPOLIA: CustomToken;
38
+ readonly WBTC_SKALE_BASE_SEPOLIA: CustomToken;
39
+ readonly WETH_SKALE_BASE_SEPOLIA: CustomToken;
40
+ };
41
+
42
+ export { EURC_BASE, SKL_SKALE_BASE_SEPOLIA, TOKENS, type TokenConfig, USDC_BASE, USDC_BASE_SEPOLIA, USDC_SKALE_BASE, USDC_SKALE_BASE_SEPOLIA, USDT_SKALE_BASE, USDT_SKALE_BASE_SEPOLIA, WBTC_SKALE_BASE, WBTC_SKALE_BASE_SEPOLIA, WETH_SKALE_BASE, WETH_SKALE_BASE_SEPOLIA, getAllTokens, getEURCTokens, getSKLTokens, getToken, getTokensByChain, getTokensBySymbol, getUSDCTokens, getUSDTTokens, getWBTCTokens, getWETHTokens };
package/dist/index.js ADDED
@@ -0,0 +1,156 @@
1
+ // src/index.ts
2
+ var tokenRegistry = /* @__PURE__ */ new Map();
3
+ var tokenKey = (chainId, contractAddress) => `${chainId}:${contractAddress.toLowerCase()}`;
4
+ var USDC_BASE = {
5
+ symbol: "USDC",
6
+ name: "USD Coin",
7
+ version: "2",
8
+ contractAddress: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
9
+ chainId: 8453,
10
+ decimals: 6
11
+ };
12
+ var USDC_BASE_SEPOLIA = {
13
+ symbol: "USDC",
14
+ name: "USD Coin",
15
+ version: "2",
16
+ contractAddress: "0x036C0372124Afb96038AEeCb8460bDDfbaDf891f18",
17
+ chainId: 84532,
18
+ decimals: 6
19
+ };
20
+ var EURC_BASE = {
21
+ symbol: "EURC",
22
+ name: "EURC",
23
+ version: "2",
24
+ contractAddress: "0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42",
25
+ chainId: 8453,
26
+ decimals: 6
27
+ };
28
+ var USDC_SKALE_BASE = {
29
+ symbol: "USDC",
30
+ name: "USD Coin",
31
+ version: "2",
32
+ contractAddress: "0x85889c8c714505E0c94b30fcfcF64fE3Ac8FCb20",
33
+ chainId: 1187947933,
34
+ decimals: 6
35
+ };
36
+ var USDT_SKALE_BASE = {
37
+ symbol: "USDT",
38
+ name: "Tether USD",
39
+ version: "1",
40
+ contractAddress: "0x2bF5bF154b515EaA82C31a65ec11554fF5aF7fCA",
41
+ chainId: 1187947933,
42
+ decimals: 6
43
+ };
44
+ var WBTC_SKALE_BASE = {
45
+ symbol: "WBTC",
46
+ name: "Wrapped BTC",
47
+ version: "1",
48
+ contractAddress: "0x1aeeCFE5454c83B42D8A316246CAc9739E7f690e",
49
+ chainId: 1187947933,
50
+ decimals: 8
51
+ };
52
+ var WETH_SKALE_BASE = {
53
+ symbol: "WETH",
54
+ name: "Wrapped Ether",
55
+ version: "1",
56
+ contractAddress: "0x7bD39ABBd0Dd13103542cAe3276C7fA332bCA486",
57
+ chainId: 1187947933,
58
+ decimals: 6
59
+ };
60
+ var SKL_SKALE_BASE_SEPOLIA = {
61
+ symbol: "SKL",
62
+ name: "SKALE",
63
+ version: "1",
64
+ contractAddress: "0xaf2e0ff5b5f51553fdb34ce7f04a6c3201cee57b",
65
+ chainId: 324705682,
66
+ decimals: 18
67
+ };
68
+ var USDC_SKALE_BASE_SEPOLIA = {
69
+ symbol: "USDC",
70
+ name: "USD Coin",
71
+ version: "2",
72
+ contractAddress: "0x2e08028E3C4c2356572E096d8EF835cD5C6030bD",
73
+ chainId: 324705682,
74
+ decimals: 6
75
+ };
76
+ var USDT_SKALE_BASE_SEPOLIA = {
77
+ symbol: "USDT",
78
+ name: "Tether USD",
79
+ version: "1",
80
+ contractAddress: "0x3ca0a49f511c2c89c4dcbbf1731120d8919050bf",
81
+ chainId: 324705682,
82
+ decimals: 6
83
+ };
84
+ var WBTC_SKALE_BASE_SEPOLIA = {
85
+ symbol: "WBTC",
86
+ name: "Wrapped BTC",
87
+ version: "1",
88
+ contractAddress: "0x4512eacd4186b025186e1cf6cc0d89497c530e87",
89
+ chainId: 324705682,
90
+ decimals: 8
91
+ };
92
+ var WETH_SKALE_BASE_SEPOLIA = {
93
+ symbol: "WETH",
94
+ name: "Wrapped Ether",
95
+ version: "1",
96
+ contractAddress: "0xf94056bd7f6965db3757e1b145f200b7346b4fc0",
97
+ chainId: 324705682,
98
+ decimals: 6
99
+ };
100
+ var registerToken = (token) => {
101
+ tokenRegistry.set(tokenKey(token.chainId, token.contractAddress), token);
102
+ return token;
103
+ };
104
+ var getToken = (chainId, contractAddress) => tokenRegistry.get(tokenKey(chainId, contractAddress));
105
+ var getAllTokens = () => Array.from(tokenRegistry.values());
106
+ var getTokensBySymbol = (symbol) => Array.from(tokenRegistry.values()).filter((t) => t.symbol === symbol);
107
+ var getTokensByChain = (chainId) => Array.from(tokenRegistry.values()).filter((t) => t.chainId === chainId);
108
+ var getUSDCTokens = () => getTokensBySymbol("USDC");
109
+ var getEURCTokens = () => getTokensBySymbol("EURC");
110
+ var getSKLTokens = () => getTokensBySymbol("SKL");
111
+ var getUSDTTokens = () => getTokensBySymbol("USDT");
112
+ var getWBTCTokens = () => getTokensBySymbol("WBTC");
113
+ var getWETHTokens = () => getTokensBySymbol("WETH");
114
+ var TOKENS = {
115
+ // Base
116
+ USDC_BASE,
117
+ USDC_BASE_SEPOLIA,
118
+ EURC_BASE,
119
+ // SKALE Base Mainnet
120
+ USDC_SKALE_BASE,
121
+ USDT_SKALE_BASE,
122
+ WBTC_SKALE_BASE,
123
+ WETH_SKALE_BASE,
124
+ // SKALE Base Sepolia Testnet
125
+ SKL_SKALE_BASE_SEPOLIA,
126
+ USDC_SKALE_BASE_SEPOLIA,
127
+ USDT_SKALE_BASE_SEPOLIA,
128
+ WBTC_SKALE_BASE_SEPOLIA,
129
+ WETH_SKALE_BASE_SEPOLIA
130
+ };
131
+ Object.values(TOKENS).forEach(registerToken);
132
+ export {
133
+ EURC_BASE,
134
+ SKL_SKALE_BASE_SEPOLIA,
135
+ TOKENS,
136
+ USDC_BASE,
137
+ USDC_BASE_SEPOLIA,
138
+ USDC_SKALE_BASE,
139
+ USDC_SKALE_BASE_SEPOLIA,
140
+ USDT_SKALE_BASE,
141
+ USDT_SKALE_BASE_SEPOLIA,
142
+ WBTC_SKALE_BASE,
143
+ WBTC_SKALE_BASE_SEPOLIA,
144
+ WETH_SKALE_BASE,
145
+ WETH_SKALE_BASE_SEPOLIA,
146
+ getAllTokens,
147
+ getEURCTokens,
148
+ getSKLTokens,
149
+ getToken,
150
+ getTokensByChain,
151
+ getTokensBySymbol,
152
+ getUSDCTokens,
153
+ getUSDTTokens,
154
+ getWBTCTokens,
155
+ getWETHTokens
156
+ };
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@armory-sh/tokens",
3
+ "version": "0.2.0",
4
+ "license": "MIT",
5
+ "author": "Sawyer Cutler <sawyer@dirtroad.dev>",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "bun": "./src/index.ts",
13
+ "default": "./dist/index.js"
14
+ },
15
+ "./dist/*": "./dist/*.js"
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "README.md"
20
+ ],
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/thegreataxios/armory.git",
27
+ "directory": "packages/tokens"
28
+ },
29
+ "dependencies": {
30
+ "@armory-sh/base": "workspace:*"
31
+ },
32
+ "devDependencies": {
33
+ "typescript": "5.9.3",
34
+ "bun-types": "latest"
35
+ },
36
+ "scripts": {
37
+ "build": "tsup",
38
+ "test": "bun test"
39
+ }
40
+ }