@hyperlane-xyz/sdk
Version:
The official SDK for the Hyperlane Network
13 lines • 578 B
JavaScript
import { Provider as ZKProvider } from 'zksync-ethers';
import { assert } from '@hyperlane-xyz/utils';
import { ProviderType } from '../ProviderType.js';
export const defaultZKSyncProviderBuilder = (rpcUrls, network) => {
assert(rpcUrls.length, 'No RPC URLs provided');
const url = rpcUrls[0].http;
const provider = new ZKProvider(url, network);
return { type: ProviderType.ZkSync, provider };
};
export function defaultZKProviderBuilder(rpcUrls, network) {
return defaultZKSyncProviderBuilder(rpcUrls, network).provider;
}
//# sourceMappingURL=zksync.js.map