Constellation Network
IntroductionFundamentalsFor DevelopersNode Validators
  • Index
  • Concepts
    • Architecture
  • IntegrationNet
  • API Reference
    • DAG4.js
      • Intro to dag4.js
      • Interacting with Wallets
      • Connecting to the Network
      • Sending Transactions
      • Message Signing
      • Metagraph Tokens
      • Dag4.js Example Apps
    • Hypergraph APIs
  • Metagraph APIs
  • Block Explorer APIs
  • Integration Guides
    • Transaction Signing
    • Delegated Staking
Powered by GitBook

Main

  • Website
  • Get DAG
  • Explore Projects
  • Partners

Socials

  • Telegram
  • Discord
  • X (Twitter)

Tools

  • Wallet
  • DAG Explorer
  • Coingecko

© 2025 CONSTELLATION NETWORK

On this page

Was this helpful?

Export as PDF
  1. API Reference
  2. DAG4.js

Interacting with Wallets

PreviousIntro to dag4.jsNextConnecting to the Network

Last updated 20 days ago

Was this helpful?

Accounts and Keys

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

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;
​
​
​
​
​
Accounts and Keys