Create Wallet
Creating an Arweave wallet
The createWallet
function creates a new wallet capable of interacting with Arweave and Arweave based applications.
Basic Syntax
The function is called as follows:
import { createWallet } from 'arweavekit/wallet'
const wallet = await createWallet({params});
Input Parameters
The following params are available for this function and they must be passed in as an object:
seedPhrase: boolean
(optional) : Returns the seed phrase of the newly created wallet if set totrue
.environment: 'local' | 'mainnet'
(optional) : The environment for creating the wallet. The wallet created is funded with1000000000000 Winston
for thelocal
environment. Wallets created on themainnet
need to be funded separately.
Returned Data
The function call returns the following data:
{
key: { KEY_OBJECT },
walletAddress: 'WALLET_ADDRESS',
seedPhrase: '12_WORD_SEED_PHRASE'
}
key: JWKInterface
: The private key is a JSON object. Read more about the Arweave compatible key format here.
The key provides access to a wallet and any assets associated with it. It is crucial to keep the key secure and not publish it anywhere.
walletAddress: string
: The wallet address is derived from the public key by truncating it down to 43 characters.seedPhrase: string
(optional) : This is a 12 wordstring
that can be used to recover a wallet and any assets associated with it.
It is is crucial to keep the seed phrase secure and not publish it anywhere.
Last updated
Was this helpful?