@dynamic-labs-sdk/aleo 1.28.0 → 1.30.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.
- package/README.md +20 -0
- package/dist/AleoWalletProvider.types.d.ts +7 -0
- package/dist/AleoWalletProvider.types.d.ts.map +1 -1
- package/dist/InvalidAleoTransactionIdError-CZoNf2SE.esm.js +50 -0
- package/dist/InvalidAleoTransactionIdError-CZoNf2SE.esm.js.map +1 -0
- package/dist/InvalidAleoTransactionIdError-DRDfoh4x.cjs +61 -0
- package/dist/InvalidAleoTransactionIdError-DRDfoh4x.cjs.map +1 -0
- package/dist/{getNetworkByChainId-XUAi3XmZ.cjs → constants-BoB0_3u4.cjs} +2 -46
- package/dist/constants-BoB0_3u4.cjs.map +1 -0
- package/dist/constants-DZ9sVn7x.esm.js +43 -0
- package/dist/constants-DZ9sVn7x.esm.js.map +1 -0
- package/dist/errors/AleoInvalidTransactionError/AleoInvalidTransactionError.d.ts +19 -0
- package/dist/errors/AleoInvalidTransactionError/AleoInvalidTransactionError.d.ts.map +1 -0
- package/dist/errors/AleoInvalidTransactionError/index.d.ts +2 -0
- package/dist/errors/AleoInvalidTransactionError/index.d.ts.map +1 -0
- package/dist/exports/index.d.ts +1 -0
- package/dist/exports/index.d.ts.map +1 -1
- package/dist/exports/waas.d.ts +3 -0
- package/dist/exports/waas.d.ts.map +1 -0
- package/dist/getNetworkByChainId-CydH2vdT.cjs +47 -0
- package/dist/getNetworkByChainId-CydH2vdT.cjs.map +1 -0
- package/dist/getNetworkByChainId-DL6E07FO.esm.js +36 -0
- package/dist/getNetworkByChainId-DL6E07FO.esm.js.map +1 -0
- package/dist/index.cjs +13 -31
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +4 -23
- package/dist/index.esm.js.map +1 -1
- package/dist/registerAleoNetworkProviderBuilder-ByQwv6MA.cjs +158 -0
- package/dist/registerAleoNetworkProviderBuilder-ByQwv6MA.cjs.map +1 -0
- package/dist/registerAleoNetworkProviderBuilder-CMcQJWs3.esm.js +153 -0
- package/dist/registerAleoNetworkProviderBuilder-CMcQJWs3.esm.js.map +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/waas/WaasAleoWalletProvider.types.d.ts +12 -0
- package/dist/waas/WaasAleoWalletProvider.types.d.ts.map +1 -0
- package/dist/waas/addWaasAleoExtension/addWaasAleoExtension.d.ts +12 -0
- package/dist/waas/addWaasAleoExtension/addWaasAleoExtension.d.ts.map +1 -0
- package/dist/waas/addWaasAleoExtension/index.d.ts +2 -0
- package/dist/waas/addWaasAleoExtension/index.d.ts.map +1 -0
- package/dist/waas/utils/createWalletProviderForWaasAleo/createWalletProviderForWaasAleo.d.ts +25 -0
- package/dist/waas/utils/createWalletProviderForWaasAleo/createWalletProviderForWaasAleo.d.ts.map +1 -0
- package/dist/waas/utils/createWalletProviderForWaasAleo/index.d.ts +2 -0
- package/dist/waas/utils/createWalletProviderForWaasAleo/index.d.ts.map +1 -0
- package/dist/waas/utils/inferAleoInputType/index.d.ts +2 -0
- package/dist/waas/utils/inferAleoInputType/index.d.ts.map +1 -0
- package/dist/waas/utils/inferAleoInputType/inferAleoInputType.d.ts +18 -0
- package/dist/waas/utils/inferAleoInputType/inferAleoInputType.d.ts.map +1 -0
- package/dist/waas.cjs +217 -0
- package/dist/waas.cjs.map +1 -0
- package/dist/waas.esm.js +217 -0
- package/dist/waas.esm.js.map +1 -0
- package/dist/walletStandard.cjs +12 -158
- package/dist/walletStandard.cjs.map +1 -1
- package/dist/walletStandard.esm.js +4 -150
- package/dist/walletStandard.esm.js.map +1 -1
- package/package.json +9 -4
- package/dist/getNetworkByChainId-BfyC4NXK.esm.js +0 -75
- package/dist/getNetworkByChainId-BfyC4NXK.esm.js.map +0 -1
- package/dist/getNetworkByChainId-XUAi3XmZ.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -19,3 +19,23 @@ const dynamicClient = createDynamicClient({
|
|
|
19
19
|
});
|
|
20
20
|
addAleoExtension(dynamicClient);
|
|
21
21
|
```
|
|
22
|
+
|
|
23
|
+
## Embedded (WaaS) wallets
|
|
24
|
+
|
|
25
|
+
`addWaasAleoExtension` registers Dynamic's embedded, MPC-backed wallet for Aleo:
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { addWaasAleoExtension } from '@dynamic-labs-sdk/aleo/waas';
|
|
29
|
+
import { createDynamicClient } from '@dynamic-labs-sdk/client';
|
|
30
|
+
|
|
31
|
+
const dynamicClient = createDynamicClient({
|
|
32
|
+
environmentId: '123',
|
|
33
|
+
});
|
|
34
|
+
addWaasAleoExtension(dynamicClient);
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Current limitations of the embedded Aleo wallet:
|
|
38
|
+
|
|
39
|
+
- `signMessage` and `decrypt` are unsupported and throw `AleoFeatureUnsupportedError` — Aleo's MPC signer has no arbitrary-message-signing primitive yet, and the view key never leaves the WaaS iframe.
|
|
40
|
+
- `requestTransaction` supports exactly one transition per call — atomic multi-transition batches aren't exposed by the underlying WaaS client yet.
|
|
41
|
+
- `requestRecords` returns every record owned by the account across all Aleo programs; it does not filter by the requested `program`.
|
|
@@ -9,6 +9,13 @@ import type { AleoWalletAccount } from './AleoWalletAccount.types';
|
|
|
9
9
|
*/
|
|
10
10
|
export type AleoTransition = {
|
|
11
11
|
functionName: string;
|
|
12
|
+
/**
|
|
13
|
+
* The Aleo literal type of each entry in `inputs` (e.g. `address.public`,
|
|
14
|
+
* `u64.private`, `credits.record`), in the same order. Required for MPC/WaaS
|
|
15
|
+
* signing, which needs explicit types to build the transaction's proving
|
|
16
|
+
* circuit — wallet-standard wallets infer types themselves and ignore this.
|
|
17
|
+
*/
|
|
18
|
+
inputTypes?: string[];
|
|
12
19
|
inputs: unknown[];
|
|
13
20
|
program: string;
|
|
14
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AleoWalletProvider.types.d.ts","sourceRoot":"","sources":["../src/AleoWalletProvider.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,cAAc,EAAE,CAAC;CAC/B,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,GAAG;IAChD,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,kBAAkB,CAAC;QAC7B,aAAa,EAAE,iBAAiB,CAAC;KAClC,KAAK,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrC;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE;QACtB,OAAO,CAAC,EAAE,yBAAyB,CAAC;QACpC,OAAO,EAAE,MAAM,CAAC;QAChB,aAAa,EAAE,iBAAiB,CAAC;KAClC,KAAK,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,CAAA;KAAE,CAAC,CAAC;IACtC;;;OAGG;IACH,kBAAkB,EAAE,CAAC,IAAI,EAAE;QACzB,WAAW,EAAE,eAAe,CAAC;QAC7B,aAAa,EAAE,iBAAiB,CAAC;KAClC,KAAK,OAAO,CAAC;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC1C,CAAC"}
|
|
1
|
+
{"version":3,"file":"AleoWalletProvider.types.d.ts","sourceRoot":"","sources":["../src/AleoWalletProvider.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,cAAc,EAAE,CAAC;CAC/B,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,GAAG;IAChD,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,kBAAkB,CAAC;QAC7B,aAAa,EAAE,iBAAiB,CAAC;KAClC,KAAK,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACrC;;;OAGG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE;QACtB,OAAO,CAAC,EAAE,yBAAyB,CAAC;QACpC,OAAO,EAAE,MAAM,CAAC;QAChB,aAAa,EAAE,iBAAiB,CAAC;KAClC,KAAK,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,CAAA;KAAE,CAAC,CAAC;IACtC;;;OAGG;IACH,kBAAkB,EAAE,CAAC,IAAI,EAAE;QACzB,WAAW,EAAE,eAAe,CAAC;QAC7B,aAAa,EAAE,iBAAiB,CAAC;KAClC,KAAK,OAAO,CAAC;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC1C,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { BaseError } from "@dynamic-labs-sdk/client";
|
|
2
|
+
|
|
3
|
+
//#region src/errors/AleoInvalidTransactionError/AleoInvalidTransactionError.ts
|
|
4
|
+
/**
|
|
5
|
+
* Thrown when an Aleo transaction is malformed or contains invalid inputs
|
|
6
|
+
* before it is submitted to the WaaS client.
|
|
7
|
+
*
|
|
8
|
+
* @example new AleoInvalidTransactionError({
|
|
9
|
+
* code: 'aleo_transaction_no_transitions',
|
|
10
|
+
* reason: 'transaction must contain at least one transition',
|
|
11
|
+
* })
|
|
12
|
+
* @see AleoFeatureUnsupportedError
|
|
13
|
+
* @see InvalidAleoTransactionIdError
|
|
14
|
+
*/
|
|
15
|
+
var AleoInvalidTransactionError = class extends BaseError {
|
|
16
|
+
constructor(params) {
|
|
17
|
+
super({
|
|
18
|
+
cause: null,
|
|
19
|
+
code: params.code,
|
|
20
|
+
docsUrl: null,
|
|
21
|
+
name: "AleoInvalidTransactionError",
|
|
22
|
+
shortMessage: `Invalid Aleo transaction: ${params.reason}`
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
};
|
|
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 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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvalidAleoTransactionIdError-CZoNf2SE.esm.js","names":[],"sources":["../src/errors/AleoInvalidTransactionError/AleoInvalidTransactionError.ts","../src/errors/InvalidAleoTransactionIdError/InvalidAleoTransactionIdError.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","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":";;;;;;;;;;;;;;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;;;;;;;;;;;ACdN,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,61 @@
|
|
|
1
|
+
let _dynamic_labs_sdk_client = require("@dynamic-labs-sdk/client");
|
|
2
|
+
|
|
3
|
+
//#region src/errors/AleoInvalidTransactionError/AleoInvalidTransactionError.ts
|
|
4
|
+
/**
|
|
5
|
+
* Thrown when an Aleo transaction is malformed or contains invalid inputs
|
|
6
|
+
* before it is submitted to the WaaS client.
|
|
7
|
+
*
|
|
8
|
+
* @example new AleoInvalidTransactionError({
|
|
9
|
+
* code: 'aleo_transaction_no_transitions',
|
|
10
|
+
* reason: 'transaction must contain at least one transition',
|
|
11
|
+
* })
|
|
12
|
+
* @see AleoFeatureUnsupportedError
|
|
13
|
+
* @see InvalidAleoTransactionIdError
|
|
14
|
+
*/
|
|
15
|
+
var AleoInvalidTransactionError = class extends _dynamic_labs_sdk_client.BaseError {
|
|
16
|
+
constructor(params) {
|
|
17
|
+
super({
|
|
18
|
+
cause: null,
|
|
19
|
+
code: params.code,
|
|
20
|
+
docsUrl: null,
|
|
21
|
+
name: "AleoInvalidTransactionError",
|
|
22
|
+
shortMessage: `Invalid Aleo transaction: ${params.reason}`
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
};
|
|
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
|
+
//#endregion
|
|
49
|
+
Object.defineProperty(exports, 'AleoInvalidTransactionError', {
|
|
50
|
+
enumerable: true,
|
|
51
|
+
get: function () {
|
|
52
|
+
return AleoInvalidTransactionError;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(exports, 'InvalidAleoTransactionIdError', {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function () {
|
|
58
|
+
return InvalidAleoTransactionIdError;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
//# sourceMappingURL=InvalidAleoTransactionIdError-DRDfoh4x.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvalidAleoTransactionIdError-DRDfoh4x.cjs","names":["BaseError","BaseError"],"sources":["../src/errors/AleoInvalidTransactionError/AleoInvalidTransactionError.ts","../src/errors/InvalidAleoTransactionIdError/InvalidAleoTransactionIdError.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","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":";;;;;;;;;;;;;;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;;;;;;;;;;;ACdN,IAAa,gCAAb,cAAmDC,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"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
let _dynamic_labs_sdk_client = require("@dynamic-labs-sdk/client");
|
|
2
|
-
let _provablehq_aleo_types = require("@provablehq/aleo-types");
|
|
3
2
|
|
|
4
3
|
//#region package.json
|
|
5
4
|
var name = "@dynamic-labs-sdk/aleo";
|
|
6
|
-
var version = "1.
|
|
5
|
+
var version = "1.30.0";
|
|
7
6
|
|
|
8
7
|
//#endregion
|
|
9
8
|
//#region src/errors/AleoFeatureUnsupportedError/AleoFeatureUnsupportedError.ts
|
|
@@ -39,37 +38,6 @@ const MICROCREDITS_PER_CREDIT = 1e6;
|
|
|
39
38
|
const ALEO_MAINNET_NETWORK_ID = 0;
|
|
40
39
|
const ALEO_TESTNET_NETWORK_ID = 1;
|
|
41
40
|
|
|
42
|
-
//#endregion
|
|
43
|
-
//#region src/utils/getNetworkByChainId/getNetworkByChainId.ts
|
|
44
|
-
/**
|
|
45
|
-
* Map from `@provablehq/aleo-types` Network enum to the numeric chain id used
|
|
46
|
-
* everywhere else in the SDK (`0` = mainnet, `1` = testnet).
|
|
47
|
-
*/
|
|
48
|
-
const ALEO_NETWORK_TO_ID_MAP = {
|
|
49
|
-
[_provablehq_aleo_types.Network.MAINNET]: ALEO_MAINNET_NETWORK_ID,
|
|
50
|
-
[_provablehq_aleo_types.Network.TESTNET]: ALEO_TESTNET_NETWORK_ID
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* Resolve the `@provablehq/aleo-types` Network enum value for a numeric
|
|
54
|
-
* chain id, the bridge between the SDK's chain ids and the on-chain
|
|
55
|
-
* network identifier the Aleo libraries expect.
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* ```ts
|
|
59
|
-
* const network = getNetworkByChainId({ chainId: 0 });
|
|
60
|
-
* // → Network.MAINNET
|
|
61
|
-
* ```
|
|
62
|
-
*
|
|
63
|
-
* @param params.chainId - The numeric chain id (`0` = mainnet, `1` = testnet).
|
|
64
|
-
* @returns The matching `Network` enum value, or `undefined` when the id is not a known Aleo network.
|
|
65
|
-
* @see getAleoExplorerTxUrl
|
|
66
|
-
* @see isAleoNetworkProvider
|
|
67
|
-
* @notInstrumented
|
|
68
|
-
*/
|
|
69
|
-
const getNetworkByChainId = ({ chainId }) => {
|
|
70
|
-
return Object.entries(ALEO_NETWORK_TO_ID_MAP).find(([, id]) => id === chainId)?.[0];
|
|
71
|
-
};
|
|
72
|
-
|
|
73
41
|
//#endregion
|
|
74
42
|
Object.defineProperty(exports, 'ALEO_MAINNET_NETWORK_ID', {
|
|
75
43
|
enumerable: true,
|
|
@@ -77,12 +45,6 @@ Object.defineProperty(exports, 'ALEO_MAINNET_NETWORK_ID', {
|
|
|
77
45
|
return ALEO_MAINNET_NETWORK_ID;
|
|
78
46
|
}
|
|
79
47
|
});
|
|
80
|
-
Object.defineProperty(exports, 'ALEO_NETWORK_TO_ID_MAP', {
|
|
81
|
-
enumerable: true,
|
|
82
|
-
get: function () {
|
|
83
|
-
return ALEO_NETWORK_TO_ID_MAP;
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
48
|
Object.defineProperty(exports, 'ALEO_TESTNET_NETWORK_ID', {
|
|
87
49
|
enumerable: true,
|
|
88
50
|
get: function () {
|
|
@@ -101,12 +63,6 @@ Object.defineProperty(exports, 'MICROCREDITS_PER_CREDIT', {
|
|
|
101
63
|
return MICROCREDITS_PER_CREDIT;
|
|
102
64
|
}
|
|
103
65
|
});
|
|
104
|
-
Object.defineProperty(exports, 'getNetworkByChainId', {
|
|
105
|
-
enumerable: true,
|
|
106
|
-
get: function () {
|
|
107
|
-
return getNetworkByChainId;
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
66
|
Object.defineProperty(exports, 'name', {
|
|
111
67
|
enumerable: true,
|
|
112
68
|
get: function () {
|
|
@@ -119,4 +75,4 @@ Object.defineProperty(exports, 'version', {
|
|
|
119
75
|
return version;
|
|
120
76
|
}
|
|
121
77
|
});
|
|
122
|
-
//# sourceMappingURL=
|
|
78
|
+
//# sourceMappingURL=constants-BoB0_3u4.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants-BoB0_3u4.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"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { BaseError } from "@dynamic-labs-sdk/client";
|
|
2
|
+
|
|
3
|
+
//#region package.json
|
|
4
|
+
var name = "@dynamic-labs-sdk/aleo";
|
|
5
|
+
var version = "1.30.0";
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/errors/AleoFeatureUnsupportedError/AleoFeatureUnsupportedError.ts
|
|
9
|
+
/**
|
|
10
|
+
* Thrown when an Aleo wallet does not advertise a feature the caller asked
|
|
11
|
+
* for — e.g. a wallet that lacks `aleo:decrypt` when `decrypt(...)` is
|
|
12
|
+
* invoked. Carries the feature name and the wallet display name so the
|
|
13
|
+
* UI / logs can surface which wallet was missing what.
|
|
14
|
+
*/
|
|
15
|
+
var AleoFeatureUnsupportedError = class extends BaseError {
|
|
16
|
+
featureName;
|
|
17
|
+
walletName;
|
|
18
|
+
constructor(params) {
|
|
19
|
+
super({
|
|
20
|
+
cause: null,
|
|
21
|
+
code: "aleo_feature_unsupported_error",
|
|
22
|
+
docsUrl: null,
|
|
23
|
+
name: "AleoFeatureUnsupportedError",
|
|
24
|
+
shortMessage: `${params.walletName} does not support ${params.featureName}`
|
|
25
|
+
});
|
|
26
|
+
this.featureName = params.featureName;
|
|
27
|
+
this.walletName = params.walletName;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/utils/constants.ts
|
|
33
|
+
/**
|
|
34
|
+
* Aleo credits are denominated in microcredits — 1 credit = 1,000,000 mc.
|
|
35
|
+
* Mirrors the SUN_PER_TRX / lamports-per-sol pattern in sibling chain packages.
|
|
36
|
+
*/
|
|
37
|
+
const MICROCREDITS_PER_CREDIT = 1e6;
|
|
38
|
+
const ALEO_MAINNET_NETWORK_ID = 0;
|
|
39
|
+
const ALEO_TESTNET_NETWORK_ID = 1;
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
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-DZ9sVn7x.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants-DZ9sVn7x.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,19 @@
|
|
|
1
|
+
import { BaseError } from '@dynamic-labs-sdk/client';
|
|
2
|
+
/**
|
|
3
|
+
* Thrown when an Aleo transaction is malformed or contains invalid inputs
|
|
4
|
+
* before it is submitted to the WaaS client.
|
|
5
|
+
*
|
|
6
|
+
* @example new AleoInvalidTransactionError({
|
|
7
|
+
* code: 'aleo_transaction_no_transitions',
|
|
8
|
+
* reason: 'transaction must contain at least one transition',
|
|
9
|
+
* })
|
|
10
|
+
* @see AleoFeatureUnsupportedError
|
|
11
|
+
* @see InvalidAleoTransactionIdError
|
|
12
|
+
*/
|
|
13
|
+
export declare class AleoInvalidTransactionError extends BaseError {
|
|
14
|
+
constructor(params: {
|
|
15
|
+
code: string;
|
|
16
|
+
reason: string;
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=AleoInvalidTransactionError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AleoInvalidTransactionError.d.ts","sourceRoot":"","sources":["../../../src/errors/AleoInvalidTransactionError/AleoInvalidTransactionError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD;;;;;;;;;;GAUG;AACH,qBAAa,2BAA4B,SAAQ,SAAS;gBAC5C,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;CASrD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/errors/AleoInvalidTransactionError/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC"}
|
package/dist/exports/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { AleoFeatureUnsupportedError } from '../errors/AleoFeatureUnsupportedError';
|
|
2
|
+
export { AleoInvalidTransactionError } from '../errors/AleoInvalidTransactionError';
|
|
2
3
|
export { InvalidAleoTransactionIdError } from '../errors/InvalidAleoTransactionIdError';
|
|
3
4
|
export { NotAleoProviderError } from '../errors/NotAleoProviderError';
|
|
4
5
|
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,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,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 @@
|
|
|
1
|
+
{"version":3,"file":"waas.d.ts","sourceRoot":"","sources":["../../src/exports/waas.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,YAAY,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const require_constants = require('./constants-BoB0_3u4.cjs');
|
|
2
|
+
let _provablehq_aleo_types = require("@provablehq/aleo-types");
|
|
3
|
+
|
|
4
|
+
//#region src/utils/getNetworkByChainId/getNetworkByChainId.ts
|
|
5
|
+
/**
|
|
6
|
+
* Map from `@provablehq/aleo-types` Network enum to the numeric chain id used
|
|
7
|
+
* everywhere else in the SDK (`0` = mainnet, `1` = testnet).
|
|
8
|
+
*/
|
|
9
|
+
const ALEO_NETWORK_TO_ID_MAP = {
|
|
10
|
+
[_provablehq_aleo_types.Network.MAINNET]: require_constants.ALEO_MAINNET_NETWORK_ID,
|
|
11
|
+
[_provablehq_aleo_types.Network.TESTNET]: require_constants.ALEO_TESTNET_NETWORK_ID
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Resolve the `@provablehq/aleo-types` Network enum value for a numeric
|
|
15
|
+
* chain id, the bridge between the SDK's chain ids and the on-chain
|
|
16
|
+
* network identifier the Aleo libraries expect.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const network = getNetworkByChainId({ chainId: 0 });
|
|
21
|
+
* // → Network.MAINNET
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @param params.chainId - The numeric chain id (`0` = mainnet, `1` = testnet).
|
|
25
|
+
* @returns The matching `Network` enum value, or `undefined` when the id is not a known Aleo network.
|
|
26
|
+
* @see getAleoExplorerTxUrl
|
|
27
|
+
* @see isAleoNetworkProvider
|
|
28
|
+
* @notInstrumented
|
|
29
|
+
*/
|
|
30
|
+
const getNetworkByChainId = ({ chainId }) => {
|
|
31
|
+
return Object.entries(ALEO_NETWORK_TO_ID_MAP).find(([, id]) => id === chainId)?.[0];
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
Object.defineProperty(exports, 'ALEO_NETWORK_TO_ID_MAP', {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () {
|
|
38
|
+
return ALEO_NETWORK_TO_ID_MAP;
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
Object.defineProperty(exports, 'getNetworkByChainId', {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function () {
|
|
44
|
+
return getNetworkByChainId;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=getNetworkByChainId-CydH2vdT.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getNetworkByChainId-CydH2vdT.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"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { n as ALEO_TESTNET_NETWORK_ID, t as ALEO_MAINNET_NETWORK_ID } from "./constants-DZ9sVn7x.esm.js";
|
|
2
|
+
import { Network } from "@provablehq/aleo-types";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/getNetworkByChainId/getNetworkByChainId.ts
|
|
5
|
+
/**
|
|
6
|
+
* Map from `@provablehq/aleo-types` Network enum to the numeric chain id used
|
|
7
|
+
* everywhere else in the SDK (`0` = mainnet, `1` = testnet).
|
|
8
|
+
*/
|
|
9
|
+
const ALEO_NETWORK_TO_ID_MAP = {
|
|
10
|
+
[Network.MAINNET]: ALEO_MAINNET_NETWORK_ID,
|
|
11
|
+
[Network.TESTNET]: ALEO_TESTNET_NETWORK_ID
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Resolve the `@provablehq/aleo-types` Network enum value for a numeric
|
|
15
|
+
* chain id, the bridge between the SDK's chain ids and the on-chain
|
|
16
|
+
* network identifier the Aleo libraries expect.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const network = getNetworkByChainId({ chainId: 0 });
|
|
21
|
+
* // → Network.MAINNET
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @param params.chainId - The numeric chain id (`0` = mainnet, `1` = testnet).
|
|
25
|
+
* @returns The matching `Network` enum value, or `undefined` when the id is not a known Aleo network.
|
|
26
|
+
* @see getAleoExplorerTxUrl
|
|
27
|
+
* @see isAleoNetworkProvider
|
|
28
|
+
* @notInstrumented
|
|
29
|
+
*/
|
|
30
|
+
const getNetworkByChainId = ({ chainId }) => {
|
|
31
|
+
return Object.entries(ALEO_NETWORK_TO_ID_MAP).find(([, id]) => id === chainId)?.[0];
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { getNetworkByChainId as n, ALEO_NETWORK_TO_ID_MAP as t };
|
|
36
|
+
//# sourceMappingURL=getNetworkByChainId-DL6E07FO.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getNetworkByChainId-DL6E07FO.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,28 +1,9 @@
|
|
|
1
|
-
const
|
|
1
|
+
const require_constants = require('./constants-BoB0_3u4.cjs');
|
|
2
|
+
const require_InvalidAleoTransactionIdError = require('./InvalidAleoTransactionIdError-DRDfoh4x.cjs');
|
|
3
|
+
const require_getNetworkByChainId = require('./getNetworkByChainId-CydH2vdT.cjs');
|
|
2
4
|
let _dynamic_labs_sdk_assert_package_version = require("@dynamic-labs-sdk/assert-package-version");
|
|
3
5
|
let _dynamic_labs_sdk_client = require("@dynamic-labs-sdk/client");
|
|
4
6
|
|
|
5
|
-
//#region src/errors/InvalidAleoTransactionIdError/InvalidAleoTransactionIdError.ts
|
|
6
|
-
/**
|
|
7
|
-
* Thrown when an input meant to be an Aleo transaction id (`at1...`) does
|
|
8
|
-
* not match the bech32 pattern. Carries the offending value on `txId` for
|
|
9
|
-
* inclusion in error logs / UI surfaces.
|
|
10
|
-
*/
|
|
11
|
-
var InvalidAleoTransactionIdError = class extends _dynamic_labs_sdk_client.BaseError {
|
|
12
|
-
txId;
|
|
13
|
-
constructor(params) {
|
|
14
|
-
super({
|
|
15
|
-
cause: null,
|
|
16
|
-
code: "invalid_aleo_transaction_id_error",
|
|
17
|
-
docsUrl: null,
|
|
18
|
-
name: "InvalidAleoTransactionIdError",
|
|
19
|
-
shortMessage: `Invalid Aleo transaction id: ${params.txId}`
|
|
20
|
-
});
|
|
21
|
-
this.txId = params.txId;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
//#endregion
|
|
26
7
|
//#region src/errors/NotAleoProviderError/NotAleoProviderError.ts
|
|
27
8
|
/**
|
|
28
9
|
* Thrown by Aleo-specific top-level helpers (`signMessage`,
|
|
@@ -128,8 +109,8 @@ const isAleoWalletProvider = (provider) => {
|
|
|
128
109
|
*/
|
|
129
110
|
const isAleoMainnet = (networkId) => {
|
|
130
111
|
if (networkId === void 0 || networkId === null) return false;
|
|
131
|
-
if (typeof networkId === "number") return networkId ===
|
|
132
|
-
return Number(networkId) ===
|
|
112
|
+
if (typeof networkId === "number") return networkId === require_constants.ALEO_MAINNET_NETWORK_ID;
|
|
113
|
+
return Number(networkId) === require_constants.ALEO_MAINNET_NETWORK_ID;
|
|
133
114
|
};
|
|
134
115
|
|
|
135
116
|
//#endregion
|
|
@@ -160,21 +141,22 @@ const ALEO_TX_ID_PATTERN = /^at1[a-z0-9]{1,62}$/;
|
|
|
160
141
|
* @notInstrumented
|
|
161
142
|
*/
|
|
162
143
|
const getAleoExplorerTxUrl = ({ txId, networkId }) => {
|
|
163
|
-
if (!ALEO_TX_ID_PATTERN.test(txId)) throw new InvalidAleoTransactionIdError({ txId });
|
|
144
|
+
if (!ALEO_TX_ID_PATTERN.test(txId)) throw new require_InvalidAleoTransactionIdError.InvalidAleoTransactionIdError({ txId });
|
|
164
145
|
return `https://${isAleoMainnet(networkId) ? "" : "testnet."}explorer.provable.com/transaction/${txId}`;
|
|
165
146
|
};
|
|
166
147
|
|
|
167
148
|
//#endregion
|
|
168
149
|
//#region src/exports/index.ts
|
|
169
|
-
(0, _dynamic_labs_sdk_assert_package_version.assertPackageVersion)(
|
|
150
|
+
(0, _dynamic_labs_sdk_assert_package_version.assertPackageVersion)(require_constants.name, require_constants.version);
|
|
170
151
|
|
|
171
152
|
//#endregion
|
|
172
|
-
exports.ALEO_MAINNET_NETWORK_ID =
|
|
153
|
+
exports.ALEO_MAINNET_NETWORK_ID = require_constants.ALEO_MAINNET_NETWORK_ID;
|
|
173
154
|
exports.ALEO_NETWORK_TO_ID_MAP = require_getNetworkByChainId.ALEO_NETWORK_TO_ID_MAP;
|
|
174
|
-
exports.ALEO_TESTNET_NETWORK_ID =
|
|
175
|
-
exports.AleoFeatureUnsupportedError =
|
|
176
|
-
exports.
|
|
177
|
-
exports.
|
|
155
|
+
exports.ALEO_TESTNET_NETWORK_ID = require_constants.ALEO_TESTNET_NETWORK_ID;
|
|
156
|
+
exports.AleoFeatureUnsupportedError = require_constants.AleoFeatureUnsupportedError;
|
|
157
|
+
exports.AleoInvalidTransactionError = require_InvalidAleoTransactionIdError.AleoInvalidTransactionError;
|
|
158
|
+
exports.InvalidAleoTransactionIdError = require_InvalidAleoTransactionIdError.InvalidAleoTransactionIdError;
|
|
159
|
+
exports.MICROCREDITS_PER_CREDIT = require_constants.MICROCREDITS_PER_CREDIT;
|
|
178
160
|
exports.NotAleoProviderError = NotAleoProviderError;
|
|
179
161
|
exports.getAleoExplorerTxUrl = getAleoExplorerTxUrl;
|
|
180
162
|
exports.getNetworkByChainId = require_getNetworkByChainId.getNetworkByChainId;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["BaseError","
|
|
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"}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,28 +1,9 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as name, i as AleoFeatureUnsupportedError, n as ALEO_TESTNET_NETWORK_ID, o as version, r as MICROCREDITS_PER_CREDIT, t as ALEO_MAINNET_NETWORK_ID } from "./constants-DZ9sVn7x.esm.js";
|
|
2
|
+
import { n as AleoInvalidTransactionError, t as InvalidAleoTransactionIdError } from "./InvalidAleoTransactionIdError-CZoNf2SE.esm.js";
|
|
3
|
+
import { n as getNetworkByChainId, t as ALEO_NETWORK_TO_ID_MAP } from "./getNetworkByChainId-DL6E07FO.esm.js";
|
|
2
4
|
import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
|
|
3
5
|
import { BaseError } from "@dynamic-labs-sdk/client";
|
|
4
6
|
|
|
5
|
-
//#region src/errors/InvalidAleoTransactionIdError/InvalidAleoTransactionIdError.ts
|
|
6
|
-
/**
|
|
7
|
-
* Thrown when an input meant to be an Aleo transaction id (`at1...`) does
|
|
8
|
-
* not match the bech32 pattern. Carries the offending value on `txId` for
|
|
9
|
-
* inclusion in error logs / UI surfaces.
|
|
10
|
-
*/
|
|
11
|
-
var InvalidAleoTransactionIdError = class extends BaseError {
|
|
12
|
-
txId;
|
|
13
|
-
constructor(params) {
|
|
14
|
-
super({
|
|
15
|
-
cause: null,
|
|
16
|
-
code: "invalid_aleo_transaction_id_error",
|
|
17
|
-
docsUrl: null,
|
|
18
|
-
name: "InvalidAleoTransactionIdError",
|
|
19
|
-
shortMessage: `Invalid Aleo transaction id: ${params.txId}`
|
|
20
|
-
});
|
|
21
|
-
this.txId = params.txId;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
//#endregion
|
|
26
7
|
//#region src/errors/NotAleoProviderError/NotAleoProviderError.ts
|
|
27
8
|
/**
|
|
28
9
|
* Thrown by Aleo-specific top-level helpers (`signMessage`,
|
|
@@ -169,5 +150,5 @@ const getAleoExplorerTxUrl = ({ txId, networkId }) => {
|
|
|
169
150
|
assertPackageVersion(name, version);
|
|
170
151
|
|
|
171
152
|
//#endregion
|
|
172
|
-
export { ALEO_MAINNET_NETWORK_ID, ALEO_NETWORK_TO_ID_MAP, ALEO_TESTNET_NETWORK_ID, AleoFeatureUnsupportedError, InvalidAleoTransactionIdError, MICROCREDITS_PER_CREDIT, NotAleoProviderError, getAleoExplorerTxUrl, getNetworkByChainId, isAleoNetworkProvider, isAleoWalletAccount, isAleoWalletProvider };
|
|
153
|
+
export { ALEO_MAINNET_NETWORK_ID, ALEO_NETWORK_TO_ID_MAP, ALEO_TESTNET_NETWORK_ID, AleoFeatureUnsupportedError, AleoInvalidTransactionError, InvalidAleoTransactionIdError, MICROCREDITS_PER_CREDIT, NotAleoProviderError, getAleoExplorerTxUrl, getNetworkByChainId, isAleoNetworkProvider, isAleoWalletAccount, isAleoWalletProvider };
|
|
173
154
|
//# sourceMappingURL=index.esm.js.map
|