For the complete documentation index, see llms.txt. This page is also available as Markdown.

Interacting with Wallets

Accounts and Keys

Want more detailed information about accounts are handled on the Hypergraph? Read about Accounts and Keys.

Interacting with Wallets​

A wallet consists of a private key, a public key, and an address. You can create a new private key like this.

const pk = dag4.keyStore.generatePrivateKey();

Login with a PK​

Before accessing methods on dag4.account specific to a wallet, you'll need to log in with a private key or seed phrase.

dag4.account.loginPrivateKey(pk);

Login with a seed phrase​

If you already have a pneumonic phrase generated by a web wallet or somewhere else you can log in with that as well.

dag4.account.loginSeedPhrase('disco foxtrot calm appleseed trinity organ putter waldorf ordinary shatter green portion');

Check DAG address​

const address = dag4.account.address;

Get wallet public key​

dag4.account.publicKey;

Last updated

Was this helpful?