wative-core 2.5.2 → 2.5.3
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 +52 -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-CH6Xg37M.d.ts → container-provider-D5bLhd__.d.ts} +4 -2
- package/dist/{container-provider-CwaWx7dP.d.cts → container-provider-DObyv4EW.d.cts} +4 -2
- package/dist/{evm-CNVThs9s.d.cts → evm-CJqPjHHu.d.cts} +1 -1
- package/dist/{evm-YfBR8PgX.d.ts → evm-Yd0NCJAL.d.ts} +1 -1
- package/dist/{file-sink-WkxXiVRr.d.cts → file-sink-D8l-OwW9.d.cts} +2 -2
- package/dist/{file-sink-C0gUIm1T.d.ts → file-sink-GrtMBpmU.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-CK_DQNIq.d.ts → svm-DgxTJqrR.d.ts} +3 -2
- package/dist/{svm-DF7cHWms.d.cts → svm-qBfrN98x.d.cts} +3 -2
- package/dist/{workspace-CFDXsaHa.d.cts → workspace-CZO-ANYP.d.cts} +253 -16
- package/dist/{workspace-CFDXsaHa.d.ts → workspace-CZO-ANYP.d.ts} +253 -16
- package/examples/14-esm-runtime.test.mjs +0 -3
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { P as Provider,
|
|
2
|
-
export { A as Account, a as AccountCollection, b as AccountOrgType, c as Address, d as Asset, e as AssetBalance, g as AssetId, h as AssetInitObject, i as AssetRef, C as ChainId, k as
|
|
3
|
-
import { a as ContainerProvider } from './container-provider-
|
|
4
|
-
export { C as ContainerEntry } from './container-provider-
|
|
5
|
-
export { A as AbiItem, C as Contract } from './evm-
|
|
6
|
-
export { P as Program, S as SvmInstruction } from './svm-
|
|
1
|
+
import { P as Provider, T as RecordType, a0 as Slug, Q as Record$1, N as Network, a2 as SvmAddressLookupTable, R as RawTx, E as EvmAddress, _ as SimulationResult, o as DestinationGuardOptions, p as DestinationReport, V as SendRoute, a1 as SvmAddress, ar as SuiAddress, ad as VmToken, f as AssetCollection, x as EvmTxBuildParams, a5 as SvmTxBuildParams, a6 as Transaction, ac as TransferRequest, ab as TransferPayload, j as ChainVM } from './workspace-CZO-ANYP.cjs';
|
|
2
|
+
export { A as Account, a as AccountCollection, b as AccountOrgType, c as Address, d as Asset, e as AssetBalance, g as AssetId, h as AssetInitObject, i as AssetRef, C as ChainId, k as Commitment, l as ConsoleSink, m as ContainerState, D as DecodedTx, n as DestinationCode, q as DestinationScreenResult, r as DestinationScreener, s as DestinationSeverity, t as DestinationWarning, u as EvmRawTx, v as EvmSigner, w as EvmTransaction, y as EvmTxType, L as LogLevel, z as LogRecord, B as LogSink, F as Logger, G as LoggerConfig, H as NetworkCollection, I as NetworkInit, J as NetworkLike, K as NetworkRoutes, M as NormalizedTx, O as OpenOptions, S as RecordInit, U as SendOptions, W as Settling, X as SignInParams, Y as SignInResult, Z as SignRawOptions, $ as SinkConfig, a3 as SvmSigner, a4 as SvmTransaction, a7 as TransactionReceipt, a8 as TransactionStateChange, a9 as TransactionStatus, aa as TransactionTracker, ae as Wallet, af as WalletCollection, ag as WativeError, ah as WativeErrorCode, ai as WativeErrorOpts, aj as Workspace, ak as WorkspaceConfig, al as deserializeEvmTx, am as deserializeSvmTx, an as deserializeTx, ao as isRawTx, ap as newMnemonic, aq as normalizeTxInput } from './workspace-CZO-ANYP.cjs';
|
|
3
|
+
import { a as ContainerProvider } from './container-provider-DObyv4EW.cjs';
|
|
4
|
+
export { C as ContainerEntry } from './container-provider-DObyv4EW.cjs';
|
|
5
|
+
export { A as AbiItem, C as Contract } from './evm-CJqPjHHu.cjs';
|
|
6
|
+
export { P as Program, S as SvmInstruction, s as svmResolveAddressLookupTables } from './svm-qBfrN98x.cjs';
|
|
7
7
|
|
|
8
8
|
type StorageDurability = "persistent" | "best-effort";
|
|
9
9
|
interface IdbProviderOptions {
|
|
@@ -35,6 +35,8 @@ declare class IdbProvider extends ContainerProvider {
|
|
|
35
35
|
|
|
36
36
|
initialize(): Promise<void>;
|
|
37
37
|
|
|
38
|
+
protected get _containerLockKey(): string;
|
|
39
|
+
|
|
38
40
|
protected _exist(key: string): Promise<boolean>;
|
|
39
41
|
|
|
40
42
|
protected _listItems(key: string): Promise<string[]>;
|
|
@@ -186,6 +188,64 @@ declare class PasswordPolicy {
|
|
|
186
188
|
|
|
187
189
|
declare function closeAllRpcClients(): Promise<void>;
|
|
188
190
|
|
|
191
|
+
interface ChainClientOpts {
|
|
192
|
+
rpcUrl?: string;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
interface ChainClientSimulateOpts extends ChainClientOpts {
|
|
196
|
+
from?: EvmAddress;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
interface ChainClientBroadcastOpts extends ChainClientOpts {
|
|
200
|
+
route?: SendRoute;
|
|
201
|
+
}
|
|
202
|
+
declare class ChainClient {
|
|
203
|
+
#private;
|
|
204
|
+
readonly network: Network;
|
|
205
|
+
constructor(network: Network);
|
|
206
|
+
get vm(): string;
|
|
207
|
+
|
|
208
|
+
readBalance(owner: string, token?: string | null, opts?: ChainClientOpts): Promise<bigint>;
|
|
209
|
+
|
|
210
|
+
getBlockNumber(opts?: ChainClientOpts): Promise<number>;
|
|
211
|
+
|
|
212
|
+
getGasPrice(opts?: ChainClientOpts): Promise<bigint>;
|
|
213
|
+
|
|
214
|
+
getTransactionCount(address: string, block?: "latest" | "pending", opts?: ChainClientOpts): Promise<number>;
|
|
215
|
+
|
|
216
|
+
getCode(address: string, opts?: ChainClientOpts): Promise<string>;
|
|
217
|
+
|
|
218
|
+
getTransactionReceipt(hash: string, opts?: ChainClientOpts): Promise<unknown | null>;
|
|
219
|
+
|
|
220
|
+
getRecentBlockhash(opts?: ChainClientOpts): Promise<{
|
|
221
|
+
blockhash: string;
|
|
222
|
+
lastValidBlockHeight: number;
|
|
223
|
+
}>;
|
|
224
|
+
|
|
225
|
+
getAccountInfo(address: string, opts?: ChainClientOpts): Promise<{
|
|
226
|
+
owner: string;
|
|
227
|
+
executable: boolean;
|
|
228
|
+
lamports: number;
|
|
229
|
+
parsed: {
|
|
230
|
+
program: string;
|
|
231
|
+
type: string;
|
|
232
|
+
info: Record<string, unknown>;
|
|
233
|
+
} | null;
|
|
234
|
+
} | null>;
|
|
235
|
+
|
|
236
|
+
getSignatureStatus(signature: string, opts?: ChainClientOpts): Promise<unknown | null>;
|
|
237
|
+
|
|
238
|
+
resolveAddressLookupTables(addresses: readonly string[], opts?: ChainClientOpts): Promise<SvmAddressLookupTable[]>;
|
|
239
|
+
|
|
240
|
+
simulate(input: RawTx | string, opts?: ChainClientSimulateOpts): Promise<SimulationResult>;
|
|
241
|
+
|
|
242
|
+
checkDestination(to: string, opts?: {
|
|
243
|
+
tokenAddress?: string;
|
|
244
|
+
} & DestinationGuardOptions): Promise<DestinationReport>;
|
|
245
|
+
|
|
246
|
+
broadcast(raw: string | Uint8Array, opts?: ChainClientBroadcastOpts): Promise<string>;
|
|
247
|
+
}
|
|
248
|
+
|
|
189
249
|
interface RecoveredSecpSig {
|
|
190
250
|
recovery: number;
|
|
191
251
|
toCompactHex(): string;
|
|
@@ -258,4 +318,4 @@ interface AssetInit {
|
|
|
258
318
|
}
|
|
259
319
|
declare const BUILTIN_ASSETS: Record<string, ReadonlyArray<AssetInit>>;
|
|
260
320
|
|
|
261
|
-
export { AesGcmCipher, type AesGcmCipherOptions, type Argon2BackendInfo, Argon2Kdf, type Argon2KdfOptions, AssetCollection, type AssetInit, BUILTIN_ASSETS, BUILTIN_NETWORKS, type ChainCtx, ChainDialect, ChainVM, Cipher, ContainerProvider, type CurveName, DbProvider, type DigestSigner, EvmAddress, EvmTxBuildParams, FileProvider, type IdbDestroyOptions, IdbProvider, type IdbProviderOptions, type MessageEncoding, Network, type NetworkConfig, type PasswordCheckContext, type PasswordCheckResult, PasswordPolicy, type PasswordPolicyOptions, PasswordScore, type PasswordWeakness, type PasswordWeaknessCode, Provider, Record$1 as Record, RecordType, type RecoveredSecpSig, Slug, type StorageDurability, type StorageQuota, SvmAddress, SvmTxBuildParams, Transaction, TransferPayload, TransferRequest, VmToken, argon2BackendInfo, closeAllRpcClients, registerDialect };
|
|
321
|
+
export { AesGcmCipher, type AesGcmCipherOptions, type Argon2BackendInfo, Argon2Kdf, type Argon2KdfOptions, AssetCollection, type AssetInit, BUILTIN_ASSETS, BUILTIN_NETWORKS, ChainClient, type ChainClientBroadcastOpts, type ChainClientOpts, type ChainClientSimulateOpts, type ChainCtx, ChainDialect, ChainVM, Cipher, ContainerProvider, type CurveName, DbProvider, DestinationGuardOptions, DestinationReport, type DigestSigner, EvmAddress, EvmTxBuildParams, FileProvider, type IdbDestroyOptions, IdbProvider, type IdbProviderOptions, type MessageEncoding, Network, type NetworkConfig, type PasswordCheckContext, type PasswordCheckResult, PasswordPolicy, type PasswordPolicyOptions, PasswordScore, type PasswordWeakness, type PasswordWeaknessCode, Provider, RawTx, Record$1 as Record, RecordType, type RecoveredSecpSig, SendRoute, SimulationResult, Slug, type StorageDurability, type StorageQuota, SvmAddress, SvmAddressLookupTable, SvmTxBuildParams, Transaction, TransferPayload, TransferRequest, VmToken, argon2BackendInfo, closeAllRpcClients, registerDialect };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { P as Provider,
|
|
2
|
-
export { A as Account, a as AccountCollection, b as AccountOrgType, c as Address, d as Asset, e as AssetBalance, g as AssetId, h as AssetInitObject, i as AssetRef, C as ChainId, k as
|
|
3
|
-
import { a as ContainerProvider } from './container-provider-
|
|
4
|
-
export { C as ContainerEntry } from './container-provider-
|
|
5
|
-
export { A as AbiItem, C as Contract } from './evm-
|
|
6
|
-
export { P as Program, S as SvmInstruction } from './svm-
|
|
1
|
+
import { P as Provider, T as RecordType, a0 as Slug, Q as Record$1, N as Network, a2 as SvmAddressLookupTable, R as RawTx, E as EvmAddress, _ as SimulationResult, o as DestinationGuardOptions, p as DestinationReport, V as SendRoute, a1 as SvmAddress, ar as SuiAddress, ad as VmToken, f as AssetCollection, x as EvmTxBuildParams, a5 as SvmTxBuildParams, a6 as Transaction, ac as TransferRequest, ab as TransferPayload, j as ChainVM } from './workspace-CZO-ANYP.js';
|
|
2
|
+
export { A as Account, a as AccountCollection, b as AccountOrgType, c as Address, d as Asset, e as AssetBalance, g as AssetId, h as AssetInitObject, i as AssetRef, C as ChainId, k as Commitment, l as ConsoleSink, m as ContainerState, D as DecodedTx, n as DestinationCode, q as DestinationScreenResult, r as DestinationScreener, s as DestinationSeverity, t as DestinationWarning, u as EvmRawTx, v as EvmSigner, w as EvmTransaction, y as EvmTxType, L as LogLevel, z as LogRecord, B as LogSink, F as Logger, G as LoggerConfig, H as NetworkCollection, I as NetworkInit, J as NetworkLike, K as NetworkRoutes, M as NormalizedTx, O as OpenOptions, S as RecordInit, U as SendOptions, W as Settling, X as SignInParams, Y as SignInResult, Z as SignRawOptions, $ as SinkConfig, a3 as SvmSigner, a4 as SvmTransaction, a7 as TransactionReceipt, a8 as TransactionStateChange, a9 as TransactionStatus, aa as TransactionTracker, ae as Wallet, af as WalletCollection, ag as WativeError, ah as WativeErrorCode, ai as WativeErrorOpts, aj as Workspace, ak as WorkspaceConfig, al as deserializeEvmTx, am as deserializeSvmTx, an as deserializeTx, ao as isRawTx, ap as newMnemonic, aq as normalizeTxInput } from './workspace-CZO-ANYP.js';
|
|
3
|
+
import { a as ContainerProvider } from './container-provider-D5bLhd__.js';
|
|
4
|
+
export { C as ContainerEntry } from './container-provider-D5bLhd__.js';
|
|
5
|
+
export { A as AbiItem, C as Contract } from './evm-Yd0NCJAL.js';
|
|
6
|
+
export { P as Program, S as SvmInstruction, s as svmResolveAddressLookupTables } from './svm-DgxTJqrR.js';
|
|
7
7
|
|
|
8
8
|
type StorageDurability = "persistent" | "best-effort";
|
|
9
9
|
interface IdbProviderOptions {
|
|
@@ -35,6 +35,8 @@ declare class IdbProvider extends ContainerProvider {
|
|
|
35
35
|
|
|
36
36
|
initialize(): Promise<void>;
|
|
37
37
|
|
|
38
|
+
protected get _containerLockKey(): string;
|
|
39
|
+
|
|
38
40
|
protected _exist(key: string): Promise<boolean>;
|
|
39
41
|
|
|
40
42
|
protected _listItems(key: string): Promise<string[]>;
|
|
@@ -186,6 +188,64 @@ declare class PasswordPolicy {
|
|
|
186
188
|
|
|
187
189
|
declare function closeAllRpcClients(): Promise<void>;
|
|
188
190
|
|
|
191
|
+
interface ChainClientOpts {
|
|
192
|
+
rpcUrl?: string;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
interface ChainClientSimulateOpts extends ChainClientOpts {
|
|
196
|
+
from?: EvmAddress;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
interface ChainClientBroadcastOpts extends ChainClientOpts {
|
|
200
|
+
route?: SendRoute;
|
|
201
|
+
}
|
|
202
|
+
declare class ChainClient {
|
|
203
|
+
#private;
|
|
204
|
+
readonly network: Network;
|
|
205
|
+
constructor(network: Network);
|
|
206
|
+
get vm(): string;
|
|
207
|
+
|
|
208
|
+
readBalance(owner: string, token?: string | null, opts?: ChainClientOpts): Promise<bigint>;
|
|
209
|
+
|
|
210
|
+
getBlockNumber(opts?: ChainClientOpts): Promise<number>;
|
|
211
|
+
|
|
212
|
+
getGasPrice(opts?: ChainClientOpts): Promise<bigint>;
|
|
213
|
+
|
|
214
|
+
getTransactionCount(address: string, block?: "latest" | "pending", opts?: ChainClientOpts): Promise<number>;
|
|
215
|
+
|
|
216
|
+
getCode(address: string, opts?: ChainClientOpts): Promise<string>;
|
|
217
|
+
|
|
218
|
+
getTransactionReceipt(hash: string, opts?: ChainClientOpts): Promise<unknown | null>;
|
|
219
|
+
|
|
220
|
+
getRecentBlockhash(opts?: ChainClientOpts): Promise<{
|
|
221
|
+
blockhash: string;
|
|
222
|
+
lastValidBlockHeight: number;
|
|
223
|
+
}>;
|
|
224
|
+
|
|
225
|
+
getAccountInfo(address: string, opts?: ChainClientOpts): Promise<{
|
|
226
|
+
owner: string;
|
|
227
|
+
executable: boolean;
|
|
228
|
+
lamports: number;
|
|
229
|
+
parsed: {
|
|
230
|
+
program: string;
|
|
231
|
+
type: string;
|
|
232
|
+
info: Record<string, unknown>;
|
|
233
|
+
} | null;
|
|
234
|
+
} | null>;
|
|
235
|
+
|
|
236
|
+
getSignatureStatus(signature: string, opts?: ChainClientOpts): Promise<unknown | null>;
|
|
237
|
+
|
|
238
|
+
resolveAddressLookupTables(addresses: readonly string[], opts?: ChainClientOpts): Promise<SvmAddressLookupTable[]>;
|
|
239
|
+
|
|
240
|
+
simulate(input: RawTx | string, opts?: ChainClientSimulateOpts): Promise<SimulationResult>;
|
|
241
|
+
|
|
242
|
+
checkDestination(to: string, opts?: {
|
|
243
|
+
tokenAddress?: string;
|
|
244
|
+
} & DestinationGuardOptions): Promise<DestinationReport>;
|
|
245
|
+
|
|
246
|
+
broadcast(raw: string | Uint8Array, opts?: ChainClientBroadcastOpts): Promise<string>;
|
|
247
|
+
}
|
|
248
|
+
|
|
189
249
|
interface RecoveredSecpSig {
|
|
190
250
|
recovery: number;
|
|
191
251
|
toCompactHex(): string;
|
|
@@ -258,4 +318,4 @@ interface AssetInit {
|
|
|
258
318
|
}
|
|
259
319
|
declare const BUILTIN_ASSETS: Record<string, ReadonlyArray<AssetInit>>;
|
|
260
320
|
|
|
261
|
-
export { AesGcmCipher, type AesGcmCipherOptions, type Argon2BackendInfo, Argon2Kdf, type Argon2KdfOptions, AssetCollection, type AssetInit, BUILTIN_ASSETS, BUILTIN_NETWORKS, type ChainCtx, ChainDialect, ChainVM, Cipher, ContainerProvider, type CurveName, DbProvider, type DigestSigner, EvmAddress, EvmTxBuildParams, FileProvider, type IdbDestroyOptions, IdbProvider, type IdbProviderOptions, type MessageEncoding, Network, type NetworkConfig, type PasswordCheckContext, type PasswordCheckResult, PasswordPolicy, type PasswordPolicyOptions, PasswordScore, type PasswordWeakness, type PasswordWeaknessCode, Provider, Record$1 as Record, RecordType, type RecoveredSecpSig, Slug, type StorageDurability, type StorageQuota, SvmAddress, SvmTxBuildParams, Transaction, TransferPayload, TransferRequest, VmToken, argon2BackendInfo, closeAllRpcClients, registerDialect };
|
|
321
|
+
export { AesGcmCipher, type AesGcmCipherOptions, type Argon2BackendInfo, Argon2Kdf, type Argon2KdfOptions, AssetCollection, type AssetInit, BUILTIN_ASSETS, BUILTIN_NETWORKS, ChainClient, type ChainClientBroadcastOpts, type ChainClientOpts, type ChainClientSimulateOpts, type ChainCtx, ChainDialect, ChainVM, Cipher, ContainerProvider, type CurveName, DbProvider, DestinationGuardOptions, DestinationReport, type DigestSigner, EvmAddress, EvmTxBuildParams, FileProvider, type IdbDestroyOptions, IdbProvider, type IdbProviderOptions, type MessageEncoding, Network, type NetworkConfig, type PasswordCheckContext, type PasswordCheckResult, PasswordPolicy, type PasswordPolicyOptions, PasswordScore, type PasswordWeakness, type PasswordWeaknessCode, Provider, RawTx, Record$1 as Record, RecordType, type RecoveredSecpSig, SendRoute, SimulationResult, Slug, type StorageDurability, type StorageQuota, SvmAddress, SvmAddressLookupTable, SvmTxBuildParams, Transaction, TransferPayload, TransferRequest, VmToken, argon2BackendInfo, closeAllRpcClients, registerDialect };
|