@aztec/aztec.js 3.0.0-nightly.20251022 → 3.0.0-nightly.20251024
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/account/account.d.ts +2 -2
- package/dest/account/account_contract.d.ts +1 -1
- package/dest/account/account_contract.d.ts.map +1 -1
- package/dest/api/abi.d.ts +1 -0
- package/dest/api/abi.d.ts.map +1 -1
- package/dest/api/addresses.d.ts +1 -0
- package/dest/api/addresses.d.ts.map +1 -1
- package/dest/api/addresses.js +1 -0
- package/dest/api/block.d.ts +3 -0
- package/dest/api/block.d.ts.map +1 -0
- package/dest/api/block.js +2 -0
- package/dest/api/contract.d.ts +2 -4
- package/dest/api/contract.d.ts.map +1 -1
- package/dest/api/contract.js +1 -2
- package/dest/api/crypto.d.ts +2 -0
- package/dest/api/crypto.d.ts.map +1 -0
- package/dest/api/crypto.js +1 -0
- package/dest/api/keys.d.ts +4 -0
- package/dest/api/keys.d.ts.map +1 -0
- package/dest/api/keys.js +3 -0
- package/dest/api/log.d.ts +1 -0
- package/dest/api/log.d.ts.map +1 -1
- package/dest/api/log.js +1 -0
- package/dest/api/messaging.d.ts +3 -0
- package/dest/api/messaging.d.ts.map +1 -0
- package/dest/api/messaging.js +2 -0
- package/dest/api/node.d.ts +21 -0
- package/dest/api/node.d.ts.map +1 -0
- package/dest/api/node.js +18 -0
- package/dest/api/note.d.ts +2 -0
- package/dest/api/note.d.ts.map +1 -0
- package/dest/api/note.js +1 -0
- package/dest/api/protocol.d.ts +3 -0
- package/dest/api/protocol.d.ts.map +1 -0
- package/dest/api/protocol.js +2 -0
- package/dest/api/trees.d.ts +3 -0
- package/dest/api/trees.d.ts.map +1 -0
- package/dest/api/trees.js +2 -0
- package/dest/api/tx.d.ts +2 -0
- package/dest/api/tx.d.ts.map +1 -0
- package/dest/api/tx.js +1 -0
- package/dest/api/utils.d.ts +10 -4
- package/dest/api/utils.d.ts.map +1 -1
- package/dest/api/utils.js +10 -3
- package/dest/api/wallet.d.ts +3 -1
- package/dest/api/wallet.d.ts.map +1 -1
- package/dest/api/wallet.js +3 -1
- package/dest/contract/base_contract_interaction.d.ts +3 -18
- package/dest/contract/base_contract_interaction.d.ts.map +1 -1
- package/dest/contract/base_contract_interaction.js +5 -26
- package/dest/contract/contract_base.d.ts +1 -1
- package/dest/contract/contract_base.d.ts.map +1 -1
- package/dest/contract/deploy_method.d.ts +2 -10
- package/dest/contract/deploy_method.d.ts.map +1 -1
- package/dest/contract/deploy_method.js +4 -16
- package/dest/contract/wait_for_proven.d.ts +1 -1
- package/dest/contract/wait_for_proven.d.ts.map +1 -1
- package/dest/utils/authwit.d.ts +0 -7
- package/dest/utils/authwit.d.ts.map +1 -1
- package/dest/utils/authwit.js +0 -11
- package/dest/wallet/account_manager.d.ts +1 -1
- package/dest/wallet/account_manager.d.ts.map +1 -1
- package/dest/wallet/base_wallet.d.ts +11 -5
- package/dest/wallet/base_wallet.d.ts.map +1 -1
- package/dest/wallet/base_wallet.js +18 -9
- package/dest/wallet/wallet.d.ts +20 -10
- package/dest/wallet/wallet.d.ts.map +1 -1
- package/dest/wallet/wallet.js +17 -9
- package/package.json +21 -17
- package/src/api/abi.ts +11 -0
- package/src/api/addresses.ts +1 -0
- package/src/api/block.ts +2 -0
- package/src/api/contract.ts +9 -3
- package/src/api/crypto.ts +1 -0
- package/src/api/keys.ts +8 -0
- package/src/api/log.ts +1 -0
- package/src/api/messaging.ts +2 -0
- package/src/api/node.ts +20 -0
- package/src/api/note.ts +1 -0
- package/src/api/protocol.ts +2 -0
- package/src/api/trees.ts +2 -0
- package/src/api/tx.ts +11 -0
- package/src/api/utils.ts +12 -12
- package/src/api/wallet.ts +28 -7
- package/src/contract/base_contract_interaction.ts +6 -36
- package/src/contract/deploy_method.ts +6 -27
- package/src/contract/wait_for_proven.ts +1 -1
- package/src/utils/authwit.ts +0 -10
- package/src/wallet/base_wallet.ts +16 -12
- package/src/wallet/wallet.ts +29 -13
- package/dest/api/interfaces.d.ts +0 -2
- package/dest/api/interfaces.d.ts.map +0 -1
- package/dest/api/interfaces.js +0 -1
- package/dest/api/log_id.d.ts +0 -2
- package/dest/api/log_id.d.ts.map +0 -1
- package/dest/api/log_id.js +0 -1
- package/dest/api/tx_hash.d.ts +0 -2
- package/dest/api/tx_hash.d.ts.map +0 -1
- package/dest/api/tx_hash.js +0 -1
- package/dest/contract/deploy_proven_tx.d.ts +0 -21
- package/dest/contract/deploy_proven_tx.d.ts.map +0 -1
- package/dest/contract/deploy_proven_tx.js +0 -21
- package/dest/contract/proven_tx.d.ts +0 -21
- package/dest/contract/proven_tx.d.ts.map +0 -1
- package/dest/contract/proven_tx.js +0 -23
- package/dest/index.d.ts +0 -58
- package/dest/index.d.ts.map +0 -1
- package/dest/index.js +0 -61
- package/src/api/interfaces.ts +0 -1
- package/src/api/log_id.ts +0 -1
- package/src/api/tx_hash.ts +0 -1
- package/src/contract/deploy_proven_tx.ts +0 -45
- package/src/contract/proven_tx.ts +0 -36
- package/src/index.ts +0 -84
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
2
|
-
import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
3
|
-
import type { OffchainEffect, ProvingStats, TxProvingResult } from '@aztec/stdlib/tx';
|
|
4
|
-
import { Tx } from '@aztec/stdlib/tx';
|
|
5
|
-
|
|
6
|
-
import type { Wallet } from '../wallet/wallet.js';
|
|
7
|
-
import type { Contract } from './contract.js';
|
|
8
|
-
import { DeploySentTx } from './deploy_sent_tx.js';
|
|
9
|
-
import { ProvenTx } from './proven_tx.js';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* A proven transaction that can be sent to the network. Returned by the `prove` method of a contract deployment.
|
|
13
|
-
*/
|
|
14
|
-
export class DeployProvenTx<TContract extends Contract = Contract> extends ProvenTx {
|
|
15
|
-
private constructor(
|
|
16
|
-
wallet: Wallet,
|
|
17
|
-
tx: Tx,
|
|
18
|
-
offchainEffects: OffchainEffect[],
|
|
19
|
-
private postDeployCtor: (address: AztecAddress, wallet: Wallet) => Promise<TContract>,
|
|
20
|
-
private instanceGetter: () => Promise<ContractInstanceWithAddress>,
|
|
21
|
-
stats?: ProvingStats,
|
|
22
|
-
) {
|
|
23
|
-
super(wallet, tx, offchainEffects, stats);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
static async fromProvingResult<TContract extends Contract = Contract>(
|
|
27
|
-
wallet: Wallet,
|
|
28
|
-
txProvingResult: TxProvingResult,
|
|
29
|
-
postDeployCtor: (address: AztecAddress, wallet: Wallet) => Promise<TContract>,
|
|
30
|
-
instanceGetter: () => Promise<ContractInstanceWithAddress>,
|
|
31
|
-
stats?: ProvingStats,
|
|
32
|
-
): Promise<DeployProvenTx<TContract>> {
|
|
33
|
-
const tx = await txProvingResult.toTx();
|
|
34
|
-
return new DeployProvenTx(wallet, tx, txProvingResult.getOffchainEffects(), postDeployCtor, instanceGetter, stats);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Sends the transaction to the network via the provided wallet.
|
|
39
|
-
*/
|
|
40
|
-
public override send(): DeploySentTx<TContract> {
|
|
41
|
-
const sendTx = () => this.wallet.sendTx(this);
|
|
42
|
-
|
|
43
|
-
return new DeploySentTx(this.wallet, sendTx, this.postDeployCtor, this.instanceGetter);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { type OffchainEffect, type ProvingStats, Tx } from '@aztec/stdlib/tx';
|
|
2
|
-
|
|
3
|
-
import type { Wallet } from '../wallet/wallet.js';
|
|
4
|
-
import { SentTx } from './sent_tx.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* A proven transaction that can be sent to the network. Returned by the `prove` method of a contract interaction.
|
|
8
|
-
*/
|
|
9
|
-
export class ProvenTx extends Tx {
|
|
10
|
-
#wallet: Wallet;
|
|
11
|
-
|
|
12
|
-
constructor(
|
|
13
|
-
wallet: Wallet,
|
|
14
|
-
tx: Tx,
|
|
15
|
-
/** The offchain effects emitted during the execution of the transaction. */
|
|
16
|
-
public offchainEffects: OffchainEffect[],
|
|
17
|
-
// eslint-disable-next-line jsdoc/require-jsdoc
|
|
18
|
-
public stats?: ProvingStats,
|
|
19
|
-
) {
|
|
20
|
-
super(tx.txHash, tx.data, tx.clientIvcProof, tx.contractClassLogFields, tx.publicFunctionCalldata);
|
|
21
|
-
this.#wallet = wallet;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
protected get wallet(): Wallet {
|
|
25
|
-
return this.#wallet;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Sends the transaction to the network via the provided wallet.
|
|
30
|
-
*/
|
|
31
|
-
public send(): SentTx {
|
|
32
|
-
const sendTx = () => this.#wallet.sendTx(this);
|
|
33
|
-
|
|
34
|
-
return new SentTx(this.#wallet, sendTx);
|
|
35
|
-
}
|
|
36
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This is our public api.
|
|
3
|
-
* Do NOT "export * from ..." here.
|
|
4
|
-
* Everything here should be explicit, to ensure we can clearly see everything we're exposing to the world.
|
|
5
|
-
* If it's exposed, people will use it, and then we can't remove/change the api without breaking client code.
|
|
6
|
-
* At the time of writing we overexpose things that should only be internal.
|
|
7
|
-
*
|
|
8
|
-
* TODO: Review and narrow scope of public api.
|
|
9
|
-
* We should also consider exposing subsections of the api via package.json exports, like we do with foundation.
|
|
10
|
-
* This can allow consumers to import much smaller parts of the library to incur less overhead.
|
|
11
|
-
* It will also allow web bundlers do perform intelligent chunking of bundles etc.
|
|
12
|
-
* Some work as been done on this within the api folder, providing the alternative import style of e.g.:
|
|
13
|
-
* ```typescript
|
|
14
|
-
* import { TxHash } from '@aztec.js/tx_hash'
|
|
15
|
-
* import { type ContractArtifact, type FunctionArtifact, FunctionSelector } from '@aztec/aztec.js/abi';
|
|
16
|
-
* import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
17
|
-
* import { EthAddress } from '@aztec/aztec.js/eth_address';
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* TODO: Ultimately reimplement this mega exporter by mega exporting a granular api (then deprecate it).
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
export { Fq, Fr, Point, GrumpkinScalar } from '@aztec/foundation/fields';
|
|
24
|
-
|
|
25
|
-
export { SiblingPath } from '@aztec/foundation/trees';
|
|
26
|
-
|
|
27
|
-
export { INITIAL_L2_BLOCK_NUM } from '@aztec/constants';
|
|
28
|
-
|
|
29
|
-
export { MerkleTreeId, merkleTreeIds } from '@aztec/stdlib/trees';
|
|
30
|
-
export { type PublicKey, PublicKeys } from '@aztec/stdlib/keys';
|
|
31
|
-
export { computeSecretHash } from '@aztec/stdlib/hash';
|
|
32
|
-
export {
|
|
33
|
-
computeAppNullifierSecretKey,
|
|
34
|
-
deriveKeys,
|
|
35
|
-
deriveMasterIncomingViewingSecretKey,
|
|
36
|
-
deriveMasterNullifierSecretKey,
|
|
37
|
-
} from '@aztec/stdlib/keys';
|
|
38
|
-
export { getTimestampRangeForEpoch } from '@aztec/stdlib/epoch-helpers';
|
|
39
|
-
export {
|
|
40
|
-
Tx,
|
|
41
|
-
TxExecutionRequest,
|
|
42
|
-
TxHash,
|
|
43
|
-
TxReceipt,
|
|
44
|
-
TxStatus,
|
|
45
|
-
Capsule,
|
|
46
|
-
HashedValues,
|
|
47
|
-
GlobalVariables,
|
|
48
|
-
} from '@aztec/stdlib/tx';
|
|
49
|
-
export { Body, L2Block } from '@aztec/stdlib/block';
|
|
50
|
-
export { LogId, type LogFilter } from '@aztec/stdlib/logs';
|
|
51
|
-
export { L1ToL2Message, L2Actor, L1Actor } from '@aztec/stdlib/messaging';
|
|
52
|
-
export { UniqueNote, ExtendedNote, Comparator, Note } from '@aztec/stdlib/note';
|
|
53
|
-
|
|
54
|
-
export { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
55
|
-
|
|
56
|
-
// TODO: These kinds of things have no place on our public api.
|
|
57
|
-
// External devs will almost certainly have their own methods of doing these things.
|
|
58
|
-
// If we want to use them in our own "aztec.js consuming code", import them from foundation as needed.
|
|
59
|
-
export { toBigIntBE } from '@aztec/foundation/bigint-buffer';
|
|
60
|
-
export { sha256, Grumpkin, Schnorr } from '@aztec/foundation/crypto';
|
|
61
|
-
export { makeFetch } from '@aztec/foundation/json-rpc/client';
|
|
62
|
-
export { retry, retryUntil } from '@aztec/foundation/retry';
|
|
63
|
-
export { to2Fields, toBigInt } from '@aztec/foundation/serialize';
|
|
64
|
-
export { sleep } from '@aztec/foundation/sleep';
|
|
65
|
-
export { elapsed } from '@aztec/foundation/timer';
|
|
66
|
-
export { type FieldsOf } from '@aztec/foundation/types';
|
|
67
|
-
export { fileURLToPath } from '@aztec/foundation/url';
|
|
68
|
-
|
|
69
|
-
// Start of section that exports public api via granular api.
|
|
70
|
-
// Here you *can* do `export *` as the granular api defacto exports things explicitly.
|
|
71
|
-
// This entire index file will be deprecated at some point after we're satisfied.
|
|
72
|
-
export * from './api/abi.js';
|
|
73
|
-
export * from './api/authorization.js';
|
|
74
|
-
export * from './api/account.js';
|
|
75
|
-
export * from './api/addresses.js';
|
|
76
|
-
export * from './api/deployment.js';
|
|
77
|
-
export * from './api/ethereum.js';
|
|
78
|
-
export * from './api/events.js';
|
|
79
|
-
export * from './api/eth_address.js';
|
|
80
|
-
export * from './api/fee.js';
|
|
81
|
-
export * from './api/log.js';
|
|
82
|
-
export * from './api/contract.js';
|
|
83
|
-
export * from './api/utils.js';
|
|
84
|
-
export * from './api/wallet.js';
|