@cosmosapp/pay_sdk 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/README.md +77 -2
- package/dist/{chunk-TM4HAKWE.js → chunk-AQEHMCJZ.js} +3 -3
- package/dist/{chunk-TM4HAKWE.js.map → chunk-AQEHMCJZ.js.map} +1 -1
- package/dist/{cosmosProvider-CFASjnd5.d.cts → cosmosProvider-DTz0Y8xZ.d.cts} +2 -1
- package/dist/{cosmosProvider-CFASjnd5.d.ts → cosmosProvider-DTz0Y8xZ.d.ts} +2 -1
- package/dist/index.cjs +540 -109
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +381 -124
- package/dist/index.d.ts +381 -124
- package/dist/index.js +533 -110
- package/dist/index.js.map +1 -1
- package/dist/{intent-input-BtUp3tFN.d.cts → intent-input-GiCgpAWR.d.cts} +545 -182
- package/dist/{intent-input-BtUp3tFN.d.ts → intent-input-GiCgpAWR.d.ts} +545 -182
- package/dist/swk/index.d.cts +4 -3
- package/dist/swk/index.d.ts +4 -3
- package/dist/web/index.cjs +1 -1
- package/dist/web/index.cjs.map +1 -1
- package/dist/web/index.d.cts +7 -5
- package/dist/web/index.d.ts +7 -5
- package/dist/web/index.js +2 -2
- package/llms/05-payment-intents.md +19 -6
- package/llms/15-swaps.md +58 -0
- package/llms/llms-full.txt +80 -6
- package/llms/llms.txt +1 -0
- package/package.json +24 -15
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,71 @@
|
|
|
1
1
|
import { EventEmitter } from 'node:events';
|
|
2
|
-
import { A as
|
|
3
|
-
export {
|
|
2
|
+
import { A as AliasResolutionData, a as AliasAvailabilityData, b as AliasByAddressData, C as CreateAliasChallengeOptions, c as AliasChallengeData, d as ClaimAliasOptions, O as OwnedAliasData, e as AliasListData, f as AddAliasAddressOptions, g as AliasAddressData, h as AliasDeletedData, i as AliasRecoveryStartedData, j as CompleteAliasRecoveryOptions, k as AnalyticsSummaryData, l as AnalyticsBalancesData, m as ApiLogsData, W as WebhookLogsData, L as ListRegistryAssetsOptions, n as AssetRegistryData, o as CustomerData, U as UpdateCustomerOptions, p as CreateCustomerOptions, H as HealthCheckData, q as LiquidityOperationData, r as LiquidityOperationKind, s as LiquidityOperationStatus, S as SubmitLiquidityOptions, D as DepositLiquidityOptions, t as WithdrawLiquidityOptions, u as LiquidityPositionsData, B as BrowseLiquidityPoolsOptions, v as LiquidityPoolData, w as ListLiquidityOperationsOptions, x as CreatePayinQuoteOptions, P as PayinQuoteData, y as CreatePayinOptions, z as PayinData, E as ListPayinsOptions, F as CreateTrustlineOptions, T as TrustlineData, G as CreateVirtualAccountOptions, V as VirtualAccountData, I as CreatePayoutQuoteOptions, J as PayoutQuoteData, K as AuthorizePayoutOptions, M as AuthorizePayoutData, N as CreatePayoutOptions, Q as PayoutData, R as ListPayoutsOptions, X as AttachPayoutDocumentOptions, Y as PayoutDocumentData, Z as ActivityEventInput, _ as ReportActivityOptions, $ as ActivityReportData, a0 as ListActivityOptions, a1 as ActivityListData, a2 as ActivitySummaryData, a3 as ReceiverData, a4 as UpdateReceiverOptions, a5 as ApproveReceiverOptions, a6 as RequestTosOptions, a7 as TermsOfServiceData, a8 as EnableReceiverOptions, a9 as CreateReceiverWalletOptions, aa as ReceiverWalletData, ab as ListKycOptions, ac as CreateBankAccountOptions, ad as BankAccountData, ae as CreateReceiverOptions, af as SetReceiverAccessOptions, ag as WalletSignMessageData, ah as KycUploadData, ai as InitiateTosOptions, aj as KycRailsData, ak as BankDetailsData, al as CrossChainSwapData, am as CrossChainSwapStatus, an as SwapChain, ao as CrossChainTransactionData, ap as CrossChainAssetData, aq as QuoteCrossChainSwapOptions, ar as CrossChainQuoteData, as as CreateCrossChainSwapOptions, at as ListCrossChainSwapsOptions, au as DefindexDepositOptions, av as DefindexWithdrawOptions, aw as PluginData, ax as InstallPluginOptions, ay as PluginUninstalledData, az as PluginActionResultData, aA as PublicKeyData, aB as PaymentIntentData, aC as PaymentIntentKind, aD as PaymentIntentStatus, aE as PaymentChain, aF as UpdatePaymentIntentOptions, aG as DeletedData, aH as ValidationOutcomeData, aI as CreateTxPaymentIntentOptions, aJ as CreatePayPaymentIntentOptions, aK as PaymentIntentTransitionData, aL as ListPaymentIntentsOptions, aM as ValidatePaymentIntentOptions, aN as ProductData, aO as ProductKind, aP as UpdateProductOptions, aQ as CreateProductOptions, aR as ChainSwapData, aS as OtherSwapChain, aT as SwapStatus, aU as ChainSwapTransaction, aV as EvmCallData, aW as SwapData, aX as QuoteSwapOptions, aY as SwapQuoteData, aZ as CreateSwapOptions, a_ as ListSwapsOptions, a$ as SubmitSwapOptions, b0 as WebhookDeliveryData, b1 as WebhookEventType, b2 as WebhookDeliveryStatus, b3 as WebhookEndpointData, b4 as WebhookEndpointWithSecretData, b5 as UpdateWebhookEndpointOptions, b6 as WebhookPingData, b7 as ListWebhookDeliveriesOptions, b8 as AnyWebhookEvent, b9 as WebhookEventDataMap, ba as TypedWebhookEvent, bb as CreateWebhookEndpointOptions, bc as WebhookEvent } from './intent-input-GiCgpAWR.js';
|
|
3
|
+
export { bd as ActivityBucket, be as ActivityEventData, bf as ActivityLevel, bg as ActivitySource, bh as AddressBook, bi as AddressRef, bj as AliasChallengePurpose, bk as AnalyticsBalanceEntry, bl as AnalyticsRecentRow, bm as AnalyticsSeriesPoint, bn as AnalyticsVolumeEntry, bo as ApiLogRow, bp as AssetDefinition, bq as AssetRef, br as Assets, bs as BankAccountListData, bt as BankRail, bu as BankingPartner, bv as ChainSwapListData, bw as ChainSwapSubmitOutcomeData, bx as CosmosPayAPIError, by as CosmosPayRequestError, bz as CrossChainSwapListData, bA as CurrencyType, bB as CustomerListData, bC as KycType, bD as LiquidityOperationListData, bE as LiquidityPoolListData, bF as LiquidityPositionData, bG as LiquidityReserveData, bH as LiquiditySubmitOutcomeData, bI as PayinListData, bJ as PayinMethod, bK as PayinPayerRules, bL as PaymentIntentListData, bM as PayoutChain, bN as PayoutListData, bO as PayoutNetwork, bP as PluginListData, bQ as RampToken, bR as ReceiverListData, bS as ReceiverOwner, bT as ReceiverType, bU as ReceiverWalletListData, bV as ReceiverWalletNetwork, bW as RegistryAssetData, bX as ResolvableIntentInput, bY as ResolvedAsset, bZ as SwapListData, b_ as SwapSubmitOutcomeData, b$ as TestnetAssets, c0 as WalletId, c1 as Wallets, c2 as WebhookDeliveryListData, c3 as WebhookLogRow, c4 as addresses, c5 as assertAddress, c6 as defineAsset, c7 as isAddress, c8 as isContractAddress, c9 as isMuxedAddress, ca as isNativeAsset, cb as isStellarAddress, cc as resolveAddress, cd as resolveAsset, ce as resolveIntentBody } from './intent-input-GiCgpAWR.js';
|
|
4
4
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Payment handles — `client.aliases`. A handle names one or more Stellar
|
|
8
|
+
* addresses, so a payer can send to `@ada` instead of a 56-character key.
|
|
9
|
+
*
|
|
10
|
+
* Every address on a handle proved control of itself: claiming a handle or
|
|
11
|
+
* pointing it somewhere new takes a signature, by that address, over a
|
|
12
|
+
* challenge the server issued. The SDK never holds the key — ask for a
|
|
13
|
+
* challenge, sign its `message` where the key lives, and send the signature
|
|
14
|
+
* back.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* const { primaryAddress } = await client.aliases.resolve('ada', { network: 'public' });
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* const ch = await client.aliases.createChallenge({ name: 'ada', address, network: 'public' });
|
|
21
|
+
* const signature = signWithYourWallet(ch.message); // base64 ed25519
|
|
22
|
+
* await client.aliases.claim({ name: 'ada', email: 'ada@example.com', nonce: ch.nonce, signature });
|
|
23
|
+
*/
|
|
24
|
+
declare class AliasManager {
|
|
25
|
+
readonly client: Client;
|
|
26
|
+
private readonly route;
|
|
27
|
+
constructor(client: Client);
|
|
28
|
+
private get rest();
|
|
29
|
+
/** Where to pay a handle: its verified addresses on a network, primary first. */
|
|
30
|
+
resolve(name: string, options?: {
|
|
31
|
+
network?: string;
|
|
32
|
+
}): Promise<AliasResolutionData>;
|
|
33
|
+
/** Whether a handle can be claimed, and if not, why not. */
|
|
34
|
+
availability(name: string): Promise<AliasAvailabilityData>;
|
|
35
|
+
/** Which handles point at an address — the reverse lookup. */
|
|
36
|
+
byAddress(address: string, options?: {
|
|
37
|
+
network?: string;
|
|
38
|
+
}): Promise<AliasByAddressData>;
|
|
39
|
+
/** A nonce and the exact message to sign, for a claim, a new address or a recovery. */
|
|
40
|
+
createChallenge(options: CreateAliasChallengeOptions): Promise<AliasChallengeData>;
|
|
41
|
+
/** Claim a handle with a signature over a CLAIM challenge. */
|
|
42
|
+
claim(options: ClaimAliasOptions): Promise<OwnedAliasData>;
|
|
43
|
+
/** The handles this consumer owns (paginated). */
|
|
44
|
+
list(options?: {
|
|
45
|
+
take?: number;
|
|
46
|
+
skip?: number;
|
|
47
|
+
}): Promise<AliasListData>;
|
|
48
|
+
/** Point a handle at another address, signed by that address (ADD_ADDRESS challenge). */
|
|
49
|
+
addAddress(name: string, options: AddAliasAddressOptions): Promise<AliasAddressData>;
|
|
50
|
+
/** Remove one address from a handle. */
|
|
51
|
+
removeAddress(name: string, addressId: string): Promise<AliasDeletedData>;
|
|
52
|
+
/** Release a handle back to the namespace. */
|
|
53
|
+
release(name: string): Promise<AliasDeletedData>;
|
|
54
|
+
/**
|
|
55
|
+
* Start a recovery: the service emails a one-time token to the mailbox the
|
|
56
|
+
* handle was claimed with, if `email` is that mailbox. The answer is the same
|
|
57
|
+
* either way, so it says nothing about who owns the handle; the token only
|
|
58
|
+
* ever reaches the mailbox, never this response.
|
|
59
|
+
*/
|
|
60
|
+
startRecovery(name: string, email: string): Promise<AliasRecoveryStartedData>;
|
|
61
|
+
/**
|
|
62
|
+
* Take a handle over with a new address after losing the old one: the token
|
|
63
|
+
* the owner received by email, plus a signature by the new address over a
|
|
64
|
+
* RECOVER challenge.
|
|
65
|
+
*/
|
|
66
|
+
completeRecovery(name: string, options: CompleteAliasRecoveryOptions): Promise<OwnedAliasData>;
|
|
67
|
+
}
|
|
68
|
+
|
|
6
69
|
/**
|
|
7
70
|
* Read-only analytics derived from the consumer's intents and deliveries —
|
|
8
71
|
* `client.analytics`. Powers dashboard-style Overview / Balances / Logs views.
|
|
@@ -21,6 +84,29 @@ declare class AnalyticsManager {
|
|
|
21
84
|
webhookLogs(): Promise<WebhookLogsData>;
|
|
22
85
|
}
|
|
23
86
|
|
|
87
|
+
/**
|
|
88
|
+
* The server's asset registry — `client.assets`: which `(code, issuer)` pairs
|
|
89
|
+
* it knows per network, and who issues each.
|
|
90
|
+
*
|
|
91
|
+
* A code is not an identifier — mainnet carries dozens of accounts issuing
|
|
92
|
+
* `USDC` — so this is where to learn WHICH one. `verified` is a claim about the
|
|
93
|
+
* issuer's identity (checked against `issuerName`), not about quality; the
|
|
94
|
+
* unverified rows are returned too, and a UI should show them below a warning
|
|
95
|
+
* rather than hide them. The static {@link Assets} catalog is the offline
|
|
96
|
+
* fallback; this is the current list, and its `version` says which is newer.
|
|
97
|
+
*
|
|
98
|
+
* @example
|
|
99
|
+
* const { data } = await client.assets.list({ network: 'public', verified: true });
|
|
100
|
+
*/
|
|
101
|
+
declare class AssetManager {
|
|
102
|
+
readonly client: Client;
|
|
103
|
+
private readonly route;
|
|
104
|
+
constructor(client: Client);
|
|
105
|
+
private get rest();
|
|
106
|
+
/** The registry for a network. */
|
|
107
|
+
list(options?: ListRegistryAssetsOptions): Promise<AssetRegistryData>;
|
|
108
|
+
}
|
|
109
|
+
|
|
24
110
|
/**
|
|
25
111
|
* Root of every API structure. Holds a back-reference to the {@link Client} so
|
|
26
112
|
* instances can perform their own actions (e.g. `paymentIntent.delete()`), and
|
|
@@ -145,6 +231,7 @@ declare class REST extends EventEmitter {
|
|
|
145
231
|
setGatewayCredentials(secret: string, consumerUsername: string): this;
|
|
146
232
|
get<T>(path: string, options?: RequestOptions): Promise<T>;
|
|
147
233
|
post<T>(path: string, options?: RequestOptions): Promise<T>;
|
|
234
|
+
put<T>(path: string, options?: RequestOptions): Promise<T>;
|
|
148
235
|
patch<T>(path: string, options?: RequestOptions): Promise<T>;
|
|
149
236
|
delete<T>(path: string, options?: RequestOptions): Promise<T>;
|
|
150
237
|
/** Build the absolute URL for a route, applying the version prefix + query. */
|
|
@@ -731,94 +818,164 @@ declare class KycManager extends BaseManager<Receiver> {
|
|
|
731
818
|
}
|
|
732
819
|
|
|
733
820
|
/**
|
|
734
|
-
*
|
|
735
|
-
*
|
|
736
|
-
* The login is a three-legged flow, and the middle leg is the one that surprises
|
|
737
|
-
* people: the browser leaves for the provider and comes back to POLLAR, not to
|
|
738
|
-
* you, so a client cannot simply await a redirect. It polls instead.
|
|
821
|
+
* A swap between two chains, settled by NEAR Intents — `client.crossChainSwaps`.
|
|
739
822
|
*
|
|
740
|
-
*
|
|
741
|
-
*
|
|
742
|
-
*
|
|
743
|
-
*
|
|
744
|
-
*
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
823
|
+
* Pay exactly {@link amountIn} of the origin asset to {@link depositAddress}
|
|
824
|
+
* (with {@link depositMemo} on Stellar, as a MEMO_TEXT) — {@link depositUri} is
|
|
825
|
+
* that payment as a wallet link. NEAR Intents pays {@link recipient} on the
|
|
826
|
+
* destination chain, or refunds {@link refundTo}. The server follows it; poll
|
|
827
|
+
* with `await swap.fetch()` or subscribe to the `CROSS_CHAIN_SWAP_*` webhooks.
|
|
828
|
+
*/
|
|
829
|
+
declare class CrossChainSwap extends Base<CrossChainSwapData> {
|
|
830
|
+
status: CrossChainSwapStatus;
|
|
831
|
+
/** NEAR Intents' own status word. */
|
|
832
|
+
providerStatus: string;
|
|
833
|
+
network: string;
|
|
834
|
+
originChain: SwapChain;
|
|
835
|
+
originAsset: string;
|
|
836
|
+
originContract: string | null;
|
|
837
|
+
destinationChain: SwapChain;
|
|
838
|
+
destinationAsset: string;
|
|
839
|
+
destinationContract: string | null;
|
|
840
|
+
amountIn: string;
|
|
841
|
+
feeBps: number;
|
|
842
|
+
feeAmount: string;
|
|
843
|
+
amountOutEstimated: string;
|
|
844
|
+
amountOutMin: string;
|
|
845
|
+
slippageBps: number;
|
|
846
|
+
recipient: string;
|
|
847
|
+
refundTo: string;
|
|
848
|
+
depositAddress: string;
|
|
849
|
+
depositMemo: string | null;
|
|
850
|
+
depositUri: string;
|
|
851
|
+
/** QR of {@link depositUri}; list rows do not carry it. */
|
|
852
|
+
qr: string | null;
|
|
853
|
+
depositTxHash: string | null;
|
|
854
|
+
amountOut: string | null;
|
|
855
|
+
refundedAmount: string | null;
|
|
856
|
+
originTxHashes: CrossChainTransactionData[] | null;
|
|
857
|
+
destinationTxHashes: CrossChainTransactionData[] | null;
|
|
858
|
+
timeEstimateSeconds: number;
|
|
859
|
+
correlationId: string;
|
|
860
|
+
/** Keep it: NEAR Intents' signature over the quote settles a dispute. */
|
|
861
|
+
quoteSignature: string;
|
|
862
|
+
idempotencyKey: string | null;
|
|
863
|
+
expiresAt: Date;
|
|
864
|
+
createdAt: Date;
|
|
865
|
+
updatedAt: Date;
|
|
866
|
+
constructor(client: Client, data: CrossChainSwapData);
|
|
867
|
+
protected _patch(data: CrossChainSwapData): this;
|
|
868
|
+
/** Whether the swap has reached an outcome that will not change. */
|
|
869
|
+
get isFinal(): boolean;
|
|
870
|
+
get isSucceeded(): boolean;
|
|
871
|
+
/** Re-fetch from the API, updating this instance in place. */
|
|
872
|
+
fetch(): Promise<this>;
|
|
873
|
+
/**
|
|
874
|
+
* Report the transaction that paid the deposit address so NEAR Intents starts
|
|
875
|
+
* without waiting for its indexer. Updates this instance in place.
|
|
876
|
+
*/
|
|
877
|
+
reportDeposit(txHash: string): Promise<this>;
|
|
878
|
+
toJSON(): CrossChainSwapData;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
/** A page of cross-chain swaps plus its pagination metadata. */
|
|
882
|
+
interface CrossChainSwapPage {
|
|
883
|
+
items: CrossChainSwap[];
|
|
884
|
+
total: number;
|
|
885
|
+
take: number;
|
|
886
|
+
skip: number;
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
* Swaps between Stellar, Solana and Monad, settled by NEAR Intents —
|
|
890
|
+
* `client.crossChainSwaps`. Mainnet only: a `dev` key can list assets and
|
|
891
|
+
* quote, but creating answers `400 network_unsupported`. Both legs on one chain
|
|
892
|
+
* is `client.swaps` with `chain`.
|
|
748
893
|
*
|
|
749
|
-
*
|
|
750
|
-
*
|
|
751
|
-
*
|
|
752
|
-
*
|
|
753
|
-
*
|
|
754
|
-
*
|
|
894
|
+
* @example
|
|
895
|
+
* const swap = await client.crossChainSwaps.create({
|
|
896
|
+
* originChain: 'stellar', originAsset: 'XLM', amount: '100',
|
|
897
|
+
* destinationChain: 'solana', destinationAsset: 'USDC',
|
|
898
|
+
* recipient: solanaAddress, refundTo: stellarAddress,
|
|
899
|
+
* });
|
|
900
|
+
* // Pay swap.amountIn to swap.depositAddress (memo swap.depositMemo), or open swap.depositUri.
|
|
901
|
+
*/
|
|
902
|
+
declare class CrossChainSwapManager extends BaseManager<CrossChainSwap> {
|
|
903
|
+
private readonly route;
|
|
904
|
+
/** The tokens NEAR Intents can swap on Stellar, Solana and Monad. */
|
|
905
|
+
assets(): Promise<CrossChainAssetData[]>;
|
|
906
|
+
/** A dry quote: output, minimum and commission. Persists nothing. */
|
|
907
|
+
quote(options: QuoteCrossChainSwapOptions): Promise<CrossChainQuoteData>;
|
|
908
|
+
/** A live quote: the deposit address, memo and wallet link that fund the swap. */
|
|
909
|
+
create(options: CreateCrossChainSwapOptions): Promise<CrossChainSwap>;
|
|
910
|
+
fetch(id: string): Promise<CrossChainSwap>;
|
|
911
|
+
list(options?: ListCrossChainSwapsOptions): Promise<CrossChainSwapPage>;
|
|
912
|
+
/** Report the transaction that paid the deposit address. */
|
|
913
|
+
reportDeposit(id: string, txHash: string): Promise<CrossChainSwap>;
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
/**
|
|
917
|
+
* DeFindex vaults on Stellar — `client.defindex`. Served only where the
|
|
918
|
+
* deployment enables the DeFindex native plugin (`PLUGINS_ENABLED=defindex`);
|
|
919
|
+
* elsewhere every call is a 404.
|
|
755
920
|
*
|
|
756
|
-
* The
|
|
757
|
-
*
|
|
758
|
-
*
|
|
921
|
+
* The payloads are DeFindex's own and are passed through untyped. Deposits and
|
|
922
|
+
* withdrawals come back as an unsigned transaction for the caller to sign and
|
|
923
|
+
* hand to {@link submit}.
|
|
924
|
+
*/
|
|
925
|
+
declare class DefindexManager {
|
|
926
|
+
readonly client: Client;
|
|
927
|
+
private readonly route;
|
|
928
|
+
constructor(client: Client);
|
|
929
|
+
private get rest();
|
|
930
|
+
vaults<T = unknown>(): Promise<T>;
|
|
931
|
+
vault<T = unknown>(vault: string): Promise<T>;
|
|
932
|
+
/** An account's position in a vault. */
|
|
933
|
+
balance<T = unknown>(vault: string, account: string): Promise<T>;
|
|
934
|
+
deposit<T = unknown>(vault: string, options: DefindexDepositOptions): Promise<T>;
|
|
935
|
+
withdraw<T = unknown>(vault: string, options: DefindexWithdrawOptions): Promise<T>;
|
|
936
|
+
/** Submit a signed DeFindex transaction (base64 XDR). */
|
|
937
|
+
submit<T = unknown>(xdr: string): Promise<T>;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* Plugins this deployment serves — `client.plugins`. A plugin runs only for a
|
|
942
|
+
* consumer that installed it, and installing is consenting to exactly the
|
|
943
|
+
* capabilities it declares: pass them back as `grantCapabilities`.
|
|
759
944
|
*
|
|
760
945
|
* @example
|
|
761
|
-
* const
|
|
762
|
-
*
|
|
763
|
-
*
|
|
764
|
-
* code_challenge_method: 'S256',
|
|
765
|
-
* });
|
|
766
|
-
* // open `authorization_url`, then poll:
|
|
767
|
-
* const polled = await client.pollar.session(state);
|
|
768
|
-
* if (polled.status === 'authorized') {
|
|
769
|
-
* const session = await client.pollar.token({ code: polled.code, code_verifier: verifier });
|
|
770
|
-
* }
|
|
946
|
+
* const plugin = await client.plugins.fetch('invoices');
|
|
947
|
+
* await client.plugins.install('invoices', { grantCapabilities: plugin.capabilities });
|
|
948
|
+
* const { output } = await client.plugins.query('invoices', 'list', { status: 'open' });
|
|
771
949
|
*/
|
|
772
|
-
declare class
|
|
950
|
+
declare class PluginManager {
|
|
773
951
|
readonly client: Client;
|
|
774
952
|
private readonly route;
|
|
775
953
|
constructor(client: Client);
|
|
776
954
|
private get rest();
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
/**
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
/**
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
/** Enable the application's configured assets on a wallet. */
|
|
802
|
-
addDefaultTrustlines(address: string): Promise<PollarTrustlineData>;
|
|
803
|
-
/** Enable specific assets on a wallet. */
|
|
804
|
-
addTrustlines(address: string, options: PollarTrustlinesOptions): Promise<PollarTrustlineData>;
|
|
805
|
-
/**
|
|
806
|
-
* Remove a trustline. An asset is `(code, issuer)`, and both are in the path for
|
|
807
|
-
* that reason: a bare code names no asset.
|
|
808
|
-
*/
|
|
809
|
-
removeTrustline(address: string, code: string, issuer: string): Promise<PollarTrustlineData>;
|
|
810
|
-
/**
|
|
811
|
-
* Register a user with Pollar ahead of their first login. Needs an elevated
|
|
812
|
-
* (admin) key: the Pollar user directory is shared by every tenant, so a tenant
|
|
813
|
-
* key gets `403 elevated_key_required`.
|
|
814
|
-
*/
|
|
815
|
-
registerUser(options: RegisterPollarUserOptions): Promise<PollarUserData>;
|
|
816
|
-
/**
|
|
817
|
-
* Register a user AND provision their Stellar wallet in one call — the variant
|
|
818
|
-
* to use when the user should be able to receive before they ever log in. Needs
|
|
819
|
-
* an elevated (admin) key, like {@link registerUser}.
|
|
820
|
-
*/
|
|
821
|
-
registerUserWithWallet(options: RegisterPollarUserOptions): Promise<PollarUserData>;
|
|
955
|
+
list(): Promise<PluginData[]>;
|
|
956
|
+
fetch(slug: string): Promise<PluginData>;
|
|
957
|
+
/** Install (or re-consent to) a plugin. */
|
|
958
|
+
install(slug: string, options: InstallPluginOptions): Promise<PluginData>;
|
|
959
|
+
uninstall(slug: string): Promise<PluginUninstalledData>;
|
|
960
|
+
/** Run a read-only action the plugin declares. */
|
|
961
|
+
query<T = unknown>(slug: string, action: string, input?: Record<string, unknown>): Promise<PluginActionResultData<T>>;
|
|
962
|
+
/** Run an action that may change the plugin's state. */
|
|
963
|
+
command<T = unknown>(slug: string, action: string, input?: Record<string, unknown>): Promise<PluginActionResultData<T>>;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
/**
|
|
967
|
+
* The shared public API key — `client.publicKey`. It is what an open-source
|
|
968
|
+
* wallet embeds to reach the few routes anonymous callers may use; the route
|
|
969
|
+
* that serves it takes no key at all. Mostly useful to tooling that ships such
|
|
970
|
+
* a wallet; a server with its own key has no need for it.
|
|
971
|
+
*/
|
|
972
|
+
declare class PublicKeyManager {
|
|
973
|
+
readonly client: Client;
|
|
974
|
+
private readonly route;
|
|
975
|
+
constructor(client: Client);
|
|
976
|
+
private get rest();
|
|
977
|
+
/** The public key for an environment (`dev` → testnet, `prod` → mainnet). */
|
|
978
|
+
fetch(env?: 'dev' | 'prod'): Promise<PublicKeyData>;
|
|
822
979
|
}
|
|
823
980
|
|
|
824
981
|
/**
|
|
@@ -831,12 +988,14 @@ declare class PollarManager {
|
|
|
831
988
|
declare class PaymentIntent extends Base<PaymentIntentData> {
|
|
832
989
|
kind: PaymentIntentKind;
|
|
833
990
|
status: PaymentIntentStatus;
|
|
991
|
+
/** Chain the payment settles on. */
|
|
992
|
+
chain: PaymentChain;
|
|
834
993
|
network: string;
|
|
835
994
|
/** Payer account (null for PAY intents). */
|
|
836
995
|
source: string | null;
|
|
837
996
|
destination: string;
|
|
838
997
|
amount: string | null;
|
|
839
|
-
/** Asset code, or `native` for XLM. */
|
|
998
|
+
/** Asset code, or `native` for the chain's coin (XLM, SOL or MON). */
|
|
840
999
|
asset: string;
|
|
841
1000
|
assetIssuer: string | null;
|
|
842
1001
|
/** Mandatory MEMO_ID. */
|
|
@@ -863,7 +1022,7 @@ declare class PaymentIntent extends Base<PaymentIntentData> {
|
|
|
863
1022
|
get isSucceeded(): boolean;
|
|
864
1023
|
/** Whether the intent is still awaiting payment. */
|
|
865
1024
|
get isPending(): boolean;
|
|
866
|
-
/** Human-readable asset label (`XLM`
|
|
1025
|
+
/** Human-readable asset label (the chain's coin for native: `XLM`, `SOL` or `MON`). */
|
|
867
1026
|
get assetLabel(): string;
|
|
868
1027
|
/** Re-fetch this intent from the API, returning a fresh instance. */
|
|
869
1028
|
fetch(): Promise<PaymentIntent>;
|
|
@@ -908,10 +1067,18 @@ declare class PaymentIntentManager extends BaseManager<PaymentIntent> {
|
|
|
908
1067
|
private readonly route;
|
|
909
1068
|
/** Create a SEP-7 `tx` intent (source known → unsigned XDR + tx URI + QR). */
|
|
910
1069
|
createTx(options: CreateTxPaymentIntentOptions): Promise<PaymentIntent>;
|
|
911
|
-
/**
|
|
1070
|
+
/**
|
|
1071
|
+
* Create a `pay` intent (no source → a payment link + QR, no XDR): SEP-7 on Stellar (the
|
|
1072
|
+
* default), Solana Pay with `chain: 'solana'`, EIP-681 with `chain: 'monad'`.
|
|
1073
|
+
*/
|
|
912
1074
|
createPay(options: CreatePayPaymentIntentOptions): Promise<PaymentIntent>;
|
|
913
1075
|
/** Get a single payment intent by id. */
|
|
914
1076
|
fetch(id: string): Promise<PaymentIntent>;
|
|
1077
|
+
/**
|
|
1078
|
+
* Every status change an intent went through, oldest first — who moved it
|
|
1079
|
+
* (`api`, `validate`, `observer`, `system`), when, and with which transaction.
|
|
1080
|
+
*/
|
|
1081
|
+
transitions(id: string): Promise<PaymentIntentTransitionData[]>;
|
|
915
1082
|
/** List the consumer's payment intents (paginated). */
|
|
916
1083
|
list(options?: ListPaymentIntentsOptions): Promise<PaymentIntentPage>;
|
|
917
1084
|
/** Update a payment intent (status / txHash / reference). */
|
|
@@ -984,7 +1151,68 @@ declare class ProductManager extends BaseManager<Product> {
|
|
|
984
1151
|
}
|
|
985
1152
|
|
|
986
1153
|
/**
|
|
987
|
-
* A
|
|
1154
|
+
* A same-chain swap on Solana (built by Jupiter) or Monad (built by Kuru Flow),
|
|
1155
|
+
* from `client.swaps` with `chain: 'solana' | 'monad'`.
|
|
1156
|
+
*
|
|
1157
|
+
* Non-custodial like a Stellar {@link Swap}: sign {@link transaction} in the
|
|
1158
|
+
* wallet that owns {@link source}, then `await swap.submit({ signedTransaction })`.
|
|
1159
|
+
* The server checks it is the transaction it built before broadcasting it. On
|
|
1160
|
+
* Monad, when {@link approval} is set, send and confirm that `approve` call first.
|
|
1161
|
+
*/
|
|
1162
|
+
declare class ChainSwap extends Base<ChainSwapData> {
|
|
1163
|
+
chain: OtherSwapChain;
|
|
1164
|
+
network: string;
|
|
1165
|
+
/** The aggregator that built it. */
|
|
1166
|
+
provider: 'jupiter' | 'kuru';
|
|
1167
|
+
status: SwapStatus;
|
|
1168
|
+
/** The wallet that signs, pays and receives. */
|
|
1169
|
+
source: string;
|
|
1170
|
+
/** `native`, or the SPL mint / ERC-20 address. */
|
|
1171
|
+
sendAsset: string;
|
|
1172
|
+
sendAmount: string;
|
|
1173
|
+
destAsset: string;
|
|
1174
|
+
destEstimated: string;
|
|
1175
|
+
destMin: string;
|
|
1176
|
+
feeBps: number;
|
|
1177
|
+
/** The commission, in the destination asset. */
|
|
1178
|
+
feeAmount: string;
|
|
1179
|
+
slippageBps: number;
|
|
1180
|
+
path: {
|
|
1181
|
+
code: string;
|
|
1182
|
+
issuer: string | null;
|
|
1183
|
+
}[];
|
|
1184
|
+
/** What the wallet signs. */
|
|
1185
|
+
transaction: ChainSwapTransaction;
|
|
1186
|
+
/** Monad ERC-20 sales with a short allowance: the `approve` call to send first. */
|
|
1187
|
+
approval: EvmCallData | null;
|
|
1188
|
+
txHash: string | null;
|
|
1189
|
+
idempotencyKey: string | null;
|
|
1190
|
+
/** Submit refuses the transaction after this. */
|
|
1191
|
+
expiresAt: Date;
|
|
1192
|
+
createdAt: Date;
|
|
1193
|
+
updatedAt: Date;
|
|
1194
|
+
constructor(client: Client, data: ChainSwapData);
|
|
1195
|
+
protected _patch(data: ChainSwapData): this;
|
|
1196
|
+
/** Whether the swap has settled on-chain. */
|
|
1197
|
+
get isSucceeded(): boolean;
|
|
1198
|
+
/** Whether the swap is still awaiting submission. */
|
|
1199
|
+
get isPending(): boolean;
|
|
1200
|
+
/** Whether the built transaction can no longer be submitted. */
|
|
1201
|
+
get isStale(): boolean;
|
|
1202
|
+
/** Re-fetch this swap from the API. */
|
|
1203
|
+
fetch(): Promise<ChainSwap>;
|
|
1204
|
+
/**
|
|
1205
|
+
* Relay the signed transaction. Mutates this instance from the refreshed
|
|
1206
|
+
* swap in the outcome and returns the outcome.
|
|
1207
|
+
*/
|
|
1208
|
+
submit(options: {
|
|
1209
|
+
signedTransaction: string;
|
|
1210
|
+
}): Promise<ChainSwapSubmitOutcome>;
|
|
1211
|
+
toJSON(): ChainSwapData;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
/**
|
|
1215
|
+
* A Stellar path-payment swap. Solana and Monad swaps are {@link ChainSwap}.
|
|
988
1216
|
*
|
|
989
1217
|
* Wraps the raw API payload with typed accessors and atomic action methods so
|
|
990
1218
|
* you can operate on it directly: `await swap.fetch()`,
|
|
@@ -1041,18 +1269,20 @@ declare class Swap extends Base<SwapData> {
|
|
|
1041
1269
|
* Relay the signed transaction for this swap. Mutates this instance from the
|
|
1042
1270
|
* refreshed swap in the outcome and returns the outcome.
|
|
1043
1271
|
*/
|
|
1044
|
-
submit(options:
|
|
1272
|
+
submit(options: {
|
|
1273
|
+
signedXdr: string;
|
|
1274
|
+
}): Promise<SwapSubmitOutcome>;
|
|
1045
1275
|
toJSON(): SwapData;
|
|
1046
1276
|
}
|
|
1047
1277
|
|
|
1048
1278
|
/** A page of swaps plus its pagination metadata. */
|
|
1049
|
-
interface SwapPage {
|
|
1050
|
-
items:
|
|
1279
|
+
interface SwapPage<T extends Swap | ChainSwap = Swap> {
|
|
1280
|
+
items: T[];
|
|
1051
1281
|
total: number;
|
|
1052
1282
|
take: number;
|
|
1053
1283
|
skip: number;
|
|
1054
1284
|
}
|
|
1055
|
-
/** Submission outcome with the refreshed swap materialized. */
|
|
1285
|
+
/** Submission outcome of a Stellar swap, with the refreshed swap materialized. */
|
|
1056
1286
|
interface SwapSubmitOutcome {
|
|
1057
1287
|
submitted: boolean;
|
|
1058
1288
|
status: SwapStatus;
|
|
@@ -1061,33 +1291,53 @@ interface SwapSubmitOutcome {
|
|
|
1061
1291
|
resultCodes: string[] | null;
|
|
1062
1292
|
swap: Swap;
|
|
1063
1293
|
}
|
|
1294
|
+
/** Submission outcome of a Solana or Monad swap. */
|
|
1295
|
+
interface ChainSwapSubmitOutcome {
|
|
1296
|
+
submitted: boolean;
|
|
1297
|
+
status: SwapStatus;
|
|
1298
|
+
txHash: string;
|
|
1299
|
+
swap: ChainSwap;
|
|
1300
|
+
}
|
|
1301
|
+
/** A request that names a chain off Stellar. */
|
|
1302
|
+
type OnOtherChain = {
|
|
1303
|
+
chain: OtherSwapChain;
|
|
1304
|
+
};
|
|
1064
1305
|
/**
|
|
1065
|
-
*
|
|
1306
|
+
* Same-chain swaps — `client.swaps`. No `chain` (or `'stellar'`) is a Stellar
|
|
1307
|
+
* path payment and yields a {@link Swap}, exactly as before; `'solana'` goes
|
|
1308
|
+
* through Jupiter and `'monad'` through Kuru Flow and yields a {@link ChainSwap}.
|
|
1309
|
+
* Swaps between chains are `client.crossChainSwaps`.
|
|
1066
1310
|
*
|
|
1067
1311
|
* @example
|
|
1068
|
-
* const quote = await client.swaps.quote({
|
|
1069
|
-
* amount: '100', destAssetCode: 'USDC',
|
|
1070
|
-
* });
|
|
1071
1312
|
* const swap = await client.swaps.create({
|
|
1072
|
-
* amount: '100', destAssetCode: 'USDC', source: 'G...',
|
|
1313
|
+
* amount: '100', destAssetCode: 'USDC', destAssetIssuer: 'GA5Z…', source: 'G...',
|
|
1073
1314
|
* });
|
|
1074
1315
|
* console.log(swap.uri, swap.qr);
|
|
1316
|
+
*
|
|
1317
|
+
* const sol = await client.swaps.create({
|
|
1318
|
+
* chain: 'solana', amount: '0.1', sourceAssetCode: 'SOL',
|
|
1319
|
+
* destAssetCode: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', source: wallet,
|
|
1320
|
+
* });
|
|
1321
|
+
* await sol.submit({ signedTransaction: signInWallet(sol.transaction) });
|
|
1075
1322
|
*/
|
|
1076
|
-
declare class SwapManager extends BaseManager<Swap> {
|
|
1323
|
+
declare class SwapManager extends BaseManager<Swap | ChainSwap> {
|
|
1077
1324
|
private readonly route;
|
|
1078
1325
|
/** Price a swap without creating it. Returns a plain quote (not a {@link Swap}). */
|
|
1079
1326
|
quote(options: QuoteSwapOptions): Promise<SwapQuoteData>;
|
|
1080
|
-
/** Create a swap
|
|
1327
|
+
/** Create a swap: an unsigned transaction for the source wallet to sign. */
|
|
1328
|
+
create(options: CreateSwapOptions & OnOtherChain): Promise<ChainSwap>;
|
|
1081
1329
|
create(options: CreateSwapOptions): Promise<Swap>;
|
|
1082
|
-
/** Get a single swap by id. */
|
|
1083
|
-
fetch(id: string): Promise<Swap>;
|
|
1084
|
-
/** List the consumer's swaps (
|
|
1085
|
-
list(options
|
|
1330
|
+
/** Get a single swap by id, on any chain. */
|
|
1331
|
+
fetch(id: string): Promise<Swap | ChainSwap>;
|
|
1332
|
+
/** List the consumer's swaps on one chain (Stellar when `chain` is omitted). */
|
|
1333
|
+
list(options: ListSwapsOptions & OnOtherChain): Promise<SwapPage<ChainSwap>>;
|
|
1334
|
+
list(options?: ListSwapsOptions): Promise<SwapPage<Swap>>;
|
|
1086
1335
|
/**
|
|
1087
|
-
* Relay a signed swap transaction to
|
|
1088
|
-
*
|
|
1336
|
+
* Relay a signed swap transaction to its network: `{ signedXdr }` for a
|
|
1337
|
+
* Stellar swap, `{ signedTransaction }` for a Solana or Monad one.
|
|
1089
1338
|
*/
|
|
1090
|
-
submit(id: string, options: SubmitSwapOptions): Promise<SwapSubmitOutcome>;
|
|
1339
|
+
submit(id: string, options: SubmitSwapOptions): Promise<SwapSubmitOutcome | ChainSwapSubmitOutcome>;
|
|
1340
|
+
private materialize;
|
|
1091
1341
|
}
|
|
1092
1342
|
|
|
1093
1343
|
/** A single attempt to deliver an event to a webhook endpoint (audit record). */
|
|
@@ -1177,21 +1427,17 @@ type WebhookHandlerOptions = WebhookProcessOptions;
|
|
|
1177
1427
|
* event type (`PAYMENT_INTENT_SUCCEEDED`), its camelCase alias
|
|
1178
1428
|
* (`paymentIntentSucceeded`), or `event` to catch them all.
|
|
1179
1429
|
*/
|
|
1180
|
-
|
|
1181
|
-
event: [
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
paymentIntentFailed: [WebhookEvent<PaymentIntentData>];
|
|
1192
|
-
paymentIntentCancelled: [WebhookEvent<PaymentIntentData>];
|
|
1193
|
-
paymentIntentDeleted: [WebhookEvent<PaymentIntentData>];
|
|
1194
|
-
}
|
|
1430
|
+
type WebhookListenerEvents = {
|
|
1431
|
+
event: [AnyWebhookEvent];
|
|
1432
|
+
} & {
|
|
1433
|
+
[K in keyof WebhookEventDataMap]: [TypedWebhookEvent<K>];
|
|
1434
|
+
} & {
|
|
1435
|
+
[K in keyof WebhookEventDataMap as CamelEvent<K>]: [TypedWebhookEvent<K>];
|
|
1436
|
+
};
|
|
1437
|
+
/** `SWAP_SUCCEEDED` → `SwapSucceeded`. */
|
|
1438
|
+
type PascalEvent<S extends string> = S extends `${infer H}_${infer T}` ? `${Capitalize<Lowercase<H>>}${PascalEvent<T>}` : Capitalize<Lowercase<S>>;
|
|
1439
|
+
/** `SWAP_SUCCEEDED` → `swapSucceeded`, the alias each event is also emitted as. */
|
|
1440
|
+
type CamelEvent<S extends string> = Uncapitalize<PascalEvent<S>>;
|
|
1195
1441
|
/** Minimal Express-like request (so we don't depend on `@types/express`). */
|
|
1196
1442
|
interface RequestLike {
|
|
1197
1443
|
headers: Record<string, string | string[] | undefined>;
|
|
@@ -1261,7 +1507,7 @@ declare class WebhookManager extends BaseManager<WebhookEndpoint> {
|
|
|
1261
1507
|
*
|
|
1262
1508
|
* @throws {WebhookSignatureError} when the signature is missing/invalid.
|
|
1263
1509
|
*/
|
|
1264
|
-
process(rawBody: string | Uint8Array, signatureHeader: string | null | undefined, options?: WebhookProcessOptions):
|
|
1510
|
+
process(rawBody: string | Uint8Array, signatureHeader: string | null | undefined, options?: WebhookProcessOptions): AnyWebhookEvent;
|
|
1265
1511
|
/**
|
|
1266
1512
|
* Build a Node.js `http`/`https` request handler that verifies the signature,
|
|
1267
1513
|
* dispatches the event to your listeners, and replies `200`/`400`.
|
|
@@ -1414,7 +1660,7 @@ interface Client {
|
|
|
1414
1660
|
*/
|
|
1415
1661
|
declare class Client extends EventEmitter {
|
|
1416
1662
|
/** Library version. */
|
|
1417
|
-
static readonly version = "2.
|
|
1663
|
+
static readonly version = "2.2.0";
|
|
1418
1664
|
/**
|
|
1419
1665
|
* Process-wide shared defaults maintained by Cosmos Pay (gateway URL, version,
|
|
1420
1666
|
* internal secrets). Mutate once at startup to change them for every client
|
|
@@ -1433,8 +1679,10 @@ declare class Client extends EventEmitter {
|
|
|
1433
1679
|
readonly webhooks: WebhookManager;
|
|
1434
1680
|
/** Products / prices. */
|
|
1435
1681
|
readonly products: ProductManager;
|
|
1436
|
-
/**
|
|
1682
|
+
/** Same-chain swaps: the Stellar DEX, Jupiter on Solana, Kuru Flow on Monad. */
|
|
1437
1683
|
readonly swaps: SwapManager;
|
|
1684
|
+
/** Swaps between Stellar, Solana and Monad, settled by NEAR Intents. */
|
|
1685
|
+
readonly crossChainSwaps: CrossChainSwapManager;
|
|
1438
1686
|
/** Liquidity pools: browse, positions, deposit / withdraw. */
|
|
1439
1687
|
readonly liquidity: LiquidityManager;
|
|
1440
1688
|
/** Fiat -> stablecoin: quotes, payins, trustlines, virtual accounts. */
|
|
@@ -1445,14 +1693,22 @@ declare class Client extends EventEmitter {
|
|
|
1445
1693
|
readonly activity: ActivityManager;
|
|
1446
1694
|
/** KYC / KYB: receivers, their wallets and their bank accounts. */
|
|
1447
1695
|
readonly kyc: KycManager;
|
|
1448
|
-
/** Pollar: social login, its sessions, and the custodial wallets behind them. */
|
|
1449
|
-
readonly pollar: PollarManager;
|
|
1450
1696
|
/** Customers. */
|
|
1451
1697
|
readonly customers: CustomerManager;
|
|
1452
1698
|
/** Read-only analytics (summary, balances, logs). */
|
|
1453
1699
|
readonly analytics: AnalyticsManager;
|
|
1454
1700
|
/** Service health probes (public). */
|
|
1455
1701
|
readonly health: HealthManager;
|
|
1702
|
+
/** Payment handles: resolve, claim and manage `@name` aliases. */
|
|
1703
|
+
readonly aliases: AliasManager;
|
|
1704
|
+
/** The asset registry: which `(code, issuer)` pairs exist per network, and who issues them. */
|
|
1705
|
+
readonly assets: AssetManager;
|
|
1706
|
+
/** Plugins this deployment serves: install, query, command. */
|
|
1707
|
+
readonly plugins: PluginManager;
|
|
1708
|
+
/** DeFindex vaults (when the deployment enables the native plugin). */
|
|
1709
|
+
readonly defindex: DefindexManager;
|
|
1710
|
+
/** The shared public API key an open-source wallet embeds. */
|
|
1711
|
+
readonly publicKey: PublicKeyManager;
|
|
1456
1712
|
constructor(options: ClientOptions);
|
|
1457
1713
|
/** Update the API key used for subsequent requests. */
|
|
1458
1714
|
setApiKey(apiKey: string): this;
|
|
@@ -1517,7 +1773,7 @@ declare const Webhooks: {
|
|
|
1517
1773
|
};
|
|
1518
1774
|
|
|
1519
1775
|
/** Library version, kept in sync with package.json. */
|
|
1520
|
-
declare const version = "2.
|
|
1776
|
+
declare const version = "2.2.0";
|
|
1521
1777
|
/**
|
|
1522
1778
|
* Default base URL of the Cosmos Pay gateway. Maintained by Cosmos Pay — users
|
|
1523
1779
|
* never need to set this; it's part of the {@link shared} configuration. Override
|
|
@@ -1549,4 +1805,5 @@ declare const Events: {
|
|
|
1549
1805
|
};
|
|
1550
1806
|
type ClientEvent = (typeof Events)[keyof typeof Events];
|
|
1551
1807
|
|
|
1552
|
-
export {
|
|
1808
|
+
export { ActivityEventInput, ActivityListData, ActivityManager, ActivityReportData, ActivitySummaryData, AddAliasAddressOptions, AliasAddressData, AliasAvailabilityData, AliasByAddressData, AliasChallengeData, AliasDeletedData, AliasListData, AliasManager, AliasRecoveryStartedData, AliasResolutionData, AnalyticsBalancesData, AnalyticsManager, AnalyticsSummaryData, AnyWebhookEvent, ApiLogsData, ApproveReceiverOptions, AssetManager, AssetRegistryData, AttachPayoutDocumentOptions, AuthorizePayoutData, AuthorizePayoutOptions, BankAccountData, BankDetailsData, Base, BaseManager, BrowseLiquidityPoolsOptions, ChainSwap, ChainSwapData, ChainSwapTransaction, ClaimAliasOptions, Client, CompleteAliasRecoveryOptions, CreateAliasChallengeOptions, CreateBankAccountOptions, CreateCrossChainSwapOptions, CreateCustomerOptions, CreatePayPaymentIntentOptions, CreatePayinOptions, CreatePayinQuoteOptions, CreatePayoutOptions, CreatePayoutQuoteOptions, CreateProductOptions, CreateReceiverOptions, CreateReceiverWalletOptions, CreateSwapOptions, CreateTrustlineOptions, CreateTxPaymentIntentOptions, CreateVirtualAccountOptions, CreateWebhookEndpointOptions, CrossChainAssetData, CrossChainQuoteData, CrossChainSwap, CrossChainSwapData, CrossChainSwapManager, CrossChainSwapStatus, CrossChainTransactionData, Customer, CustomerData, CustomerManager, DEFAULT_BASE_URL, DEFAULT_RETRIES, DEFAULT_TIMEOUT, DEFAULT_VERSION, DefindexDepositOptions, DefindexManager, DefindexWithdrawOptions, DeletedData, DepositLiquidityOptions, EnableReceiverOptions, Events, EvmCallData, HealthCheckData, HealthManager, InitiateTosOptions, InstallPluginOptions, KycManager, KycRailsData, KycUploadData, LiquidityManager, LiquidityOperation, LiquidityOperationData, LiquidityOperationKind, LiquidityOperationStatus, LiquidityPoolData, LiquidityPositionsData, ListActivityOptions, ListCrossChainSwapsOptions, ListKycOptions, ListLiquidityOperationsOptions, ListPayinsOptions, ListPaymentIntentsOptions, ListPayoutsOptions, ListRegistryAssetsOptions, ListSwapsOptions, ListWebhookDeliveriesOptions, OfframpManager, OnrampManager, OtherSwapChain, OwnedAliasData, PayinData, PayinQuoteData, PaymentChain, PaymentIntent, PaymentIntentData, PaymentIntentKind, PaymentIntentManager, PaymentIntentStatus, PaymentIntentTransitionData, PayoutData, PayoutDocumentData, PayoutQuoteData, PluginActionResultData, PluginData, PluginManager, PluginUninstalledData, Product, ProductData, ProductKind, ProductManager, PublicKeyData, PublicKeyManager, QuoteCrossChainSwapOptions, QuoteSwapOptions, REST, Receiver, ReceiverData, ReceiverWalletData, ReportActivityOptions, RequestTosOptions, SIGNATURE_HEADER, SetReceiverAccessOptions, SubmitLiquidityOptions, SubmitSwapOptions, Swap, SwapChain, SwapData, SwapManager, SwapQuoteData, SwapStatus, TermsOfServiceData, TrustlineData, TypedWebhookEvent, UpdateCustomerOptions, UpdatePaymentIntentOptions, UpdateProductOptions, UpdateReceiverOptions, UpdateWebhookEndpointOptions, ValidatePaymentIntentOptions, ValidationOutcomeData, VirtualAccountData, WalletSignMessageData, WebhookDelivery, WebhookDeliveryData, WebhookDeliveryStatus, WebhookEndpoint, WebhookEndpointData, WebhookEndpointWithSecretData, WebhookEvent, WebhookEventDataMap, WebhookEventType, WebhookLogsData, WebhookManager, WebhookPingData, WebhookSignatureError, Webhooks, WithdrawLiquidityOptions, resolveShared, shared, version };
|
|
1809
|
+
export type { ActivityPage, BankAccountPage, ChainSwapSubmitOutcome, ClientEvent, ClientEvents, ClientOptions, CrossChainSwapPage, FetchLike, LiquidityOperationPage, LiquidityPoolPage, LiquiditySubmitOutcome, PayinPage, PaymentIntentPage, PayoutPage, RESTOptions, ReceiverPage, ReceiverWalletPage, RequestOptions, SharedConfig, SwapPage, SwapSubmitOutcome, ValidationOutcome, VerifyWebhookOptions, WebhookDeliveryPage, WebhookHandlerOptions, WebhookListenerEvents, WebhookProcessOptions };
|