@dynamic-labs/ethereum-core
Advanced tools
Comparing version 4.1.0 to 4.2.0
'use client' | ||
var version = "4.1.0"; | ||
var version = "4.2.0"; | ||
export { version }; |
{ | ||
"name": "@dynamic-labs/ethereum-core", | ||
"version": "4.1.0", | ||
"version": "4.2.0", | ||
"description": "Core package for utilities and types for viem", | ||
@@ -25,10 +25,10 @@ "author": "Dynamic Labs, Inc.", | ||
"viem": "^2.21.55", | ||
"@dynamic-labs/assert-package-version": "4.1.0", | ||
"@dynamic-labs/logger": "4.1.0", | ||
"@dynamic-labs/rpc-providers": "4.1.0", | ||
"@dynamic-labs/types": "4.1.0", | ||
"@dynamic-labs/utils": "4.1.0", | ||
"@dynamic-labs/wallet-book": "4.1.0", | ||
"@dynamic-labs/wallet-connector-core": "4.1.0" | ||
"@dynamic-labs/assert-package-version": "4.2.0", | ||
"@dynamic-labs/logger": "4.2.0", | ||
"@dynamic-labs/rpc-providers": "4.2.0", | ||
"@dynamic-labs/types": "4.2.0", | ||
"@dynamic-labs/utils": "4.2.0", | ||
"@dynamic-labs/wallet-book": "4.2.0", | ||
"@dynamic-labs/wallet-connector-core": "4.2.0" | ||
} | ||
} |
@@ -18,3 +18,3 @@ 'use client' | ||
constructor(props) { | ||
var _a; | ||
var _a, _b; | ||
super(props); | ||
@@ -34,3 +34,3 @@ this.supportedChains = ['EVM', 'ETH']; | ||
this.chainRpcProviders = props.chainRpcProviders; | ||
(_a = this.chainRpcProviders) === null || _a === void 0 ? void 0 : _a.registerEvmProviders(); | ||
(_a = this.chainRpcProviders) === null || _a === void 0 ? void 0 : _a.registerEvmProviders((_b = props.providersConfig) !== null && _b !== void 0 ? _b : {}); | ||
} | ||
@@ -37,0 +37,0 @@ getPublicClient() { |
import './RpcProvidersEthereum'; | ||
export * from '@dynamic-labs/rpc-providers'; | ||
export { type EvmRpcProviderMethods, evmProvidersSelector, } from './evmProvidersSelector'; | ||
export type { RegisterEvmProvidersConfig } from './RpcProvidersEthereum/RpcProvidersEthereum'; |
@@ -1,2 +0,2 @@ | ||
import { Chain, PublicClient, Transport } from 'viem'; | ||
import { Chain, PublicClient, Transport, HttpTransportConfig } from 'viem'; | ||
import { RpcProviders } from '@dynamic-labs/rpc-providers'; | ||
@@ -8,2 +8,5 @@ type IEvmRpcProvider = { | ||
}; | ||
export type RegisterEvmProvidersConfig = { | ||
publicClientHttpTransportConfig?: HttpTransportConfig; | ||
}; | ||
declare module '@dynamic-labs/rpc-providers' { | ||
@@ -16,5 +19,5 @@ type EvmRpcProvider = IEvmRpcProvider; | ||
getEvmProviderByChainId(rpcProviders: RpcProviders, chainId: number): EvmRpcProvider | undefined; | ||
registerEvmProviders(): void; | ||
registerEvmProviders(providersConfig: RegisterEvmProvidersConfig): void; | ||
} | ||
} | ||
export {}; |
@@ -12,3 +12,6 @@ 'use client' | ||
}; | ||
ChainRpcProviders.registerEvmProviders = () => { | ||
ChainRpcProviders.registerEvmProviders = (providersConfig) => { | ||
if (!providersConfig) { | ||
throw new Error('providersConfig is required'); | ||
} | ||
ChainRpcProviders.registerChainProviders(ProviderChain.EVM, (config) => { | ||
@@ -22,3 +25,3 @@ const rpcProviders = {}; | ||
chain: getOrMapViemChain(network), | ||
transport: http(rpcUrl), | ||
transport: http(rpcUrl, providersConfig === null || providersConfig === void 0 ? void 0 : providersConfig.publicClientHttpTransportConfig), | ||
}); | ||
@@ -25,0 +28,0 @@ return { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1064562
15366