wative-core 2.5.2 → 2.5.4
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/CHANGELOG.md +65 -55
- package/dist/artifacts/evm/index.cjs +1 -1
- package/dist/artifacts/evm/index.d.cts +2 -2
- package/dist/artifacts/evm/index.d.ts +2 -2
- package/dist/artifacts/evm/index.js +1 -1
- package/dist/artifacts/svm/index.cjs +1 -1
- package/dist/artifacts/svm/index.d.cts +3 -3
- package/dist/artifacts/svm/index.d.ts +3 -3
- package/dist/artifacts/svm/index.js +1 -1
- package/dist/{container-provider-CwaWx7dP.d.cts → container-provider-B_TXusVF.d.cts} +4 -2
- package/dist/{container-provider-CH6Xg37M.d.ts → container-provider-C0dZf8jA.d.ts} +4 -2
- package/dist/{evm-YfBR8PgX.d.ts → evm-CsdcpuSb.d.ts} +1 -1
- package/dist/{evm-CNVThs9s.d.cts → evm-DjRcWpHv.d.cts} +1 -1
- package/dist/{file-sink-WkxXiVRr.d.cts → file-sink-B_Ng4V0f.d.cts} +2 -2
- package/dist/{file-sink-C0gUIm1T.d.ts → file-sink-gFMJnV3R.d.ts} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +67 -7
- package/dist/index.d.ts +67 -7
- package/dist/index.js +1 -1
- package/dist/index.node.cjs +1 -1
- package/dist/index.node.d.cts +6 -6
- package/dist/index.node.d.ts +6 -6
- package/dist/index.node.js +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +3 -3
- package/dist/node/index.d.ts +3 -3
- package/dist/node/index.js +1 -1
- package/dist/{svm-DF7cHWms.d.cts → svm-B7qJlwaU.d.cts} +3 -2
- package/dist/{svm-CK_DQNIq.d.ts → svm-BZlfBFcJ.d.ts} +3 -2
- package/dist/{workspace-CFDXsaHa.d.cts → workspace-kmsiTC-d.d.cts} +278 -23
- package/dist/{workspace-CFDXsaHa.d.ts → workspace-kmsiTC-d.d.ts} +278 -23
- package/examples/14-esm-runtime.test.mjs +0 -3
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { c as Address,
|
|
1
|
+
import { c as Address, a5 as SvmTxBuildParams, a4 as SvmTransaction, N as Network, a2 as SvmAddressLookupTable } from './workspace-kmsiTC-d.cjs';
|
|
2
2
|
|
|
3
|
+
declare function svmResolveAddressLookupTables(network: Network, addresses: readonly string[]): Promise<SvmAddressLookupTable[]>;
|
|
3
4
|
interface SvmInstruction {
|
|
4
5
|
readonly programId: string;
|
|
5
6
|
readonly accounts: ReadonlyArray<{
|
|
@@ -56,4 +57,4 @@ declare class Program {
|
|
|
56
57
|
call(from: Address, instructionName: string, args: Readonly<Record<string, unknown>>, accounts: Readonly<Record<string, string>>, opts?: Partial<SvmTxBuildParams>): SvmTransaction;
|
|
57
58
|
}
|
|
58
59
|
|
|
59
|
-
export { ASSOCIATED_TOKEN_PROGRAM_ID as A, NATIVE_SOL_MINT as N, Program as P, type SvmInstruction as S, TOKEN_2022_PROGRAM_ID as T, type SplTokenAccountSet as a, type SplTokenArgs as b, TOKEN_PROGRAM_ID as c, splTokenEncodeInstruction as s };
|
|
60
|
+
export { ASSOCIATED_TOKEN_PROGRAM_ID as A, NATIVE_SOL_MINT as N, Program as P, type SvmInstruction as S, TOKEN_2022_PROGRAM_ID as T, type SplTokenAccountSet as a, type SplTokenArgs as b, TOKEN_PROGRAM_ID as c, splTokenEncodeInstruction as d, svmResolveAddressLookupTables as s };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { c as Address,
|
|
1
|
+
import { c as Address, a5 as SvmTxBuildParams, a4 as SvmTransaction, N as Network, a2 as SvmAddressLookupTable } from './workspace-kmsiTC-d.js';
|
|
2
2
|
|
|
3
|
+
declare function svmResolveAddressLookupTables(network: Network, addresses: readonly string[]): Promise<SvmAddressLookupTable[]>;
|
|
3
4
|
interface SvmInstruction {
|
|
4
5
|
readonly programId: string;
|
|
5
6
|
readonly accounts: ReadonlyArray<{
|
|
@@ -56,4 +57,4 @@ declare class Program {
|
|
|
56
57
|
call(from: Address, instructionName: string, args: Readonly<Record<string, unknown>>, accounts: Readonly<Record<string, string>>, opts?: Partial<SvmTxBuildParams>): SvmTransaction;
|
|
57
58
|
}
|
|
58
59
|
|
|
59
|
-
export { ASSOCIATED_TOKEN_PROGRAM_ID as A, NATIVE_SOL_MINT as N, Program as P, type SvmInstruction as S, TOKEN_2022_PROGRAM_ID as T, type SplTokenAccountSet as a, type SplTokenArgs as b, TOKEN_PROGRAM_ID as c, splTokenEncodeInstruction as s };
|
|
60
|
+
export { ASSOCIATED_TOKEN_PROGRAM_ID as A, NATIVE_SOL_MINT as N, Program as P, type SvmInstruction as S, TOKEN_2022_PROGRAM_ID as T, type SplTokenAccountSet as a, type SplTokenArgs as b, TOKEN_PROGRAM_ID as c, splTokenEncodeInstruction as d, svmResolveAddressLookupTables as s };
|
|
@@ -27,16 +27,42 @@ interface AssetBalance {
|
|
|
27
27
|
readonly decimals: number;
|
|
28
28
|
readonly displayStatus: boolean;
|
|
29
29
|
readonly fetchedAt: number;
|
|
30
|
+
|
|
31
|
+
readonly readError?: string;
|
|
30
32
|
}
|
|
31
33
|
interface AssetCollection extends ReadonlyArray<Asset> {
|
|
32
34
|
byId(id: AssetId): Asset | null;
|
|
33
35
|
}
|
|
34
36
|
|
|
37
|
+
interface NetworkRoutes {
|
|
38
|
+
|
|
39
|
+
staked?: {
|
|
40
|
+
endpoints: readonly string[];
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
jito?: {
|
|
44
|
+
blockEngineUrl: string;
|
|
45
|
+
tipAccount?: string;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
mev?: {
|
|
49
|
+
relayUrl: string;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
35
52
|
interface NetworkInit {
|
|
36
53
|
slug: Slug;
|
|
37
54
|
name: string;
|
|
38
55
|
chainId: ChainId;
|
|
56
|
+
|
|
39
57
|
rpcUrl: string;
|
|
58
|
+
|
|
59
|
+
endpoints?: readonly string[];
|
|
60
|
+
|
|
61
|
+
readEndpoints?: readonly string[];
|
|
62
|
+
|
|
63
|
+
writeEndpoints?: readonly string[];
|
|
64
|
+
|
|
65
|
+
routes?: NetworkRoutes;
|
|
40
66
|
nativeCurrency: {
|
|
41
67
|
name: string;
|
|
42
68
|
symbol: string;
|
|
@@ -51,6 +77,10 @@ declare class Network {
|
|
|
51
77
|
readonly name: string;
|
|
52
78
|
readonly chainId: ChainId;
|
|
53
79
|
readonly rpcUrl: string;
|
|
80
|
+
readonly endpoints?: readonly string[];
|
|
81
|
+
readonly readEndpoints?: readonly string[];
|
|
82
|
+
readonly writeEndpoints?: readonly string[];
|
|
83
|
+
readonly routes?: NetworkRoutes;
|
|
54
84
|
readonly nativeCurrency: {
|
|
55
85
|
name: string;
|
|
56
86
|
symbol: string;
|
|
@@ -60,6 +90,8 @@ declare class Network {
|
|
|
60
90
|
readonly color?: string;
|
|
61
91
|
readonly vm: VmToken;
|
|
62
92
|
|
|
93
|
+
endpointsFor(kind?: "read" | "write" | "default"): readonly string[];
|
|
94
|
+
|
|
63
95
|
get symbol(): string;
|
|
64
96
|
|
|
65
97
|
readonly assets: readonly Asset[];
|
|
@@ -181,7 +213,115 @@ declare abstract class Provider {
|
|
|
181
213
|
abstract close(): Promise<void>;
|
|
182
214
|
}
|
|
183
215
|
|
|
184
|
-
|
|
216
|
+
interface RawTx {
|
|
217
|
+
readonly vm: VmToken;
|
|
218
|
+
|
|
219
|
+
readonly serialized: string;
|
|
220
|
+
|
|
221
|
+
readonly encoding: "hex" | "base64";
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
interface DecodedTx {
|
|
225
|
+
readonly vm: VmToken;
|
|
226
|
+
readonly to?: string | null;
|
|
227
|
+
readonly value?: bigint;
|
|
228
|
+
readonly data?: string;
|
|
229
|
+
readonly chainId?: number;
|
|
230
|
+
readonly evmType?: number;
|
|
231
|
+
readonly nonce?: number;
|
|
232
|
+
readonly gasLimit?: bigint;
|
|
233
|
+
readonly gasPrice?: bigint;
|
|
234
|
+
readonly maxFeePerGas?: bigint;
|
|
235
|
+
readonly maxPriorityFeePerGas?: bigint;
|
|
236
|
+
|
|
237
|
+
readonly from?: string | null;
|
|
238
|
+
readonly svmVersion?: "legacy" | 0;
|
|
239
|
+
readonly feePayer?: string;
|
|
240
|
+
readonly recentBlockhash?: string;
|
|
241
|
+
readonly instructionCount?: number;
|
|
242
|
+
readonly hasAddressLookupTables?: boolean;
|
|
243
|
+
|
|
244
|
+
readonly requiredSigners?: readonly string[];
|
|
245
|
+
|
|
246
|
+
readonly programIds?: readonly string[];
|
|
247
|
+
readonly signatureCount?: number;
|
|
248
|
+
readonly signed?: boolean;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
declare function isRawTx(x: unknown): x is RawTx;
|
|
252
|
+
|
|
253
|
+
declare function deserializeEvmTx(serialized: string): {
|
|
254
|
+
raw: RawTx;
|
|
255
|
+
decoded: DecodedTx;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
declare function deserializeSvmTx(serialized: string): {
|
|
259
|
+
raw: RawTx;
|
|
260
|
+
decoded: DecodedTx;
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
declare function deserializeTx(vm: VmToken, serialized: string): {
|
|
264
|
+
raw: RawTx;
|
|
265
|
+
decoded: DecodedTx;
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
type NormalizedTx<P> = {
|
|
269
|
+
kind: "params";
|
|
270
|
+
params: P;
|
|
271
|
+
} | {
|
|
272
|
+
kind: "raw";
|
|
273
|
+
raw: RawTx;
|
|
274
|
+
decoded: DecodedTx;
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
declare function normalizeTxInput<P extends object>(vm: VmToken, input: P | RawTx | string): NormalizedTx<P>;
|
|
278
|
+
|
|
279
|
+
type DestinationCode = "EVM_ZERO_ADDRESS" | "EVM_BURN_ADDRESS" | "EVM_PRECOMPILE" | "EVM_TOKEN_SELF_CONTRACT" | "EVM_ERC20_TO_CONTRACT" | "EVM_NATIVE_TO_CONTRACT" | "EVM_DELEGATED_EOA_7702" | "SVM_SOL_TO_OFFCURVE" | "SVM_INCINERATOR" | "SVM_SOL_TO_MINT" | "SVM_SOL_TO_PROGRAM_OR_SYSVAR" | "SVM_SOL_TO_TOKEN_ACCOUNT" | "SVM_SPL_TO_PROGRAM_OWNED" | "SVM_FROZEN_TOKEN_ACCOUNT" | "SVM_NON_TRANSFERABLE" | "RPC_CHECK_UNAVAILABLE" | "SCREENED";
|
|
280
|
+
|
|
281
|
+
type DestinationSeverity = "refuse" | "confirm" | "warn";
|
|
282
|
+
|
|
283
|
+
interface DestinationWarning {
|
|
284
|
+
readonly code: DestinationCode;
|
|
285
|
+
readonly chain: "evm" | "svm";
|
|
286
|
+
readonly address: string;
|
|
287
|
+
readonly asset: "native" | "token";
|
|
288
|
+
readonly detail: string;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
interface DestinationReport {
|
|
292
|
+
readonly action: "allow" | "warn" | "confirm" | "refuse";
|
|
293
|
+
readonly code?: DestinationCode;
|
|
294
|
+
readonly severity?: DestinationSeverity;
|
|
295
|
+
readonly chain: "evm" | "svm";
|
|
296
|
+
readonly address: string;
|
|
297
|
+
readonly asset: "native" | "token";
|
|
298
|
+
readonly warnings: readonly DestinationWarning[];
|
|
299
|
+
readonly rpcChecked: boolean;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
interface DestinationScreenResult {
|
|
303
|
+
readonly severity: "refuse" | "warn";
|
|
304
|
+
readonly detail: string;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
type DestinationScreener = (input: {
|
|
308
|
+
readonly chain: "evm" | "svm";
|
|
309
|
+
readonly address: string;
|
|
310
|
+
readonly asset: "native" | "token";
|
|
311
|
+
}) => DestinationScreenResult | null | Promise<DestinationScreenResult | null>;
|
|
312
|
+
|
|
313
|
+
interface DestinationGuardOptions {
|
|
314
|
+
readonly forceUnsafeTransfer?: boolean;
|
|
315
|
+
readonly acknowledgeRiskyDestination?: boolean;
|
|
316
|
+
readonly onWarning?: (warning: DestinationWarning) => void;
|
|
317
|
+
readonly screen?: DestinationScreener;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
type WativeErrorCode = "WORKSPACE_LOCKED" | "ACCOUNT_LOCKED"
|
|
321
|
+
|
|
322
|
+
| "WALLET_DISABLED" | "RECORD_LOCKED" | "BAD_PASSWORD" | "WEAK_PASSWORD" | "RECORD_NOT_FOUND" | "PROVIDER_IO" | "PERMISSION_DENIED" | "DISK_FULL" | "PARAMETER_ERROR"
|
|
323
|
+
|
|
324
|
+
| "IRREGULAR_DESTINATION" | "DECRYPT_FAILED" | "ENCRYPT_FAILED" | "ALGORITHM_IRREVERSIBLE" | "INVALID_MNEMONIC" | "INVALID_PRIVATE_KEY" | "UNSUPPORTED_NETWORK" | "TX_BUILD_FAILED" | "TX_SIGN_FAILED" | "TX_SUBMIT_FAILED" | "TX_TIMEOUT" | "TX_DROPPED" | "TX_ABORTED" | "RPC_UNREACHABLE"
|
|
185
325
|
|
|
186
326
|
| "RPC_REJECTED" | "STORAGE_NOT_DURABLE" | "UNSUPPORTED_OP";
|
|
187
327
|
interface WativeErrorOpts {
|
|
@@ -201,17 +341,24 @@ declare const EvmTxType: {
|
|
|
201
341
|
readonly Legacy: 0;
|
|
202
342
|
readonly AccessList: 1;
|
|
203
343
|
readonly Eip1559: 2;
|
|
344
|
+
readonly Blob: 3;
|
|
345
|
+
readonly SetCode: 4;
|
|
204
346
|
};
|
|
205
347
|
type EvmTxType = typeof EvmTxType[keyof typeof EvmTxType];
|
|
206
348
|
interface EvmTxBuildParams {
|
|
207
|
-
|
|
349
|
+
|
|
350
|
+
to: string | null;
|
|
208
351
|
value?: bigint;
|
|
352
|
+
|
|
209
353
|
data?: string;
|
|
354
|
+
input?: string;
|
|
210
355
|
nonce?: number;
|
|
211
356
|
gasLimit?: bigint;
|
|
212
357
|
gasPrice?: bigint;
|
|
213
358
|
maxFeePerGas?: bigint;
|
|
214
359
|
maxPriorityFeePerGas?: bigint;
|
|
360
|
+
|
|
361
|
+
maxFeePerGasCeiling?: bigint;
|
|
215
362
|
type?: EvmTxType;
|
|
216
363
|
chainId?: ChainId;
|
|
217
364
|
rpcUrl?: string;
|
|
@@ -220,6 +367,11 @@ interface EvmTxBuildParams {
|
|
|
220
367
|
storageKeys: ReadonlyArray<string>;
|
|
221
368
|
}>;
|
|
222
369
|
}
|
|
370
|
+
|
|
371
|
+
interface SvmAddressLookupTable {
|
|
372
|
+
readonly address: string;
|
|
373
|
+
readonly addresses: readonly string[];
|
|
374
|
+
}
|
|
223
375
|
interface SvmTxBuildParams {
|
|
224
376
|
recipient: string;
|
|
225
377
|
amount: bigint;
|
|
@@ -231,7 +383,10 @@ interface SvmTxBuildParams {
|
|
|
231
383
|
feePayer?: string;
|
|
232
384
|
rpcUrl?: string;
|
|
233
385
|
instructions?: ReadonlyArray<unknown>;
|
|
234
|
-
|
|
386
|
+
|
|
387
|
+
addressLookupTables?: ReadonlyArray<SvmAddressLookupTable>;
|
|
388
|
+
|
|
389
|
+
version?: "legacy" | 0;
|
|
235
390
|
memo?: string;
|
|
236
391
|
}
|
|
237
392
|
|
|
@@ -264,7 +419,7 @@ interface Transaction {
|
|
|
264
419
|
readonly vm: VmToken;
|
|
265
420
|
readonly status: TransactionStatus;
|
|
266
421
|
sign(): Promise<this> | this;
|
|
267
|
-
send(): TransactionTracker;
|
|
422
|
+
send(opts?: SendOptions): TransactionTracker;
|
|
268
423
|
simulate(): Promise<SimulationResult>;
|
|
269
424
|
}
|
|
270
425
|
interface SimulationResult {
|
|
@@ -276,6 +431,29 @@ interface SimulationResult {
|
|
|
276
431
|
readonly computeUnitsConsumed?: number;
|
|
277
432
|
readonly raw: unknown;
|
|
278
433
|
}
|
|
434
|
+
|
|
435
|
+
type Commitment = "processed" | "confirmed" | "finalized";
|
|
436
|
+
|
|
437
|
+
type SendRoute = "default" | "staked" | "jito" | "mev";
|
|
438
|
+
|
|
439
|
+
interface SendOptions {
|
|
440
|
+
|
|
441
|
+
readonly skipPreflight?: boolean;
|
|
442
|
+
|
|
443
|
+
readonly preflightCommitment?: Commitment;
|
|
444
|
+
|
|
445
|
+
readonly maxRetries?: number;
|
|
446
|
+
|
|
447
|
+
readonly minContextSlot?: number;
|
|
448
|
+
|
|
449
|
+
readonly commitment?: Commitment;
|
|
450
|
+
|
|
451
|
+
readonly confirmations?: number;
|
|
452
|
+
|
|
453
|
+
readonly timeout?: number;
|
|
454
|
+
|
|
455
|
+
readonly route?: SendRoute;
|
|
456
|
+
}
|
|
279
457
|
interface TransactionStateChange {
|
|
280
458
|
readonly previous: TransactionStatus;
|
|
281
459
|
readonly next: TransactionStatus;
|
|
@@ -317,7 +495,7 @@ declare class EvmTransaction implements Transaction {
|
|
|
317
495
|
#private;
|
|
318
496
|
readonly vm: "evm";
|
|
319
497
|
from: EvmAddress;
|
|
320
|
-
to: string;
|
|
498
|
+
to: string | null;
|
|
321
499
|
value: bigint;
|
|
322
500
|
data: string;
|
|
323
501
|
chainId: ChainId;
|
|
@@ -339,15 +517,17 @@ declare class EvmTransaction implements Transaction {
|
|
|
339
517
|
_address?: Address;
|
|
340
518
|
constructor(init: {
|
|
341
519
|
from: EvmAddress;
|
|
342
|
-
to: string;
|
|
520
|
+
to: string | null;
|
|
343
521
|
value: bigint;
|
|
344
522
|
chainId: ChainId;
|
|
345
523
|
data?: string;
|
|
524
|
+
input?: string;
|
|
346
525
|
type?: EvmTxType;
|
|
347
526
|
nonce?: number;
|
|
348
527
|
gasPrice?: bigint;
|
|
349
528
|
maxFeePerGas?: bigint;
|
|
350
529
|
maxPriorityFeePerGas?: bigint;
|
|
530
|
+
maxFeePerGasCeiling?: bigint;
|
|
351
531
|
gasLimit?: bigint;
|
|
352
532
|
rpcUrl?: string;
|
|
353
533
|
accessList?: ReadonlyArray<{
|
|
@@ -356,13 +536,14 @@ declare class EvmTransaction implements Transaction {
|
|
|
356
536
|
}>;
|
|
357
537
|
address?: Address;
|
|
358
538
|
});
|
|
359
|
-
constructor(from: EvmAddress, to: string, value: bigint, data: string | undefined, opts: {
|
|
539
|
+
constructor(from: EvmAddress, to: string | null, value: bigint, data: string | undefined, opts: {
|
|
360
540
|
chainId: ChainId;
|
|
361
541
|
type?: EvmTxType;
|
|
362
542
|
nonce?: number;
|
|
363
543
|
gasPrice?: bigint;
|
|
364
544
|
maxFeePerGas?: bigint;
|
|
365
545
|
maxPriorityFeePerGas?: bigint;
|
|
546
|
+
maxFeePerGasCeiling?: bigint;
|
|
366
547
|
gasLimit?: bigint;
|
|
367
548
|
rpcUrl?: string;
|
|
368
549
|
accessList?: ReadonlyArray<{
|
|
@@ -373,7 +554,7 @@ declare class EvmTransaction implements Transaction {
|
|
|
373
554
|
});
|
|
374
555
|
get status(): TransactionStatus;
|
|
375
556
|
sign(): Promise<this>;
|
|
376
|
-
send(): TransactionTracker;
|
|
557
|
+
send(opts?: SendOptions): TransactionTracker;
|
|
377
558
|
|
|
378
559
|
simulate(): Promise<SimulationResult>;
|
|
379
560
|
|
|
@@ -385,7 +566,8 @@ declare class EvmTransaction implements Transaction {
|
|
|
385
566
|
|
|
386
567
|
interface EvmRawTx {
|
|
387
568
|
from: string;
|
|
388
|
-
|
|
569
|
+
|
|
570
|
+
to: string | null;
|
|
389
571
|
value: bigint;
|
|
390
572
|
data: string;
|
|
391
573
|
type: EvmTxType;
|
|
@@ -418,7 +600,8 @@ declare class SvmTransaction implements Transaction {
|
|
|
418
600
|
get rpcUrl(): string | undefined;
|
|
419
601
|
set rpcUrl(next: string | undefined);
|
|
420
602
|
instructions?: ReadonlyArray<unknown>;
|
|
421
|
-
addressLookupTables?: ReadonlyArray<
|
|
603
|
+
addressLookupTables?: ReadonlyArray<SvmAddressLookupTable>;
|
|
604
|
+
version?: "legacy" | 0;
|
|
422
605
|
memo?: string;
|
|
423
606
|
|
|
424
607
|
_address?: Address;
|
|
@@ -434,7 +617,8 @@ declare class SvmTransaction implements Transaction {
|
|
|
434
617
|
feePayer?: string;
|
|
435
618
|
rpcUrl?: string;
|
|
436
619
|
instructions?: ReadonlyArray<unknown>;
|
|
437
|
-
addressLookupTables?: ReadonlyArray<
|
|
620
|
+
addressLookupTables?: ReadonlyArray<SvmAddressLookupTable>;
|
|
621
|
+
version?: "legacy" | 0;
|
|
438
622
|
memo?: string;
|
|
439
623
|
address?: Address;
|
|
440
624
|
});
|
|
@@ -447,13 +631,14 @@ declare class SvmTransaction implements Transaction {
|
|
|
447
631
|
feePayer?: string;
|
|
448
632
|
rpcUrl?: string;
|
|
449
633
|
instructions?: ReadonlyArray<unknown>;
|
|
450
|
-
addressLookupTables?: ReadonlyArray<
|
|
634
|
+
addressLookupTables?: ReadonlyArray<SvmAddressLookupTable>;
|
|
635
|
+
version?: "legacy" | 0;
|
|
451
636
|
memo?: string;
|
|
452
637
|
address?: Address;
|
|
453
638
|
});
|
|
454
639
|
get status(): TransactionStatus;
|
|
455
640
|
sign(): Promise<this>;
|
|
456
|
-
send(): TransactionTracker;
|
|
641
|
+
send(opts?: SendOptions): TransactionTracker;
|
|
457
642
|
simulate(): Promise<SimulationResult>;
|
|
458
643
|
get hash(): string | null;
|
|
459
644
|
|
|
@@ -468,6 +653,41 @@ interface AddressInit {
|
|
|
468
653
|
assets?: Asset[];
|
|
469
654
|
wallet: Wallet;
|
|
470
655
|
}
|
|
656
|
+
|
|
657
|
+
interface SignInParams {
|
|
658
|
+
domain?: string;
|
|
659
|
+
address?: string;
|
|
660
|
+
statement?: string;
|
|
661
|
+
uri?: string;
|
|
662
|
+
version?: string;
|
|
663
|
+
chainId?: string | number;
|
|
664
|
+
nonce?: string;
|
|
665
|
+
issuedAt?: string;
|
|
666
|
+
expirationTime?: string;
|
|
667
|
+
notBefore?: string;
|
|
668
|
+
requestId?: string;
|
|
669
|
+
resources?: readonly string[];
|
|
670
|
+
|
|
671
|
+
scheme?: string;
|
|
672
|
+
|
|
673
|
+
expectedDomain?: string;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
interface SignInResult {
|
|
677
|
+
readonly message: string;
|
|
678
|
+
readonly signature: string;
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
interface SignRawOptions {
|
|
682
|
+
|
|
683
|
+
confirm?: (decoded: DecodedTx) => boolean | Promise<boolean>;
|
|
684
|
+
|
|
685
|
+
acknowledgeBlindSign?: boolean;
|
|
686
|
+
|
|
687
|
+
allow7702Delegation?: boolean;
|
|
688
|
+
|
|
689
|
+
allowBlobTx?: boolean;
|
|
690
|
+
}
|
|
471
691
|
declare class Address {
|
|
472
692
|
#private;
|
|
473
693
|
readonly publicKey: EvmAddress | SvmAddress | SuiAddress;
|
|
@@ -507,16 +727,28 @@ declare class Address {
|
|
|
507
727
|
structHash: string;
|
|
508
728
|
};
|
|
509
729
|
signMessage(message: string): string;
|
|
730
|
+
|
|
731
|
+
signIn(params?: SignInParams): SignInResult;
|
|
510
732
|
buildTransaction(params: EvmTxBuildParams): EvmTransaction;
|
|
511
733
|
buildTransaction(params: SvmTxBuildParams): SvmTransaction;
|
|
512
734
|
|
|
513
|
-
buildTransferPayload(req: TransferRequest): TransferPayload;
|
|
735
|
+
buildTransferPayload(req: TransferRequest, opts?: DestinationGuardOptions): TransferPayload;
|
|
736
|
+
|
|
737
|
+
checkDestination(req: TransferRequest, opts?: DestinationGuardOptions): Promise<DestinationReport>;
|
|
514
738
|
|
|
515
739
|
signTransaction<T extends Transaction>(transaction: T): T;
|
|
516
740
|
|
|
517
|
-
|
|
741
|
+
signAll<T extends Transaction>(transactions: readonly T[]): Promise<readonly T[]>;
|
|
742
|
+
|
|
743
|
+
signRawTransaction(input: RawTx | string, opts?: SignRawOptions): Promise<RawTx>;
|
|
744
|
+
|
|
745
|
+
sendTransaction(transaction: Transaction, opts?: SendOptions): TransactionTracker;
|
|
518
746
|
|
|
519
747
|
simulateTransaction(transaction: Transaction): Promise<SimulationResult>;
|
|
748
|
+
|
|
749
|
+
estimate(input: RawTx | string, opts?: {
|
|
750
|
+
rpcUrl?: string;
|
|
751
|
+
}): Promise<SimulationResult>;
|
|
520
752
|
refreshBalances(displayedOnly?: boolean): Settling<readonly AssetBalance[]>;
|
|
521
753
|
refreshBalances(network: NetworkLike, displayedOnly?: boolean): Settling<readonly AssetBalance[]>;
|
|
522
754
|
refreshBalances(assetId: AssetId): Settling<AssetBalance>;
|
|
@@ -539,6 +771,8 @@ declare class Wallet {
|
|
|
539
771
|
readonly id: number;
|
|
540
772
|
lastBalanceUpdateTime?: number;
|
|
541
773
|
constructor(init: WalletInit);
|
|
774
|
+
|
|
775
|
+
get disabled(): boolean;
|
|
542
776
|
get addresses(): ReadonlyArray<Address>;
|
|
543
777
|
|
|
544
778
|
_addAddress(address: Address): void;
|
|
@@ -607,10 +841,6 @@ declare class Account {
|
|
|
607
841
|
encryptionAlgorithm: string;
|
|
608
842
|
signature: string;
|
|
609
843
|
ppCiphertext?: string;
|
|
610
|
-
disabledSlots?: ReadonlyArray<{
|
|
611
|
-
from: number;
|
|
612
|
-
to: number;
|
|
613
|
-
}>;
|
|
614
844
|
readonly hasOwnPassword: boolean;
|
|
615
845
|
readonly _workspace: Workspace;
|
|
616
846
|
readonly wallets: WalletCollection;
|
|
@@ -622,8 +852,22 @@ declare class Account {
|
|
|
622
852
|
setDefaultNetwork(value: NetworkLike): Promise<void>;
|
|
623
853
|
rename(displayName: string): Promise<void>;
|
|
624
854
|
setDisplayName(displayName: string): Promise<void>;
|
|
625
|
-
|
|
626
|
-
|
|
855
|
+
|
|
856
|
+
getDisabledSlots(): {
|
|
857
|
+
from: number;
|
|
858
|
+
to: number;
|
|
859
|
+
}[];
|
|
860
|
+
|
|
861
|
+
disableAddressNos(addressNos: ReadonlyArray<number>): Promise<void>;
|
|
862
|
+
|
|
863
|
+
disableSlots(slots: ReadonlyArray<{
|
|
864
|
+
from: number;
|
|
865
|
+
to: number;
|
|
866
|
+
}>): Promise<void>;
|
|
867
|
+
|
|
868
|
+
enableAddressNos(addressNos: ReadonlyArray<number>): Promise<void>;
|
|
869
|
+
|
|
870
|
+
enableSlots(slots: ReadonlyArray<{
|
|
627
871
|
from: number;
|
|
628
872
|
to: number;
|
|
629
873
|
}>): Promise<void>;
|
|
@@ -638,6 +882,8 @@ declare class Account {
|
|
|
638
882
|
|
|
639
883
|
dumpMnemonic(): string;
|
|
640
884
|
|
|
885
|
+
getWalletList(force?: boolean): Wallet[];
|
|
886
|
+
|
|
641
887
|
deriveWallets(count: number): Promise<{
|
|
642
888
|
before: number;
|
|
643
889
|
after: number;
|
|
@@ -670,6 +916,8 @@ declare class Account {
|
|
|
670
916
|
|
|
671
917
|
_restoreUnlockPassword(pwd: string | null): void;
|
|
672
918
|
|
|
919
|
+
_isDisabledSlot(index: number): boolean;
|
|
920
|
+
|
|
673
921
|
|
|
674
922
|
_wipeWalletKeys(...wallets: Wallet[]): void;
|
|
675
923
|
}
|
|
@@ -688,7 +936,7 @@ interface WalletCollection extends ReadonlyArray<Wallet> {
|
|
|
688
936
|
byId(id: number): Wallet | null;
|
|
689
937
|
}
|
|
690
938
|
|
|
691
|
-
declare function newMnemonic(): string;
|
|
939
|
+
declare function newMnemonic(wordCount?: 12 | 15 | 18 | 21 | 24): string;
|
|
692
940
|
|
|
693
941
|
type LogLevel = "trace" | "debug" | "info" | "warn" | "error" | "fatal";
|
|
694
942
|
type SinkConfig = {
|
|
@@ -780,6 +1028,8 @@ declare class Workspace {
|
|
|
780
1028
|
get accounts(): AccountCollection;
|
|
781
1029
|
get networks(): NetworkCollection;
|
|
782
1030
|
|
|
1031
|
+
_noteRpcUrl(url: string): void;
|
|
1032
|
+
|
|
783
1033
|
_registerLiveAccount(account: Account): void;
|
|
784
1034
|
|
|
785
1035
|
_releaseAccount(account: Account): void;
|
|
@@ -821,6 +1071,11 @@ declare class Workspace {
|
|
|
821
1071
|
id: number;
|
|
822
1072
|
symbol: string;
|
|
823
1073
|
} | null;
|
|
1074
|
+
|
|
1075
|
+
_trackedAssetsForSlug(slug: string): ReadonlyArray<{
|
|
1076
|
+
symbol: string;
|
|
1077
|
+
contractAddress: string | null;
|
|
1078
|
+
}>;
|
|
824
1079
|
}
|
|
825
1080
|
|
|
826
|
-
export { type
|
|
1081
|
+
export { type SinkConfig as $, Account as A, type LogSink as B, type ChainId as C, type DecodedTx as D, type EvmAddress as E, Logger as F, type LoggerConfig as G, type NetworkCollection as H, type NetworkInit as I, type NetworkLike as J, type NetworkRoutes as K, type LogLevel as L, type NormalizedTx as M, Network as N, type OpenOptions as O, Provider as P, Record$1 as Q, type RawTx as R, type RecordInit as S, type RecordType as T, type SendOptions as U, type SendRoute as V, type Settling as W, type SignInParams as X, type SignInResult as Y, type SignRawOptions as Z, type SimulationResult as _, type AccountCollection as a, type Slug as a0, type SvmAddress as a1, type SvmAddressLookupTable as a2, SvmSigner as a3, SvmTransaction as a4, type SvmTxBuildParams as a5, type Transaction as a6, type TransactionReceipt as a7, type TransactionStateChange as a8, type TransactionStatus as a9, type TransactionTracker as aa, type TransferPayload as ab, type TransferRequest as ac, type VmToken as ad, Wallet as ae, type WalletCollection as af, WativeError as ag, type WativeErrorCode as ah, type WativeErrorOpts as ai, Workspace as aj, type WorkspaceConfig as ak, deserializeEvmTx as al, deserializeSvmTx as am, deserializeTx as an, isRawTx as ao, newMnemonic as ap, normalizeTxInput as aq, type SuiAddress as ar, type AccountOrgType as b, Address as c, Asset as d, type AssetBalance as e, type AssetCollection as f, type AssetId as g, type AssetInitObject as h, type AssetRef as i, type ChainVM as j, type Commitment as k, ConsoleSink as l, type ContainerState as m, type DestinationCode as n, type DestinationGuardOptions as o, type DestinationReport as p, type DestinationScreenResult as q, type DestinationScreener as r, type DestinationSeverity as s, type DestinationWarning as t, type EvmRawTx as u, EvmSigner as v, EvmTransaction as w, type EvmTxBuildParams as x, EvmTxType as y, type LogRecord as z };
|