@iexec/web3mail
Version:
This product enables users to confidentially store data–such as mail address, documents, personal information ...
14 lines (12 loc) • 499 B
text/typescript
import { getSignerFromPrivateKey } from 'iexec/utils';
import { Web3SignerProvider } from '../web3mail/types.js';
export const getWeb3Provider = (
privateKey: string,
options: { allowExperimentalNetworks?: boolean; host?: number | string } = {}
): Web3SignerProvider => {
const chainHost = options?.host ? `${options.host}` : 'bellecour';
return getSignerFromPrivateKey(chainHost, privateKey, {
allowExperimentalNetworks: options?.allowExperimentalNetworks,
providers: {},
});
};