Get Wallet Address
Fetching a wallet address
Last updated
Was this helpful?
Fetching a wallet address
Last updated
Was this helpful?
The getWallet
function returns the wallet address for a given private key.
The function is called as follows:
The following params are available for this function:
key: JWKInterface
: The private key for the wallet address to be fetched. The wallet key file can be loaded as follows:
Private keys must be kept secure at all times. Please ensure that the wallet.json
file is not pushed to a version control (eg. GitHub).
environment: 'local' | 'mainnet'
: The active environment on which the wallet is interacting with.
The function call returns the following data:
address: string
: The wallet address corresponding to the private key input is returned as type string
.