@wowok/wowok 2.3.7 → 2.3.8
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/esm/Transaction-B_HAG_T7.mjs +1 -0
- package/dist/esm/arb-B7NNAqML.mjs +1 -0
- package/dist/esm/base-5DoRlfD_.mjs +1 -0
- package/dist/esm/call-DZtG6l2x.mjs +1 -0
- package/dist/esm/client/index.d.mts +1 -1
- package/dist/esm/client/index.mjs +1 -1
- package/dist/esm/{client-VxiBQfen.mjs → client-YYCgsO99.mjs} +1 -1
- package/dist/esm/common-CQggZ8z4.mjs +1 -0
- package/dist/esm/cryptography/index.d.mts +1 -1
- package/dist/esm/cryptography/index.mjs +1 -1
- package/dist/esm/ed25519-BrJWQ45w.mjs +1 -1
- package/dist/esm/evm-account-Dppw7HJc.d.mts +233 -0
- package/dist/esm/exception--UEPnygY.mjs +1 -0
- package/dist/esm/{falcon512-J8Pe5emy.mjs → falcon512-B4y-EH2f.mjs} +1 -1
- package/dist/esm/graphql/index.d.mts +1 -1
- package/dist/esm/graphql/index.mjs +1 -1
- package/dist/esm/{graphql-BXSiG4J0.mjs → graphql-D2Rx6H0h.mjs} +1 -1
- package/dist/esm/grpc/index.d.mts +1 -1
- package/dist/esm/grpc/index.mjs +1 -1
- package/dist/esm/{grpc-clMX5Wo0.mjs → grpc-BYkFJ8ot.mjs} +1 -1
- package/dist/esm/{index-Q3W63gcw.d.mts → index-BB7rqcJ9.d.mts} +688 -288
- package/dist/esm/index.d.mts +5 -5
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/jsonRpc/index.d.mts +1 -1
- package/dist/esm/jsonRpc/index.mjs +1 -1
- package/dist/esm/keypairs/ed25519/index.d.mts +1 -1
- package/dist/esm/keypairs/falcon512/index.d.mts +1 -1
- package/dist/esm/keypairs/falcon512/index.mjs +1 -1
- package/dist/esm/keypairs/passkey/index.d.mts +1 -1
- package/dist/esm/keypairs/passkey/index.mjs +1 -1
- package/dist/esm/keypairs/secp256k1/index.d.mts +1 -1
- package/dist/esm/keypairs/secp256k1/index.mjs +1 -1
- package/dist/esm/keypairs/secp256r1/index.d.mts +1 -1
- package/dist/esm/keypairs/secp256r1/index.mjs +1 -1
- package/dist/esm/messenger-api-DsV5ffz-.mjs +1 -0
- package/dist/esm/{messenger-Bokr4-T2.mjs → messenger-b7VI27mY.mjs} +1 -1
- package/dist/esm/multisig/index.d.mts +1 -1
- package/dist/esm/multisig/index.mjs +1 -1
- package/dist/esm/{network-DOe6BgcD.mjs → network-CeDd07Hg.mjs} +1 -1
- package/dist/esm/{networks-DhrBVvu6.d.mts → networks-CEYOA-1U.d.mts} +95 -16
- package/dist/esm/object-ZwHVe_Xm.mjs +1 -0
- package/dist/esm/passkey-D0XCtEYg.mjs +1 -0
- package/dist/esm/proof-DU8afdtW.mjs +1 -0
- package/dist/esm/publickey-BPT9QiGv.mjs +1 -1
- package/dist/esm/{publickey-S1fGFYJX.mjs → publickey-Bkjn-YAu.mjs} +1 -1
- package/dist/esm/publickey-qLbcTInT.mjs +1 -1
- package/dist/esm/publickey-zB4h0HOi.mjs +1 -1
- package/dist/esm/received-g0FdzsRW.mjs +1 -0
- package/dist/esm/{rlp-BcIAoIV4.d.mts → rlp-Do3rPWRV.d.mts} +9 -1
- package/dist/esm/rolldown-runtime-D7D4PA-g.mjs +1 -0
- package/dist/esm/secp256k1-B-8mI0dI.mjs +1 -0
- package/dist/esm/secp256r1-B3O6jSlP.mjs +1 -0
- package/dist/esm/service-BP_-4e1d.mjs +1 -0
- package/dist/esm/storage-0TLziZMp.d.mts +62 -0
- package/dist/esm/transactions/index.d.mts +1 -1
- package/dist/esm/transactions/index.mjs +1 -1
- package/dist/esm/{transactions-CDWnTSTU.mjs → transactions-rYyItYOR.mjs} +1 -1
- package/dist/esm/util-BUonvpyz.mjs +1 -0
- package/dist/esm/utils/index.mjs +1 -1
- package/dist/esm/utils-IlS3fpdQ.mjs +1 -1
- package/dist/esm/verify/index.d.mts +1 -1
- package/dist/esm/verify/index.mjs +1 -1
- package/dist/esm/w/call/allocation.d.mts +1 -1
- package/dist/esm/w/call/allocation.mjs +1 -1
- package/dist/esm/w/call/arbitration.d.mts +1 -1
- package/dist/esm/w/call/arbitration.mjs +1 -1
- package/dist/esm/w/call/base.d.mts +1 -1
- package/dist/esm/w/call/base.mjs +1 -1
- package/dist/esm/w/call/demand.d.mts +1 -1
- package/dist/esm/w/call/demand.mjs +1 -1
- package/dist/esm/w/call/guard.d.mts +1 -1
- package/dist/esm/w/call/guard.mjs +1 -1
- package/dist/esm/w/call/index.d.mts +2 -2
- package/dist/esm/w/call/index.mjs +1 -1
- package/dist/esm/w/call/machine.d.mts +1 -1
- package/dist/esm/w/call/machine.mjs +1 -1
- package/dist/esm/w/call/passport.d.mts +1 -1
- package/dist/esm/w/call/passport.mjs +1 -1
- package/dist/esm/w/call/payment.d.mts +1 -1
- package/dist/esm/w/call/payment.mjs +1 -1
- package/dist/esm/w/call/permission.d.mts +1 -1
- package/dist/esm/w/call/permission.mjs +1 -1
- package/dist/esm/w/call/progress.d.mts +1 -1
- package/dist/esm/w/call/progress.mjs +1 -1
- package/dist/esm/w/call/repository.d.mts +1 -1
- package/dist/esm/w/call/repository.mjs +1 -1
- package/dist/esm/w/call/reward.d.mts +1 -1
- package/dist/esm/w/call/reward.mjs +1 -1
- package/dist/esm/w/call/service.d.mts +1 -1
- package/dist/esm/w/call/service.mjs +1 -1
- package/dist/esm/w/call/treasury.d.mts +1 -1
- package/dist/esm/w/call/treasury.mjs +1 -1
- package/dist/esm/w/common.d.mts +1 -1
- package/dist/esm/w/common.mjs +1 -1
- package/dist/esm/w/index.d.mts +5 -5
- package/dist/esm/w/index.mjs +1 -1
- package/dist/esm/w/local/account.d.mts +1 -1
- package/dist/esm/w/local/account.mjs +1 -1
- package/dist/esm/w/local/config.mjs +1 -1
- package/dist/esm/w/local/evm/networks.d.mts +1 -1
- package/dist/esm/w/local/evm/networks.mjs +1 -1
- package/dist/esm/w/local/evm/rlp.d.mts +2 -2
- package/dist/esm/w/local/evm/rlp.mjs +1 -1
- package/dist/esm/w/local/evm-account.d.mts +3 -3
- package/dist/esm/w/local/evm-account.mjs +1 -1
- package/dist/esm/w/local/index.d.mts +5 -5
- package/dist/esm/w/local/index.mjs +1 -1
- package/dist/esm/w/local/local.mjs +1 -1
- package/dist/esm/w/local/storage.d.mts +1 -52
- package/dist/esm/w/local/storage.mjs +1 -1
- package/dist/esm/w/local/token.d.mts +1 -1
- package/dist/esm/w/local/token.mjs +1 -1
- package/dist/esm/w/local/util.mjs +1 -1
- package/dist/esm/w/local/wip.mjs +1 -1
- package/dist/esm/w/messenger/index.d.mts +1 -1
- package/dist/esm/w/messenger/index.mjs +1 -1
- package/dist/esm/w/messenger/messenger-api.d.mts +1 -1
- package/dist/esm/w/messenger/messenger-api.mjs +1 -1
- package/dist/esm/w/messenger/messenger.d.mts +1 -1
- package/dist/esm/w/messenger/messenger.mjs +1 -1
- package/dist/esm/w/messenger/pq/crypto.mjs +1 -1
- package/dist/esm/w/messenger/pq/erasure.mjs +1 -1
- package/dist/esm/w/messenger/storage.d.mts +1 -1
- package/dist/esm/w/messenger/storage.mjs +1 -1
- package/dist/esm/w/messenger/types.d.mts +1 -1
- package/dist/esm/w/messenger/types.mjs +1 -1
- package/dist/esm/w/query/index.d.mts +1 -1
- package/dist/esm/w/query/index.mjs +1 -1
- package/dist/esm/w/query/object.d.mts +1 -1
- package/dist/esm/w/query/object.mjs +1 -1
- package/dist/esm/w-DCO00HIj.mjs +1 -0
- package/package.json +1 -4
- package/dist/esm/Transaction-YosVjNZA.mjs +0 -1
- package/dist/esm/arb-NYOQp2oH.mjs +0 -1
- package/dist/esm/base-fdHKX-jS.mjs +0 -1
- package/dist/esm/bridge-AHnWGzN1.mjs +0 -1
- package/dist/esm/call-7FZbEsRl.mjs +0 -1
- package/dist/esm/common-fDv-Cuzq.mjs +0 -1
- package/dist/esm/evm-account-XzrSThfS.d.mts +0 -185
- package/dist/esm/local-c-Tbdkfa.mjs +0 -1
- package/dist/esm/messenger-api-1m7Lp85p.mjs +0 -1
- package/dist/esm/object-DzsQI-0e.mjs +0 -1
- package/dist/esm/passkey-Dh6btBAD.mjs +0 -1
- package/dist/esm/proof-DER5SXw4.mjs +0 -1
- package/dist/esm/received-D7jEPxlE.mjs +0 -1
- package/dist/esm/rolldown-runtime-DkIiUugF.mjs +0 -1
- package/dist/esm/secp256k1-BZUdTK1D.mjs +0 -1
- package/dist/esm/secp256r1-COXOSFIF.mjs +0 -1
- package/dist/esm/service-W7-dgV57.mjs +0 -1
- package/dist/esm/util-B3X9acB0.mjs +0 -1
- package/dist/esm/w/call/bridge.d.mts +0 -2
- package/dist/esm/w/call/bridge.mjs +0 -1
- package/dist/esm/w-5GiAI3sP.mjs +0 -1
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { t as IAccountStorage } from "./storage-0TLziZMp.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/w/local/evm-account.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* 全局唯一的 active EVM 账户数据。
|
|
6
|
+
*
|
|
7
|
+
* 设计意图:
|
|
8
|
+
* - 整个进程只有一个 EVM 签名账户(secp256k1),所有 EVM 兼容链共用同一私钥
|
|
9
|
+
* - 私钥持久化到 account.db → evm_accounts 表,单行单对象(非数组)
|
|
10
|
+
* - secret 仅在读出时临时存在于内存,签名完成后应尽快清空
|
|
11
|
+
* - 跨链桥场景下自动 gen 一个,调用方无需关心账户管理
|
|
12
|
+
*/
|
|
13
|
+
interface EvmAccountData {
|
|
14
|
+
address: string;
|
|
15
|
+
pubkey?: string;
|
|
16
|
+
secret?: string;
|
|
17
|
+
createdAt?: number;
|
|
18
|
+
updatedAt?: number;
|
|
19
|
+
}
|
|
20
|
+
/** EVM 交易请求(未签名) */
|
|
21
|
+
interface EvmTransactionRequest {
|
|
22
|
+
to: string;
|
|
23
|
+
data?: string;
|
|
24
|
+
value?: bigint;
|
|
25
|
+
/**
|
|
26
|
+
* 网络选择(优先级最高):
|
|
27
|
+
* - 数字 → 按 chainId 查 Registry
|
|
28
|
+
* - 字符串 → 按网络名查 Registry(如 "mainnet" / "arbitrum")
|
|
29
|
+
* - 不传 → 使用 Registry 默认网络
|
|
30
|
+
*/
|
|
31
|
+
network?: number | string;
|
|
32
|
+
/** 显式覆盖 chainId(通常由 network 自动填充,无需手动传) */
|
|
33
|
+
chainId?: number;
|
|
34
|
+
/** 显式覆盖 RPC URL(通常由 network 自动填充;传入则跳过 Registry) */
|
|
35
|
+
rpcUrl?: string;
|
|
36
|
+
/** gas 相关参数;不传则自动估算 */
|
|
37
|
+
gasLimit?: bigint;
|
|
38
|
+
maxFeePerGas?: bigint;
|
|
39
|
+
maxPriorityFeePerGas?: bigint;
|
|
40
|
+
gasPrice?: bigint;
|
|
41
|
+
/** nonce;不传则自动从链上查询 */
|
|
42
|
+
nonce?: number;
|
|
43
|
+
}
|
|
44
|
+
/** EVM 交易回执 */
|
|
45
|
+
interface EvmTransactionReceipt {
|
|
46
|
+
transactionHash: string;
|
|
47
|
+
blockNumber: bigint;
|
|
48
|
+
blockHash: string;
|
|
49
|
+
status: "0x1" | "0x0";
|
|
50
|
+
gasUsed: bigint;
|
|
51
|
+
effectiveGasPrice: bigint;
|
|
52
|
+
from: string;
|
|
53
|
+
to: string;
|
|
54
|
+
contractAddress?: string;
|
|
55
|
+
logs: EvmLog[];
|
|
56
|
+
}
|
|
57
|
+
interface EvmLog {
|
|
58
|
+
address: string;
|
|
59
|
+
topics: string[];
|
|
60
|
+
data: string;
|
|
61
|
+
blockNumber: bigint;
|
|
62
|
+
transactionHash: string;
|
|
63
|
+
transactionIndex: number;
|
|
64
|
+
logIndex: number;
|
|
65
|
+
removed: boolean;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* 全局唯一的 active EVM 账户。
|
|
69
|
+
*
|
|
70
|
+
* 使用例:
|
|
71
|
+
* ```ts
|
|
72
|
+
* const acc = EvmAccount.Instance();
|
|
73
|
+
* const active = await acc.active(); // 自动 gen 或返回已有
|
|
74
|
+
* const receipt = await acc.sign_and_send(tx); // 用 active 账户签名
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
declare class EvmAccount {
|
|
78
|
+
static _instance: EvmAccount | undefined;
|
|
79
|
+
static storage: IAccountStorage | undefined;
|
|
80
|
+
private static _lock;
|
|
81
|
+
setStorage(storage: IAccountStorage): void;
|
|
82
|
+
private _getStorage;
|
|
83
|
+
static Instance(): EvmAccount;
|
|
84
|
+
/**
|
|
85
|
+
* 从存储读取账户数据(不含 secret)。
|
|
86
|
+
* 自动迁移旧格式(数组)→ 单对象。
|
|
87
|
+
*/
|
|
88
|
+
private _get;
|
|
89
|
+
/**
|
|
90
|
+
* 从存储读取含 secret 的完整账户数据。
|
|
91
|
+
* 用于签名操作(sign_and_send / signData / transfer)。
|
|
92
|
+
*/
|
|
93
|
+
private _getWithSecret;
|
|
94
|
+
/**
|
|
95
|
+
* 写回账户数据到存储。
|
|
96
|
+
*/
|
|
97
|
+
private _save;
|
|
98
|
+
/**
|
|
99
|
+
* 解析网络配置(统一入口)
|
|
100
|
+
*
|
|
101
|
+
* 优先级:
|
|
102
|
+
* 1. 显式 rpcUrl(向后兼容,最高优先级,直接构造临时配置)
|
|
103
|
+
* 2. network(chainId | name)→ Registry 查找
|
|
104
|
+
* 3. Registry 默认网络
|
|
105
|
+
*
|
|
106
|
+
* @returns 选定的网络配置 + 实际使用的 RPC URL(已应用故障转移)
|
|
107
|
+
*/
|
|
108
|
+
private resolveNetwork;
|
|
109
|
+
/**
|
|
110
|
+
* RPC 调用(带故障转移)
|
|
111
|
+
* 主 RPC 失败时自动切换到备用 RPC,并标记原 RPC 不可用。
|
|
112
|
+
*/
|
|
113
|
+
private rpcWithFailover;
|
|
114
|
+
/**
|
|
115
|
+
* 生成新的 EVM 账户(secp256k1),覆盖写入存储。
|
|
116
|
+
*
|
|
117
|
+
* 如已有账户则直接覆盖(旧账户丢失不可恢复,谨慎使用)。
|
|
118
|
+
* 通常由 active() 在首次调用时自动调用,无需手动调用。
|
|
119
|
+
*
|
|
120
|
+
* @returns 账户数据(不含 secret)
|
|
121
|
+
*/
|
|
122
|
+
gen(): Promise<EvmAccountData>;
|
|
123
|
+
/**
|
|
124
|
+
* 导入已有 EVM 私钥,覆盖当前活跃账户。
|
|
125
|
+
*
|
|
126
|
+
* @param privateKey 私钥(0x + 64 hex,32 字节)
|
|
127
|
+
* @returns 账户数据(不含 secret)
|
|
128
|
+
*/
|
|
129
|
+
importPrivateKey(privateKey: string): Promise<EvmAccountData>;
|
|
130
|
+
/**
|
|
131
|
+
* 获取当前活跃的 EVM 账户。
|
|
132
|
+
*
|
|
133
|
+
* 首次调用若账户不存在,自动生成一个 secp256k1 密钥对并持久化。
|
|
134
|
+
* 所有跨链桥操作均使用此账户签名,调用方无需关心账户管理。
|
|
135
|
+
*
|
|
136
|
+
* @returns 活跃账户数据(不含 secret)
|
|
137
|
+
*/
|
|
138
|
+
active(): Promise<EvmAccountData>;
|
|
139
|
+
/** 查询 EVM 活跃账户的 ETH 原生余额(wei) */
|
|
140
|
+
balance(network?: number | string, rpcUrl?: string): Promise<bigint | undefined>;
|
|
141
|
+
/** 查询 EVM 活跃账户的 ERC20 token 余额(需 ABI 调用 balanceOf) */
|
|
142
|
+
balanceOf(tokenAddress: string, network?: number | string, rpcUrl?: string): Promise<bigint | undefined>;
|
|
143
|
+
/** 查询 EVM 活跃账户的 pending nonce */
|
|
144
|
+
getNonce(network?: number | string, rpcUrl?: string): Promise<number | undefined>;
|
|
145
|
+
/** 查询当前 chainId */
|
|
146
|
+
getChainId(network?: number | string, rpcUrl?: string): Promise<number>;
|
|
147
|
+
/** 查询当前区块号 */
|
|
148
|
+
getBlockNumber(network?: number | string, rpcUrl?: string): Promise<bigint>;
|
|
149
|
+
/** eth_call 模拟交易(不消耗 gas,用于预检 revert 原因) */
|
|
150
|
+
ethCall(tx: EvmTransactionRequest, network?: number | string, rpcUrl?: string): Promise<string>;
|
|
151
|
+
/** 根据 calldata 估算保守 gas limit(用于 estimateGas 失败时的 fallback) */
|
|
152
|
+
private guessGasLimit;
|
|
153
|
+
/** 估算 gas limit */
|
|
154
|
+
estimateGas(tx: EvmTransactionRequest, network?: number | string, rpcUrl?: string): Promise<bigint>;
|
|
155
|
+
/** 安全估算 gas limit:先 eth_call 预检,失败时降级到保守值 */
|
|
156
|
+
safeEstimateGas(tx: EvmTransactionRequest): Promise<{
|
|
157
|
+
gasLimit: bigint;
|
|
158
|
+
revertReason?: string;
|
|
159
|
+
}>;
|
|
160
|
+
/** 查询 EIP-1559 费用参数(baseFee + maxPriorityFee) */
|
|
161
|
+
getFeeData(network?: number | string, rpcUrl?: string): Promise<{
|
|
162
|
+
maxFeePerGas: bigint;
|
|
163
|
+
maxPriorityFeePerGas: bigint;
|
|
164
|
+
gasPrice?: bigint;
|
|
165
|
+
}>;
|
|
166
|
+
/**
|
|
167
|
+
* 签名并广播 EVM 交易(一体化入口,对称于 Account.sign_and_commit)
|
|
168
|
+
*
|
|
169
|
+
* 使用 active EVM 账户(全局唯一)签名。
|
|
170
|
+
* 网络选择优先级:
|
|
171
|
+
* 1. tx.network(chainId 或 name)
|
|
172
|
+
* 2. tx.rpcUrl(显式 RPC URL)
|
|
173
|
+
* 3. EvmNetworkRegistry 默认网络
|
|
174
|
+
*
|
|
175
|
+
* @param tx 交易请求
|
|
176
|
+
* @param rpcUrl RPC 节点 URL(向后兼容;推荐用 tx.network 替代)
|
|
177
|
+
* @returns 交易回执(已确认)
|
|
178
|
+
*/
|
|
179
|
+
sign_and_send(tx: EvmTransactionRequest, rpcUrl?: string): Promise<EvmTransactionReceipt>;
|
|
180
|
+
/** 等待交易确认 */
|
|
181
|
+
waitForReceipt(txHash: string, network?: number | string, rpcUrl?: string, maxWaitMs?: number): Promise<EvmTransactionReceipt>;
|
|
182
|
+
private parseReceipt;
|
|
183
|
+
/**
|
|
184
|
+
* 对任意数据签名(EIP-191 个人签名)
|
|
185
|
+
*
|
|
186
|
+
* 使用全局唯一的 active EVM 账户签名。
|
|
187
|
+
* 实现:\x19Ethereum Signed Message:\n<len><data>
|
|
188
|
+
*/
|
|
189
|
+
signData(data: string | Uint8Array): Promise<{
|
|
190
|
+
signature: string;
|
|
191
|
+
publicKey: string;
|
|
192
|
+
address: string;
|
|
193
|
+
}>;
|
|
194
|
+
/**
|
|
195
|
+
* 从指定 EVM 账户(默认 activeEvmAccount)转移原生 ETH 或 ERC20 到目标地址
|
|
196
|
+
*
|
|
197
|
+
* 应用场景:
|
|
198
|
+
* - 跨链桥 WOW→ETH:claim 资产到达 activeEvmAccount 后,转给用户最终提款账户
|
|
199
|
+
* - 跨链桥 ETH→WOW:从 activeEvmAccount 转出原生 ETH/ERC20 到 bridge 合约 deposit
|
|
200
|
+
* - 单独提款:用户主动把 activeEvmAccount 余额提走
|
|
201
|
+
*
|
|
202
|
+
* 自动执行:
|
|
203
|
+
* 1. 解析 from(默认 activeEvmAccount)
|
|
204
|
+
* 2. 校验 to 地址
|
|
205
|
+
* 3. 查询 from 余额,校验 amount ≤ balance(不足抛错)
|
|
206
|
+
* 4. 构造交易(原生 ETH 走 value 路径;ERC20 走 transfer(address,amount) calldata)
|
|
207
|
+
* 5. sign_and_send,返回回执
|
|
208
|
+
*
|
|
209
|
+
* @param params 转账参数
|
|
210
|
+
* @returns 交易回执
|
|
211
|
+
*/
|
|
212
|
+
transfer(params: {
|
|
213
|
+
/** 接收地址(0x + 40 hex);不允许使用 name,必须为合法 EVM 地址 */to: string; /** 转账金额(wei 或 token 最小单位) */
|
|
214
|
+
amount: bigint; /** ERC20 token 合约地址;不传则转原生 ETH */
|
|
215
|
+
tokenAddress?: string; /** EVM 网络(chainId 或 name),默认 Registry 默认网络(ETH 主网) */
|
|
216
|
+
network?: number | string; /** 显式 RPC URL(覆盖 Registry) */
|
|
217
|
+
rpcUrl?: string;
|
|
218
|
+
}): Promise<EvmTransactionReceipt>;
|
|
219
|
+
/**
|
|
220
|
+
* 便捷封装:从 activeEvmAccount 提款到任意 EVM 地址
|
|
221
|
+
*
|
|
222
|
+
* 等价于 `transfer({ ... })`
|
|
223
|
+
*/
|
|
224
|
+
withdrawFromActive(params: {
|
|
225
|
+
to: string;
|
|
226
|
+
amount: bigint;
|
|
227
|
+
tokenAddress?: string;
|
|
228
|
+
network?: number | string;
|
|
229
|
+
rpcUrl?: string;
|
|
230
|
+
}): Promise<EvmTransactionReceipt>;
|
|
231
|
+
}
|
|
232
|
+
//#endregion
|
|
233
|
+
export { EvmTransactionRequest as a, EvmTransactionReceipt as i, EvmAccountData as n, EvmLog as r, EvmAccount as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let WErrors=function(a){return a['AccountNotFound']='account\x20not\x20found',a['AddressNotFound']='address\x20not\x20found',a['IsValidDescription']='invalid\x20description',a['IsValidName']='invalid\x20name',a['IsValidName_AllowEmpty']='invalid\x20name',a['IsValidEndpoint']='invalid\x20endpoint',a['IsValidAddress']='invalid\x20address',a['IsValidArgType']='invalid\x20argument\x20type',a['IsValidTokenType']='invalid\x20token\x20type',a['IsValidUint']='invalid\x20uint',a['IsValidInt']='invalid\x20int',a['IsValidU8']='invalid\x20u8',a['IsValidU16']='invalid\x20u16',a['IsValidU32']='invalid\x20u32',a['IsValidU64']='invalid\x20u64',a['IsValidU128']='invalid\x20u128',a['IsValidU256']='invalid\x20u256',a['IsValidRate']='invalid\x20rate[0-10000]',a['IsValidArray']='invalid\x20array',a['IsValidObjects']='invalid\x20objects',a['AllInvalid']='one\x20valid\x20at\x20least',a['InvalidParam']='invalid\x20parameter',a['IsValidPermissionIndex']='invalid\x20permission\x20index',a['IsValidKey']='invalid\x20key',a['Fail']='fail',a['IsValidIdentifier']='identifier\x20invalid',a['IsValidHttpUrl']='invalid\x20url',a['IsValidBizPermissionIndex']='invalid\x20biz-permission\x20id[1000\x20-\x2065535]',a['BcsTypeInvalid']='invalid\x20bcs\x20type',a['IsValidServiceItemName']='invalid\x20service\x20item\x20name',a['IsValidCoinType']='not\x20the\x20coin\x20type',a['IsValidGuardIdentifier']='guard\x20identifier\x20invalid',a['NoPermission']='no\x20permission',a['IsValidValue']='invalid\x20value',a['IsValidValueType']='invalid\x20value\x20type',a['IsValidLocation']='invalid\x20location',a['NetworkInvalid']='protocol\x20network\x20not\x20specified',a['WitnessTypeInvalid']='witness\x20type\x20invalid',a['AddressCountExceeded']='address\x20count\x20exceeded',a['NumberCountExceeded']='number\x20count\x20exceeded',a['NewGuardCheckFailed']='new\x20guard\x20check\x20failed',a['GuardTableItemLengthExceeded']='guard\x20table\x20item\x20length\x20exceeded',a['AccountPersistentStorageNotSet']='account\x20persistent\x20storage\x20not\x20set',a['AccountPersistentStorageNotFound']='account\x20persistent\x20storage\x20not\x20found',a['AccountNameExist']='account\x20name\x20exist',a['ConfigPersistentStorageNotSet']='config\x20persistent\x20storage\x20not\x20set',a['TokenNotFoundLocally']='token\x20not\x20found',a['LocalMarkNameExist']='local\x20mark\x20name\x20exist',a['MaxObjectsPerQuery']='max\x20objects\x20per\x20query',a['ResourceTagCountExceeded']='resource\x20tag\x20count\x20exceeded',a['ParseObjectContentFailed']='parse\x20object\x20content\x20failed',a;}({});var WException=class WException extends Error{constructor(a,b){const c=a['toString']()+(b?':'+b:'');super(c),this['code']=a,this['details']=b,Object['setPrototypeOf'](this,WException['prototype']);}['getErrorMessage'](){return this['message'];}['getErrorCode'](){return this['code'];}['getDetails'](){return this['details'];}};const W_ERROR=(a,b)=>{throw new WException(a,b);},W_SUCCESS=a=>({'success':!![],'data':a}),W_FAILURE=(a,b)=>({'success':![],'error':new WException(a,b)});function WValidate(a){return function(...b){try{return a['apply'](this,b);}catch(c){if(c instanceof WException)throw c;throw new WException('fail',c);}};}const W_SAFE=(a,b,c)=>{try{const d=a();return W_SUCCESS(d);}catch(e){if(e instanceof WException)return W_FAILURE(e['code'],e['details']);return W_FAILURE(b||'fail',c||e);}},W_ENSURE=(a,b,c)=>{if(!a)W_ERROR(b,c);},W_VALIDATE_PARAM=(a,b,c,d)=>{if(!b(a))W_ERROR(c,d);},MoveErrors=[{'module':'service','code':0x1,'description':'Maximum\x20sale\x20count\x20exceeded'},{'module':'service','code':0x2,'description':'Maximum\x20repository\x20count\x20exceeded'},{'module':'service','code':0x3,'description':'Maximum\x20arbitration\x20count\x20exceeded'},{'module':'service','code':0x4,'description':'Maximum\x20WIP\x20length\x20exceeded'},{'module':'service','code':0x5,'description':'Maximum\x20WIP\x20hash\x20length\x20exceeded'},{'module':'service','code':0x6,'description':'Service\x20already\x20published'},{'module':'service','code':0x7,'description':'Service\x20not\x20published'},{'module':'service','code':0x8,'description':'Invalid\x20off-on\x20discount\x20rates'},{'module':'service','code':0x9,'description':'Maximum\x20discount\x20count\x20per\x20operation\x20exceeded'},{'module':'service','code':0xa,'description':'Discount\x20not\x20transferable'},{'module':'service','code':0xb,'description':'Discount\x20receiver\x20empty'},{'module':'service','code':0xc,'description':'Discount\x20count\x20empty'},{'module':'service','code':0xd,'description':'Maximum\x20discount\x20receiver\x20per\x20operation\x20exceeded'},{'module':'service','code':0xe,'description':'Maximum\x20total\x20discount\x20count\x20exceeded'},{'module':'service','code':0xf,'description':'Service\x20discount\x20does\x20not\x20match'},{'module':'service','code':0x10,'description':'Stock\x20not\x20enough'},{'module':'service','code':0x11,'description':'Invalid\x20quote'},{'module':'service','code':0x12,'description':'Buyer\x20guard\x20passport\x20required'},{'module':'service','code':0x13,'description':'Service\x20is\x20paused'},{'module':'service','code':0x14,'description':'Coin\x20not\x20enough'},{'module':'service','code':0x15,'description':'Maximum\x20required\x20info\x20size\x20exceeded'},{'module':'service','code':0x16,'description':'Machine\x20does\x20not\x20match'},{'module':'service','code':0x17,'description':'No\x20allocator\x20configured'},{'module':'service','code':0x18,'description':'Critical\x20setting\x20lock\x20duration\x20not\x20exceeded.\x20After\x20Service\x20is\x20published,\x20modifications\x20to\x20\x27order_allocators\x27,\x20\x27rewards\x27,\x20\x27arbitrations\x27,\x20\x27machine\x27,\x20and\x20withdrawal\x20from\x20\x27compensation_fund\x27\x20must\x20exceed\x20the\x20\x27setting_lock_duration\x27\x20lock\x20time'},{'module':'service','code':0x19,'description':'Arbitration\x20not\x20set\x20with\x20compensation\x20fund'},{'module':'service','code':0x1a,'description':'Order\x20service\x20does\x20not\x20match'},{'module':'service','code':0x1b,'description':'Compensation\x20does\x20not\x20match'},{'module':'service','code':0x1c,'description':'Maximum\x20reward\x20count\x20exceeded'},{'module':'service','code':0x1d,'description':'Invalid\x20discount\x20type'},{'module':'service','code':0x1e,'description':'Invalid\x20timestamp\x20ms\x20end'},{'module':'service','code':0x1f,'description':'WIP\x20hash\x20not\x20match'},{'module':'service','code':0x20,'description':'Sale\x20item\x20not\x20found'},{'module':'permission','code':0x1,'description':'Not\x20the\x20builder'},{'module':'permission','code':0x2,'description':'Not\x20admin'},{'module':'permission','code':0x3,'description':'Address\x20count\x20in\x20permission\x20exceeded\x20limit'},{'module':'permission','code':0x4,'description':'Permission\x20count\x20exceeded\x20limit'},{'module':'permission','code':0x5,'description':'Permission\x20denied'},{'module':'permission','code':0x6,'description':'Admin\x20count\x20exceeded\x20limit'},{'module':'permission','code':0x7,'description':'Permission\x20index\x20not\x20found'},{'module':'permission','code':0x8,'description':'Permission\x20does\x20not\x20match'},{'module':'permission','code':0x9,'description':'Not\x20user\x20address'},{'module':'passport','code':0x1,'description':'Guard\x20count\x20exceeded\x20limit'},{'module':'passport','code':0x2,'description':'Relies\x20guard\x20not\x20added'},{'module':'passport','code':0x3,'description':'Submission\x20size\x20exceeded\x20limit'},{'module':'passport','code':0x4,'description':'Already\x20verified'},{'module':'passport','code':0x5,'description':'Not\x20verified'},{'module':'passport','code':0x6,'description':'Not\x20impact\x20guard'},{'module':'passport','code':0x7,'description':'Verification\x20failed'},{'module':'passport','code':0x8,'description':'Transaction\x20does\x20not\x20match'},{'module':'passport','code':0x9,'description':'Impact\x20guard\x20not\x20found'},{'module':'passport','code':0xa,'description':'Submission\x20not\x20found'},{'module':'passport','code':0xb,'description':'Digest\x20not\x20match'},{'module':'reward','code':0x1,'description':'Guard\x20locked\x20time\x20not\x20increasing'},{'module':'reward','code':0x2,'description':'Guard\x20expired'},{'module':'reward','code':0x3,'description':'Guard\x20count\x20exceeded\x20limit'},{'module':'reward','code':0x4,'description':'Recipient\x20identifier\x20not\x20address\x20type'},{'module':'reward','code':0x5,'description':'Amount\x20not\x20u64\x20type'},{'module':'reward','code':0x6,'description':'Insufficient\x20balance'},{'module':'reward','code':0x7,'description':'Guard\x20not\x20found'},{'module':'reward','code':0x8,'description':'Record\x20count\x20exceeded\x20limit'},{'module':'reward','code':0xa,'description':'Invalid\x20guard\x20locked\x20time'},{'module':'reward','code':0xb,'description':'Guard\x20locked\x20time\x20invalid'},{'module':'reward','code':0xc,'description':'Store\x20from\x20ID\x20not\x20compatible'},{'module':'arbitration','code':0x1,'description':'Guard\x20identifier\x20not\x20number\x20type'},{'module':'arbitration','code':0x2,'description':'Voting\x20guard\x20already\x20used'},{'module':'arbitration','code':0x3,'description':'Arbitration\x20does\x20not\x20match'},{'module':'arbitration','code':0x4,'description':'Arbitration\x20is\x20paused'},{'module':'arbitration','code':0x5,'description':'Fee\x20not\x20enough'},{'module':'arbitration','code':0x6,'description':'Passport\x20required'},{'module':'arbitration','code':0x7,'description':'Guard\x20identifier\x20number\x20invalid'},{'module':'arbitration','code':0x8,'description':'Voting\x20guard\x20not\x20found'},{'module':'arbitration','code':0x9,'description':'Maximum\x20voting\x20guard\x20count\x20exceeded'},{'module':'demand','code':0x1,'description':'Maximum\x20reward\x20count\x20exceeded'},{'module':'demand','code':0x2,'description':'Maximum\x20guard\x20count\x20exceeded'},{'module':'demand','code':0x3,'description':'Passport\x20required'},{'module':'demand','code':0x4,'description':'Guard\x20not\x20found'},{'module':'progress','code':0x1,'description':'Maximum\x20context\x20repository\x20count\x20exceeded'},{'module':'progress','code':0x2,'description':'Maximum\x20named\x20operator\x20count\x20exceeded'},{'module':'progress','code':0x3,'description':'Maximum\x20named\x20operator\x20address\x20count\x20exceeded'},{'module':'progress','code':0x4,'description':'Machine\x20does\x20not\x20match'},{'module':'progress','code':0x5,'description':'Task\x20already\x20set'},{'module':'progress','code':0x6,'description':'Not\x20the\x20holder'},{'module':'progress','code':0x7,'description':'Forward\x20already\x20accomplished'},{'module':'progress','code':0x8,'description':'Permission\x20not\x20defined\x20when\x20hold'},{'module':'progress','code':0x9,'description':'Passport\x20required'},{'module':'progress','code':0xa,'description':'Order\x20does\x20not\x20match'},{'module':'guard','code':0x1,'description':'Input\x20empty'},{'module':'guard','code':0x2,'description':'Input\x20size\x20exceeded\x20limit'},{'module':'guard','code':0x3,'description':'Table\x20size\x20exceeded\x20limit'},{'module':'guard','code':0x5,'description':'Dependent\x20count\x20exceeded\x20limit'},{'module':'guard','code':0x6,'description':'Not\x20dependent\x20guard'},{'module':'guard','code':0x7,'description':'Guard\x20cannot\x20depend\x20on\x20itself'},{'module':'guard','code':0x8,'description':'Guard\x20IDs\x20parse\x20error'},{'module':'guard','code':0x9,'description':'Guard\x20IDs\x20type\x20error'},{'module':'guard','code':0xa,'description':'ID\x20value\x20count\x20not\x20equal\x20to\x20guard\x20count'},{'module':'guard','code':0xb,'description':'Submission\x20ID\x20not\x20found'},{'module':'guard','code':0xc,'description':'Submission\x20value\x20type\x20error'},{'module':'order','code':0x1,'description':'Not\x20the\x20owner'},{'module':'order','code':0x2,'description':'Maximum\x20agent\x20count\x20exceeded'},{'module':'order','code':0x3,'description':'Progress\x20not\x20specified'},{'module':'order','code':0x5,'description':'No\x20operation\x20permission'},{'module':'order','code':0x6,'description':'Maximum\x20dispute\x20count\x20exceeded'},{'module':'order','code':0x7,'description':'Order\x20already\x20claimed'},{'module':'order','code':0x8,'description':'Invalid\x20customer\x20info'},{'module':'order','code':0x9,'description':'Allocation\x20not\x20specified'},{'module':'order','code':0xa,'description':'Allocation\x20already\x20specified'},{'module':'order','code':0xb,'description':'Progress\x20already\x20specified'},{'module':'machine','code':0x1,'description':'Maximum\x20consensus\x20repositories\x20exceeded'},{'module':'machine','code':0x2,'description':'Machine\x20not\x20published'},{'module':'machine','code':0x3,'description':'Machine\x20already\x20published'},{'module':'machine','code':0x4,'description':'Maximum\x20forward\x20order\x20count\x20exceeded'},{'module':'machine','code':0x5,'description':'Maximum\x20node\x20count\x20exceeded'},{'module':'machine','code':0x6,'description':'Duplicate\x20forward\x20name'},{'module':'machine','code':0x7,'description':'Duplicate\x20node\x20previous'},{'module':'machine','code':0x8,'description':'Old\x20node\x20name\x20does\x20not\x20exist'},{'module':'machine','code':0x9,'description':'New\x20node\x20name\x20already\x20exists'},{'module':'machine','code':0xa,'description':'Node\x20not\x20found'},{'module':'machine','code':0xb,'description':'Machine\x20is\x20paused'},{'module':'machine','code':0xc,'description':'Retained\x20submission\x20error'},{'module':'machine','code':0xd,'description':'Info\x20not\x20found'},{'module':'machine','code':0xe,'description':'Permission\x20not\x20defined'},{'module':'machine','code':0xf,'description':'Maximum\x20node\x20pair\x20count\x20exceeded'},{'module':'machine','code':0x10,'description':'Maximum\x20forward\x20count\x20exceeded'},{'module':'treasury','code':0x1,'description':'Maximum\x20external\x20deposit\x20guard\x20count\x20exceeded'},{'module':'treasury','code':0x2,'description':'Maximum\x20external\x20withdraw\x20guard\x20count\x20exceeded'},{'module':'treasury','code':0x3,'description':'External\x20deposit\x20guard\x20not\x20found'},{'module':'treasury','code':0x4,'description':'External\x20withdraw\x20guard\x20not\x20found'},{'module':'treasury','code':0x5,'description':'Identifier\x20not\x20number\x20type'},{'module':'treasury','code':0x6,'description':'Deposit\x20insufficient\x20amount'},{'module':'treasury','code':0x7,'description':'Withdraw\x20insufficient\x20amount'},{'module':'treasury','code':0x8,'description':'Store\x20from\x20ID\x20not\x20compatible'},{'module':'arb','code':0x1,'description':'Maximum\x20proposition\x20count\x20exceeded'},{'module':'arb','code':0x2,'description':'Arbitration\x20order\x20does\x20not\x20match'},{'module':'arb','code':0x3,'description':'Status\x20does\x20not\x20match'},{'module':'arb','code':0x4,'description':'Voting\x20deadline\x20not\x20passed'},{'module':'arb','code':0x5,'description':'Proposition\x20not\x20found'},{'module':'arb','code':0x6,'description':'Maximum\x20voter\x20count\x20exceeded'},{'module':'arb','code':0x7,'description':'Voting\x20deadline\x20passed'},{'module':'arb','code':0x8,'description':'Withdraw\x20duration\x20time\x20not\x20passed'},{'module':'repository','code':0x1,'description':'Policy\x20description\x20length\x20exceeded'},{'module':'repository','code':0x2,'description':'Policy\x20guard\x20count\x20exceeded'},{'module':'repository','code':0x3,'description':'Policy\x20count\x20exceeded'},{'module':'repository','code':0x4,'description':'Data\x20size\x20exceeded\x20limit'},{'module':'repository','code':0x5,'description':'ID\x20count\x20exceeded\x20limit'},{'module':'repository','code':0x6,'description':'Quantities\x20not\x20equal'},{'module':'repository','code':0x7,'description':'Policy\x20not\x20found'},{'module':'repository','code':0x8,'description':'Policy\x20ID\x20from\x20none'},{'module':'repository','code':0x9,'description':'Passport\x20required'},{'module':'repository','code':0xa,'description':'Data\x20type\x20does\x20not\x20match'},{'module':'repository','code':0xb,'description':'Guard\x20specified\x20ID\x20from\x20submission'},{'module':'repository','code':0xc,'description':'Not\x20impact\x20guard\x20in\x20passport'},{'module':'repository','code':0xd,'description':'Guard\x20specified\x20not\x20in\x20policy'},{'module':'repository','code':0xe,'description':'ID\x20vector\x20not\x20enough'},{'module':'repository','code':0xf,'description':'Data\x20vector\x20not\x20enough'},{'module':'repository','code':0x10,'description':'Invalid\x20ID\x20in\x20guard\x20table'},{'module':'repository','code':0x11,'description':'Invalid\x20data\x20in\x20guard\x20table'},{'module':'repository','code':0x12,'description':'Invalid\x20ID\x20from'},{'module':'repository','code':0x13,'description':'Maximum\x20reward\x20count\x20exceeded'},{'module':'repository','code':0x14,'description':'Guard\x20not\x20specified\x20ID\x20from\x20submission'},{'module':'repository','code':0x15,'description':'Need\x20dependent\x20guard'},{'module':'common','code':0x1,'description':'Name\x20length\x20exceeded\x20limit'},{'module':'common','code':0x2,'description':'Name\x20is\x20empty'},{'module':'common','code':0x3,'description':'Description\x20length\x20exceeded\x20limit'},{'module':'common','code':0x6,'description':'Invalid\x20value\x20type'},{'module':'common','code':0x7,'description':'Address\x20type\x20does\x20not\x20match'},{'module':'common','code':0x8,'description':'Number\x20type\x20does\x20not\x20match'},{'module':'common','code':0x9,'description':'Invalid\x20data\x20value'},{'module':'common','code':0xa,'description':'Invalid\x20string\x20value'},{'module':'common','code':0xb,'description':'Long\x20name\x20length\x20exceeded\x20limit'},{'module':'common','code':0xc,'description':'Not\x20u64\x20type'},{'module':'common','code':0xd,'description':'Invalid\x20service\x20object\x20type'},{'module':'resource','code':0x1,'description':'Tags\x20count\x20exceeded\x20limit'},{'module':'allocation','code':0x1,'description':'Recipient\x20identifier\x20not\x20address\x20type'},{'module':'allocation','code':0x2,'description':'Allocator\x20count\x20exceeded'},{'module':'allocation','code':0x3,'description':'No\x20allocator'},{'module':'allocation','code':0x4,'description':'Rate\x20not\x2010000'},{'module':'allocation','code':0x5,'description':'Multiple\x20surplus'},{'module':'allocation','code':0x6,'description':'Rate\x20exceeds\x2010000'},{'module':'allocation','code':0x7,'description':'Insufficient\x20balance'},{'module':'allocation','code':0x8,'description':'Allocators\x20empty'},{'module':'allocation','code':0x9,'description':'No\x20payment\x20info'},{'module':'allocation','code':0xa,'description':'Sharing\x20count\x20exceeded'},{'module':'allocation','code':0xb,'description':'Sharing\x20mode\x20invalid'},{'module':'allocation','code':0xc,'description':'Amount\x20below\x20threshold'},{'module':'allocation','code':0xd,'description':'Amount\x20exceeds\x20max'},{'module':'proof','code':0x1,'description':'Maximum\x20proof\x20size\x20exceeded'},{'module':'proof','code':0x2,'description':'Maximum\x20server\x20pubkey\x20size\x20exceeded'},{'module':'proof','code':0x3,'description':'Maximum\x20server\x20signature\x20size\x20exceeded'},{'module':'payment','code':0x1,'description':'Recipient\x20count\x20exceeded'},{'module':'payment','code':0x2,'description':'Vector\x20count\x20not\x20equal'},{'module':'payment','code':0x3,'description':'Payment\x20not\x20match'},{'module':'payment','code':0x4,'description':'Recipient\x20empty'},{'module':'contact','code':0x1,'description':'IM\x20count\x20exceeded'},{'module':'registrar','code':0x0,'description':'Not\x20system\x20address'},{'module':'registrar','code':0x1,'description':'Record\x20count\x20exceeded'},{'module':'registrar','code':0x2,'description':'Record\x20length\x20exceeded'},{'module':'registrar','code':0x3,'description':'Record\x20type\x20empty'},{'module':'transfer','code':0x0,'description':'Shared\x20non-new\x20object'},{'module':'transfer','code':0x1,'description':'BCS\x20serialization\x20failure'},{'module':'transfer','code':0x2,'description':'Receiving\x20object\x20type\x20mismatch'},{'module':'transfer','code':0x3,'description':'Unable\x20to\x20receive\x20object'},{'module':'transfer','code':0x4,'description':'Shared\x20object\x20operation\x20not\x20supported'},{'module':'transfer','code':0x5,'description':'Operation\x20not\x20supported'},{'module':'transfer','code':0x6,'description':'Invalid\x20party\x20permissions'},{'module':'tx_context','code':0x0,'description':'Bad\x20transaction\x20hash\x20length'},{'module':'coin','code':0x0,'description':'Bad\x20witness'},{'module':'coin','code':0x1,'description':'Invalid\x20argument'},{'module':'coin','code':0x2,'description':'Not\x20enough\x20balance'},{'module':'coin','code':0x3,'description':'Global\x20pause\x20not\x20allowed'},{'module':'borrow','code':0x0,'description':'Wrong\x20borrow'},{'module':'borrow','code':0x1,'description':'Wrong\x20value'},{'module':'bcs','code':0x0,'description':'Out\x20of\x20range'},{'module':'bcs','code':0x1,'description':'Not\x20bool'},{'module':'bcs','code':0x2,'description':'Length\x20out\x20of\x20range'},{'module':'balance','code':0x0,'description':'Non-zero\x20balance'},{'module':'balance','code':0x1,'description':'Overflow'},{'module':'balance','code':0x2,'description':'Not\x20enough'},{'module':'balance','code':0x3,'description':'Not\x20system\x20address'},{'module':'balance','code':0x4,'description':'Not\x20WOW'},{'module':'parent_table','code':0x0,'description':'Parent\x20table\x20not\x20match'},{'module':'parent_table_vec','code':0x0,'description':'Index\x20out\x20of\x20bound'},{'module':'parent_linked_table','code':0x0,'description':'Table\x20is\x20empty'},{'module':'parent_linked_table','code':0x1,'description':'Table\x20not\x20match'}];function getMoveErrorDescription(a,b){const c=MoveErrors['find'](d=>d['module']===a&&d['code']===b);return c?c['description']:null;}function enrichMoveError(a){if(!a||typeof a!=='string')return a;const b='0x0000000000000000000000000000000000000000000000000000000000000002',c=/MoveAbort\([^,]+,\s*(\d+)\)/,d=/name:\s*Identifier\("([^"]+)"\)/,e=/address:\s*([0-9a-fA-Fx]+)/,f=a['match'](c),g=a['match'](d),h=a['match'](e);if(f&&g&&h){const o=parseInt(f[0x1],0xa),p=g[0x1]['toLowerCase'](),q=h[0x1]['toLowerCase']();if(q===b||q==='0x2'){const r=MoveErrors['find'](s=>s['module']['toLowerCase']()===p&&s['code']===o);if(r)return'Error\x20Description:\x20'+r['description']+'\x0a'+a;}}const i=/abort code:\s*(\d+)/,j=/'0x[0-9a-fA-F]+::([^:]+)::[^']+'/,k=/'(0x[0-9a-fA-F]+)::/,l=a['match'](i),m=a['match'](j),n=a['match'](k);if(l&&m&&n){const s=parseInt(l[0x1],0xa),t=m[0x1]['toLowerCase'](),u=n[0x1]['toLowerCase']();if(u===b||u==='0x2'){const v=MoveErrors['find'](w=>w['module']['toLowerCase']()===t&&w['code']===s);if(v)return'Error\x20Description:\x20'+v['description']+'\x0a'+a;}}return a;}export{W_ENSURE as a,W_SAFE as c,enrichMoveError as d,getMoveErrorDescription as f,WValidate as i,W_SUCCESS as l,WErrors as n,W_ERROR as o,WException as r,W_FAILURE as s,MoveErrors as t,W_VALIDATE_PARAM as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a13a,n as a13b,u as a13c}from'./keypair-1v1DkI3F.mjs';import{t as a13d}from'./publickey-
|
|
1
|
+
import{c as a13a,n as a13b,u as a13c}from'./keypair-1v1DkI3F.mjs';import{t as a13d}from'./publickey-Bkjn-YAu.mjs';import{falcon512padded}from'@noble/post-quantum/falcon.js';const DEFAULT_FALCON512_DERIVATION_PATH='m/44\x27/784\x27/0\x27/0\x27/0\x27';var Falcon512Keypair=class Falcon512Keypair extends a13b{constructor(a){super();if(a)this['keypair']=a;else{const b=falcon512padded['keygen']();this['keypair']={'publicKey':b['publicKey'],'secretKey':b['secretKey']};}}['getKeyScheme'](){return'Falcon512';}static['generate'](){const a=falcon512padded['keygen']();return new Falcon512Keypair({'publicKey':a['publicKey'],'secretKey':a['secretKey']});}static['fromSecretKey'](a){if(typeof a==='string'){const b=a13a(a);if(b['scheme']!=='Falcon512')throw new Error('Expected\x20a\x20Falcon512\x20keypair,\x20got\x20'+b['scheme']);return new Falcon512Keypair({'publicKey':falcon512padded['getPublicKey'](b['secretKey']),'secretKey':b['secretKey']});}return new Falcon512Keypair({'publicKey':falcon512padded['getPublicKey'](a),'secretKey':a});}['getPublicKey'](){return new a13d(this['keypair']['publicKey']);}['getSecretKey'](){return a13c(this['keypair']['secretKey'],this['getKeyScheme']());}['getRawSecretKey'](){return this['keypair']['secretKey'];}async['sign'](a){return falcon512padded['sign'](a,this['keypair']['secretKey']);}};export{Falcon512Keypair as n,DEFAULT_FALCON512_DERIVATION_PATH as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Gv as GraphQLQueryOptions, Jv as WowGraphQLClient, Kv as GraphQLQueryResult, Wv as GraphQLDocument, Xv as WowGraphQLRequestError, Yv as WowGraphQLClientOptions, Zv as isWowGraphQLClient, qv as GraphQLResponseErrors } from "../index-BB7rqcJ9.mjs";
|
|
2
2
|
export { type GraphQLDocument, type GraphQLQueryOptions, type GraphQLQueryResult, type GraphQLResponseErrors, WowGraphQLClient, type WowGraphQLClientOptions, WowGraphQLRequestError, isWowGraphQLClient };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as a16a,r as a16b,t as a16c}from'../graphql-
|
|
1
|
+
import{n as a16a,r as a16b,t as a16c}from'../graphql-D2Rx6H0h.mjs';export{a16c as WowGraphQLClient,a16a as WowGraphQLRequestError,a16b as isWowGraphQLClient};
|