0.62.0 • Published 8 months ago

@aztec/accounts v0.62.0

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

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/circuit-types';

const encryptionSecretKey = GrumpkinScalar.random();
const signingSecretKey = GrumpkinScalar.random();
const wallet = getSchnorrAccount(pxe, encryptionSecretKey, signingSecretKey).waitDeploy();
console.log(`New account deployed at ${wallet.getAddress()}`);

Create a wallet object from an already deployed account

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

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

8 months ago

0.61.0

8 months ago

0.60.0

8 months ago

0.59.0

8 months ago

0.58.0

8 months ago

0.57.0

8 months ago

0.56.0

9 months ago

0.55.0

9 months ago

0.55.1

9 months ago

0.53.0

9 months ago

0.51.0

10 months ago

0.51.1

10 months ago

0.54.0

9 months ago

0.52.0

10 months ago

0.43.0

12 months ago

0.41.0

1 year ago

0.46.4

11 months ago

0.46.5

11 months ago

0.48.0

10 months ago

0.46.2

11 months ago

0.46.3

11 months ago

0.46.1

11 months ago

0.44.0

12 months ago

0.46.6

11 months ago

0.46.7

11 months ago

0.42.0

1 year ago

0.50.1

10 months ago

0.49.2

10 months ago

0.47.1

11 months ago

0.45.1

12 months ago

0.47.0

11 months ago

0.45.0

12 months ago

0.40.0

1 year ago

0.40.1

1 year ago

0.39.0

1 year ago

0.38.0

1 year ago

0.37.0

1 year ago

0.36.0

1 year ago

0.35.1

1 year ago

0.35.0

1 year ago

0.34.0

1 year ago

0.33.0

1 year ago

0.32.1

1 year ago

0.32.0

1 year ago

0.31.0

1 year ago

0.30.1

1 year ago

0.30.0

1 year ago

0.29.0

1 year ago

0.28.1

1 year ago

0.28.0

1 year ago

0.27.2

1 year ago

0.27.1

1 year ago

0.27.0

1 year ago

0.26.6

1 year ago

0.26.5

1 year ago

0.26.3

1 year ago

0.26.2

1 year ago

0.26.1

1 year ago

0.24.0

1 year ago

0.23.0

1 year ago

0.22.0

1 year ago

0.21.0

1 year ago

0.20.0

1 year ago

0.19.0

1 year ago

0.18.0

1 year ago

0.17.0

1 year ago