@locuschain/lib 0.0.12 → 0.0.16-beta.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/autogen/locus-tx.d.mts +2 -2
- package/dist/autogen/rpc-api-spec.d.mts +110 -110
- package/dist/autogen/rpc.d.mts +112 -112
- package/dist/autogen/types/common/asset-object-transfer.d.mts +1 -1
- package/dist/autogen/types/common/asset-proof-objects.d.mts +1 -1
- package/dist/autogen/types/common/asset-transfer-info.d.mts +3 -3
- package/dist/autogen/types/common/contract-exec-status.d.mts +1 -1
- package/dist/autogen/types/common/index.d.mts +47 -47
- package/dist/autogen/types/common/ref-vtx.d.mts +1 -1
- package/dist/autogen/types/common/round-state-detail.d.mts +1 -1
- package/dist/autogen/types/common/rpc-data-trade-result.d.mts +1 -1
- package/dist/autogen/types/common/transaction-sender-index.d.mts +1 -1
- package/dist/autogen/types/common/transfer-info.d.mts +1 -1
- package/dist/autogen/types/common/vm-engine-block.d.mts +1 -1
- package/dist/autogen/types/common/vm-tx-state.d.mts +4 -4
- package/dist/autogen/types/consts/index.d.mts +3 -3
- package/dist/autogen/types/rpc/heights-result.d.mts +1 -1
- package/dist/autogen/types/rpc/index.d.mts +100 -100
- package/dist/autogen/types/rpc/params-account-heights.d.mts +1 -1
- package/dist/autogen/types/rpc/params-call-contract.d.mts +1 -1
- package/dist/autogen/types/rpc/params-create-contract.d.mts +1 -1
- package/dist/autogen/types/rpc/params-download-account-txs.d.mts +1 -1
- package/dist/autogen/types/rpc/params-provide-script.d.mts +1 -1
- package/dist/autogen/types/rpc/params-transfer-coin-express.d.mts +1 -1
- package/dist/autogen/types/rpc/params-transfer-tokens.d.mts +1 -1
- package/dist/autogen/types/rpc/rpc-get-account-asset-list-result.d.mts +1 -1
- package/dist/autogen/types/rpc/rpc-get-account-asset-object-result.d.mts +1 -1
- package/dist/autogen/types/rpc/rpc-get-account-token-list-result.d.mts +1 -1
- package/dist/autogen/types/rpc/rpc-get-inactive-tx-list-result.d.mts +2 -2
- package/dist/autogen/types/rpc/rpc-get-mont-info-list-result.d.mts +1 -1
- package/dist/autogen/types/rpc/rpc-get-world-round-state-result.d.mts +1 -1
- package/dist/autogen/types/rpc/upload-heights-result.d.mts +1 -1
- package/dist/autogen/types/tx/index.d.mts +49 -49
- package/dist/autogen/types/tx/tx-accept-script-after-time-lock.d.mts +4 -4
- package/dist/autogen/types/tx/tx-accept-script.d.mts +3 -3
- package/dist/autogen/types/tx/tx-activate-all-assets.d.mts +5 -5
- package/dist/autogen/types/tx/tx-activate-asset-object.d.mts +4 -4
- package/dist/autogen/types/tx/tx-activate-call-contract.d.mts +4 -4
- package/dist/autogen/types/tx/tx-activate-coin.d.mts +3 -3
- package/dist/autogen/types/tx/tx-activate-contract-result.d.mts +6 -6
- package/dist/autogen/types/tx/tx-activate-contract-reward.d.mts +3 -3
- package/dist/autogen/types/tx/tx-activate-contract-transfer.d.mts +5 -5
- package/dist/autogen/types/tx/tx-activate-data-synth-account.d.mts +3 -3
- package/dist/autogen/types/tx/tx-activate-foundation-reserve.d.mts +2 -2
- package/dist/autogen/types/tx/tx-activate-incentive.d.mts +2 -2
- package/dist/autogen/types/tx/tx-activate-lock-stake-for-vme.d.mts +4 -4
- package/dist/autogen/types/tx/tx-activate-open-contract.d.mts +4 -4
- package/dist/autogen/types/tx/tx-activate-open-synth-account.d.mts +3 -3
- package/dist/autogen/types/tx/tx-activate-open-vm-engine.d.mts +4 -4
- package/dist/autogen/types/tx/tx-activate-token.d.mts +4 -4
- package/dist/autogen/types/tx/tx-become-guest.d.mts +2 -2
- package/dist/autogen/types/tx/tx-become-host.d.mts +2 -2
- package/dist/autogen/types/tx/tx-burn-asset-object.d.mts +3 -3
- package/dist/autogen/types/tx/tx-burn-token.d.mts +3 -3
- package/dist/autogen/types/tx/tx-call-contract.d.mts +4 -4
- package/dist/autogen/types/tx/tx-change-foundation-account.d.mts +2 -2
- package/dist/autogen/types/tx/tx-change-keypair.d.mts +3 -3
- package/dist/autogen/types/tx/tx-change-vkey.d.mts +2 -2
- package/dist/autogen/types/tx/tx-close-account.d.mts +4 -4
- package/dist/autogen/types/tx/tx-contract-blank-reward.d.mts +2 -2
- package/dist/autogen/types/tx/tx-contract-transfer-reward.d.mts +2 -2
- package/dist/autogen/types/tx/tx-create-asset-object.d.mts +3 -3
- package/dist/autogen/types/tx/tx-create-contract.d.mts +4 -4
- package/dist/autogen/types/tx/tx-create-synth-account.d.mts +2 -2
- package/dist/autogen/types/tx/tx-create-token.d.mts +3 -3
- package/dist/autogen/types/tx/tx-create-vm-engine.d.mts +2 -2
- package/dist/autogen/types/tx/tx-dummy.d.mts +2 -2
- package/dist/autogen/types/tx/tx-finalize.d.mts +2 -2
- package/dist/autogen/types/tx/tx-genesis-account.d.mts +3 -3
- package/dist/autogen/types/tx/tx-lead-vtx.d.mts +3 -3
- package/dist/autogen/types/tx/tx-lock-stake-for-vme.d.mts +2 -2
- package/dist/autogen/types/tx/tx-open-account.d.mts +5 -5
- package/dist/autogen/types/tx/tx-post-data-synth-account.d.mts +2 -2
- package/dist/autogen/types/tx/tx-post-data.d.mts +2 -2
- package/dist/autogen/types/tx/tx-provide-script.d.mts +3 -3
- package/dist/autogen/types/tx/tx-revoke.d.mts +6 -6
- package/dist/autogen/types/tx/tx-transfer-asset-object.d.mts +3 -3
- package/dist/autogen/types/tx/tx-transfer-coin-express.d.mts +3 -3
- package/dist/autogen/types/tx/tx-transfer-coin.d.mts +2 -2
- package/dist/autogen/types/tx/tx-transfer-token.d.mts +3 -3
- package/dist/autogen/types/tx/tx-unlock-stake.d.mts +2 -2
- package/dist/autogen/types/tx/tx-vm-engine-block.d.mts +3 -3
- package/dist/autogen/types/wasm/index.d.mts +24 -24
- package/dist/autogen/types/wasm/param-test-core-script.d.mts +1 -1
- package/dist/autogen/wasm.d.mts +24 -24
- package/dist/constant/index.d.cts +2 -2
- package/dist/constant/index.d.mts +2 -2
- package/dist/{index-BQ0aTXY5.js → index-DG0VEpO7.js} +31 -7
- package/dist/{index-Byqx0KIO.js → index-dKo4dwic.js} +31 -7
- package/dist/{index-Cg0xnkC2.js → index-pHGVNvIY.js} +31 -7
- package/dist/index.d.mts +4 -4
- package/dist/support/erc20-helper/abi.d.mts +1 -1
- package/dist/support/erc20-helper/index.d.mts +1 -1
- package/dist/support/index.amd.js +1 -1
- package/dist/support/{index.cjs.js → index.cjs.cjs} +1 -1
- package/dist/support/index.d.cts +3 -3
- package/dist/support/index.d.mts +3 -3
- package/dist/support/index.esm.js +1 -1
- package/dist/types/index.d.cts +4 -4
- package/dist/types/index.d.mts +4 -4
- package/dist/utils/index.amd.js +1 -1
- package/dist/utils/{index.cjs.js → index.cjs.cjs} +1 -1
- package/dist/utils/index.d.cts +5 -5
- package/dist/utils/index.d.mts +5 -5
- package/dist/utils/index.esm.js +1 -1
- package/dist/utils/lclib.d.mts +1 -0
- package/dist/web3/index.amd.js +5 -6
- package/dist/web3/{index.cjs.js → index.cjs.cjs} +5 -6
- package/dist/web3/index.d.cts +5 -5
- package/dist/web3/index.d.mts +5 -5
- package/dist/web3/index.esm.js +5 -6
- package/dist/web3/providers/account-provider.d.mts +2 -2
- package/dist/web3/providers/http-rpc-provider.d.mts +2 -2
- package/dist/web3/providers/index.d.mts +3 -3
- package/dist/web3/providers/rpc-provider.d.mts +4 -4
- package/dist/web3/types/account.d.mts +1 -1
- package/dist/web3/types/index.d.mts +4 -4
- package/package.json +7 -7
- /package/dist/constant/{index.cjs.js → index.cjs.cjs} +0 -0
- /package/dist/types/{index.cjs.js → index.cjs.cjs} +0 -0
package/dist/autogen/wasm.d.mts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { GrantConsumeResult } from './types/wasm/grant-consume-result.
|
|
2
|
-
import { LibraryVersions } from './types/wasm/library-versions.
|
|
3
|
-
import { ParamCalculateTxLinkHash } from './types/wasm/param-calculate-tx-link-hash.
|
|
4
|
-
import { ParamCodeCoreScript } from './types/wasm/param-code-core-script.
|
|
5
|
-
import { ParamConvertCurrency } from './types/wasm/param-convert-currency.
|
|
6
|
-
import { ParamCreateAccountAndKeystore } from './types/wasm/param-create-account-and-keystore.
|
|
7
|
-
import { ParamCreateMasterKeystore } from './types/wasm/param-create-master-keystore.
|
|
8
|
-
import { ParamCreateNormalKey } from './types/wasm/param-create-normal-key.
|
|
9
|
-
import { ParamCreateNormalKeystore } from './types/wasm/param-create-normal-keystore.
|
|
10
|
-
import { ParamDeriveKeysFromMnemonic } from './types/wasm/param-derive-keys-from-mnemonic.
|
|
11
|
-
import { ParamEncodeTxCurrency } from './types/wasm/param-encode-tx-currency.
|
|
12
|
-
import { ParamEncodeTxNumber } from './types/wasm/param-encode-tx-number.
|
|
13
|
-
import { ParamGenerateMnemonicBySeed } from './types/wasm/param-generate-mnemonic-by-seed.
|
|
14
|
-
import { ParamGenerateMnemonic } from './types/wasm/param-generate-mnemonic.
|
|
15
|
-
import { ParamGetHomeShard } from './types/wasm/param-get-home-shard.
|
|
16
|
-
import { ParamHash } from './types/wasm/param-hash.
|
|
17
|
-
import { ParamLoadKeystore } from './types/wasm/param-load-keystore.
|
|
18
|
-
import { ParamMakeCurrency } from './types/wasm/param-make-currency.
|
|
19
|
-
import { ParamSignByMasterKey } from './types/wasm/param-sign-by-master-key.
|
|
20
|
-
import { ParamSign } from './types/wasm/param-sign.
|
|
21
|
-
import { ParamTestCoreScript } from './types/wasm/param-test-core-script.
|
|
22
|
-
import { ParamTxs } from './types/wasm/param-txs.
|
|
23
|
-
import { ParamVerifyMerkleProof } from './types/wasm/param-verify-merkle-proof.
|
|
24
|
-
import { ParamVerify } from './types/wasm/param-verify.
|
|
1
|
+
import { GrantConsumeResult } from './types/wasm/grant-consume-result.mjs';
|
|
2
|
+
import { LibraryVersions } from './types/wasm/library-versions.mjs';
|
|
3
|
+
import { ParamCalculateTxLinkHash } from './types/wasm/param-calculate-tx-link-hash.mjs';
|
|
4
|
+
import { ParamCodeCoreScript } from './types/wasm/param-code-core-script.mjs';
|
|
5
|
+
import { ParamConvertCurrency } from './types/wasm/param-convert-currency.mjs';
|
|
6
|
+
import { ParamCreateAccountAndKeystore } from './types/wasm/param-create-account-and-keystore.mjs';
|
|
7
|
+
import { ParamCreateMasterKeystore } from './types/wasm/param-create-master-keystore.mjs';
|
|
8
|
+
import { ParamCreateNormalKey } from './types/wasm/param-create-normal-key.mjs';
|
|
9
|
+
import { ParamCreateNormalKeystore } from './types/wasm/param-create-normal-keystore.mjs';
|
|
10
|
+
import { ParamDeriveKeysFromMnemonic } from './types/wasm/param-derive-keys-from-mnemonic.mjs';
|
|
11
|
+
import { ParamEncodeTxCurrency } from './types/wasm/param-encode-tx-currency.mjs';
|
|
12
|
+
import { ParamEncodeTxNumber } from './types/wasm/param-encode-tx-number.mjs';
|
|
13
|
+
import { ParamGenerateMnemonicBySeed } from './types/wasm/param-generate-mnemonic-by-seed.mjs';
|
|
14
|
+
import { ParamGenerateMnemonic } from './types/wasm/param-generate-mnemonic.mjs';
|
|
15
|
+
import { ParamGetHomeShard } from './types/wasm/param-get-home-shard.mjs';
|
|
16
|
+
import { ParamHash } from './types/wasm/param-hash.mjs';
|
|
17
|
+
import { ParamLoadKeystore } from './types/wasm/param-load-keystore.mjs';
|
|
18
|
+
import { ParamMakeCurrency } from './types/wasm/param-make-currency.mjs';
|
|
19
|
+
import { ParamSignByMasterKey } from './types/wasm/param-sign-by-master-key.mjs';
|
|
20
|
+
import { ParamSign } from './types/wasm/param-sign.mjs';
|
|
21
|
+
import { ParamTestCoreScript } from './types/wasm/param-test-core-script.mjs';
|
|
22
|
+
import { ParamTxs } from './types/wasm/param-txs.mjs';
|
|
23
|
+
import { ParamVerifyMerkleProof } from './types/wasm/param-verify-merkle-proof.mjs';
|
|
24
|
+
import { ParamVerify } from './types/wasm/param-verify.mjs';
|
|
25
25
|
export declare const calculateTxLinkHash: (params: ParamCalculateTxLinkHash) => string;
|
|
26
26
|
export declare const compileCoreScript: (params: ParamCodeCoreScript) => string;
|
|
27
27
|
export declare const convertAddressToData: (addrEncoded: string) => string;
|
|
@@ -501,5 +501,5 @@ export declare const FeeType: Readonly<{
|
|
|
501
501
|
readonly GRANT_ONLY: 1;
|
|
502
502
|
}>;
|
|
503
503
|
export type FeeType = (typeof FeeType)[keyof typeof FeeType];
|
|
504
|
-
export * from '../autogen/types/consts/consts.
|
|
505
|
-
export * from '../autogen/types/consts/tx-types.
|
|
504
|
+
export * from '../autogen/types/consts/consts.mjs';
|
|
505
|
+
export * from '../autogen/types/consts/tx-types.mjs';
|
|
@@ -501,5 +501,5 @@ export declare const FeeType: Readonly<{
|
|
|
501
501
|
readonly GRANT_ONLY: 1;
|
|
502
502
|
}>;
|
|
503
503
|
export type FeeType = (typeof FeeType)[keyof typeof FeeType];
|
|
504
|
-
export * from '../autogen/types/consts/consts.
|
|
505
|
-
export * from '../autogen/types/consts/tx-types.
|
|
504
|
+
export * from '../autogen/types/consts/consts.mjs';
|
|
505
|
+
export * from '../autogen/types/consts/tx-types.mjs';
|
|
@@ -4,14 +4,14 @@ import ___default from 'lodash';
|
|
|
4
4
|
// Automatically generated file. DO NOT EDIT.
|
|
5
5
|
const callWasm = (cmd, params) => {
|
|
6
6
|
// @ts-ignore
|
|
7
|
-
let callLclib = globalThis[
|
|
7
|
+
let callLclib = globalThis['CallLclib'];
|
|
8
8
|
if (LCLIB_NAMESPACE) {
|
|
9
9
|
// @ts-ignore
|
|
10
|
-
callLclib = globalThis[LCLIB_NAMESPACE][
|
|
10
|
+
callLclib = globalThis[LCLIB_NAMESPACE]['CallLclib'];
|
|
11
11
|
}
|
|
12
12
|
// @ts-ignore
|
|
13
|
-
if (typeof callLclib !==
|
|
14
|
-
throw new Error(
|
|
13
|
+
if (typeof callLclib !== 'function')
|
|
14
|
+
throw new Error('Wasm module is not loaded. Please call loadWasm or loadWasmSync first.');
|
|
15
15
|
// @ts-ignore
|
|
16
16
|
const resultString = callLclib(cmd, JSON.stringify(params));
|
|
17
17
|
const result = JSON.parse(resultString);
|
|
@@ -987,7 +987,7 @@ class TxValidator {
|
|
|
987
987
|
for (const paramKey in optional !== null && optional !== void 0 ? optional : {}) {
|
|
988
988
|
const txKey = optional[paramKey];
|
|
989
989
|
const paramValue = this.getByPathIgnoreCase(params, paramKey);
|
|
990
|
-
if (paramValue && paramValue !==
|
|
990
|
+
if (paramValue && paramValue !== '' && paramValue !== 0) {
|
|
991
991
|
const txValue = ___default.get(tx, txKey);
|
|
992
992
|
if (paramValue !== txValue) {
|
|
993
993
|
return this.logAndFail(tx.type, paramKey, paramValue, txValue);
|
|
@@ -1026,7 +1026,31 @@ class TxValidator {
|
|
|
1026
1026
|
}
|
|
1027
1027
|
|
|
1028
1028
|
// Automatically generated file. DO NOT EDIT.
|
|
1029
|
-
const TX_CREATION_RPC_LIST = [
|
|
1029
|
+
const TX_CREATION_RPC_LIST = [
|
|
1030
|
+
'debug_callContract',
|
|
1031
|
+
'debug_createContract',
|
|
1032
|
+
'debug_createSynthAccount',
|
|
1033
|
+
'debug_postDataToSynthAccount',
|
|
1034
|
+
'locus_acceptScript',
|
|
1035
|
+
'locus_becomeGuest',
|
|
1036
|
+
'locus_becomeHost',
|
|
1037
|
+
'locus_changeKey',
|
|
1038
|
+
'locus_changeVkey',
|
|
1039
|
+
'locus_closeAccount',
|
|
1040
|
+
'locus_createAssetObject',
|
|
1041
|
+
'locus_createToken',
|
|
1042
|
+
'locus_createVme',
|
|
1043
|
+
'locus_lockStake',
|
|
1044
|
+
'locus_openAccount',
|
|
1045
|
+
'locus_postData',
|
|
1046
|
+
'locus_provideScript',
|
|
1047
|
+
'locus_requestDataTrade',
|
|
1048
|
+
'locus_transferAssetObject',
|
|
1049
|
+
'locus_transferCoin',
|
|
1050
|
+
'locus_transferCoinExpress',
|
|
1051
|
+
'locus_transferToken',
|
|
1052
|
+
'locus_unlockStake'
|
|
1053
|
+
];
|
|
1030
1054
|
class Rpc {
|
|
1031
1055
|
debug_allHeights() {
|
|
1032
1056
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1493,7 +1517,7 @@ const loadLocusWasmSync = loadSync;
|
|
|
1493
1517
|
const LCLIB_NAMESPACE = namespace;
|
|
1494
1518
|
const txValidator = new TxValidator();
|
|
1495
1519
|
const verifyTxParams = txValidator.verifyTxParams;
|
|
1496
|
-
console.log(
|
|
1520
|
+
console.log('LCLIB_NAMESPACE:', LCLIB_NAMESPACE);
|
|
1497
1521
|
const checkAddressType = (address) => {
|
|
1498
1522
|
try {
|
|
1499
1523
|
const hex = convertAddressToHex(address);
|
|
@@ -3,14 +3,14 @@ define(['exports', './address-class-Dp7aNQb2', 'lodash'], (function (exports, ad
|
|
|
3
3
|
// Automatically generated file. DO NOT EDIT.
|
|
4
4
|
const callWasm = (cmd, params) => {
|
|
5
5
|
// @ts-ignore
|
|
6
|
-
let callLclib = globalThis[
|
|
6
|
+
let callLclib = globalThis['CallLclib'];
|
|
7
7
|
if (LCLIB_NAMESPACE) {
|
|
8
8
|
// @ts-ignore
|
|
9
|
-
callLclib = globalThis[LCLIB_NAMESPACE][
|
|
9
|
+
callLclib = globalThis[LCLIB_NAMESPACE]['CallLclib'];
|
|
10
10
|
}
|
|
11
11
|
// @ts-ignore
|
|
12
|
-
if (typeof callLclib !==
|
|
13
|
-
throw new Error(
|
|
12
|
+
if (typeof callLclib !== 'function')
|
|
13
|
+
throw new Error('Wasm module is not loaded. Please call loadWasm or loadWasmSync first.');
|
|
14
14
|
// @ts-ignore
|
|
15
15
|
const resultString = callLclib(cmd, JSON.stringify(params));
|
|
16
16
|
const result = JSON.parse(resultString);
|
|
@@ -986,7 +986,7 @@ define(['exports', './address-class-Dp7aNQb2', 'lodash'], (function (exports, ad
|
|
|
986
986
|
for (const paramKey in optional !== null && optional !== void 0 ? optional : {}) {
|
|
987
987
|
const txKey = optional[paramKey];
|
|
988
988
|
const paramValue = this.getByPathIgnoreCase(params, paramKey);
|
|
989
|
-
if (paramValue && paramValue !==
|
|
989
|
+
if (paramValue && paramValue !== '' && paramValue !== 0) {
|
|
990
990
|
const txValue = _.get(tx, txKey);
|
|
991
991
|
if (paramValue !== txValue) {
|
|
992
992
|
return this.logAndFail(tx.type, paramKey, paramValue, txValue);
|
|
@@ -1025,7 +1025,31 @@ define(['exports', './address-class-Dp7aNQb2', 'lodash'], (function (exports, ad
|
|
|
1025
1025
|
}
|
|
1026
1026
|
|
|
1027
1027
|
// Automatically generated file. DO NOT EDIT.
|
|
1028
|
-
const TX_CREATION_RPC_LIST = [
|
|
1028
|
+
const TX_CREATION_RPC_LIST = [
|
|
1029
|
+
'debug_callContract',
|
|
1030
|
+
'debug_createContract',
|
|
1031
|
+
'debug_createSynthAccount',
|
|
1032
|
+
'debug_postDataToSynthAccount',
|
|
1033
|
+
'locus_acceptScript',
|
|
1034
|
+
'locus_becomeGuest',
|
|
1035
|
+
'locus_becomeHost',
|
|
1036
|
+
'locus_changeKey',
|
|
1037
|
+
'locus_changeVkey',
|
|
1038
|
+
'locus_closeAccount',
|
|
1039
|
+
'locus_createAssetObject',
|
|
1040
|
+
'locus_createToken',
|
|
1041
|
+
'locus_createVme',
|
|
1042
|
+
'locus_lockStake',
|
|
1043
|
+
'locus_openAccount',
|
|
1044
|
+
'locus_postData',
|
|
1045
|
+
'locus_provideScript',
|
|
1046
|
+
'locus_requestDataTrade',
|
|
1047
|
+
'locus_transferAssetObject',
|
|
1048
|
+
'locus_transferCoin',
|
|
1049
|
+
'locus_transferCoinExpress',
|
|
1050
|
+
'locus_transferToken',
|
|
1051
|
+
'locus_unlockStake'
|
|
1052
|
+
];
|
|
1029
1053
|
class Rpc {
|
|
1030
1054
|
debug_allHeights() {
|
|
1031
1055
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1492,7 +1516,7 @@ define(['exports', './address-class-Dp7aNQb2', 'lodash'], (function (exports, ad
|
|
|
1492
1516
|
const LCLIB_NAMESPACE = namespace;
|
|
1493
1517
|
const txValidator = new TxValidator();
|
|
1494
1518
|
const verifyTxParams = txValidator.verifyTxParams;
|
|
1495
|
-
console.log(
|
|
1519
|
+
console.log('LCLIB_NAMESPACE:', LCLIB_NAMESPACE);
|
|
1496
1520
|
const checkAddressType = (address) => {
|
|
1497
1521
|
try {
|
|
1498
1522
|
const hex = convertAddressToHex(address);
|
|
@@ -6,14 +6,14 @@ var _ = require('lodash');
|
|
|
6
6
|
// Automatically generated file. DO NOT EDIT.
|
|
7
7
|
const callWasm = (cmd, params) => {
|
|
8
8
|
// @ts-ignore
|
|
9
|
-
let callLclib = globalThis[
|
|
9
|
+
let callLclib = globalThis['CallLclib'];
|
|
10
10
|
if (LCLIB_NAMESPACE) {
|
|
11
11
|
// @ts-ignore
|
|
12
|
-
callLclib = globalThis[LCLIB_NAMESPACE][
|
|
12
|
+
callLclib = globalThis[LCLIB_NAMESPACE]['CallLclib'];
|
|
13
13
|
}
|
|
14
14
|
// @ts-ignore
|
|
15
|
-
if (typeof callLclib !==
|
|
16
|
-
throw new Error(
|
|
15
|
+
if (typeof callLclib !== 'function')
|
|
16
|
+
throw new Error('Wasm module is not loaded. Please call loadWasm or loadWasmSync first.');
|
|
17
17
|
// @ts-ignore
|
|
18
18
|
const resultString = callLclib(cmd, JSON.stringify(params));
|
|
19
19
|
const result = JSON.parse(resultString);
|
|
@@ -989,7 +989,7 @@ class TxValidator {
|
|
|
989
989
|
for (const paramKey in optional !== null && optional !== void 0 ? optional : {}) {
|
|
990
990
|
const txKey = optional[paramKey];
|
|
991
991
|
const paramValue = this.getByPathIgnoreCase(params, paramKey);
|
|
992
|
-
if (paramValue && paramValue !==
|
|
992
|
+
if (paramValue && paramValue !== '' && paramValue !== 0) {
|
|
993
993
|
const txValue = _.get(tx, txKey);
|
|
994
994
|
if (paramValue !== txValue) {
|
|
995
995
|
return this.logAndFail(tx.type, paramKey, paramValue, txValue);
|
|
@@ -1028,7 +1028,31 @@ class TxValidator {
|
|
|
1028
1028
|
}
|
|
1029
1029
|
|
|
1030
1030
|
// Automatically generated file. DO NOT EDIT.
|
|
1031
|
-
const TX_CREATION_RPC_LIST = [
|
|
1031
|
+
const TX_CREATION_RPC_LIST = [
|
|
1032
|
+
'debug_callContract',
|
|
1033
|
+
'debug_createContract',
|
|
1034
|
+
'debug_createSynthAccount',
|
|
1035
|
+
'debug_postDataToSynthAccount',
|
|
1036
|
+
'locus_acceptScript',
|
|
1037
|
+
'locus_becomeGuest',
|
|
1038
|
+
'locus_becomeHost',
|
|
1039
|
+
'locus_changeKey',
|
|
1040
|
+
'locus_changeVkey',
|
|
1041
|
+
'locus_closeAccount',
|
|
1042
|
+
'locus_createAssetObject',
|
|
1043
|
+
'locus_createToken',
|
|
1044
|
+
'locus_createVme',
|
|
1045
|
+
'locus_lockStake',
|
|
1046
|
+
'locus_openAccount',
|
|
1047
|
+
'locus_postData',
|
|
1048
|
+
'locus_provideScript',
|
|
1049
|
+
'locus_requestDataTrade',
|
|
1050
|
+
'locus_transferAssetObject',
|
|
1051
|
+
'locus_transferCoin',
|
|
1052
|
+
'locus_transferCoinExpress',
|
|
1053
|
+
'locus_transferToken',
|
|
1054
|
+
'locus_unlockStake'
|
|
1055
|
+
];
|
|
1032
1056
|
class Rpc {
|
|
1033
1057
|
debug_allHeights() {
|
|
1034
1058
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1495,7 +1519,7 @@ const loadLocusWasmSync = loadSync;
|
|
|
1495
1519
|
const LCLIB_NAMESPACE = namespace;
|
|
1496
1520
|
const txValidator = new TxValidator();
|
|
1497
1521
|
const verifyTxParams = txValidator.verifyTxParams;
|
|
1498
|
-
console.log(
|
|
1522
|
+
console.log('LCLIB_NAMESPACE:', LCLIB_NAMESPACE);
|
|
1499
1523
|
const checkAddressType = (address) => {
|
|
1500
1524
|
try {
|
|
1501
1525
|
const hex = convertAddressToHex(address);
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './constant/index.
|
|
2
|
-
export * from './types/index.
|
|
3
|
-
export * from './utils/index.
|
|
4
|
-
export * from './web3/index.
|
|
1
|
+
export * from './constant/index.mjs';
|
|
2
|
+
export * from './types/index.mjs';
|
|
3
|
+
export * from './utils/index.mjs';
|
|
4
|
+
export * from './web3/index.mjs';
|
|
@@ -19,5 +19,5 @@ export declare const convertJsonToFuncString: (item: {
|
|
|
19
19
|
export declare const encodeArgHex: (inputs: any[], paramOriginValues?: any[]) => string;
|
|
20
20
|
export declare const getTransferFuncArgs: (func: string) => {
|
|
21
21
|
to: string;
|
|
22
|
-
amount:
|
|
22
|
+
amount: string;
|
|
23
23
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['exports', '../index-
|
|
1
|
+
define(['exports', '../index-dKo4dwic', 'lodash', '../address-class-Dp7aNQb2'], (function (exports, utils$2, _, addressClass) { 'use strict';
|
|
2
2
|
|
|
3
3
|
function _interopNamespaceDefault(e) {
|
|
4
4
|
var n = Object.create(null);
|
package/dist/support/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './erc20-helper/abi.
|
|
2
|
-
export * from './erc20-helper/index.
|
|
3
|
-
export * from './erc20-helper/locus-vme-base-abi.
|
|
1
|
+
export * from './erc20-helper/abi.mjs';
|
|
2
|
+
export * from './erc20-helper/index.mjs';
|
|
3
|
+
export * from './erc20-helper/locus-vme-base-abi.mjs';
|
|
4
4
|
export * as LocusEthers from '../libs/ethers.js-5.5.4-24bytes-addr/ethers.esm.min.js';
|
package/dist/support/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './erc20-helper/abi.
|
|
2
|
-
export * from './erc20-helper/index.
|
|
3
|
-
export * from './erc20-helper/locus-vme-base-abi.
|
|
1
|
+
export * from './erc20-helper/abi.mjs';
|
|
2
|
+
export * from './erc20-helper/index.mjs';
|
|
3
|
+
export * from './erc20-helper/locus-vme-base-abi.mjs';
|
|
4
4
|
export * as LocusEthers from '../libs/ethers.js-5.5.4-24bytes-addr/ethers.esm.min.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as convertDataToHex, a as convertHexToAddress, b as convertAddressToHex, d as convertHexToData, _ as __awaiter } from '../index-
|
|
1
|
+
import { c as convertDataToHex, a as convertHexToAddress, b as convertAddressToHex, d as convertHexToData, _ as __awaiter } from '../index-DG0VEpO7.js';
|
|
2
2
|
import * as _ from 'lodash';
|
|
3
3
|
import '../address-class-CHAZYhdZ.js';
|
|
4
4
|
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from '../autogen/locus-tx.
|
|
2
|
-
export * from '../autogen/types/tx/index.
|
|
3
|
-
export * from '../autogen/types/common/index.
|
|
4
|
-
export * from '../autogen/types/rpc/index.
|
|
1
|
+
export * from '../autogen/locus-tx.mjs';
|
|
2
|
+
export * from '../autogen/types/tx/index.mjs';
|
|
3
|
+
export * from '../autogen/types/common/index.mjs';
|
|
4
|
+
export * from '../autogen/types/rpc/index.mjs';
|
|
5
5
|
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
6
6
|
export type UnionToOptional<T> = {
|
|
7
7
|
[K in keyof T]: T[K];
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from '../autogen/locus-tx.
|
|
2
|
-
export * from '../autogen/types/tx/index.
|
|
3
|
-
export * from '../autogen/types/common/index.
|
|
4
|
-
export * from '../autogen/types/rpc/index.
|
|
1
|
+
export * from '../autogen/locus-tx.mjs';
|
|
2
|
+
export * from '../autogen/types/tx/index.mjs';
|
|
3
|
+
export * from '../autogen/types/common/index.mjs';
|
|
4
|
+
export * from '../autogen/types/rpc/index.mjs';
|
|
5
5
|
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
6
6
|
export type UnionToOptional<T> = {
|
|
7
7
|
[K in keyof T]: T[K];
|
package/dist/utils/index.amd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['exports', '../address-class-Dp7aNQb2', '../index-
|
|
1
|
+
define(['exports', '../address-class-Dp7aNQb2', '../index-dKo4dwic', 'lodash'], (function (exports, addressClass, utils, _) { 'use strict';
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
package/dist/utils/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { load, loadSync } from
|
|
2
|
-
import { TxValidator } from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
import { load, loadSync } from './lclib.mjs';
|
|
2
|
+
import { TxValidator } from './tx-validator.mjs';
|
|
3
|
+
export * from '../autogen/wasm.mjs';
|
|
4
|
+
export * from '../autogen/rpc.mjs';
|
|
5
5
|
export declare const loadLocusWasm: typeof load;
|
|
6
6
|
export declare const loadLocusWasmSync: typeof loadSync;
|
|
7
7
|
export declare const LCLIB_NAMESPACE: string;
|
|
@@ -11,7 +11,7 @@ export declare const verifyTxParams: (rpcResult: {
|
|
|
11
11
|
tx: any;
|
|
12
12
|
}, params: any, options: {
|
|
13
13
|
targetTxHash?: string | false;
|
|
14
|
-
}) => import("./tx-validator.
|
|
14
|
+
}) => import("./tx-validator.mjs").IntegrityCheckResult;
|
|
15
15
|
export declare const checkAddressType: (address: string) => number;
|
|
16
16
|
export declare const isAccount: (addressType: number) => true | 3;
|
|
17
17
|
export declare const isContract: (addressType: number) => addressType is 2;
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { load, loadSync } from
|
|
2
|
-
import { TxValidator } from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
import { load, loadSync } from './lclib.mjs';
|
|
2
|
+
import { TxValidator } from './tx-validator.mjs';
|
|
3
|
+
export * from '../autogen/wasm.mjs';
|
|
4
|
+
export * from '../autogen/rpc.mjs';
|
|
5
5
|
export declare const loadLocusWasm: typeof load;
|
|
6
6
|
export declare const loadLocusWasmSync: typeof loadSync;
|
|
7
7
|
export declare const LCLIB_NAMESPACE: string;
|
|
@@ -11,7 +11,7 @@ export declare const verifyTxParams: (rpcResult: {
|
|
|
11
11
|
tx: any;
|
|
12
12
|
}, params: any, options: {
|
|
13
13
|
targetTxHash?: string | false;
|
|
14
|
-
}) => import("./tx-validator.
|
|
14
|
+
}) => import("./tx-validator.mjs").IntegrityCheckResult;
|
|
15
15
|
export declare const checkAddressType: (address: string) => number;
|
|
16
16
|
export declare const isAccount: (addressType: number) => true | 3;
|
|
17
17
|
export declare const isContract: (addressType: number) => addressType is 2;
|
package/dist/utils/index.esm.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../address-class-CHAZYhdZ.js';
|
|
2
|
-
export { L as LCLIB_NAMESPACE, R as Rpc, T as TX_CREATION_RPC_LIST, e as calculateTxLinkHash, f as checkAddressType, g as compileCoreScript, h as convertAddressToData, b as convertAddressToHex, i as convertBase32ToData, j as convertBase32ToHex, k as convertCurrency, l as convertDataTo, m as convertDataToAddress, n as convertDataToBase32, c as convertDataToHex, o as convertDataToString, a as convertHexToAddress, p as convertHexToBase32, d as convertHexToData, q as convertStringToData, r as convertToData, t as createAccountAndKeystore, u as createMasterKeystore, w as createNormalKey, x as createNormalKeystore, y as decodeTxs, z as deriveKeysFromMnemonic, A as disCompileCoreScript, B as encodeTxCurrency, C as encodeTxNumber, D as generateMnemonic, E as generateMnemonicBySeed, F as getDefFromCoreScript, G as getHomeShard, H as getLibraryVersions, I as gzipAndEncode, J as hash, K as isAccount, M as isContract, N as isGrantConsumingTx, O as isSystemToken, P as isToken, Q as loadLocusWasm, S as loadLocusWasmSync, U as loadMasterKeystore, V as loadNormalKeystore, W as makeCurrency, s as sign, X as signByMasterKey, Y as testCoreScript, Z as txValidator, $ as verify, a0 as verifyByMasterKey, a1 as verifyMerkleProof, a2 as verifyTx, v as verifyTxParams } from '../index-
|
|
2
|
+
export { L as LCLIB_NAMESPACE, R as Rpc, T as TX_CREATION_RPC_LIST, e as calculateTxLinkHash, f as checkAddressType, g as compileCoreScript, h as convertAddressToData, b as convertAddressToHex, i as convertBase32ToData, j as convertBase32ToHex, k as convertCurrency, l as convertDataTo, m as convertDataToAddress, n as convertDataToBase32, c as convertDataToHex, o as convertDataToString, a as convertHexToAddress, p as convertHexToBase32, d as convertHexToData, q as convertStringToData, r as convertToData, t as createAccountAndKeystore, u as createMasterKeystore, w as createNormalKey, x as createNormalKeystore, y as decodeTxs, z as deriveKeysFromMnemonic, A as disCompileCoreScript, B as encodeTxCurrency, C as encodeTxNumber, D as generateMnemonic, E as generateMnemonicBySeed, F as getDefFromCoreScript, G as getHomeShard, H as getLibraryVersions, I as gzipAndEncode, J as hash, K as isAccount, M as isContract, N as isGrantConsumingTx, O as isSystemToken, P as isToken, Q as loadLocusWasm, S as loadLocusWasmSync, U as loadMasterKeystore, V as loadNormalKeystore, W as makeCurrency, s as sign, X as signByMasterKey, Y as testCoreScript, Z as txValidator, $ as verify, a0 as verifyByMasterKey, a1 as verifyMerkleProof, a2 as verifyTx, v as verifyTxParams } from '../index-DG0VEpO7.js';
|
|
3
3
|
import 'lodash';
|
package/dist/utils/lclib.d.mts
CHANGED
package/dist/web3/index.amd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
define(['exports', '../index-
|
|
1
|
+
define(['exports', '../index-dKo4dwic', '../tx-type-BeeK7Ci3', '../address-class-Dp7aNQb2', 'lodash'], (function (exports, utils, txType, addressClass, _) { 'use strict';
|
|
2
2
|
|
|
3
3
|
class Account {
|
|
4
4
|
constructor({ address, nsk }) {
|
|
@@ -99,7 +99,6 @@ define(['exports', '../index-Byqx0KIO', '../tx-type-BeeK7Ci3', '../address-class
|
|
|
99
99
|
REQUIRE_LOGIN: 1006,
|
|
100
100
|
REQUIRE_CONNECT: 1007,
|
|
101
101
|
INVALID_RPC_URL: 1008,
|
|
102
|
-
CALL_RPC_ERROR: 1009,
|
|
103
102
|
NO_SELECTED_NETWORK: 1010,
|
|
104
103
|
KEY_SIGN_FAILED: 1011,
|
|
105
104
|
INVALID_NETWORK: 1012,
|
|
@@ -141,7 +140,7 @@ define(['exports', '../index-Byqx0KIO', '../tx-type-BeeK7Ci3', '../address-class
|
|
|
141
140
|
request(cmd, params, rpcOption) {
|
|
142
141
|
return utils.__awaiter(this, void 0, void 0, function* () {
|
|
143
142
|
if (this.getSignal().aborted) {
|
|
144
|
-
throw new LocusError(LocusErrorCode.
|
|
143
|
+
throw new LocusError(LocusErrorCode.NETWORK_ABORTED, `rpc aborted by user`);
|
|
145
144
|
}
|
|
146
145
|
if (this.id === Number.MAX_SAFE_INTEGER) {
|
|
147
146
|
this.id = 0;
|
|
@@ -157,7 +156,7 @@ define(['exports', '../index-Byqx0KIO', '../tx-type-BeeK7Ci3', '../address-class
|
|
|
157
156
|
const callRpc1Signal = this.getSignal();
|
|
158
157
|
const rpc1Result = yield this.callRpc(data, { signal: callRpc1Signal, headersInit: options.headersInit });
|
|
159
158
|
if (callRpc1Signal.aborted) {
|
|
160
|
-
throw new LocusError(LocusErrorCode.
|
|
159
|
+
throw new LocusError(LocusErrorCode.NETWORK_ABORTED, `rpc aborted by user`);
|
|
161
160
|
}
|
|
162
161
|
if (!utils.TX_CREATION_RPC_LIST.some(str => str === cmd)) {
|
|
163
162
|
return rpc1Result;
|
|
@@ -176,13 +175,13 @@ define(['exports', '../index-Byqx0KIO', '../tx-type-BeeK7Ci3', '../address-class
|
|
|
176
175
|
const callRpc2Signal = this.getSignal();
|
|
177
176
|
const rpcResul2 = yield this.callRpc(newData, { signal: callRpc2Signal, headersInit: options.headersInit });
|
|
178
177
|
if (callRpc2Signal.aborted) {
|
|
179
|
-
throw new LocusError(LocusErrorCode.
|
|
178
|
+
throw new LocusError(LocusErrorCode.NETWORK_ABORTED, `rpc aborted by user`);
|
|
180
179
|
}
|
|
181
180
|
return rpcResul2;
|
|
182
181
|
// console.debug('rpcResul2', rpcResult2)
|
|
183
182
|
}
|
|
184
183
|
catch (err) {
|
|
185
|
-
if (err.code === LocusErrorCode.
|
|
184
|
+
if (err.code === LocusErrorCode.NETWORK_ABORTED)
|
|
186
185
|
throw err;
|
|
187
186
|
throw new LocusError(LocusErrorCode.RUNTIME_ERROR, err.message);
|
|
188
187
|
// console.trace(err)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var utils = require('../index-
|
|
3
|
+
var utils = require('../index-pHGVNvIY.js');
|
|
4
4
|
var txType = require('../tx-type-jR5Owltc.js');
|
|
5
5
|
require('../address-class-Cjy48Uqk.js');
|
|
6
6
|
require('lodash');
|
|
@@ -104,7 +104,6 @@ const LocusErrorCode = Object.freeze({
|
|
|
104
104
|
REQUIRE_LOGIN: 1006,
|
|
105
105
|
REQUIRE_CONNECT: 1007,
|
|
106
106
|
INVALID_RPC_URL: 1008,
|
|
107
|
-
CALL_RPC_ERROR: 1009,
|
|
108
107
|
NO_SELECTED_NETWORK: 1010,
|
|
109
108
|
KEY_SIGN_FAILED: 1011,
|
|
110
109
|
INVALID_NETWORK: 1012,
|
|
@@ -146,7 +145,7 @@ class RpcProvider extends utils.Rpc {
|
|
|
146
145
|
request(cmd, params, rpcOption) {
|
|
147
146
|
return utils.__awaiter(this, void 0, void 0, function* () {
|
|
148
147
|
if (this.getSignal().aborted) {
|
|
149
|
-
throw new LocusError(LocusErrorCode.
|
|
148
|
+
throw new LocusError(LocusErrorCode.NETWORK_ABORTED, `rpc aborted by user`);
|
|
150
149
|
}
|
|
151
150
|
if (this.id === Number.MAX_SAFE_INTEGER) {
|
|
152
151
|
this.id = 0;
|
|
@@ -162,7 +161,7 @@ class RpcProvider extends utils.Rpc {
|
|
|
162
161
|
const callRpc1Signal = this.getSignal();
|
|
163
162
|
const rpc1Result = yield this.callRpc(data, { signal: callRpc1Signal, headersInit: options.headersInit });
|
|
164
163
|
if (callRpc1Signal.aborted) {
|
|
165
|
-
throw new LocusError(LocusErrorCode.
|
|
164
|
+
throw new LocusError(LocusErrorCode.NETWORK_ABORTED, `rpc aborted by user`);
|
|
166
165
|
}
|
|
167
166
|
if (!utils.TX_CREATION_RPC_LIST.some(str => str === cmd)) {
|
|
168
167
|
return rpc1Result;
|
|
@@ -181,13 +180,13 @@ class RpcProvider extends utils.Rpc {
|
|
|
181
180
|
const callRpc2Signal = this.getSignal();
|
|
182
181
|
const rpcResul2 = yield this.callRpc(newData, { signal: callRpc2Signal, headersInit: options.headersInit });
|
|
183
182
|
if (callRpc2Signal.aborted) {
|
|
184
|
-
throw new LocusError(LocusErrorCode.
|
|
183
|
+
throw new LocusError(LocusErrorCode.NETWORK_ABORTED, `rpc aborted by user`);
|
|
185
184
|
}
|
|
186
185
|
return rpcResul2;
|
|
187
186
|
// console.debug('rpcResul2', rpcResult2)
|
|
188
187
|
}
|
|
189
188
|
catch (err) {
|
|
190
|
-
if (err.code === LocusErrorCode.
|
|
189
|
+
if (err.code === LocusErrorCode.NETWORK_ABORTED)
|
|
191
190
|
throw err;
|
|
192
191
|
throw new LocusError(LocusErrorCode.RUNTIME_ERROR, err.message);
|
|
193
192
|
// console.trace(err)
|
package/dist/web3/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AccountProvider } from './providers/account-provider.
|
|
2
|
-
import { HttpRpcProvider } from './providers/http-rpc-provider.
|
|
3
|
-
import { RpcProvider } from './providers/rpc-provider.
|
|
4
|
-
import { RpcOptions } from './types/index.
|
|
1
|
+
import { AccountProvider } from './providers/account-provider.mjs';
|
|
2
|
+
import { HttpRpcProvider } from './providers/http-rpc-provider.mjs';
|
|
3
|
+
import { RpcProvider } from './providers/rpc-provider.mjs';
|
|
4
|
+
import { RpcOptions } from './types/index.mjs';
|
|
5
5
|
export declare class Web3 {
|
|
6
6
|
private accountProvider?;
|
|
7
7
|
private rpcProvider?;
|
|
@@ -16,4 +16,4 @@ export declare class Web3 {
|
|
|
16
16
|
};
|
|
17
17
|
get accounts(): AccountProvider;
|
|
18
18
|
}
|
|
19
|
-
export * from './types/index.
|
|
19
|
+
export * from './types/index.mjs';
|
package/dist/web3/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AccountProvider } from './providers/account-provider.
|
|
2
|
-
import { HttpRpcProvider } from './providers/http-rpc-provider.
|
|
3
|
-
import { RpcProvider } from './providers/rpc-provider.
|
|
4
|
-
import { RpcOptions } from './types/index.
|
|
1
|
+
import { AccountProvider } from './providers/account-provider.mjs';
|
|
2
|
+
import { HttpRpcProvider } from './providers/http-rpc-provider.mjs';
|
|
3
|
+
import { RpcProvider } from './providers/rpc-provider.mjs';
|
|
4
|
+
import { RpcOptions } from './types/index.mjs';
|
|
5
5
|
export declare class Web3 {
|
|
6
6
|
private accountProvider?;
|
|
7
7
|
private rpcProvider?;
|
|
@@ -16,4 +16,4 @@ export declare class Web3 {
|
|
|
16
16
|
};
|
|
17
17
|
get accounts(): AccountProvider;
|
|
18
18
|
}
|
|
19
|
-
export * from './types/index.
|
|
19
|
+
export * from './types/index.mjs';
|