@joai/warps 3.2.6 → 3.3.1

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.cts CHANGED
@@ -1,87 +1,8 @@
1
1
  import QRCodeStyling from 'qr-code-styling';
2
2
 
3
- declare enum WarpChainName {
4
- Multiversx = "multiversx",
5
- Claws = "claws",
6
- Sui = "sui",
7
- Ethereum = "ethereum",
8
- Base = "base",
9
- Arbitrum = "arbitrum",
10
- Polygon = "polygon",
11
- Somnia = "somnia",
12
- Fastset = "fastset",
13
- Solana = "solana",
14
- Near = "near"
15
- }
16
- declare const EvmWalletChainNames: WarpChainName[];
17
- declare const WarpConstants: {
18
- HttpProtocolPrefix: string;
19
- IdentifierParamName: string;
20
- IdentifierParamSeparator: string;
21
- IdentifierChainDefault: WarpChainName;
22
- IdentifierType: {
23
- Alias: WarpIdentifierType;
24
- Hash: WarpIdentifierType;
25
- };
26
- IdentifierAliasMarker: string;
27
- Globals: {
28
- UserWallet: {
29
- Placeholder: string;
30
- Accessor: (bag: InterpolationBag) => string | null;
31
- };
32
- UserWalletPublicKey: {
33
- Placeholder: string;
34
- Accessor: (bag: InterpolationBag) => string | null;
35
- };
36
- ChainApiUrl: {
37
- Placeholder: string;
38
- Accessor: (bag: InterpolationBag) => string;
39
- };
40
- ChainAddressHrp: {
41
- Placeholder: string;
42
- Accessor: (bag: InterpolationBag) => string;
43
- };
44
- };
45
- Vars: {
46
- Query: string;
47
- Env: string;
48
- };
49
- ArgParamsSeparator: string;
50
- ArgCompositeSeparator: string;
51
- ArgListSeparator: string;
52
- ArgStructSeparator: string;
53
- Transform: {
54
- Prefix: string;
55
- };
56
- Source: {
57
- UserWallet: string;
58
- };
59
- Position: {
60
- Payload: string;
61
- };
62
- Alerts: {
63
- TriggerEventPrefix: string;
64
- };
65
- };
66
- declare const WarpInputTypes: {
67
- Option: string;
68
- Vector: string;
69
- Tuple: string;
70
- Struct: string;
71
- String: string;
72
- Uint8: string;
73
- Uint16: string;
74
- Uint32: string;
75
- Uint64: string;
76
- Uint128: string;
77
- Uint256: string;
78
- Biguint: string;
79
- Bool: string;
80
- Address: string;
81
- Asset: string;
82
- Hex: string;
83
- };
84
- declare const safeWindow: Window;
3
+ type WarpChainEnv = 'mainnet' | 'testnet' | 'devnet';
4
+ type WarpTheme = 'light' | 'dark';
5
+ type ProtocolName = 'warp' | 'brand' | 'abi';
85
6
 
86
7
  type WarpLocale = 'en' | 'es' | 'fr' | 'de' | 'it' | 'pt' | 'ru' | 'zh' | 'ja' | 'ko' | 'ar' | 'hi' | 'nl' | 'sv' | 'da' | 'no' | 'fi' | 'pl' | 'tr' | 'el' | 'he' | 'th' | 'vi' | 'id' | 'ms' | 'tl' | string;
87
8
  type WarpText = string | WarpI18nText;
@@ -89,20 +10,6 @@ type WarpI18nText = {
89
10
  [language: string]: string;
90
11
  };
91
12
 
92
- type WarpAlertName = string;
93
- type WarpAlert = {
94
- label: WarpText;
95
- trigger: string;
96
- subject: WarpText;
97
- body: WarpText;
98
- action?: string;
99
- };
100
- type WarpAlerts = Record<WarpAlertName, WarpAlert>;
101
-
102
- type WarpChainEnv = 'mainnet' | 'testnet' | 'devnet';
103
- type WarpTheme = 'light' | 'dark';
104
- type ProtocolName = 'warp' | 'brand' | 'abi';
105
-
106
13
  type WarpBrand = {
107
14
  protocol: string;
108
15
  name: WarpText;
@@ -136,6 +43,42 @@ type ClientCacheConfig = {
136
43
  };
137
44
  type WarpCacheType = 'memory' | 'localStorage' | 'static' | 'filesystem';
138
45
 
46
+ type WarpChainAccount = {
47
+ chain: WarpChainName;
48
+ address: string;
49
+ balance: bigint;
50
+ };
51
+ type WarpChainAssetValue = {
52
+ identifier: string;
53
+ amount: bigint;
54
+ };
55
+ type WarpChainAssetLogoThemed = Record<WarpTheme, string>;
56
+ type WarpChainAssetLogo = string | WarpChainAssetLogoThemed | null;
57
+ type WarpChainAsset = {
58
+ chain: WarpChainName;
59
+ identifier: string;
60
+ name: string;
61
+ symbol: string;
62
+ amount?: bigint;
63
+ decimals?: number;
64
+ logoUrl?: WarpChainAssetLogo;
65
+ price?: number;
66
+ supply?: bigint;
67
+ };
68
+ type WarpChainAction = {
69
+ chain: WarpChainName;
70
+ id: string;
71
+ sender: string;
72
+ receiver: string;
73
+ value: bigint;
74
+ function: string;
75
+ status: WarpChainActionStatus;
76
+ createdAt: string;
77
+ error?: string | null;
78
+ tx?: WarpAdapterGenericRemoteTransaction | null;
79
+ };
80
+ type WarpChainActionStatus = 'pending' | 'success' | 'failed';
81
+
139
82
  type WarpActionExecutionStatus = 'success' | 'error' | 'unhandled';
140
83
  type WarpActionExecutionResult = {
141
84
  status: WarpActionExecutionStatus;
@@ -396,41 +339,99 @@ interface AdapterWarpWallet {
396
339
  registerX402Handlers?(client: unknown): Promise<Record<string, () => void>>;
397
340
  }
398
341
 
399
- type WarpChainAccount = {
400
- chain: WarpChainName;
401
- address: string;
402
- balance: bigint;
403
- };
404
- type WarpChainAssetValue = {
405
- identifier: string;
406
- amount: bigint;
342
+ declare enum WarpChainName {
343
+ Multiversx = "multiversx",
344
+ Claws = "claws",
345
+ Sui = "sui",
346
+ Ethereum = "ethereum",
347
+ Base = "base",
348
+ Arbitrum = "arbitrum",
349
+ Polygon = "polygon",
350
+ Somnia = "somnia",
351
+ Fastset = "fastset",
352
+ Solana = "solana",
353
+ Near = "near"
354
+ }
355
+ declare const EvmWalletChainNames: WarpChainName[];
356
+ declare const CLOUD_WALLET_PROVIDERS: WarpWalletProvider[];
357
+ declare const WarpConstants: {
358
+ HttpProtocolPrefix: string;
359
+ IdentifierParamName: string;
360
+ IdentifierParamSeparator: string;
361
+ IdentifierChainDefault: WarpChainName;
362
+ IdentifierType: {
363
+ Alias: WarpIdentifierType;
364
+ Hash: WarpIdentifierType;
365
+ };
366
+ IdentifierAliasMarker: string;
367
+ Globals: {
368
+ UserWallet: {
369
+ Placeholder: string;
370
+ Accessor: (bag: InterpolationBag) => string | null;
371
+ };
372
+ UserWalletPublicKey: {
373
+ Placeholder: string;
374
+ Accessor: (bag: InterpolationBag) => string | null;
375
+ };
376
+ ChainApiUrl: {
377
+ Placeholder: string;
378
+ Accessor: (bag: InterpolationBag) => string;
379
+ };
380
+ ChainAddressHrp: {
381
+ Placeholder: string;
382
+ Accessor: (bag: InterpolationBag) => string;
383
+ };
384
+ };
385
+ Vars: {
386
+ Query: string;
387
+ Env: string;
388
+ };
389
+ ArgParamsSeparator: string;
390
+ ArgCompositeSeparator: string;
391
+ ArgListSeparator: string;
392
+ ArgStructSeparator: string;
393
+ Transform: {
394
+ Prefix: string;
395
+ };
396
+ Source: {
397
+ UserWallet: string;
398
+ };
399
+ Position: {
400
+ Payload: string;
401
+ };
402
+ Alerts: {
403
+ TriggerEventPrefix: string;
404
+ };
407
405
  };
408
- type WarpChainAssetLogoThemed = Record<WarpTheme, string>;
409
- type WarpChainAssetLogo = string | WarpChainAssetLogoThemed | null;
410
- type WarpChainAsset = {
411
- chain: WarpChainName;
412
- identifier: string;
413
- name: string;
414
- symbol: string;
415
- amount?: bigint;
416
- decimals?: number;
417
- logoUrl?: WarpChainAssetLogo;
418
- price?: number;
419
- supply?: bigint;
406
+ declare const WarpInputTypes: {
407
+ Option: string;
408
+ Vector: string;
409
+ Tuple: string;
410
+ Struct: string;
411
+ String: string;
412
+ Uint8: string;
413
+ Uint16: string;
414
+ Uint32: string;
415
+ Uint64: string;
416
+ Uint128: string;
417
+ Uint256: string;
418
+ Biguint: string;
419
+ Bool: string;
420
+ Address: string;
421
+ Asset: string;
422
+ Hex: string;
420
423
  };
421
- type WarpChainAction = {
422
- chain: WarpChainName;
423
- id: string;
424
- sender: string;
425
- receiver: string;
426
- value: bigint;
427
- function: string;
428
- status: WarpChainActionStatus;
429
- createdAt: string;
430
- error?: string | null;
431
- tx?: WarpAdapterGenericRemoteTransaction | null;
424
+ declare const safeWindow: Window;
425
+
426
+ type WarpAlertName = string;
427
+ type WarpAlert = {
428
+ label: WarpText;
429
+ trigger: string;
430
+ subject: WarpText;
431
+ body: WarpText;
432
+ action?: string;
432
433
  };
433
- type WarpChainActionStatus = 'pending' | 'success' | 'failed';
434
+ type WarpAlerts = Record<WarpAlertName, WarpAlert>;
434
435
 
435
436
  type WarpExplorerName = string;
436
437
  type WarpChainInfoLogoThemed = Record<WarpTheme, string>;
@@ -915,6 +916,22 @@ declare function validateSignedMessage(expiresAt: string): boolean;
915
916
  */
916
917
  declare function parseSignedMessage(message: string): SignableMessage;
917
918
 
919
+ type GeneratedSourceType = 'abi' | 'openapi';
920
+ type GeneratedSourceInfo = {
921
+ type: GeneratedSourceType;
922
+ url?: string | null;
923
+ contract?: string | null;
924
+ };
925
+ type GeneratedWarpNameLike = {
926
+ name?: unknown;
927
+ title?: unknown;
928
+ };
929
+ declare const getGeneratedSourceWarpName: (warp: GeneratedWarpNameLike) => string;
930
+ declare const buildGeneratedSourceWarpIdentifier: (source: GeneratedSourceInfo, operationKey: string, displayName?: string) => string;
931
+ declare const buildGeneratedFallbackWarpIdentifier: (warp: GeneratedWarpNameLike) => string;
932
+ declare const stampGeneratedWarpMeta: (warp: Warp, defaultChain: WarpChainName, identifier?: string, fallbackName?: string) => void;
933
+ declare const isGeneratedSourcePrivateIdentifier: (identifier?: string | null) => boolean;
934
+
918
935
  declare const getWalletFromConfigOrFail: (config: WarpClientConfig, chain: WarpChainName) => string | WarpWalletDetails;
919
936
  declare const getWarpWalletAddress: (wallet: WarpWalletDetails | string | null | undefined) => string | null;
920
937
  declare const getWarpWalletAddressFromConfig: (config: WarpClientConfig, chain: WarpChainName) => string | null;
@@ -1279,4 +1296,4 @@ declare class WarpValidator {
1279
1296
  private validateSchema;
1280
1297
  }
1281
1298
 
1282
- export { type AdapterTypeRegistry, type AdapterWarpAbiBuilder, type AdapterWarpBrandBuilder, type AdapterWarpBuilder, type AdapterWarpDataLoader, type AdapterWarpExecutor, type AdapterWarpExplorer, type AdapterWarpOutput, type AdapterWarpRegistry, type AdapterWarpSerializer, type AdapterWarpWallet, type BaseWarpActionInputType, type BaseWarpBuilder, BrowserCryptoProvider, CacheTtl, type ChainAdapter, type ChainAdapterFactory, type ClientIndexConfig, type ClientTransformConfig, type CodecFunc, type CombinedWarpBuilder, type CryptoProvider, type DetectionResult, type DetectionResultFromHtml, EvmWalletChainNames, type ExecutionHandlers, type HttpAuthHeaders, type InterpolationBag, NodeCryptoProvider, type ProtocolName, type ResolvedInput, type SignableMessage, type TransformRunner, WARP_LANGUAGES, type WalletCache, type WalletProvider, type WalletProviderFactory, type Warp, type WarpAbi, type WarpAbiContents, type WarpAction, type WarpActionExecutionResult, type WarpActionExecutionStatus, type WarpActionIndex, type WarpActionInput, type WarpActionInputModifier, type WarpActionInputPosition, type WarpActionInputPositionAssetObject, type WarpActionInputSource, type WarpActionInputType, type WarpActionType, type WarpAdapterGenericRemoteTransaction, type WarpAdapterGenericTransaction, type WarpAdapterGenericType, type WarpAdapterGenericValue, type WarpAlert, type WarpAlertName, type WarpAlerts, type WarpBrand, WarpBrandBuilder, type WarpBrandColors, type WarpBrandCta, type WarpBrandLogo, type WarpBrandLogoThemed, type WarpBrandUrls, WarpBuilder, WarpCache, type WarpCacheConfig, WarpCacheKey, type WarpChainAccount, type WarpChainAction, type WarpChainActionStatus, type WarpChainAsset, type WarpChainAssetLogo, type WarpChainAssetLogoThemed, type WarpChainAssetValue, type WarpChainEnv, type WarpChainInfo, type WarpChainInfoLogo, type WarpChainInfoLogoThemed, WarpChainName, WarpClient, type WarpClientConfig, type WarpCollectAction, type WarpCollectDestination, type WarpCollectDestinationHttp, WarpConfig, WarpConstants, type WarpContract, type WarpContractAction, type WarpContractVerification, type WarpDataLoaderOptions, type WarpExecutable, type WarpExecutionMessages, type WarpExecutionNextInfo, type WarpExecutionOutput, WarpExecutor, type WarpExplorerName, WarpFactory, type WarpI18nText, type WarpIdentifierType, WarpIndex, WarpInputTypes, WarpInterpolator, type WarpLinkAction, WarpLinkBuilder, WarpLinkDetecter, type WarpLocale, WarpLogger, type WarpMcpAction, type WarpMcpDestination, type WarpMessageName, type WarpMeta, type WarpNativeValue, type WarpOutputName, type WarpPromptAction, WarpProtocolVersions, type WarpProviderConfig, type WarpProviderPreferences, type WarpQueryAction, type WarpRegistryConfigInfo, type WarpRegistryInfo, type WarpResulutionPath, type WarpSchedule, type WarpSearchHit, type WarpSearchResult, type WarpSecret, WarpSerializer, type WarpStructValue, type WarpText, type WarpTheme, type WarpTransferAction, type WarpTrustStatus, type WarpTypeHandler, WarpTypeRegistry, type WarpUser, type WarpUserWallets, WarpValidator, type WarpVarPlaceholder, type WarpWalletDetails, type WarpWalletProvider, address, applyOutputToMessages, asset, biguint, bool, buildMappedOutput, buildNestedPayload, bytesToBase64, bytesToHex, cleanWarpIdentifier, createAuthHeaders, createAuthMessage, createCryptoProvider, createDefaultWalletProvider, createHttpAuthHeaders, createSignableMessage, createWarpI18nText, createWarpIdentifier, evaluateOutputCommon, evaluateWhenCondition, extractCollectOutput, extractIdentifierInfoFromUrl, extractPromptOutput, extractQueryStringFromIdentifier, extractQueryStringFromUrl, extractResolvedInputValues, extractWarpSecrets, findWarpAdapterForChain, getCryptoProvider, getEventNameFromWarp, getLatestProtocolIdentifier, getNextInfo, getProviderConfig, getRandomBytes, getRandomHex, getWalletFromConfigOrFail, getWarpActionByIndex, getWarpBrandLogoUrl, getWarpChainAssetLogoUrl, getWarpChainInfoLogoUrl, getWarpInfoFromIdentifier, getWarpPrimaryAction, getWarpWalletAddress, getWarpWalletAddressFromConfig, getWarpWalletExternalId, getWarpWalletExternalIdFromConfig, getWarpWalletExternalIdFromConfigOrFail, getWarpWalletMnemonic, getWarpWalletMnemonicFromConfig, getWarpWalletPrivateKey, getWarpWalletPrivateKeyFromConfig, handleX402Payment, hasInputPrefix, hex, initializeWalletCache, isEqualWarpIdentifier, isWarpActionAutoExecute, isWarpI18nText, isWarpWalletReadOnly, mergeNestedPayload, normalizeAndValidateMnemonic, normalizeMnemonic, option, parseOutputOutIndex, parseSignedMessage, parseWarpQueryStringToObject, removeWarpChainPrefix, replacePlaceholders, replacePlaceholdersInWhenExpression, resolveWarpText, safeWindow, setCryptoProvider, setWarpWalletInConfig, shiftBigintBy, splitInput, string, struct, testCryptoAvailability, toInputPayloadValue, toPreviewText, tuple, uint16, uint32, uint64, uint8, validateMnemonicLength, validateSignedMessage, vector, withAdapterFallback };
1299
+ export { type AdapterTypeRegistry, type AdapterWarpAbiBuilder, type AdapterWarpBrandBuilder, type AdapterWarpBuilder, type AdapterWarpDataLoader, type AdapterWarpExecutor, type AdapterWarpExplorer, type AdapterWarpOutput, type AdapterWarpRegistry, type AdapterWarpSerializer, type AdapterWarpWallet, type BaseWarpActionInputType, type BaseWarpBuilder, BrowserCryptoProvider, CLOUD_WALLET_PROVIDERS, CacheTtl, type ChainAdapter, type ChainAdapterFactory, type ClientIndexConfig, type ClientTransformConfig, type CodecFunc, type CombinedWarpBuilder, type CryptoProvider, type DetectionResult, type DetectionResultFromHtml, EvmWalletChainNames, type ExecutionHandlers, type GeneratedSourceInfo, type GeneratedSourceType, type HttpAuthHeaders, type InterpolationBag, NodeCryptoProvider, type ProtocolName, type ResolvedInput, type SignableMessage, type TransformRunner, WARP_LANGUAGES, type WalletCache, type WalletProvider, type WalletProviderFactory, type Warp, type WarpAbi, type WarpAbiContents, type WarpAction, type WarpActionExecutionResult, type WarpActionExecutionStatus, type WarpActionIndex, type WarpActionInput, type WarpActionInputModifier, type WarpActionInputPosition, type WarpActionInputPositionAssetObject, type WarpActionInputSource, type WarpActionInputType, type WarpActionType, type WarpAdapterGenericRemoteTransaction, type WarpAdapterGenericTransaction, type WarpAdapterGenericType, type WarpAdapterGenericValue, type WarpAlert, type WarpAlertName, type WarpAlerts, type WarpBrand, WarpBrandBuilder, type WarpBrandColors, type WarpBrandCta, type WarpBrandLogo, type WarpBrandLogoThemed, type WarpBrandUrls, WarpBuilder, WarpCache, type WarpCacheConfig, WarpCacheKey, type WarpChainAccount, type WarpChainAction, type WarpChainActionStatus, type WarpChainAsset, type WarpChainAssetLogo, type WarpChainAssetLogoThemed, type WarpChainAssetValue, type WarpChainEnv, type WarpChainInfo, type WarpChainInfoLogo, type WarpChainInfoLogoThemed, WarpChainName, WarpClient, type WarpClientConfig, type WarpCollectAction, type WarpCollectDestination, type WarpCollectDestinationHttp, WarpConfig, WarpConstants, type WarpContract, type WarpContractAction, type WarpContractVerification, type WarpDataLoaderOptions, type WarpExecutable, type WarpExecutionMessages, type WarpExecutionNextInfo, type WarpExecutionOutput, WarpExecutor, type WarpExplorerName, WarpFactory, type WarpI18nText, type WarpIdentifierType, WarpIndex, WarpInputTypes, WarpInterpolator, type WarpLinkAction, WarpLinkBuilder, WarpLinkDetecter, type WarpLocale, WarpLogger, type WarpMcpAction, type WarpMcpDestination, type WarpMessageName, type WarpMeta, type WarpNativeValue, type WarpOutputName, type WarpPromptAction, WarpProtocolVersions, type WarpProviderConfig, type WarpProviderPreferences, type WarpQueryAction, type WarpRegistryConfigInfo, type WarpRegistryInfo, type WarpResulutionPath, type WarpSchedule, type WarpSearchHit, type WarpSearchResult, type WarpSecret, WarpSerializer, type WarpStructValue, type WarpText, type WarpTheme, type WarpTransferAction, type WarpTrustStatus, type WarpTypeHandler, WarpTypeRegistry, type WarpUser, type WarpUserWallets, WarpValidator, type WarpVarPlaceholder, type WarpWalletDetails, type WarpWalletProvider, address, applyOutputToMessages, asset, biguint, bool, buildGeneratedFallbackWarpIdentifier, buildGeneratedSourceWarpIdentifier, buildMappedOutput, buildNestedPayload, bytesToBase64, bytesToHex, cleanWarpIdentifier, createAuthHeaders, createAuthMessage, createCryptoProvider, createDefaultWalletProvider, createHttpAuthHeaders, createSignableMessage, createWarpI18nText, createWarpIdentifier, evaluateOutputCommon, evaluateWhenCondition, extractCollectOutput, extractIdentifierInfoFromUrl, extractPromptOutput, extractQueryStringFromIdentifier, extractQueryStringFromUrl, extractResolvedInputValues, extractWarpSecrets, findWarpAdapterForChain, getCryptoProvider, getEventNameFromWarp, getGeneratedSourceWarpName, getLatestProtocolIdentifier, getNextInfo, getProviderConfig, getRandomBytes, getRandomHex, getWalletFromConfigOrFail, getWarpActionByIndex, getWarpBrandLogoUrl, getWarpChainAssetLogoUrl, getWarpChainInfoLogoUrl, getWarpInfoFromIdentifier, getWarpPrimaryAction, getWarpWalletAddress, getWarpWalletAddressFromConfig, getWarpWalletExternalId, getWarpWalletExternalIdFromConfig, getWarpWalletExternalIdFromConfigOrFail, getWarpWalletMnemonic, getWarpWalletMnemonicFromConfig, getWarpWalletPrivateKey, getWarpWalletPrivateKeyFromConfig, handleX402Payment, hasInputPrefix, hex, initializeWalletCache, isEqualWarpIdentifier, isGeneratedSourcePrivateIdentifier, isWarpActionAutoExecute, isWarpI18nText, isWarpWalletReadOnly, mergeNestedPayload, normalizeAndValidateMnemonic, normalizeMnemonic, option, parseOutputOutIndex, parseSignedMessage, parseWarpQueryStringToObject, removeWarpChainPrefix, replacePlaceholders, replacePlaceholdersInWhenExpression, resolveWarpText, safeWindow, setCryptoProvider, setWarpWalletInConfig, shiftBigintBy, splitInput, stampGeneratedWarpMeta, string, struct, testCryptoAvailability, toInputPayloadValue, toPreviewText, tuple, uint16, uint32, uint64, uint8, validateMnemonicLength, validateSignedMessage, vector, withAdapterFallback };
package/dist/index.d.ts CHANGED
@@ -1,87 +1,8 @@
1
1
  import QRCodeStyling from 'qr-code-styling';
2
2
 
3
- declare enum WarpChainName {
4
- Multiversx = "multiversx",
5
- Claws = "claws",
6
- Sui = "sui",
7
- Ethereum = "ethereum",
8
- Base = "base",
9
- Arbitrum = "arbitrum",
10
- Polygon = "polygon",
11
- Somnia = "somnia",
12
- Fastset = "fastset",
13
- Solana = "solana",
14
- Near = "near"
15
- }
16
- declare const EvmWalletChainNames: WarpChainName[];
17
- declare const WarpConstants: {
18
- HttpProtocolPrefix: string;
19
- IdentifierParamName: string;
20
- IdentifierParamSeparator: string;
21
- IdentifierChainDefault: WarpChainName;
22
- IdentifierType: {
23
- Alias: WarpIdentifierType;
24
- Hash: WarpIdentifierType;
25
- };
26
- IdentifierAliasMarker: string;
27
- Globals: {
28
- UserWallet: {
29
- Placeholder: string;
30
- Accessor: (bag: InterpolationBag) => string | null;
31
- };
32
- UserWalletPublicKey: {
33
- Placeholder: string;
34
- Accessor: (bag: InterpolationBag) => string | null;
35
- };
36
- ChainApiUrl: {
37
- Placeholder: string;
38
- Accessor: (bag: InterpolationBag) => string;
39
- };
40
- ChainAddressHrp: {
41
- Placeholder: string;
42
- Accessor: (bag: InterpolationBag) => string;
43
- };
44
- };
45
- Vars: {
46
- Query: string;
47
- Env: string;
48
- };
49
- ArgParamsSeparator: string;
50
- ArgCompositeSeparator: string;
51
- ArgListSeparator: string;
52
- ArgStructSeparator: string;
53
- Transform: {
54
- Prefix: string;
55
- };
56
- Source: {
57
- UserWallet: string;
58
- };
59
- Position: {
60
- Payload: string;
61
- };
62
- Alerts: {
63
- TriggerEventPrefix: string;
64
- };
65
- };
66
- declare const WarpInputTypes: {
67
- Option: string;
68
- Vector: string;
69
- Tuple: string;
70
- Struct: string;
71
- String: string;
72
- Uint8: string;
73
- Uint16: string;
74
- Uint32: string;
75
- Uint64: string;
76
- Uint128: string;
77
- Uint256: string;
78
- Biguint: string;
79
- Bool: string;
80
- Address: string;
81
- Asset: string;
82
- Hex: string;
83
- };
84
- declare const safeWindow: Window;
3
+ type WarpChainEnv = 'mainnet' | 'testnet' | 'devnet';
4
+ type WarpTheme = 'light' | 'dark';
5
+ type ProtocolName = 'warp' | 'brand' | 'abi';
85
6
 
86
7
  type WarpLocale = 'en' | 'es' | 'fr' | 'de' | 'it' | 'pt' | 'ru' | 'zh' | 'ja' | 'ko' | 'ar' | 'hi' | 'nl' | 'sv' | 'da' | 'no' | 'fi' | 'pl' | 'tr' | 'el' | 'he' | 'th' | 'vi' | 'id' | 'ms' | 'tl' | string;
87
8
  type WarpText = string | WarpI18nText;
@@ -89,20 +10,6 @@ type WarpI18nText = {
89
10
  [language: string]: string;
90
11
  };
91
12
 
92
- type WarpAlertName = string;
93
- type WarpAlert = {
94
- label: WarpText;
95
- trigger: string;
96
- subject: WarpText;
97
- body: WarpText;
98
- action?: string;
99
- };
100
- type WarpAlerts = Record<WarpAlertName, WarpAlert>;
101
-
102
- type WarpChainEnv = 'mainnet' | 'testnet' | 'devnet';
103
- type WarpTheme = 'light' | 'dark';
104
- type ProtocolName = 'warp' | 'brand' | 'abi';
105
-
106
13
  type WarpBrand = {
107
14
  protocol: string;
108
15
  name: WarpText;
@@ -136,6 +43,42 @@ type ClientCacheConfig = {
136
43
  };
137
44
  type WarpCacheType = 'memory' | 'localStorage' | 'static' | 'filesystem';
138
45
 
46
+ type WarpChainAccount = {
47
+ chain: WarpChainName;
48
+ address: string;
49
+ balance: bigint;
50
+ };
51
+ type WarpChainAssetValue = {
52
+ identifier: string;
53
+ amount: bigint;
54
+ };
55
+ type WarpChainAssetLogoThemed = Record<WarpTheme, string>;
56
+ type WarpChainAssetLogo = string | WarpChainAssetLogoThemed | null;
57
+ type WarpChainAsset = {
58
+ chain: WarpChainName;
59
+ identifier: string;
60
+ name: string;
61
+ symbol: string;
62
+ amount?: bigint;
63
+ decimals?: number;
64
+ logoUrl?: WarpChainAssetLogo;
65
+ price?: number;
66
+ supply?: bigint;
67
+ };
68
+ type WarpChainAction = {
69
+ chain: WarpChainName;
70
+ id: string;
71
+ sender: string;
72
+ receiver: string;
73
+ value: bigint;
74
+ function: string;
75
+ status: WarpChainActionStatus;
76
+ createdAt: string;
77
+ error?: string | null;
78
+ tx?: WarpAdapterGenericRemoteTransaction | null;
79
+ };
80
+ type WarpChainActionStatus = 'pending' | 'success' | 'failed';
81
+
139
82
  type WarpActionExecutionStatus = 'success' | 'error' | 'unhandled';
140
83
  type WarpActionExecutionResult = {
141
84
  status: WarpActionExecutionStatus;
@@ -396,41 +339,99 @@ interface AdapterWarpWallet {
396
339
  registerX402Handlers?(client: unknown): Promise<Record<string, () => void>>;
397
340
  }
398
341
 
399
- type WarpChainAccount = {
400
- chain: WarpChainName;
401
- address: string;
402
- balance: bigint;
403
- };
404
- type WarpChainAssetValue = {
405
- identifier: string;
406
- amount: bigint;
342
+ declare enum WarpChainName {
343
+ Multiversx = "multiversx",
344
+ Claws = "claws",
345
+ Sui = "sui",
346
+ Ethereum = "ethereum",
347
+ Base = "base",
348
+ Arbitrum = "arbitrum",
349
+ Polygon = "polygon",
350
+ Somnia = "somnia",
351
+ Fastset = "fastset",
352
+ Solana = "solana",
353
+ Near = "near"
354
+ }
355
+ declare const EvmWalletChainNames: WarpChainName[];
356
+ declare const CLOUD_WALLET_PROVIDERS: WarpWalletProvider[];
357
+ declare const WarpConstants: {
358
+ HttpProtocolPrefix: string;
359
+ IdentifierParamName: string;
360
+ IdentifierParamSeparator: string;
361
+ IdentifierChainDefault: WarpChainName;
362
+ IdentifierType: {
363
+ Alias: WarpIdentifierType;
364
+ Hash: WarpIdentifierType;
365
+ };
366
+ IdentifierAliasMarker: string;
367
+ Globals: {
368
+ UserWallet: {
369
+ Placeholder: string;
370
+ Accessor: (bag: InterpolationBag) => string | null;
371
+ };
372
+ UserWalletPublicKey: {
373
+ Placeholder: string;
374
+ Accessor: (bag: InterpolationBag) => string | null;
375
+ };
376
+ ChainApiUrl: {
377
+ Placeholder: string;
378
+ Accessor: (bag: InterpolationBag) => string;
379
+ };
380
+ ChainAddressHrp: {
381
+ Placeholder: string;
382
+ Accessor: (bag: InterpolationBag) => string;
383
+ };
384
+ };
385
+ Vars: {
386
+ Query: string;
387
+ Env: string;
388
+ };
389
+ ArgParamsSeparator: string;
390
+ ArgCompositeSeparator: string;
391
+ ArgListSeparator: string;
392
+ ArgStructSeparator: string;
393
+ Transform: {
394
+ Prefix: string;
395
+ };
396
+ Source: {
397
+ UserWallet: string;
398
+ };
399
+ Position: {
400
+ Payload: string;
401
+ };
402
+ Alerts: {
403
+ TriggerEventPrefix: string;
404
+ };
407
405
  };
408
- type WarpChainAssetLogoThemed = Record<WarpTheme, string>;
409
- type WarpChainAssetLogo = string | WarpChainAssetLogoThemed | null;
410
- type WarpChainAsset = {
411
- chain: WarpChainName;
412
- identifier: string;
413
- name: string;
414
- symbol: string;
415
- amount?: bigint;
416
- decimals?: number;
417
- logoUrl?: WarpChainAssetLogo;
418
- price?: number;
419
- supply?: bigint;
406
+ declare const WarpInputTypes: {
407
+ Option: string;
408
+ Vector: string;
409
+ Tuple: string;
410
+ Struct: string;
411
+ String: string;
412
+ Uint8: string;
413
+ Uint16: string;
414
+ Uint32: string;
415
+ Uint64: string;
416
+ Uint128: string;
417
+ Uint256: string;
418
+ Biguint: string;
419
+ Bool: string;
420
+ Address: string;
421
+ Asset: string;
422
+ Hex: string;
420
423
  };
421
- type WarpChainAction = {
422
- chain: WarpChainName;
423
- id: string;
424
- sender: string;
425
- receiver: string;
426
- value: bigint;
427
- function: string;
428
- status: WarpChainActionStatus;
429
- createdAt: string;
430
- error?: string | null;
431
- tx?: WarpAdapterGenericRemoteTransaction | null;
424
+ declare const safeWindow: Window;
425
+
426
+ type WarpAlertName = string;
427
+ type WarpAlert = {
428
+ label: WarpText;
429
+ trigger: string;
430
+ subject: WarpText;
431
+ body: WarpText;
432
+ action?: string;
432
433
  };
433
- type WarpChainActionStatus = 'pending' | 'success' | 'failed';
434
+ type WarpAlerts = Record<WarpAlertName, WarpAlert>;
434
435
 
435
436
  type WarpExplorerName = string;
436
437
  type WarpChainInfoLogoThemed = Record<WarpTheme, string>;
@@ -915,6 +916,22 @@ declare function validateSignedMessage(expiresAt: string): boolean;
915
916
  */
916
917
  declare function parseSignedMessage(message: string): SignableMessage;
917
918
 
919
+ type GeneratedSourceType = 'abi' | 'openapi';
920
+ type GeneratedSourceInfo = {
921
+ type: GeneratedSourceType;
922
+ url?: string | null;
923
+ contract?: string | null;
924
+ };
925
+ type GeneratedWarpNameLike = {
926
+ name?: unknown;
927
+ title?: unknown;
928
+ };
929
+ declare const getGeneratedSourceWarpName: (warp: GeneratedWarpNameLike) => string;
930
+ declare const buildGeneratedSourceWarpIdentifier: (source: GeneratedSourceInfo, operationKey: string, displayName?: string) => string;
931
+ declare const buildGeneratedFallbackWarpIdentifier: (warp: GeneratedWarpNameLike) => string;
932
+ declare const stampGeneratedWarpMeta: (warp: Warp, defaultChain: WarpChainName, identifier?: string, fallbackName?: string) => void;
933
+ declare const isGeneratedSourcePrivateIdentifier: (identifier?: string | null) => boolean;
934
+
918
935
  declare const getWalletFromConfigOrFail: (config: WarpClientConfig, chain: WarpChainName) => string | WarpWalletDetails;
919
936
  declare const getWarpWalletAddress: (wallet: WarpWalletDetails | string | null | undefined) => string | null;
920
937
  declare const getWarpWalletAddressFromConfig: (config: WarpClientConfig, chain: WarpChainName) => string | null;
@@ -1279,4 +1296,4 @@ declare class WarpValidator {
1279
1296
  private validateSchema;
1280
1297
  }
1281
1298
 
1282
- export { type AdapterTypeRegistry, type AdapterWarpAbiBuilder, type AdapterWarpBrandBuilder, type AdapterWarpBuilder, type AdapterWarpDataLoader, type AdapterWarpExecutor, type AdapterWarpExplorer, type AdapterWarpOutput, type AdapterWarpRegistry, type AdapterWarpSerializer, type AdapterWarpWallet, type BaseWarpActionInputType, type BaseWarpBuilder, BrowserCryptoProvider, CacheTtl, type ChainAdapter, type ChainAdapterFactory, type ClientIndexConfig, type ClientTransformConfig, type CodecFunc, type CombinedWarpBuilder, type CryptoProvider, type DetectionResult, type DetectionResultFromHtml, EvmWalletChainNames, type ExecutionHandlers, type HttpAuthHeaders, type InterpolationBag, NodeCryptoProvider, type ProtocolName, type ResolvedInput, type SignableMessage, type TransformRunner, WARP_LANGUAGES, type WalletCache, type WalletProvider, type WalletProviderFactory, type Warp, type WarpAbi, type WarpAbiContents, type WarpAction, type WarpActionExecutionResult, type WarpActionExecutionStatus, type WarpActionIndex, type WarpActionInput, type WarpActionInputModifier, type WarpActionInputPosition, type WarpActionInputPositionAssetObject, type WarpActionInputSource, type WarpActionInputType, type WarpActionType, type WarpAdapterGenericRemoteTransaction, type WarpAdapterGenericTransaction, type WarpAdapterGenericType, type WarpAdapterGenericValue, type WarpAlert, type WarpAlertName, type WarpAlerts, type WarpBrand, WarpBrandBuilder, type WarpBrandColors, type WarpBrandCta, type WarpBrandLogo, type WarpBrandLogoThemed, type WarpBrandUrls, WarpBuilder, WarpCache, type WarpCacheConfig, WarpCacheKey, type WarpChainAccount, type WarpChainAction, type WarpChainActionStatus, type WarpChainAsset, type WarpChainAssetLogo, type WarpChainAssetLogoThemed, type WarpChainAssetValue, type WarpChainEnv, type WarpChainInfo, type WarpChainInfoLogo, type WarpChainInfoLogoThemed, WarpChainName, WarpClient, type WarpClientConfig, type WarpCollectAction, type WarpCollectDestination, type WarpCollectDestinationHttp, WarpConfig, WarpConstants, type WarpContract, type WarpContractAction, type WarpContractVerification, type WarpDataLoaderOptions, type WarpExecutable, type WarpExecutionMessages, type WarpExecutionNextInfo, type WarpExecutionOutput, WarpExecutor, type WarpExplorerName, WarpFactory, type WarpI18nText, type WarpIdentifierType, WarpIndex, WarpInputTypes, WarpInterpolator, type WarpLinkAction, WarpLinkBuilder, WarpLinkDetecter, type WarpLocale, WarpLogger, type WarpMcpAction, type WarpMcpDestination, type WarpMessageName, type WarpMeta, type WarpNativeValue, type WarpOutputName, type WarpPromptAction, WarpProtocolVersions, type WarpProviderConfig, type WarpProviderPreferences, type WarpQueryAction, type WarpRegistryConfigInfo, type WarpRegistryInfo, type WarpResulutionPath, type WarpSchedule, type WarpSearchHit, type WarpSearchResult, type WarpSecret, WarpSerializer, type WarpStructValue, type WarpText, type WarpTheme, type WarpTransferAction, type WarpTrustStatus, type WarpTypeHandler, WarpTypeRegistry, type WarpUser, type WarpUserWallets, WarpValidator, type WarpVarPlaceholder, type WarpWalletDetails, type WarpWalletProvider, address, applyOutputToMessages, asset, biguint, bool, buildMappedOutput, buildNestedPayload, bytesToBase64, bytesToHex, cleanWarpIdentifier, createAuthHeaders, createAuthMessage, createCryptoProvider, createDefaultWalletProvider, createHttpAuthHeaders, createSignableMessage, createWarpI18nText, createWarpIdentifier, evaluateOutputCommon, evaluateWhenCondition, extractCollectOutput, extractIdentifierInfoFromUrl, extractPromptOutput, extractQueryStringFromIdentifier, extractQueryStringFromUrl, extractResolvedInputValues, extractWarpSecrets, findWarpAdapterForChain, getCryptoProvider, getEventNameFromWarp, getLatestProtocolIdentifier, getNextInfo, getProviderConfig, getRandomBytes, getRandomHex, getWalletFromConfigOrFail, getWarpActionByIndex, getWarpBrandLogoUrl, getWarpChainAssetLogoUrl, getWarpChainInfoLogoUrl, getWarpInfoFromIdentifier, getWarpPrimaryAction, getWarpWalletAddress, getWarpWalletAddressFromConfig, getWarpWalletExternalId, getWarpWalletExternalIdFromConfig, getWarpWalletExternalIdFromConfigOrFail, getWarpWalletMnemonic, getWarpWalletMnemonicFromConfig, getWarpWalletPrivateKey, getWarpWalletPrivateKeyFromConfig, handleX402Payment, hasInputPrefix, hex, initializeWalletCache, isEqualWarpIdentifier, isWarpActionAutoExecute, isWarpI18nText, isWarpWalletReadOnly, mergeNestedPayload, normalizeAndValidateMnemonic, normalizeMnemonic, option, parseOutputOutIndex, parseSignedMessage, parseWarpQueryStringToObject, removeWarpChainPrefix, replacePlaceholders, replacePlaceholdersInWhenExpression, resolveWarpText, safeWindow, setCryptoProvider, setWarpWalletInConfig, shiftBigintBy, splitInput, string, struct, testCryptoAvailability, toInputPayloadValue, toPreviewText, tuple, uint16, uint32, uint64, uint8, validateMnemonicLength, validateSignedMessage, vector, withAdapterFallback };
1299
+ export { type AdapterTypeRegistry, type AdapterWarpAbiBuilder, type AdapterWarpBrandBuilder, type AdapterWarpBuilder, type AdapterWarpDataLoader, type AdapterWarpExecutor, type AdapterWarpExplorer, type AdapterWarpOutput, type AdapterWarpRegistry, type AdapterWarpSerializer, type AdapterWarpWallet, type BaseWarpActionInputType, type BaseWarpBuilder, BrowserCryptoProvider, CLOUD_WALLET_PROVIDERS, CacheTtl, type ChainAdapter, type ChainAdapterFactory, type ClientIndexConfig, type ClientTransformConfig, type CodecFunc, type CombinedWarpBuilder, type CryptoProvider, type DetectionResult, type DetectionResultFromHtml, EvmWalletChainNames, type ExecutionHandlers, type GeneratedSourceInfo, type GeneratedSourceType, type HttpAuthHeaders, type InterpolationBag, NodeCryptoProvider, type ProtocolName, type ResolvedInput, type SignableMessage, type TransformRunner, WARP_LANGUAGES, type WalletCache, type WalletProvider, type WalletProviderFactory, type Warp, type WarpAbi, type WarpAbiContents, type WarpAction, type WarpActionExecutionResult, type WarpActionExecutionStatus, type WarpActionIndex, type WarpActionInput, type WarpActionInputModifier, type WarpActionInputPosition, type WarpActionInputPositionAssetObject, type WarpActionInputSource, type WarpActionInputType, type WarpActionType, type WarpAdapterGenericRemoteTransaction, type WarpAdapterGenericTransaction, type WarpAdapterGenericType, type WarpAdapterGenericValue, type WarpAlert, type WarpAlertName, type WarpAlerts, type WarpBrand, WarpBrandBuilder, type WarpBrandColors, type WarpBrandCta, type WarpBrandLogo, type WarpBrandLogoThemed, type WarpBrandUrls, WarpBuilder, WarpCache, type WarpCacheConfig, WarpCacheKey, type WarpChainAccount, type WarpChainAction, type WarpChainActionStatus, type WarpChainAsset, type WarpChainAssetLogo, type WarpChainAssetLogoThemed, type WarpChainAssetValue, type WarpChainEnv, type WarpChainInfo, type WarpChainInfoLogo, type WarpChainInfoLogoThemed, WarpChainName, WarpClient, type WarpClientConfig, type WarpCollectAction, type WarpCollectDestination, type WarpCollectDestinationHttp, WarpConfig, WarpConstants, type WarpContract, type WarpContractAction, type WarpContractVerification, type WarpDataLoaderOptions, type WarpExecutable, type WarpExecutionMessages, type WarpExecutionNextInfo, type WarpExecutionOutput, WarpExecutor, type WarpExplorerName, WarpFactory, type WarpI18nText, type WarpIdentifierType, WarpIndex, WarpInputTypes, WarpInterpolator, type WarpLinkAction, WarpLinkBuilder, WarpLinkDetecter, type WarpLocale, WarpLogger, type WarpMcpAction, type WarpMcpDestination, type WarpMessageName, type WarpMeta, type WarpNativeValue, type WarpOutputName, type WarpPromptAction, WarpProtocolVersions, type WarpProviderConfig, type WarpProviderPreferences, type WarpQueryAction, type WarpRegistryConfigInfo, type WarpRegistryInfo, type WarpResulutionPath, type WarpSchedule, type WarpSearchHit, type WarpSearchResult, type WarpSecret, WarpSerializer, type WarpStructValue, type WarpText, type WarpTheme, type WarpTransferAction, type WarpTrustStatus, type WarpTypeHandler, WarpTypeRegistry, type WarpUser, type WarpUserWallets, WarpValidator, type WarpVarPlaceholder, type WarpWalletDetails, type WarpWalletProvider, address, applyOutputToMessages, asset, biguint, bool, buildGeneratedFallbackWarpIdentifier, buildGeneratedSourceWarpIdentifier, buildMappedOutput, buildNestedPayload, bytesToBase64, bytesToHex, cleanWarpIdentifier, createAuthHeaders, createAuthMessage, createCryptoProvider, createDefaultWalletProvider, createHttpAuthHeaders, createSignableMessage, createWarpI18nText, createWarpIdentifier, evaluateOutputCommon, evaluateWhenCondition, extractCollectOutput, extractIdentifierInfoFromUrl, extractPromptOutput, extractQueryStringFromIdentifier, extractQueryStringFromUrl, extractResolvedInputValues, extractWarpSecrets, findWarpAdapterForChain, getCryptoProvider, getEventNameFromWarp, getGeneratedSourceWarpName, getLatestProtocolIdentifier, getNextInfo, getProviderConfig, getRandomBytes, getRandomHex, getWalletFromConfigOrFail, getWarpActionByIndex, getWarpBrandLogoUrl, getWarpChainAssetLogoUrl, getWarpChainInfoLogoUrl, getWarpInfoFromIdentifier, getWarpPrimaryAction, getWarpWalletAddress, getWarpWalletAddressFromConfig, getWarpWalletExternalId, getWarpWalletExternalIdFromConfig, getWarpWalletExternalIdFromConfigOrFail, getWarpWalletMnemonic, getWarpWalletMnemonicFromConfig, getWarpWalletPrivateKey, getWarpWalletPrivateKeyFromConfig, handleX402Payment, hasInputPrefix, hex, initializeWalletCache, isEqualWarpIdentifier, isGeneratedSourcePrivateIdentifier, isWarpActionAutoExecute, isWarpI18nText, isWarpWalletReadOnly, mergeNestedPayload, normalizeAndValidateMnemonic, normalizeMnemonic, option, parseOutputOutIndex, parseSignedMessage, parseWarpQueryStringToObject, removeWarpChainPrefix, replacePlaceholders, replacePlaceholdersInWhenExpression, resolveWarpText, safeWindow, setCryptoProvider, setWarpWalletInConfig, shiftBigintBy, splitInput, stampGeneratedWarpMeta, string, struct, testCryptoAvailability, toInputPayloadValue, toPreviewText, tuple, uint16, uint32, uint64, uint8, validateMnemonicLength, validateSignedMessage, vector, withAdapterFallback };