@aztec/accounts 0.0.1-commit.d3ec352c → 0.0.1-commit.e310a4c8
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/README.md +1 -1
- package/artifacts/EcdsaKAccount.json +2992 -3319
- package/artifacts/EcdsaRAccount.json +2992 -3319
- package/artifacts/SchnorrAccount.json +2930 -3399
- package/artifacts/SchnorrSingleKeyAccount.json +2073 -2046
- package/artifacts/SimulatedAccount.json +1979 -2119
- package/dest/defaults/account_contract.d.ts +3 -3
- package/dest/defaults/account_contract.d.ts.map +1 -1
- package/dest/defaults/account_contract.js +5 -3
- package/dest/defaults/index.d.ts +1 -2
- package/dest/defaults/index.d.ts.map +1 -1
- package/dest/defaults/index.js +1 -2
- package/dest/ecdsa/ecdsa_k/account_contract.js +1 -1
- package/dest/ecdsa/ecdsa_r/account_contract.js +1 -1
- package/dest/ecdsa/ssh_ecdsa_r/account_contract.js +1 -1
- package/dest/schnorr/account_contract.d.ts +3 -2
- package/dest/schnorr/account_contract.d.ts.map +1 -1
- package/dest/schnorr/account_contract.js +1 -1
- package/dest/schnorr/index.d.ts +3 -2
- package/dest/schnorr/index.d.ts.map +1 -1
- package/dest/schnorr/lazy.d.ts +3 -2
- package/dest/schnorr/lazy.d.ts.map +1 -1
- package/dest/single_key/account_contract.d.ts +2 -2
- package/dest/single_key/account_contract.d.ts.map +1 -1
- package/dest/single_key/account_contract.js +1 -1
- package/dest/stub/account_contract.d.ts +2 -2
- package/dest/stub/account_contract.d.ts.map +1 -1
- package/dest/stub/index.d.ts +3 -4
- package/dest/stub/index.d.ts.map +1 -1
- package/dest/stub/index.js +4 -5
- package/dest/stub/lazy.d.ts +6 -4
- package/dest/stub/lazy.d.ts.map +1 -1
- package/dest/stub/lazy.js +7 -5
- package/dest/testing/configuration.d.ts +5 -4
- package/dest/testing/configuration.d.ts.map +1 -1
- package/dest/testing/configuration.js +1 -1
- package/package.json +8 -8
- package/src/defaults/account_contract.ts +9 -5
- package/src/defaults/index.ts +0 -1
- package/src/ecdsa/ecdsa_k/account_contract.ts +2 -2
- package/src/ecdsa/ecdsa_r/account_contract.ts +2 -2
- package/src/ecdsa/ssh_ecdsa_r/account_contract.ts +2 -2
- package/src/schnorr/account_contract.ts +3 -2
- package/src/schnorr/index.ts +2 -1
- package/src/schnorr/lazy.ts +2 -1
- package/src/single_key/account_contract.ts +3 -2
- package/src/stub/account_contract.ts +1 -1
- package/src/stub/index.ts +7 -8
- package/src/stub/lazy.ts +10 -8
- package/src/testing/configuration.ts +2 -1
- package/dest/defaults/account_interface.d.ts +0 -28
- package/dest/defaults/account_interface.d.ts.map +0 -1
- package/dest/defaults/account_interface.js +0 -36
- package/src/defaults/account_interface.ts +0 -63
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Fr
|
|
1
|
+
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
2
|
+
import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin';
|
|
2
3
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
4
|
import { deriveMasterIncomingViewingSecretKey } from '@aztec/stdlib/keys';
|
|
4
5
|
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { AccountInterface, AuthWitnessProvider } from '@aztec/aztec.js/account';
|
|
2
|
-
import { type DefaultAccountEntrypointOptions } from '@aztec/entrypoints/account';
|
|
3
|
-
import type { ChainInfo, EntrypointInterface } from '@aztec/entrypoints/interfaces';
|
|
4
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
5
|
-
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
6
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
7
|
-
import { CompleteAddress } from '@aztec/stdlib/contract';
|
|
8
|
-
import type { GasSettings } from '@aztec/stdlib/gas';
|
|
9
|
-
import type { ExecutionPayload, TxExecutionRequest } from '@aztec/stdlib/tx';
|
|
10
|
-
/**
|
|
11
|
-
* Default implementation for an account interface. Requires that the account uses the default
|
|
12
|
-
* entrypoint signature, which accept an AppPayload and a FeePayload as defined in noir-libs/aztec-noir/src/entrypoint module
|
|
13
|
-
*/
|
|
14
|
-
export declare class DefaultAccountInterface implements AccountInterface {
|
|
15
|
-
private authWitnessProvider;
|
|
16
|
-
private address;
|
|
17
|
-
protected entrypoint: EntrypointInterface;
|
|
18
|
-
private chainId;
|
|
19
|
-
private version;
|
|
20
|
-
constructor(authWitnessProvider: AuthWitnessProvider, address: CompleteAddress, chainInfo: ChainInfo);
|
|
21
|
-
createTxExecutionRequest(exec: ExecutionPayload, gasSettings: GasSettings, options: DefaultAccountEntrypointOptions): Promise<TxExecutionRequest>;
|
|
22
|
-
createAuthWit(messageHash: Fr): Promise<AuthWitness>;
|
|
23
|
-
getCompleteAddress(): CompleteAddress;
|
|
24
|
-
getAddress(): AztecAddress;
|
|
25
|
-
getChainId(): Fr;
|
|
26
|
-
getVersion(): Fr;
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNjb3VudF9pbnRlcmZhY2UuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9kZWZhdWx0cy9hY2NvdW50X2ludGVyZmFjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxnQkFBZ0IsRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQ3JGLE9BQU8sRUFBNEIsS0FBSywrQkFBK0IsRUFBRSxNQUFNLDRCQUE0QixDQUFDO0FBQzVHLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxtQkFBbUIsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBQ3BGLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUM5QyxPQUFPLEtBQUssRUFBRSxXQUFXLEVB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U,IAAI,EAAE,CAEf;CACF"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { DefaultAccountEntrypoint } from '@aztec/entrypoints/account';
|
|
2
|
-
/**
|
|
3
|
-
* Default implementation for an account interface. Requires that the account uses the default
|
|
4
|
-
* entrypoint signature, which accept an AppPayload and a FeePayload as defined in noir-libs/aztec-noir/src/entrypoint module
|
|
5
|
-
*/ export class DefaultAccountInterface {
|
|
6
|
-
authWitnessProvider;
|
|
7
|
-
address;
|
|
8
|
-
entrypoint;
|
|
9
|
-
chainId;
|
|
10
|
-
version;
|
|
11
|
-
constructor(authWitnessProvider, address, chainInfo){
|
|
12
|
-
this.authWitnessProvider = authWitnessProvider;
|
|
13
|
-
this.address = address;
|
|
14
|
-
this.entrypoint = new DefaultAccountEntrypoint(address.address, authWitnessProvider, chainInfo.chainId.toNumber(), chainInfo.version.toNumber());
|
|
15
|
-
this.chainId = chainInfo.chainId;
|
|
16
|
-
this.version = chainInfo.version;
|
|
17
|
-
}
|
|
18
|
-
createTxExecutionRequest(exec, gasSettings, options) {
|
|
19
|
-
return this.entrypoint.createTxExecutionRequest(exec, gasSettings, options);
|
|
20
|
-
}
|
|
21
|
-
createAuthWit(messageHash) {
|
|
22
|
-
return this.authWitnessProvider.createAuthWit(messageHash);
|
|
23
|
-
}
|
|
24
|
-
getCompleteAddress() {
|
|
25
|
-
return this.address;
|
|
26
|
-
}
|
|
27
|
-
getAddress() {
|
|
28
|
-
return this.address.address;
|
|
29
|
-
}
|
|
30
|
-
getChainId() {
|
|
31
|
-
return this.chainId;
|
|
32
|
-
}
|
|
33
|
-
getVersion() {
|
|
34
|
-
return this.version;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import type { AccountInterface, AuthWitnessProvider } from '@aztec/aztec.js/account';
|
|
2
|
-
import { DefaultAccountEntrypoint, type DefaultAccountEntrypointOptions } from '@aztec/entrypoints/account';
|
|
3
|
-
import type { ChainInfo, EntrypointInterface } from '@aztec/entrypoints/interfaces';
|
|
4
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
5
|
-
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
6
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
7
|
-
import { CompleteAddress } from '@aztec/stdlib/contract';
|
|
8
|
-
import type { GasSettings } from '@aztec/stdlib/gas';
|
|
9
|
-
import type { ExecutionPayload, TxExecutionRequest } from '@aztec/stdlib/tx';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Default implementation for an account interface. Requires that the account uses the default
|
|
13
|
-
* entrypoint signature, which accept an AppPayload and a FeePayload as defined in noir-libs/aztec-noir/src/entrypoint module
|
|
14
|
-
*/
|
|
15
|
-
export class DefaultAccountInterface implements AccountInterface {
|
|
16
|
-
protected entrypoint: EntrypointInterface;
|
|
17
|
-
|
|
18
|
-
private chainId: Fr;
|
|
19
|
-
private version: Fr;
|
|
20
|
-
|
|
21
|
-
constructor(
|
|
22
|
-
private authWitnessProvider: AuthWitnessProvider,
|
|
23
|
-
private address: CompleteAddress,
|
|
24
|
-
chainInfo: ChainInfo,
|
|
25
|
-
) {
|
|
26
|
-
this.entrypoint = new DefaultAccountEntrypoint(
|
|
27
|
-
address.address,
|
|
28
|
-
authWitnessProvider,
|
|
29
|
-
chainInfo.chainId.toNumber(),
|
|
30
|
-
chainInfo.version.toNumber(),
|
|
31
|
-
);
|
|
32
|
-
this.chainId = chainInfo.chainId;
|
|
33
|
-
this.version = chainInfo.version;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
createTxExecutionRequest(
|
|
37
|
-
exec: ExecutionPayload,
|
|
38
|
-
gasSettings: GasSettings,
|
|
39
|
-
options: DefaultAccountEntrypointOptions,
|
|
40
|
-
): Promise<TxExecutionRequest> {
|
|
41
|
-
return this.entrypoint.createTxExecutionRequest(exec, gasSettings, options);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
createAuthWit(messageHash: Fr): Promise<AuthWitness> {
|
|
45
|
-
return this.authWitnessProvider.createAuthWit(messageHash);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
getCompleteAddress(): CompleteAddress {
|
|
49
|
-
return this.address;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
getAddress(): AztecAddress {
|
|
53
|
-
return this.address.address;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
getChainId(): Fr {
|
|
57
|
-
return this.chainId;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
getVersion(): Fr {
|
|
61
|
-
return this.version;
|
|
62
|
-
}
|
|
63
|
-
}
|