@vleap/warps 3.0.0-alpha.9 → 3.0.0-alpha.91

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/index.d.ts CHANGED
@@ -1,75 +1,285 @@
1
- import { Transaction, TransactionOnNetwork, Address, TokenTransfer as TokenTransfer$1, AbiRegistry, NetworkEntrypoint } from '@multiversx/sdk-core';
2
- import { TypedValue, Type, OptionValue, OptionalValue, List, VariadicValue, CompositeValue, StringValue, U8Value, U16Value, U32Value, U64Value, BigUIntValue, BooleanValue, AddressValue, TokenIdentifierValue, BytesValue, TokenTransfer, Struct, CodeMetadataValue, NothingValue, Transaction as Transaction$1, Address as Address$1 } from '@multiversx/sdk-core/out';
3
1
  import QRCodeStyling from 'qr-code-styling';
4
2
 
5
- declare const CacheTtl: {
6
- OneMinute: number;
7
- OneHour: number;
8
- OneDay: number;
9
- OneWeek: number;
10
- OneMonth: number;
11
- OneYear: number;
3
+ type WarpBrand = {
4
+ protocol: string;
5
+ name: string;
6
+ description: string;
7
+ logo: string;
8
+ urls?: WarpBrandUrls;
9
+ colors?: WarpBrandColors;
10
+ cta?: WarpBrandCta;
11
+ meta?: WarpBrandMeta;
12
12
  };
13
- declare const CacheKey: {
14
- Warp: (id: string) => string;
15
- WarpAbi: (id: string) => string;
16
- LastWarpExecutionInputs: (id: string, action: number) => string;
17
- RegistryInfo: (id: string) => string;
18
- Brand: (hash: string) => string;
19
- ChainInfo: (chain: WarpChain) => string;
20
- ChainInfos: () => string;
13
+ type WarpBrandUrls = {
14
+ web?: string;
21
15
  };
22
- type CacheType = 'memory' | 'localStorage';
23
- declare class WarpCache {
24
- private strategy;
25
- constructor(type?: CacheType);
26
- private selectStrategy;
27
- set<T>(key: string, value: T, ttl: number): void;
28
- get<T>(key: string): T | null;
29
- forget(key: string): void;
30
- clear(): void;
31
- }
16
+ type WarpBrandColors = {
17
+ primary?: string;
18
+ secondary?: string;
19
+ };
20
+ type WarpBrandCta = {
21
+ title: string;
22
+ description: string;
23
+ label: string;
24
+ url: string;
25
+ };
26
+ type WarpBrandMeta = {
27
+ hash: string;
28
+ creator: string;
29
+ createdAt: string;
30
+ };
31
+
32
+ type ClientCacheConfig = {
33
+ ttl?: number;
34
+ type?: WarpCacheType;
35
+ };
36
+ type WarpCacheType = 'memory' | 'localStorage';
32
37
 
33
38
  type WarpChainEnv = 'mainnet' | 'testnet' | 'devnet';
34
39
  type ProtocolName = 'warp' | 'brand' | 'abi';
35
40
 
36
- type WarpChain = string;
37
- type WarpInitConfig = {
41
+ type WarpTrustStatus = 'unverified' | 'verified' | 'blacklisted';
42
+ type WarpRegistryInfo = {
43
+ hash: string;
44
+ alias: string | null;
45
+ trust: WarpTrustStatus;
46
+ owner: string;
47
+ createdAt: number;
48
+ upgradedAt: number;
49
+ brand: string | null;
50
+ upgrade: string | null;
51
+ };
52
+ type WarpRegistryConfigInfo = {
53
+ unitPrice: bigint;
54
+ admins: string[];
55
+ };
56
+
57
+ type WarpExecution = {
58
+ success: boolean;
59
+ warp: Warp;
60
+ action: number;
61
+ user: string | null;
62
+ txHash: string | null;
63
+ tx: WarpAdapterGenericTransaction | null;
64
+ next: WarpExecutionNextInfo | null;
65
+ values: any[];
66
+ valuesRaw: any[];
67
+ results: WarpExecutionResults;
68
+ messages: WarpExecutionMessages;
69
+ };
70
+ type WarpExecutionNextInfo = {
71
+ identifier: string | null;
72
+ url: string;
73
+ }[];
74
+ type WarpExecutionResults = Record<WarpResultName, any | null>;
75
+ type WarpExecutionMessages = Record<WarpMessageName, string | null>;
76
+
77
+ type ClientIndexConfig = {
78
+ url?: string;
79
+ apiKey?: string;
80
+ searchParamName?: string;
81
+ };
82
+ type WarpSearchResult = {
83
+ hits: WarpSearchHit[];
84
+ };
85
+ type WarpSearchHit = {
86
+ hash: string;
87
+ alias: string;
88
+ name: string;
89
+ title: string;
90
+ description: string;
91
+ preview: string;
92
+ status: string;
93
+ category: string;
94
+ featured: boolean;
95
+ };
96
+
97
+ interface TransformRunner {
98
+ run(code: string, context: any): Promise<any>;
99
+ }
100
+ type ClientTransformConfig = {
101
+ runner?: TransformRunner | null;
102
+ };
103
+
104
+ type WarpUserWallets = Record<WarpChain, string | null>;
105
+ type WarpProviderConfig = Record<WarpChainEnv, string>;
106
+ type WarpClientConfig = {
38
107
  env: WarpChainEnv;
39
108
  clientUrl?: string;
40
109
  currentUrl?: string;
41
110
  vars?: Record<string, string | number>;
42
111
  user?: {
43
- wallet?: string;
112
+ wallets?: WarpUserWallets;
113
+ };
114
+ preferences?: {
115
+ explorers?: Record<WarpChain, WarpExplorerName>;
44
116
  };
117
+ providers?: Record<WarpChain, WarpProviderConfig>;
45
118
  schema?: {
46
119
  warp?: string;
47
120
  brand?: string;
48
121
  };
49
- cache?: {
50
- ttl?: number;
51
- type?: CacheType;
52
- };
53
- registry?: {
54
- contract?: string;
55
- };
56
- index?: {
57
- url?: string;
58
- apiKey?: string;
59
- searchParamName?: string;
60
- };
122
+ cache?: ClientCacheConfig;
123
+ transform?: ClientTransformConfig;
124
+ index?: ClientIndexConfig;
61
125
  };
62
126
  type WarpCacheConfig = {
63
127
  ttl?: number;
64
128
  };
129
+ type AdapterFactory = (config: WarpClientConfig, fallback?: Adapter) => Adapter;
130
+ type Adapter = {
131
+ chainInfo: WarpChainInfo;
132
+ prefix: string;
133
+ builder: () => CombinedWarpBuilder;
134
+ executor: AdapterWarpExecutor;
135
+ results: AdapterWarpResults;
136
+ serializer: AdapterWarpSerializer;
137
+ registry: AdapterWarpRegistry;
138
+ explorer: AdapterWarpExplorer;
139
+ abiBuilder: () => AdapterWarpAbiBuilder;
140
+ brandBuilder: () => AdapterWarpBrandBuilder;
141
+ dataLoader: AdapterWarpDataLoader;
142
+ registerTypes?: (typeRegistry: WarpTypeRegistry) => void;
143
+ };
144
+ type WarpAdapterGenericTransaction = any;
145
+ type WarpAdapterGenericRemoteTransaction = any;
146
+ type WarpAdapterGenericValue = any;
147
+ type WarpAdapterGenericType = any;
148
+ interface WarpTypeHandler {
149
+ stringToNative(value: string): any;
150
+ nativeToString(value: any): string;
151
+ }
152
+ interface WarpTypeRegistry {
153
+ registerType(typeName: string, handler: WarpTypeHandler): void;
154
+ hasType(typeName: string): boolean;
155
+ getHandler(typeName: string): WarpTypeHandler | undefined;
156
+ getRegisteredTypes(): string[];
157
+ }
158
+ interface BaseWarpBuilder {
159
+ createFromRaw(encoded: string): Promise<Warp>;
160
+ createFromUrl(url: string): Promise<Warp>;
161
+ setName(name: string): BaseWarpBuilder;
162
+ setTitle(title: string): BaseWarpBuilder;
163
+ setDescription(description: string): BaseWarpBuilder;
164
+ setPreview(preview: string): BaseWarpBuilder;
165
+ setActions(actions: WarpAction[]): BaseWarpBuilder;
166
+ addAction(action: WarpAction): BaseWarpBuilder;
167
+ build(): Promise<Warp>;
168
+ }
169
+ interface AdapterWarpBuilder {
170
+ createInscriptionTransaction(warp: Warp): WarpAdapterGenericTransaction;
171
+ createFromTransaction(tx: WarpAdapterGenericTransaction, validate?: boolean): Promise<Warp>;
172
+ createFromTransactionHash(hash: string, cache?: WarpCacheConfig): Promise<Warp | null>;
173
+ }
174
+ type CombinedWarpBuilder = AdapterWarpBuilder & BaseWarpBuilder;
175
+ interface AdapterWarpAbiBuilder {
176
+ createFromRaw(encoded: string): Promise<any>;
177
+ createFromTransaction(tx: WarpAdapterGenericTransaction): Promise<any>;
178
+ createFromTransactionHash(hash: string, cache?: WarpCacheConfig): Promise<any | null>;
179
+ }
180
+ interface AdapterWarpBrandBuilder {
181
+ createInscriptionTransaction(brand: WarpBrand): WarpAdapterGenericTransaction;
182
+ createFromTransaction(tx: WarpAdapterGenericTransaction, validate?: boolean): Promise<WarpBrand>;
183
+ createFromTransactionHash(hash: string, cache?: WarpCacheConfig): Promise<WarpBrand | null>;
184
+ }
185
+ interface AdapterWarpExecutor {
186
+ createTransaction(executable: WarpExecutable): Promise<WarpAdapterGenericTransaction>;
187
+ executeQuery(executable: WarpExecutable): Promise<WarpExecution>;
188
+ preprocessInput(chain: WarpChainInfo, input: string, type: WarpActionInputType, value: string): Promise<string>;
189
+ signMessage(message: string, privateKey: string): Promise<string>;
190
+ }
191
+ interface AdapterWarpResults {
192
+ getTransactionExecutionResults(warp: Warp, tx: WarpAdapterGenericRemoteTransaction): Promise<WarpExecution>;
193
+ }
194
+ interface AdapterWarpSerializer {
195
+ typedToString(value: WarpAdapterGenericValue): string;
196
+ typedToNative(value: WarpAdapterGenericValue): [WarpActionInputType, WarpNativeValue];
197
+ nativeToTyped(type: WarpActionInputType, value: WarpNativeValue): WarpAdapterGenericValue;
198
+ nativeToType(type: BaseWarpActionInputType): WarpAdapterGenericType;
199
+ stringToTyped(value: string): WarpAdapterGenericValue;
200
+ }
201
+ interface AdapterWarpRegistry {
202
+ init(): Promise<void>;
203
+ getRegistryConfig(): WarpRegistryConfigInfo;
204
+ createWarpRegisterTransaction(txHash: string, alias?: string | null, brand?: string | null): Promise<WarpAdapterGenericTransaction>;
205
+ createWarpUnregisterTransaction(txHash: string): Promise<WarpAdapterGenericTransaction>;
206
+ createWarpUpgradeTransaction(alias: string, txHash: string): Promise<WarpAdapterGenericTransaction>;
207
+ createWarpAliasSetTransaction(txHash: string, alias: string): Promise<WarpAdapterGenericTransaction>;
208
+ createWarpVerifyTransaction(txHash: string): Promise<WarpAdapterGenericTransaction>;
209
+ createWarpTransferOwnershipTransaction(txHash: string, newOwner: string): Promise<WarpAdapterGenericTransaction>;
210
+ createBrandRegisterTransaction(txHash: string): Promise<WarpAdapterGenericTransaction>;
211
+ createWarpBrandingTransaction(warpHash: string, brandHash: string): Promise<WarpAdapterGenericTransaction>;
212
+ getInfoByAlias(alias: string, cache?: WarpCacheConfig): Promise<{
213
+ registryInfo: WarpRegistryInfo | null;
214
+ brand: WarpBrand | null;
215
+ }>;
216
+ getInfoByHash(hash: string, cache?: WarpCacheConfig): Promise<{
217
+ registryInfo: WarpRegistryInfo | null;
218
+ brand: WarpBrand | null;
219
+ }>;
220
+ getUserWarpRegistryInfos(user?: string): Promise<WarpRegistryInfo[]>;
221
+ getUserBrands(user?: string): Promise<WarpBrand[]>;
222
+ fetchBrand(hash: string, cache?: WarpCacheConfig): Promise<WarpBrand | null>;
223
+ }
224
+ interface AdapterWarpExplorer {
225
+ getAccountUrl(address: string): string;
226
+ getTransactionUrl(hash: string): string;
227
+ getAssetUrl(identifier: string): string;
228
+ getContractUrl(address: string): string;
229
+ }
230
+ interface WarpDataLoaderOptions {
231
+ page?: number;
232
+ size?: number;
233
+ }
234
+ interface AdapterWarpDataLoader {
235
+ getAccount(address: string): Promise<WarpChainAccount>;
236
+ getAccountAssets(address: string): Promise<WarpChainAsset[]>;
237
+ getAsset(identifier: string): Promise<WarpChainAsset | null>;
238
+ getAction(identifier: string, awaitCompleted?: boolean): Promise<WarpChainAction | null>;
239
+ getAccountActions(address: string, options?: WarpDataLoaderOptions): Promise<WarpChainAction[]>;
240
+ }
241
+
242
+ type WarpChainAccount = {
243
+ chain: WarpChain;
244
+ address: string;
245
+ balance: bigint;
246
+ };
247
+ type WarpChainAssetValue = {
248
+ identifier: string;
249
+ amount: bigint;
250
+ };
251
+ type WarpChainAsset = {
252
+ chain: WarpChain;
253
+ identifier: string;
254
+ name: string;
255
+ amount?: bigint;
256
+ decimals?: number;
257
+ logoUrl?: string;
258
+ };
259
+ type WarpChainAction = {
260
+ chain: WarpChain;
261
+ id: string;
262
+ sender: string;
263
+ receiver: string;
264
+ value: bigint;
265
+ function: string;
266
+ status: WarpChainActionStatus;
267
+ createdAt: string;
268
+ error?: string | null;
269
+ tx?: WarpAdapterGenericRemoteTransaction | null;
270
+ };
271
+ type WarpChainActionStatus = 'pending' | 'success' | 'failed';
272
+
273
+ type WarpChain = string;
274
+ type WarpExplorerName = string;
65
275
  type WarpChainInfo = {
66
- name: WarpChain;
276
+ name: string;
67
277
  displayName: string;
68
278
  chainId: string;
69
279
  blockTime: number;
70
280
  addressHrp: string;
71
- apiUrl: string;
72
- explorerUrl: string;
281
+ defaultApiUrl: string;
282
+ nativeToken: WarpChainAsset;
73
283
  };
74
284
  type WarpIdType = 'hash' | 'alias';
75
285
  type WarpVarPlaceholder = string;
@@ -91,11 +301,13 @@ type Warp = {
91
301
  meta?: WarpMeta;
92
302
  };
93
303
  type WarpMeta = {
304
+ chain: WarpChain;
94
305
  hash: string;
95
306
  creator: string;
96
307
  createdAt: string;
97
308
  };
98
309
  type WarpAction = WarpTransferAction | WarpContractAction | WarpQueryAction | WarpCollectAction | WarpLinkAction;
310
+ type WarpActionIndex = number;
99
311
  type WarpActionType = 'transfer' | 'contract' | 'query' | 'collect' | 'link';
100
312
  type WarpTransferAction = {
101
313
  type: WarpActionType;
@@ -105,7 +317,7 @@ type WarpTransferAction = {
105
317
  address?: string;
106
318
  data?: string;
107
319
  value?: string;
108
- transfers?: WarpContractActionTransfer[];
320
+ transfers?: string[];
109
321
  inputs?: WarpActionInput[];
110
322
  next?: string;
111
323
  };
@@ -114,29 +326,24 @@ type WarpContractAction = {
114
326
  chain?: WarpChain;
115
327
  label: string;
116
328
  description?: string | null;
117
- address: string;
118
- func: string | null;
119
- args: string[];
329
+ address?: string;
330
+ func?: string | null;
331
+ args?: string[];
120
332
  value?: string;
121
333
  gasLimit: number;
122
- transfers?: WarpContractActionTransfer[];
334
+ transfers?: string[];
123
335
  abi?: string;
124
336
  inputs?: WarpActionInput[];
125
337
  next?: string;
126
338
  };
127
- type WarpContractActionTransfer = {
128
- token: string;
129
- nonce?: number;
130
- amount?: string;
131
- };
132
339
  type WarpQueryAction = {
133
340
  type: WarpActionType;
134
341
  chain?: WarpChain;
135
342
  label: string;
136
343
  description?: string | null;
137
- address: string;
138
- func: string;
139
- args: string[];
344
+ address?: string;
345
+ func?: string;
346
+ args?: string[];
140
347
  abi?: string;
141
348
  inputs?: WarpActionInput[];
142
349
  next?: string;
@@ -163,9 +370,10 @@ type WarpLinkAction = {
163
370
  inputs?: WarpActionInput[];
164
371
  };
165
372
  type WarpActionInputSource = 'field' | 'query' | 'user:wallet';
166
- type BaseWarpActionInputType = 'string' | 'uint8' | 'uint16' | 'uint32' | 'uint64' | 'biguint' | 'bool' | 'address' | 'token' | 'codemeta' | 'hex' | 'esdt' | 'nft';
373
+ type BaseWarpActionInputType = 'string' | 'uint8' | 'uint16' | 'uint32' | 'uint64' | 'uint128' | 'uint256' | 'biguint' | 'bool' | 'address' | 'hex' | string;
167
374
  type WarpActionInputType = string;
168
- type WarpActionInputPosition = 'receiver' | 'value' | 'transfer' | `arg:${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10}` | 'data';
375
+ type WarpNativeValue = string | number | bigint | boolean | WarpChainAssetValue | null | WarpNativeValue[];
376
+ type WarpActionInputPosition = 'receiver' | 'value' | 'transfer' | `arg:${1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10}` | 'data' | 'chain';
169
377
  type WarpActionInputModifier = 'scale';
170
378
  type WarpActionInput = {
171
379
  name: string;
@@ -184,6 +392,7 @@ type WarpActionInput = {
184
392
  [key: string]: string;
185
393
  };
186
394
  modifier?: string;
395
+ default?: string | number | boolean;
187
396
  };
188
397
  type ResolvedInput = {
189
398
  input: WarpActionInput;
@@ -198,8 +407,19 @@ type WarpContractVerification = {
198
407
  codeHash: string;
199
408
  abi: object;
200
409
  };
410
+ type WarpExecutable = {
411
+ chain: WarpChainInfo;
412
+ warp: Warp;
413
+ action: number;
414
+ destination: string;
415
+ args: string[];
416
+ value: bigint;
417
+ transfers: WarpChainAssetValue[];
418
+ data: string | null;
419
+ resolvedInputs: ResolvedInput[];
420
+ };
201
421
 
202
- type WarpWarpAbi = {
422
+ type WarpAbi = {
203
423
  protocol: string;
204
424
  content: WarpAbiContents;
205
425
  meta?: WarpMeta;
@@ -213,149 +433,24 @@ type WarpAbiContents = {
213
433
  events?: any[];
214
434
  };
215
435
 
216
- type Brand = {
217
- protocol: string;
218
- name: string;
219
- description: string;
220
- logo: string;
221
- urls?: BrandUrls;
222
- colors?: BrandColors;
223
- cta?: BrandCta;
224
- meta?: BrandMeta;
225
- };
226
- type BrandUrls = {
227
- web?: string;
228
- };
229
- type BrandColors = {
230
- primary?: string;
231
- secondary?: string;
232
- };
233
- type BrandCta = {
234
- title: string;
235
- description: string;
236
- label: string;
237
- url: string;
238
- };
239
- type BrandMeta = {
240
- hash: string;
241
- creator: string;
242
- createdAt: string;
243
- };
244
-
245
- type WarpTrustStatus = 'unverified' | 'verified' | 'blacklisted';
246
- type WarpRegistryInfo = {
247
- hash: string;
248
- alias: string | null;
249
- trust: WarpTrustStatus;
250
- owner: string;
251
- createdAt: number;
252
- upgradedAt: number;
253
- brand: string | null;
254
- upgrade: string | null;
255
- };
256
- type WarpRegistryConfigInfo = {
257
- unitPrice: bigint;
258
- admins: string[];
259
- };
260
-
261
- type WarpExecution = {
262
- success: boolean;
263
- warp: Warp;
264
- action: number;
265
- user: string | null;
266
- txHash: string | null;
267
- next: WarpExecutionNextInfo | null;
268
- values: any[];
269
- results: WarpExecutionResults;
270
- messages: WarpExecutionMessages;
271
- };
272
- type WarpExecutionNextInfo = {
273
- identifier: string | null;
274
- url: string;
275
- }[];
276
- type WarpExecutionResults = Record<WarpResultName, any | null>;
277
- type WarpExecutionMessages = Record<WarpMessageName, string | null>;
278
-
279
- type WarpSearchResult = {
280
- hits: WarpSearchHit[];
281
- };
282
- type WarpSearchHit = {
283
- hash: string;
284
- alias: string;
285
- name: string;
286
- title: string;
287
- description: string;
288
- preview: string;
289
- status: string;
290
- category: string;
291
- featured: boolean;
292
- };
293
-
294
- declare class BrandBuilder {
295
- private config;
296
- private pendingBrand;
297
- constructor(config: WarpInitConfig);
298
- createInscriptionTransaction(brand: Brand): Transaction;
299
- createFromRaw(encoded: string, validateSchema?: boolean): Promise<Brand>;
300
- createFromTransaction(tx: TransactionOnNetwork, validateSchema?: boolean): Promise<Brand>;
301
- createFromTransactionHash(hash: string): Promise<Brand | null>;
302
- setName(name: string): BrandBuilder;
303
- setDescription(description: string): BrandBuilder;
304
- setLogo(logo: string): BrandBuilder;
305
- setUrls(urls: BrandUrls): BrandBuilder;
306
- setColors(colors: BrandColors): BrandBuilder;
307
- setCta(cta: BrandCta): BrandBuilder;
308
- build(): Promise<Brand>;
309
- private ensure;
310
- private ensureValidSchema;
436
+ declare enum WarpChainName {
437
+ Multiversx = "multiversx",
438
+ Vibechain = "vibechain",
439
+ Sui = "sui",
440
+ Ethereum = "ethereum",
441
+ Base = "base",
442
+ Arbitrum = "arbitrum",
443
+ Fastset = "fastset"
311
444
  }
312
-
313
- declare const WarpProtocolVersions: {
314
- Warp: string;
315
- Brand: string;
316
- Abi: string;
317
- };
318
- declare const WarpConfig: {
319
- LatestWarpSchemaUrl: string;
320
- LatestBrandSchemaUrl: string;
321
- DefaultClientUrl: (env: WarpChainEnv) => "https://usewarp.to" | "https://testnet.usewarp.to" | "https://devnet.usewarp.to";
322
- SuperClientUrls: string[];
323
- MainChain: {
324
- Name: string;
325
- DisplayName: string;
326
- ApiUrl: (env: WarpChainEnv) => "https://devnet-api.multiversx.com" | "https://testnet-api.multiversx.com" | "https://api.multiversx.com";
327
- ExplorerUrl: (env: WarpChainEnv) => "https://devnet-explorer.multiversx.com" | "https://testnet-explorer.multiversx.com" | "https://explorer.multiversx.com";
328
- BlockTime: (env: WarpChainEnv) => number;
329
- AddressHrp: string;
330
- ChainId: (env: WarpChainEnv) => "D" | "T" | "1";
331
- };
332
- Registry: {
333
- Contract: (env: WarpChainEnv) => "erd1qqqqqqqqqqqqqpgqje2f99vr6r7sk54thg03c9suzcvwr4nfl3tsfkdl36" | "####" | "erd1qqqqqqqqqqqqqpgq3mrpj3u6q7tejv6d7eqhnyd27n9v5c5tl3ts08mffe";
334
- };
335
- AvailableActionInputSources: WarpActionInputSource[];
336
- AvailableActionInputTypes: WarpActionInputType[];
337
- AvailableActionInputPositions: WarpActionInputPosition[];
338
- };
339
-
340
- type InterpolationBag = {
341
- config: WarpInitConfig;
342
- chain: WarpChainInfo;
343
- };
344
- declare class WarpInterpolator {
345
- static apply(config: WarpInitConfig, warp: Warp): Promise<Warp>;
346
- static applyGlobals(config: WarpInitConfig, warp: Warp): Promise<Warp>;
347
- static applyVars(config: WarpInitConfig, warp: Warp): Warp;
348
- private static applyRootGlobals;
349
- private static applyActionGlobals;
350
- }
351
-
352
445
  declare const WarpConstants: {
353
446
  HttpProtocolPrefix: string;
354
447
  IdentifierParamName: string;
355
- IdentifierParamSeparator: string;
448
+ IdentifierParamSeparator: string[];
449
+ IdentifierParamSeparatorDefault: string;
450
+ IdentifierChainDefault: string;
356
451
  IdentifierType: {
357
- Alias: string;
358
- Hash: string;
452
+ Alias: WarpIdType;
453
+ Hash: WarpIdType;
359
454
  };
360
455
  Source: {
361
456
  UserWallet: string;
@@ -363,13 +458,13 @@ declare const WarpConstants: {
363
458
  Globals: {
364
459
  UserWallet: {
365
460
  Placeholder: string;
366
- Accessor: (bag: InterpolationBag) => string | undefined;
461
+ Accessor: (bag: InterpolationBag) => string | null | undefined;
367
462
  };
368
463
  ChainApiUrl: {
369
464
  Placeholder: string;
370
465
  Accessor: (bag: InterpolationBag) => string;
371
466
  };
372
- ChainExplorerUrl: {
467
+ ChainAddressHrp: {
373
468
  Placeholder: string;
374
469
  Accessor: (bag: InterpolationBag) => string;
375
470
  };
@@ -383,103 +478,197 @@ declare const WarpConstants: {
383
478
  Transform: {
384
479
  Prefix: string;
385
480
  };
386
- Egld: {
387
- Identifier: string;
388
- EsdtIdentifier: string;
389
- DisplayName: string;
390
- Decimals: number;
391
- };
392
481
  };
482
+ declare const WarpInputTypes: {
483
+ Option: string;
484
+ Optional: string;
485
+ List: string;
486
+ Variadic: string;
487
+ Composite: string;
488
+ String: string;
489
+ U8: string;
490
+ U16: string;
491
+ U32: string;
492
+ U64: string;
493
+ U128: string;
494
+ U256: string;
495
+ Biguint: string;
496
+ Boolean: string;
497
+ Address: string;
498
+ Asset: string;
499
+ Hex: string;
500
+ };
501
+
502
+ type InterpolationBag = {
503
+ config: WarpClientConfig;
504
+ chain: WarpChainName;
505
+ chainInfo: WarpChainInfo;
506
+ };
507
+
508
+ declare const WarpProtocolVersions: {
509
+ Warp: string;
510
+ Brand: string;
511
+ Abi: string;
512
+ };
513
+ declare const WarpConfig: {
514
+ LatestWarpSchemaUrl: string;
515
+ LatestBrandSchemaUrl: string;
516
+ DefaultClientUrl: (env: WarpChainEnv) => "https://usewarp.to" | "https://testnet.usewarp.to" | "https://devnet.usewarp.to";
517
+ DefaultChainPrefix: string;
518
+ SuperClientUrls: string[];
519
+ AvailableActionInputSources: WarpActionInputSource[];
520
+ AvailableActionInputTypes: WarpActionInputType[];
521
+ AvailableActionInputPositions: WarpActionInputPosition[];
522
+ };
523
+
524
+ interface CryptoProvider {
525
+ getRandomBytes(size: number): Promise<Uint8Array>;
526
+ }
527
+ declare class BrowserCryptoProvider implements CryptoProvider {
528
+ getRandomBytes(size: number): Promise<Uint8Array>;
529
+ }
530
+ declare class NodeCryptoProvider implements CryptoProvider {
531
+ getRandomBytes(size: number): Promise<Uint8Array>;
532
+ }
533
+ declare function getCryptoProvider(): CryptoProvider;
534
+ declare function setCryptoProvider(provider: CryptoProvider): void;
535
+ declare function getRandomBytes(size: number, cryptoProvider?: CryptoProvider): Promise<Uint8Array>;
536
+ declare function bytesToHex(bytes: Uint8Array): string;
537
+ declare function bytesToBase64(bytes: Uint8Array): string;
538
+ declare function getRandomHex(length: number, cryptoProvider?: CryptoProvider): Promise<string>;
539
+ declare function testCryptoAvailability(): Promise<{
540
+ randomBytes: boolean;
541
+ environment: 'browser' | 'nodejs' | 'unknown';
542
+ }>;
543
+ declare function createCryptoProvider(): CryptoProvider;
393
544
 
394
- declare const getMainChainInfo: (config: WarpInitConfig) => WarpChainInfo;
395
- declare const getChainExplorerUrl: (chain: WarpChainInfo, path?: string) => string;
545
+ declare const findWarpAdapterForChain: (chain: WarpChain, adapters: Adapter[]) => Adapter;
546
+ declare const findWarpAdapterByPrefix: (prefix: string, adapters: Adapter[]) => Adapter;
396
547
  declare const getLatestProtocolIdentifier: (name: ProtocolName) => string;
397
548
  declare const getWarpActionByIndex: (warp: Warp, index: number) => WarpAction;
398
- declare const toTypedChainInfo: (chainInfo: any) => WarpChainInfo;
399
- declare const shiftBigintBy: (value: bigint | string, decimals: number) => bigint;
549
+ declare const findWarpExecutableAction: (warp: Warp) => {
550
+ action: WarpAction;
551
+ actionIndex: WarpActionIndex;
552
+ };
553
+ declare const shiftBigintBy: (value: bigint | string | number, decimals: number) => bigint;
400
554
  declare const toPreviewText: (text: string, maxChars?: number) => string;
401
555
  declare const replacePlaceholders: (message: string, bag: Record<string, any>) => string;
556
+ declare const applyResultsToMessages: (warp: Warp, results: Record<string, any>) => Record<string, string>;
402
557
 
403
- declare const option: (value: TypedValue | null, type?: Type) => OptionValue;
404
- declare const optional: (value: TypedValue | null, type?: Type) => OptionalValue;
405
- declare const list: (values: TypedValue[]) => List;
406
- declare const variadic: (values: TypedValue[]) => VariadicValue;
407
- declare const composite: (values: TypedValue[]) => CompositeValue;
408
- declare const string: (value: string) => StringValue;
409
- declare const u8: (value: number) => U8Value;
410
- declare const u16: (value: number) => U16Value;
411
- declare const u32: (value: number) => U32Value;
412
- declare const u64: (value: bigint) => U64Value;
413
- declare const biguint: (value: bigint | string | number) => BigUIntValue;
414
- declare const boolean: (value: boolean) => BooleanValue;
415
- declare const address: (value: string) => AddressValue;
416
- declare const token: (value: string) => TokenIdentifierValue;
417
- declare const hex: (value: string) => BytesValue;
418
- declare const esdt: (value: TokenTransfer) => Struct;
419
- declare const codemeta: (hexString: string) => CodeMetadataValue;
420
- declare const nothing: () => NothingValue;
421
-
422
- declare class WarpAbiBuilder {
423
- private config;
424
- private cache;
425
- constructor(config: WarpInitConfig);
426
- createInscriptionTransaction(abi: WarpAbiContents): Transaction;
427
- createFromRaw(encoded: string): Promise<WarpWarpAbi>;
428
- createFromTransaction(tx: TransactionOnNetwork): Promise<WarpWarpAbi>;
429
- createFromTransactionHash(hash: string, cache?: WarpCacheConfig): Promise<WarpWarpAbi | null>;
430
- }
558
+ declare const getWarpInfoFromIdentifier: (prefixedIdentifier: string) => {
559
+ chainPrefix: string;
560
+ type: WarpIdType;
561
+ identifier: string;
562
+ identifierBase: string;
563
+ } | null;
564
+ declare const extractIdentifierInfoFromUrl: (url: string) => {
565
+ chainPrefix: string;
566
+ type: WarpIdType;
567
+ identifier: string;
568
+ identifierBase: string;
569
+ } | null;
431
570
 
432
- type TxComponents = {
433
- destination: Address;
434
- args: string[];
435
- value: bigint;
436
- transfers: TokenTransfer$1[];
437
- data: Buffer | null;
438
- resolvedInputs: ResolvedInput[];
439
- };
440
- declare class WarpActionExecutor {
441
- private config;
442
- private url;
443
- private serializer;
444
- private contractLoader;
445
- private cache;
446
- constructor(config: WarpInitConfig);
447
- createTransactionForExecute(warp: Warp, actionIndex: number, inputs: string[]): Promise<Transaction>;
448
- getTransactionExecutionResults(warp: Warp, actionIndex: number, tx: TransactionOnNetwork): Promise<WarpExecution>;
449
- executeQuery(warp: Warp, actionIndex: number, inputs: string[]): Promise<WarpExecution>;
450
- executeCollect(warp: Warp, actionIndex: number, inputs: string[], meta?: Record<string, any>): Promise<WarpExecution>;
451
- getTxComponentsFromInputs(chain: WarpChainInfo, action: WarpTransferAction | WarpContractAction | WarpQueryAction, inputs: string[], sender?: Address): Promise<TxComponents>;
452
- getResolvedInputs(chain: WarpChainInfo, action: WarpAction, inputArgs: string[]): Promise<ResolvedInput[]>;
453
- getModifiedInputs(inputs: ResolvedInput[]): ResolvedInput[];
454
- preprocessInput(chain: WarpChainInfo, input: string): Promise<string>;
455
- getAbiForAction(action: WarpContractAction | WarpQueryAction): Promise<AbiRegistry>;
456
- private getPreparedArgs;
457
- private getPreparedMessages;
458
- private fetchAbi;
459
- private toTypedTransfer;
460
- }
571
+ declare const getNextInfo: (config: WarpClientConfig, adapters: Adapter[], warp: Warp, actionIndex: number, results: WarpExecutionResults) => WarpExecutionNextInfo | null;
461
572
 
462
- type WarpNativeValue = string | number | bigint | boolean | null | TokenTransfer | WarpNativeValue[];
463
- declare class WarpArgSerializer {
464
- nativeToString(type: WarpActionInputType, value: WarpNativeValue): string;
465
- typedToString(value: TypedValue): string;
466
- typedToNative(value: TypedValue): [WarpActionInputType, WarpNativeValue];
467
- nativeToTyped(type: WarpActionInputType, value: WarpNativeValue): TypedValue;
468
- nativeToType(type: BaseWarpActionInputType): Type;
469
- stringToNative(value: string): [WarpActionInputType, WarpNativeValue];
470
- stringToTyped(value: string): TypedValue;
471
- typeToString(type: Type): WarpActionInputType;
573
+ declare const getProviderUrl: (config: WarpClientConfig, chain: WarpChain, env: WarpChainEnv, defaultProvider: string) => string;
574
+ declare const getProviderConfig: (config: WarpClientConfig, chain: WarpChain) => WarpProviderConfig | undefined;
575
+
576
+ declare const extractCollectResults: (warp: Warp, response: any, actionIndex: number, inputs: ResolvedInput[], transformRunner?: TransformRunner | null) => Promise<{
577
+ values: any[];
578
+ results: WarpExecutionResults;
579
+ }>;
580
+ declare const evaluateResultsCommon: (warp: Warp, baseResults: WarpExecutionResults, actionIndex: number, inputs: ResolvedInput[], transformRunner?: TransformRunner | null) => Promise<WarpExecutionResults>;
581
+ /**
582
+ * Parses out[N] notation and returns the action index (1-based) or null if invalid.
583
+ * Also handles plain "out" which defaults to action index 1.
584
+ */
585
+ declare const parseResultsOutIndex: (resultPath: string) => number | null;
586
+
587
+ /**
588
+ * Signing utilities for creating and validating signed messages
589
+ * Works with any crypto provider or uses automatic detection
590
+ */
591
+
592
+ interface SignableMessage {
593
+ wallet: string;
594
+ nonce: string;
595
+ expiresAt: string;
596
+ purpose: string;
472
597
  }
598
+ type HttpAuthHeaders = Record<string, string> & {
599
+ 'X-Signer-Wallet': string;
600
+ 'X-Signer-Signature': string;
601
+ 'X-Signer-Nonce': string;
602
+ 'X-Signer-ExpiresAt': string;
603
+ };
604
+ /**
605
+ * Creates a signable message with standard security fields
606
+ * This can be used for any type of proof or authentication
607
+ */
608
+ declare function createSignableMessage(walletAddress: string, purpose: string, cryptoProvider?: CryptoProvider, expiresInMinutes?: number): Promise<{
609
+ message: string;
610
+ nonce: string;
611
+ expiresAt: string;
612
+ }>;
613
+ /**
614
+ * Creates a signable message for HTTP authentication
615
+ * This is a convenience function that uses the standard format
616
+ */
617
+ declare function createAuthMessage(walletAddress: string, appName: string, cryptoProvider?: CryptoProvider, purpose?: string): Promise<{
618
+ message: string;
619
+ nonce: string;
620
+ expiresAt: string;
621
+ }>;
622
+ /**
623
+ * Creates HTTP authentication headers from a signature
624
+ */
625
+ declare function createAuthHeaders(walletAddress: string, signature: string, nonce: string, expiresAt: string): HttpAuthHeaders;
626
+ /**
627
+ * Creates HTTP authentication headers for a wallet using the provided signing function
628
+ */
629
+ declare function createHttpAuthHeaders(walletAddress: string, signMessage: (message: string) => Promise<string>, appName: string, cryptoProvider?: CryptoProvider): Promise<HttpAuthHeaders>;
630
+ /**
631
+ * Validates a signed message by checking expiration
632
+ */
633
+ declare function validateSignedMessage(expiresAt: string): boolean;
634
+ /**
635
+ * Parses a signed message to extract its components
636
+ */
637
+ declare function parseSignedMessage(message: string): SignableMessage;
473
638
 
474
- declare class WarpBuilder {
639
+ declare const string: (value: string) => string;
640
+ declare const u8: (value: number) => string;
641
+ declare const u16: (value: number) => string;
642
+ declare const u32: (value: number) => string;
643
+ declare const u64: (value: bigint | number) => string;
644
+ declare const biguint: (value: bigint | string | number) => string;
645
+ declare const boolean: (value: boolean) => string;
646
+ declare const address: (value: string) => string;
647
+ declare const asset: (value: WarpChainAsset) => string;
648
+ declare const hex: (value: string) => string;
649
+
650
+ declare class WarpBrandBuilder {
475
651
  private config;
476
- private cache;
652
+ private pendingBrand;
653
+ constructor(config: WarpClientConfig);
654
+ createFromRaw(encoded: string, validateSchema?: boolean): Promise<WarpBrand>;
655
+ setName(name: string): WarpBrandBuilder;
656
+ setDescription(description: string): WarpBrandBuilder;
657
+ setLogo(logo: string): WarpBrandBuilder;
658
+ setUrls(urls: WarpBrandUrls): WarpBrandBuilder;
659
+ setColors(colors: WarpBrandColors): WarpBrandBuilder;
660
+ setCta(cta: WarpBrandCta): WarpBrandBuilder;
661
+ build(): Promise<WarpBrand>;
662
+ private ensure;
663
+ private ensureValidSchema;
664
+ }
665
+
666
+ declare class WarpBuilder implements BaseWarpBuilder {
667
+ protected readonly config: WarpClientConfig;
477
668
  private pendingWarp;
478
- constructor(config: WarpInitConfig);
479
- createInscriptionTransaction(warp: Warp): Transaction;
669
+ constructor(config: WarpClientConfig);
480
670
  createFromRaw(encoded: string, validate?: boolean): Promise<Warp>;
481
- createFromTransaction(tx: TransactionOnNetwork, validate?: boolean): Promise<Warp>;
482
- createFromTransactionHash(hash: string, cache?: WarpCacheConfig): Promise<Warp | null>;
671
+ createFromUrl(url: string): Promise<Warp>;
483
672
  setName(name: string): WarpBuilder;
484
673
  setTitle(title: string): WarpBuilder;
485
674
  setDescription(description: string): WarpBuilder;
@@ -492,25 +681,95 @@ declare class WarpBuilder {
492
681
  private validate;
493
682
  }
494
683
 
495
- declare class WarpContractLoader {
496
- private readonly config;
497
- constructor(config: WarpInitConfig);
498
- getContract(address: string, chain: WarpChainInfo): Promise<WarpContract | null>;
499
- getVerificationInfo(address: string, chain: WarpChainInfo): Promise<WarpContractVerification | null>;
684
+ declare const CacheTtl: {
685
+ OneMinute: number;
686
+ OneHour: number;
687
+ OneDay: number;
688
+ OneWeek: number;
689
+ OneMonth: number;
690
+ OneYear: number;
691
+ };
692
+ declare const WarpCacheKey: {
693
+ Warp: (env: WarpChainEnv, id: string) => string;
694
+ WarpAbi: (env: WarpChainEnv, id: string) => string;
695
+ WarpExecutable: (env: WarpChainEnv, id: string, action: number) => string;
696
+ RegistryInfo: (env: WarpChainEnv, id: string) => string;
697
+ Brand: (env: WarpChainEnv, hash: string) => string;
698
+ };
699
+ declare class WarpCache {
700
+ private strategy;
701
+ constructor(type?: WarpCacheType);
702
+ private selectStrategy;
703
+ set<T>(key: string, value: T, ttl: number): void;
704
+ get<T>(key: string): T | null;
705
+ forget(key: string): void;
706
+ clear(): void;
707
+ }
708
+
709
+ type ExecutionHandlers = {
710
+ onExecuted?: (result: WarpExecution) => void;
711
+ onError?: (params: {
712
+ message: string;
713
+ }) => void;
714
+ onSignRequest?: (params: {
715
+ message: string;
716
+ chain: WarpChainInfo;
717
+ }) => Promise<string>;
718
+ };
719
+ declare class WarpExecutor {
720
+ private config;
721
+ private adapters;
722
+ private handlers?;
723
+ private factory;
724
+ private serializer;
725
+ constructor(config: WarpClientConfig, adapters: Adapter[], handlers?: ExecutionHandlers | undefined);
726
+ execute(warp: Warp, inputs: string[]): Promise<{
727
+ tx: WarpAdapterGenericTransaction | null;
728
+ chain: WarpChainInfo | null;
729
+ }>;
730
+ evaluateResults(warp: Warp, chain: WarpChain, tx: WarpAdapterGenericRemoteTransaction): Promise<void>;
731
+ private executeCollect;
732
+ }
733
+
734
+ declare class WarpFactory {
735
+ private config;
736
+ private adapters;
737
+ private url;
738
+ private serializer;
739
+ private cache;
740
+ constructor(config: WarpClientConfig, adapters: Adapter[]);
741
+ createExecutable(warp: Warp, actionIndex: number, inputs: string[]): Promise<WarpExecutable>;
742
+ getChainInfoForAction(action: WarpAction, inputs?: string[]): Promise<WarpChainInfo>;
743
+ getResolvedInputs(chain: WarpChain, action: WarpAction, inputArgs: string[]): Promise<ResolvedInput[]>;
744
+ getModifiedInputs(inputs: ResolvedInput[]): ResolvedInput[];
745
+ preprocessInput(chain: WarpChain, input: string): Promise<string>;
746
+ private getPreparedArgs;
747
+ private tryGetChainFromInputs;
500
748
  }
501
749
 
502
750
  declare class WarpIndex {
503
751
  private config;
504
- constructor(config: WarpInitConfig);
752
+ constructor(config: WarpClientConfig);
505
753
  search(query: string, params?: Record<string, any>, headers?: Record<string, string>): Promise<WarpSearchHit[]>;
506
754
  }
507
755
 
756
+ declare class WarpLinkBuilder {
757
+ private readonly config;
758
+ private readonly adapters;
759
+ constructor(config: WarpClientConfig, adapters: Adapter[]);
760
+ isValid(url: string): boolean;
761
+ build(chain: WarpChain, type: WarpIdType, id: string): string;
762
+ buildFromPrefixedIdentifier(identifier: string): string | null;
763
+ generateQrCode(chain: WarpChain, type: WarpIdType, id: string, size?: number, background?: string, color?: string, logoColor?: string): QRCodeStyling;
764
+ }
765
+
508
766
  type DetectionResult = {
509
767
  match: boolean;
510
768
  url: string;
511
769
  warp: Warp | null;
770
+ chain: WarpChain | null;
512
771
  registryInfo: WarpRegistryInfo | null;
513
- brand: Brand | null;
772
+ brand: WarpBrand | null;
514
773
  };
515
774
  type DetectionResultFromHtml = {
516
775
  match: boolean;
@@ -519,63 +778,78 @@ type DetectionResultFromHtml = {
519
778
  warp: Warp;
520
779
  }[];
521
780
  };
522
- declare class WarpLink {
781
+ declare class WarpLinkDetecter {
523
782
  private config;
524
- constructor(config: WarpInitConfig);
783
+ private adapters;
784
+ constructor(config: WarpClientConfig, adapters: Adapter[]);
525
785
  isValid(url: string): boolean;
526
786
  detectFromHtml(content: string): Promise<DetectionResultFromHtml>;
527
787
  detect(url: string, cache?: WarpCacheConfig): Promise<DetectionResult>;
528
- build(type: WarpIdType, id: string): string;
529
- buildFromPrefixedIdentifier(prefixedIdentifier: string): string;
530
- generateQrCode(type: WarpIdType, id: string, size?: number, background?: string, color?: string, logoColor?: string): QRCodeStyling;
531
- private extractIdentifierInfoFromUrl;
532
788
  }
533
789
 
534
- declare class WarpRegistry {
535
- private config;
536
- private cache;
537
- registryConfig: WarpRegistryConfigInfo;
538
- constructor(config: WarpInitConfig);
539
- init(): Promise<void>;
540
- createWarpRegisterTransaction(txHash: string, alias?: string | null, brand?: string | null): Transaction$1;
541
- createWarpUnregisterTransaction(txHash: string): Transaction$1;
542
- createWarpUpgradeTransaction(alias: string, txHash: string): Transaction$1;
543
- createWarpAliasSetTransaction(txHash: string, alias: string): Transaction$1;
544
- createWarpVerifyTransaction(txHash: string): Transaction$1;
545
- createWarpTransferOwnershipTransaction(txHash: string, newOwner: string): Transaction$1;
546
- createBrandRegisterTransaction(txHash: string): Transaction$1;
547
- createWarpBrandingTransaction(warpHash: string, brandHash: string): Transaction$1;
548
- getInfoByAlias(alias: string, cache?: WarpCacheConfig): Promise<{
549
- registryInfo: WarpRegistryInfo | null;
550
- brand: Brand | null;
551
- }>;
552
- getInfoByHash(hash: string, cache?: WarpCacheConfig): Promise<{
553
- registryInfo: WarpRegistryInfo | null;
554
- brand: Brand | null;
790
+ declare class WarpClient {
791
+ private readonly config;
792
+ private adapters;
793
+ constructor(config: WarpClientConfig, adapters: Adapter[]);
794
+ getConfig(): WarpClientConfig;
795
+ getAdapters(): Adapter[];
796
+ addAdapter(adapter: Adapter): WarpClient;
797
+ createExecutor(handlers?: ExecutionHandlers): WarpExecutor;
798
+ detectWarp(urlOrId: string, cache?: WarpCacheConfig): Promise<DetectionResult>;
799
+ executeWarp(identifier: string, inputs: string[], handlers?: ExecutionHandlers, options?: {
800
+ cache?: WarpCacheConfig;
801
+ }): Promise<{
802
+ tx: WarpAdapterGenericTransaction | null;
803
+ chain: WarpChainInfo | null;
804
+ evaluateResults: (remoteTx: WarpAdapterGenericRemoteTransaction) => Promise<void>;
555
805
  }>;
556
- getUserWarpRegistryInfos(user?: string): Promise<WarpRegistryInfo[]>;
557
- getUserBrands(user?: string): Promise<Brand[]>;
558
- getChainInfos(cache?: WarpCacheConfig): Promise<WarpChainInfo[]>;
559
- getChainInfo(chain: WarpChain, cache?: WarpCacheConfig): Promise<WarpChainInfo | null>;
560
- fetchBrand(hash: string, cache?: WarpCacheConfig): Promise<Brand | null>;
561
- getRegistryContractAddress(): Address$1;
562
- private loadRegistryConfigs;
563
- private getFactory;
564
- private getController;
565
- private isCurrentUserAdmin;
566
- }
567
-
568
- declare class WarpUtils {
569
- static getInfoFromPrefixedIdentifier(prefixedIdentifier: string): {
570
- type: WarpIdType;
571
- identifier: string;
572
- identifierBase: string;
573
- } | null;
574
- static getNextInfo(config: WarpInitConfig, warp: Warp, actionIndex: number, results: WarpExecutionResults): WarpExecutionNextInfo | null;
575
- private static buildNextUrl;
576
- private static getNestedValue;
577
- static getChainInfoForAction(config: WarpInitConfig, action: WarpAction): Promise<WarpChainInfo>;
578
- static getChainEntrypoint(chainInfo: WarpChainInfo, env: WarpChainEnv): NetworkEntrypoint;
806
+ createInscriptionTransaction(chain: WarpChain, warp: Warp): WarpAdapterGenericTransaction;
807
+ createFromTransaction(chain: WarpChain, tx: WarpAdapterGenericRemoteTransaction, validate?: boolean): Promise<Warp>;
808
+ createFromTransactionHash(hash: string, cache?: WarpCacheConfig): Promise<Warp | null>;
809
+ signMessage(chain: WarpChain, message: string, privateKey: string): Promise<string>;
810
+ getExplorer(chain: WarpChain): AdapterWarpExplorer;
811
+ getResults(chain: WarpChain): AdapterWarpResults;
812
+ getRegistry(chain: WarpChain): Promise<AdapterWarpRegistry>;
813
+ getDataLoader(chain: WarpChain): AdapterWarpDataLoader;
814
+ get factory(): WarpFactory;
815
+ get index(): WarpIndex;
816
+ get linkBuilder(): WarpLinkBuilder;
817
+ createBuilder(chain: WarpChain): CombinedWarpBuilder;
818
+ createAbiBuilder(chain: WarpChain): AdapterWarpAbiBuilder;
819
+ createBrandBuilder(chain: WarpChain): AdapterWarpBrandBuilder;
820
+ }
821
+
822
+ declare class WarpInterpolator {
823
+ private config;
824
+ private adapter;
825
+ constructor(config: WarpClientConfig, adapter: Adapter);
826
+ apply(config: WarpClientConfig, warp: Warp): Promise<Warp>;
827
+ applyGlobals(config: WarpClientConfig, warp: Warp): Promise<Warp>;
828
+ applyVars(config: WarpClientConfig, warp: Warp): Warp;
829
+ private applyRootGlobals;
830
+ private applyActionGlobals;
831
+ }
832
+
833
+ declare class WarpLogger {
834
+ private static isTestEnv;
835
+ static info(...args: any[]): void;
836
+ static warn(...args: any[]): void;
837
+ static error(...args: any[]): void;
838
+ }
839
+
840
+ declare class WarpSerializer {
841
+ private typeRegistry;
842
+ setTypeRegistry(typeRegistry: WarpTypeRegistry): void;
843
+ nativeToString(type: WarpActionInputType, value: WarpNativeValue): string;
844
+ stringToNative(value: string): [WarpActionInputType, WarpNativeValue];
845
+ }
846
+
847
+ declare class WarpTypeRegistryImpl implements WarpTypeRegistry {
848
+ private typeHandlers;
849
+ registerType(typeName: string, handler: WarpTypeHandler): void;
850
+ hasType(typeName: string): boolean;
851
+ getHandler(typeName: string): WarpTypeHandler | undefined;
852
+ getRegisteredTypes(): string[];
579
853
  }
580
854
 
581
855
  type ValidationResult = {
@@ -585,7 +859,7 @@ type ValidationResult = {
585
859
  type ValidationError = string;
586
860
  declare class WarpValidator {
587
861
  private config;
588
- constructor(config: WarpInitConfig);
862
+ constructor(config: WarpClientConfig);
589
863
  validate(warp: Warp): Promise<ValidationResult>;
590
864
  private validateMaxOneValuePosition;
591
865
  private validateVariableNamesAndResultNamesUppercase;
@@ -593,4 +867,4 @@ declare class WarpValidator {
593
867
  private validateSchema;
594
868
  }
595
869
 
596
- export { type BaseWarpActionInputType, type Brand, BrandBuilder, type BrandColors, type BrandCta, type BrandMeta, type BrandUrls, CacheKey, CacheTtl, type CacheType, type InterpolationBag, type ProtocolName, type ResolvedInput, type Warp, WarpAbiBuilder, type WarpAbiContents, type WarpAction, WarpActionExecutor, type WarpActionInput, type WarpActionInputModifier, type WarpActionInputPosition, type WarpActionInputSource, type WarpActionInputType, type WarpActionType, WarpArgSerializer, WarpBuilder, WarpCache, type WarpCacheConfig, type WarpChain, type WarpChainEnv, type WarpChainInfo, type WarpCollectAction, WarpConfig, WarpConstants, type WarpContract, type WarpContractAction, type WarpContractActionTransfer, WarpContractLoader, type WarpContractVerification, type WarpExecution, type WarpExecutionMessages, type WarpExecutionNextInfo, type WarpExecutionResults, type WarpIdType, WarpIndex, type WarpInitConfig, WarpInterpolator, WarpLink, type WarpLinkAction, type WarpMessageName, type WarpMeta, type WarpNativeValue, WarpProtocolVersions, type WarpQueryAction, WarpRegistry, type WarpRegistryConfigInfo, type WarpRegistryInfo, type WarpResultName, type WarpResulutionPath, type WarpSearchHit, type WarpSearchResult, type WarpTransferAction, type WarpTrustStatus, WarpUtils, WarpValidator, type WarpVarPlaceholder, type WarpWarpAbi, address, biguint, boolean, codemeta, composite, esdt, getChainExplorerUrl, getLatestProtocolIdentifier, getMainChainInfo, getWarpActionByIndex, hex, list, nothing, option, optional, replacePlaceholders, shiftBigintBy, string, toPreviewText, toTypedChainInfo, token, u16, u32, u64, u8, variadic };
870
+ export { type Adapter, type AdapterFactory, type AdapterWarpAbiBuilder, type AdapterWarpBrandBuilder, type AdapterWarpBuilder, type AdapterWarpDataLoader, type AdapterWarpExecutor, type AdapterWarpExplorer, type AdapterWarpRegistry, type AdapterWarpResults, type AdapterWarpSerializer, type BaseWarpActionInputType, type BaseWarpBuilder, BrowserCryptoProvider, CacheTtl, type ClientIndexConfig, type ClientTransformConfig, type CombinedWarpBuilder, type CryptoProvider, type DetectionResult, type DetectionResultFromHtml, type ExecutionHandlers, type HttpAuthHeaders, type InterpolationBag, NodeCryptoProvider, type ProtocolName, type ResolvedInput, type SignableMessage, type TransformRunner, type Warp, type WarpAbi, type WarpAbiContents, type WarpAction, type WarpActionIndex, type WarpActionInput, type WarpActionInputModifier, type WarpActionInputPosition, type WarpActionInputSource, type WarpActionInputType, type WarpActionType, type WarpAdapterGenericRemoteTransaction, type WarpAdapterGenericTransaction, type WarpAdapterGenericType, type WarpAdapterGenericValue, type WarpBrand, WarpBrandBuilder, type WarpBrandColors, type WarpBrandCta, type WarpBrandMeta, type WarpBrandUrls, WarpBuilder, WarpCache, type WarpCacheConfig, WarpCacheKey, type WarpChain, type WarpChainAccount, type WarpChainAction, type WarpChainActionStatus, type WarpChainAsset, type WarpChainAssetValue, type WarpChainEnv, type WarpChainInfo, WarpChainName, WarpClient, type WarpClientConfig, type WarpCollectAction, WarpConfig, WarpConstants, type WarpContract, type WarpContractAction, type WarpContractVerification, type WarpDataLoaderOptions, type WarpExecutable, type WarpExecution, type WarpExecutionMessages, type WarpExecutionNextInfo, type WarpExecutionResults, WarpExecutor, type WarpExplorerName, WarpFactory, type WarpIdType, WarpIndex, WarpInputTypes, WarpInterpolator, type WarpLinkAction, WarpLinkBuilder, WarpLinkDetecter, WarpLogger, type WarpMessageName, type WarpMeta, type WarpNativeValue, WarpProtocolVersions, type WarpProviderConfig, type WarpQueryAction, type WarpRegistryConfigInfo, type WarpRegistryInfo, type WarpResultName, type WarpResulutionPath, type WarpSearchHit, type WarpSearchResult, WarpSerializer, type WarpTransferAction, type WarpTrustStatus, type WarpTypeHandler, type WarpTypeRegistry, WarpTypeRegistryImpl, type WarpUserWallets, WarpValidator, type WarpVarPlaceholder, address, applyResultsToMessages, asset, biguint, boolean, bytesToBase64, bytesToHex, createAuthHeaders, createAuthMessage, createCryptoProvider, createHttpAuthHeaders, createSignableMessage, evaluateResultsCommon, extractCollectResults, extractIdentifierInfoFromUrl, findWarpAdapterByPrefix, findWarpAdapterForChain, findWarpExecutableAction, getCryptoProvider, getLatestProtocolIdentifier, getNextInfo, getProviderConfig, getProviderUrl, getRandomBytes, getRandomHex, getWarpActionByIndex, getWarpInfoFromIdentifier, hex, parseResultsOutIndex, parseSignedMessage, replacePlaceholders, setCryptoProvider, shiftBigintBy, string, testCryptoAvailability, toPreviewText, u16, u32, u64, u8, validateSignedMessage };