UNPKG

@hyperlane-xyz/sdk

Version:

The official SDK for the Hyperlane Network

14 lines 666 B
import { RadixProvider as RadixSDKProvider } from '@hyperlane-xyz/radix-sdk/runtime'; import { assert, isNumeric } from '@hyperlane-xyz/utils'; import { ProviderType } from '../ProviderType.js'; export const defaultRadixProviderBuilder = (rpcUrls, network) => { assert(rpcUrls.length > 0, 'Radix requires at least one rpcUrl'); assert(isNumeric(network), 'Radix requires a numeric network id'); const networkId = parseInt(network.toString(), 10); const provider = new RadixSDKProvider({ rpcUrls: rpcUrls.map((rpc) => rpc.http), networkId, }); return { provider, type: ProviderType.Radix }; }; //# sourceMappingURL=radix.js.map