@locuschain/lib 0.2.11 → 0.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/accounts/index.amd.js +1 -1
  2. package/dist/accounts/index.cjs.cjs +2 -3
  3. package/dist/accounts/index.esm.js +2 -3
  4. package/dist/actions/wallet/directCall.d.cts +18 -0
  5. package/dist/actions/wallet/directCall.d.mts +18 -0
  6. package/dist/autogen/debugWalletActions.d.cts +2 -0
  7. package/dist/autogen/debugWalletActions.d.mts +2 -0
  8. package/dist/autogen/index.amd.js +1 -1
  9. package/dist/autogen/index.cjs.cjs +2 -3
  10. package/dist/autogen/index.esm.js +3 -4
  11. package/dist/autogen/types/common/index.d.cts +0 -2
  12. package/dist/autogen/types/common/index.d.mts +0 -2
  13. package/dist/autogen/types/common/tx-base.d.cts +2 -1
  14. package/dist/autogen/types/common/tx-base.d.mts +2 -1
  15. package/dist/autogen/types/consts/tx-type.d.cts +10 -10
  16. package/dist/autogen/types/consts/tx-type.d.mts +10 -10
  17. package/dist/autogen/types/consts/tx-types.d.cts +10 -10
  18. package/dist/autogen/types/consts/tx-types.d.mts +10 -10
  19. package/dist/autogen/types/tx/tx-restore-res-hash.d.cts +5 -4
  20. package/dist/autogen/types/tx/tx-restore-res-hash.d.mts +5 -4
  21. package/dist/autogen/wasm/lclib.wasm +0 -0
  22. package/dist/chunks/{debugWalletActions-LMoV1T5I.js → debugWalletActions-BIr5g97C.js} +32 -0
  23. package/dist/chunks/{debugWalletActions-BWSVjiFW.cjs → debugWalletActions-DEdW7RNn.cjs} +32 -0
  24. package/dist/chunks/{debugWalletActions-DoZUAnEj.js → debugWalletActions-Eu-0KUqt.js} +32 -1
  25. package/dist/chunks/{keystore-JnuLzkLn.js → keystore-BaRONuW-.js} +1 -1
  26. package/dist/chunks/{keystore-DS8JZhXs.cjs → keystore-DcTOPfuF.cjs} +1 -1
  27. package/dist/chunks/{keystore-BPU22XT-.js → keystore-Dz4yB829.js} +1 -1
  28. package/dist/chunks/{tx-type-Dyjdmlv8.js → tx-type-BFIIZuLV.js} +10 -10
  29. package/dist/chunks/{tx-type-CKrHKEwY.cjs → tx-type-BPfUG6kE.cjs} +10 -10
  30. package/dist/chunks/{tx-type-CXyml-9n.js → tx-type-nqiwUdYa.js} +10 -10
  31. package/dist/chunks/{lclib-j2x9RvDY.js → wasm-B1dWd6ix.js} +174 -1
  32. package/dist/chunks/{lclib-Bv86gksL.js → wasm-BQYfcIX8.js} +222 -1
  33. package/dist/chunks/{lclib-rGyKpClJ.cjs → wasm-DDrQluVO.cjs} +237 -16
  34. package/dist/clients/createLocusWalletClient.d.cts +1 -0
  35. package/dist/clients/createLocusWalletClient.d.mts +1 -0
  36. package/dist/clients/index.amd.js +1 -1
  37. package/dist/clients/index.cjs.cjs +2 -2
  38. package/dist/clients/index.esm.js +2 -2
  39. package/dist/constant/index.amd.js +52 -37
  40. package/dist/constant/index.cjs.cjs +52 -37
  41. package/dist/constant/index.d.cts +32 -20
  42. package/dist/constant/index.d.mts +32 -20
  43. package/dist/constant/index.esm.js +52 -38
  44. package/dist/contracts/index.amd.js +1 -1
  45. package/dist/contracts/index.cjs.cjs +1 -2
  46. package/dist/contracts/index.esm.js +1 -2
  47. package/dist/index.amd.js +2 -1
  48. package/dist/index.cjs.cjs +5 -5
  49. package/dist/index.esm.js +5 -6
  50. package/dist/utils/index.amd.js +2 -2
  51. package/dist/utils/index.cjs.cjs +4 -5
  52. package/dist/utils/index.esm.js +4 -5
  53. package/package.json +1 -1
  54. package/dist/autogen/types/common/asset-object-transfer.d.cts +0 -6
  55. package/dist/autogen/types/common/asset-object-transfer.d.mts +0 -6
  56. package/dist/autogen/types/common/tx-restore-res-hash-proof.d.cts +0 -9
  57. package/dist/autogen/types/common/tx-restore-res-hash-proof.d.mts +0 -9
  58. package/dist/chunks/wasm-CU215LGW.js +0 -175
  59. package/dist/chunks/wasm-dbtq7eri.cjs +0 -225
  60. package/dist/chunks/wasm-gROtmFm6.js +0 -225
@@ -1,225 +0,0 @@
1
- 'use strict';
2
-
3
- var lclib = require('./lclib-rGyKpClJ.cjs');
4
-
5
- // Automatically generated file. DO NOT EDIT.
6
- const callWasm = (cmd, params) => {
7
- // @ts-ignore
8
- let callLclib = globalThis["CallLclib"];
9
- // @ts-ignore
10
- if (lclib.namespace && globalThis[lclib.namespace]) {
11
- // @ts-ignore
12
- callLclib = globalThis[lclib.namespace]["CallLclib"];
13
- }
14
- // @ts-ignore
15
- if (typeof callLclib !== "function")
16
- throw new Error("Wasm module is not loaded. Please call loadWasm or loadWasmSync first.");
17
- // @ts-ignore
18
- const resultString = callLclib(cmd, JSON.stringify(params));
19
- const result = JSON.parse(resultString);
20
- if (result.error && result.error.code != 0) {
21
- const error = Object.assign(Object.assign({}, result.error), { message: result.error.message });
22
- delete error.message;
23
- throw error;
24
- }
25
- else {
26
- return result.result;
27
- }
28
- };
29
- const calculateTxLinkHash = (params) => {
30
- return callWasm('calculateTxLinkHash', [params]);
31
- };
32
- const compileCoreScript = (params) => {
33
- return callWasm('compileCoreScript', [params]);
34
- };
35
- const convertAddressToData = (addrEncoded) => {
36
- return callWasm('convertAddressToData', [addrEncoded]);
37
- };
38
- const convertAddressToHex = (addrEncoded) => {
39
- return callWasm('convertAddressToHex', [addrEncoded]);
40
- };
41
- const convertBase32ToData = (encoded) => {
42
- return callWasm('convertBase32ToData', [encoded]);
43
- };
44
- const convertBase32ToHex = (encoded) => {
45
- return callWasm('convertBase32ToHex', [encoded]);
46
- };
47
- const convertCurrency = (params) => {
48
- return callWasm('convertCurrency', [params]);
49
- };
50
- const convertDataTo = (value, retType) => {
51
- return callWasm('convertDataTo', [value, retType]);
52
- };
53
- const convertDataToAddress = (str) => {
54
- return callWasm('convertDataToAddress', [str]);
55
- };
56
- const convertDataToBase32 = (str) => {
57
- return callWasm('convertDataToBase32', [str]);
58
- };
59
- const convertDataToHex = (str) => {
60
- return callWasm('convertDataToHex', [str]);
61
- };
62
- const convertDataToString = (str) => {
63
- return callWasm('convertDataToString', [str]);
64
- };
65
- const convertHexToAddress = (hexString) => {
66
- return callWasm('convertHexToAddress', [hexString]);
67
- };
68
- const convertHexToBase32 = (hexString) => {
69
- return callWasm('convertHexToBase32', [hexString]);
70
- };
71
- const convertHexToData = (encoded) => {
72
- return callWasm('convertHexToData', [encoded]);
73
- };
74
- const convertStringToData = (raw) => {
75
- return callWasm('convertStringToData', [raw]);
76
- };
77
- const convertToData = (value, valueType) => {
78
- return callWasm('convertToData', [value, valueType]);
79
- };
80
- const createAccountAndKeystore = (params) => {
81
- return callWasm('createAccountAndKeystore', [params]);
82
- };
83
- const createMasterKeystore = (params) => {
84
- return callWasm('createMasterKeystore', [params]);
85
- };
86
- const createNormalKey = (params) => {
87
- return callWasm('createNormalKey', [params]);
88
- };
89
- const createNormalKeystore = (params) => {
90
- return callWasm('createNormalKeystore', [params]);
91
- };
92
- const decodeSubId = (subIdString) => {
93
- return callWasm('decodeSubId', [subIdString]);
94
- };
95
- const decodeTxs = (params) => {
96
- return callWasm('decodeTxs', [params]);
97
- };
98
- const deriveKeysFromMnemonic = (params) => {
99
- return callWasm('deriveKeysFromMnemonic', [params]);
100
- };
101
- const deriveKeysFromMnemonicAndPath = (params) => {
102
- return callWasm('deriveKeysFromMnemonicAndPath', [params]);
103
- };
104
- const disCompileCoreScript = (params) => {
105
- return callWasm('disCompileCoreScript', [params]);
106
- };
107
- const encodeFuncData = (op, dataHex) => {
108
- return callWasm('encodeFuncData', [op, dataHex]);
109
- };
110
- const encodeSubId = (hexString) => {
111
- return callWasm('encodeSubId', [hexString]);
112
- };
113
- const encodeTxCurrency = (params) => {
114
- return callWasm('encodeTxCurrency', [params]);
115
- };
116
- const encodeTxNumber = (params) => {
117
- return callWasm('encodeTxNumber', [params]);
118
- };
119
- const generateMnemonic = (params) => {
120
- return callWasm('generateMnemonic', [params]);
121
- };
122
- const generateMnemonicBySeed = (params) => {
123
- return callWasm('generateMnemonicBySeed', [params]);
124
- };
125
- const getDefFromCoreScript = (params) => {
126
- return callWasm('getDefFromCoreScript', [params]);
127
- };
128
- const getHomeShard = (params) => {
129
- return callWasm('getHomeShard', [params]);
130
- };
131
- const getLibraryVersions = () => {
132
- return callWasm('getLibraryVersions', []);
133
- };
134
- const gzipAndEncode = (str) => {
135
- return callWasm('gzipAndEncode', [str]);
136
- };
137
- const hash = (params) => {
138
- return callWasm('hash', [params]);
139
- };
140
- const isGrantConsumingTx = (txTypeStr) => {
141
- return callWasm('isGrantConsumingTx', [txTypeStr]);
142
- };
143
- const loadMasterKeystore = (params) => {
144
- return callWasm('loadMasterKeystore', [params]);
145
- };
146
- const loadNormalKeystore = (params) => {
147
- return callWasm('loadNormalKeystore', [params]);
148
- };
149
- const makeCurrency = (params) => {
150
- return callWasm('makeCurrency', [params]);
151
- };
152
- const sign = (param) => {
153
- return callWasm('sign', [param]);
154
- };
155
- const signByMasterKey = (params) => {
156
- return callWasm('signByMasterKey', [params]);
157
- };
158
- const signKeyBind = (params) => {
159
- return callWasm('signKeyBind', [params]);
160
- };
161
- const testCoreScript = (params) => {
162
- return callWasm('testCoreScript', [params]);
163
- };
164
- const verify = (params) => {
165
- return callWasm('verify', [params]);
166
- };
167
- const verifyByMasterKey = (params) => {
168
- return callWasm('verifyByMasterKey', [params]);
169
- };
170
- const verifyMerkleProof = (params) => {
171
- return callWasm('verifyMerkleProof', [params]);
172
- };
173
- const verifyTx = (jsonTx) => {
174
- return callWasm('verifyTx', [jsonTx]);
175
- };
176
-
177
- exports.calculateTxLinkHash = calculateTxLinkHash;
178
- exports.compileCoreScript = compileCoreScript;
179
- exports.convertAddressToData = convertAddressToData;
180
- exports.convertAddressToHex = convertAddressToHex;
181
- exports.convertBase32ToData = convertBase32ToData;
182
- exports.convertBase32ToHex = convertBase32ToHex;
183
- exports.convertCurrency = convertCurrency;
184
- exports.convertDataTo = convertDataTo;
185
- exports.convertDataToAddress = convertDataToAddress;
186
- exports.convertDataToBase32 = convertDataToBase32;
187
- exports.convertDataToHex = convertDataToHex;
188
- exports.convertDataToString = convertDataToString;
189
- exports.convertHexToAddress = convertHexToAddress;
190
- exports.convertHexToBase32 = convertHexToBase32;
191
- exports.convertHexToData = convertHexToData;
192
- exports.convertStringToData = convertStringToData;
193
- exports.convertToData = convertToData;
194
- exports.createAccountAndKeystore = createAccountAndKeystore;
195
- exports.createMasterKeystore = createMasterKeystore;
196
- exports.createNormalKey = createNormalKey;
197
- exports.createNormalKeystore = createNormalKeystore;
198
- exports.decodeSubId = decodeSubId;
199
- exports.decodeTxs = decodeTxs;
200
- exports.deriveKeysFromMnemonic = deriveKeysFromMnemonic;
201
- exports.deriveKeysFromMnemonicAndPath = deriveKeysFromMnemonicAndPath;
202
- exports.disCompileCoreScript = disCompileCoreScript;
203
- exports.encodeFuncData = encodeFuncData;
204
- exports.encodeSubId = encodeSubId;
205
- exports.encodeTxCurrency = encodeTxCurrency;
206
- exports.encodeTxNumber = encodeTxNumber;
207
- exports.generateMnemonic = generateMnemonic;
208
- exports.generateMnemonicBySeed = generateMnemonicBySeed;
209
- exports.getDefFromCoreScript = getDefFromCoreScript;
210
- exports.getHomeShard = getHomeShard;
211
- exports.getLibraryVersions = getLibraryVersions;
212
- exports.gzipAndEncode = gzipAndEncode;
213
- exports.hash = hash;
214
- exports.isGrantConsumingTx = isGrantConsumingTx;
215
- exports.loadMasterKeystore = loadMasterKeystore;
216
- exports.loadNormalKeystore = loadNormalKeystore;
217
- exports.makeCurrency = makeCurrency;
218
- exports.sign = sign;
219
- exports.signByMasterKey = signByMasterKey;
220
- exports.signKeyBind = signKeyBind;
221
- exports.testCoreScript = testCoreScript;
222
- exports.verify = verify;
223
- exports.verifyByMasterKey = verifyByMasterKey;
224
- exports.verifyMerkleProof = verifyMerkleProof;
225
- exports.verifyTx = verifyTx;
@@ -1,225 +0,0 @@
1
- define(['exports', './lclib-Bv86gksL'], (function (exports, lclib) { 'use strict';
2
-
3
- // Automatically generated file. DO NOT EDIT.
4
- const callWasm = (cmd, params) => {
5
- // @ts-ignore
6
- let callLclib = globalThis["CallLclib"];
7
- // @ts-ignore
8
- if (lclib.namespace && globalThis[lclib.namespace]) {
9
- // @ts-ignore
10
- callLclib = globalThis[lclib.namespace]["CallLclib"];
11
- }
12
- // @ts-ignore
13
- if (typeof callLclib !== "function")
14
- throw new Error("Wasm module is not loaded. Please call loadWasm or loadWasmSync first.");
15
- // @ts-ignore
16
- const resultString = callLclib(cmd, JSON.stringify(params));
17
- const result = JSON.parse(resultString);
18
- if (result.error && result.error.code != 0) {
19
- const error = Object.assign(Object.assign({}, result.error), { message: result.error.message });
20
- delete error.message;
21
- throw error;
22
- }
23
- else {
24
- return result.result;
25
- }
26
- };
27
- const calculateTxLinkHash = (params) => {
28
- return callWasm('calculateTxLinkHash', [params]);
29
- };
30
- const compileCoreScript = (params) => {
31
- return callWasm('compileCoreScript', [params]);
32
- };
33
- const convertAddressToData = (addrEncoded) => {
34
- return callWasm('convertAddressToData', [addrEncoded]);
35
- };
36
- const convertAddressToHex = (addrEncoded) => {
37
- return callWasm('convertAddressToHex', [addrEncoded]);
38
- };
39
- const convertBase32ToData = (encoded) => {
40
- return callWasm('convertBase32ToData', [encoded]);
41
- };
42
- const convertBase32ToHex = (encoded) => {
43
- return callWasm('convertBase32ToHex', [encoded]);
44
- };
45
- const convertCurrency = (params) => {
46
- return callWasm('convertCurrency', [params]);
47
- };
48
- const convertDataTo = (value, retType) => {
49
- return callWasm('convertDataTo', [value, retType]);
50
- };
51
- const convertDataToAddress = (str) => {
52
- return callWasm('convertDataToAddress', [str]);
53
- };
54
- const convertDataToBase32 = (str) => {
55
- return callWasm('convertDataToBase32', [str]);
56
- };
57
- const convertDataToHex = (str) => {
58
- return callWasm('convertDataToHex', [str]);
59
- };
60
- const convertDataToString = (str) => {
61
- return callWasm('convertDataToString', [str]);
62
- };
63
- const convertHexToAddress = (hexString) => {
64
- return callWasm('convertHexToAddress', [hexString]);
65
- };
66
- const convertHexToBase32 = (hexString) => {
67
- return callWasm('convertHexToBase32', [hexString]);
68
- };
69
- const convertHexToData = (encoded) => {
70
- return callWasm('convertHexToData', [encoded]);
71
- };
72
- const convertStringToData = (raw) => {
73
- return callWasm('convertStringToData', [raw]);
74
- };
75
- const convertToData = (value, valueType) => {
76
- return callWasm('convertToData', [value, valueType]);
77
- };
78
- const createAccountAndKeystore = (params) => {
79
- return callWasm('createAccountAndKeystore', [params]);
80
- };
81
- const createMasterKeystore = (params) => {
82
- return callWasm('createMasterKeystore', [params]);
83
- };
84
- const createNormalKey = (params) => {
85
- return callWasm('createNormalKey', [params]);
86
- };
87
- const createNormalKeystore = (params) => {
88
- return callWasm('createNormalKeystore', [params]);
89
- };
90
- const decodeSubId = (subIdString) => {
91
- return callWasm('decodeSubId', [subIdString]);
92
- };
93
- const decodeTxs = (params) => {
94
- return callWasm('decodeTxs', [params]);
95
- };
96
- const deriveKeysFromMnemonic = (params) => {
97
- return callWasm('deriveKeysFromMnemonic', [params]);
98
- };
99
- const deriveKeysFromMnemonicAndPath = (params) => {
100
- return callWasm('deriveKeysFromMnemonicAndPath', [params]);
101
- };
102
- const disCompileCoreScript = (params) => {
103
- return callWasm('disCompileCoreScript', [params]);
104
- };
105
- const encodeFuncData = (op, dataHex) => {
106
- return callWasm('encodeFuncData', [op, dataHex]);
107
- };
108
- const encodeSubId = (hexString) => {
109
- return callWasm('encodeSubId', [hexString]);
110
- };
111
- const encodeTxCurrency = (params) => {
112
- return callWasm('encodeTxCurrency', [params]);
113
- };
114
- const encodeTxNumber = (params) => {
115
- return callWasm('encodeTxNumber', [params]);
116
- };
117
- const generateMnemonic = (params) => {
118
- return callWasm('generateMnemonic', [params]);
119
- };
120
- const generateMnemonicBySeed = (params) => {
121
- return callWasm('generateMnemonicBySeed', [params]);
122
- };
123
- const getDefFromCoreScript = (params) => {
124
- return callWasm('getDefFromCoreScript', [params]);
125
- };
126
- const getHomeShard = (params) => {
127
- return callWasm('getHomeShard', [params]);
128
- };
129
- const getLibraryVersions = () => {
130
- return callWasm('getLibraryVersions', []);
131
- };
132
- const gzipAndEncode = (str) => {
133
- return callWasm('gzipAndEncode', [str]);
134
- };
135
- const hash = (params) => {
136
- return callWasm('hash', [params]);
137
- };
138
- const isGrantConsumingTx = (txTypeStr) => {
139
- return callWasm('isGrantConsumingTx', [txTypeStr]);
140
- };
141
- const loadMasterKeystore = (params) => {
142
- return callWasm('loadMasterKeystore', [params]);
143
- };
144
- const loadNormalKeystore = (params) => {
145
- return callWasm('loadNormalKeystore', [params]);
146
- };
147
- const makeCurrency = (params) => {
148
- return callWasm('makeCurrency', [params]);
149
- };
150
- const sign = (param) => {
151
- return callWasm('sign', [param]);
152
- };
153
- const signByMasterKey = (params) => {
154
- return callWasm('signByMasterKey', [params]);
155
- };
156
- const signKeyBind = (params) => {
157
- return callWasm('signKeyBind', [params]);
158
- };
159
- const testCoreScript = (params) => {
160
- return callWasm('testCoreScript', [params]);
161
- };
162
- const verify = (params) => {
163
- return callWasm('verify', [params]);
164
- };
165
- const verifyByMasterKey = (params) => {
166
- return callWasm('verifyByMasterKey', [params]);
167
- };
168
- const verifyMerkleProof = (params) => {
169
- return callWasm('verifyMerkleProof', [params]);
170
- };
171
- const verifyTx = (jsonTx) => {
172
- return callWasm('verifyTx', [jsonTx]);
173
- };
174
-
175
- exports.calculateTxLinkHash = calculateTxLinkHash;
176
- exports.compileCoreScript = compileCoreScript;
177
- exports.convertAddressToData = convertAddressToData;
178
- exports.convertAddressToHex = convertAddressToHex;
179
- exports.convertBase32ToData = convertBase32ToData;
180
- exports.convertBase32ToHex = convertBase32ToHex;
181
- exports.convertCurrency = convertCurrency;
182
- exports.convertDataTo = convertDataTo;
183
- exports.convertDataToAddress = convertDataToAddress;
184
- exports.convertDataToBase32 = convertDataToBase32;
185
- exports.convertDataToHex = convertDataToHex;
186
- exports.convertDataToString = convertDataToString;
187
- exports.convertHexToAddress = convertHexToAddress;
188
- exports.convertHexToBase32 = convertHexToBase32;
189
- exports.convertHexToData = convertHexToData;
190
- exports.convertStringToData = convertStringToData;
191
- exports.convertToData = convertToData;
192
- exports.createAccountAndKeystore = createAccountAndKeystore;
193
- exports.createMasterKeystore = createMasterKeystore;
194
- exports.createNormalKey = createNormalKey;
195
- exports.createNormalKeystore = createNormalKeystore;
196
- exports.decodeSubId = decodeSubId;
197
- exports.decodeTxs = decodeTxs;
198
- exports.deriveKeysFromMnemonic = deriveKeysFromMnemonic;
199
- exports.deriveKeysFromMnemonicAndPath = deriveKeysFromMnemonicAndPath;
200
- exports.disCompileCoreScript = disCompileCoreScript;
201
- exports.encodeFuncData = encodeFuncData;
202
- exports.encodeSubId = encodeSubId;
203
- exports.encodeTxCurrency = encodeTxCurrency;
204
- exports.encodeTxNumber = encodeTxNumber;
205
- exports.generateMnemonic = generateMnemonic;
206
- exports.generateMnemonicBySeed = generateMnemonicBySeed;
207
- exports.getDefFromCoreScript = getDefFromCoreScript;
208
- exports.getHomeShard = getHomeShard;
209
- exports.getLibraryVersions = getLibraryVersions;
210
- exports.gzipAndEncode = gzipAndEncode;
211
- exports.hash = hash;
212
- exports.isGrantConsumingTx = isGrantConsumingTx;
213
- exports.loadMasterKeystore = loadMasterKeystore;
214
- exports.loadNormalKeystore = loadNormalKeystore;
215
- exports.makeCurrency = makeCurrency;
216
- exports.sign = sign;
217
- exports.signByMasterKey = signByMasterKey;
218
- exports.signKeyBind = signKeyBind;
219
- exports.testCoreScript = testCoreScript;
220
- exports.verify = verify;
221
- exports.verifyByMasterKey = verifyByMasterKey;
222
- exports.verifyMerkleProof = verifyMerkleProof;
223
- exports.verifyTx = verifyTx;
224
-
225
- }));