@hyperlane-xyz/aleo-sdk 28.1.0 → 29.0.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook-artifact-manager.d.ts","sourceRoot":"","sources":["../../src/hook/hook-artifact-manager.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,QAAQ,EACb,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,
|
|
1
|
+
{"version":3,"file":"hook-artifact-manager.d.ts","sourceRoot":"","sources":["../../src/hook/hook-artifact-manager.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,QAAQ,EACb,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAG5B,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AASvD;;;;;;;;;;;GAWG;AACH,qBAAa,uBAAwB,YAAW,uBAAuB;IAEnE,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC;gBADf,UAAU,EAAE,oBAAoB,EAChC,cAAc,CAAC,EAAE,MAAM,YAAA;IAGpC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAiB9D,YAAY,CAAC,CAAC,SAAS,QAAQ,EAC7B,IAAI,EAAE,CAAC,GACN,cAAc,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC;IAoBjE,YAAY,CAAC,CAAC,SAAS,QAAQ,EAC7B,IAAI,EAAE,CAAC,EACP,MAAM,EAAE,UAAU,GACjB,cAAc,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC;CAsBlE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AltVM } from '@hyperlane-xyz/provider-sdk';
|
|
2
|
-
import { altVmHookTypeToProviderHookType, } from '@hyperlane-xyz/provider-sdk/hook';
|
|
2
|
+
import { altVmHookTypeToProviderHookType, throwUnsupportedHookType, } from '@hyperlane-xyz/provider-sdk/hook';
|
|
3
3
|
import { assert } from '@hyperlane-xyz/utils';
|
|
4
4
|
import { getHookType } from './hook-query.js';
|
|
5
5
|
import { AleoIgpHookReader, AleoIgpHookWriter } from './igp-hook.js';
|
|
@@ -26,6 +26,10 @@ export class AleoHookArtifactManager {
|
|
|
26
26
|
async readHook(address) {
|
|
27
27
|
// Detect hook type first
|
|
28
28
|
const aleoHookType = await getHookType(this.aleoClient, address);
|
|
29
|
+
if (aleoHookType === AltVM.HookType.CUSTOM ||
|
|
30
|
+
aleoHookType === AltVM.HookType.PAUSABLE) {
|
|
31
|
+
return throwUnsupportedHookType(aleoHookType, 'Aleo');
|
|
32
|
+
}
|
|
29
33
|
// Get the appropriate reader and read the hook
|
|
30
34
|
const reader = this.createReader(altVmHookTypeToProviderHookType(aleoHookType));
|
|
31
35
|
return reader.read(address);
|
|
@@ -35,8 +39,11 @@ export class AleoHookArtifactManager {
|
|
|
35
39
|
[AltVM.HookType.MERKLE_TREE]: () => new AleoMerkleTreeHookReader(this.aleoClient),
|
|
36
40
|
[AltVM.HookType.INTERCHAIN_GAS_PAYMASTER]: () => new AleoIgpHookReader(this.aleoClient),
|
|
37
41
|
};
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
const reader = readers[type];
|
|
43
|
+
if (!reader) {
|
|
44
|
+
return throwUnsupportedHookType(type, 'Aleo');
|
|
45
|
+
}
|
|
46
|
+
return reader();
|
|
40
47
|
}
|
|
41
48
|
createWriter(type, signer) {
|
|
42
49
|
const mailboxAddress = this.mailboxAddress;
|
|
@@ -45,8 +52,11 @@ export class AleoHookArtifactManager {
|
|
|
45
52
|
[AltVM.HookType.MERKLE_TREE]: () => new AleoMerkleTreeHookWriter(this.aleoClient, signer, mailboxAddress),
|
|
46
53
|
[AltVM.HookType.INTERCHAIN_GAS_PAYMASTER]: () => new AleoIgpHookWriter(this.aleoClient, signer, mailboxAddress),
|
|
47
54
|
};
|
|
48
|
-
|
|
49
|
-
|
|
55
|
+
const writer = writers[type];
|
|
56
|
+
if (!writer) {
|
|
57
|
+
return throwUnsupportedHookType(type, 'Aleo');
|
|
58
|
+
}
|
|
59
|
+
return writer();
|
|
50
60
|
}
|
|
51
61
|
}
|
|
52
62
|
//# sourceMappingURL=hook-artifact-manager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook-artifact-manager.js","sourceRoot":"","sources":["../../src/hook/hook-artifact-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAKpD,OAAO,EAML,+BAA+B,
|
|
1
|
+
{"version":3,"file":"hook-artifact-manager.js","sourceRoot":"","sources":["../../src/hook/hook-artifact-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAKpD,OAAO,EAML,+BAA+B,EAC/B,wBAAwB,GACzB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAK9C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EACL,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAE/B;;;;;;;;;;;GAWG;AACH,MAA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,EAAE,8CAA8C,CAAC,CAAC;QAEvE,MAAM,OAAO,GAKR;YACH,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,GAAG,EAAE,CACjC,IAAI,wBAAwB,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,CAAC;YACvE,CAAC,KAAK,CAAC,QAAQ,CAAC,wBAAwB,CAAC,EAAE,GAAG,EAAE,CAC9C,IAAI,iBAAiB,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,CAAC;SACjE,CAAC;QAEF,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,wBAAwB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAChD,CAAC;QACD,OAAO,MAAM,EAAE,CAAC;IAClB,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperlane-xyz/aleo-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "29.0.1",
|
|
4
4
|
"description": "Hyperlane TypeScript SDK for the Aleo Hyperlane SDK module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aleo",
|
|
@@ -24,14 +24,15 @@
|
|
|
24
24
|
"@provablehq/sdk": "0.9.15",
|
|
25
25
|
"bignumber.js": "^9.1.1",
|
|
26
26
|
"unzipper": "^0.12.3",
|
|
27
|
-
"@hyperlane-xyz/provider-sdk": "4.1
|
|
28
|
-
"@hyperlane-xyz/utils": "
|
|
27
|
+
"@hyperlane-xyz/provider-sdk": "4.2.1",
|
|
28
|
+
"@hyperlane-xyz/utils": "29.0.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@eslint/js": "^9.39.2",
|
|
32
32
|
"@types/chai": "^4.3.11",
|
|
33
33
|
"@types/chai-as-promised": "^8",
|
|
34
34
|
"@types/mocha": "^10.0.1",
|
|
35
|
+
"@types/node": "^24.10.9",
|
|
35
36
|
"@types/unzipper": "^0",
|
|
36
37
|
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
37
38
|
"@typescript-eslint/parser": "^8.54.0",
|
|
@@ -47,10 +48,10 @@
|
|
|
47
48
|
"oxfmt": "^0.40.0",
|
|
48
49
|
"testcontainers": "11.12.0",
|
|
49
50
|
"ts-node": "^10.9.2",
|
|
50
|
-
"typescript": "
|
|
51
|
+
"typescript": "6.0.2",
|
|
51
52
|
"typescript-eslint": "^8.54.0",
|
|
52
|
-
"@hyperlane-xyz/eslint-config": "
|
|
53
|
-
"@hyperlane-xyz/tsconfig": "^
|
|
53
|
+
"@hyperlane-xyz/eslint-config": "29.0.1",
|
|
54
|
+
"@hyperlane-xyz/tsconfig": "^29.0.1"
|
|
54
55
|
},
|
|
55
56
|
"peerDependencies": {
|
|
56
57
|
"testcontainers": "11.12.0"
|