saveKeypairToEnvFile
Save an extractable CryptoKeyPair
to a local environment file (e.g. .env
)
(i.e. same format as those generated by the solana-keygen
command)
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
keypair | CryptoKeyPair | undefined | an extractable CryptoKeyPair |
variableName | string | undefined | environment variable name accessible via process.env[variableName] after env file is loaded |
envFilePath | string | ".env" | environment variable file path, default = .env in the current working directory |
Returns
Promise
<void
>