@aztec/archiver 0.67.1-devnet → 0.68.0

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.
Files changed (27) hide show
  1. package/dest/archiver/archiver.d.ts +2 -3
  2. package/dest/archiver/archiver.d.ts.map +1 -1
  3. package/dest/archiver/archiver.js +18 -16
  4. package/dest/archiver/archiver_store.d.ts +2 -3
  5. package/dest/archiver/archiver_store.d.ts.map +1 -1
  6. package/dest/archiver/instrumentation.d.ts +2 -0
  7. package/dest/archiver/instrumentation.d.ts.map +1 -1
  8. package/dest/archiver/instrumentation.js +8 -1
  9. package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts +3 -4
  10. package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts.map +1 -1
  11. package/dest/archiver/kv_archiver_store/kv_archiver_store.js +9 -17
  12. package/dest/archiver/memory_archiver_store/memory_archiver_store.d.ts +4 -5
  13. package/dest/archiver/memory_archiver_store/memory_archiver_store.d.ts.map +1 -1
  14. package/dest/archiver/memory_archiver_store/memory_archiver_store.js +8 -15
  15. package/dest/factory.d.ts.map +1 -1
  16. package/dest/factory.js +9 -2
  17. package/package.json +14 -14
  18. package/src/archiver/archiver.ts +19 -17
  19. package/src/archiver/archiver_store.ts +2 -4
  20. package/src/archiver/instrumentation.ts +10 -0
  21. package/src/archiver/kv_archiver_store/kv_archiver_store.ts +8 -15
  22. package/src/archiver/memory_archiver_store/memory_archiver_store.ts +9 -19
  23. package/src/factory.ts +10 -1
  24. package/dest/archiver/kv_archiver_store/contract_artifacts_store.d.ts +0 -10
  25. package/dest/archiver/kv_archiver_store/contract_artifacts_store.d.ts.map +0 -1
  26. package/dest/archiver/kv_archiver_store/contract_artifacts_store.js +0 -19
  27. package/src/archiver/kv_archiver_store/contract_artifacts_store.ts +0 -22
@@ -1,19 +0,0 @@
1
- var _ContractArtifactsStore_contractArtifacts;
2
- import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
3
- import { contractArtifactFromBuffer, contractArtifactToBuffer } from '@aztec/types/abi';
4
- export class ContractArtifactsStore {
5
- constructor(db) {
6
- _ContractArtifactsStore_contractArtifacts.set(this, void 0);
7
- __classPrivateFieldSet(this, _ContractArtifactsStore_contractArtifacts, db.openMap('archiver_contract_artifacts'), "f");
8
- }
9
- addContractArtifact(address, contractArtifact) {
10
- return __classPrivateFieldGet(this, _ContractArtifactsStore_contractArtifacts, "f").set(address.toString(), contractArtifactToBuffer(contractArtifact));
11
- }
12
- getContractArtifact(address) {
13
- const contractArtifact = __classPrivateFieldGet(this, _ContractArtifactsStore_contractArtifacts, "f").get(address.toString());
14
- // TODO(@spalladino): AztecMap lies and returns Uint8Arrays instead of Buffers, hence the extra Buffer.from.
15
- return contractArtifact && contractArtifactFromBuffer(Buffer.from(contractArtifact));
16
- }
17
- }
18
- _ContractArtifactsStore_contractArtifacts = new WeakMap();
19
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udHJhY3RfYXJ0aWZhY3RzX3N0b3JlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2FyY2hpdmVyL2t2X2FyY2hpdmVyX3N0b3JlL2NvbnRyYWN0X2FydGlmYWN0c19zdG9yZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUdBLE9BQU8sRUFBRSwwQkFBMEIsRUFBRSx3QkFBd0IsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBRXhGLE1BQU0sT0FBTyxzQkFBc0I7SUFHakMsWUFBWSxFQUFnQjtRQUY1Qiw0REFBNkM7UUFHM0MsdUJBQUEsSUFBSSw2Q0FBc0IsRUFBRSxDQUFDLE9BQU8sQ0FBQyw2QkFBNkIsQ0FBQyxNQUFBLENBQUM7SUFDdEUsQ0FBQztJQUVELG1CQUFtQixDQUFDLE9BQXFCLEVBQUUsZ0JBQWtDO1FBQzNFLE9BQU8sdUJBQUEsSUFBSSxpREFBbUIsQ0FBQyxHQUFHLENBQUMsT0FBTyxDQUFDLFFBQVEsRUFBRSxFQUFFLHdCQUF3QixDQUFDLGdCQUFnQixDQUFDLENBQUMsQ0FBQztJQUNyRyxDQUFDO0lBRUQsbUJBQW1CLENBQUMsT0FBcUI7UUFDdkMsTUFBTSxnQkFBZ0IsR0FBRyx1QkFBQSxJQUFJLGlEQUFtQixDQUFDLEdBQUcsQ0FBQyxPQUFPLENBQUMsUUFBUSxFQUFFLENBQUMsQ0FBQztRQUN6RSw0R0FBNEc7UUFDNUcsT0FBTyxnQkFBZ0IsSUFBSSwwQkFBMEIsQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLGdCQUFnQixDQUFDLENBQUMsQ0FBQztJQUN2RixDQUFDO0NBQ0YifQ==
@@ -1,22 +0,0 @@
1
- import { type AztecAddress } from '@aztec/circuits.js';
2
- import { type ContractArtifact } from '@aztec/foundation/abi';
3
- import { type AztecKVStore, type AztecMap } from '@aztec/kv-store';
4
- import { contractArtifactFromBuffer, contractArtifactToBuffer } from '@aztec/types/abi';
5
-
6
- export class ContractArtifactsStore {
7
- #contractArtifacts: AztecMap<string, Buffer>;
8
-
9
- constructor(db: AztecKVStore) {
10
- this.#contractArtifacts = db.openMap('archiver_contract_artifacts');
11
- }
12
-
13
- addContractArtifact(address: AztecAddress, contractArtifact: ContractArtifact): Promise<void> {
14
- return this.#contractArtifacts.set(address.toString(), contractArtifactToBuffer(contractArtifact));
15
- }
16
-
17
- getContractArtifact(address: AztecAddress): ContractArtifact | undefined {
18
- const contractArtifact = this.#contractArtifacts.get(address.toString());
19
- // TODO(@spalladino): AztecMap lies and returns Uint8Arrays instead of Buffers, hence the extra Buffer.from.
20
- return contractArtifact && contractArtifactFromBuffer(Buffer.from(contractArtifact));
21
- }
22
- }