Search…
loadWallet
Every crypto wallet has a public address and a private key; your private key is used to access and make changes from the wallet. This function is used for programmatically loading the wallet by reading the private key stored locally.
For developing frontend applications that interact with Finnie extension (login with Finnie), check out Koii-X.
Koii uses Arweave addressesβ€”each public address contains 43 characters. All the information pertaining to the Arweave address including transactions, balance, and other tokens can be viewed on the Arweave block explorer.
For example, you can view all the information about the public address 7b4ll1zwenRB8jzyESjFNcRls331buyNl231Pe0V9VI here.

Parameters

Path to your local wallet file that contains the private key

Example Code

1
const knode = require("@_koi/sdk/node");
2
const ktools = new knode.Node();
3
const walletKeyLocation = "<Path to your local wallet file>";
4
​
5
async function testLoadWallet() {
6
const jwk = await ktools.loadFile(walletKeyLocation);
7
await ktools.loadWallet(jwk);
8
console.log("Loaded wallet with address", await ktools.getWalletAddress());
9
}
10
11
testLoadWallet();
Copied!

Example Code Output

1
Initialized Koii Tools for true ownership and direct communication using version QA7AIFVx1KBBmzC7WUNhJbDsHlSJArUT0jWrhZMZPS8
2
Loaded wallet with address a0nRz4EBcQAcewqVEfecIxqU5JDP63cXUh08Ipwdvxk
Copied!

Returns

Promise <String> - Wallet Address