App Wallet
Core wallet functionality for building other user wallets and fully customed applications's backend.
AppWallet
is useful for building other user wallets and fully customed applications's backend.
Generate Wallet
You can generate deterministic keys based on the Bitcoin BIP39. These mnemonic phrases allow you to recover your wallet.
Once you have your mnemonic phrase, you can use it to generate your deterministic keys. See Load AppWallet
in the following section on loading a mnemonic phrase. It will typically generate a series of private keys and corresponding public keys, which you can use to manage your cryptocurrencies.
Generate new mnemonic phrases for wallet
Load AppWallet
With Mesh, you can initialize a wallet with:
- mnemonic phrases
- Cardano CLI generated keys
- private keys
Lets import a blockchain provider:
Mnemonic phrases
We can load wallet with mnemonic phrases:
With the wallet
loaded, you can sign transactions, we will see how to do this in the next section, for now lets get the wallet's address:
Cardano CLI generated skeys
We can load wallet with CLI generated keys by providing the skey
generated by Cardano CLI. There are two files generated by Cardano CLI, by default it is named signing.skey
and stake.skey
. Opening the signing.skey
file it should contains:
We can get the cborHex
from the signing.skey
file, and load wallet with Cardano CLI generated skeys. Stake key is optional, but without it, you cannot sign staking transactions.
Private keys
We can load wallet with private keys:
Get Payment Address
Get wallet's address. For multi-addresses wallet, it will return the first address. To choose other address, `accountIndex` can be specified.
Get wallet's address. For multi-addresses wallet, it will return the first address. To choose other address, `accountIndex` can be specified.
Connect wallet to run this demo
Get Enterprise Address
Get wallet's address. For multi-addresses wallet, it will return the first address. To choose other address, `accountIndex` can be specified.
Get wallet's address. For multi-addresses wallet, it will return the first address. To choose other address, `accountIndex` can be specified.
Connect wallet to run this demo
Get Reward Address
Get wallet's reward address. For multi-addresses wallet, it will return the first address. To choose other address, `accountIndex` can be specified.
Get wallet's reward address. For multi-addresses wallet, it will return the first address. To choose other address, `accountIndex` can be specified.
Connect wallet to run this demo
Get Network ID
Returns the network ID of the currently connected account. 0
is testnet and 1
is mainnet but other networks can possibly be returned by wallets. Those other network ID values are not governed by CIP-30. This result will stay the same unless the connected account has changed.
Get currently connected network
Connect wallet to run this demo
Create & sign transactions
Sign a transaction with the App Wallet. Provide the unsigned transaction and the account and key index to sign the transaction. This function will return the signed transaction.
Sign Data
Sign data allows you to sign a payload to identify the wallet ownership.
Example of a response from the endpoint:
Define a payload and sign it with wallet.
Connect wallet to run this demo