@dynamic-labs-sdk/aleo 1.4.0 → 1.5.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/dist/{getNetworkByChainId-CGrgWg7H.esm.js → getNetworkByChainId-BcBrMYfo.esm.js} +2 -2
- package/dist/{getNetworkByChainId-CGrgWg7H.esm.js.map → getNetworkByChainId-BcBrMYfo.esm.js.map} +1 -1
- package/dist/{getNetworkByChainId-DNxsKBTx.cjs → getNetworkByChainId-CFFkgNnW.cjs} +2 -2
- package/dist/{getNetworkByChainId-DNxsKBTx.cjs.map → getNetworkByChainId-CFFkgNnW.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/walletStandard.cjs +1 -1
- package/dist/walletStandard.esm.js +1 -1
- package/package.json +3 -3
|
@@ -3,7 +3,7 @@ import { Network } from "@provablehq/aleo-types";
|
|
|
3
3
|
|
|
4
4
|
//#region package.json
|
|
5
5
|
var name = "@dynamic-labs-sdk/aleo";
|
|
6
|
-
var version = "1.
|
|
6
|
+
var version = "1.5.0";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/errors/AleoFeatureUnsupportedError/AleoFeatureUnsupportedError.ts
|
|
@@ -65,4 +65,4 @@ const getNetworkByChainId = ({ chainId }) => {
|
|
|
65
65
|
|
|
66
66
|
//#endregion
|
|
67
67
|
export { MICROCREDITS_PER_CREDIT as a, version as c, ALEO_TESTNET_NETWORK_ID as i, getNetworkByChainId as n, AleoFeatureUnsupportedError as o, ALEO_MAINNET_NETWORK_ID as r, name as s, ALEO_NETWORK_TO_ID_MAP as t };
|
|
68
|
-
//# sourceMappingURL=getNetworkByChainId-
|
|
68
|
+
//# sourceMappingURL=getNetworkByChainId-BcBrMYfo.esm.js.map
|
package/dist/{getNetworkByChainId-CGrgWg7H.esm.js.map → getNetworkByChainId-BcBrMYfo.esm.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNetworkByChainId-
|
|
1
|
+
{"version":3,"file":"getNetworkByChainId-BcBrMYfo.esm.js","names":["ALEO_NETWORK_TO_ID_MAP: Partial<Record<Network, number>>"],"sources":["../package.json","../src/errors/AleoFeatureUnsupportedError/AleoFeatureUnsupportedError.ts","../src/utils/constants.ts","../src/utils/getNetworkByChainId/getNetworkByChainId.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","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 * @param params.chainId The numeric chain id (`0` = mainnet, `1` = testnet).\n * @returns The matching `Network` enum value, or `undefined` when the id is\n * not a known Aleo network.\n * @not-instrumented\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":";;;;;;;;;;;;;;;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;;;;;;;;ACIvC,MAAaA,yBAA2D;EACrE,QAAQ,UAAU;EAClB,QAAQ,UAAU;CACpB;;;;;;;;;;;AAgBD,MAAa,uBAAuB,EAClC,cACoD;AAIpD,QAFE,OAAO,QAAQ,uBAAuB,CACtC,MAAM,GAAG,QAAQ,OAAO,QAAQ,GACnB"}
|
|
@@ -3,7 +3,7 @@ let _provablehq_aleo_types = require("@provablehq/aleo-types");
|
|
|
3
3
|
|
|
4
4
|
//#region package.json
|
|
5
5
|
var name = "@dynamic-labs-sdk/aleo";
|
|
6
|
-
var version = "1.
|
|
6
|
+
var version = "1.5.0";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/errors/AleoFeatureUnsupportedError/AleoFeatureUnsupportedError.ts
|
|
@@ -112,4 +112,4 @@ Object.defineProperty(exports, 'version', {
|
|
|
112
112
|
return version;
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
|
-
//# sourceMappingURL=getNetworkByChainId-
|
|
115
|
+
//# sourceMappingURL=getNetworkByChainId-CFFkgNnW.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNetworkByChainId-
|
|
1
|
+
{"version":3,"file":"getNetworkByChainId-CFFkgNnW.cjs","names":["BaseError","ALEO_NETWORK_TO_ID_MAP: Partial<Record<Network, number>>","Network"],"sources":["../package.json","../src/errors/AleoFeatureUnsupportedError/AleoFeatureUnsupportedError.ts","../src/utils/constants.ts","../src/utils/getNetworkByChainId/getNetworkByChainId.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","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 * @param params.chainId The numeric chain id (`0` = mainnet, `1` = testnet).\n * @returns The matching `Network` enum value, or `undefined` when the id is\n * not a known Aleo network.\n * @not-instrumented\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":";;;;;;;;;;;;;;;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;;;;;;;;ACIvC,MAAaC,yBAA2D;EACrEC,+BAAQ,UAAU;EAClBA,+BAAQ,UAAU;CACpB;;;;;;;;;;;AAgBD,MAAa,uBAAuB,EAClC,cACoD;AAIpD,QAFE,OAAO,QAAQ,uBAAuB,CACtC,MAAM,GAAG,QAAQ,OAAO,QAAQ,GACnB"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_getNetworkByChainId = require('./getNetworkByChainId-
|
|
1
|
+
const require_getNetworkByChainId = require('./getNetworkByChainId-CFFkgNnW.cjs');
|
|
2
2
|
let _dynamic_labs_sdk_assert_package_version = require("@dynamic-labs-sdk/assert-package-version");
|
|
3
3
|
let _dynamic_labs_sdk_client = require("@dynamic-labs-sdk/client");
|
|
4
4
|
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as MICROCREDITS_PER_CREDIT, c as version, i as ALEO_TESTNET_NETWORK_ID, n as getNetworkByChainId, o as AleoFeatureUnsupportedError, r as ALEO_MAINNET_NETWORK_ID, s as name, t as ALEO_NETWORK_TO_ID_MAP } from "./getNetworkByChainId-
|
|
1
|
+
import { a as MICROCREDITS_PER_CREDIT, c as version, i as ALEO_TESTNET_NETWORK_ID, n as getNetworkByChainId, o as AleoFeatureUnsupportedError, r as ALEO_MAINNET_NETWORK_ID, s as name, t as ALEO_NETWORK_TO_ID_MAP } from "./getNetworkByChainId-BcBrMYfo.esm.js";
|
|
2
2
|
import { assertPackageVersion } from "@dynamic-labs-sdk/assert-package-version";
|
|
3
3
|
import { BaseError } from "@dynamic-labs-sdk/client";
|
|
4
4
|
|