New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@aztec/accounts

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aztec/accounts

Implementation of sample account contracts for Aztec Network

0.82.2
latest
80

Supply Chain Security

100

Vulnerability

85

Quality

99

Maintenance

100

License

Unpopular package

Quality

This package is not very popular.

Found 1 instance in 1 package

Dependencies have 14 high alerts.

Socket optimized override available

Version published
Weekly downloads
980
-0.81%
Maintainers
6
Weekly downloads
 
Created

Accounts

Accounts is a client library that provides implementations for some common account flavors. Use it to acquire a Wallet object that corresponds to an account, and use that together with @aztec/aztec.js to interact with the network.

Installing

npm install @aztec/accounts

Account types

  • Schnorr: Uses an Grumpkin private key with Schnorr signatures for authentication, and a separate Grumpkin private key for encryption. Recommended for most use cases.
  • ECDSA: Uses an ECDSA private key for authentication, and a Grumpkin private key for encryption. Recommended for building integrations with Ethereum wallets.
  • SingleKey: Uses a single Grumpkin private key for both authentication and encryption. Recommended for testing purposes only.

Usage

Deploy a new account

import { getSchnorrAccount } from '@aztec/accounts/schnorr';
import { GrumpkinScalar } from '@aztec/foundation/fields';
import { Fr } from '@aztec/stdlib';

const encryptionSecretKey = Fr.random();
const signingPrivateKey = GrumpkinScalar.random();
const wallet = getSchnorrAccount(pxe, encryptionSecretKey, signingPrivateKey)
  .deploy({ deployWallet }) // Use a wallet with funds to pay for the fee for the deployment.
  .wait();
console.log(`New account deployed at ${wallet.getAddress()}`);

Create a wallet object from an already deployed account

import { getSchnorrWallet } from '@aztec/accounts/schnorr';

const wallet = getSchnorrWallet(pxe, address, signingPrivateKey);
console.log(`Wallet for ${wallet.getAddress()} ready`);

FAQs

Package last updated on 24 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts