@sudobility/contracts 1.11.0 → 1.11.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/README.md +3 -2
- package/dist/unified/src/utils/chain-config.d.ts +4 -2
- package/dist/unified/src/utils/chain-config.d.ts.map +1 -1
- package/dist/unified/src/utils/chain-config.js +46 -36
- package/dist/unified/src/utils/chain-config.js.map +1 -1
- package/dist/unified-esm/src/utils/chain-config.d.ts +4 -2
- package/dist/unified-esm/src/utils/chain-config.d.ts.map +1 -1
- package/dist/unified-esm/src/utils/chain-config.js +46 -35
- package/dist/unified-esm/src/utils/chain-config.js.map +1 -1
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -40,7 +40,8 @@ yarn add @johnqh/mail_box_contracts
|
|
|
40
40
|
The simplest way to initialize clients using API keys - all chain information is automatically derived:
|
|
41
41
|
|
|
42
42
|
```typescript
|
|
43
|
-
import { Chain,
|
|
43
|
+
import { Chain, ChainConfig } from '@sudobility/types';
|
|
44
|
+
import { RpcHelpers } from '@sudobility/configs';
|
|
44
45
|
import { buildChainConfig } from '@johnqh/mail_box_contracts';
|
|
45
46
|
import { MailerClient } from '@johnqh/mail_box_contracts';
|
|
46
47
|
|
|
@@ -52,7 +53,7 @@ const chainConfig: ChainConfig = {
|
|
|
52
53
|
};
|
|
53
54
|
|
|
54
55
|
// Step 2: All chain info is automatically derived!
|
|
55
|
-
const chainInfo = RpcHelpers.
|
|
56
|
+
const chainInfo = RpcHelpers.deriveChainInfo(chainConfig);
|
|
56
57
|
console.log('Using:', chainInfo.name, 'at', chainInfo.rpcUrl);
|
|
57
58
|
console.log('USDC:', chainInfo.usdcAddress);
|
|
58
59
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Optional
|
|
1
|
+
import { Optional } from '@sudobility/types';
|
|
2
2
|
import { ChainConfig } from '../unified/types.js';
|
|
3
3
|
export declare const DEFAULT_CHAIN_CONFIG: ChainConfig;
|
|
4
4
|
export declare const MAINNET_CHAIN_CONFIG: ChainConfig;
|
|
@@ -52,6 +52,9 @@ export declare function createChainConfig(evmNetwork?: Optional<string>, solanaN
|
|
|
52
52
|
* Build unified chain config from @sudobility/types ChainConfig
|
|
53
53
|
* Uses RpcHelpers to derive all chain information from API keys
|
|
54
54
|
*
|
|
55
|
+
* NOTE: This function is temporarily commented out because RpcHelpers and ChainType
|
|
56
|
+
* are not yet implemented in @sudobility/types. Use createChainConfig() instead.
|
|
57
|
+
*
|
|
55
58
|
* @param chainConfig - ChainConfig from @sudobility/types with chain enum and API keys
|
|
56
59
|
* @param mailerAddress - Optional mailer contract/program address
|
|
57
60
|
* @returns ChainConfig compatible with unified client
|
|
@@ -69,5 +72,4 @@ export declare function createChainConfig(evmNetwork?: Optional<string>, solanaN
|
|
|
69
72
|
* // Returns a complete config with RPC URL, chain ID, USDC address all derived
|
|
70
73
|
* ```
|
|
71
74
|
*/
|
|
72
|
-
export declare function buildChainConfig(chainConfig: TypesChainConfig, mailerAddress?: Optional<string>): ChainConfig;
|
|
73
75
|
//# sourceMappingURL=chain-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-config.d.ts","sourceRoot":"","sources":["../../../../src/utils/chain-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"chain-config.d.ts","sourceRoot":"","sources":["../../../../src/utils/chain-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAMlD,eAAO,MAAM,oBAAoB,EAAE,WAgBlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,WAgBlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,WAgBlC,CAAC;AAGF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6C3B,CAAC;AAGF,wBAAgB,iBAAiB,CAC/B,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,EAC7B,aAAa,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,GAC/B,WAAW,CAqCb;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG"}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.NETWORK_CONFIGS = exports.TESTNET_CHAIN_CONFIG = exports.MAINNET_CHAIN_CONFIG = exports.DEFAULT_CHAIN_CONFIG = void 0;
|
|
4
4
|
exports.createChainConfig = createChainConfig;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
// Note: ChainConfig from '@sudobility/types' is imported but renamed to avoid conflict
|
|
6
|
+
// RpcHelpers and ChainType imports removed as they don't exist in @sudobility/types yet
|
|
7
|
+
// buildChainConfig function below is commented out until RpcHelpers is implemented
|
|
7
8
|
exports.DEFAULT_CHAIN_CONFIG = {
|
|
8
9
|
evm: {
|
|
9
10
|
rpc: 'http://127.0.0.1:8545', // Local Hardhat network
|
|
@@ -136,6 +137,9 @@ function createChainConfig(evmNetwork, solanaNetwork) {
|
|
|
136
137
|
* Build unified chain config from @sudobility/types ChainConfig
|
|
137
138
|
* Uses RpcHelpers to derive all chain information from API keys
|
|
138
139
|
*
|
|
140
|
+
* NOTE: This function is temporarily commented out because RpcHelpers and ChainType
|
|
141
|
+
* are not yet implemented in @sudobility/types. Use createChainConfig() instead.
|
|
142
|
+
*
|
|
139
143
|
* @param chainConfig - ChainConfig from @sudobility/types with chain enum and API keys
|
|
140
144
|
* @param mailerAddress - Optional mailer contract/program address
|
|
141
145
|
* @returns ChainConfig compatible with unified client
|
|
@@ -153,41 +157,47 @@ function createChainConfig(evmNetwork, solanaNetwork) {
|
|
|
153
157
|
* // Returns a complete config with RPC URL, chain ID, USDC address all derived
|
|
154
158
|
* ```
|
|
155
159
|
*/
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
usdc: chainInfo.usdcAddress,
|
|
173
|
-
},
|
|
174
|
-
};
|
|
160
|
+
/* Commented out until RpcHelpers is implemented in @sudobility/types
|
|
161
|
+
export function buildChainConfig(
|
|
162
|
+
chainConfig: TypesChainConfig,
|
|
163
|
+
mailerAddress?: Optional<string>
|
|
164
|
+
): ChainConfig {
|
|
165
|
+
const chainInfo = RpcHelpers.getChainInfo(chainConfig);
|
|
166
|
+
const chainType = RpcHelpers.getChainType(chainConfig.chain);
|
|
167
|
+
|
|
168
|
+
const config: ChainConfig = {
|
|
169
|
+
evm: undefined,
|
|
170
|
+
solana: undefined,
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
if (chainType === ChainType.EVM) {
|
|
174
|
+
if (!chainInfo.rpcUrl) {
|
|
175
|
+
throw new Error(`Unable to derive RPC URL for chain ${chainConfig.chain}`);
|
|
175
176
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
188
|
-
else {
|
|
189
|
-
throw new Error(`Unsupported chain type: ${chainType}`);
|
|
177
|
+
config.evm = {
|
|
178
|
+
rpc: chainInfo.rpcUrl,
|
|
179
|
+
chainId: chainInfo.chainId,
|
|
180
|
+
contracts: {
|
|
181
|
+
mailer: mailerAddress || '',
|
|
182
|
+
usdc: chainInfo.usdcAddress,
|
|
183
|
+
},
|
|
184
|
+
};
|
|
185
|
+
} else if (chainType === ChainType.SOLANA) {
|
|
186
|
+
if (!chainInfo.rpcUrl) {
|
|
187
|
+
throw new Error(`Unable to derive RPC URL for chain ${chainConfig.chain}`);
|
|
190
188
|
}
|
|
191
|
-
|
|
189
|
+
config.solana = {
|
|
190
|
+
rpc: chainInfo.rpcUrl,
|
|
191
|
+
programs: {
|
|
192
|
+
mailer: mailerAddress || '',
|
|
193
|
+
},
|
|
194
|
+
usdcMint: chainInfo.usdcAddress,
|
|
195
|
+
};
|
|
196
|
+
} else {
|
|
197
|
+
throw new Error(`Unsupported chain type: ${chainType}`);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
return config;
|
|
192
201
|
}
|
|
202
|
+
*/
|
|
193
203
|
//# sourceMappingURL=chain-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-config.js","sourceRoot":"","sources":["../../../../src/utils/chain-config.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"chain-config.js","sourceRoot":"","sources":["../../../../src/utils/chain-config.ts"],"names":[],"mappings":";;;AA8GA,8CAwCC;AAnJD,uFAAuF;AACvF,wFAAwF;AACxF,mFAAmF;AAEtE,QAAA,oBAAoB,GAAgB;IAC/C,GAAG,EAAE;QACH,GAAG,EAAE,uBAAuB,EAAE,wBAAwB;QACtD,OAAO,EAAE,KAAK;QACd,SAAS,EAAE;YACT,MAAM,EAAE,EAAE,EAAE,kCAAkC;YAC9C,IAAI,EAAE,EAAE,EAAE,iBAAiB;SAC5B;KACF;IACD,MAAM,EAAE;QACN,GAAG,EAAE,uBAAuB,EAAE,yBAAyB;QACvD,QAAQ,EAAE;YACR,MAAM,EAAE,8CAA8C,EAAE,uCAAuC;SAChG;QACD,QAAQ,EAAE,8CAA8C,EAAE,iBAAiB;KAC5E;CACF,CAAC;AAEW,QAAA,oBAAoB,GAAgB;IAC/C,GAAG,EAAE;QACH,GAAG,EAAE,mDAAmD;QACxD,OAAO,EAAE,CAAC;QACV,SAAS,EAAE;YACT,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,4CAA4C,EAAE,uBAAuB;SAC5E;KACF;IACD,MA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js';
|
|
3
3
|
export declare const DEFAULT_CHAIN_CONFIG: ChainConfig;
|
|
4
4
|
export declare const MAINNET_CHAIN_CONFIG: ChainConfig;
|
|
@@ -52,6 +52,9 @@ export declare function createChainConfig(evmNetwork?: Optional<string>, solanaN
|
|
|
52
52
|
* Build unified chain config from @sudobility/types ChainConfig
|
|
53
53
|
* Uses RpcHelpers to derive all chain information from API keys
|
|
54
54
|
*
|
|
55
|
+
* NOTE: This function is temporarily commented out because RpcHelpers and ChainType
|
|
56
|
+
* are not yet implemented in @sudobility/types. Use createChainConfig() instead.
|
|
57
|
+
*
|
|
55
58
|
* @param chainConfig - ChainConfig from @sudobility/types with chain enum and API keys
|
|
56
59
|
* @param mailerAddress - Optional mailer contract/program address
|
|
57
60
|
* @returns ChainConfig compatible with unified client
|
|
@@ -69,5 +72,4 @@ export declare function createChainConfig(evmNetwork?: Optional<string>, solanaN
|
|
|
69
72
|
* // Returns a complete config with RPC URL, chain ID, USDC address all derived
|
|
70
73
|
* ```
|
|
71
74
|
*/
|
|
72
|
-
export declare function buildChainConfig(chainConfig: TypesChainConfig, mailerAddress?: Optional<string>): ChainConfig;
|
|
73
75
|
//# sourceMappingURL=chain-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-config.d.ts","sourceRoot":"","sources":["../../../../src/utils/chain-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"chain-config.d.ts","sourceRoot":"","sources":["../../../../src/utils/chain-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAMlD,eAAO,MAAM,oBAAoB,EAAE,WAgBlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,WAgBlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,WAgBlC,CAAC;AAGF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6C3B,CAAC;AAGF,wBAAgB,iBAAiB,CAC/B,UAAU,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,EAC7B,aAAa,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,GAC/B,WAAW,CAqCb;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// Note: ChainConfig from '@sudobility/types' is imported but renamed to avoid conflict
|
|
2
|
+
// RpcHelpers and ChainType imports removed as they don't exist in @sudobility/types yet
|
|
3
|
+
// buildChainConfig function below is commented out until RpcHelpers is implemented
|
|
2
4
|
export const DEFAULT_CHAIN_CONFIG = {
|
|
3
5
|
evm: {
|
|
4
6
|
rpc: 'http://127.0.0.1:8545', // Local Hardhat network
|
|
@@ -131,6 +133,9 @@ export function createChainConfig(evmNetwork, solanaNetwork) {
|
|
|
131
133
|
* Build unified chain config from @sudobility/types ChainConfig
|
|
132
134
|
* Uses RpcHelpers to derive all chain information from API keys
|
|
133
135
|
*
|
|
136
|
+
* NOTE: This function is temporarily commented out because RpcHelpers and ChainType
|
|
137
|
+
* are not yet implemented in @sudobility/types. Use createChainConfig() instead.
|
|
138
|
+
*
|
|
134
139
|
* @param chainConfig - ChainConfig from @sudobility/types with chain enum and API keys
|
|
135
140
|
* @param mailerAddress - Optional mailer contract/program address
|
|
136
141
|
* @returns ChainConfig compatible with unified client
|
|
@@ -148,41 +153,47 @@ export function createChainConfig(evmNetwork, solanaNetwork) {
|
|
|
148
153
|
* // Returns a complete config with RPC URL, chain ID, USDC address all derived
|
|
149
154
|
* ```
|
|
150
155
|
*/
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
usdc: chainInfo.usdcAddress,
|
|
168
|
-
},
|
|
169
|
-
};
|
|
156
|
+
/* Commented out until RpcHelpers is implemented in @sudobility/types
|
|
157
|
+
export function buildChainConfig(
|
|
158
|
+
chainConfig: TypesChainConfig,
|
|
159
|
+
mailerAddress?: Optional<string>
|
|
160
|
+
): ChainConfig {
|
|
161
|
+
const chainInfo = RpcHelpers.getChainInfo(chainConfig);
|
|
162
|
+
const chainType = RpcHelpers.getChainType(chainConfig.chain);
|
|
163
|
+
|
|
164
|
+
const config: ChainConfig = {
|
|
165
|
+
evm: undefined,
|
|
166
|
+
solana: undefined,
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
if (chainType === ChainType.EVM) {
|
|
170
|
+
if (!chainInfo.rpcUrl) {
|
|
171
|
+
throw new Error(`Unable to derive RPC URL for chain ${chainConfig.chain}`);
|
|
170
172
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
else {
|
|
184
|
-
throw new Error(`Unsupported chain type: ${chainType}`);
|
|
173
|
+
config.evm = {
|
|
174
|
+
rpc: chainInfo.rpcUrl,
|
|
175
|
+
chainId: chainInfo.chainId,
|
|
176
|
+
contracts: {
|
|
177
|
+
mailer: mailerAddress || '',
|
|
178
|
+
usdc: chainInfo.usdcAddress,
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
} else if (chainType === ChainType.SOLANA) {
|
|
182
|
+
if (!chainInfo.rpcUrl) {
|
|
183
|
+
throw new Error(`Unable to derive RPC URL for chain ${chainConfig.chain}`);
|
|
185
184
|
}
|
|
186
|
-
|
|
185
|
+
config.solana = {
|
|
186
|
+
rpc: chainInfo.rpcUrl,
|
|
187
|
+
programs: {
|
|
188
|
+
mailer: mailerAddress || '',
|
|
189
|
+
},
|
|
190
|
+
usdcMint: chainInfo.usdcAddress,
|
|
191
|
+
};
|
|
192
|
+
} else {
|
|
193
|
+
throw new Error(`Unsupported chain type: ${chainType}`);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return config;
|
|
187
197
|
}
|
|
198
|
+
*/
|
|
188
199
|
//# sourceMappingURL=chain-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chain-config.js","sourceRoot":"","sources":["../../../../src/utils/chain-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chain-config.js","sourceRoot":"","sources":["../../../../src/utils/chain-config.ts"],"names":[],"mappings":"AAGA,uFAAuF;AACvF,wFAAwF;AACxF,mFAAmF;AAEnF,MAAM,CAAC,MAAM,oBAAoB,GAAgB;IAC/C,GAAG,EAAE;QACH,GAAG,EAAE,uBAAuB,EAAE,wBAAwB;QACtD,OAAO,EAAE,KAAK;QACd,SAAS,EAAE;YACT,MAAM,EAAE,EAAE,EAAE,kCAAkC;YAC9C,IAAI,EAAE,EAAE,EAAE,iBAAiB;SAC5B;KACF;IACD,MAAM,EAAE;QACN,GAAG,EAAE,uBAAuB,EAAE,yBAAyB;QACvD,QAAQ,EAAE;YACR,MAAM,EAAE,8CAA8C,EAAE,uCAAuC;SAChG;QACD,QAAQ,EAAE,8CAA8C,EAAE,iBAAiB;KAC5E;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAgB;IAC/C,GAAG,EAAE;QACH,GAAG,EAAE,mDAAmD;QACxD,OAAO,EAAE,CAAC;QACV,SAAS,EAAE;YACT,MAAM,EAAE,EAAE;YACV,IAAI,EAAE,4CAA4C,EAAE,uBAAuB;SAC5E;KACF;IACD,MAAM,EAAE;QACN,GAAG,EAAE,qCAAqC;QAC1C,QAAQ,EAAE;YACR,MAAM,EAAE,8CAA8C,EAAE,uCAAuC;SAChG;QACD,QAAQ,EAAE,8CAA8C,EAAE,8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ACP,GAAG,EAAE,gCAAgC;QACrC,QAAQ,EAAE,8CAA8C;KACzD;CACF,CAAC;AAEF,+DAA+D;AAC/D,MAAM,UAAU,iBAAiB,CAC/B,UAA6B,EAC7B,aAAgC;IAEhC,MAAM,MAAM,GAAgB;QAC1B,GAAG,EAAE,SAAS;QACd,MAAM,EAAE,SAAS;KAClB,CAAC;IAEF,IAAI,UAAU,IAAK,eAA2C,CAAC,UAAU,CAAC,EAAE,CAAC;QAC3E,MAAM,SAAS,GACb,eACD,CAAC,UAAU,CAAC,CAAC;QACd,MAAM,CAAC,GAAG,GAAG;YACX,GAAG,EAAE,SAAS,CAAC,GAAa;YAC5B,OAAO,EAAE,SAAS,CAAC,OAAiB;YACpC,SAAS,EAAE;gBACT,MAAM,EAAE,EAAE,EAAE,6BAA6B;gBACzC,IAAI,EAAE,SAAS,CAAC,IAAc;aAC/B;SACF,CAAC;IACJ,CAAC;IAED,IACE,aAAa;QACZ,eAA2C,CAAC,aAAa,CAAC,EAC3D,CAAC;QACD,MAAM,YAAY,GAChB,eACD,CAAC,aAAa,CAAC,CAAC;QACjB,MAAM,CAAC,MAAM,GAAG;YACd,GAAG,EAAE,YAAY,CAAC,GAAa;YAC/B,QAAQ,EAAE;gBACR,MAAM,EAAE,8CAA8C,EAAE,uCAAuC;aAChG;YACD,QAAQ,EAAE,YAAY,CAAC,QAAkB;SAC1C,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sudobility/contracts",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/unified-esm/src/unified/index.js",
|
|
6
6
|
"module": "dist/unified-esm/src/unified/index.js",
|
|
@@ -213,10 +213,10 @@
|
|
|
213
213
|
"@typechain/hardhat": "^9.1.0",
|
|
214
214
|
"@types/chai": "^4.3.20",
|
|
215
215
|
"@types/mocha": "^10.0.10",
|
|
216
|
-
"@types/node": "^22.
|
|
217
|
-
"@types/react": "^19.
|
|
218
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
219
|
-
"@typescript-eslint/parser": "^8.
|
|
216
|
+
"@types/node": "^22.18.12",
|
|
217
|
+
"@types/react": "^19.2.2",
|
|
218
|
+
"@typescript-eslint/eslint-plugin": "^8.46.2",
|
|
219
|
+
"@typescript-eslint/parser": "^8.46.2",
|
|
220
220
|
"chai": "^4.5.0",
|
|
221
221
|
"chai-as-promised": "^7.1.2",
|
|
222
222
|
"dotenv": "^17.2.3",
|
|
@@ -230,10 +230,11 @@
|
|
|
230
230
|
"ts-node": "^10.9.2",
|
|
231
231
|
"typescript": "^5.9.3",
|
|
232
232
|
"typechain": "^8.3.2",
|
|
233
|
-
"viem": "^2.38.
|
|
233
|
+
"viem": "^2.38.4"
|
|
234
234
|
},
|
|
235
235
|
"dependencies": {
|
|
236
|
-
"@sudobility/
|
|
236
|
+
"@sudobility/configs": "^0.0.6",
|
|
237
|
+
"@sudobility/types": "^1.8.33"
|
|
237
238
|
},
|
|
238
239
|
"overrides": {
|
|
239
240
|
"bigint-buffer": "^1.1.5",
|