@aztec/accounts 0.0.1-commit.dbf9cec → 0.0.1-commit.ddcf04837
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/artifacts/EcdsaKAccount.json +5622 -837
- package/artifacts/EcdsaRAccount.json +5599 -814
- package/artifacts/SchnorrAccount.json +5521 -718
- package/artifacts/SimulatedEcdsaAccount.json +8351 -0
- package/artifacts/SimulatedSchnorrAccount.d.json.ts +3 -0
- package/artifacts/SimulatedSchnorrAccount.json +8327 -0
- package/dest/stub/ecdsa/index.d.ts +11 -0
- package/dest/stub/ecdsa/index.d.ts.map +1 -0
- package/dest/stub/ecdsa/index.js +18 -0
- package/dest/stub/ecdsa/lazy.d.ts +14 -0
- package/dest/stub/ecdsa/lazy.d.ts.map +1 -0
- package/dest/stub/ecdsa/lazy.js +22 -0
- package/dest/stub/schnorr/index.d.ts +11 -0
- package/dest/stub/schnorr/index.d.ts.map +1 -0
- package/dest/stub/schnorr/index.js +18 -0
- package/dest/stub/schnorr/lazy.d.ts +14 -0
- package/dest/stub/schnorr/lazy.d.ts.map +1 -0
- package/dest/stub/schnorr/lazy.js +22 -0
- package/dest/utils/ssh_agent.d.ts +1 -1
- package/dest/utils/ssh_agent.d.ts.map +1 -1
- package/dest/utils/ssh_agent.js +2 -0
- package/package.json +10 -8
- package/src/stub/ecdsa/index.ts +28 -0
- package/src/stub/ecdsa/lazy.ts +34 -0
- package/src/stub/schnorr/index.ts +30 -0
- package/src/stub/schnorr/lazy.ts +34 -0
- package/src/utils/ssh_agent.ts +2 -0
- package/artifacts/SimulatedAccount.json +0 -4500
- package/dest/stub/index.d.ts +0 -20
- package/dest/stub/index.d.ts.map +0 -1
- package/dest/stub/index.js +0 -28
- package/dest/stub/lazy.d.ts +0 -25
- package/dest/stub/lazy.d.ts.map +0 -1
- package/dest/stub/lazy.js +0 -37
- package/src/stub/index.ts +0 -40
- package/src/stub/lazy.ts +0 -51
- /package/artifacts/{SimulatedAccount.d.json.ts → SimulatedEcdsaAccount.d.json.ts} +0 -0
package/dest/stub/index.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { BaseAccount } from '@aztec/aztec.js/account';
|
|
2
|
-
import type { CompleteAddress } from '@aztec/aztec.js/addresses';
|
|
3
|
-
import type { ContractArtifact } from '@aztec/stdlib/abi';
|
|
4
|
-
import { StubBaseAccountContract } from './account_contract.js';
|
|
5
|
-
export declare const StubAccountContractArtifact: ContractArtifact;
|
|
6
|
-
/**
|
|
7
|
-
* Stub account contract
|
|
8
|
-
* Eagerly loads the contract artifact
|
|
9
|
-
*/
|
|
10
|
-
export declare class StubAccountContract extends StubBaseAccountContract {
|
|
11
|
-
constructor();
|
|
12
|
-
getContractArtifact(): Promise<ContractArtifact>;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Creates a stub account that impersonates the one with the provided originalAddress.
|
|
16
|
-
* @param originalAddress - The address of the account to stub
|
|
17
|
-
* @returns A stub account that can be used for kernelless simulations
|
|
18
|
-
*/
|
|
19
|
-
export declare function createStubAccount(originalAddress: CompleteAddress): BaseAccount;
|
|
20
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9zdHViL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUN0RCxPQUFPLEtBQUssRUFBRSxlQUFlLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUVqRSxPQUFPLEtBQUssRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBSzFELE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBRWhFLGVBQU8sTUFBTSwyQkFBMkIsa0JBQXlFLENBQUM7QUFFbEg7OztHQUdHO0FBQ0gscUJBQWEsbUJBQW9CLFNBQVEsdUJBQXVCO0lBQzlELGNBRUM7SUFFUSxtQkFBbUIsSUFBSSxPQUFPLENBQUMsZ0JBQWdCLENBQUMsQ0FFeEQ7Q0FDRjtBQUVEOzs7O0dBSUc7QUFDSCx3QkFBZ0IsaUJBQWlCLENBQUMsZUFBZSxFQUFFLGVBQWUsZUFRakUifQ==
|
package/dest/stub/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/stub/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAK1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,eAAO,MAAM,2BAA2B,kBAAyE,CAAC;AAElH;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,uBAAuB;IAC9D,cAEC;IAEQ,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAExD;CACF;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,eAAe,EAAE,eAAe,eAQjE"}
|
package/dest/stub/index.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { BaseAccount } from '@aztec/aztec.js/account';
|
|
2
|
-
import { DefaultAccountEntrypoint } from '@aztec/entrypoints/account';
|
|
3
|
-
import { loadContractArtifact } from '@aztec/stdlib/abi';
|
|
4
|
-
import SimulatedAccountContract from '../../artifacts/SimulatedAccount.json' with {
|
|
5
|
-
type: 'json'
|
|
6
|
-
};
|
|
7
|
-
import { StubBaseAccountContract } from './account_contract.js';
|
|
8
|
-
export const StubAccountContractArtifact = loadContractArtifact(SimulatedAccountContract);
|
|
9
|
-
/**
|
|
10
|
-
* Stub account contract
|
|
11
|
-
* Eagerly loads the contract artifact
|
|
12
|
-
*/ export class StubAccountContract extends StubBaseAccountContract {
|
|
13
|
-
constructor(){
|
|
14
|
-
super();
|
|
15
|
-
}
|
|
16
|
-
getContractArtifact() {
|
|
17
|
-
return Promise.resolve(StubAccountContractArtifact);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Creates a stub account that impersonates the one with the provided originalAddress.
|
|
22
|
-
* @param originalAddress - The address of the account to stub
|
|
23
|
-
* @returns A stub account that can be used for kernelless simulations
|
|
24
|
-
*/ export function createStubAccount(originalAddress) {
|
|
25
|
-
const accountContract = new StubAccountContract();
|
|
26
|
-
const authWitnessProvider = accountContract.getAuthWitnessProvider(originalAddress);
|
|
27
|
-
return new BaseAccount(new DefaultAccountEntrypoint(originalAddress.address, authWitnessProvider), authWitnessProvider, originalAddress);
|
|
28
|
-
}
|
package/dest/stub/lazy.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { BaseAccount } from '@aztec/aztec.js/account';
|
|
2
|
-
import type { CompleteAddress } from '@aztec/aztec.js/addresses';
|
|
3
|
-
import type { ContractArtifact } from '@aztec/stdlib/abi';
|
|
4
|
-
import { StubBaseAccountContract } from './account_contract.js';
|
|
5
|
-
/**
|
|
6
|
-
* Lazily loads the contract artifact
|
|
7
|
-
* @returns The contract artifact for the Stub account contract
|
|
8
|
-
*/
|
|
9
|
-
export declare function getStubAccountContractArtifact(): Promise<ContractArtifact>;
|
|
10
|
-
/**
|
|
11
|
-
* Account contract that authenticates transactions using Stub signatures
|
|
12
|
-
* verified against a Grumpkin public key stored in an immutable encrypted note.
|
|
13
|
-
* Lazily loads the contract artifact
|
|
14
|
-
*/
|
|
15
|
-
export declare class StubAccountContract extends StubBaseAccountContract {
|
|
16
|
-
constructor();
|
|
17
|
-
getContractArtifact(): Promise<ContractArtifact>;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Creates a stub account that impersonates the one with the provided originalAddress.
|
|
21
|
-
* @param originalAddress - The address of the account to stub
|
|
22
|
-
* @returns A stub account that can be used for kernelless simulations
|
|
23
|
-
*/
|
|
24
|
-
export declare function createStubAccount(originalAddress: CompleteAddress): BaseAccount;
|
|
25
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGF6eS5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3N0dWIvbGF6eS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDdEQsT0FBTyxLQUFLLEVBQUUsZUFBZSxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFFakUsT0FBTyxLQUFLLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUcxRCxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUVoRTs7O0dBR0c7QUFDSCx3QkFBc0IsOEJBQThCLDhCQVFuRDtBQUVEOzs7O0dBSUc7QUFDSCxxQkFBYSxtQkFBb0IsU0FBUSx1QkFBdUI7SUFDOUQsY0FFQztJQUVRLG1CQUFtQixJQUFJLE9BQU8sQ0FBQyxnQkFBZ0IsQ0FBQyxDQUV4RDtDQUNGO0FBRUQ7Ozs7R0FJRztBQUNILHdCQUFnQixpQkFBaUIsQ0FBQyxlQUFlLEVBQUUsZUFBZSxlQVFqRSJ9
|
package/dest/stub/lazy.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lazy.d.ts","sourceRoot":"","sources":["../../src/stub/lazy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAEhE;;;GAGG;AACH,wBAAsB,8BAA8B,8BAQnD;AAED;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,uBAAuB;IAC9D,cAEC;IAEQ,mBAAmB,IAAI,OAAO,CAAC,gBAAgB,CAAC,CAExD;CACF;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,eAAe,EAAE,eAAe,eAQjE"}
|
package/dest/stub/lazy.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { BaseAccount } from '@aztec/aztec.js/account';
|
|
2
|
-
import { DefaultAccountEntrypoint } from '@aztec/entrypoints/account';
|
|
3
|
-
import { loadContractArtifact } from '@aztec/stdlib/abi';
|
|
4
|
-
import { StubBaseAccountContract } from './account_contract.js';
|
|
5
|
-
/**
|
|
6
|
-
* Lazily loads the contract artifact
|
|
7
|
-
* @returns The contract artifact for the Stub account contract
|
|
8
|
-
*/ export async function getStubAccountContractArtifact() {
|
|
9
|
-
// Cannot assert this import as it's incompatible with bundlers like vite
|
|
10
|
-
// https://github.com/vitejs/vite/issues/19095#issuecomment-2566074352
|
|
11
|
-
// Even if now supported by al major browsers, the MIME type is replaced with
|
|
12
|
-
// "text/javascript"
|
|
13
|
-
// In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
|
|
14
|
-
const { default: StubAccountContractJson } = await import('../../artifacts/SimulatedAccount.json');
|
|
15
|
-
return loadContractArtifact(StubAccountContractJson);
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Account contract that authenticates transactions using Stub signatures
|
|
19
|
-
* verified against a Grumpkin public key stored in an immutable encrypted note.
|
|
20
|
-
* Lazily loads the contract artifact
|
|
21
|
-
*/ export class StubAccountContract extends StubBaseAccountContract {
|
|
22
|
-
constructor(){
|
|
23
|
-
super();
|
|
24
|
-
}
|
|
25
|
-
getContractArtifact() {
|
|
26
|
-
return getStubAccountContractArtifact();
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Creates a stub account that impersonates the one with the provided originalAddress.
|
|
31
|
-
* @param originalAddress - The address of the account to stub
|
|
32
|
-
* @returns A stub account that can be used for kernelless simulations
|
|
33
|
-
*/ export function createStubAccount(originalAddress) {
|
|
34
|
-
const accountContract = new StubAccountContract();
|
|
35
|
-
const authWitnessProvider = accountContract.getAuthWitnessProvider(originalAddress);
|
|
36
|
-
return new BaseAccount(new DefaultAccountEntrypoint(originalAddress.address, authWitnessProvider), authWitnessProvider, originalAddress);
|
|
37
|
-
}
|
package/src/stub/index.ts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { BaseAccount } from '@aztec/aztec.js/account';
|
|
2
|
-
import type { CompleteAddress } from '@aztec/aztec.js/addresses';
|
|
3
|
-
import { DefaultAccountEntrypoint } from '@aztec/entrypoints/account';
|
|
4
|
-
import type { ContractArtifact } from '@aztec/stdlib/abi';
|
|
5
|
-
import { loadContractArtifact } from '@aztec/stdlib/abi';
|
|
6
|
-
import type { NoirCompiledContract } from '@aztec/stdlib/noir';
|
|
7
|
-
|
|
8
|
-
import SimulatedAccountContract from '../../artifacts/SimulatedAccount.json' with { type: 'json' };
|
|
9
|
-
import { StubBaseAccountContract } from './account_contract.js';
|
|
10
|
-
|
|
11
|
-
export const StubAccountContractArtifact = loadContractArtifact(SimulatedAccountContract as NoirCompiledContract);
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Stub account contract
|
|
15
|
-
* Eagerly loads the contract artifact
|
|
16
|
-
*/
|
|
17
|
-
export class StubAccountContract extends StubBaseAccountContract {
|
|
18
|
-
constructor() {
|
|
19
|
-
super();
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
override getContractArtifact(): Promise<ContractArtifact> {
|
|
23
|
-
return Promise.resolve(StubAccountContractArtifact);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Creates a stub account that impersonates the one with the provided originalAddress.
|
|
29
|
-
* @param originalAddress - The address of the account to stub
|
|
30
|
-
* @returns A stub account that can be used for kernelless simulations
|
|
31
|
-
*/
|
|
32
|
-
export function createStubAccount(originalAddress: CompleteAddress) {
|
|
33
|
-
const accountContract = new StubAccountContract();
|
|
34
|
-
const authWitnessProvider = accountContract.getAuthWitnessProvider(originalAddress);
|
|
35
|
-
return new BaseAccount(
|
|
36
|
-
new DefaultAccountEntrypoint(originalAddress.address, authWitnessProvider),
|
|
37
|
-
authWitnessProvider,
|
|
38
|
-
originalAddress,
|
|
39
|
-
);
|
|
40
|
-
}
|
package/src/stub/lazy.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { BaseAccount } from '@aztec/aztec.js/account';
|
|
2
|
-
import type { CompleteAddress } from '@aztec/aztec.js/addresses';
|
|
3
|
-
import { DefaultAccountEntrypoint } from '@aztec/entrypoints/account';
|
|
4
|
-
import type { ContractArtifact } from '@aztec/stdlib/abi';
|
|
5
|
-
import { loadContractArtifact } from '@aztec/stdlib/abi';
|
|
6
|
-
|
|
7
|
-
import { StubBaseAccountContract } from './account_contract.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Lazily loads the contract artifact
|
|
11
|
-
* @returns The contract artifact for the Stub account contract
|
|
12
|
-
*/
|
|
13
|
-
export async function getStubAccountContractArtifact() {
|
|
14
|
-
// Cannot assert this import as it's incompatible with bundlers like vite
|
|
15
|
-
// https://github.com/vitejs/vite/issues/19095#issuecomment-2566074352
|
|
16
|
-
// Even if now supported by al major browsers, the MIME type is replaced with
|
|
17
|
-
// "text/javascript"
|
|
18
|
-
// In the meantime, this lazy import is INCOMPATIBLE WITH NODEJS
|
|
19
|
-
const { default: StubAccountContractJson } = await import('../../artifacts/SimulatedAccount.json');
|
|
20
|
-
return loadContractArtifact(StubAccountContractJson);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Account contract that authenticates transactions using Stub signatures
|
|
25
|
-
* verified against a Grumpkin public key stored in an immutable encrypted note.
|
|
26
|
-
* Lazily loads the contract artifact
|
|
27
|
-
*/
|
|
28
|
-
export class StubAccountContract extends StubBaseAccountContract {
|
|
29
|
-
constructor() {
|
|
30
|
-
super();
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
override getContractArtifact(): Promise<ContractArtifact> {
|
|
34
|
-
return getStubAccountContractArtifact();
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Creates a stub account that impersonates the one with the provided originalAddress.
|
|
40
|
-
* @param originalAddress - The address of the account to stub
|
|
41
|
-
* @returns A stub account that can be used for kernelless simulations
|
|
42
|
-
*/
|
|
43
|
-
export function createStubAccount(originalAddress: CompleteAddress) {
|
|
44
|
-
const accountContract = new StubAccountContract();
|
|
45
|
-
const authWitnessProvider = accountContract.getAuthWitnessProvider(originalAddress);
|
|
46
|
-
return new BaseAccount(
|
|
47
|
-
new DefaultAccountEntrypoint(originalAddress.address, authWitnessProvider),
|
|
48
|
-
authWitnessProvider,
|
|
49
|
-
originalAddress,
|
|
50
|
-
);
|
|
51
|
-
}
|
|
File without changes
|