@aztec/accounts 0.77.0-testnet-ignition.28 → 0.77.0-testnet-ignition.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dest/dapp/dapp_interface.d.ts +10 -0
- package/dest/dapp/dapp_interface.d.ts.map +1 -0
- package/dest/dapp/index.d.ts +2 -0
- package/dest/dapp/index.d.ts.map +1 -0
- package/dest/defaults/account_contract.d.ts +15 -0
- package/dest/defaults/account_contract.d.ts.map +1 -0
- package/dest/defaults/account_interface.d.ts +27 -0
- package/dest/defaults/account_interface.d.ts.map +1 -0
- package/dest/defaults/index.d.ts +10 -0
- package/dest/defaults/index.d.ts.map +1 -0
- package/dest/ecdsa/ecdsa_k/account_contract.d.ts +18 -0
- package/dest/ecdsa/ecdsa_k/account_contract.d.ts.map +1 -0
- package/dest/ecdsa/ecdsa_k/index.d.ts +43 -0
- package/dest/ecdsa/ecdsa_k/index.d.ts.map +1 -0
- package/dest/ecdsa/ecdsa_k/lazy.d.ts +47 -0
- package/dest/ecdsa/ecdsa_k/lazy.d.ts.map +1 -0
- package/dest/ecdsa/index.d.ts +3 -0
- package/dest/ecdsa/index.d.ts.map +1 -0
- package/dest/ecdsa/lazy.d.ts +3 -0
- package/dest/ecdsa/lazy.d.ts.map +1 -0
- package/dest/ecdsa/ssh_ecdsa_r/account_contract.d.ts +21 -0
- package/dest/ecdsa/ssh_ecdsa_r/account_contract.d.ts.map +1 -0
- package/dest/ecdsa/ssh_ecdsa_r/index.d.ts +46 -0
- package/dest/ecdsa/ssh_ecdsa_r/index.d.ts.map +1 -0
- package/dest/ecdsa/ssh_ecdsa_r/lazy.d.ts +49 -0
- package/dest/ecdsa/ssh_ecdsa_r/lazy.d.ts.map +1 -0
- package/dest/schnorr/account_contract.d.ts +24 -0
- package/dest/schnorr/account_contract.d.ts.map +1 -0
- package/dest/schnorr/index.d.ts +57 -0
- package/dest/schnorr/index.d.ts.map +1 -0
- package/dest/schnorr/lazy.d.ts +61 -0
- package/dest/schnorr/lazy.d.ts.map +1 -0
- package/dest/single_key/account_contract.d.ts +17 -0
- package/dest/single_key/account_contract.d.ts.map +1 -0
- package/dest/single_key/index.d.ts +39 -0
- package/dest/single_key/index.d.ts.map +1 -0
- package/dest/single_key/lazy.d.ts +43 -0
- package/dest/single_key/lazy.d.ts.map +1 -0
- package/dest/testing/configuration.d.ts +28 -0
- package/dest/testing/configuration.d.ts.map +1 -0
- package/dest/testing/create_account.d.ts +43 -0
- package/dest/testing/create_account.d.ts.map +1 -0
- package/dest/testing/index.d.ts +35 -0
- package/dest/testing/index.d.ts.map +1 -0
- package/dest/testing/lazy.d.ts +34 -0
- package/dest/testing/lazy.d.ts.map +1 -0
- package/dest/utils/index.d.ts +2 -0
- package/dest/utils/index.d.ts.map +1 -0
- package/dest/utils/ssh_agent.d.ts +36 -0
- package/dest/utils/ssh_agent.d.ts.map +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type AccountWallet, type AuthWitnessProvider, AztecAddress, CompleteAddress, type NodeInfo } from '@aztec/aztec.js';
|
|
2
|
+
import { DefaultAccountInterface } from '../defaults/account_interface.js';
|
|
3
|
+
/**
|
|
4
|
+
* Default implementation for an account interface that uses a dapp entrypoint.
|
|
5
|
+
*/
|
|
6
|
+
export declare class DefaultDappInterface extends DefaultAccountInterface {
|
|
7
|
+
constructor(authWitnessProvider: AuthWitnessProvider, userAddress: CompleteAddress, dappAddress: AztecAddress, nodeInfo: Pick<NodeInfo, 'l1ChainId' | 'protocolVersion'>);
|
|
8
|
+
static createFromUserWallet(wallet: AccountWallet, dappAddress: AztecAddress): DefaultDappInterface;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=dapp_interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dapp_interface.d.ts","sourceRoot":"","sources":["../../src/dapp/dapp_interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,YAAY,EACZ,eAAe,EACf,KAAK,QAAQ,EACd,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAE3E;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,uBAAuB;gBAE7D,mBAAmB,EAAE,mBAAmB,EACxC,WAAW,EAAE,eAAe,EAC5B,WAAW,EAAE,YAAY,EACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,WAAW,GAAG,iBAAiB,CAAC;IAY3D,MAAM,CAAC,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,GAAG,oBAAoB;CAMpG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dapp/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AccountContract, AccountInterface, AuthWitnessProvider } from '@aztec/aztec.js/account';
|
|
2
|
+
import type { ContractArtifact } from '@aztec/stdlib/abi';
|
|
3
|
+
import type { CompleteAddress, NodeInfo } from '@aztec/stdlib/contract';
|
|
4
|
+
/**
|
|
5
|
+
* Base class for implementing an account contract. Requires that the account uses the
|
|
6
|
+
* default entrypoint method signature.
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class DefaultAccountContract implements AccountContract {
|
|
9
|
+
abstract getAuthWitnessProvider(address: CompleteAddress): AuthWitnessProvider;
|
|
10
|
+
abstract getDeploymentArgs(): Promise<any[] | undefined>;
|
|
11
|
+
abstract getContractArtifact(): Promise<ContractArtifact>;
|
|
12
|
+
constructor();
|
|
13
|
+
getInterface(address: CompleteAddress, nodeInfo: NodeInfo): AccountInterface;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=account_contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account_contract.d.ts","sourceRoot":"","sources":["../../src/defaults/account_contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACtG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAIxE;;;GAGG;AACH,8BAAsB,sBAAuB,YAAW,eAAe;IACrE,QAAQ,CAAC,sBAAsB,CAAC,OAAO,EAAE,eAAe,GAAG,mBAAmB;IAC9E,QAAQ,CAAC,iBAAiB,IAAI,OAAO,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;IACxD,QAAQ,CAAC,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;;IAIzD,YAAY,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,GAAG,gBAAgB;CAG7E"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { AccountInterface, AuthWitnessProvider } from '@aztec/aztec.js/account';
|
|
2
|
+
import type { EntrypointInterface, ExecutionRequestInit } from '@aztec/aztec.js/entrypoint';
|
|
3
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
4
|
+
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
5
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
6
|
+
import { CompleteAddress } from '@aztec/stdlib/contract';
|
|
7
|
+
import type { NodeInfo } from '@aztec/stdlib/contract';
|
|
8
|
+
import type { TxExecutionRequest } from '@aztec/stdlib/tx';
|
|
9
|
+
/**
|
|
10
|
+
* Default implementation for an account interface. Requires that the account uses the default
|
|
11
|
+
* entrypoint signature, which accept an AppPayload and a FeePayload as defined in noir-libs/aztec-noir/src/entrypoint module
|
|
12
|
+
*/
|
|
13
|
+
export declare class DefaultAccountInterface implements AccountInterface {
|
|
14
|
+
private authWitnessProvider;
|
|
15
|
+
private address;
|
|
16
|
+
protected entrypoint: EntrypointInterface;
|
|
17
|
+
private chainId;
|
|
18
|
+
private version;
|
|
19
|
+
constructor(authWitnessProvider: AuthWitnessProvider, address: CompleteAddress, nodeInfo: Pick<NodeInfo, 'l1ChainId' | 'protocolVersion'>);
|
|
20
|
+
createTxExecutionRequest(execution: ExecutionRequestInit): Promise<TxExecutionRequest>;
|
|
21
|
+
createAuthWit(messageHash: Fr): Promise<AuthWitness>;
|
|
22
|
+
getCompleteAddress(): CompleteAddress;
|
|
23
|
+
getAddress(): AztecAddress;
|
|
24
|
+
getChainId(): Fr;
|
|
25
|
+
getVersion(): Fr;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=account_interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account_interface.d.ts","sourceRoot":"","sources":["../../src/defaults/account_interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAE5F,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D;;;GAGG;AACH,qBAAa,uBAAwB,YAAW,gBAAgB;IAO5D,OAAO,CAAC,mBAAmB;IAC3B,OAAO,CAAC,OAAO;IAPjB,SAAS,CAAC,UAAU,EAAE,mBAAmB,CAAC;IAE1C,OAAO,CAAC,OAAO,CAAK;IACpB,OAAO,CAAC,OAAO,CAAK;gBAGV,mBAAmB,EAAE,mBAAmB,EACxC,OAAO,EAAE,eAAe,EAChC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,WAAW,GAAG,iBAAiB,CAAC;IAY3D,wBAAwB,CAAC,SAAS,EAAE,oBAAoB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAItF,aAAa,CAAC,WAAW,EAAE,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC;IAIpD,kBAAkB,IAAI,eAAe;IAIrC,UAAU,IAAI,YAAY;IAI1B,UAAU,IAAI,EAAE;IAIhB,UAAU,IAAI,EAAE;CAGjB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `@aztec/accounts/defaults` export provides the base class {@link DefaultAccountContract} for implementing account contracts that use the default entrypoint payload module.
|
|
3
|
+
*
|
|
4
|
+
* Read more in {@link https://docs.aztec.network/developers/tutorials/codealong/contract_tutorials/write_accounts_contract | Writing an account contract}.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
export * from './account_interface.js';
|
|
9
|
+
export * from './account_contract.js';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/defaults/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
+
import type { AuthWitnessProvider } from '@aztec/aztec.js/account';
|
|
4
|
+
import { CompleteAddress } from '@aztec/stdlib/contract';
|
|
5
|
+
import { DefaultAccountContract } from '../../defaults/account_contract.js';
|
|
6
|
+
/**
|
|
7
|
+
* Account contract that authenticates transactions using ECDSA signatures
|
|
8
|
+
* verified against a secp256k1 public key stored in an immutable encrypted note.
|
|
9
|
+
* This abstract version does not provide a way to retrieve the artifact, as it
|
|
10
|
+
* can be implemented with or without lazy loading.
|
|
11
|
+
*/
|
|
12
|
+
export declare abstract class EcdsaKBaseAccountContract extends DefaultAccountContract {
|
|
13
|
+
private signingPrivateKey;
|
|
14
|
+
constructor(signingPrivateKey: Buffer);
|
|
15
|
+
getDeploymentArgs(): Promise<Buffer[]>;
|
|
16
|
+
getAuthWitnessProvider(_address: CompleteAddress): AuthWitnessProvider;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=account_contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account_contract.d.ts","sourceRoot":"","sources":["../../../src/ecdsa/ecdsa_k/account_contract.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAInE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5E;;;;;GAKG;AACH,8BAAsB,yBAA0B,SAAQ,sBAAsB;IAChE,OAAO,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,MAAM;IAIvC,iBAAiB;IAKvB,sBAAsB,CAAC,QAAQ,EAAE,eAAe,GAAG,mBAAmB;CAGvE"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
+
/**
|
|
4
|
+
* The `@aztec/accounts/ecdsa` export provides an ECDSA account contract implementation, that uses an ECDSA private key for authentication, and a Grumpkin key for encryption.
|
|
5
|
+
* Consider using this account type when working with integrations with Ethereum wallets.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import { AccountManager, type Salt } from '@aztec/aztec.js/account';
|
|
10
|
+
import { type AccountWallet } from '@aztec/aztec.js/wallet';
|
|
11
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
12
|
+
import type { ContractArtifact } from '@aztec/stdlib/abi';
|
|
13
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
14
|
+
import type { PXE } from '@aztec/stdlib/interfaces/client';
|
|
15
|
+
import { EcdsaKBaseAccountContract } from './account_contract.js';
|
|
16
|
+
export declare const EcdsaKAccountContractArtifact: ContractArtifact;
|
|
17
|
+
/**
|
|
18
|
+
* Account contract that authenticates transactions using ECDSA signatures
|
|
19
|
+
* verified against a secp256k1 public key stored in an immutable encrypted note.
|
|
20
|
+
* Eagerly loads the contract artifact
|
|
21
|
+
*/
|
|
22
|
+
export declare class EcdsaKAccountContract extends EcdsaKBaseAccountContract {
|
|
23
|
+
constructor(signingPrivateKey: Buffer);
|
|
24
|
+
getContractArtifact(): Promise<ContractArtifact>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Creates an Account that relies on an ECDSA signing key for authentication.
|
|
28
|
+
* @param pxe - An PXE server instance.
|
|
29
|
+
* @param secretKey - Secret key used to derive all the keystore keys.
|
|
30
|
+
* @param signingPrivateKey - Secp256k1 key used for signing transactions.
|
|
31
|
+
* @param salt - Deployment salt.
|
|
32
|
+
* @returns An account manager initialized with the account contract and its deployment params
|
|
33
|
+
*/
|
|
34
|
+
export declare function getEcdsaKAccount(pxe: PXE, secretKey: Fr, signingPrivateKey: Buffer, salt?: Salt): Promise<AccountManager>;
|
|
35
|
+
/**
|
|
36
|
+
* Gets a wallet for an already registered account using ECDSA signatures.
|
|
37
|
+
* @param pxe - An PXE server instance.
|
|
38
|
+
* @param address - Address for the account.
|
|
39
|
+
* @param signingPrivateKey - ECDSA key used for signing transactions.
|
|
40
|
+
* @returns A wallet for this account that can be used to interact with a contract instance.
|
|
41
|
+
*/
|
|
42
|
+
export declare function getEcdsaKWallet(pxe: PXE, address: AztecAddress, signingPrivateKey: Buffer): Promise<AccountWallet>;
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ecdsa/ecdsa_k/index.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAI3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAElE,eAAO,MAAM,6BAA6B,EAAE,gBAE3C,CAAC;AAEF;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,yBAAyB;gBACtD,iBAAiB,EAAE,MAAM;IAI5B,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAG1D;AACD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,EACb,iBAAiB,EAAE,MAAM,EACzB,IAAI,CAAC,EAAE,IAAI,GACV,OAAO,CAAC,cAAc,CAAC,CAEzB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAElH"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
+
/**
|
|
4
|
+
* The `@aztec/accounts/ecdsa` export provides an ECDSA account contract implementation, that uses an ECDSA private key for authentication, and a Grumpkin key for encryption.
|
|
5
|
+
* Consider using this account type when working with integrations with Ethereum wallets.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import { AccountManager, type Salt } from '@aztec/aztec.js/account';
|
|
10
|
+
import { type AccountWallet } from '@aztec/aztec.js/wallet';
|
|
11
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
12
|
+
import type { ContractArtifact } from '@aztec/stdlib/abi';
|
|
13
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
14
|
+
import type { PXE } from '@aztec/stdlib/interfaces/client';
|
|
15
|
+
import { EcdsaKBaseAccountContract } from './account_contract.js';
|
|
16
|
+
/**
|
|
17
|
+
* Lazily loads the contract artifact
|
|
18
|
+
* @returns The contract artifact for the ecdsa K account contract
|
|
19
|
+
*/
|
|
20
|
+
export declare function getEcdsaKAccountContractArtifact(): Promise<ContractArtifact>;
|
|
21
|
+
/**
|
|
22
|
+
* Account contract that authenticates transactions using ECDSA signatures
|
|
23
|
+
* verified against a secp256k1 public key stored in an immutable encrypted note.
|
|
24
|
+
* Lazily loads the contract artifact
|
|
25
|
+
*/
|
|
26
|
+
export declare class EcdsaKAccountContract extends EcdsaKBaseAccountContract {
|
|
27
|
+
constructor(signingPrivateKey: Buffer);
|
|
28
|
+
getContractArtifact(): Promise<ContractArtifact>;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Creates an Account that relies on an ECDSA signing key for authentication.
|
|
32
|
+
* @param pxe - An PXE server instance.
|
|
33
|
+
* @param secretKey - Secret key used to derive all the keystore keys.
|
|
34
|
+
* @param signingPrivateKey - Secp256k1 key used for signing transactions.
|
|
35
|
+
* @param salt - Deployment salt.
|
|
36
|
+
* @returns An account manager initialized with the account contract and its deployment params
|
|
37
|
+
*/
|
|
38
|
+
export declare function getEcdsaKAccount(pxe: PXE, secretKey: Fr, signingPrivateKey: Buffer, salt?: Salt): Promise<AccountManager>;
|
|
39
|
+
/**
|
|
40
|
+
* Gets a wallet for an already registered account using ECDSA signatures.
|
|
41
|
+
* @param pxe - An PXE server instance.
|
|
42
|
+
* @param address - Address for the account.
|
|
43
|
+
* @param signingPrivateKey - ECDSA key used for signing transactions.
|
|
44
|
+
* @returns A wallet for this account that can be used to interact with a contract instance.
|
|
45
|
+
*/
|
|
46
|
+
export declare function getEcdsaKWallet(pxe: PXE, address: AztecAddress, signingPrivateKey: Buffer): Promise<AccountWallet>;
|
|
47
|
+
//# sourceMappingURL=lazy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../../src/ecdsa/ecdsa_k/lazy.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAE3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAElE;;;GAGG;AACH,wBAAsB,gCAAgC,8BAQrD;AAED;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,yBAAyB;gBACtD,iBAAiB,EAAE,MAAM;IAI5B,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAG1D;AACD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,EACb,iBAAiB,EAAE,MAAM,EACzB,IAAI,CAAC,EAAE,IAAI,GACV,OAAO,CAAC,cAAc,CAAC,CAEzB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAElH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ecdsa/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../src/ecdsa/lazy.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
+
import type { AuthWitnessProvider } from '@aztec/aztec.js/account';
|
|
4
|
+
import { CompleteAddress } from '@aztec/stdlib/contract';
|
|
5
|
+
import { DefaultAccountContract } from '../../defaults/account_contract.js';
|
|
6
|
+
/**
|
|
7
|
+
* Account contract that authenticates transactions using ECDSA signatures
|
|
8
|
+
* verified against a secp256r1 public key stored in an immutable encrypted note.
|
|
9
|
+
* Since this implementation relays signatures to an SSH agent, we provide the
|
|
10
|
+
* public key here not for signature verification, but to identify actual identity
|
|
11
|
+
* that will be used to sign authwitnesses.
|
|
12
|
+
* This abstract version does not provide a way to retrieve the artifact, as it
|
|
13
|
+
* can be implemented with or without lazy loading.
|
|
14
|
+
*/
|
|
15
|
+
export declare abstract class EcdsaRSSHBaseAccountContract extends DefaultAccountContract {
|
|
16
|
+
private signingPublicKey;
|
|
17
|
+
constructor(signingPublicKey: Buffer);
|
|
18
|
+
getDeploymentArgs(): Promise<Buffer[]>;
|
|
19
|
+
getAuthWitnessProvider(_address: CompleteAddress): AuthWitnessProvider;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=account_contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account_contract.d.ts","sourceRoot":"","sources":["../../../src/ecdsa/ssh_ecdsa_r/account_contract.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAInE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAI5E;;;;;;;;GAQG;AACH,8BAAsB,4BAA6B,SAAQ,sBAAsB;IACnE,OAAO,CAAC,gBAAgB;gBAAhB,gBAAgB,EAAE,MAAM;IAI5C,iBAAiB;IAIjB,sBAAsB,CAAC,QAAQ,EAAE,eAAe,GAAG,mBAAmB;CAGvE"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
+
/**
|
|
4
|
+
* The `@aztec/accounts/ecdsa` export provides an ECDSA account contract implementation, that uses an ECDSA private key for authentication, and a Grumpkin key for encryption.
|
|
5
|
+
* Consider using this account type when working with integrations with Ethereum wallets.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import { AccountManager, type Salt } from '@aztec/aztec.js/account';
|
|
10
|
+
import { type AccountWallet } from '@aztec/aztec.js/wallet';
|
|
11
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
12
|
+
import type { ContractArtifact } from '@aztec/stdlib/abi';
|
|
13
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
14
|
+
import type { PXE } from '@aztec/stdlib/interfaces/client';
|
|
15
|
+
import { EcdsaRSSHBaseAccountContract } from './account_contract.js';
|
|
16
|
+
export declare const EcdsaRAccountContractArtifact: ContractArtifact;
|
|
17
|
+
/**
|
|
18
|
+
* Account contract that authenticates transactions using ECDSA signatures
|
|
19
|
+
* verified against a secp256r1 public key stored in an immutable encrypted note.
|
|
20
|
+
* Since this implementation relays signatures to an SSH agent, we provide the
|
|
21
|
+
* public key here not for signature verification, but to identify actual identity
|
|
22
|
+
* that will be used to sign authwitnesses.
|
|
23
|
+
* Eagerly loads the contract artifact
|
|
24
|
+
*/
|
|
25
|
+
export declare class EcdsaRSSHAccountContract extends EcdsaRSSHBaseAccountContract {
|
|
26
|
+
constructor(signingPrivateKey: Buffer);
|
|
27
|
+
getContractArtifact(): Promise<ContractArtifact>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Creates an Account that relies on an ECDSA signing key for authentication.
|
|
31
|
+
* @param pxe - An PXE server instance.
|
|
32
|
+
* @param secretKey - Secret key used to derive all the keystore keys.
|
|
33
|
+
* @param signingPublicKey - Secp2561 key used to identify its corresponding private key in the SSH Agent.
|
|
34
|
+
* @param salt - Deployment salt.
|
|
35
|
+
* @returns An account manager initialized with the account contract and its deployment params
|
|
36
|
+
*/
|
|
37
|
+
export declare function getEcdsaRSSHAccount(pxe: PXE, secretKey: Fr, signingPublicKey: Buffer, salt?: Salt): Promise<AccountManager>;
|
|
38
|
+
/**
|
|
39
|
+
* Gets a wallet for an already registered account using ECDSA signatures.
|
|
40
|
+
* @param pxe - An PXE server instance.
|
|
41
|
+
* @param address - Address for the account.
|
|
42
|
+
* @param signingPrivateKey - ECDSA key used for signing transactions.
|
|
43
|
+
* @returns A wallet for this account that can be used to interact with a contract instance.
|
|
44
|
+
*/
|
|
45
|
+
export declare function getEcdsaRSSHWallet(pxe: PXE, address: AztecAddress, signingPublicKey: Buffer): Promise<AccountWallet>;
|
|
46
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ecdsa/ssh_ecdsa_r/index.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAI3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAErE,eAAO,MAAM,6BAA6B,EAAE,gBAE3C,CAAC;AAEF;;;;;;;GAOG;AACH,qBAAa,wBAAyB,SAAQ,4BAA4B;gBAC5D,iBAAiB,EAAE,MAAM;IAI5B,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAG1D;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,EACb,gBAAgB,EAAE,MAAM,EACxB,IAAI,CAAC,EAAE,IAAI,GACV,OAAO,CAAC,cAAc,CAAC,CAEzB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAEpH"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
+
/**
|
|
4
|
+
* The `@aztec/accounts/ecdsa` export provides an ECDSA account contract implementation, that uses an ECDSA private key for authentication, and a Grumpkin key for encryption.
|
|
5
|
+
* Consider using this account type when working with integrations with Ethereum wallets.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import { AccountManager, type Salt } from '@aztec/aztec.js/account';
|
|
10
|
+
import { type AccountWallet } from '@aztec/aztec.js/wallet';
|
|
11
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
12
|
+
import type { ContractArtifact } from '@aztec/stdlib/abi';
|
|
13
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
14
|
+
import type { PXE } from '@aztec/stdlib/interfaces/client';
|
|
15
|
+
import { EcdsaRSSHBaseAccountContract } from './account_contract.js';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
export declare function getEcdsaRAccountContractArtifact(): Promise<ContractArtifact>;
|
|
20
|
+
/**
|
|
21
|
+
* Account contract that authenticates transactions using ECDSA signatures
|
|
22
|
+
* verified against a secp256r1 public key stored in an immutable encrypted note.
|
|
23
|
+
* Since this implementation relays signatures to an SSH agent, we provide the
|
|
24
|
+
* public key here not for signature verification, but to identify actual identity
|
|
25
|
+
* that will be used to sign authwitnesses.
|
|
26
|
+
* Lazily loads the contract artifact
|
|
27
|
+
*/
|
|
28
|
+
export declare class EcdsaRSSHAccountContract extends EcdsaRSSHBaseAccountContract {
|
|
29
|
+
constructor(signingPrivateKey: Buffer);
|
|
30
|
+
getContractArtifact(): Promise<ContractArtifact>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Creates an Account that relies on an ECDSA signing key for authentication.
|
|
34
|
+
* @param pxe - An PXE server instance.
|
|
35
|
+
* @param secretKey - Secret key used to derive all the keystore keys.
|
|
36
|
+
* @param signingPublicKey - Secp2561 key used to identify its corresponding private key in the SSH Agent.
|
|
37
|
+
* @param salt - Deployment salt.
|
|
38
|
+
* @returns An account manager initialized with the account contract and its deployment params
|
|
39
|
+
*/
|
|
40
|
+
export declare function getEcdsaRSSHAccount(pxe: PXE, secretKey: Fr, signingPublicKey: Buffer, salt?: Salt): Promise<AccountManager>;
|
|
41
|
+
/**
|
|
42
|
+
* Gets a wallet for an already registered account using ECDSA signatures.
|
|
43
|
+
* @param pxe - An PXE server instance.
|
|
44
|
+
* @param address - Address for the account.
|
|
45
|
+
* @param signingPrivateKey - ECDSA key used for signing transactions.
|
|
46
|
+
* @returns A wallet for this account that can be used to interact with a contract instance.
|
|
47
|
+
*/
|
|
48
|
+
export declare function getEcdsaRSSHWallet(pxe: PXE, address: AztecAddress, signingPublicKey: Buffer): Promise<AccountWallet>;
|
|
49
|
+
//# sourceMappingURL=lazy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../../src/ecdsa/ssh_ecdsa_r/lazy.ts"],"names":[],"mappings":";;AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAE3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAMrE;;GAEG;AACH,wBAAsB,gCAAgC,8BAQrD;AAED;;;;;;;GAOG;AACH,qBAAa,wBAAyB,SAAQ,4BAA4B;gBAC5D,iBAAiB,EAAE,MAAM;IAI5B,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAG1D;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,EACb,gBAAgB,EAAE,MAAM,EACxB,IAAI,CAAC,EAAE,IAAI,GACV,OAAO,CAAC,cAAc,CAAC,CAEzB;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAEpH"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AuthWitnessProvider } from '@aztec/aztec.js/account';
|
|
2
|
+
import { Fr, GrumpkinScalar } from '@aztec/foundation/fields';
|
|
3
|
+
import { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
4
|
+
import { CompleteAddress } from '@aztec/stdlib/contract';
|
|
5
|
+
import { DefaultAccountContract } from '../defaults/account_contract.js';
|
|
6
|
+
/**
|
|
7
|
+
* Account contract that authenticates transactions using Schnorr signatures
|
|
8
|
+
* verified against a Grumpkin public key stored in an immutable encrypted note.
|
|
9
|
+
* This abstract version does not provide a way to retrieve the artifact, as it
|
|
10
|
+
* can be implemented with or without lazy loading.
|
|
11
|
+
*/
|
|
12
|
+
export declare abstract class SchnorrBaseAccountContract extends DefaultAccountContract {
|
|
13
|
+
private signingPrivateKey;
|
|
14
|
+
constructor(signingPrivateKey: GrumpkinScalar);
|
|
15
|
+
getDeploymentArgs(): Promise<Fr[]>;
|
|
16
|
+
getAuthWitnessProvider(_address: CompleteAddress): AuthWitnessProvider;
|
|
17
|
+
}
|
|
18
|
+
/** Creates auth witnesses using Schnorr signatures. */
|
|
19
|
+
export declare class SchnorrAuthWitnessProvider implements AuthWitnessProvider {
|
|
20
|
+
private signingPrivateKey;
|
|
21
|
+
constructor(signingPrivateKey: GrumpkinScalar);
|
|
22
|
+
createAuthWit(messageHash: Fr): Promise<AuthWitness>;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=account_contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account_contract.d.ts","sourceRoot":"","sources":["../../src/schnorr/account_contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE;;;;;GAKG;AACH,8BAAsB,0BAA2B,SAAQ,sBAAsB;IACjE,OAAO,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,cAAc;IAI/C,iBAAiB;IAKvB,sBAAsB,CAAC,QAAQ,EAAE,eAAe,GAAG,mBAAmB;CAGvE;AAED,uDAAuD;AACvD,qBAAa,0BAA2B,YAAW,mBAAmB;IACxD,OAAO,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,cAAc;IAE/C,aAAa,CAAC,WAAW,EAAE,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC;CAK3D"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `@aztec/accounts/schnorr` export provides an account contract implementation that uses Schnorr signatures with a Grumpkin key for authentication, and a separate Grumpkin key for encryption.
|
|
3
|
+
* This is the suggested account contract type for most use cases within Aztec.
|
|
4
|
+
*
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
import { AccountManager, type Salt } from '@aztec/aztec.js/account';
|
|
8
|
+
import { type AccountWallet, type AccountWalletWithSecretKey } from '@aztec/aztec.js/wallet';
|
|
9
|
+
import { Fr, GrumpkinScalar } from '@aztec/foundation/fields';
|
|
10
|
+
import type { ContractArtifact } from '@aztec/stdlib/abi';
|
|
11
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
12
|
+
import type { PXE } from '@aztec/stdlib/interfaces/client';
|
|
13
|
+
import { SchnorrBaseAccountContract } from './account_contract.js';
|
|
14
|
+
export declare const SchnorrAccountContractArtifact: ContractArtifact;
|
|
15
|
+
/**
|
|
16
|
+
* Account contract that authenticates transactions using Schnorr signatures
|
|
17
|
+
* verified against a Grumpkin public key stored in an immutable encrypted note.
|
|
18
|
+
* Eagerly loads the contract artifact
|
|
19
|
+
*/
|
|
20
|
+
export declare class SchnorrAccountContract extends SchnorrBaseAccountContract {
|
|
21
|
+
constructor(signingPrivateKey: GrumpkinScalar);
|
|
22
|
+
getContractArtifact(): Promise<ContractArtifact>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Creates an Account Manager that relies on a Grumpkin signing key for authentication.
|
|
26
|
+
* @param pxe - An PXE server instance.
|
|
27
|
+
* @param secretKey - Secret key used to derive all the keystore keys.
|
|
28
|
+
* @param signingPrivateKey - Grumpkin key used for signing transactions.
|
|
29
|
+
* @param salt - Deployment salt.
|
|
30
|
+
* @returns An account manager initialized with the account contract and its deployment params
|
|
31
|
+
*/
|
|
32
|
+
export declare function getSchnorrAccount(pxe: PXE, secretKey: Fr, signingPrivateKey: GrumpkinScalar, salt?: Salt): Promise<AccountManager>;
|
|
33
|
+
/**
|
|
34
|
+
* Gets a wallet for an already registered account using Schnorr signatures.
|
|
35
|
+
* @param pxe - An PXE server instance.
|
|
36
|
+
* @param address - Address for the account.
|
|
37
|
+
* @param signingPrivateKey - Grumpkin key used for signing transactions.
|
|
38
|
+
* @returns A wallet for this account that can be used to interact with a contract instance.
|
|
39
|
+
*/
|
|
40
|
+
export declare function getSchnorrWallet(pxe: PXE, address: AztecAddress, signingPrivateKey: GrumpkinScalar): Promise<AccountWallet>;
|
|
41
|
+
/**
|
|
42
|
+
* Gets a wallet for an already registered account using Schnorr signatures.
|
|
43
|
+
* @param pxe - An PXE server instance.
|
|
44
|
+
* @param secretKey - Secret key used to derive all the keystore keys.
|
|
45
|
+
* @param signingPrivateKey - Grumpkin key used for signing transactions.
|
|
46
|
+
* @param salt - Deployment salt.
|
|
47
|
+
* @returns A wallet for this account that can be used to interact with a contract instance.
|
|
48
|
+
*/
|
|
49
|
+
export declare function getSchnorrWalletWithSecretKey(pxe: PXE, secretKey: Fr, signingPrivateKey: GrumpkinScalar, salt: Salt): Promise<AccountWalletWithSecretKey>;
|
|
50
|
+
/**
|
|
51
|
+
* Compute the address of a schnorr account contract.
|
|
52
|
+
* @param secret - A seed for deriving the signing key and public keys.
|
|
53
|
+
* @param salt - The contract address salt.
|
|
54
|
+
* @param signingPrivateKey - A specific signing private key that's not derived from the secret.
|
|
55
|
+
*/
|
|
56
|
+
export declare function getSchnorrAccountContractAddress(secret: Fr, salt: Fr, signingPrivateKey?: GrumpkinScalar): Promise<AztecAddress>;
|
|
57
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schnorr/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAAE,KAAK,IAAI,EAA6B,MAAM,yBAAyB,CAAC;AAC/F,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,0BAA0B,EAAa,MAAM,wBAAwB,CAAC;AACxG,OAAO,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAK3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEnE,eAAO,MAAM,8BAA8B,kBAA2E,CAAC;AAEvH;;;;GAIG;AACH,qBAAa,sBAAuB,SAAQ,0BAA0B;gBACxD,iBAAiB,EAAE,cAAc;IAIpC,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAG1D;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,EACb,iBAAiB,EAAE,cAAc,EACjC,IAAI,CAAC,EAAE,IAAI,GACV,OAAO,CAAC,cAAc,CAAC,CAEzB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,YAAY,EACrB,iBAAiB,EAAE,cAAc,GAChC,OAAO,CAAC,aAAa,CAAC,CAExB;AAED;;;;;;;GAOG;AACH,wBAAsB,6BAA6B,CACjD,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,EACb,iBAAiB,EAAE,cAAc,EACjC,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,0BAA0B,CAAC,CAGrC;AAED;;;;;GAKG;AACH,wBAAsB,gCAAgC,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,iBAAiB,CAAC,EAAE,cAAc,yBAI9G"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `@aztec/accounts/schnorr` export provides an account contract implementation that uses Schnorr signatures with a Grumpkin key for authentication, and a separate Grumpkin key for encryption.
|
|
3
|
+
* This is the suggested account contract type for most use cases within Aztec.
|
|
4
|
+
*
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
import { AccountManager, type Salt } from '@aztec/aztec.js/account';
|
|
8
|
+
import { type AccountWallet, type AccountWalletWithSecretKey } from '@aztec/aztec.js/wallet';
|
|
9
|
+
import { Fr, GrumpkinScalar } from '@aztec/foundation/fields';
|
|
10
|
+
import type { ContractArtifact } from '@aztec/stdlib/abi';
|
|
11
|
+
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
12
|
+
import type { PXE } from '@aztec/stdlib/interfaces/client';
|
|
13
|
+
import { SchnorrBaseAccountContract } from './account_contract.js';
|
|
14
|
+
/**
|
|
15
|
+
* Lazily loads the contract artifact
|
|
16
|
+
* @returns The contract artifact for the schnorr account contract
|
|
17
|
+
*/
|
|
18
|
+
export declare function getSchnorrAccountContractArtifact(): Promise<ContractArtifact>;
|
|
19
|
+
/**
|
|
20
|
+
* Account contract that authenticates transactions using Schnorr signatures
|
|
21
|
+
* verified against a Grumpkin public key stored in an immutable encrypted note.
|
|
22
|
+
* Lazily loads the contract artifact
|
|
23
|
+
*/
|
|
24
|
+
export declare class SchnorrAccountContract extends SchnorrBaseAccountContract {
|
|
25
|
+
constructor(signingPrivateKey: GrumpkinScalar);
|
|
26
|
+
getContractArtifact(): Promise<ContractArtifact>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Creates an Account Manager that relies on a Grumpkin signing key for authentication.
|
|
30
|
+
* @param pxe - An PXE server instance.
|
|
31
|
+
* @param secretKey - Secret key used to derive all the keystore keys.
|
|
32
|
+
* @param signingPrivateKey - Grumpkin key used for signing transactions.
|
|
33
|
+
* @param salt - Deployment salt.
|
|
34
|
+
* @returns An account manager initialized with the account contract and its deployment params
|
|
35
|
+
*/
|
|
36
|
+
export declare function getSchnorrAccount(pxe: PXE, secretKey: Fr, signingPrivateKey: GrumpkinScalar, salt?: Salt): Promise<AccountManager>;
|
|
37
|
+
/**
|
|
38
|
+
* Gets a wallet for an already registered account using Schnorr signatures.
|
|
39
|
+
* @param pxe - An PXE server instance.
|
|
40
|
+
* @param address - Address for the account.
|
|
41
|
+
* @param signingPrivateKey - Grumpkin key used for signing transactions.
|
|
42
|
+
* @returns A wallet for this account that can be used to interact with a contract instance.
|
|
43
|
+
*/
|
|
44
|
+
export declare function getSchnorrWallet(pxe: PXE, address: AztecAddress, signingPrivateKey: GrumpkinScalar): Promise<AccountWallet>;
|
|
45
|
+
/**
|
|
46
|
+
* Gets a wallet for an already registered account using Schnorr signatures.
|
|
47
|
+
* @param pxe - An PXE server instance.
|
|
48
|
+
* @param secretKey - Secret key used to derive all the keystore keys.
|
|
49
|
+
* @param signingPrivateKey - Grumpkin key used for signing transactions.
|
|
50
|
+
* @param salt - Deployment salt.
|
|
51
|
+
* @returns A wallet for this account that can be used to interact with a contract instance.
|
|
52
|
+
*/
|
|
53
|
+
export declare function getSchnorrWalletWithSecretKey(pxe: PXE, secretKey: Fr, signingPrivateKey: GrumpkinScalar, salt: Salt): Promise<AccountWalletWithSecretKey>;
|
|
54
|
+
/**
|
|
55
|
+
* Compute the address of a schnorr account contract.
|
|
56
|
+
* @param secret - A seed for deriving the signing key and public keys.
|
|
57
|
+
* @param salt - The contract address salt.
|
|
58
|
+
* @param signingPrivateKey - A specific signing private key that's not derived from the secret.
|
|
59
|
+
*/
|
|
60
|
+
export declare function getSchnorrAccountContractAddress(secret: Fr, salt: Fr, signingPrivateKey?: GrumpkinScalar): Promise<AztecAddress>;
|
|
61
|
+
//# sourceMappingURL=lazy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../src/schnorr/lazy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAAE,KAAK,IAAI,EAA6B,MAAM,yBAAyB,CAAC;AAC/F,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,0BAA0B,EAAa,MAAM,wBAAwB,CAAC;AACxG,OAAO,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAG3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEnE;;;GAGG;AACH,wBAAsB,iCAAiC,8BAQtD;AAED;;;;GAIG;AACH,qBAAa,sBAAuB,SAAQ,0BAA0B;gBACxD,iBAAiB,EAAE,cAAc;IAIpC,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAG1D;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,EACb,iBAAiB,EAAE,cAAc,EACjC,IAAI,CAAC,EAAE,IAAI,GACV,OAAO,CAAC,cAAc,CAAC,CAEzB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,YAAY,EACrB,iBAAiB,EAAE,cAAc,GAChC,OAAO,CAAC,aAAa,CAAC,CAExB;AAED;;;;;;;GAOG;AACH,wBAAsB,6BAA6B,CACjD,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,EACb,iBAAiB,EAAE,cAAc,EACjC,IAAI,EAAE,IAAI,GACT,OAAO,CAAC,0BAA0B,CAAC,CAGrC;AAED;;;;;GAKG;AACH,wBAAsB,gCAAgC,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,iBAAiB,CAAC,EAAE,cAAc,yBAI9G"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AuthWitnessProvider } from '@aztec/aztec.js/account';
|
|
2
|
+
import { GrumpkinScalar } from '@aztec/foundation/fields';
|
|
3
|
+
import { CompleteAddress } from '@aztec/stdlib/contract';
|
|
4
|
+
import { DefaultAccountContract } from '../defaults/account_contract.js';
|
|
5
|
+
/**
|
|
6
|
+
* Account contract that authenticates transactions using Schnorr signatures verified against
|
|
7
|
+
* the note encryption key, relying on a single private key for both encryption and authentication.
|
|
8
|
+
* This abstract version does not provide a way to retrieve the artifact, as it
|
|
9
|
+
* can be implemented with or without lazy loading.
|
|
10
|
+
*/
|
|
11
|
+
export declare abstract class SingleKeyBaseAccountContract extends DefaultAccountContract {
|
|
12
|
+
private encryptionPrivateKey;
|
|
13
|
+
constructor(encryptionPrivateKey: GrumpkinScalar);
|
|
14
|
+
getDeploymentArgs(): Promise<undefined>;
|
|
15
|
+
getAuthWitnessProvider(account: CompleteAddress): AuthWitnessProvider;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=account_contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account_contract.d.ts","sourceRoot":"","sources":["../../src/single_key/account_contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnE,OAAO,EAAW,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE;;;;;GAKG;AACH,8BAAsB,4BAA6B,SAAQ,sBAAsB;IACnE,OAAO,CAAC,oBAAoB;gBAApB,oBAAoB,EAAE,cAAc;IAIxD,iBAAiB;IAIjB,sBAAsB,CAAC,OAAO,EAAE,eAAe,GAAG,mBAAmB;CAGtE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `@aztec/accounts/single_key` export provides a testing account contract implementation that uses a single Grumpkin key for both authentication and encryption.
|
|
3
|
+
* It is not recommended to use this account type in production.
|
|
4
|
+
*
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
import type { AztecAddress, Fr, GrumpkinScalar } from '@aztec/aztec.js';
|
|
8
|
+
import { AccountManager, type Salt } from '@aztec/aztec.js/account';
|
|
9
|
+
import { type AccountWallet } from '@aztec/aztec.js/wallet';
|
|
10
|
+
import type { ContractArtifact } from '@aztec/stdlib/abi';
|
|
11
|
+
import type { PXE } from '@aztec/stdlib/interfaces/client';
|
|
12
|
+
import { SingleKeyBaseAccountContract } from './account_contract.js';
|
|
13
|
+
export declare const SchnorrSingleKeyAccountContractArtifact: ContractArtifact;
|
|
14
|
+
/**
|
|
15
|
+
* Account contract that authenticates transactions using Schnorr signatures verified against
|
|
16
|
+
* the note encryption key, relying on a single private key for both encryption and authentication.
|
|
17
|
+
* Eagerly loads the contract artifact
|
|
18
|
+
*/
|
|
19
|
+
export declare class SingleKeyAccountContract extends SingleKeyBaseAccountContract {
|
|
20
|
+
constructor(signingPrivateKey: GrumpkinScalar);
|
|
21
|
+
getContractArtifact(): Promise<ContractArtifact>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Creates an Account that uses the same Grumpkin key for encryption and authentication.
|
|
25
|
+
* @param pxe - An PXE server instance.
|
|
26
|
+
* @param secretKey - Secret key used to derive all the keystore keys (in this case also used to get signing key).
|
|
27
|
+
* @param salt - Deployment salt.
|
|
28
|
+
* @returns An account manager initialized with the account contract and its deployment params
|
|
29
|
+
*/
|
|
30
|
+
export declare function getUnsafeSchnorrAccount(pxe: PXE, secretKey: Fr, salt?: Salt): Promise<AccountManager>;
|
|
31
|
+
/**
|
|
32
|
+
* Gets a wallet for an already registered account using Schnorr signatures with a single key for encryption and authentication.
|
|
33
|
+
* @param pxe - An PXE server instance.
|
|
34
|
+
* @param address - Address for the account.
|
|
35
|
+
* @param signingPrivateKey - Grumpkin key used for note encryption and signing transactions.
|
|
36
|
+
* @returns A wallet for this account that can be used to interact with a contract instance.
|
|
37
|
+
*/
|
|
38
|
+
export declare function getUnsafeSchnorrWallet(pxe: PXE, address: AztecAddress, signingPrivateKey: GrumpkinScalar): Promise<AccountWallet>;
|
|
39
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/single_key/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,wBAAwB,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAK3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAErE,eAAO,MAAM,uCAAuC,kBAEnD,CAAC;AAEF;;;;GAIG;AACH,qBAAa,wBAAyB,SAAQ,4BAA4B;gBAC5D,iBAAiB,EAAE,cAAc;IAIpC,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAG1D;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,2BAG3E;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,YAAY,EACrB,iBAAiB,EAAE,cAAc,GAChC,OAAO,CAAC,aAAa,CAAC,CAExB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `@aztec/accounts/single_key` export provides a testing account contract implementation that uses a single Grumpkin key for both authentication and encryption.
|
|
3
|
+
* It is not recommended to use this account type in production.
|
|
4
|
+
*
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
import type { AztecAddress, Fr, GrumpkinScalar } from '@aztec/aztec.js';
|
|
8
|
+
import { AccountManager, type Salt } from '@aztec/aztec.js/account';
|
|
9
|
+
import { type AccountWallet } from '@aztec/aztec.js/wallet';
|
|
10
|
+
import type { ContractArtifact } from '@aztec/stdlib/abi';
|
|
11
|
+
import type { PXE } from '@aztec/stdlib/interfaces/client';
|
|
12
|
+
import { SingleKeyBaseAccountContract } from './account_contract.js';
|
|
13
|
+
/**
|
|
14
|
+
* Lazily loads the contract artifact
|
|
15
|
+
* @returns The contract artifact for the single key account contract
|
|
16
|
+
*/
|
|
17
|
+
export declare function getSingleKeyAccountContractArtifact(): Promise<ContractArtifact>;
|
|
18
|
+
/**
|
|
19
|
+
* Account contract that authenticates transactions using Schnorr signatures verified against
|
|
20
|
+
* the note encryption key, relying on a single private key for both encryption and authentication.
|
|
21
|
+
* Lazily loads the contract artifact
|
|
22
|
+
*/
|
|
23
|
+
export declare class SingleKeyAccountContract extends SingleKeyBaseAccountContract {
|
|
24
|
+
constructor(signingPrivateKey: GrumpkinScalar);
|
|
25
|
+
getContractArtifact(): Promise<ContractArtifact>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Creates an Account that uses the same Grumpkin key for encryption and authentication.
|
|
29
|
+
* @param pxe - An PXE server instance.
|
|
30
|
+
* @param secretKey - Secret key used to derive all the keystore keys (in this case also used to get signing key).
|
|
31
|
+
* @param salt - Deployment salt.
|
|
32
|
+
* @returns An account manager initialized with the account contract and its deployment params
|
|
33
|
+
*/
|
|
34
|
+
export declare function getUnsafeSchnorrAccount(pxe: PXE, secretKey: Fr, salt?: Salt): Promise<AccountManager>;
|
|
35
|
+
/**
|
|
36
|
+
* Gets a wallet for an already registered account using Schnorr signatures with a single key for encryption and authentication.
|
|
37
|
+
* @param pxe - An PXE server instance.
|
|
38
|
+
* @param address - Address for the account.
|
|
39
|
+
* @param signingPrivateKey - Grumpkin key used for note encryption and signing transactions.
|
|
40
|
+
* @returns A wallet for this account that can be used to interact with a contract instance.
|
|
41
|
+
*/
|
|
42
|
+
export declare function getUnsafeSchnorrWallet(pxe: PXE, address: AztecAddress, signingPrivateKey: GrumpkinScalar): Promise<AccountWallet>;
|
|
43
|
+
//# sourceMappingURL=lazy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../src/single_key/lazy.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,KAAK,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,wBAAwB,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAG3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAErE;;;GAGG;AACH,wBAAsB,mCAAmC,8BAQxD;AAED;;;;GAIG;AACH,qBAAa,wBAAyB,SAAQ,4BAA4B;gBAC5D,iBAAiB,EAAE,cAAc;IAIpC,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC;CAG1D;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,2BAG3E;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,YAAY,EACrB,iBAAiB,EAAE,cAAc,GAChC,OAAO,CAAC,aAAa,CAAC,CAExB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Fr, GrumpkinScalar } from '@aztec/foundation/fields';
|
|
2
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
|
+
export declare const INITIAL_TEST_SECRET_KEYS: Fr[];
|
|
4
|
+
export declare const INITIAL_TEST_ENCRYPTION_KEYS: import("@aztec/foundation/fields").Fq[];
|
|
5
|
+
export declare const INITIAL_TEST_SIGNING_KEYS: import("@aztec/foundation/fields").Fq[];
|
|
6
|
+
export declare const INITIAL_TEST_ACCOUNT_SALTS: Fr[];
|
|
7
|
+
/**
|
|
8
|
+
* Data for generating an initial account.
|
|
9
|
+
*/
|
|
10
|
+
export interface InitialAccountData {
|
|
11
|
+
/**
|
|
12
|
+
* Secret to derive the keys for the account.
|
|
13
|
+
*/
|
|
14
|
+
secret: Fr;
|
|
15
|
+
/**
|
|
16
|
+
* Signing key od the account.
|
|
17
|
+
*/
|
|
18
|
+
signingKey: GrumpkinScalar;
|
|
19
|
+
/**
|
|
20
|
+
* Contract address salt.
|
|
21
|
+
*/
|
|
22
|
+
salt: Fr;
|
|
23
|
+
/**
|
|
24
|
+
* Address of the schnorr account contract.
|
|
25
|
+
*/
|
|
26
|
+
address: AztecAddress;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=configuration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../src/testing/configuration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,eAAO,MAAM,wBAAwB,MAIpC,CAAC;AAEF,eAAO,MAAM,4BAA4B,yCAExC,CAAC;AAEF,eAAO,MAAM,yBAAyB,yCAA+B,CAAC;AAEtE,eAAO,MAAM,0BAA0B,MAA8B,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,MAAM,EAAE,EAAE,CAAC;IACX;;OAEG;IACH,UAAU,EAAE,cAAc,CAAC;IAC3B;;OAEG;IACH,IAAI,EAAE,EAAE,CAAC;IACT;;OAEG;IACH,OAAO,EAAE,YAAY,CAAC;CACvB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type AccountManager, type PXE, type WaitOpts } from '@aztec/aztec.js';
|
|
2
|
+
import { Fr } from '@aztec/foundation/fields';
|
|
3
|
+
import type { InitialAccountData } from './configuration.js';
|
|
4
|
+
/**
|
|
5
|
+
* Generate a fixed amount of random schnorr account contract instance.
|
|
6
|
+
*/
|
|
7
|
+
export declare function generateSchnorrAccounts(numberOfAccounts: number): Promise<{
|
|
8
|
+
secret: Fr;
|
|
9
|
+
signingKey: import("@aztec/aztec.js").Fq;
|
|
10
|
+
salt: Fr;
|
|
11
|
+
address: import("@aztec/aztec.js").AztecAddress;
|
|
12
|
+
}[]>;
|
|
13
|
+
/**
|
|
14
|
+
* Data for deploying funded account.
|
|
15
|
+
*/
|
|
16
|
+
type DeployAccountData = Pick<InitialAccountData, 'secret' | 'salt'> & {
|
|
17
|
+
/**
|
|
18
|
+
* An optional signingKey if it's not derived from the secret.
|
|
19
|
+
*/
|
|
20
|
+
signingKey?: InitialAccountData['signingKey'];
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Deploy schnorr account contract.
|
|
24
|
+
* It will pay for the fee for the deployment itself. So it must be funded with the prefilled public data.
|
|
25
|
+
*/
|
|
26
|
+
export declare function deployFundedSchnorrAccount(pxe: PXE, account: DeployAccountData, opts?: WaitOpts & {
|
|
27
|
+
/**
|
|
28
|
+
* Whether or not to skip registering contract class.
|
|
29
|
+
*/
|
|
30
|
+
skipClassRegistration?: boolean;
|
|
31
|
+
}): Promise<AccountManager>;
|
|
32
|
+
/**
|
|
33
|
+
* Deploy schnorr account contracts.
|
|
34
|
+
* They will pay for the fees for the deployment themselves. So they must be funded with the prefilled public data.
|
|
35
|
+
*/
|
|
36
|
+
export declare function deployFundedSchnorrAccounts(pxe: PXE, accounts: DeployAccountData[], opts?: WaitOpts & {
|
|
37
|
+
/**
|
|
38
|
+
* Whether or not to skip registering contract class.
|
|
39
|
+
*/
|
|
40
|
+
skipClassRegistration?: boolean;
|
|
41
|
+
}): Promise<AccountManager[]>;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=create_account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create_account.d.ts","sourceRoot":"","sources":["../../src/testing/create_account.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAyB,KAAK,GAAG,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtG,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAI9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D;;GAEG;AACH,wBAAsB,uBAAuB,CAAC,gBAAgB,EAAE,MAAM;;;;;KAarE;AAED;;GAEG;AACH,KAAK,iBAAiB,GAAG,IAAI,CAAC,kBAAkB,EAAE,QAAQ,GAAG,MAAM,CAAC,GAAG;IACrE;;OAEG;IACH,UAAU,CAAC,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;CAC/C,CAAC;AAEF;;;GAGG;AACH,wBAAsB,0BAA0B,CAC9C,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,iBAAiB,EAC1B,IAAI,GAAE,QAAQ,GAAG;IACf;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACiB,GAClD,OAAO,CAAC,cAAc,CAAC,CAiBzB;AAED;;;GAGG;AACH,wBAAsB,2BAA2B,CAC/C,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,iBAAiB,EAAE,EAC7B,IAAI,GAAE,QAAQ,GAAG;IACf;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACiB,GAClD,OAAO,CAAC,cAAc,EAAE,CAAC,CAY3B"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `@aztec/accounts/testing` export provides utility methods for testing, in particular in a Sandbox environment.
|
|
3
|
+
*
|
|
4
|
+
* Use {@link getInitialTestAccountsWallets} to obtain a list of wallets for the Sandbox pre-seeded accounts.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
import type { PXE } from '@aztec/aztec.js';
|
|
9
|
+
import type { AccountWalletWithSecretKey } from '@aztec/aztec.js/wallet';
|
|
10
|
+
import type { InitialAccountData } from './configuration.js';
|
|
11
|
+
export { type InitialAccountData, INITIAL_TEST_ACCOUNT_SALTS, INITIAL_TEST_ENCRYPTION_KEYS, INITIAL_TEST_SECRET_KEYS, INITIAL_TEST_SIGNING_KEYS, } from './configuration.js';
|
|
12
|
+
/**
|
|
13
|
+
* Gets the basic information for initial test accounts.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getInitialTestAccounts(): Promise<InitialAccountData[]>;
|
|
16
|
+
/**
|
|
17
|
+
* Gets a collection of wallets for the Aztec accounts that are initially stored in the test environment.
|
|
18
|
+
* @param pxe - PXE instance.
|
|
19
|
+
* @returns A set of AccountWallet implementations for each of the initial accounts.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getInitialTestAccountsWallets(pxe: PXE): Promise<AccountWalletWithSecretKey[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Queries a PXE for it's registered accounts.
|
|
24
|
+
* @param pxe - PXE instance.
|
|
25
|
+
* @returns A set of key data for each of the initial accounts.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getDeployedTestAccounts(pxe: PXE): Promise<InitialAccountData[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Queries a PXE for it's registered accounts and returns wallets for those accounts using keys in the initial test accounts.
|
|
30
|
+
* @param pxe - PXE instance.
|
|
31
|
+
* @returns A set of AccountWallet implementations for each of the initial accounts.
|
|
32
|
+
*/
|
|
33
|
+
export declare function getDeployedTestAccountsWallets(pxe: PXE): Promise<AccountWalletWithSecretKey[]>;
|
|
34
|
+
export { deployFundedSchnorrAccount, deployFundedSchnorrAccounts, generateSchnorrAccounts } from './create_account.js';
|
|
35
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testing/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAOzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAQ7D,OAAO,EACL,KAAK,kBAAkB,EACvB,0BAA0B,EAC1B,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAatE;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAY7F;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAIrF;AAED;;;;GAIG;AACH,wBAAsB,8BAA8B,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAKpG;AAED,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `@aztec/accounts/testing/lazy` export provides utility methods for testing, in particular in a Sandbox environment.
|
|
3
|
+
*
|
|
4
|
+
* Use {@link getInitialTestAccountsWallets} to obtain a list of wallets for the Sandbox pre-seeded accounts.
|
|
5
|
+
*
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
*/
|
|
8
|
+
import type { PXE } from '@aztec/aztec.js';
|
|
9
|
+
import type { AccountWalletWithSecretKey } from '@aztec/aztec.js/wallet';
|
|
10
|
+
import { type InitialAccountData } from './configuration.js';
|
|
11
|
+
export { type InitialAccountData, INITIAL_TEST_ACCOUNT_SALTS, INITIAL_TEST_ENCRYPTION_KEYS, INITIAL_TEST_SECRET_KEYS, INITIAL_TEST_SIGNING_KEYS, } from './configuration.js';
|
|
12
|
+
/**
|
|
13
|
+
* Gets the basic information for initial test accounts.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getInitialTestAccounts(): Promise<InitialAccountData[]>;
|
|
16
|
+
/**
|
|
17
|
+
* Gets a collection of wallets for the Aztec accounts that are initially stored in the test environment.
|
|
18
|
+
* @param pxe - PXE instance.
|
|
19
|
+
* @returns A set of AccountWallet implementations for each of the initial accounts.
|
|
20
|
+
*/
|
|
21
|
+
export declare function getInitialTestAccountsWallets(pxe: PXE): Promise<AccountWalletWithSecretKey[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Queries a PXE for it's registered accounts.
|
|
24
|
+
* @param pxe - PXE instance.
|
|
25
|
+
* @returns A set of key data for each of the initial accounts.
|
|
26
|
+
*/
|
|
27
|
+
export declare function getDeployedTestAccounts(pxe: PXE): Promise<InitialAccountData[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Queries a PXE for it's registered accounts and returns wallets for those accounts using keys in the initial test accounts.
|
|
30
|
+
* @param pxe - PXE instance.
|
|
31
|
+
* @returns A set of AccountWallet implementations for each of the initial accounts.
|
|
32
|
+
*/
|
|
33
|
+
export declare function getDeployedTestAccountsWallets(pxe: PXE): Promise<AccountWalletWithSecretKey[]>;
|
|
34
|
+
//# sourceMappingURL=lazy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../src/testing/lazy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAGzE,OAAO,EAKL,KAAK,kBAAkB,EACxB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,KAAK,kBAAkB,EACvB,0BAA0B,EAC1B,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAatE;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAY7F;AAED;;;;GAIG;AACH,wBAAsB,uBAAuB,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAIrF;AAED;;;;GAIG;AACH,wBAAsB,8BAA8B,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAKpG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
2
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
3
|
+
/// <reference types="node" resolution-mode="require"/>
|
|
4
|
+
import { Buffer } from 'buffer';
|
|
5
|
+
import net from 'net';
|
|
6
|
+
/**
|
|
7
|
+
* Connect to the SSH agent via a TCP socket using the standard env variable
|
|
8
|
+
*/
|
|
9
|
+
export declare function connectToAgent(): net.Socket;
|
|
10
|
+
/**
|
|
11
|
+
* Type representing a stored key in the SSH agent.
|
|
12
|
+
*/
|
|
13
|
+
type StoredKey = {
|
|
14
|
+
/**
|
|
15
|
+
* Type of the key.
|
|
16
|
+
*/
|
|
17
|
+
type: string;
|
|
18
|
+
/**
|
|
19
|
+
* Public key in base64 encoding.
|
|
20
|
+
*/
|
|
21
|
+
publicKey: string;
|
|
22
|
+
/**
|
|
23
|
+
* Comment associated with the key.
|
|
24
|
+
*/
|
|
25
|
+
comment: string;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Retrieve the identities stored in the SSH agent.
|
|
29
|
+
*/
|
|
30
|
+
export declare function getIdentities(): Promise<StoredKey[]>;
|
|
31
|
+
/**
|
|
32
|
+
* Sign data using a key stored in the SSH agent. The private signing key is identified by its corresponding public key.
|
|
33
|
+
*/
|
|
34
|
+
export declare function signWithAgent(keyType: Buffer, curveName: Buffer, publicKey: Buffer, data: Buffer): Promise<Buffer>;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=ssh_agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssh_agent.d.ts","sourceRoot":"","sources":["../../src/utils/ssh_agent.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,GAAG,MAAM,KAAK,CAAC;AAOtB;;GAEG;AACH,wBAAgB,cAAc,eAM7B;AAED;;GAEG;AACH,KAAK,SAAS,GAAG;IACf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC,CAkDpD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,mBAwChG"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@aztec/accounts",
|
|
3
3
|
"homepage": "https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/accounts",
|
|
4
4
|
"description": "Implementation of sample account contracts for Aztec Network",
|
|
5
|
-
"version": "0.77.0-testnet-ignition.
|
|
5
|
+
"version": "0.77.0-testnet-ignition.30",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
8
|
"./dapp": "./dest/dapp/index.js",
|
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
]
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@aztec/aztec.js": "0.77.0-testnet-ignition.
|
|
81
|
-
"@aztec/entrypoints": "0.77.0-testnet-ignition.
|
|
82
|
-
"@aztec/ethereum": "0.77.0-testnet-ignition.
|
|
83
|
-
"@aztec/foundation": "0.77.0-testnet-ignition.
|
|
84
|
-
"@aztec/stdlib": "0.77.0-testnet-ignition.
|
|
80
|
+
"@aztec/aztec.js": "0.77.0-testnet-ignition.30",
|
|
81
|
+
"@aztec/entrypoints": "0.77.0-testnet-ignition.30",
|
|
82
|
+
"@aztec/ethereum": "0.77.0-testnet-ignition.30",
|
|
83
|
+
"@aztec/foundation": "0.77.0-testnet-ignition.30",
|
|
84
|
+
"@aztec/stdlib": "0.77.0-testnet-ignition.30",
|
|
85
85
|
"tslib": "^2.4.0"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|