@dynamic-labs-sdk/aleo 1.54.1 → 1.56.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 (70) hide show
  1. package/dist/{InvalidAleoTransactionIdError-CZoNf2SE.esm.js → AleoInvalidTransactionError-BFlp9jCp.esm.js} +2 -23
  2. package/dist/AleoInvalidTransactionError-BFlp9jCp.esm.js.map +1 -0
  3. package/dist/{InvalidAleoTransactionIdError-DRDfoh4x.cjs → AleoInvalidTransactionError-D-V8l2Ka.cjs} +1 -28
  4. package/dist/AleoInvalidTransactionError-D-V8l2Ka.cjs.map +1 -0
  5. package/dist/AleoTransactionTimeoutError-C96vAQCH.cjs +67 -0
  6. package/dist/AleoTransactionTimeoutError-C96vAQCH.cjs.map +1 -0
  7. package/dist/AleoTransactionTimeoutError-DLK0ke2t.esm.js +56 -0
  8. package/dist/AleoTransactionTimeoutError-DLK0ke2t.esm.js.map +1 -0
  9. package/dist/InvalidAleoTransactionIdError-B96MGnE9.cjs +30 -0
  10. package/dist/InvalidAleoTransactionIdError-B96MGnE9.cjs.map +1 -0
  11. package/dist/InvalidAleoTransactionIdError-DTcA7Nkp.esm.js +25 -0
  12. package/dist/InvalidAleoTransactionIdError-DTcA7Nkp.esm.js.map +1 -0
  13. package/dist/bytesToHex-BAbtmw7Y.cjs +21 -0
  14. package/dist/bytesToHex-BAbtmw7Y.cjs.map +1 -0
  15. package/dist/bytesToHex-DmLyKVST.esm.js +15 -0
  16. package/dist/bytesToHex-DmLyKVST.esm.js.map +1 -0
  17. package/dist/{constants-BdMsNtLK.cjs → constants-CQe88cUR.cjs} +2 -2
  18. package/dist/{constants-BdMsNtLK.cjs.map → constants-CQe88cUR.cjs.map} +1 -1
  19. package/dist/{constants-QbsyjWKH.esm.js → constants-Db8ZRYoF.esm.js} +2 -2
  20. package/dist/{constants-QbsyjWKH.esm.js.map → constants-Db8ZRYoF.esm.js.map} +1 -1
  21. package/dist/errors/AleoTransactionStatusError/AleoTransactionStatusError.d.ts +20 -0
  22. package/dist/errors/AleoTransactionStatusError/AleoTransactionStatusError.d.ts.map +1 -0
  23. package/dist/errors/AleoTransactionStatusError/index.d.ts +2 -0
  24. package/dist/errors/AleoTransactionStatusError/index.d.ts.map +1 -0
  25. package/dist/errors/AleoTransactionTimeoutError/AleoTransactionTimeoutError.d.ts +20 -0
  26. package/dist/errors/AleoTransactionTimeoutError/AleoTransactionTimeoutError.d.ts.map +1 -0
  27. package/dist/errors/AleoTransactionTimeoutError/index.d.ts +2 -0
  28. package/dist/errors/AleoTransactionTimeoutError/index.d.ts.map +1 -0
  29. package/dist/exports/index.d.ts +2 -0
  30. package/dist/exports/index.d.ts.map +1 -1
  31. package/dist/exports/walletAdapters.d.ts +3 -0
  32. package/dist/exports/walletAdapters.d.ts.map +1 -0
  33. package/dist/{getNetworkByChainId-DvjKBrS1.cjs → getNetworkByChainId-CJ9fnI49.cjs} +2 -2
  34. package/dist/{getNetworkByChainId-DvjKBrS1.cjs.map → getNetworkByChainId-CJ9fnI49.cjs.map} +1 -1
  35. package/dist/{getNetworkByChainId-DWbDdrB8.esm.js → getNetworkByChainId-ryLoogNL.esm.js} +2 -2
  36. package/dist/{getNetworkByChainId-DWbDdrB8.esm.js.map → getNetworkByChainId-ryLoogNL.esm.js.map} +1 -1
  37. package/dist/index.cjs +8 -4
  38. package/dist/index.cjs.map +1 -1
  39. package/dist/index.esm.js +6 -4
  40. package/dist/index.esm.js.map +1 -1
  41. package/dist/{registerAleoNetworkProviderBuilder-CXROinhZ.esm.js → registerAleoNetworkProviderBuilder-BiSzOwmC.esm.js} +2 -2
  42. package/dist/{registerAleoNetworkProviderBuilder-CXROinhZ.esm.js.map → registerAleoNetworkProviderBuilder-BiSzOwmC.esm.js.map} +1 -1
  43. package/dist/{registerAleoNetworkProviderBuilder-Djt28lJh.cjs → registerAleoNetworkProviderBuilder-C2eIu0Bd.cjs} +2 -2
  44. package/dist/{registerAleoNetworkProviderBuilder-Djt28lJh.cjs.map → registerAleoNetworkProviderBuilder-C2eIu0Bd.cjs.map} +1 -1
  45. package/dist/tsconfig.lib.tsbuildinfo +1 -1
  46. package/dist/waas.cjs +11 -10
  47. package/dist/waas.cjs.map +1 -1
  48. package/dist/waas.esm.js +4 -3
  49. package/dist/waas.esm.js.map +1 -1
  50. package/dist/walletAdapters/addAleoWalletAdaptersExtension/addAleoWalletAdaptersExtension.d.ts +39 -0
  51. package/dist/walletAdapters/addAleoWalletAdaptersExtension/addAleoWalletAdaptersExtension.d.ts.map +1 -0
  52. package/dist/walletAdapters/addAleoWalletAdaptersExtension/index.d.ts +2 -0
  53. package/dist/walletAdapters/addAleoWalletAdaptersExtension/index.d.ts.map +1 -0
  54. package/dist/walletAdapters/aleoWalletAdapterConstructors.d.ts +13 -0
  55. package/dist/walletAdapters/aleoWalletAdapterConstructors.d.ts.map +1 -0
  56. package/dist/walletAdapters/utils/createWalletProviderForAleoWalletAdapter/createWalletProviderForAleoWalletAdapter.d.ts +35 -0
  57. package/dist/walletAdapters/utils/createWalletProviderForAleoWalletAdapter/createWalletProviderForAleoWalletAdapter.d.ts.map +1 -0
  58. package/dist/walletAdapters/utils/createWalletProviderForAleoWalletAdapter/index.d.ts +2 -0
  59. package/dist/walletAdapters/utils/createWalletProviderForAleoWalletAdapter/index.d.ts.map +1 -0
  60. package/dist/walletAdapters.cjs +290 -0
  61. package/dist/walletAdapters.cjs.map +1 -0
  62. package/dist/walletAdapters.esm.js +288 -0
  63. package/dist/walletAdapters.esm.js.map +1 -0
  64. package/dist/walletStandard.cjs +5 -17
  65. package/dist/walletStandard.cjs.map +1 -1
  66. package/dist/walletStandard.esm.js +4 -16
  67. package/dist/walletStandard.esm.js.map +1 -1
  68. package/package.json +13 -8
  69. package/dist/InvalidAleoTransactionIdError-CZoNf2SE.esm.js.map +0 -1
  70. package/dist/InvalidAleoTransactionIdError-DRDfoh4x.cjs.map +0 -1
@@ -25,26 +25,5 @@ var AleoInvalidTransactionError = class extends BaseError {
25
25
  };
26
26
 
27
27
  //#endregion
28
- //#region src/errors/InvalidAleoTransactionIdError/InvalidAleoTransactionIdError.ts
29
- /**
30
- * Thrown when an input meant to be an Aleo transaction id (`at1...`) does
31
- * not match the bech32 pattern. Carries the offending value on `txId` for
32
- * inclusion in error logs / UI surfaces.
33
- */
34
- var InvalidAleoTransactionIdError = class extends BaseError {
35
- txId;
36
- constructor(params) {
37
- super({
38
- cause: null,
39
- code: "invalid_aleo_transaction_id_error",
40
- docsUrl: null,
41
- name: "InvalidAleoTransactionIdError",
42
- shortMessage: `Invalid Aleo transaction id: ${params.txId}`
43
- });
44
- this.txId = params.txId;
45
- }
46
- };
47
-
48
- //#endregion
49
- export { AleoInvalidTransactionError as n, InvalidAleoTransactionIdError as t };
50
- //# sourceMappingURL=InvalidAleoTransactionIdError-CZoNf2SE.esm.js.map
28
+ export { AleoInvalidTransactionError as t };
29
+ //# sourceMappingURL=AleoInvalidTransactionError-BFlp9jCp.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AleoInvalidTransactionError-BFlp9jCp.esm.js","names":[],"sources":["../src/errors/AleoInvalidTransactionError/AleoInvalidTransactionError.ts"],"sourcesContent":["import { BaseError } from '@dynamic-labs-sdk/client';\n\n/**\n * Thrown when an Aleo transaction is malformed or contains invalid inputs\n * before it is submitted to the WaaS client.\n *\n * @example new AleoInvalidTransactionError({\n * code: 'aleo_transaction_no_transitions',\n * reason: 'transaction must contain at least one transition',\n * })\n * @see AleoFeatureUnsupportedError\n * @see InvalidAleoTransactionIdError\n */\nexport class AleoInvalidTransactionError extends BaseError {\n constructor(params: { code: string; reason: string }) {\n super({\n cause: null,\n code: params.code,\n docsUrl: null,\n name: 'AleoInvalidTransactionError',\n shortMessage: `Invalid Aleo transaction: ${params.reason}`,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAaA,IAAa,8BAAb,cAAiD,UAAU;CACzD,YAAY,QAA0C;AACpD,QAAM;GACJ,OAAO;GACP,MAAM,OAAO;GACb,SAAS;GACT,MAAM;GACN,cAAc,6BAA6B,OAAO;GACnD,CAAC"}
@@ -24,27 +24,6 @@ var AleoInvalidTransactionError = class extends _dynamic_labs_sdk_client.BaseErr
24
24
  }
25
25
  };
26
26
 
27
- //#endregion
28
- //#region src/errors/InvalidAleoTransactionIdError/InvalidAleoTransactionIdError.ts
29
- /**
30
- * Thrown when an input meant to be an Aleo transaction id (`at1...`) does
31
- * not match the bech32 pattern. Carries the offending value on `txId` for
32
- * inclusion in error logs / UI surfaces.
33
- */
34
- var InvalidAleoTransactionIdError = class extends _dynamic_labs_sdk_client.BaseError {
35
- txId;
36
- constructor(params) {
37
- super({
38
- cause: null,
39
- code: "invalid_aleo_transaction_id_error",
40
- docsUrl: null,
41
- name: "InvalidAleoTransactionIdError",
42
- shortMessage: `Invalid Aleo transaction id: ${params.txId}`
43
- });
44
- this.txId = params.txId;
45
- }
46
- };
47
-
48
27
  //#endregion
49
28
  Object.defineProperty(exports, 'AleoInvalidTransactionError', {
50
29
  enumerable: true,
@@ -52,10 +31,4 @@ Object.defineProperty(exports, 'AleoInvalidTransactionError', {
52
31
  return AleoInvalidTransactionError;
53
32
  }
54
33
  });
55
- Object.defineProperty(exports, 'InvalidAleoTransactionIdError', {
56
- enumerable: true,
57
- get: function () {
58
- return InvalidAleoTransactionIdError;
59
- }
60
- });
61
- //# sourceMappingURL=InvalidAleoTransactionIdError-DRDfoh4x.cjs.map
34
+ //# sourceMappingURL=AleoInvalidTransactionError-D-V8l2Ka.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AleoInvalidTransactionError-D-V8l2Ka.cjs","names":["BaseError"],"sources":["../src/errors/AleoInvalidTransactionError/AleoInvalidTransactionError.ts"],"sourcesContent":["import { BaseError } from '@dynamic-labs-sdk/client';\n\n/**\n * Thrown when an Aleo transaction is malformed or contains invalid inputs\n * before it is submitted to the WaaS client.\n *\n * @example new AleoInvalidTransactionError({\n * code: 'aleo_transaction_no_transitions',\n * reason: 'transaction must contain at least one transition',\n * })\n * @see AleoFeatureUnsupportedError\n * @see InvalidAleoTransactionIdError\n */\nexport class AleoInvalidTransactionError extends BaseError {\n constructor(params: { code: string; reason: string }) {\n super({\n cause: null,\n code: params.code,\n docsUrl: null,\n name: 'AleoInvalidTransactionError',\n shortMessage: `Invalid Aleo transaction: ${params.reason}`,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAaA,IAAa,8BAAb,cAAiDA,mCAAU;CACzD,YAAY,QAA0C;AACpD,QAAM;GACJ,OAAO;GACP,MAAM,OAAO;GACb,SAAS;GACT,MAAM;GACN,cAAc,6BAA6B,OAAO;GACnD,CAAC"}
@@ -0,0 +1,67 @@
1
+ let _dynamic_labs_sdk_client = require("@dynamic-labs-sdk/client");
2
+
3
+ //#region src/errors/AleoTransactionStatusError/AleoTransactionStatusError.ts
4
+ /**
5
+ * Thrown when an Aleo transaction reaches a terminal wallet status or the
6
+ * wallet does not report an on-chain transaction id before the status
7
+ * timeout.
8
+ *
9
+ * @example new AleoTransactionStatusError({
10
+ * code: 'aleo_transaction_not_accepted',
11
+ * reason: 'transaction rejected',
12
+ * })
13
+ * @see AleoInvalidTransactionError
14
+ * @see AleoFeatureUnsupportedError
15
+ */
16
+ var AleoTransactionStatusError = class extends _dynamic_labs_sdk_client.BaseError {
17
+ constructor(params) {
18
+ super({
19
+ cause: null,
20
+ code: params.code,
21
+ docsUrl: null,
22
+ name: "AleoTransactionStatusError",
23
+ shortMessage: `Aleo transaction failed: ${params.reason}`
24
+ });
25
+ }
26
+ };
27
+
28
+ //#endregion
29
+ //#region src/errors/AleoTransactionTimeoutError/AleoTransactionTimeoutError.ts
30
+ /**
31
+ * Thrown when the wallet does not report an on-chain transaction id before
32
+ * the status timeout. The transaction may still have been broadcast, so the
33
+ * caller cannot assume it failed.
34
+ *
35
+ * @example new AleoTransactionTimeoutError({
36
+ * code: 'aleo_transaction_status_timeout',
37
+ * reason: 'the wallet did not report an on-chain transaction id',
38
+ * })
39
+ * @see AleoTransactionStatusError
40
+ * @see AleoInvalidTransactionError
41
+ */
42
+ var AleoTransactionTimeoutError = class extends _dynamic_labs_sdk_client.BaseError {
43
+ constructor(params) {
44
+ super({
45
+ cause: null,
46
+ code: params.code,
47
+ docsUrl: null,
48
+ name: "AleoTransactionTimeoutError",
49
+ shortMessage: `Aleo transaction status timed out: ${params.reason}`
50
+ });
51
+ }
52
+ };
53
+
54
+ //#endregion
55
+ Object.defineProperty(exports, 'AleoTransactionStatusError', {
56
+ enumerable: true,
57
+ get: function () {
58
+ return AleoTransactionStatusError;
59
+ }
60
+ });
61
+ Object.defineProperty(exports, 'AleoTransactionTimeoutError', {
62
+ enumerable: true,
63
+ get: function () {
64
+ return AleoTransactionTimeoutError;
65
+ }
66
+ });
67
+ //# sourceMappingURL=AleoTransactionTimeoutError-C96vAQCH.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AleoTransactionTimeoutError-C96vAQCH.cjs","names":["BaseError","BaseError"],"sources":["../src/errors/AleoTransactionStatusError/AleoTransactionStatusError.ts","../src/errors/AleoTransactionTimeoutError/AleoTransactionTimeoutError.ts"],"sourcesContent":["import { BaseError } from '@dynamic-labs-sdk/client';\n\n/**\n * Thrown when an Aleo transaction reaches a terminal wallet status or the\n * wallet does not report an on-chain transaction id before the status\n * timeout.\n *\n * @example new AleoTransactionStatusError({\n * code: 'aleo_transaction_not_accepted',\n * reason: 'transaction rejected',\n * })\n * @see AleoInvalidTransactionError\n * @see AleoFeatureUnsupportedError\n */\nexport class AleoTransactionStatusError extends BaseError {\n constructor(params: { code: string; reason: string }) {\n super({\n cause: null,\n code: params.code,\n docsUrl: null,\n name: 'AleoTransactionStatusError',\n shortMessage: `Aleo transaction failed: ${params.reason}`,\n });\n }\n}\n","import { BaseError } from '@dynamic-labs-sdk/client';\n\n/**\n * Thrown when the wallet does not report an on-chain transaction id before\n * the status timeout. The transaction may still have been broadcast, so the\n * caller cannot assume it failed.\n *\n * @example new AleoTransactionTimeoutError({\n * code: 'aleo_transaction_status_timeout',\n * reason: 'the wallet did not report an on-chain transaction id',\n * })\n * @see AleoTransactionStatusError\n * @see AleoInvalidTransactionError\n */\nexport class AleoTransactionTimeoutError extends BaseError {\n constructor(params: { code: string; reason: string }) {\n super({\n cause: null,\n code: params.code,\n docsUrl: null,\n name: 'AleoTransactionTimeoutError',\n shortMessage: `Aleo transaction status timed out: ${params.reason}`,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAcA,IAAa,6BAAb,cAAgDA,mCAAU;CACxD,YAAY,QAA0C;AACpD,QAAM;GACJ,OAAO;GACP,MAAM,OAAO;GACb,SAAS;GACT,MAAM;GACN,cAAc,4BAA4B,OAAO;GAClD,CAAC;;;;;;;;;;;;;;;;;;ACRN,IAAa,8BAAb,cAAiDC,mCAAU;CACzD,YAAY,QAA0C;AACpD,QAAM;GACJ,OAAO;GACP,MAAM,OAAO;GACb,SAAS;GACT,MAAM;GACN,cAAc,sCAAsC,OAAO;GAC5D,CAAC"}
@@ -0,0 +1,56 @@
1
+ import { BaseError } from "@dynamic-labs-sdk/client";
2
+
3
+ //#region src/errors/AleoTransactionStatusError/AleoTransactionStatusError.ts
4
+ /**
5
+ * Thrown when an Aleo transaction reaches a terminal wallet status or the
6
+ * wallet does not report an on-chain transaction id before the status
7
+ * timeout.
8
+ *
9
+ * @example new AleoTransactionStatusError({
10
+ * code: 'aleo_transaction_not_accepted',
11
+ * reason: 'transaction rejected',
12
+ * })
13
+ * @see AleoInvalidTransactionError
14
+ * @see AleoFeatureUnsupportedError
15
+ */
16
+ var AleoTransactionStatusError = class extends BaseError {
17
+ constructor(params) {
18
+ super({
19
+ cause: null,
20
+ code: params.code,
21
+ docsUrl: null,
22
+ name: "AleoTransactionStatusError",
23
+ shortMessage: `Aleo transaction failed: ${params.reason}`
24
+ });
25
+ }
26
+ };
27
+
28
+ //#endregion
29
+ //#region src/errors/AleoTransactionTimeoutError/AleoTransactionTimeoutError.ts
30
+ /**
31
+ * Thrown when the wallet does not report an on-chain transaction id before
32
+ * the status timeout. The transaction may still have been broadcast, so the
33
+ * caller cannot assume it failed.
34
+ *
35
+ * @example new AleoTransactionTimeoutError({
36
+ * code: 'aleo_transaction_status_timeout',
37
+ * reason: 'the wallet did not report an on-chain transaction id',
38
+ * })
39
+ * @see AleoTransactionStatusError
40
+ * @see AleoInvalidTransactionError
41
+ */
42
+ var AleoTransactionTimeoutError = class extends BaseError {
43
+ constructor(params) {
44
+ super({
45
+ cause: null,
46
+ code: params.code,
47
+ docsUrl: null,
48
+ name: "AleoTransactionTimeoutError",
49
+ shortMessage: `Aleo transaction status timed out: ${params.reason}`
50
+ });
51
+ }
52
+ };
53
+
54
+ //#endregion
55
+ export { AleoTransactionStatusError as n, AleoTransactionTimeoutError as t };
56
+ //# sourceMappingURL=AleoTransactionTimeoutError-DLK0ke2t.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AleoTransactionTimeoutError-DLK0ke2t.esm.js","names":[],"sources":["../src/errors/AleoTransactionStatusError/AleoTransactionStatusError.ts","../src/errors/AleoTransactionTimeoutError/AleoTransactionTimeoutError.ts"],"sourcesContent":["import { BaseError } from '@dynamic-labs-sdk/client';\n\n/**\n * Thrown when an Aleo transaction reaches a terminal wallet status or the\n * wallet does not report an on-chain transaction id before the status\n * timeout.\n *\n * @example new AleoTransactionStatusError({\n * code: 'aleo_transaction_not_accepted',\n * reason: 'transaction rejected',\n * })\n * @see AleoInvalidTransactionError\n * @see AleoFeatureUnsupportedError\n */\nexport class AleoTransactionStatusError extends BaseError {\n constructor(params: { code: string; reason: string }) {\n super({\n cause: null,\n code: params.code,\n docsUrl: null,\n name: 'AleoTransactionStatusError',\n shortMessage: `Aleo transaction failed: ${params.reason}`,\n });\n }\n}\n","import { BaseError } from '@dynamic-labs-sdk/client';\n\n/**\n * Thrown when the wallet does not report an on-chain transaction id before\n * the status timeout. The transaction may still have been broadcast, so the\n * caller cannot assume it failed.\n *\n * @example new AleoTransactionTimeoutError({\n * code: 'aleo_transaction_status_timeout',\n * reason: 'the wallet did not report an on-chain transaction id',\n * })\n * @see AleoTransactionStatusError\n * @see AleoInvalidTransactionError\n */\nexport class AleoTransactionTimeoutError extends BaseError {\n constructor(params: { code: string; reason: string }) {\n super({\n cause: null,\n code: params.code,\n docsUrl: null,\n name: 'AleoTransactionTimeoutError',\n shortMessage: `Aleo transaction status timed out: ${params.reason}`,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;AAcA,IAAa,6BAAb,cAAgD,UAAU;CACxD,YAAY,QAA0C;AACpD,QAAM;GACJ,OAAO;GACP,MAAM,OAAO;GACb,SAAS;GACT,MAAM;GACN,cAAc,4BAA4B,OAAO;GAClD,CAAC;;;;;;;;;;;;;;;;;;ACRN,IAAa,8BAAb,cAAiD,UAAU;CACzD,YAAY,QAA0C;AACpD,QAAM;GACJ,OAAO;GACP,MAAM,OAAO;GACb,SAAS;GACT,MAAM;GACN,cAAc,sCAAsC,OAAO;GAC5D,CAAC"}
@@ -0,0 +1,30 @@
1
+ let _dynamic_labs_sdk_client = require("@dynamic-labs-sdk/client");
2
+
3
+ //#region src/errors/InvalidAleoTransactionIdError/InvalidAleoTransactionIdError.ts
4
+ /**
5
+ * Thrown when an input meant to be an Aleo transaction id (`at1...`) does
6
+ * not match the bech32 pattern. Carries the offending value on `txId` for
7
+ * inclusion in error logs / UI surfaces.
8
+ */
9
+ var InvalidAleoTransactionIdError = class extends _dynamic_labs_sdk_client.BaseError {
10
+ txId;
11
+ constructor(params) {
12
+ super({
13
+ cause: null,
14
+ code: "invalid_aleo_transaction_id_error",
15
+ docsUrl: null,
16
+ name: "InvalidAleoTransactionIdError",
17
+ shortMessage: `Invalid Aleo transaction id: ${params.txId}`
18
+ });
19
+ this.txId = params.txId;
20
+ }
21
+ };
22
+
23
+ //#endregion
24
+ Object.defineProperty(exports, 'InvalidAleoTransactionIdError', {
25
+ enumerable: true,
26
+ get: function () {
27
+ return InvalidAleoTransactionIdError;
28
+ }
29
+ });
30
+ //# sourceMappingURL=InvalidAleoTransactionIdError-B96MGnE9.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InvalidAleoTransactionIdError-B96MGnE9.cjs","names":["BaseError"],"sources":["../src/errors/InvalidAleoTransactionIdError/InvalidAleoTransactionIdError.ts"],"sourcesContent":["import { BaseError } from '@dynamic-labs-sdk/client';\n\n/**\n * Thrown when an input meant to be an Aleo transaction id (`at1...`) does\n * not match the bech32 pattern. Carries the offending value on `txId` for\n * inclusion in error logs / UI surfaces.\n */\nexport class InvalidAleoTransactionIdError extends BaseError {\n public readonly txId: string;\n\n constructor(params: { txId: string }) {\n super({\n cause: null,\n code: 'invalid_aleo_transaction_id_error',\n docsUrl: null,\n name: 'InvalidAleoTransactionIdError',\n shortMessage: `Invalid Aleo transaction id: ${params.txId}`,\n });\n\n this.txId = params.txId;\n }\n}\n"],"mappings":";;;;;;;;AAOA,IAAa,gCAAb,cAAmDA,mCAAU;CAC3D,AAAgB;CAEhB,YAAY,QAA0B;AACpC,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,gCAAgC,OAAO;GACtD,CAAC;AAEF,OAAK,OAAO,OAAO"}
@@ -0,0 +1,25 @@
1
+ import { BaseError } from "@dynamic-labs-sdk/client";
2
+
3
+ //#region src/errors/InvalidAleoTransactionIdError/InvalidAleoTransactionIdError.ts
4
+ /**
5
+ * Thrown when an input meant to be an Aleo transaction id (`at1...`) does
6
+ * not match the bech32 pattern. Carries the offending value on `txId` for
7
+ * inclusion in error logs / UI surfaces.
8
+ */
9
+ var InvalidAleoTransactionIdError = class extends BaseError {
10
+ txId;
11
+ constructor(params) {
12
+ super({
13
+ cause: null,
14
+ code: "invalid_aleo_transaction_id_error",
15
+ docsUrl: null,
16
+ name: "InvalidAleoTransactionIdError",
17
+ shortMessage: `Invalid Aleo transaction id: ${params.txId}`
18
+ });
19
+ this.txId = params.txId;
20
+ }
21
+ };
22
+
23
+ //#endregion
24
+ export { InvalidAleoTransactionIdError as t };
25
+ //# sourceMappingURL=InvalidAleoTransactionIdError-DTcA7Nkp.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InvalidAleoTransactionIdError-DTcA7Nkp.esm.js","names":[],"sources":["../src/errors/InvalidAleoTransactionIdError/InvalidAleoTransactionIdError.ts"],"sourcesContent":["import { BaseError } from '@dynamic-labs-sdk/client';\n\n/**\n * Thrown when an input meant to be an Aleo transaction id (`at1...`) does\n * not match the bech32 pattern. Carries the offending value on `txId` for\n * inclusion in error logs / UI surfaces.\n */\nexport class InvalidAleoTransactionIdError extends BaseError {\n public readonly txId: string;\n\n constructor(params: { txId: string }) {\n super({\n cause: null,\n code: 'invalid_aleo_transaction_id_error',\n docsUrl: null,\n name: 'InvalidAleoTransactionIdError',\n shortMessage: `Invalid Aleo transaction id: ${params.txId}`,\n });\n\n this.txId = params.txId;\n }\n}\n"],"mappings":";;;;;;;;AAOA,IAAa,gCAAb,cAAmD,UAAU;CAC3D,AAAgB;CAEhB,YAAY,QAA0B;AACpC,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,gCAAgC,OAAO;GACtD,CAAC;AAEF,OAAK,OAAO,OAAO"}
@@ -0,0 +1,21 @@
1
+
2
+ //#region src/utils/bytesToHex/bytesToHex.ts
3
+ /**
4
+ * Encode a `Uint8Array` as a lowercase hex string with no separator.
5
+ * Used to render Aleo signature bytes for the `signMessage` provider
6
+ * surface (which yields a hex `signature: string` per the Dynamic
7
+ * `WalletProvider` contract) and any other place we need a stable
8
+ * compact bytes-to-text encoding.
9
+ *
10
+ * @notInstrumented
11
+ */
12
+ const bytesToHex = ({ bytes }) => Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
13
+
14
+ //#endregion
15
+ Object.defineProperty(exports, 'bytesToHex', {
16
+ enumerable: true,
17
+ get: function () {
18
+ return bytesToHex;
19
+ }
20
+ });
21
+ //# sourceMappingURL=bytesToHex-BAbtmw7Y.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bytesToHex-BAbtmw7Y.cjs","names":[],"sources":["../src/utils/bytesToHex/bytesToHex.ts"],"sourcesContent":["type BytesToHexParams = {\n bytes: Uint8Array;\n};\n\n/**\n * Encode a `Uint8Array` as a lowercase hex string with no separator.\n * Used to render Aleo signature bytes for the `signMessage` provider\n * surface (which yields a hex `signature: string` per the Dynamic\n * `WalletProvider` contract) and any other place we need a stable\n * compact bytes-to-text encoding.\n *\n * @notInstrumented\n */\nexport const bytesToHex = ({ bytes }: BytesToHexParams): string =>\n Array.from(bytes, (b) => b.toString(16).padStart(2, '0')).join('');\n"],"mappings":";;;;;;;;;;;AAaA,MAAa,cAAc,EAAE,YAC3B,MAAM,KAAK,QAAQ,MAAM,EAAE,SAAS,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,KAAK,GAAG"}
@@ -0,0 +1,15 @@
1
+ //#region src/utils/bytesToHex/bytesToHex.ts
2
+ /**
3
+ * Encode a `Uint8Array` as a lowercase hex string with no separator.
4
+ * Used to render Aleo signature bytes for the `signMessage` provider
5
+ * surface (which yields a hex `signature: string` per the Dynamic
6
+ * `WalletProvider` contract) and any other place we need a stable
7
+ * compact bytes-to-text encoding.
8
+ *
9
+ * @notInstrumented
10
+ */
11
+ const bytesToHex = ({ bytes }) => Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
12
+
13
+ //#endregion
14
+ export { bytesToHex as t };
15
+ //# sourceMappingURL=bytesToHex-DmLyKVST.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bytesToHex-DmLyKVST.esm.js","names":[],"sources":["../src/utils/bytesToHex/bytesToHex.ts"],"sourcesContent":["type BytesToHexParams = {\n bytes: Uint8Array;\n};\n\n/**\n * Encode a `Uint8Array` as a lowercase hex string with no separator.\n * Used to render Aleo signature bytes for the `signMessage` provider\n * surface (which yields a hex `signature: string` per the Dynamic\n * `WalletProvider` contract) and any other place we need a stable\n * compact bytes-to-text encoding.\n *\n * @notInstrumented\n */\nexport const bytesToHex = ({ bytes }: BytesToHexParams): string =>\n Array.from(bytes, (b) => b.toString(16).padStart(2, '0')).join('');\n"],"mappings":";;;;;;;;;;AAaA,MAAa,cAAc,EAAE,YAC3B,MAAM,KAAK,QAAQ,MAAM,EAAE,SAAS,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,KAAK,GAAG"}
@@ -2,7 +2,7 @@ let _dynamic_labs_sdk_client = require("@dynamic-labs-sdk/client");
2
2
 
3
3
  //#region package.json
4
4
  var name = "@dynamic-labs-sdk/aleo";
5
- var version = "1.54.1";
5
+ var version = "1.56.0";
6
6
 
7
7
  //#endregion
8
8
  //#region src/errors/AleoFeatureUnsupportedError/AleoFeatureUnsupportedError.ts
@@ -75,4 +75,4 @@ Object.defineProperty(exports, 'version', {
75
75
  return version;
76
76
  }
77
77
  });
78
- //# sourceMappingURL=constants-BdMsNtLK.cjs.map
78
+ //# sourceMappingURL=constants-CQe88cUR.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants-BdMsNtLK.cjs","names":["BaseError"],"sources":["../package.json","../src/errors/AleoFeatureUnsupportedError/AleoFeatureUnsupportedError.ts","../src/utils/constants.ts"],"sourcesContent":["","import { BaseError } from '@dynamic-labs-sdk/client';\n\n/**\n * Thrown when an Aleo wallet does not advertise a feature the caller asked\n * for — e.g. a wallet that lacks `aleo:decrypt` when `decrypt(...)` is\n * invoked. Carries the feature name and the wallet display name so the\n * UI / logs can surface which wallet was missing what.\n */\nexport class AleoFeatureUnsupportedError extends BaseError {\n public readonly featureName: string;\n\n public readonly walletName: string;\n\n constructor(params: { featureName: string; walletName: string }) {\n super({\n cause: null,\n code: 'aleo_feature_unsupported_error',\n docsUrl: null,\n name: 'AleoFeatureUnsupportedError',\n shortMessage: `${params.walletName} does not support ${params.featureName}`,\n });\n\n this.featureName = params.featureName;\n this.walletName = params.walletName;\n }\n}\n","/**\n * Aleo credits are denominated in microcredits — 1 credit = 1,000,000 mc.\n * Mirrors the SUN_PER_TRX / lamports-per-sol pattern in sibling chain packages.\n */\nexport const MICROCREDITS_PER_CREDIT = 1_000_000;\n\nexport const ALEO_MAINNET_NETWORK_ID = 0;\nexport const ALEO_TESTNET_NETWORK_ID = 1;\n"],"mappings":";;;;;;;;;;;;;;ACQA,IAAa,8BAAb,cAAiDA,mCAAU;CACzD,AAAgB;CAEhB,AAAgB;CAEhB,YAAY,QAAqD;AAC/D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,GAAG,OAAO,WAAW,oBAAoB,OAAO;GAC/D,CAAC;AAEF,OAAK,cAAc,OAAO;AAC1B,OAAK,aAAa,OAAO;;;;;;;;;;ACnB7B,MAAa,0BAA0B;AAEvC,MAAa,0BAA0B;AACvC,MAAa,0BAA0B"}
1
+ {"version":3,"file":"constants-CQe88cUR.cjs","names":["BaseError"],"sources":["../package.json","../src/errors/AleoFeatureUnsupportedError/AleoFeatureUnsupportedError.ts","../src/utils/constants.ts"],"sourcesContent":["","import { BaseError } from '@dynamic-labs-sdk/client';\n\n/**\n * Thrown when an Aleo wallet does not advertise a feature the caller asked\n * for — e.g. a wallet that lacks `aleo:decrypt` when `decrypt(...)` is\n * invoked. Carries the feature name and the wallet display name so the\n * UI / logs can surface which wallet was missing what.\n */\nexport class AleoFeatureUnsupportedError extends BaseError {\n public readonly featureName: string;\n\n public readonly walletName: string;\n\n constructor(params: { featureName: string; walletName: string }) {\n super({\n cause: null,\n code: 'aleo_feature_unsupported_error',\n docsUrl: null,\n name: 'AleoFeatureUnsupportedError',\n shortMessage: `${params.walletName} does not support ${params.featureName}`,\n });\n\n this.featureName = params.featureName;\n this.walletName = params.walletName;\n }\n}\n","/**\n * Aleo credits are denominated in microcredits — 1 credit = 1,000,000 mc.\n * Mirrors the SUN_PER_TRX / lamports-per-sol pattern in sibling chain packages.\n */\nexport const MICROCREDITS_PER_CREDIT = 1_000_000;\n\nexport const ALEO_MAINNET_NETWORK_ID = 0;\nexport const ALEO_TESTNET_NETWORK_ID = 1;\n"],"mappings":";;;;;;;;;;;;;;ACQA,IAAa,8BAAb,cAAiDA,mCAAU;CACzD,AAAgB;CAEhB,AAAgB;CAEhB,YAAY,QAAqD;AAC/D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,GAAG,OAAO,WAAW,oBAAoB,OAAO;GAC/D,CAAC;AAEF,OAAK,cAAc,OAAO;AAC1B,OAAK,aAAa,OAAO;;;;;;;;;;ACnB7B,MAAa,0BAA0B;AAEvC,MAAa,0BAA0B;AACvC,MAAa,0BAA0B"}
@@ -2,7 +2,7 @@ import { BaseError } from "@dynamic-labs-sdk/client";
2
2
 
3
3
  //#region package.json
4
4
  var name = "@dynamic-labs-sdk/aleo";
5
- var version = "1.54.1";
5
+ var version = "1.56.0";
6
6
 
7
7
  //#endregion
8
8
  //#region src/errors/AleoFeatureUnsupportedError/AleoFeatureUnsupportedError.ts
@@ -40,4 +40,4 @@ const ALEO_TESTNET_NETWORK_ID = 1;
40
40
 
41
41
  //#endregion
42
42
  export { name as a, AleoFeatureUnsupportedError as i, ALEO_TESTNET_NETWORK_ID as n, version as o, MICROCREDITS_PER_CREDIT as r, ALEO_MAINNET_NETWORK_ID as t };
43
- //# sourceMappingURL=constants-QbsyjWKH.esm.js.map
43
+ //# sourceMappingURL=constants-Db8ZRYoF.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants-QbsyjWKH.esm.js","names":[],"sources":["../package.json","../src/errors/AleoFeatureUnsupportedError/AleoFeatureUnsupportedError.ts","../src/utils/constants.ts"],"sourcesContent":["","import { BaseError } from '@dynamic-labs-sdk/client';\n\n/**\n * Thrown when an Aleo wallet does not advertise a feature the caller asked\n * for — e.g. a wallet that lacks `aleo:decrypt` when `decrypt(...)` is\n * invoked. Carries the feature name and the wallet display name so the\n * UI / logs can surface which wallet was missing what.\n */\nexport class AleoFeatureUnsupportedError extends BaseError {\n public readonly featureName: string;\n\n public readonly walletName: string;\n\n constructor(params: { featureName: string; walletName: string }) {\n super({\n cause: null,\n code: 'aleo_feature_unsupported_error',\n docsUrl: null,\n name: 'AleoFeatureUnsupportedError',\n shortMessage: `${params.walletName} does not support ${params.featureName}`,\n });\n\n this.featureName = params.featureName;\n this.walletName = params.walletName;\n }\n}\n","/**\n * Aleo credits are denominated in microcredits — 1 credit = 1,000,000 mc.\n * Mirrors the SUN_PER_TRX / lamports-per-sol pattern in sibling chain packages.\n */\nexport const MICROCREDITS_PER_CREDIT = 1_000_000;\n\nexport const ALEO_MAINNET_NETWORK_ID = 0;\nexport const ALEO_TESTNET_NETWORK_ID = 1;\n"],"mappings":";;;;;;;;;;;;;;ACQA,IAAa,8BAAb,cAAiD,UAAU;CACzD,AAAgB;CAEhB,AAAgB;CAEhB,YAAY,QAAqD;AAC/D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,GAAG,OAAO,WAAW,oBAAoB,OAAO;GAC/D,CAAC;AAEF,OAAK,cAAc,OAAO;AAC1B,OAAK,aAAa,OAAO;;;;;;;;;;ACnB7B,MAAa,0BAA0B;AAEvC,MAAa,0BAA0B;AACvC,MAAa,0BAA0B"}
1
+ {"version":3,"file":"constants-Db8ZRYoF.esm.js","names":[],"sources":["../package.json","../src/errors/AleoFeatureUnsupportedError/AleoFeatureUnsupportedError.ts","../src/utils/constants.ts"],"sourcesContent":["","import { BaseError } from '@dynamic-labs-sdk/client';\n\n/**\n * Thrown when an Aleo wallet does not advertise a feature the caller asked\n * for — e.g. a wallet that lacks `aleo:decrypt` when `decrypt(...)` is\n * invoked. Carries the feature name and the wallet display name so the\n * UI / logs can surface which wallet was missing what.\n */\nexport class AleoFeatureUnsupportedError extends BaseError {\n public readonly featureName: string;\n\n public readonly walletName: string;\n\n constructor(params: { featureName: string; walletName: string }) {\n super({\n cause: null,\n code: 'aleo_feature_unsupported_error',\n docsUrl: null,\n name: 'AleoFeatureUnsupportedError',\n shortMessage: `${params.walletName} does not support ${params.featureName}`,\n });\n\n this.featureName = params.featureName;\n this.walletName = params.walletName;\n }\n}\n","/**\n * Aleo credits are denominated in microcredits — 1 credit = 1,000,000 mc.\n * Mirrors the SUN_PER_TRX / lamports-per-sol pattern in sibling chain packages.\n */\nexport const MICROCREDITS_PER_CREDIT = 1_000_000;\n\nexport const ALEO_MAINNET_NETWORK_ID = 0;\nexport const ALEO_TESTNET_NETWORK_ID = 1;\n"],"mappings":";;;;;;;;;;;;;;ACQA,IAAa,8BAAb,cAAiD,UAAU;CACzD,AAAgB;CAEhB,AAAgB;CAEhB,YAAY,QAAqD;AAC/D,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc,GAAG,OAAO,WAAW,oBAAoB,OAAO;GAC/D,CAAC;AAEF,OAAK,cAAc,OAAO;AAC1B,OAAK,aAAa,OAAO;;;;;;;;;;ACnB7B,MAAa,0BAA0B;AAEvC,MAAa,0BAA0B;AACvC,MAAa,0BAA0B"}
@@ -0,0 +1,20 @@
1
+ import { BaseError } from '@dynamic-labs-sdk/client';
2
+ /**
3
+ * Thrown when an Aleo transaction reaches a terminal wallet status or the
4
+ * wallet does not report an on-chain transaction id before the status
5
+ * timeout.
6
+ *
7
+ * @example new AleoTransactionStatusError({
8
+ * code: 'aleo_transaction_not_accepted',
9
+ * reason: 'transaction rejected',
10
+ * })
11
+ * @see AleoInvalidTransactionError
12
+ * @see AleoFeatureUnsupportedError
13
+ */
14
+ export declare class AleoTransactionStatusError extends BaseError {
15
+ constructor(params: {
16
+ code: string;
17
+ reason: string;
18
+ });
19
+ }
20
+ //# sourceMappingURL=AleoTransactionStatusError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AleoTransactionStatusError.d.ts","sourceRoot":"","sources":["../../../src/errors/AleoTransactionStatusError/AleoTransactionStatusError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD;;;;;;;;;;;GAWG;AACH,qBAAa,0BAA2B,SAAQ,SAAS;gBAC3C,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;CASrD"}
@@ -0,0 +1,2 @@
1
+ export { AleoTransactionStatusError } from './AleoTransactionStatusError';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/errors/AleoTransactionStatusError/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { BaseError } from '@dynamic-labs-sdk/client';
2
+ /**
3
+ * Thrown when the wallet does not report an on-chain transaction id before
4
+ * the status timeout. The transaction may still have been broadcast, so the
5
+ * caller cannot assume it failed.
6
+ *
7
+ * @example new AleoTransactionTimeoutError({
8
+ * code: 'aleo_transaction_status_timeout',
9
+ * reason: 'the wallet did not report an on-chain transaction id',
10
+ * })
11
+ * @see AleoTransactionStatusError
12
+ * @see AleoInvalidTransactionError
13
+ */
14
+ export declare class AleoTransactionTimeoutError extends BaseError {
15
+ constructor(params: {
16
+ code: string;
17
+ reason: string;
18
+ });
19
+ }
20
+ //# sourceMappingURL=AleoTransactionTimeoutError.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AleoTransactionTimeoutError.d.ts","sourceRoot":"","sources":["../../../src/errors/AleoTransactionTimeoutError/AleoTransactionTimeoutError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD;;;;;;;;;;;GAWG;AACH,qBAAa,2BAA4B,SAAQ,SAAS;gBAC5C,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;CASrD"}
@@ -0,0 +1,2 @@
1
+ export { AleoTransactionTimeoutError } from './AleoTransactionTimeoutError';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/errors/AleoTransactionTimeoutError/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC"}
@@ -1,5 +1,7 @@
1
1
  export { AleoFeatureUnsupportedError } from '../errors/AleoFeatureUnsupportedError';
2
2
  export { AleoInvalidTransactionError } from '../errors/AleoInvalidTransactionError';
3
+ export { AleoTransactionStatusError } from '../errors/AleoTransactionStatusError';
4
+ export { AleoTransactionTimeoutError } from '../errors/AleoTransactionTimeoutError';
3
5
  export { InvalidAleoTransactionIdError } from '../errors/InvalidAleoTransactionIdError';
4
6
  export { NotAleoProviderError } from '../errors/NotAleoProviderError';
5
7
  export { isAleoNetworkProvider } from '../isAleoNetworkProvider';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exports/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,YAAY,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,YAAY,EACV,kBAAkB,EAClB,yBAAyB,EACzB,eAAe,EACf,cAAc,EACd,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EACL,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exports/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,6BAA6B,EAAE,MAAM,yCAAyC,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,YAAY,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACxE,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,YAAY,EACV,kBAAkB,EAClB,yBAAyB,EACzB,eAAe,EACf,cAAc,EACd,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EACL,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { ALEO_WALLET_ADAPTERS_EXTENSION_KEY, addAleoWalletAdaptersExtension, } from '../walletAdapters/addAleoWalletAdaptersExtension';
2
+ export { createWalletProviderForAleoWalletAdapter } from '../walletAdapters/utils/createWalletProviderForAleoWalletAdapter';
3
+ //# sourceMappingURL=walletAdapters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"walletAdapters.d.ts","sourceRoot":"","sources":["../../src/exports/walletAdapters.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,kCAAkC,EAClC,8BAA8B,GAC/B,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,wCAAwC,EAAE,MAAM,kEAAkE,CAAC"}
@@ -1,4 +1,4 @@
1
- const require_constants = require('./constants-BdMsNtLK.cjs');
1
+ const require_constants = require('./constants-CQe88cUR.cjs');
2
2
  let _provablehq_aleo_types = require("@provablehq/aleo-types");
3
3
 
4
4
  //#region src/utils/getNetworkByChainId/getNetworkByChainId.ts
@@ -44,4 +44,4 @@ Object.defineProperty(exports, 'getNetworkByChainId', {
44
44
  return getNetworkByChainId;
45
45
  }
46
46
  });
47
- //# sourceMappingURL=getNetworkByChainId-DvjKBrS1.cjs.map
47
+ //# sourceMappingURL=getNetworkByChainId-CJ9fnI49.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"getNetworkByChainId-DvjKBrS1.cjs","names":["ALEO_NETWORK_TO_ID_MAP: Partial<Record<Network, number>>","Network","ALEO_MAINNET_NETWORK_ID","ALEO_TESTNET_NETWORK_ID"],"sources":["../src/utils/getNetworkByChainId/getNetworkByChainId.ts"],"sourcesContent":["import { Network } from '@provablehq/aleo-types';\n\nimport {\n ALEO_MAINNET_NETWORK_ID,\n ALEO_TESTNET_NETWORK_ID,\n} from '../constants';\n\n/**\n * Map from `@provablehq/aleo-types` Network enum to the numeric chain id used\n * everywhere else in the SDK (`0` = mainnet, `1` = testnet).\n */\nexport const ALEO_NETWORK_TO_ID_MAP: Partial<Record<Network, number>> = {\n [Network.MAINNET]: ALEO_MAINNET_NETWORK_ID,\n [Network.TESTNET]: ALEO_TESTNET_NETWORK_ID,\n};\n\ntype GetNetworkByChainIdParams = {\n chainId: number;\n};\n\n/**\n * Resolve the `@provablehq/aleo-types` Network enum value for a numeric\n * chain id, the bridge between the SDK's chain ids and the on-chain\n * network identifier the Aleo libraries expect.\n *\n * @example\n * ```ts\n * const network = getNetworkByChainId({ chainId: 0 });\n * // → Network.MAINNET\n * ```\n *\n * @param params.chainId - The numeric chain id (`0` = mainnet, `1` = testnet).\n * @returns The matching `Network` enum value, or `undefined` when the id is not a known Aleo network.\n * @see getAleoExplorerTxUrl\n * @see isAleoNetworkProvider\n * @notInstrumented\n */\nexport const getNetworkByChainId = ({\n chainId,\n}: GetNetworkByChainIdParams): Network | undefined => {\n const entry = (\n Object.entries(ALEO_NETWORK_TO_ID_MAP) as [Network, number][]\n ).find(([, id]) => id === chainId);\n return entry?.[0];\n};\n"],"mappings":";;;;;;;;AAWA,MAAaA,yBAA2D;EACrEC,+BAAQ,UAAUC;EAClBD,+BAAQ,UAAUE;CACpB;;;;;;;;;;;;;;;;;;AAuBD,MAAa,uBAAuB,EAClC,cACoD;AAIpD,QAFE,OAAO,QAAQ,uBAAuB,CACtC,MAAM,GAAG,QAAQ,OAAO,QAAQ,GACnB"}
1
+ {"version":3,"file":"getNetworkByChainId-CJ9fnI49.cjs","names":["ALEO_NETWORK_TO_ID_MAP: Partial<Record<Network, number>>","Network","ALEO_MAINNET_NETWORK_ID","ALEO_TESTNET_NETWORK_ID"],"sources":["../src/utils/getNetworkByChainId/getNetworkByChainId.ts"],"sourcesContent":["import { Network } from '@provablehq/aleo-types';\n\nimport {\n ALEO_MAINNET_NETWORK_ID,\n ALEO_TESTNET_NETWORK_ID,\n} from '../constants';\n\n/**\n * Map from `@provablehq/aleo-types` Network enum to the numeric chain id used\n * everywhere else in the SDK (`0` = mainnet, `1` = testnet).\n */\nexport const ALEO_NETWORK_TO_ID_MAP: Partial<Record<Network, number>> = {\n [Network.MAINNET]: ALEO_MAINNET_NETWORK_ID,\n [Network.TESTNET]: ALEO_TESTNET_NETWORK_ID,\n};\n\ntype GetNetworkByChainIdParams = {\n chainId: number;\n};\n\n/**\n * Resolve the `@provablehq/aleo-types` Network enum value for a numeric\n * chain id, the bridge between the SDK's chain ids and the on-chain\n * network identifier the Aleo libraries expect.\n *\n * @example\n * ```ts\n * const network = getNetworkByChainId({ chainId: 0 });\n * // → Network.MAINNET\n * ```\n *\n * @param params.chainId - The numeric chain id (`0` = mainnet, `1` = testnet).\n * @returns The matching `Network` enum value, or `undefined` when the id is not a known Aleo network.\n * @see getAleoExplorerTxUrl\n * @see isAleoNetworkProvider\n * @notInstrumented\n */\nexport const getNetworkByChainId = ({\n chainId,\n}: GetNetworkByChainIdParams): Network | undefined => {\n const entry = (\n Object.entries(ALEO_NETWORK_TO_ID_MAP) as [Network, number][]\n ).find(([, id]) => id === chainId);\n return entry?.[0];\n};\n"],"mappings":";;;;;;;;AAWA,MAAaA,yBAA2D;EACrEC,+BAAQ,UAAUC;EAClBD,+BAAQ,UAAUE;CACpB;;;;;;;;;;;;;;;;;;AAuBD,MAAa,uBAAuB,EAClC,cACoD;AAIpD,QAFE,OAAO,QAAQ,uBAAuB,CACtC,MAAM,GAAG,QAAQ,OAAO,QAAQ,GACnB"}
@@ -1,4 +1,4 @@
1
- import { n as ALEO_TESTNET_NETWORK_ID, t as ALEO_MAINNET_NETWORK_ID } from "./constants-QbsyjWKH.esm.js";
1
+ import { n as ALEO_TESTNET_NETWORK_ID, t as ALEO_MAINNET_NETWORK_ID } from "./constants-Db8ZRYoF.esm.js";
2
2
  import { Network } from "@provablehq/aleo-types";
3
3
 
4
4
  //#region src/utils/getNetworkByChainId/getNetworkByChainId.ts
@@ -33,4 +33,4 @@ const getNetworkByChainId = ({ chainId }) => {
33
33
 
34
34
  //#endregion
35
35
  export { getNetworkByChainId as n, ALEO_NETWORK_TO_ID_MAP as t };
36
- //# sourceMappingURL=getNetworkByChainId-DWbDdrB8.esm.js.map
36
+ //# sourceMappingURL=getNetworkByChainId-ryLoogNL.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getNetworkByChainId-DWbDdrB8.esm.js","names":["ALEO_NETWORK_TO_ID_MAP: Partial<Record<Network, number>>"],"sources":["../src/utils/getNetworkByChainId/getNetworkByChainId.ts"],"sourcesContent":["import { Network } from '@provablehq/aleo-types';\n\nimport {\n ALEO_MAINNET_NETWORK_ID,\n ALEO_TESTNET_NETWORK_ID,\n} from '../constants';\n\n/**\n * Map from `@provablehq/aleo-types` Network enum to the numeric chain id used\n * everywhere else in the SDK (`0` = mainnet, `1` = testnet).\n */\nexport const ALEO_NETWORK_TO_ID_MAP: Partial<Record<Network, number>> = {\n [Network.MAINNET]: ALEO_MAINNET_NETWORK_ID,\n [Network.TESTNET]: ALEO_TESTNET_NETWORK_ID,\n};\n\ntype GetNetworkByChainIdParams = {\n chainId: number;\n};\n\n/**\n * Resolve the `@provablehq/aleo-types` Network enum value for a numeric\n * chain id, the bridge between the SDK's chain ids and the on-chain\n * network identifier the Aleo libraries expect.\n *\n * @example\n * ```ts\n * const network = getNetworkByChainId({ chainId: 0 });\n * // → Network.MAINNET\n * ```\n *\n * @param params.chainId - The numeric chain id (`0` = mainnet, `1` = testnet).\n * @returns The matching `Network` enum value, or `undefined` when the id is not a known Aleo network.\n * @see getAleoExplorerTxUrl\n * @see isAleoNetworkProvider\n * @notInstrumented\n */\nexport const getNetworkByChainId = ({\n chainId,\n}: GetNetworkByChainIdParams): Network | undefined => {\n const entry = (\n Object.entries(ALEO_NETWORK_TO_ID_MAP) as [Network, number][]\n ).find(([, id]) => id === chainId);\n return entry?.[0];\n};\n"],"mappings":";;;;;;;;AAWA,MAAaA,yBAA2D;EACrE,QAAQ,UAAU;EAClB,QAAQ,UAAU;CACpB;;;;;;;;;;;;;;;;;;AAuBD,MAAa,uBAAuB,EAClC,cACoD;AAIpD,QAFE,OAAO,QAAQ,uBAAuB,CACtC,MAAM,GAAG,QAAQ,OAAO,QAAQ,GACnB"}
1
+ {"version":3,"file":"getNetworkByChainId-ryLoogNL.esm.js","names":["ALEO_NETWORK_TO_ID_MAP: Partial<Record<Network, number>>"],"sources":["../src/utils/getNetworkByChainId/getNetworkByChainId.ts"],"sourcesContent":["import { Network } from '@provablehq/aleo-types';\n\nimport {\n ALEO_MAINNET_NETWORK_ID,\n ALEO_TESTNET_NETWORK_ID,\n} from '../constants';\n\n/**\n * Map from `@provablehq/aleo-types` Network enum to the numeric chain id used\n * everywhere else in the SDK (`0` = mainnet, `1` = testnet).\n */\nexport const ALEO_NETWORK_TO_ID_MAP: Partial<Record<Network, number>> = {\n [Network.MAINNET]: ALEO_MAINNET_NETWORK_ID,\n [Network.TESTNET]: ALEO_TESTNET_NETWORK_ID,\n};\n\ntype GetNetworkByChainIdParams = {\n chainId: number;\n};\n\n/**\n * Resolve the `@provablehq/aleo-types` Network enum value for a numeric\n * chain id, the bridge between the SDK's chain ids and the on-chain\n * network identifier the Aleo libraries expect.\n *\n * @example\n * ```ts\n * const network = getNetworkByChainId({ chainId: 0 });\n * // → Network.MAINNET\n * ```\n *\n * @param params.chainId - The numeric chain id (`0` = mainnet, `1` = testnet).\n * @returns The matching `Network` enum value, or `undefined` when the id is not a known Aleo network.\n * @see getAleoExplorerTxUrl\n * @see isAleoNetworkProvider\n * @notInstrumented\n */\nexport const getNetworkByChainId = ({\n chainId,\n}: GetNetworkByChainIdParams): Network | undefined => {\n const entry = (\n Object.entries(ALEO_NETWORK_TO_ID_MAP) as [Network, number][]\n ).find(([, id]) => id === chainId);\n return entry?.[0];\n};\n"],"mappings":";;;;;;;;AAWA,MAAaA,yBAA2D;EACrE,QAAQ,UAAU;EAClB,QAAQ,UAAU;CACpB;;;;;;;;;;;;;;;;;;AAuBD,MAAa,uBAAuB,EAClC,cACoD;AAIpD,QAFE,OAAO,QAAQ,uBAAuB,CACtC,MAAM,GAAG,QAAQ,OAAO,QAAQ,GACnB"}
package/dist/index.cjs CHANGED
@@ -1,6 +1,8 @@
1
- const require_constants = require('./constants-BdMsNtLK.cjs');
2
- const require_InvalidAleoTransactionIdError = require('./InvalidAleoTransactionIdError-DRDfoh4x.cjs');
3
- const require_getNetworkByChainId = require('./getNetworkByChainId-DvjKBrS1.cjs');
1
+ const require_constants = require('./constants-CQe88cUR.cjs');
2
+ const require_AleoInvalidTransactionError = require('./AleoInvalidTransactionError-D-V8l2Ka.cjs');
3
+ const require_AleoTransactionTimeoutError = require('./AleoTransactionTimeoutError-C96vAQCH.cjs');
4
+ const require_InvalidAleoTransactionIdError = require('./InvalidAleoTransactionIdError-B96MGnE9.cjs');
5
+ const require_getNetworkByChainId = require('./getNetworkByChainId-CJ9fnI49.cjs');
4
6
  let _dynamic_labs_sdk_assert_package_version = require("@dynamic-labs-sdk/assert-package-version");
5
7
  let _dynamic_labs_sdk_client = require("@dynamic-labs-sdk/client");
6
8
 
@@ -154,7 +156,9 @@ exports.ALEO_MAINNET_NETWORK_ID = require_constants.ALEO_MAINNET_NETWORK_ID;
154
156
  exports.ALEO_NETWORK_TO_ID_MAP = require_getNetworkByChainId.ALEO_NETWORK_TO_ID_MAP;
155
157
  exports.ALEO_TESTNET_NETWORK_ID = require_constants.ALEO_TESTNET_NETWORK_ID;
156
158
  exports.AleoFeatureUnsupportedError = require_constants.AleoFeatureUnsupportedError;
157
- exports.AleoInvalidTransactionError = require_InvalidAleoTransactionIdError.AleoInvalidTransactionError;
159
+ exports.AleoInvalidTransactionError = require_AleoInvalidTransactionError.AleoInvalidTransactionError;
160
+ exports.AleoTransactionStatusError = require_AleoTransactionTimeoutError.AleoTransactionStatusError;
161
+ exports.AleoTransactionTimeoutError = require_AleoTransactionTimeoutError.AleoTransactionTimeoutError;
158
162
  exports.InvalidAleoTransactionIdError = require_InvalidAleoTransactionIdError.InvalidAleoTransactionIdError;
159
163
  exports.MICROCREDITS_PER_CREDIT = require_constants.MICROCREDITS_PER_CREDIT;
160
164
  exports.NotAleoProviderError = NotAleoProviderError;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["BaseError","ALEO_MAINNET_NETWORK_ID","InvalidAleoTransactionIdError","packageName","packageVersion"],"sources":["../src/errors/NotAleoProviderError/NotAleoProviderError.ts","../src/isAleoNetworkProvider/isAleoNetworkProvider.ts","../src/isAleoWalletAccount/isAleoWalletAccount.ts","../src/isAleoWalletProvider/isAleoWalletProvider.ts","../src/utils/isAleoMainnet/isAleoMainnet.ts","../src/utils/getAleoExplorerTxUrl/getAleoExplorerTxUrl.ts","../src/exports/index.ts"],"sourcesContent":["import { BaseError } from '@dynamic-labs-sdk/client';\n\n/**\n * Thrown by Aleo-specific top-level helpers (`signMessage`,\n * `requestTransaction`, `decrypt`, `requestRecords`) when the wallet\n * provider resolved from a wallet account is not an Aleo provider — i.e.\n * the caller passed a wallet account from a different chain. Carries the\n * offending provider's key on `providerKey`.\n */\nexport class NotAleoProviderError extends BaseError {\n public readonly providerKey: string;\n\n constructor(params: { providerKey: string }) {\n super({\n cause: null,\n code: 'not_aleo_provider_error',\n docsUrl: null,\n name: 'NotAleoProviderError',\n shortMessage: 'Provider is not an Aleo wallet provider',\n });\n\n this.providerKey = params.providerKey;\n }\n}\n","import type { NetworkProvider } from '@dynamic-labs-sdk/client';\n\nimport type { AleoNetworkProvider } from '../AleoNetworkProvider.types';\n\n/**\n * Type guard narrowing a generic `NetworkProvider` to `AleoNetworkProvider`.\n * Use this to filter the network-provider registry down to the Aleo\n * network providers.\n *\n * @example\n * ```ts\n * if (isAleoNetworkProvider(networkProvider)) {\n * const network = networkProvider.getNetwork();\n * }\n * ```\n *\n * @param networkProvider - The network provider to check.\n * @returns True if the network provider is an Aleo network provider, false otherwise.\n * @see isAleoWalletAccount\n * @see getNetworkByChainId\n * @notInstrumented\n */\nexport const isAleoNetworkProvider = (\n networkProvider: NetworkProvider\n): networkProvider is AleoNetworkProvider => networkProvider.chain === 'ALEO';\n","import type { WalletAccount } from '@dynamic-labs-sdk/client';\n\nimport type { AleoWalletAccount } from '../AleoWalletAccount.types';\n\n/**\n * Type guard narrowing a generic `WalletAccount` to `AleoWalletAccount`.\n * Use this to filter mixed-chain wallet account lists down to the Aleo\n * accounts.\n *\n * @example\n * ```ts\n * const accounts = getWalletAccounts();\n * const aleoAccounts = accounts.filter(isAleoWalletAccount);\n * ```\n *\n * @param walletAccount - The wallet account to check.\n * @returns True if the wallet account is an Aleo wallet account, false otherwise.\n * @see isAleoNetworkProvider\n * @see isAleoWalletProvider\n * @notInstrumented\n */\nexport const isAleoWalletAccount = (\n walletAccount: WalletAccount\n): walletAccount is AleoWalletAccount => walletAccount.chain === 'ALEO';\n","import type { WalletProvider } from '@dynamic-labs-sdk/client/core';\n\nimport type { AleoWalletProvider } from '../AleoWalletProvider.types';\n\n/**\n * Type guard narrowing a generic `WalletProvider` to `AleoWalletProvider`.\n * Returns `true` when the provider's chain is `'ALEO'`. Mirrors the\n * `is{Chain}WalletProvider` pattern used by the sibling chain packages\n * (Tron, Sui, Aptos) — exposes the Aleo-specific methods like\n * `requestTransaction`, `decrypt`, and `requestRecords` to the caller.\n *\n * @example\n * ```ts\n * if (isAleoWalletProvider(provider)) {\n * const records = await provider.requestRecords({ program: 'credits.aleo' });\n * }\n * ```\n *\n * @param provider - The wallet provider to check.\n * @returns True if the wallet provider is an Aleo wallet provider, false otherwise.\n * @see isAleoWalletAccount\n * @see isAleoNetworkProvider\n * @notInstrumented\n */\n// eslint-disable-next-line custom-rules/require-single-object-param -- standard type-guard signature shared with sibling chains\nexport const isAleoWalletProvider = (\n provider: WalletProvider | AleoWalletProvider\n): provider is AleoWalletProvider => {\n return provider.chain === 'ALEO';\n};\n","import { ALEO_MAINNET_NETWORK_ID } from '../constants';\n\n/**\n * Whether a numeric/string chain id points at the Aleo mainnet (`0`)\n * rather than a testnet. Both numeric and string ids are accepted so\n * callers can pass `walletAccount.activeNetworkId` (which is stringly-\n * typed) directly. `undefined` and `null` resolve to `false` so a\n * stale or unknown id falls back to testnet behaviour at the call\n * site.\n *\n * @notInstrumented\n */\n// eslint-disable-next-line custom-rules/require-single-object-param -- single primitive arg; named-arg ceremony would not improve clarity\nexport const isAleoMainnet = (\n networkId: number | string | undefined | null\n): boolean => {\n if (networkId === undefined || networkId === null) return false;\n if (typeof networkId === 'number') {\n return networkId === ALEO_MAINNET_NETWORK_ID;\n }\n return Number(networkId) === ALEO_MAINNET_NETWORK_ID;\n};\n","import { InvalidAleoTransactionIdError } from '../../errors/InvalidAleoTransactionIdError';\nimport { isAleoMainnet } from '../isAleoMainnet';\n\n/**\n * Aleo transaction ids are bech32-encoded with the `at1` prefix and a body\n * of lowercase alphanumerics — same character set as account addresses. We\n * validate strictly before letting the id reach the URL, refusing `/`, `?`,\n * `#`, `..`, etc. so a hostile id cannot produce path traversal or an open\n * redirect when the rendered URL is opened.\n */\nconst ALEO_TX_ID_PATTERN = /^at1[a-z0-9]{1,62}$/;\n\ntype GetAleoExplorerTxUrlParams = {\n /**\n * `0` = mainnet, `1` = testnet. When omitted, defaults to testnet so a\n * stale UI never accidentally links to a mainnet explorer for a testnet\n * transaction.\n */\n networkId?: number | string;\n /** Aleo transaction id (`at1...`). */\n txId: string;\n};\n\n/**\n * Build the Provable explorer URL for an Aleo transaction id.\n *\n * @example\n * ```ts\n * const url = getAleoExplorerTxUrl({ txId: 'at1abc...', networkId: 0 });\n * // → 'https://explorer.provable.com/transaction/at1abc...'\n * ```\n *\n * @param params.txId - Aleo transaction id (`at1...`).\n * @param [params.networkId] - `0` = mainnet, `1` = testnet.\n * @returns The Provable explorer URL for the transaction.\n * @throws {InvalidAleoTransactionIdError} When `txId` is not a well-formed bech32 Aleo transaction id.\n * @see getNetworkByChainId\n * @see isAleoWalletAccount\n * @notInstrumented\n */\nexport const getAleoExplorerTxUrl = ({\n txId,\n networkId,\n}: GetAleoExplorerTxUrlParams): string => {\n if (!ALEO_TX_ID_PATTERN.test(txId)) {\n throw new InvalidAleoTransactionIdError({ txId });\n }\n const subdomain = isAleoMainnet(networkId) ? '' : 'testnet.';\n return `https://${subdomain}explorer.provable.com/transaction/${txId}`;\n};\n","import { assertPackageVersion } from '@dynamic-labs-sdk/assert-package-version';\n\nimport {\n name as packageName,\n version as packageVersion,\n} from '../../package.json';\nassertPackageVersion(packageName, packageVersion);\n\nexport { AleoFeatureUnsupportedError } from '../errors/AleoFeatureUnsupportedError';\nexport { AleoInvalidTransactionError } from '../errors/AleoInvalidTransactionError';\nexport { InvalidAleoTransactionIdError } from '../errors/InvalidAleoTransactionIdError';\nexport { NotAleoProviderError } from '../errors/NotAleoProviderError';\nexport { isAleoNetworkProvider } from '../isAleoNetworkProvider';\nexport { isAleoWalletAccount } from '../isAleoWalletAccount';\nexport { isAleoWalletProvider } from '../isAleoWalletProvider';\nexport type { AleoNetworkProvider } from '../AleoNetworkProvider.types';\nexport type { AleoWalletAccount } from '../AleoWalletAccount.types';\nexport type {\n AleoDecryptOptions,\n AleoRequestRecordsOptions,\n AleoTransaction,\n AleoTransition,\n AleoWalletProvider,\n} from '../AleoWalletProvider.types';\nexport { getAleoExplorerTxUrl } from '../utils/getAleoExplorerTxUrl';\nexport {\n ALEO_NETWORK_TO_ID_MAP,\n getNetworkByChainId,\n} from '../utils/getNetworkByChainId';\nexport {\n ALEO_MAINNET_NETWORK_ID,\n ALEO_TESTNET_NETWORK_ID,\n MICROCREDITS_PER_CREDIT,\n} from '../utils/constants';\n"],"mappings":";;;;;;;;;;;;;;AASA,IAAa,uBAAb,cAA0CA,mCAAU;CAClD,AAAgB;CAEhB,YAAY,QAAiC;AAC3C,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc;GACf,CAAC;AAEF,OAAK,cAAc,OAAO;;;;;;;;;;;;;;;;;;;;;;;;ACC9B,MAAa,yBACX,oBAC2C,gBAAgB,UAAU;;;;;;;;;;;;;;;;;;;;;ACHvE,MAAa,uBACX,kBACuC,cAAc,UAAU;;;;;;;;;;;;;;;;;;;;;;;;ACEjE,MAAa,wBACX,aACmC;AACnC,QAAO,SAAS,UAAU;;;;;;;;;;;;;;;ACf5B,MAAa,iBACX,cACY;AACZ,KAAI,cAAc,UAAa,cAAc,KAAM,QAAO;AAC1D,KAAI,OAAO,cAAc,SACvB,QAAO,cAAcC;AAEvB,QAAO,OAAO,UAAU,KAAKA;;;;;;;;;;;;ACV/B,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;AA8B3B,MAAa,wBAAwB,EACnC,MACA,gBACwC;AACxC,KAAI,CAAC,mBAAmB,KAAK,KAAK,CAChC,OAAM,IAAIC,oEAA8B,EAAE,MAAM,CAAC;AAGnD,QAAO,WADW,cAAc,UAAU,GAAG,KAAK,WACtB,oCAAoC;;;;;mEC1C7CC,wBAAaC,0BAAe"}
1
+ {"version":3,"file":"index.cjs","names":["BaseError","ALEO_MAINNET_NETWORK_ID","InvalidAleoTransactionIdError","packageName","packageVersion"],"sources":["../src/errors/NotAleoProviderError/NotAleoProviderError.ts","../src/isAleoNetworkProvider/isAleoNetworkProvider.ts","../src/isAleoWalletAccount/isAleoWalletAccount.ts","../src/isAleoWalletProvider/isAleoWalletProvider.ts","../src/utils/isAleoMainnet/isAleoMainnet.ts","../src/utils/getAleoExplorerTxUrl/getAleoExplorerTxUrl.ts","../src/exports/index.ts"],"sourcesContent":["import { BaseError } from '@dynamic-labs-sdk/client';\n\n/**\n * Thrown by Aleo-specific top-level helpers (`signMessage`,\n * `requestTransaction`, `decrypt`, `requestRecords`) when the wallet\n * provider resolved from a wallet account is not an Aleo provider — i.e.\n * the caller passed a wallet account from a different chain. Carries the\n * offending provider's key on `providerKey`.\n */\nexport class NotAleoProviderError extends BaseError {\n public readonly providerKey: string;\n\n constructor(params: { providerKey: string }) {\n super({\n cause: null,\n code: 'not_aleo_provider_error',\n docsUrl: null,\n name: 'NotAleoProviderError',\n shortMessage: 'Provider is not an Aleo wallet provider',\n });\n\n this.providerKey = params.providerKey;\n }\n}\n","import type { NetworkProvider } from '@dynamic-labs-sdk/client';\n\nimport type { AleoNetworkProvider } from '../AleoNetworkProvider.types';\n\n/**\n * Type guard narrowing a generic `NetworkProvider` to `AleoNetworkProvider`.\n * Use this to filter the network-provider registry down to the Aleo\n * network providers.\n *\n * @example\n * ```ts\n * if (isAleoNetworkProvider(networkProvider)) {\n * const network = networkProvider.getNetwork();\n * }\n * ```\n *\n * @param networkProvider - The network provider to check.\n * @returns True if the network provider is an Aleo network provider, false otherwise.\n * @see isAleoWalletAccount\n * @see getNetworkByChainId\n * @notInstrumented\n */\nexport const isAleoNetworkProvider = (\n networkProvider: NetworkProvider\n): networkProvider is AleoNetworkProvider => networkProvider.chain === 'ALEO';\n","import type { WalletAccount } from '@dynamic-labs-sdk/client';\n\nimport type { AleoWalletAccount } from '../AleoWalletAccount.types';\n\n/**\n * Type guard narrowing a generic `WalletAccount` to `AleoWalletAccount`.\n * Use this to filter mixed-chain wallet account lists down to the Aleo\n * accounts.\n *\n * @example\n * ```ts\n * const accounts = getWalletAccounts();\n * const aleoAccounts = accounts.filter(isAleoWalletAccount);\n * ```\n *\n * @param walletAccount - The wallet account to check.\n * @returns True if the wallet account is an Aleo wallet account, false otherwise.\n * @see isAleoNetworkProvider\n * @see isAleoWalletProvider\n * @notInstrumented\n */\nexport const isAleoWalletAccount = (\n walletAccount: WalletAccount\n): walletAccount is AleoWalletAccount => walletAccount.chain === 'ALEO';\n","import type { WalletProvider } from '@dynamic-labs-sdk/client/core';\n\nimport type { AleoWalletProvider } from '../AleoWalletProvider.types';\n\n/**\n * Type guard narrowing a generic `WalletProvider` to `AleoWalletProvider`.\n * Returns `true` when the provider's chain is `'ALEO'`. Mirrors the\n * `is{Chain}WalletProvider` pattern used by the sibling chain packages\n * (Tron, Sui, Aptos) — exposes the Aleo-specific methods like\n * `requestTransaction`, `decrypt`, and `requestRecords` to the caller.\n *\n * @example\n * ```ts\n * if (isAleoWalletProvider(provider)) {\n * const records = await provider.requestRecords({ program: 'credits.aleo' });\n * }\n * ```\n *\n * @param provider - The wallet provider to check.\n * @returns True if the wallet provider is an Aleo wallet provider, false otherwise.\n * @see isAleoWalletAccount\n * @see isAleoNetworkProvider\n * @notInstrumented\n */\n// eslint-disable-next-line custom-rules/require-single-object-param -- standard type-guard signature shared with sibling chains\nexport const isAleoWalletProvider = (\n provider: WalletProvider | AleoWalletProvider\n): provider is AleoWalletProvider => {\n return provider.chain === 'ALEO';\n};\n","import { ALEO_MAINNET_NETWORK_ID } from '../constants';\n\n/**\n * Whether a numeric/string chain id points at the Aleo mainnet (`0`)\n * rather than a testnet. Both numeric and string ids are accepted so\n * callers can pass `walletAccount.activeNetworkId` (which is stringly-\n * typed) directly. `undefined` and `null` resolve to `false` so a\n * stale or unknown id falls back to testnet behaviour at the call\n * site.\n *\n * @notInstrumented\n */\n// eslint-disable-next-line custom-rules/require-single-object-param -- single primitive arg; named-arg ceremony would not improve clarity\nexport const isAleoMainnet = (\n networkId: number | string | undefined | null\n): boolean => {\n if (networkId === undefined || networkId === null) return false;\n if (typeof networkId === 'number') {\n return networkId === ALEO_MAINNET_NETWORK_ID;\n }\n return Number(networkId) === ALEO_MAINNET_NETWORK_ID;\n};\n","import { InvalidAleoTransactionIdError } from '../../errors/InvalidAleoTransactionIdError';\nimport { isAleoMainnet } from '../isAleoMainnet';\n\n/**\n * Aleo transaction ids are bech32-encoded with the `at1` prefix and a body\n * of lowercase alphanumerics — same character set as account addresses. We\n * validate strictly before letting the id reach the URL, refusing `/`, `?`,\n * `#`, `..`, etc. so a hostile id cannot produce path traversal or an open\n * redirect when the rendered URL is opened.\n */\nconst ALEO_TX_ID_PATTERN = /^at1[a-z0-9]{1,62}$/;\n\ntype GetAleoExplorerTxUrlParams = {\n /**\n * `0` = mainnet, `1` = testnet. When omitted, defaults to testnet so a\n * stale UI never accidentally links to a mainnet explorer for a testnet\n * transaction.\n */\n networkId?: number | string;\n /** Aleo transaction id (`at1...`). */\n txId: string;\n};\n\n/**\n * Build the Provable explorer URL for an Aleo transaction id.\n *\n * @example\n * ```ts\n * const url = getAleoExplorerTxUrl({ txId: 'at1abc...', networkId: 0 });\n * // → 'https://explorer.provable.com/transaction/at1abc...'\n * ```\n *\n * @param params.txId - Aleo transaction id (`at1...`).\n * @param [params.networkId] - `0` = mainnet, `1` = testnet.\n * @returns The Provable explorer URL for the transaction.\n * @throws {InvalidAleoTransactionIdError} When `txId` is not a well-formed bech32 Aleo transaction id.\n * @see getNetworkByChainId\n * @see isAleoWalletAccount\n * @notInstrumented\n */\nexport const getAleoExplorerTxUrl = ({\n txId,\n networkId,\n}: GetAleoExplorerTxUrlParams): string => {\n if (!ALEO_TX_ID_PATTERN.test(txId)) {\n throw new InvalidAleoTransactionIdError({ txId });\n }\n const subdomain = isAleoMainnet(networkId) ? '' : 'testnet.';\n return `https://${subdomain}explorer.provable.com/transaction/${txId}`;\n};\n","import { assertPackageVersion } from '@dynamic-labs-sdk/assert-package-version';\n\nimport {\n name as packageName,\n version as packageVersion,\n} from '../../package.json';\nassertPackageVersion(packageName, packageVersion);\n\nexport { AleoFeatureUnsupportedError } from '../errors/AleoFeatureUnsupportedError';\nexport { AleoInvalidTransactionError } from '../errors/AleoInvalidTransactionError';\nexport { AleoTransactionStatusError } from '../errors/AleoTransactionStatusError';\nexport { AleoTransactionTimeoutError } from '../errors/AleoTransactionTimeoutError';\nexport { InvalidAleoTransactionIdError } from '../errors/InvalidAleoTransactionIdError';\nexport { NotAleoProviderError } from '../errors/NotAleoProviderError';\nexport { isAleoNetworkProvider } from '../isAleoNetworkProvider';\nexport { isAleoWalletAccount } from '../isAleoWalletAccount';\nexport { isAleoWalletProvider } from '../isAleoWalletProvider';\nexport type { AleoNetworkProvider } from '../AleoNetworkProvider.types';\nexport type { AleoWalletAccount } from '../AleoWalletAccount.types';\nexport type {\n AleoDecryptOptions,\n AleoRequestRecordsOptions,\n AleoTransaction,\n AleoTransition,\n AleoWalletProvider,\n} from '../AleoWalletProvider.types';\nexport { getAleoExplorerTxUrl } from '../utils/getAleoExplorerTxUrl';\nexport {\n ALEO_NETWORK_TO_ID_MAP,\n getNetworkByChainId,\n} from '../utils/getNetworkByChainId';\nexport {\n ALEO_MAINNET_NETWORK_ID,\n ALEO_TESTNET_NETWORK_ID,\n MICROCREDITS_PER_CREDIT,\n} from '../utils/constants';\n"],"mappings":";;;;;;;;;;;;;;;;AASA,IAAa,uBAAb,cAA0CA,mCAAU;CAClD,AAAgB;CAEhB,YAAY,QAAiC;AAC3C,QAAM;GACJ,OAAO;GACP,MAAM;GACN,SAAS;GACT,MAAM;GACN,cAAc;GACf,CAAC;AAEF,OAAK,cAAc,OAAO;;;;;;;;;;;;;;;;;;;;;;;;ACC9B,MAAa,yBACX,oBAC2C,gBAAgB,UAAU;;;;;;;;;;;;;;;;;;;;;ACHvE,MAAa,uBACX,kBACuC,cAAc,UAAU;;;;;;;;;;;;;;;;;;;;;;;;ACEjE,MAAa,wBACX,aACmC;AACnC,QAAO,SAAS,UAAU;;;;;;;;;;;;;;;ACf5B,MAAa,iBACX,cACY;AACZ,KAAI,cAAc,UAAa,cAAc,KAAM,QAAO;AAC1D,KAAI,OAAO,cAAc,SACvB,QAAO,cAAcC;AAEvB,QAAO,OAAO,UAAU,KAAKA;;;;;;;;;;;;ACV/B,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;AA8B3B,MAAa,wBAAwB,EACnC,MACA,gBACwC;AACxC,KAAI,CAAC,mBAAmB,KAAK,KAAK,CAChC,OAAM,IAAIC,oEAA8B,EAAE,MAAM,CAAC;AAGnD,QAAO,WADW,cAAc,UAAU,GAAG,KAAK,WACtB,oCAAoC;;;;;mEC1C7CC,wBAAaC,0BAAe"}