• Initializes the configuration.

    Parameters

    Returns Config

    Config The initialized configuration.

    Remarks

    This function initializes the configuration by setting the stage, private key, and RPC URL. The stage is set to 'testnet' or 'mainnet' based on the input. The private key and RPC URL are set based on the input or environment variables. If the private key or RPC URL is not provided, an error is thrown.

    Throws

    Error Throws an error if the private key or RPC URL is not provided.

    Example

    const myConfig = init({ stage: 'testnet', pvtKey: 'myPrivateKey', rpcUrl: 'myRpcUrl' });
    

Generated using TypeDoc