@vleap/warps-adapter-multiversx 0.2.0-alpha.9 → 0.2.0-beta.78

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.
@@ -0,0 +1,291 @@
1
+ import * as _vleap_warps from '@vleap/warps';
2
+ import { WarpClientConfig, Adapter, WarpChain, WarpChainEnv, WarpChainInfo, AdapterFactory, WarpChainAsset, WarpRegistryInfo, WarpRegistryConfigInfo, WarpNativeValue, AdapterWarpAbiBuilder, WarpAbiContents, WarpAdapterGenericTransaction, WarpAbi, WarpCacheConfig, WarpContractAction, WarpQueryAction, WarpBrand, WarpBuilder, AdapterWarpBuilder, Warp, WarpContract, WarpContractVerification, AdapterWarpDataLoader, WarpChainAccount, WarpChainAction, WarpDataLoaderOptions, AdapterWarpExecutor, WarpExecutable, WarpActionExecutionResult, AdapterWarpExplorer, AdapterWarpRegistry, AdapterWarpOutput, AdapterTypeRegistry as AdapterTypeRegistry$1, WarpActionIndex, WarpAdapterGenericRemoteTransaction, ResolvedInput, WarpExecutionOutput, AdapterWarpSerializer, WarpSerializer, WarpActionInputType, BaseWarpActionInputType, WarpAdapterGenericType, AdapterWarpWallet } from '@vleap/warps';
3
+ import { NetworkEntrypoint, TypedValue, Type, OptionValue, OptionalValue, List, VariadicValue, CompositeValue, StringValue, U8Value, U16Value, U32Value, U64Value, BigUIntValue, BooleanValue, AddressValue, TokenIdentifierValue, BytesValue, TokenTransfer, Struct, CodeMetadataValue, NothingValue, TransactionOnNetwork, AbiRegistry, Transaction } from '@multiversx/sdk-core';
4
+ import { WarpAdapterGenericTransaction as WarpAdapterGenericTransaction$1, AdapterTypeRegistry } from '@vleap/warps/src/types';
5
+
6
+ declare const getAllMultiversxAdapters: (config: WarpClientConfig, fallback?: Adapter) => Adapter[];
7
+ declare const getAllMultiversxChainNames: () => WarpChain[];
8
+
9
+ declare const createMultiversxAdapter: (chainName: string, chainInfos: Record<WarpChainEnv, WarpChainInfo>) => AdapterFactory;
10
+
11
+ declare const NativeTokenEgld: WarpChainAsset;
12
+ declare const getMultiversxAdapter: _vleap_warps.AdapterFactory;
13
+
14
+ declare const NativeTokenVibe: WarpChainAsset;
15
+ declare const getVibechainAdapter: _vleap_warps.AdapterFactory;
16
+
17
+ declare const getMultiversxRegistryAddress: (env: WarpChainEnv) => "erd1qqqqqqqqqqqqqpgqje2f99vr6r7sk54thg03c9suzcvwr4nfl3tsfkdl36" | "erd1qqqqqqqqqqqqqpgq3mrpj3u6q7tejv6d7eqhnyd27n9v5c5tl3ts08mffe";
18
+
19
+ declare const WarpMultiversxConstants: {
20
+ Egld: {
21
+ Identifier: string;
22
+ EsdtIdentifier: string;
23
+ DisplayName: string;
24
+ Decimals: number;
25
+ };
26
+ };
27
+ declare const WarpMultiversxInputTypes: {
28
+ Null: string;
29
+ Optional: string;
30
+ List: string;
31
+ Token: string;
32
+ CodeMeta: string;
33
+ };
34
+ declare enum MultiversxExplorers {
35
+ MultiversxExplorer = "multiversx_explorer",
36
+ MultiversxExplorerDevnet = "multiversx_explorer_devnet",
37
+ MultiversxExplorerTestnet = "multiversx_explorer_testnet"
38
+ }
39
+ declare enum VibechainExplorers {
40
+ VibechainExplorer = "vibechain_explorer",
41
+ VibechainExplorerDevnet = "vibechain_explorer_devnet",
42
+ VibechainExplorerTestnet = "vibechain_explorer_testnet"
43
+ }
44
+ type ExplorerName = MultiversxExplorers | VibechainExplorers;
45
+ declare const MultiversxExplorersConfig: {
46
+ readonly multiversx: {
47
+ readonly mainnet: readonly [MultiversxExplorers.MultiversxExplorer];
48
+ readonly testnet: readonly [MultiversxExplorers.MultiversxExplorerTestnet];
49
+ readonly devnet: readonly [MultiversxExplorers.MultiversxExplorerDevnet];
50
+ };
51
+ readonly vibechain: {
52
+ readonly mainnet: readonly [VibechainExplorers.VibechainExplorer];
53
+ readonly testnet: readonly [VibechainExplorers.VibechainExplorerTestnet];
54
+ readonly devnet: readonly [VibechainExplorers.VibechainExplorerDevnet];
55
+ };
56
+ };
57
+ declare const ExplorerUrls: Record<ExplorerName, string>;
58
+
59
+ declare const isNativeToken: (identifier: string) => boolean;
60
+ declare const getNormalizedTokenIdentifier: (identifier: string) => string;
61
+ declare const getMultiversxEntrypoint: (chainInfo: WarpChainInfo, env: WarpChainEnv, config?: WarpClientConfig) => NetworkEntrypoint;
62
+
63
+ declare const toTypedRegistryInfo: (registryInfo: any) => WarpRegistryInfo;
64
+ declare const toTypedConfigInfo: (configInfo: any) => WarpRegistryConfigInfo;
65
+
66
+ declare const KnownTokens: Record<WarpChain, Record<WarpChainEnv, WarpChainAsset[]>>;
67
+ declare const findKnownTokenById: (chain: WarpChain, env: WarpChainEnv, id: string) => WarpChainAsset | null;
68
+ declare const getKnownTokensForChain: (chain: WarpChain, env: WarpChainEnv) => WarpChainAsset[];
69
+
70
+ declare const token: (value: WarpNativeValue) => string;
71
+ declare const codemeta: (value: WarpNativeValue) => string;
72
+ declare const optional: <T extends WarpNativeValue>(codecFunc: (value: T) => string, value: T | null) => string;
73
+ declare const list: (values: WarpNativeValue[]) => string;
74
+
75
+ declare const option_value: (value: TypedValue | null, type?: Type) => OptionValue;
76
+ declare const optional_value: (value: TypedValue | null, type?: Type) => OptionalValue;
77
+ declare const list_value: (values: TypedValue[]) => List;
78
+ declare const variadic_value: (values: TypedValue[]) => VariadicValue;
79
+ declare const composite_value: (values: TypedValue[]) => CompositeValue;
80
+ declare const string_value: (value: string) => StringValue;
81
+ declare const u8_value: (value: number) => U8Value;
82
+ declare const u16_value: (value: number) => U16Value;
83
+ declare const u32_value: (value: number) => U32Value;
84
+ declare const u64_value: (value: bigint) => U64Value;
85
+ declare const biguint_value: (value: bigint | string | number) => BigUIntValue;
86
+ declare const boolean_value: (value: boolean) => BooleanValue;
87
+ declare const address_value: (value: string) => AddressValue;
88
+ declare const token_value: (value: string) => TokenIdentifierValue;
89
+ declare const hex_value: (value: string) => BytesValue;
90
+ declare const asset_value: (value: TokenTransfer) => Struct;
91
+ declare const codemeta_value: (hexString: string) => CodeMetadataValue;
92
+ declare const nothing_value: () => NothingValue;
93
+
94
+ declare class WarpMultiversxAbiBuilder implements AdapterWarpAbiBuilder {
95
+ private readonly config;
96
+ private readonly chain;
97
+ private readonly contractLoader;
98
+ private readonly cache;
99
+ constructor(config: WarpClientConfig, chain: WarpChainInfo);
100
+ createInscriptionTransaction(abi: WarpAbiContents): Promise<WarpAdapterGenericTransaction>;
101
+ createFromRaw(encoded: string): Promise<WarpAbi>;
102
+ createFromTransaction(tx: TransactionOnNetwork): Promise<WarpAbi>;
103
+ createFromTransactionHash(hash: string, cache?: WarpCacheConfig): Promise<WarpAbi | null>;
104
+ getAbiForAction(action: WarpContractAction | WarpQueryAction): Promise<AbiRegistry>;
105
+ fetchAbi(action: WarpContractAction | WarpQueryAction): Promise<AbiRegistry>;
106
+ }
107
+
108
+ declare class WarpMultiversxBrandBuilder {
109
+ private readonly config;
110
+ private readonly chain;
111
+ private readonly core;
112
+ constructor(config: WarpClientConfig, chain: WarpChainInfo);
113
+ createInscriptionTransaction(brand: WarpBrand): Promise<Transaction>;
114
+ createFromTransaction(tx: TransactionOnNetwork, validateSchema?: boolean): Promise<WarpBrand>;
115
+ createFromTransactionHash(hash: string): Promise<WarpBrand | null>;
116
+ }
117
+
118
+ declare class WarpMultiversxBuilder extends WarpBuilder implements AdapterWarpBuilder {
119
+ protected readonly config: WarpClientConfig;
120
+ private readonly chain;
121
+ private readonly cache;
122
+ private readonly core;
123
+ constructor(config: WarpClientConfig, chain: WarpChainInfo);
124
+ createInscriptionTransaction(warp: Warp): Promise<WarpAdapterGenericTransaction$1>;
125
+ createFromTransaction(tx: TransactionOnNetwork, validate?: boolean): Promise<Warp>;
126
+ createFromTransactionHash(hash: string, cache?: WarpCacheConfig): Promise<Warp | null>;
127
+ }
128
+
129
+ declare class WarpMultiversxContractLoader {
130
+ private readonly config;
131
+ constructor(config: WarpClientConfig);
132
+ getContract(address: string, chain: WarpChainInfo): Promise<WarpContract | null>;
133
+ getVerificationInfo(address: string, chain: WarpChainInfo): Promise<WarpContractVerification | null>;
134
+ }
135
+
136
+ declare class WarpMultiversxDataLoader implements AdapterWarpDataLoader {
137
+ private readonly config;
138
+ private readonly chain;
139
+ private cache;
140
+ constructor(config: WarpClientConfig, chain: WarpChainInfo);
141
+ getAccount(address: string): Promise<WarpChainAccount>;
142
+ getAccountAssets(address: string): Promise<WarpChainAsset[]>;
143
+ getAsset(identifier: string): Promise<WarpChainAsset | null>;
144
+ getAction(identifier: string, awaitCompleted?: boolean): Promise<WarpChainAction | null>;
145
+ getAccountActions(address: string, options?: WarpDataLoaderOptions): Promise<WarpChainAction[]>;
146
+ private toActionStatus;
147
+ private toActionCreatedAt;
148
+ }
149
+
150
+ declare class WarpMultiversxExecutor implements AdapterWarpExecutor {
151
+ private readonly config;
152
+ private readonly chain;
153
+ private readonly typeRegistry;
154
+ private readonly serializer;
155
+ private readonly abi;
156
+ private readonly output;
157
+ constructor(config: WarpClientConfig, chain: WarpChainInfo, typeRegistry: AdapterTypeRegistry);
158
+ createTransaction(executable: WarpExecutable): Promise<Transaction>;
159
+ createTransferTransaction(executable: WarpExecutable): Promise<Transaction>;
160
+ createContractCallTransaction(executable: WarpExecutable): Promise<Transaction>;
161
+ executeQuery(executable: WarpExecutable): Promise<WarpActionExecutionResult>;
162
+ private toTokenTransfers;
163
+ }
164
+
165
+ declare class WarpMultiversxExplorer implements AdapterWarpExplorer {
166
+ private readonly chain;
167
+ private readonly config;
168
+ constructor(chain: WarpChain, config: WarpClientConfig);
169
+ private getExplorers;
170
+ private getPrimaryExplorer;
171
+ private getExplorerUrlByName;
172
+ getAccountUrl(address: string, explorer?: ExplorerName): string;
173
+ getTransactionUrl(hash: string, explorer?: ExplorerName): string;
174
+ getBlockUrl(blockNumber: string | number, explorer?: ExplorerName): string;
175
+ getAssetUrl(identifier: string, explorer?: ExplorerName): string;
176
+ getContractUrl(address: string, explorer?: ExplorerName): string;
177
+ getAllExplorers(): readonly ExplorerName[];
178
+ getExplorerByName(name: string): ExplorerName | undefined;
179
+ getAccountUrls(address: string): Record<ExplorerName, string>;
180
+ getTransactionUrls(hash: string): Record<ExplorerName, string>;
181
+ }
182
+
183
+ declare class WarpMultiversxRegistry implements AdapterWarpRegistry {
184
+ private config;
185
+ private chain;
186
+ private cache;
187
+ private userWallet;
188
+ registryConfig: WarpRegistryConfigInfo;
189
+ constructor(config: WarpClientConfig, chain: WarpChainInfo);
190
+ init(): Promise<void>;
191
+ getRegistryConfig(): WarpRegistryConfigInfo;
192
+ createWarpRegisterTransaction(txHash: string, alias?: string | null, brand?: string | null): Promise<Transaction>;
193
+ createWarpUnregisterTransaction(txHash: string): Promise<Transaction>;
194
+ createWarpUpgradeTransaction(alias: string, txHash: string, brand?: string | null): Promise<Transaction>;
195
+ createWarpAliasSetTransaction(txHash: string, alias: string): Promise<Transaction>;
196
+ createWarpVerifyTransaction(txHash: string): Promise<Transaction>;
197
+ createWarpTransferOwnershipTransaction(txHash: string, newOwner: string): Promise<Transaction>;
198
+ createBrandRegisterTransaction(txHash: string): Promise<Transaction>;
199
+ createWarpBrandingTransaction(warpHash: string, brandHash: string): Promise<Transaction>;
200
+ getInfoByAlias(alias: string, cache?: WarpCacheConfig): Promise<{
201
+ registryInfo: WarpRegistryInfo | null;
202
+ brand: WarpBrand | null;
203
+ }>;
204
+ getInfoByHash(hash: string, cache?: WarpCacheConfig): Promise<{
205
+ registryInfo: WarpRegistryInfo | null;
206
+ brand: WarpBrand | null;
207
+ }>;
208
+ getUserWarpRegistryInfos(user?: string): Promise<WarpRegistryInfo[]>;
209
+ getUserBrands(user?: string): Promise<WarpBrand[]>;
210
+ fetchBrand(hash: string, cache?: WarpCacheConfig): Promise<WarpBrand | null>;
211
+ private loadRegistryConfigs;
212
+ private getFactory;
213
+ private getController;
214
+ private isCurrentUserAdmin;
215
+ }
216
+
217
+ declare class WarpMultiversxOutput implements AdapterWarpOutput {
218
+ private readonly config;
219
+ private readonly chain;
220
+ private readonly typeRegistry;
221
+ private readonly abi;
222
+ private readonly serializer;
223
+ private readonly cache;
224
+ constructor(config: WarpClientConfig, chain: WarpChainInfo, typeRegistry: AdapterTypeRegistry$1);
225
+ getActionExecution(warp: Warp, actionIndex: WarpActionIndex, tx: WarpAdapterGenericRemoteTransaction): Promise<WarpActionExecutionResult>;
226
+ extractContractOutput(warp: Warp, actionIndex: WarpActionIndex, tx: TransactionOnNetwork, inputs: ResolvedInput[]): Promise<{
227
+ values: {
228
+ string: string[];
229
+ native: any[];
230
+ };
231
+ output: WarpExecutionOutput;
232
+ }>;
233
+ extractQueryOutput(warp: Warp, typedValues: TypedValue[], actionIndex: number, inputs: ResolvedInput[]): Promise<{
234
+ values: {
235
+ string: string[];
236
+ native: any[];
237
+ };
238
+ output: WarpExecutionOutput;
239
+ }>;
240
+ resolveWarpOutputRecursively(props: {
241
+ warp: Warp;
242
+ entryActionIndex: number;
243
+ executor: {
244
+ executeQuery: Function;
245
+ executeCollect: Function;
246
+ };
247
+ inputs: ResolvedInput[];
248
+ meta?: Record<string, any>;
249
+ }): Promise<any>;
250
+ }
251
+
252
+ declare class WarpMultiversxSerializer implements AdapterWarpSerializer {
253
+ readonly coreSerializer: WarpSerializer;
254
+ constructor(options?: {
255
+ typeRegistry?: AdapterTypeRegistry;
256
+ });
257
+ typedToString(value: TypedValue): string;
258
+ typedToNative(value: TypedValue): [WarpActionInputType, WarpNativeValue];
259
+ nativeToTyped(type: WarpActionInputType, value: WarpNativeValue): TypedValue;
260
+ nativeToType(type: BaseWarpActionInputType): WarpAdapterGenericType;
261
+ stringToTyped(value: string): TypedValue;
262
+ private splitTupleStrings;
263
+ typeToString(type: Type): WarpActionInputType;
264
+ }
265
+
266
+ declare class WarpMultiversxWallet implements AdapterWarpWallet {
267
+ private config;
268
+ private chain;
269
+ private entry;
270
+ private provider;
271
+ private cache;
272
+ constructor(config: WarpClientConfig, chain: WarpChainInfo);
273
+ signTransaction(tx: WarpAdapterGenericTransaction): Promise<WarpAdapterGenericTransaction>;
274
+ signTransactions(txs: WarpAdapterGenericTransaction[]): Promise<WarpAdapterGenericTransaction[]>;
275
+ signMessage(message: string): Promise<string>;
276
+ sendTransactions(txs: WarpAdapterGenericTransaction[]): Promise<string[]>;
277
+ sendTransaction(tx: WarpAdapterGenericTransaction): Promise<string>;
278
+ create(mnemonic: string): {
279
+ address: string;
280
+ privateKey: string;
281
+ mnemonic: string;
282
+ };
283
+ generate(): {
284
+ address: string;
285
+ privateKey: string;
286
+ mnemonic: string;
287
+ };
288
+ getAddress(): string | null;
289
+ }
290
+
291
+ export { type ExplorerName, ExplorerUrls, KnownTokens, MultiversxExplorers, MultiversxExplorersConfig, NativeTokenEgld, NativeTokenVibe, VibechainExplorers, WarpMultiversxAbiBuilder, WarpMultiversxBrandBuilder, WarpMultiversxBuilder, WarpMultiversxConstants, WarpMultiversxContractLoader, WarpMultiversxDataLoader, WarpMultiversxExecutor, WarpMultiversxExplorer, WarpMultiversxInputTypes, WarpMultiversxOutput, WarpMultiversxRegistry, WarpMultiversxSerializer, WarpMultiversxWallet, address_value, asset_value, biguint_value, boolean_value, codemeta, codemeta_value, composite_value, createMultiversxAdapter, findKnownTokenById, getAllMultiversxAdapters, getAllMultiversxChainNames, getKnownTokensForChain, getMultiversxAdapter, getMultiversxEntrypoint, getMultiversxRegistryAddress, getNormalizedTokenIdentifier, getVibechainAdapter, hex_value, isNativeToken, list, list_value, nothing_value, option_value, optional, optional_value, string_value, toTypedConfigInfo, toTypedRegistryInfo, token, token_value, u16_value, u32_value, u64_value, u8_value, variadic_value };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,20 @@
1
- import { WarpInitConfig, Adapter, WarpAbi, WarpCacheConfig, WarpContractAction, WarpQueryAction, WarpBrand, AdapterWarpBuilder, Warp, WarpChainInfo, WarpContract, WarpContractVerification, AdapterWarpExecutor, WarpExecutable, WarpExecution, WarpActionInputType, WarpChainEnv, AdapterWarpExplorer, AdapterWarpRegistry, WarpRegistryConfigInfo, WarpRegistryInfo, WarpChain, AdapterWarpResults, ResolvedInput, WarpExecutionResults, AdapterWarpSerializer, WarpSerializer, WarpNativeValue, BaseWarpActionInputType, WarpAdapterGenericType } from '@vleap/warps';
2
- import { TypedValue, Type, OptionValue, OptionalValue, List, VariadicValue, CompositeValue, StringValue, U8Value, U16Value, U32Value, U64Value, BigUIntValue, BooleanValue, AddressValue, TokenIdentifierValue, BytesValue, TokenTransfer, Struct, CodeMetadataValue, NothingValue, TransactionOnNetwork, AbiRegistry, Transaction, NetworkEntrypoint, Address } from '@multiversx/sdk-core';
1
+ import * as _vleap_warps from '@vleap/warps';
2
+ import { WarpClientConfig, Adapter, WarpChain, WarpChainEnv, WarpChainInfo, AdapterFactory, WarpChainAsset, WarpRegistryInfo, WarpRegistryConfigInfo, WarpNativeValue, AdapterWarpAbiBuilder, WarpAbiContents, WarpAdapterGenericTransaction, WarpAbi, WarpCacheConfig, WarpContractAction, WarpQueryAction, WarpBrand, WarpBuilder, AdapterWarpBuilder, Warp, WarpContract, WarpContractVerification, AdapterWarpDataLoader, WarpChainAccount, WarpChainAction, WarpDataLoaderOptions, AdapterWarpExecutor, WarpExecutable, WarpActionExecutionResult, AdapterWarpExplorer, AdapterWarpRegistry, AdapterWarpOutput, AdapterTypeRegistry as AdapterTypeRegistry$1, WarpActionIndex, WarpAdapterGenericRemoteTransaction, ResolvedInput, WarpExecutionOutput, AdapterWarpSerializer, WarpSerializer, WarpActionInputType, BaseWarpActionInputType, WarpAdapterGenericType, AdapterWarpWallet } from '@vleap/warps';
3
+ import { NetworkEntrypoint, TypedValue, Type, OptionValue, OptionalValue, List, VariadicValue, CompositeValue, StringValue, U8Value, U16Value, U32Value, U64Value, BigUIntValue, BooleanValue, AddressValue, TokenIdentifierValue, BytesValue, TokenTransfer, Struct, CodeMetadataValue, NothingValue, TransactionOnNetwork, AbiRegistry, Transaction } from '@multiversx/sdk-core';
4
+ import { WarpAdapterGenericTransaction as WarpAdapterGenericTransaction$1, AdapterTypeRegistry } from '@vleap/warps/src/types';
5
+
6
+ declare const getAllMultiversxAdapters: (config: WarpClientConfig, fallback?: Adapter) => Adapter[];
7
+ declare const getAllMultiversxChainNames: () => WarpChain[];
8
+
9
+ declare const createMultiversxAdapter: (chainName: string, chainInfos: Record<WarpChainEnv, WarpChainInfo>) => AdapterFactory;
10
+
11
+ declare const NativeTokenEgld: WarpChainAsset;
12
+ declare const getMultiversxAdapter: _vleap_warps.AdapterFactory;
13
+
14
+ declare const NativeTokenVibe: WarpChainAsset;
15
+ declare const getVibechainAdapter: _vleap_warps.AdapterFactory;
16
+
17
+ declare const getMultiversxRegistryAddress: (env: WarpChainEnv) => "erd1qqqqqqqqqqqqqpgqje2f99vr6r7sk54thg03c9suzcvwr4nfl3tsfkdl36" | "erd1qqqqqqqqqqqqqpgq3mrpj3u6q7tejv6d7eqhnyd27n9v5c5tl3ts08mffe";
3
18
 
4
19
  declare const WarpMultiversxConstants: {
5
20
  Egld: {
@@ -9,8 +24,53 @@ declare const WarpMultiversxConstants: {
9
24
  Decimals: number;
10
25
  };
11
26
  };
27
+ declare const WarpMultiversxInputTypes: {
28
+ Null: string;
29
+ Optional: string;
30
+ List: string;
31
+ Token: string;
32
+ CodeMeta: string;
33
+ };
34
+ declare enum MultiversxExplorers {
35
+ MultiversxExplorer = "multiversx_explorer",
36
+ MultiversxExplorerDevnet = "multiversx_explorer_devnet",
37
+ MultiversxExplorerTestnet = "multiversx_explorer_testnet"
38
+ }
39
+ declare enum VibechainExplorers {
40
+ VibechainExplorer = "vibechain_explorer",
41
+ VibechainExplorerDevnet = "vibechain_explorer_devnet",
42
+ VibechainExplorerTestnet = "vibechain_explorer_testnet"
43
+ }
44
+ type ExplorerName = MultiversxExplorers | VibechainExplorers;
45
+ declare const MultiversxExplorersConfig: {
46
+ readonly multiversx: {
47
+ readonly mainnet: readonly [MultiversxExplorers.MultiversxExplorer];
48
+ readonly testnet: readonly [MultiversxExplorers.MultiversxExplorerTestnet];
49
+ readonly devnet: readonly [MultiversxExplorers.MultiversxExplorerDevnet];
50
+ };
51
+ readonly vibechain: {
52
+ readonly mainnet: readonly [VibechainExplorers.VibechainExplorer];
53
+ readonly testnet: readonly [VibechainExplorers.VibechainExplorerTestnet];
54
+ readonly devnet: readonly [VibechainExplorers.VibechainExplorerDevnet];
55
+ };
56
+ };
57
+ declare const ExplorerUrls: Record<ExplorerName, string>;
58
+
59
+ declare const isNativeToken: (identifier: string) => boolean;
60
+ declare const getNormalizedTokenIdentifier: (identifier: string) => string;
61
+ declare const getMultiversxEntrypoint: (chainInfo: WarpChainInfo, env: WarpChainEnv, config?: WarpClientConfig) => NetworkEntrypoint;
12
62
 
13
- declare const getMultiversxAdapter: (config: WarpInitConfig) => Adapter;
63
+ declare const toTypedRegistryInfo: (registryInfo: any) => WarpRegistryInfo;
64
+ declare const toTypedConfigInfo: (configInfo: any) => WarpRegistryConfigInfo;
65
+
66
+ declare const KnownTokens: Record<WarpChain, Record<WarpChainEnv, WarpChainAsset[]>>;
67
+ declare const findKnownTokenById: (chain: WarpChain, env: WarpChainEnv, id: string) => WarpChainAsset | null;
68
+ declare const getKnownTokensForChain: (chain: WarpChain, env: WarpChainEnv) => WarpChainAsset[];
69
+
70
+ declare const token: (value: WarpNativeValue) => string;
71
+ declare const codemeta: (value: WarpNativeValue) => string;
72
+ declare const optional: <T extends WarpNativeValue>(codecFunc: (value: T) => string, value: T | null) => string;
73
+ declare const list: (values: WarpNativeValue[]) => string;
14
74
 
15
75
  declare const option_value: (value: TypedValue | null, type?: Type) => OptionValue;
16
76
  declare const optional_value: (value: TypedValue | null, type?: Type) => OptionalValue;
@@ -27,15 +87,17 @@ declare const boolean_value: (value: boolean) => BooleanValue;
27
87
  declare const address_value: (value: string) => AddressValue;
28
88
  declare const token_value: (value: string) => TokenIdentifierValue;
29
89
  declare const hex_value: (value: string) => BytesValue;
30
- declare const esdt_value: (value: TokenTransfer) => Struct;
90
+ declare const asset_value: (value: TokenTransfer) => Struct;
31
91
  declare const codemeta_value: (hexString: string) => CodeMetadataValue;
32
92
  declare const nothing_value: () => NothingValue;
33
93
 
34
- declare class WarpMultiversxAbi {
94
+ declare class WarpMultiversxAbiBuilder implements AdapterWarpAbiBuilder {
35
95
  private readonly config;
96
+ private readonly chain;
36
97
  private readonly contractLoader;
37
98
  private readonly cache;
38
- constructor(config: WarpInitConfig);
99
+ constructor(config: WarpClientConfig, chain: WarpChainInfo);
100
+ createInscriptionTransaction(abi: WarpAbiContents): Promise<WarpAdapterGenericTransaction>;
39
101
  createFromRaw(encoded: string): Promise<WarpAbi>;
40
102
  createFromTransaction(tx: TransactionOnNetwork): Promise<WarpAbi>;
41
103
  createFromTransactionHash(hash: string, cache?: WarpCacheConfig): Promise<WarpAbi | null>;
@@ -44,66 +106,97 @@ declare class WarpMultiversxAbi {
44
106
  }
45
107
 
46
108
  declare class WarpMultiversxBrandBuilder {
47
- private config;
48
- private core;
49
- constructor(config: WarpInitConfig);
50
- createInscriptionTransaction(brand: WarpBrand): Transaction;
109
+ private readonly config;
110
+ private readonly chain;
111
+ private readonly core;
112
+ constructor(config: WarpClientConfig, chain: WarpChainInfo);
113
+ createInscriptionTransaction(brand: WarpBrand): Promise<Transaction>;
51
114
  createFromTransaction(tx: TransactionOnNetwork, validateSchema?: boolean): Promise<WarpBrand>;
52
115
  createFromTransactionHash(hash: string): Promise<WarpBrand | null>;
53
116
  }
54
117
 
55
- declare class WarpMultiversxBuilder implements AdapterWarpBuilder {
56
- private config;
57
- private cache;
58
- private core;
59
- constructor(config: WarpInitConfig);
60
- createInscriptionTransaction(warp: Warp): Transaction;
118
+ declare class WarpMultiversxBuilder extends WarpBuilder implements AdapterWarpBuilder {
119
+ protected readonly config: WarpClientConfig;
120
+ private readonly chain;
121
+ private readonly cache;
122
+ private readonly core;
123
+ constructor(config: WarpClientConfig, chain: WarpChainInfo);
124
+ createInscriptionTransaction(warp: Warp): Promise<WarpAdapterGenericTransaction$1>;
61
125
  createFromTransaction(tx: TransactionOnNetwork, validate?: boolean): Promise<Warp>;
62
126
  createFromTransactionHash(hash: string, cache?: WarpCacheConfig): Promise<Warp | null>;
63
127
  }
64
128
 
65
129
  declare class WarpMultiversxContractLoader {
66
130
  private readonly config;
67
- constructor(config: WarpInitConfig);
131
+ constructor(config: WarpClientConfig);
68
132
  getContract(address: string, chain: WarpChainInfo): Promise<WarpContract | null>;
69
133
  getVerificationInfo(address: string, chain: WarpChainInfo): Promise<WarpContractVerification | null>;
70
134
  }
71
135
 
136
+ declare class WarpMultiversxDataLoader implements AdapterWarpDataLoader {
137
+ private readonly config;
138
+ private readonly chain;
139
+ private cache;
140
+ constructor(config: WarpClientConfig, chain: WarpChainInfo);
141
+ getAccount(address: string): Promise<WarpChainAccount>;
142
+ getAccountAssets(address: string): Promise<WarpChainAsset[]>;
143
+ getAsset(identifier: string): Promise<WarpChainAsset | null>;
144
+ getAction(identifier: string, awaitCompleted?: boolean): Promise<WarpChainAction | null>;
145
+ getAccountActions(address: string, options?: WarpDataLoaderOptions): Promise<WarpChainAction[]>;
146
+ private toActionStatus;
147
+ private toActionCreatedAt;
148
+ }
149
+
72
150
  declare class WarpMultiversxExecutor implements AdapterWarpExecutor {
73
151
  private readonly config;
152
+ private readonly chain;
153
+ private readonly typeRegistry;
74
154
  private readonly serializer;
75
155
  private readonly abi;
76
- private readonly results;
77
- constructor(config: WarpInitConfig);
156
+ private readonly output;
157
+ constructor(config: WarpClientConfig, chain: WarpChainInfo, typeRegistry: AdapterTypeRegistry);
78
158
  createTransaction(executable: WarpExecutable): Promise<Transaction>;
79
159
  createTransferTransaction(executable: WarpExecutable): Promise<Transaction>;
80
160
  createContractCallTransaction(executable: WarpExecutable): Promise<Transaction>;
81
- executeQuery(executable: WarpExecutable): Promise<WarpExecution>;
82
- preprocessInput(chain: WarpChainInfo, input: string, type: WarpActionInputType, value: string): Promise<string>;
83
- static getChainEntrypoint(chainInfo: WarpChainInfo, env: WarpChainEnv): NetworkEntrypoint;
161
+ executeQuery(executable: WarpExecutable): Promise<WarpActionExecutionResult>;
162
+ private toTokenTransfers;
84
163
  }
85
164
 
86
165
  declare class WarpMultiversxExplorer implements AdapterWarpExplorer {
87
- private readonly chainInfo;
88
- constructor(chainInfo: WarpChainInfo);
89
- getAccountUrl(address: string): string;
90
- getTransactionUrl(hash: string): string;
166
+ private readonly chain;
167
+ private readonly config;
168
+ constructor(chain: WarpChain, config: WarpClientConfig);
169
+ private getExplorers;
170
+ private getPrimaryExplorer;
171
+ private getExplorerUrlByName;
172
+ getAccountUrl(address: string, explorer?: ExplorerName): string;
173
+ getTransactionUrl(hash: string, explorer?: ExplorerName): string;
174
+ getBlockUrl(blockNumber: string | number, explorer?: ExplorerName): string;
175
+ getAssetUrl(identifier: string, explorer?: ExplorerName): string;
176
+ getContractUrl(address: string, explorer?: ExplorerName): string;
177
+ getAllExplorers(): readonly ExplorerName[];
178
+ getExplorerByName(name: string): ExplorerName | undefined;
179
+ getAccountUrls(address: string): Record<ExplorerName, string>;
180
+ getTransactionUrls(hash: string): Record<ExplorerName, string>;
91
181
  }
92
182
 
93
183
  declare class WarpMultiversxRegistry implements AdapterWarpRegistry {
94
184
  private config;
185
+ private chain;
95
186
  private cache;
187
+ private userWallet;
96
188
  registryConfig: WarpRegistryConfigInfo;
97
- constructor(config: WarpInitConfig);
189
+ constructor(config: WarpClientConfig, chain: WarpChainInfo);
98
190
  init(): Promise<void>;
99
- createWarpRegisterTransaction(txHash: string, alias?: string | null, brand?: string | null): Transaction;
100
- createWarpUnregisterTransaction(txHash: string): Transaction;
101
- createWarpUpgradeTransaction(alias: string, txHash: string): Transaction;
102
- createWarpAliasSetTransaction(txHash: string, alias: string): Transaction;
103
- createWarpVerifyTransaction(txHash: string): Transaction;
104
- createWarpTransferOwnershipTransaction(txHash: string, newOwner: string): Transaction;
105
- createBrandRegisterTransaction(txHash: string): Transaction;
106
- createWarpBrandingTransaction(warpHash: string, brandHash: string): Transaction;
191
+ getRegistryConfig(): WarpRegistryConfigInfo;
192
+ createWarpRegisterTransaction(txHash: string, alias?: string | null, brand?: string | null): Promise<Transaction>;
193
+ createWarpUnregisterTransaction(txHash: string): Promise<Transaction>;
194
+ createWarpUpgradeTransaction(alias: string, txHash: string, brand?: string | null): Promise<Transaction>;
195
+ createWarpAliasSetTransaction(txHash: string, alias: string): Promise<Transaction>;
196
+ createWarpVerifyTransaction(txHash: string): Promise<Transaction>;
197
+ createWarpTransferOwnershipTransaction(txHash: string, newOwner: string): Promise<Transaction>;
198
+ createBrandRegisterTransaction(txHash: string): Promise<Transaction>;
199
+ createWarpBrandingTransaction(warpHash: string, brandHash: string): Promise<Transaction>;
107
200
  getInfoByAlias(alias: string, cache?: WarpCacheConfig): Promise<{
108
201
  registryInfo: WarpRegistryInfo | null;
109
202
  brand: WarpBrand | null;
@@ -114,34 +207,37 @@ declare class WarpMultiversxRegistry implements AdapterWarpRegistry {
114
207
  }>;
115
208
  getUserWarpRegistryInfos(user?: string): Promise<WarpRegistryInfo[]>;
116
209
  getUserBrands(user?: string): Promise<WarpBrand[]>;
117
- getChainInfos(cache?: WarpCacheConfig): Promise<WarpChainInfo[]>;
118
- getChainInfo(chain: WarpChain, cache?: WarpCacheConfig): Promise<WarpChainInfo | null>;
119
- setChain(info: WarpChainInfo): Promise<Transaction>;
120
- removeChain(chain: WarpChain): Promise<Transaction>;
121
210
  fetchBrand(hash: string, cache?: WarpCacheConfig): Promise<WarpBrand | null>;
122
- getRegistryContractAddress(): Address;
123
211
  private loadRegistryConfigs;
124
212
  private getFactory;
125
213
  private getController;
126
214
  private isCurrentUserAdmin;
127
215
  }
128
216
 
129
- declare class WarpMultiversxResults implements AdapterWarpResults {
217
+ declare class WarpMultiversxOutput implements AdapterWarpOutput {
130
218
  private readonly config;
219
+ private readonly chain;
220
+ private readonly typeRegistry;
131
221
  private readonly abi;
132
222
  private readonly serializer;
133
223
  private readonly cache;
134
- constructor(config: WarpInitConfig);
135
- getTransactionExecutionResults(warp: Warp, tx: TransactionOnNetwork): Promise<WarpExecution>;
136
- extractContractResults(warp: Warp, tx: TransactionOnNetwork, inputs: ResolvedInput[]): Promise<{
137
- values: any[];
138
- results: WarpExecutionResults;
224
+ constructor(config: WarpClientConfig, chain: WarpChainInfo, typeRegistry: AdapterTypeRegistry$1);
225
+ getActionExecution(warp: Warp, actionIndex: WarpActionIndex, tx: WarpAdapterGenericRemoteTransaction): Promise<WarpActionExecutionResult>;
226
+ extractContractOutput(warp: Warp, actionIndex: WarpActionIndex, tx: TransactionOnNetwork, inputs: ResolvedInput[]): Promise<{
227
+ values: {
228
+ string: string[];
229
+ native: any[];
230
+ };
231
+ output: WarpExecutionOutput;
139
232
  }>;
140
- extractQueryResults(warp: Warp, typedValues: TypedValue[], actionIndex: number, inputs: ResolvedInput[]): Promise<{
141
- values: any[];
142
- results: WarpExecutionResults;
233
+ extractQueryOutput(warp: Warp, typedValues: TypedValue[], actionIndex: number, inputs: ResolvedInput[]): Promise<{
234
+ values: {
235
+ string: string[];
236
+ native: any[];
237
+ };
238
+ output: WarpExecutionOutput;
143
239
  }>;
144
- resolveWarpResultsRecursively(props: {
240
+ resolveWarpOutputRecursively(props: {
145
241
  warp: Warp;
146
242
  entryActionIndex: number;
147
243
  executor: {
@@ -155,13 +251,41 @@ declare class WarpMultiversxResults implements AdapterWarpResults {
155
251
 
156
252
  declare class WarpMultiversxSerializer implements AdapterWarpSerializer {
157
253
  readonly coreSerializer: WarpSerializer;
158
- constructor();
254
+ constructor(options?: {
255
+ typeRegistry?: AdapterTypeRegistry;
256
+ });
159
257
  typedToString(value: TypedValue): string;
160
258
  typedToNative(value: TypedValue): [WarpActionInputType, WarpNativeValue];
161
259
  nativeToTyped(type: WarpActionInputType, value: WarpNativeValue): TypedValue;
162
260
  nativeToType(type: BaseWarpActionInputType): WarpAdapterGenericType;
163
261
  stringToTyped(value: string): TypedValue;
262
+ private splitTupleStrings;
164
263
  typeToString(type: Type): WarpActionInputType;
165
264
  }
166
265
 
167
- export { WarpMultiversxAbi, WarpMultiversxBrandBuilder, WarpMultiversxBuilder, WarpMultiversxConstants, WarpMultiversxContractLoader, WarpMultiversxExecutor, WarpMultiversxExplorer, WarpMultiversxRegistry, WarpMultiversxResults, WarpMultiversxSerializer, address_value, biguint_value, boolean_value, codemeta_value, composite_value, esdt_value, getMultiversxAdapter, hex_value, list_value, nothing_value, option_value, optional_value, string_value, token_value, u16_value, u32_value, u64_value, u8_value, variadic_value };
266
+ declare class WarpMultiversxWallet implements AdapterWarpWallet {
267
+ private config;
268
+ private chain;
269
+ private entry;
270
+ private provider;
271
+ private cache;
272
+ constructor(config: WarpClientConfig, chain: WarpChainInfo);
273
+ signTransaction(tx: WarpAdapterGenericTransaction): Promise<WarpAdapterGenericTransaction>;
274
+ signTransactions(txs: WarpAdapterGenericTransaction[]): Promise<WarpAdapterGenericTransaction[]>;
275
+ signMessage(message: string): Promise<string>;
276
+ sendTransactions(txs: WarpAdapterGenericTransaction[]): Promise<string[]>;
277
+ sendTransaction(tx: WarpAdapterGenericTransaction): Promise<string>;
278
+ create(mnemonic: string): {
279
+ address: string;
280
+ privateKey: string;
281
+ mnemonic: string;
282
+ };
283
+ generate(): {
284
+ address: string;
285
+ privateKey: string;
286
+ mnemonic: string;
287
+ };
288
+ getAddress(): string | null;
289
+ }
290
+
291
+ export { type ExplorerName, ExplorerUrls, KnownTokens, MultiversxExplorers, MultiversxExplorersConfig, NativeTokenEgld, NativeTokenVibe, VibechainExplorers, WarpMultiversxAbiBuilder, WarpMultiversxBrandBuilder, WarpMultiversxBuilder, WarpMultiversxConstants, WarpMultiversxContractLoader, WarpMultiversxDataLoader, WarpMultiversxExecutor, WarpMultiversxExplorer, WarpMultiversxInputTypes, WarpMultiversxOutput, WarpMultiversxRegistry, WarpMultiversxSerializer, WarpMultiversxWallet, address_value, asset_value, biguint_value, boolean_value, codemeta, codemeta_value, composite_value, createMultiversxAdapter, findKnownTokenById, getAllMultiversxAdapters, getAllMultiversxChainNames, getKnownTokensForChain, getMultiversxAdapter, getMultiversxEntrypoint, getMultiversxRegistryAddress, getNormalizedTokenIdentifier, getVibechainAdapter, hex_value, isNativeToken, list, list_value, nothing_value, option_value, optional, optional_value, string_value, toTypedConfigInfo, toTypedRegistryInfo, token, token_value, u16_value, u32_value, u64_value, u8_value, variadic_value };