@locuschain/lib 0.1.32 → 0.1.35
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/accounts/index.cjs.cjs +2 -2
- package/dist/accounts/index.esm.js +2 -2
- package/dist/autogen/index.cjs.cjs +2 -2
- package/dist/autogen/index.esm.js +2 -2
- package/dist/chunks/{keystore-BJ3vekCS.js → keystore-BFVSylSw.js} +1 -1
- package/dist/chunks/{keystore-D-5mV7aC.cjs → keystore-BbK5pVrh.cjs} +1 -1
- package/dist/chunks/{lclib-DZydGzkN.js → lclib-C2eG5HzD.js} +23 -10
- package/dist/chunks/{lclib-B8Aj_otR.cjs → lclib-DuoOR0-Q.cjs} +32 -19
- package/dist/chunks/{wasm-3LmqFB_i.js → wasm-BtPcXTR4.js} +1 -1
- package/dist/chunks/{wasm-CdEv1Pyn.cjs → wasm-DTyHBxcY.cjs} +1 -1
- package/dist/clients/index.cjs.cjs +1 -1
- package/dist/clients/index.esm.js +1 -1
- package/dist/contracts/index.cjs.cjs +2 -2
- package/dist/contracts/index.esm.js +2 -2
- package/dist/index.cjs.cjs +3 -3
- package/dist/index.esm.js +3 -3
- package/dist/index.umd.d.mts +15 -0
- package/dist/umd/index.umd.js +26296 -0
- package/dist/utils/index.cjs.cjs +37 -8
- package/dist/utils/index.esm.js +38 -9
- package/dist/utils/tx-validator.d.mts +2 -0
- package/package.json +4 -4
- package/dist/accounts/index.amd.js +0 -306
- package/dist/autogen/index.amd.js +0 -151
- package/dist/chunks/account-BSrvZ7S8.js +0 -77
- package/dist/chunks/address-class-Dp7aNQb2.js +0 -18
- package/dist/chunks/base-B_kRRfsf.js +0 -27
- package/dist/chunks/debugWalletActions-BDz-h2tl.js +0 -993
- package/dist/chunks/keystore-C0RhMFsU.js +0 -143
- package/dist/chunks/lclib-CAHiuFux.js +0 -3825
- package/dist/chunks/rpc-C4n7t9y0.js +0 -25
- package/dist/chunks/transport-BBAz1kmP.js +0 -30
- package/dist/chunks/tslib.es6-D29rxPkW.js +0 -37
- package/dist/chunks/tx-type-CS4wIUJ8.js +0 -68
- package/dist/chunks/wasm-DAQaaEGK.js +0 -213
- package/dist/clients/index.amd.js +0 -97
- package/dist/constant/index.amd.js +0 -458
- package/dist/contracts/index.amd.js +0 -19640
- package/dist/errors/index.amd.js +0 -17
- package/dist/index.amd.js +0 -43
- package/dist/transports/index.amd.js +0 -98
- package/dist/utils/index.amd.js +0 -323
|
@@ -4,8 +4,8 @@ var tslib_es6 = require('../chunks/tslib.es6-Cfi3-HmA.cjs');
|
|
|
4
4
|
var txType = require('../chunks/tx-type-DI_nKG8B.cjs');
|
|
5
5
|
var base = require('../chunks/base-Cy5SSYLF.cjs');
|
|
6
6
|
var account = require('../chunks/account-BAsiKnSL.cjs');
|
|
7
|
-
var wasm = require('../chunks/wasm-
|
|
8
|
-
require('../chunks/lclib-
|
|
7
|
+
var wasm = require('../chunks/wasm-DTyHBxcY.cjs');
|
|
8
|
+
require('../chunks/lclib-DuoOR0-Q.cjs');
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* 메인 서명을 master 키로 생성하는 TX 타입 집합 (signByMasterKey WASM 호출).
|
|
@@ -2,8 +2,8 @@ import { _ as __awaiter } from '../chunks/tslib.es6-WQS2tr1v.js';
|
|
|
2
2
|
import { T as TxType } from '../chunks/tx-type-BPkhMGad.js';
|
|
3
3
|
import { B as BaseError } from '../chunks/base-BQXfRsuw.js';
|
|
4
4
|
import { a as SignKeyBindUnsupportedError, S as SignFailedError, D as DegenerateKeyError } from '../chunks/account-FZT9LH_s.js';
|
|
5
|
-
import { O as signKeyBind, N as signByMasterKey, M as sign, z as deriveKeysFromMnemonicAndPath, y as deriveKeysFromMnemonic } from '../chunks/wasm-
|
|
6
|
-
import '../chunks/lclib-
|
|
5
|
+
import { O as signKeyBind, N as signByMasterKey, M as sign, z as deriveKeysFromMnemonicAndPath, y as deriveKeysFromMnemonic } from '../chunks/wasm-BtPcXTR4.js';
|
|
6
|
+
import '../chunks/lclib-C2eG5HzD.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* 메인 서명을 master 키로 생성하는 TX 타입 집합 (signByMasterKey WASM 호출).
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var wasm = require('../chunks/wasm-
|
|
3
|
+
var wasm = require('../chunks/wasm-DTyHBxcY.cjs');
|
|
4
4
|
var debugWalletActions = require('../chunks/debugWalletActions-6qjkZVq9.cjs');
|
|
5
|
-
require('../chunks/lclib-
|
|
5
|
+
require('../chunks/lclib-DuoOR0-Q.cjs');
|
|
6
6
|
require('../chunks/tslib.es6-Cfi3-HmA.cjs');
|
|
7
7
|
require('../chunks/rpc-DwWIkUva.cjs');
|
|
8
8
|
require('../chunks/base-Cy5SSYLF.cjs');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { b as calculateTxLinkHash, d as compileCoreScript, e as convertAddressToData, f as convertAddressToHex, g as convertBase32ToData, h as convertBase32ToHex, i as convertCurrency, j as convertDataTo, k as convertDataToAddress, m as convertDataToBase32, n as convertDataToHex, o as convertDataToString, p as convertHexToAddress, q as convertHexToBase32, r as convertHexToData, s as convertStringToData, t as convertToData, c as createAccountAndKeystore, u as createMasterKeystore, v as createNormalKey, w as createNormalKeystore, x as decodeTxs, y as deriveKeysFromMnemonic, z as deriveKeysFromMnemonicAndPath, 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 isGrantConsumingTx, l as loadMasterKeystore, a as loadNormalKeystore, L as makeCurrency, M as sign, N as signByMasterKey, O as signKeyBind, P as testCoreScript, Q as verify, R as verifyByMasterKey, S as verifyMerkleProof, T as verifyTx } from '../chunks/wasm-
|
|
1
|
+
export { b as calculateTxLinkHash, d as compileCoreScript, e as convertAddressToData, f as convertAddressToHex, g as convertBase32ToData, h as convertBase32ToHex, i as convertCurrency, j as convertDataTo, k as convertDataToAddress, m as convertDataToBase32, n as convertDataToHex, o as convertDataToString, p as convertHexToAddress, q as convertHexToBase32, r as convertHexToData, s as convertStringToData, t as convertToData, c as createAccountAndKeystore, u as createMasterKeystore, v as createNormalKey, w as createNormalKeystore, x as decodeTxs, y as deriveKeysFromMnemonic, z as deriveKeysFromMnemonicAndPath, 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 isGrantConsumingTx, l as loadMasterKeystore, a as loadNormalKeystore, L as makeCurrency, M as sign, N as signByMasterKey, O as signKeyBind, P as testCoreScript, Q as verify, R as verifyByMasterKey, S as verifyMerkleProof, T as verifyTx } from '../chunks/wasm-BtPcXTR4.js';
|
|
2
2
|
import { a as allHeights, b as balanceGrantList, c as balanceList, d as callContract, e as createAccount, f as createContract, g as createNode, h as createSynthAccount, i as dumpAllAccounts, j as echo, k as gameChainCmd, l as getAccountsBalances, m as getAccountsHeights, n as getContractLog, o as getGuestsInfo, p as getHomeShard, q as getImportAccount, r as getImportAccountLog, s as getKeys, t as getNodeBlocks, u as getPeerPool, v as getPeersInfo, w as importAccount, x as initReliableNodes, y as noArgsRets, z as nodeCmd, A as postDataToSynthAccount, B as removeHoldTxs, C as requestVme, D as sendRawTransaction, E as setImportAccountTx, F as setReliableNode, G as viewContract } from '../chunks/debugWalletActions-D5-Ds7Hl.js';
|
|
3
3
|
export { H as acceptScript, I as accountHeightsToDownload, J as accountHeightsToUpload, K as becomeGuest, L as becomeHost, M as calculateSpentByExpress, N as changeKey, O as changeVkey, P as clientMessage, Q as closeAccount, R as createAssetObject, S as createToken, T as createVme, U as debugPublicActions, V as debugWalletActions, W as downloadAccountTxs, X as echo, Y as findDuplicateSubscriber, Z as generateLatestStoredDataProof, _ as getAccountAssetList, $ as getAccountAssetObject, a0 as getAccountDetail, a1 as getAccountHistory, a2 as getAccountTokenList, a3 as getConciseNodeStatus, a4 as getGenesisAccount, a5 as getIdentityProof, a6 as getInactiveTxList, a7 as getMontInfoList, a8 as getNodeStatus, a9 as getOwnerBalance, aa as getRoundState, ab as getRoundStatesList, ac as getShardOfAccount, ad as getSyncState, ae as getTx, af as getWorldRoundState, ag as getWorldRoundStatesList, ah as hasSystemToken, ai as lockStake, aj as makeTxProof, ak as openAccount, al as postData, am as provideScript, an as publicActions, ao as queryAddress, ap as readTxListWitness, aq as requestDataTrade, ar as setHost, as as subscribeAddress, at as transferAssetObject, au as transferCoin, av as transferCoinExpress, aw as transferToken, ax as unlockStake, ay as uploadAccountTxs, az as verifyAndSignChallenge, aA as verifyIdentityProof, aB as verifyLatestStoredDataProof, aC as verifyTxListWitness, aD as walletActions } from '../chunks/debugWalletActions-D5-Ds7Hl.js';
|
|
4
|
-
import '../chunks/lclib-
|
|
4
|
+
import '../chunks/lclib-C2eG5HzD.js';
|
|
5
5
|
import '../chunks/tslib.es6-WQS2tr1v.js';
|
|
6
6
|
import '../chunks/rpc-BlPk44QH.js';
|
|
7
7
|
import '../chunks/base-BQXfRsuw.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as createAccountAndKeystore, l as loadMasterKeystore, a as loadNormalKeystore } from './wasm-
|
|
1
|
+
import { c as createAccountAndKeystore, l as loadMasterKeystore, a as loadNormalKeystore } from './wasm-BtPcXTR4.js';
|
|
2
2
|
import { B as BaseError } from './base-BQXfRsuw.js';
|
|
3
3
|
import { D as DegenerateKeyError } from './account-FZT9LH_s.js';
|
|
4
4
|
|
|
@@ -3157,16 +3157,22 @@ globalThis.js_haetae_verify = function (sigBuf, msgBuf, pkBuf) {
|
|
|
3157
3157
|
// fetcher?: (url: URL) => Promise<Uint8Array> — 완전 커스텀 (CDN/캐시/모킹)
|
|
3158
3158
|
function loadCryptoWasm() {
|
|
3159
3159
|
return __awaiter(this, arguments, void 0, function* (opts = {}) {
|
|
3160
|
-
var _a, _b, _c, _d
|
|
3161
|
-
|
|
3162
|
-
|
|
3160
|
+
var _a, _b, _c, _d;
|
|
3161
|
+
// opts.baseUrl 이 주어지면 그대로 base 로 쓴다. import.meta.url 을 거치지 않는 이유:
|
|
3162
|
+
// chrome-extension MV3 의 production 번들 환경에서 import.meta.url 이 빈 문자열로
|
|
3163
|
+
// 치환될 수 있어 `new URL(abs, '')` 가 throw 한다. 호출자가 chrome.runtime.getURL()
|
|
3164
|
+
// 같은 absolute URL 을 명시 주입한 경우엔 base resolution 자체가 불필요.
|
|
3165
|
+
const base = opts.baseUrl
|
|
3166
|
+
? (opts.baseUrl instanceof URL ? opts.baseUrl : new URL(opts.baseUrl))
|
|
3167
|
+
: new URL('../autogen/wasm/', import.meta.url);
|
|
3168
|
+
const get = (_a = opts.fetcher) !== null && _a !== void 0 ? _a : fetchWasmBytes;
|
|
3163
3169
|
const resolve = (override, name) => override
|
|
3164
3170
|
? (override instanceof URL ? override : new URL(override, base))
|
|
3165
3171
|
: new URL(name, base);
|
|
3166
3172
|
const [aimerBin, smaugtBin, haetaeBin] = yield Promise.all([
|
|
3167
|
-
get(resolve((
|
|
3168
|
-
get(resolve((
|
|
3169
|
-
get(resolve((
|
|
3173
|
+
get(resolve((_b = opts.urls) === null || _b === void 0 ? void 0 : _b.aimer, 'crypto_aimer.wasm')),
|
|
3174
|
+
get(resolve((_c = opts.urls) === null || _c === void 0 ? void 0 : _c.smaugt, 'crypto_smaugt.wasm')),
|
|
3175
|
+
get(resolve((_d = opts.urls) === null || _d === void 0 ? void 0 : _d.haetae, 'crypto_haetae.wasm')),
|
|
3170
3176
|
]);
|
|
3171
3177
|
aimerC = yield AimerModule({ wasmBinary: aimerBin });
|
|
3172
3178
|
smaugtC = yield SmaugtModule({ wasmBinary: smaugtBin });
|
|
@@ -3771,16 +3777,23 @@ const lclibWasmConfig = { namespace };
|
|
|
3771
3777
|
// fetcher?: (url: URL) => Promise<Uint8Array> — 완전 커스텀 (CDN/캐시/모킹/Node 정적 경로)
|
|
3772
3778
|
function load() {
|
|
3773
3779
|
return __awaiter(this, arguments, void 0, function* (opts = {}) {
|
|
3774
|
-
var _a, _b
|
|
3780
|
+
var _a, _b;
|
|
3775
3781
|
try {
|
|
3776
|
-
|
|
3777
|
-
|
|
3782
|
+
console.log('[lclib.load] opts.baseUrl =', JSON.stringify(opts.baseUrl), 'typeof =', typeof opts.baseUrl, 'import.meta.url =', JSON.stringify(import.meta.url));
|
|
3783
|
+
// opts.baseUrl 이 주어지면 그대로 base 로 쓴다. import.meta.url 을 거치지 않는 이유:
|
|
3784
|
+
// chrome-extension MV3 의 production 번들 환경에서 import.meta.url 이 빈 문자열로
|
|
3785
|
+
// 치환될 수 있어 `new URL(abs, '')` 가 throw 한다. 호출자가 chrome.runtime.getURL()
|
|
3786
|
+
// 같은 absolute URL 을 명시 주입한 경우엔 base resolution 자체가 불필요.
|
|
3787
|
+
const base = opts.baseUrl
|
|
3788
|
+
? (opts.baseUrl instanceof URL ? opts.baseUrl : new URL(opts.baseUrl))
|
|
3789
|
+
: new URL('../autogen/wasm/', import.meta.url);
|
|
3790
|
+
const get = (_a = opts.fetcher) !== null && _a !== void 0 ? _a : fetchWasmBytes;
|
|
3778
3791
|
const resolve = (override, name) => override
|
|
3779
3792
|
? (override instanceof URL ? override : new URL(override, base))
|
|
3780
3793
|
: new URL(name, base);
|
|
3781
3794
|
// crypto WASM 3 종과 Go lclib WASM 을 병렬로 다운로드.
|
|
3782
3795
|
const cryptoPromise = loadCryptoWasm(opts);
|
|
3783
|
-
const lclibBytesPromise = get(resolve((
|
|
3796
|
+
const lclibBytesPromise = get(resolve((_b = opts.urls) === null || _b === void 0 ? void 0 : _b.lclib, 'lclib.wasm'));
|
|
3784
3797
|
let lclibBytes;
|
|
3785
3798
|
try {
|
|
3786
3799
|
[, lclibBytes] = yield Promise.all([cryptoPromise, lclibBytesPromise]);
|
|
@@ -13,10 +13,10 @@ function AimerModule() {
|
|
|
13
13
|
var ENVIRONMENT_IS_NODE = ((_b = (_a = globalThis.process) === null || _a === void 0 ? void 0 : _a.versions) === null || _b === void 0 ? void 0 : _b.node) && ((_c = globalThis.process) === null || _c === void 0 ? void 0 : _c.type) != "renderer";
|
|
14
14
|
if (ENVIRONMENT_IS_NODE) {
|
|
15
15
|
const { createRequire } = yield import('node:module');
|
|
16
|
-
var require$1 = createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-
|
|
16
|
+
var require$1 = createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-DuoOR0-Q.cjs', document.baseURI).href)));
|
|
17
17
|
}
|
|
18
18
|
var quit_ = (status, toThrow) => { throw toThrow; };
|
|
19
|
-
var _scriptName = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-
|
|
19
|
+
var _scriptName = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-DuoOR0-Q.cjs', document.baseURI).href));
|
|
20
20
|
var scriptDirectory = "";
|
|
21
21
|
function locateFile(path) { if (Module["locateFile"]) {
|
|
22
22
|
return Module["locateFile"](path, scriptDirectory);
|
|
@@ -83,7 +83,7 @@ function AimerModule() {
|
|
|
83
83
|
var wasmBinaryFile;
|
|
84
84
|
function findWasmBinary() { if (Module["locateFile"]) {
|
|
85
85
|
return locateFile("crypto_aimer.wasm");
|
|
86
|
-
} return new URL("crypto_aimer.wasm", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-
|
|
86
|
+
} return new URL("crypto_aimer.wasm", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-DuoOR0-Q.cjs', document.baseURI).href))).href; }
|
|
87
87
|
function getBinarySync(file) { if (file == wasmBinaryFile && wasmBinary) {
|
|
88
88
|
return new Uint8Array(wasmBinary);
|
|
89
89
|
} if (readBinary) {
|
|
@@ -335,9 +335,9 @@ function HaetaeModule() {
|
|
|
335
335
|
var ENVIRONMENT_IS_NODE = ((_b = (_a = globalThis.process) === null || _a === void 0 ? void 0 : _a.versions) === null || _b === void 0 ? void 0 : _b.node) && ((_c = globalThis.process) === null || _c === void 0 ? void 0 : _c.type) != "renderer";
|
|
336
336
|
if (ENVIRONMENT_IS_NODE) {
|
|
337
337
|
const { createRequire } = yield import('node:module');
|
|
338
|
-
var require$1 = createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-
|
|
338
|
+
var require$1 = createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-DuoOR0-Q.cjs', document.baseURI).href)));
|
|
339
339
|
}
|
|
340
|
-
var _scriptName = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-
|
|
340
|
+
var _scriptName = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-DuoOR0-Q.cjs', document.baseURI).href));
|
|
341
341
|
var scriptDirectory = "";
|
|
342
342
|
function locateFile(path) { if (Module["locateFile"]) {
|
|
343
343
|
return Module["locateFile"](path, scriptDirectory);
|
|
@@ -405,7 +405,7 @@ function HaetaeModule() {
|
|
|
405
405
|
var wasmBinaryFile;
|
|
406
406
|
function findWasmBinary() { if (Module["locateFile"]) {
|
|
407
407
|
return locateFile("crypto_haetae.wasm");
|
|
408
|
-
} return new URL("crypto_haetae.wasm", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-
|
|
408
|
+
} return new URL("crypto_haetae.wasm", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-DuoOR0-Q.cjs', document.baseURI).href))).href; }
|
|
409
409
|
function getBinarySync(file) { if (file == wasmBinaryFile && wasmBinary) {
|
|
410
410
|
return new Uint8Array(wasmBinary);
|
|
411
411
|
} if (readBinary) {
|
|
@@ -1641,9 +1641,9 @@ function SmaugtModule() {
|
|
|
1641
1641
|
var ENVIRONMENT_IS_NODE = ((_b = (_a = globalThis.process) === null || _a === void 0 ? void 0 : _a.versions) === null || _b === void 0 ? void 0 : _b.node) && ((_c = globalThis.process) === null || _c === void 0 ? void 0 : _c.type) != "renderer";
|
|
1642
1642
|
if (ENVIRONMENT_IS_NODE) {
|
|
1643
1643
|
const { createRequire } = yield import('node:module');
|
|
1644
|
-
var require$1 = createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-
|
|
1644
|
+
var require$1 = createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-DuoOR0-Q.cjs', document.baseURI).href)));
|
|
1645
1645
|
}
|
|
1646
|
-
var _scriptName = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-
|
|
1646
|
+
var _scriptName = (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-DuoOR0-Q.cjs', document.baseURI).href));
|
|
1647
1647
|
var scriptDirectory = "";
|
|
1648
1648
|
function locateFile(path) { if (Module["locateFile"]) {
|
|
1649
1649
|
return Module["locateFile"](path, scriptDirectory);
|
|
@@ -1711,7 +1711,7 @@ function SmaugtModule() {
|
|
|
1711
1711
|
var wasmBinaryFile;
|
|
1712
1712
|
function findWasmBinary() { if (Module["locateFile"]) {
|
|
1713
1713
|
return locateFile("crypto_smaugt.wasm");
|
|
1714
|
-
} return new URL("crypto_smaugt.wasm", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-
|
|
1714
|
+
} return new URL("crypto_smaugt.wasm", (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-DuoOR0-Q.cjs', document.baseURI).href))).href; }
|
|
1715
1715
|
function getBinarySync(file) { if (file == wasmBinaryFile && wasmBinary) {
|
|
1716
1716
|
return new Uint8Array(wasmBinary);
|
|
1717
1717
|
} if (readBinary) {
|
|
@@ -3160,16 +3160,22 @@ globalThis.js_haetae_verify = function (sigBuf, msgBuf, pkBuf) {
|
|
|
3160
3160
|
// fetcher?: (url: URL) => Promise<Uint8Array> — 완전 커스텀 (CDN/캐시/모킹)
|
|
3161
3161
|
function loadCryptoWasm() {
|
|
3162
3162
|
return tslib_es6.__awaiter(this, arguments, void 0, function* (opts = {}) {
|
|
3163
|
-
var _a, _b, _c, _d
|
|
3164
|
-
|
|
3165
|
-
|
|
3163
|
+
var _a, _b, _c, _d;
|
|
3164
|
+
// opts.baseUrl 이 주어지면 그대로 base 로 쓴다. import.meta.url 을 거치지 않는 이유:
|
|
3165
|
+
// chrome-extension MV3 의 production 번들 환경에서 import.meta.url 이 빈 문자열로
|
|
3166
|
+
// 치환될 수 있어 `new URL(abs, '')` 가 throw 한다. 호출자가 chrome.runtime.getURL()
|
|
3167
|
+
// 같은 absolute URL 을 명시 주입한 경우엔 base resolution 자체가 불필요.
|
|
3168
|
+
const base = opts.baseUrl
|
|
3169
|
+
? (opts.baseUrl instanceof URL ? opts.baseUrl : new URL(opts.baseUrl))
|
|
3170
|
+
: new URL('../autogen/wasm/', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-DuoOR0-Q.cjs', document.baseURI).href)));
|
|
3171
|
+
const get = (_a = opts.fetcher) !== null && _a !== void 0 ? _a : fetchWasmBytes;
|
|
3166
3172
|
const resolve = (override, name) => override
|
|
3167
3173
|
? (override instanceof URL ? override : new URL(override, base))
|
|
3168
3174
|
: new URL(name, base);
|
|
3169
3175
|
const [aimerBin, smaugtBin, haetaeBin] = yield Promise.all([
|
|
3170
|
-
get(resolve((
|
|
3171
|
-
get(resolve((
|
|
3172
|
-
get(resolve((
|
|
3176
|
+
get(resolve((_b = opts.urls) === null || _b === void 0 ? void 0 : _b.aimer, 'crypto_aimer.wasm')),
|
|
3177
|
+
get(resolve((_c = opts.urls) === null || _c === void 0 ? void 0 : _c.smaugt, 'crypto_smaugt.wasm')),
|
|
3178
|
+
get(resolve((_d = opts.urls) === null || _d === void 0 ? void 0 : _d.haetae, 'crypto_haetae.wasm')),
|
|
3173
3179
|
]);
|
|
3174
3180
|
aimerC = yield AimerModule({ wasmBinary: aimerBin });
|
|
3175
3181
|
smaugtC = yield SmaugtModule({ wasmBinary: smaugtBin });
|
|
@@ -3774,16 +3780,23 @@ const lclibWasmConfig = { namespace };
|
|
|
3774
3780
|
// fetcher?: (url: URL) => Promise<Uint8Array> — 완전 커스텀 (CDN/캐시/모킹/Node 정적 경로)
|
|
3775
3781
|
function load() {
|
|
3776
3782
|
return tslib_es6.__awaiter(this, arguments, void 0, function* (opts = {}) {
|
|
3777
|
-
var _a, _b
|
|
3783
|
+
var _a, _b;
|
|
3778
3784
|
try {
|
|
3779
|
-
|
|
3780
|
-
|
|
3785
|
+
console.log('[lclib.load] opts.baseUrl =', JSON.stringify(opts.baseUrl), 'typeof =', typeof opts.baseUrl, 'import.meta.url =', JSON.stringify((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-DuoOR0-Q.cjs', document.baseURI).href))));
|
|
3786
|
+
// opts.baseUrl 이 주어지면 그대로 base 로 쓴다. import.meta.url 을 거치지 않는 이유:
|
|
3787
|
+
// chrome-extension MV3 의 production 번들 환경에서 import.meta.url 이 빈 문자열로
|
|
3788
|
+
// 치환될 수 있어 `new URL(abs, '')` 가 throw 한다. 호출자가 chrome.runtime.getURL()
|
|
3789
|
+
// 같은 absolute URL 을 명시 주입한 경우엔 base resolution 자체가 불필요.
|
|
3790
|
+
const base = opts.baseUrl
|
|
3791
|
+
? (opts.baseUrl instanceof URL ? opts.baseUrl : new URL(opts.baseUrl))
|
|
3792
|
+
: new URL('../autogen/wasm/', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunks/lclib-DuoOR0-Q.cjs', document.baseURI).href)));
|
|
3793
|
+
const get = (_a = opts.fetcher) !== null && _a !== void 0 ? _a : fetchWasmBytes;
|
|
3781
3794
|
const resolve = (override, name) => override
|
|
3782
3795
|
? (override instanceof URL ? override : new URL(override, base))
|
|
3783
3796
|
: new URL(name, base);
|
|
3784
3797
|
// crypto WASM 3 종과 Go lclib WASM 을 병렬로 다운로드.
|
|
3785
3798
|
const cryptoPromise = loadCryptoWasm(opts);
|
|
3786
|
-
const lclibBytesPromise = get(resolve((
|
|
3799
|
+
const lclibBytesPromise = get(resolve((_b = opts.urls) === null || _b === void 0 ? void 0 : _b.lclib, 'lclib.wasm'));
|
|
3787
3800
|
let lclibBytes;
|
|
3788
3801
|
try {
|
|
3789
3802
|
[, lclibBytes] = yield Promise.all([cryptoPromise, lclibBytesPromise]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('../chunks/lclib-
|
|
3
|
+
require('../chunks/lclib-DuoOR0-Q.cjs');
|
|
4
4
|
var debugWalletActions = require('../chunks/debugWalletActions-6qjkZVq9.cjs');
|
|
5
5
|
require('../chunks/tslib.es6-Cfi3-HmA.cjs');
|
|
6
6
|
var transports = require('../transports/index.cjs.cjs');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../chunks/lclib-
|
|
1
|
+
import '../chunks/lclib-C2eG5HzD.js';
|
|
2
2
|
import { an as publicActions, U as debugPublicActions, aD as walletActions, V as debugWalletActions } from '../chunks/debugWalletActions-D5-Ds7Hl.js';
|
|
3
3
|
import '../chunks/tslib.es6-WQS2tr1v.js';
|
|
4
4
|
import { http } from '../transports/index.esm.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var tslib_es6 = require('../chunks/tslib.es6-Cfi3-HmA.cjs');
|
|
4
|
-
var wasm = require('../chunks/wasm-
|
|
5
|
-
require('../chunks/lclib-
|
|
4
|
+
var wasm = require('../chunks/wasm-DTyHBxcY.cjs');
|
|
5
|
+
require('../chunks/lclib-DuoOR0-Q.cjs');
|
|
6
6
|
|
|
7
7
|
var commonjsGlobal =
|
|
8
8
|
typeof globalThis !== 'undefined'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as __awaiter } from '../chunks/tslib.es6-WQS2tr1v.js';
|
|
2
|
-
import { r as convertHexToData, n as convertDataToHex } from '../chunks/wasm-
|
|
3
|
-
import '../chunks/lclib-
|
|
2
|
+
import { r as convertHexToData, n as convertDataToHex } from '../chunks/wasm-BtPcXTR4.js';
|
|
3
|
+
import '../chunks/lclib-C2eG5HzD.js';
|
|
4
4
|
|
|
5
5
|
var commonjsGlobal =
|
|
6
6
|
typeof globalThis !== 'undefined'
|
package/dist/index.cjs.cjs
CHANGED
|
@@ -9,12 +9,12 @@ var transport = require('./chunks/transport-VThNtzck.cjs');
|
|
|
9
9
|
var account = require('./chunks/account-BAsiKnSL.cjs');
|
|
10
10
|
var contracts = require('./contracts/index.cjs.cjs');
|
|
11
11
|
var constant = require('./constant/index.cjs.cjs');
|
|
12
|
-
var keystore = require('./chunks/keystore-
|
|
13
|
-
require('./chunks/lclib-
|
|
12
|
+
var keystore = require('./chunks/keystore-BbK5pVrh.cjs');
|
|
13
|
+
require('./chunks/lclib-DuoOR0-Q.cjs');
|
|
14
14
|
require('./chunks/tslib.es6-Cfi3-HmA.cjs');
|
|
15
15
|
require('./chunks/debugWalletActions-6qjkZVq9.cjs');
|
|
16
16
|
require('./chunks/tx-type-DI_nKG8B.cjs');
|
|
17
|
-
require('./chunks/wasm-
|
|
17
|
+
require('./chunks/wasm-DTyHBxcY.cjs');
|
|
18
18
|
require('./chunks/address-class-Cjy48Uqk.cjs');
|
|
19
19
|
|
|
20
20
|
|
package/dist/index.esm.js
CHANGED
|
@@ -7,10 +7,10 @@ export { A as AbortedError, H as HttpRequestError, T as TimeoutError } from './c
|
|
|
7
7
|
export { A as AccountRequiredError, D as DegenerateKeyError, I as InvalidTxResultError, S as SignFailedError, a as SignKeyBindUnsupportedError } from './chunks/account-FZT9LH_s.js';
|
|
8
8
|
export { erc20Abi, getContract } from './contracts/index.esm.js';
|
|
9
9
|
export { AddressClass, Currency, FeeType, GRANT_COST_PER_TX, MaxVMRewardsCount, TxType, TxTypes } from './constant/index.esm.js';
|
|
10
|
-
export { c as createKeystoreBundle, s as splitKeystoreBundle, u as unlockKeystoreBundle, a as unlockMasterKeystore, b as unlockNormalKeystore } from './chunks/keystore-
|
|
11
|
-
import './chunks/lclib-
|
|
10
|
+
export { c as createKeystoreBundle, s as splitKeystoreBundle, u as unlockKeystoreBundle, a as unlockMasterKeystore, b as unlockNormalKeystore } from './chunks/keystore-BFVSylSw.js';
|
|
11
|
+
import './chunks/lclib-C2eG5HzD.js';
|
|
12
12
|
import './chunks/tslib.es6-WQS2tr1v.js';
|
|
13
13
|
import './chunks/debugWalletActions-D5-Ds7Hl.js';
|
|
14
14
|
import './chunks/tx-type-BPkhMGad.js';
|
|
15
|
-
import './chunks/wasm-
|
|
15
|
+
import './chunks/wasm-BtPcXTR4.js';
|
|
16
16
|
import './chunks/address-class-CHAZYhdZ.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './clients/index.mjs';
|
|
2
|
+
export * from './transports/index.mjs';
|
|
3
|
+
export * from './accounts/index.mjs';
|
|
4
|
+
export * from './errors/index.mjs';
|
|
5
|
+
export * from './contracts/index.mjs';
|
|
6
|
+
export * from './constant/index.mjs';
|
|
7
|
+
export * from './types/index.mjs';
|
|
8
|
+
export * from './utils/index.mjs';
|
|
9
|
+
export * from './autogen/rpc-api-spec.mjs';
|
|
10
|
+
export * from './autogen/locus-tx.mjs';
|
|
11
|
+
export * from './autogen/publicActions.mjs';
|
|
12
|
+
export * from './autogen/walletActions.mjs';
|
|
13
|
+
export * from './autogen/debugPublicActions.mjs';
|
|
14
|
+
export * from './autogen/debugWalletActions.mjs';
|
|
15
|
+
export * from './autogen/actions/index.mjs';
|