@unifold/core 0.1.65 → 0.1.67
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.mts +72 -5
- package/dist/index.d.ts +72 -5
- package/dist/index.js +7 -0
- package/dist/index.mjs +6 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -111,7 +111,7 @@ interface IconUrl {
|
|
|
111
111
|
format: "svg" | "png";
|
|
112
112
|
}
|
|
113
113
|
type ProductType = "deposit" | "payment";
|
|
114
|
-
interface
|
|
114
|
+
interface DirectExecutionResponse {
|
|
115
115
|
id: string;
|
|
116
116
|
project_id: string;
|
|
117
117
|
user_id: string;
|
|
@@ -160,7 +160,7 @@ interface QueryExecutionsRequest {
|
|
|
160
160
|
action_type?: ActionType;
|
|
161
161
|
}
|
|
162
162
|
interface QueryExecutionsResponse {
|
|
163
|
-
data:
|
|
163
|
+
data: DirectExecutionResponse[];
|
|
164
164
|
total_count: number;
|
|
165
165
|
has_more: boolean;
|
|
166
166
|
}
|
|
@@ -1032,8 +1032,10 @@ interface PaymentIntent {
|
|
|
1032
1032
|
*/
|
|
1033
1033
|
declare function retrievePaymentIntent(clientSecret: string, publishableKey?: string): Promise<PaymentIntent>;
|
|
1034
1034
|
interface PaymentIntentExecutionsResponse {
|
|
1035
|
-
data:
|
|
1035
|
+
data: DirectExecutionResponse[];
|
|
1036
1036
|
}
|
|
1037
|
+
/** @deprecated Use `DirectExecutionResponse` instead. */
|
|
1038
|
+
type AutoSwapResponse = DirectExecutionResponse;
|
|
1037
1039
|
/**
|
|
1038
1040
|
* List all executions (deposits/swaps) for a payment intent.
|
|
1039
1041
|
* Authenticates via client_secret and publishable key.
|
|
@@ -1287,15 +1289,50 @@ declare function generatePrefixedKSUID(prefix: string): string;
|
|
|
1287
1289
|
|
|
1288
1290
|
/** Event types emitted by the deposit flow, following `resource.action` convention */
|
|
1289
1291
|
declare enum DepositEventType {
|
|
1290
|
-
ONRAMP_SESSION_CREATED = "onramp_session.created"
|
|
1292
|
+
ONRAMP_SESSION_CREATED = "onramp_session.created",
|
|
1293
|
+
DIRECT_EXECUTION_SUCCEEDED = "direct_execution.succeeded"
|
|
1291
1294
|
}
|
|
1295
|
+
/** Event types emitted by the withdraw flow, following `resource.action` convention */
|
|
1296
|
+
declare enum WithdrawEventType {
|
|
1297
|
+
DIRECT_EXECUTION_SUCCEEDED = "direct_execution.succeeded"
|
|
1298
|
+
}
|
|
1299
|
+
/** Funding method used by a deposit flow. */
|
|
1300
|
+
type DepositMethod = "transfer" | "card" | "cashapp" | "pay_with_exchange" | "exchange_connect" | "wallet_connect";
|
|
1292
1301
|
/** `data.object` payload for {@link DepositEventType.ONRAMP_SESSION_CREATED} */
|
|
1293
1302
|
interface OnrampSessionCreatedData {
|
|
1294
1303
|
externalId: string;
|
|
1295
1304
|
}
|
|
1305
|
+
/**
|
|
1306
|
+
* Callback-facing direct execution object.
|
|
1307
|
+
* Intentionally separate from legacy `DirectExecutionResponse` naming.
|
|
1308
|
+
*/
|
|
1309
|
+
interface DirectExecution {
|
|
1310
|
+
id: string;
|
|
1311
|
+
transactionHash: string;
|
|
1312
|
+
recipientAddress: string;
|
|
1313
|
+
depositAddress?: string;
|
|
1314
|
+
sourceChainType: string;
|
|
1315
|
+
sourceChainId: string;
|
|
1316
|
+
sourceTokenAddress: string;
|
|
1317
|
+
destinationChainType: string;
|
|
1318
|
+
destinationChainId: string;
|
|
1319
|
+
destinationTokenAddress: string;
|
|
1320
|
+
sourceAmountBaseUnit: string;
|
|
1321
|
+
sourceAmountUsd?: string;
|
|
1322
|
+
destinationAmountBaseUnit: string;
|
|
1323
|
+
destinationAmountUsd?: string;
|
|
1324
|
+
destinationTransactionHashes: string[];
|
|
1325
|
+
status: ExecutionStatus;
|
|
1326
|
+
failureReason: string | null;
|
|
1327
|
+
}
|
|
1296
1328
|
/** Map from event type to its `data.object` shape */
|
|
1297
1329
|
interface DepositEventDataMap {
|
|
1298
1330
|
[DepositEventType.ONRAMP_SESSION_CREATED]: OnrampSessionCreatedData;
|
|
1331
|
+
[DepositEventType.DIRECT_EXECUTION_SUCCEEDED]: DirectExecution;
|
|
1332
|
+
}
|
|
1333
|
+
/** Map from event type to its `data.object` shape */
|
|
1334
|
+
interface WithdrawEventDataMap {
|
|
1335
|
+
[WithdrawEventType.DIRECT_EXECUTION_SUCCEEDED]: DirectExecution;
|
|
1299
1336
|
}
|
|
1300
1337
|
/**
|
|
1301
1338
|
* Event envelope emitted by the deposit flow, inspired by the server-side
|
|
@@ -1309,15 +1346,45 @@ type DepositEvent = {
|
|
|
1309
1346
|
id: string;
|
|
1310
1347
|
type: K;
|
|
1311
1348
|
created: number;
|
|
1349
|
+
/**
|
|
1350
|
+
* Optional SDK-level context indicating which deposit method triggered
|
|
1351
|
+
* this event (e.g. transfer, wallet_connect).
|
|
1352
|
+
*/
|
|
1353
|
+
method?: DepositMethod;
|
|
1312
1354
|
data: {
|
|
1313
1355
|
object: DepositEventDataMap[K];
|
|
1314
1356
|
};
|
|
1315
1357
|
};
|
|
1316
1358
|
}[DepositEventType];
|
|
1359
|
+
/**
|
|
1360
|
+
* Event envelope emitted by the withdraw flow, matching the same top-level
|
|
1361
|
+
* shape as deposit events.
|
|
1362
|
+
*/
|
|
1363
|
+
type WithdrawEvent = {
|
|
1364
|
+
[K in WithdrawEventType]: {
|
|
1365
|
+
id: string;
|
|
1366
|
+
type: K;
|
|
1367
|
+
created: number;
|
|
1368
|
+
data: {
|
|
1369
|
+
object: WithdrawEventDataMap[K];
|
|
1370
|
+
};
|
|
1371
|
+
};
|
|
1372
|
+
}[WithdrawEventType];
|
|
1317
1373
|
/** Convenience type for a fully-typed `onramp_session.created` event */
|
|
1318
1374
|
type OnrampSessionCreatedEvent = Extract<DepositEvent, {
|
|
1319
1375
|
type: DepositEventType.ONRAMP_SESSION_CREATED;
|
|
1320
1376
|
}>;
|
|
1377
|
+
/**
|
|
1378
|
+
* Event envelope for direct execution success callbacks.
|
|
1379
|
+
* Mirrors the `data.object` schema used by {@link DepositEvent}.
|
|
1380
|
+
*/
|
|
1381
|
+
type DirectExecutionSucceededEvent = Extract<DepositEvent, {
|
|
1382
|
+
type: DepositEventType.DIRECT_EXECUTION_SUCCEEDED;
|
|
1383
|
+
}>;
|
|
1384
|
+
/** Convenience type for a fully-typed `direct_execution.succeeded` withdraw event */
|
|
1385
|
+
type WithdrawDirectExecutionSucceededEvent = Extract<WithdrawEvent, {
|
|
1386
|
+
type: WithdrawEventType.DIRECT_EXECUTION_SUCCEEDED;
|
|
1387
|
+
}>;
|
|
1321
1388
|
|
|
1322
1389
|
/**
|
|
1323
1390
|
* User IP information interface
|
|
@@ -1441,4 +1508,4 @@ declare const i18n: {
|
|
|
1441
1508
|
};
|
|
1442
1509
|
type I18nStrings = typeof i18n;
|
|
1443
1510
|
|
|
1444
|
-
export { ActionType, type AddressBalanceResponse, type AddressBalancesResponse, type AddressValidationFailureCode, type AddressValidationMetadata, type AuthenticateOAuthResult, type AutoSwapRequest, type AutoSwapResponse, type BlockedCountrySubdivision, type BuildHypercoreTransactionRequest, type BuildHypercoreTransactionResponse, type BuildSolanaTransactionRequest, type BuildSolanaTransactionResponse, type CashAppLimits, type CashAppSessionRequest, type CashAppSessionResponse, type CashAppSessionStatusResponse, type ChainType, type ConfirmIntegrationTransferResult, type CreateDepositAddressRequest, type CreateExchangeSessionRequest, type CreateExchangeSessionResponse, type CreateIntegrationTransferParams, type CreateIntegrationTransferResult, type DefaultTokenChain, type DefaultTokenMetadata, type DefaultTokenResponse, type DepositAddressResponse, type DepositEvent, DepositEventType, type DepositQuote, type DepositQuoteRequest, type DestinationToken, type DestinationTokenChain, type EvmContractCall, type ExchangeProviderInfo, type ExchangeProvidersResponse, type ExchangeSessionStartParams, type ExchangeWalletAddress, ExecutionStatus, type ExternalWalletChainType, type ExternalWalletInfo, type ExternalWalletsResponse, type FeaturedToken, type FeaturedWallet, type FiatCurrenciesResponse, type FiatCurrency, type GetExchangesQuery, type HypercoreActivationRequest, type HypercoreActivationResponse, type I18nStrings, type IconUrl, IneligibilityReason, type IntegrationAccount, type IntegrationExchangeInfo, type IntegrationExchangesResponse, type IntegrationFeeAmount, type IntegrationHoldingsResponse, IntegrationProvider, type IpAddressResponse, type LockedQuoteLimits, type LockedQuotePreview, type LockedQuotePreviewRequest, type OnrampQuote, type OnrampQuotesRequest, type OnrampQuotesResponse, type OnrampSessionCreatedData, type OnrampSessionCreatedEvent, type OnrampSessionRequest, type OnrampSessionResponse, type PaymentIntent, type PaymentIntentDepositAddress, type PaymentIntentExecutionsResponse, type PaymentIntentStatus, type PaymentIntentType, type PaymentNetwork, type PollExecutionsRequest, type PollExecutionsResponse, type ProductType, type ProjectConfigResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, type RefreshIntegrationTokenResult, SOLANA_USDC_ADDRESS, type SendHypercoreTransactionRequest, type SendHypercoreTransactionResponse, type SendSolanaTransactionRequest, type SendSolanaTransactionResponse, type SourceToken, type SourceTokenNetwork, type StartIntegrationOAuthResult, type SupportedChain, type SupportedDepositTokensResponse, type SupportedDestinationTokensResponse, type SupportedSourceTokensQuery, type SupportedSourceTokensResponse, type SupportedToken, type TokenBalance, type TokenChain, type TokenChainIconUrl, type TokenChainsResponse, type TokenIconUrl, type TokenInfo, type TokenMetadata, type TransferDefaultTokenParams, type TransferDefaultTokenResult, type UserIpInfo, type VerifyAddressRequest, type VerifyAddressResponse, type Wallet, type WalletMobileDeepLinkDepositAddress, type WalletMobileDeepLinkResponse, type WalletMobileDeepLinkWallet, authenticateIntegrationOAuth, buildHypercoreTransaction, buildSolanaTransaction, checkHypercoreActivation, confirmIntegrationTransfer, createCashAppSession, createDepositAddress, createExchangeSession, createIntegrationTransfer, createOnrampSession, formatStablecoinAmount, generateKSUID, generatePrefixedKSUID, getAddressBalance, getAddressBalances, getApiBaseUrl, getCashAppLimits, getCashAppSessionStatus, getChainName, getDefaultOnrampToken, getDepositAddress, getDepositQuote, getExchangeSessionStartUrl, getExchanges, getExternalWallets, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getIntegrationExchanges, getIntegrationHoldings, getIntegrationTransferDefaultToken, getIpAddress, getOnrampQuotes, getOnrampSessionStartUrl, getPreferredIconUrl, getProjectConfig, getSupportedDepositTokens, getSupportedDestinationTokens, getTokenChains, getTokenMetadata, getWalletByChainType, getWalletMobileDeepLink, i18n, listPaymentIntentExecutions, pollDirectExecutions, queryExecutions, refreshIntegrationToken, retrievePaymentIntent, revokeIntegrationToken, sendHypercoreTransaction, sendSolanaTransaction, setApiConfig, startIntegrationOAuth, useUserIp, verifyRecipientAddress };
|
|
1511
|
+
export { ActionType, type AddressBalanceResponse, type AddressBalancesResponse, type AddressValidationFailureCode, type AddressValidationMetadata, type AuthenticateOAuthResult, type AutoSwapRequest, type AutoSwapResponse, type BlockedCountrySubdivision, type BuildHypercoreTransactionRequest, type BuildHypercoreTransactionResponse, type BuildSolanaTransactionRequest, type BuildSolanaTransactionResponse, type CashAppLimits, type CashAppSessionRequest, type CashAppSessionResponse, type CashAppSessionStatusResponse, type ChainType, type ConfirmIntegrationTransferResult, type CreateDepositAddressRequest, type CreateExchangeSessionRequest, type CreateExchangeSessionResponse, type CreateIntegrationTransferParams, type CreateIntegrationTransferResult, type DefaultTokenChain, type DefaultTokenMetadata, type DefaultTokenResponse, type DepositAddressResponse, type DepositEvent, DepositEventType, type DepositMethod, type DepositQuote, type DepositQuoteRequest, type DestinationToken, type DestinationTokenChain, type DirectExecution, type DirectExecutionResponse, type DirectExecutionSucceededEvent, type EvmContractCall, type ExchangeProviderInfo, type ExchangeProvidersResponse, type ExchangeSessionStartParams, type ExchangeWalletAddress, ExecutionStatus, type ExternalWalletChainType, type ExternalWalletInfo, type ExternalWalletsResponse, type FeaturedToken, type FeaturedWallet, type FiatCurrenciesResponse, type FiatCurrency, type GetExchangesQuery, type HypercoreActivationRequest, type HypercoreActivationResponse, type I18nStrings, type IconUrl, IneligibilityReason, type IntegrationAccount, type IntegrationExchangeInfo, type IntegrationExchangesResponse, type IntegrationFeeAmount, type IntegrationHoldingsResponse, IntegrationProvider, type IpAddressResponse, type LockedQuoteLimits, type LockedQuotePreview, type LockedQuotePreviewRequest, type OnrampQuote, type OnrampQuotesRequest, type OnrampQuotesResponse, type OnrampSessionCreatedData, type OnrampSessionCreatedEvent, type OnrampSessionRequest, type OnrampSessionResponse, type PaymentIntent, type PaymentIntentDepositAddress, type PaymentIntentExecutionsResponse, type PaymentIntentStatus, type PaymentIntentType, type PaymentNetwork, type PollExecutionsRequest, type PollExecutionsResponse, type ProductType, type ProjectConfigResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, type RefreshIntegrationTokenResult, SOLANA_USDC_ADDRESS, type SendHypercoreTransactionRequest, type SendHypercoreTransactionResponse, type SendSolanaTransactionRequest, type SendSolanaTransactionResponse, type SourceToken, type SourceTokenNetwork, type StartIntegrationOAuthResult, type SupportedChain, type SupportedDepositTokensResponse, type SupportedDestinationTokensResponse, type SupportedSourceTokensQuery, type SupportedSourceTokensResponse, type SupportedToken, type TokenBalance, type TokenChain, type TokenChainIconUrl, type TokenChainsResponse, type TokenIconUrl, type TokenInfo, type TokenMetadata, type TransferDefaultTokenParams, type TransferDefaultTokenResult, type UserIpInfo, type VerifyAddressRequest, type VerifyAddressResponse, type Wallet, type WalletMobileDeepLinkDepositAddress, type WalletMobileDeepLinkResponse, type WalletMobileDeepLinkWallet, type WithdrawDirectExecutionSucceededEvent, type WithdrawEvent, WithdrawEventType, authenticateIntegrationOAuth, buildHypercoreTransaction, buildSolanaTransaction, checkHypercoreActivation, confirmIntegrationTransfer, createCashAppSession, createDepositAddress, createExchangeSession, createIntegrationTransfer, createOnrampSession, formatStablecoinAmount, generateKSUID, generatePrefixedKSUID, getAddressBalance, getAddressBalances, getApiBaseUrl, getCashAppLimits, getCashAppSessionStatus, getChainName, getDefaultOnrampToken, getDepositAddress, getDepositQuote, getExchangeSessionStartUrl, getExchanges, getExternalWallets, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getIntegrationExchanges, getIntegrationHoldings, getIntegrationTransferDefaultToken, getIpAddress, getOnrampQuotes, getOnrampSessionStartUrl, getPreferredIconUrl, getProjectConfig, getSupportedDepositTokens, getSupportedDestinationTokens, getTokenChains, getTokenMetadata, getWalletByChainType, getWalletMobileDeepLink, i18n, listPaymentIntentExecutions, pollDirectExecutions, queryExecutions, refreshIntegrationToken, retrievePaymentIntent, revokeIntegrationToken, sendHypercoreTransaction, sendSolanaTransaction, setApiConfig, startIntegrationOAuth, useUserIp, verifyRecipientAddress };
|
package/dist/index.d.ts
CHANGED
|
@@ -111,7 +111,7 @@ interface IconUrl {
|
|
|
111
111
|
format: "svg" | "png";
|
|
112
112
|
}
|
|
113
113
|
type ProductType = "deposit" | "payment";
|
|
114
|
-
interface
|
|
114
|
+
interface DirectExecutionResponse {
|
|
115
115
|
id: string;
|
|
116
116
|
project_id: string;
|
|
117
117
|
user_id: string;
|
|
@@ -160,7 +160,7 @@ interface QueryExecutionsRequest {
|
|
|
160
160
|
action_type?: ActionType;
|
|
161
161
|
}
|
|
162
162
|
interface QueryExecutionsResponse {
|
|
163
|
-
data:
|
|
163
|
+
data: DirectExecutionResponse[];
|
|
164
164
|
total_count: number;
|
|
165
165
|
has_more: boolean;
|
|
166
166
|
}
|
|
@@ -1032,8 +1032,10 @@ interface PaymentIntent {
|
|
|
1032
1032
|
*/
|
|
1033
1033
|
declare function retrievePaymentIntent(clientSecret: string, publishableKey?: string): Promise<PaymentIntent>;
|
|
1034
1034
|
interface PaymentIntentExecutionsResponse {
|
|
1035
|
-
data:
|
|
1035
|
+
data: DirectExecutionResponse[];
|
|
1036
1036
|
}
|
|
1037
|
+
/** @deprecated Use `DirectExecutionResponse` instead. */
|
|
1038
|
+
type AutoSwapResponse = DirectExecutionResponse;
|
|
1037
1039
|
/**
|
|
1038
1040
|
* List all executions (deposits/swaps) for a payment intent.
|
|
1039
1041
|
* Authenticates via client_secret and publishable key.
|
|
@@ -1287,15 +1289,50 @@ declare function generatePrefixedKSUID(prefix: string): string;
|
|
|
1287
1289
|
|
|
1288
1290
|
/** Event types emitted by the deposit flow, following `resource.action` convention */
|
|
1289
1291
|
declare enum DepositEventType {
|
|
1290
|
-
ONRAMP_SESSION_CREATED = "onramp_session.created"
|
|
1292
|
+
ONRAMP_SESSION_CREATED = "onramp_session.created",
|
|
1293
|
+
DIRECT_EXECUTION_SUCCEEDED = "direct_execution.succeeded"
|
|
1291
1294
|
}
|
|
1295
|
+
/** Event types emitted by the withdraw flow, following `resource.action` convention */
|
|
1296
|
+
declare enum WithdrawEventType {
|
|
1297
|
+
DIRECT_EXECUTION_SUCCEEDED = "direct_execution.succeeded"
|
|
1298
|
+
}
|
|
1299
|
+
/** Funding method used by a deposit flow. */
|
|
1300
|
+
type DepositMethod = "transfer" | "card" | "cashapp" | "pay_with_exchange" | "exchange_connect" | "wallet_connect";
|
|
1292
1301
|
/** `data.object` payload for {@link DepositEventType.ONRAMP_SESSION_CREATED} */
|
|
1293
1302
|
interface OnrampSessionCreatedData {
|
|
1294
1303
|
externalId: string;
|
|
1295
1304
|
}
|
|
1305
|
+
/**
|
|
1306
|
+
* Callback-facing direct execution object.
|
|
1307
|
+
* Intentionally separate from legacy `DirectExecutionResponse` naming.
|
|
1308
|
+
*/
|
|
1309
|
+
interface DirectExecution {
|
|
1310
|
+
id: string;
|
|
1311
|
+
transactionHash: string;
|
|
1312
|
+
recipientAddress: string;
|
|
1313
|
+
depositAddress?: string;
|
|
1314
|
+
sourceChainType: string;
|
|
1315
|
+
sourceChainId: string;
|
|
1316
|
+
sourceTokenAddress: string;
|
|
1317
|
+
destinationChainType: string;
|
|
1318
|
+
destinationChainId: string;
|
|
1319
|
+
destinationTokenAddress: string;
|
|
1320
|
+
sourceAmountBaseUnit: string;
|
|
1321
|
+
sourceAmountUsd?: string;
|
|
1322
|
+
destinationAmountBaseUnit: string;
|
|
1323
|
+
destinationAmountUsd?: string;
|
|
1324
|
+
destinationTransactionHashes: string[];
|
|
1325
|
+
status: ExecutionStatus;
|
|
1326
|
+
failureReason: string | null;
|
|
1327
|
+
}
|
|
1296
1328
|
/** Map from event type to its `data.object` shape */
|
|
1297
1329
|
interface DepositEventDataMap {
|
|
1298
1330
|
[DepositEventType.ONRAMP_SESSION_CREATED]: OnrampSessionCreatedData;
|
|
1331
|
+
[DepositEventType.DIRECT_EXECUTION_SUCCEEDED]: DirectExecution;
|
|
1332
|
+
}
|
|
1333
|
+
/** Map from event type to its `data.object` shape */
|
|
1334
|
+
interface WithdrawEventDataMap {
|
|
1335
|
+
[WithdrawEventType.DIRECT_EXECUTION_SUCCEEDED]: DirectExecution;
|
|
1299
1336
|
}
|
|
1300
1337
|
/**
|
|
1301
1338
|
* Event envelope emitted by the deposit flow, inspired by the server-side
|
|
@@ -1309,15 +1346,45 @@ type DepositEvent = {
|
|
|
1309
1346
|
id: string;
|
|
1310
1347
|
type: K;
|
|
1311
1348
|
created: number;
|
|
1349
|
+
/**
|
|
1350
|
+
* Optional SDK-level context indicating which deposit method triggered
|
|
1351
|
+
* this event (e.g. transfer, wallet_connect).
|
|
1352
|
+
*/
|
|
1353
|
+
method?: DepositMethod;
|
|
1312
1354
|
data: {
|
|
1313
1355
|
object: DepositEventDataMap[K];
|
|
1314
1356
|
};
|
|
1315
1357
|
};
|
|
1316
1358
|
}[DepositEventType];
|
|
1359
|
+
/**
|
|
1360
|
+
* Event envelope emitted by the withdraw flow, matching the same top-level
|
|
1361
|
+
* shape as deposit events.
|
|
1362
|
+
*/
|
|
1363
|
+
type WithdrawEvent = {
|
|
1364
|
+
[K in WithdrawEventType]: {
|
|
1365
|
+
id: string;
|
|
1366
|
+
type: K;
|
|
1367
|
+
created: number;
|
|
1368
|
+
data: {
|
|
1369
|
+
object: WithdrawEventDataMap[K];
|
|
1370
|
+
};
|
|
1371
|
+
};
|
|
1372
|
+
}[WithdrawEventType];
|
|
1317
1373
|
/** Convenience type for a fully-typed `onramp_session.created` event */
|
|
1318
1374
|
type OnrampSessionCreatedEvent = Extract<DepositEvent, {
|
|
1319
1375
|
type: DepositEventType.ONRAMP_SESSION_CREATED;
|
|
1320
1376
|
}>;
|
|
1377
|
+
/**
|
|
1378
|
+
* Event envelope for direct execution success callbacks.
|
|
1379
|
+
* Mirrors the `data.object` schema used by {@link DepositEvent}.
|
|
1380
|
+
*/
|
|
1381
|
+
type DirectExecutionSucceededEvent = Extract<DepositEvent, {
|
|
1382
|
+
type: DepositEventType.DIRECT_EXECUTION_SUCCEEDED;
|
|
1383
|
+
}>;
|
|
1384
|
+
/** Convenience type for a fully-typed `direct_execution.succeeded` withdraw event */
|
|
1385
|
+
type WithdrawDirectExecutionSucceededEvent = Extract<WithdrawEvent, {
|
|
1386
|
+
type: WithdrawEventType.DIRECT_EXECUTION_SUCCEEDED;
|
|
1387
|
+
}>;
|
|
1321
1388
|
|
|
1322
1389
|
/**
|
|
1323
1390
|
* User IP information interface
|
|
@@ -1441,4 +1508,4 @@ declare const i18n: {
|
|
|
1441
1508
|
};
|
|
1442
1509
|
type I18nStrings = typeof i18n;
|
|
1443
1510
|
|
|
1444
|
-
export { ActionType, type AddressBalanceResponse, type AddressBalancesResponse, type AddressValidationFailureCode, type AddressValidationMetadata, type AuthenticateOAuthResult, type AutoSwapRequest, type AutoSwapResponse, type BlockedCountrySubdivision, type BuildHypercoreTransactionRequest, type BuildHypercoreTransactionResponse, type BuildSolanaTransactionRequest, type BuildSolanaTransactionResponse, type CashAppLimits, type CashAppSessionRequest, type CashAppSessionResponse, type CashAppSessionStatusResponse, type ChainType, type ConfirmIntegrationTransferResult, type CreateDepositAddressRequest, type CreateExchangeSessionRequest, type CreateExchangeSessionResponse, type CreateIntegrationTransferParams, type CreateIntegrationTransferResult, type DefaultTokenChain, type DefaultTokenMetadata, type DefaultTokenResponse, type DepositAddressResponse, type DepositEvent, DepositEventType, type DepositQuote, type DepositQuoteRequest, type DestinationToken, type DestinationTokenChain, type EvmContractCall, type ExchangeProviderInfo, type ExchangeProvidersResponse, type ExchangeSessionStartParams, type ExchangeWalletAddress, ExecutionStatus, type ExternalWalletChainType, type ExternalWalletInfo, type ExternalWalletsResponse, type FeaturedToken, type FeaturedWallet, type FiatCurrenciesResponse, type FiatCurrency, type GetExchangesQuery, type HypercoreActivationRequest, type HypercoreActivationResponse, type I18nStrings, type IconUrl, IneligibilityReason, type IntegrationAccount, type IntegrationExchangeInfo, type IntegrationExchangesResponse, type IntegrationFeeAmount, type IntegrationHoldingsResponse, IntegrationProvider, type IpAddressResponse, type LockedQuoteLimits, type LockedQuotePreview, type LockedQuotePreviewRequest, type OnrampQuote, type OnrampQuotesRequest, type OnrampQuotesResponse, type OnrampSessionCreatedData, type OnrampSessionCreatedEvent, type OnrampSessionRequest, type OnrampSessionResponse, type PaymentIntent, type PaymentIntentDepositAddress, type PaymentIntentExecutionsResponse, type PaymentIntentStatus, type PaymentIntentType, type PaymentNetwork, type PollExecutionsRequest, type PollExecutionsResponse, type ProductType, type ProjectConfigResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, type RefreshIntegrationTokenResult, SOLANA_USDC_ADDRESS, type SendHypercoreTransactionRequest, type SendHypercoreTransactionResponse, type SendSolanaTransactionRequest, type SendSolanaTransactionResponse, type SourceToken, type SourceTokenNetwork, type StartIntegrationOAuthResult, type SupportedChain, type SupportedDepositTokensResponse, type SupportedDestinationTokensResponse, type SupportedSourceTokensQuery, type SupportedSourceTokensResponse, type SupportedToken, type TokenBalance, type TokenChain, type TokenChainIconUrl, type TokenChainsResponse, type TokenIconUrl, type TokenInfo, type TokenMetadata, type TransferDefaultTokenParams, type TransferDefaultTokenResult, type UserIpInfo, type VerifyAddressRequest, type VerifyAddressResponse, type Wallet, type WalletMobileDeepLinkDepositAddress, type WalletMobileDeepLinkResponse, type WalletMobileDeepLinkWallet, authenticateIntegrationOAuth, buildHypercoreTransaction, buildSolanaTransaction, checkHypercoreActivation, confirmIntegrationTransfer, createCashAppSession, createDepositAddress, createExchangeSession, createIntegrationTransfer, createOnrampSession, formatStablecoinAmount, generateKSUID, generatePrefixedKSUID, getAddressBalance, getAddressBalances, getApiBaseUrl, getCashAppLimits, getCashAppSessionStatus, getChainName, getDefaultOnrampToken, getDepositAddress, getDepositQuote, getExchangeSessionStartUrl, getExchanges, getExternalWallets, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getIntegrationExchanges, getIntegrationHoldings, getIntegrationTransferDefaultToken, getIpAddress, getOnrampQuotes, getOnrampSessionStartUrl, getPreferredIconUrl, getProjectConfig, getSupportedDepositTokens, getSupportedDestinationTokens, getTokenChains, getTokenMetadata, getWalletByChainType, getWalletMobileDeepLink, i18n, listPaymentIntentExecutions, pollDirectExecutions, queryExecutions, refreshIntegrationToken, retrievePaymentIntent, revokeIntegrationToken, sendHypercoreTransaction, sendSolanaTransaction, setApiConfig, startIntegrationOAuth, useUserIp, verifyRecipientAddress };
|
|
1511
|
+
export { ActionType, type AddressBalanceResponse, type AddressBalancesResponse, type AddressValidationFailureCode, type AddressValidationMetadata, type AuthenticateOAuthResult, type AutoSwapRequest, type AutoSwapResponse, type BlockedCountrySubdivision, type BuildHypercoreTransactionRequest, type BuildHypercoreTransactionResponse, type BuildSolanaTransactionRequest, type BuildSolanaTransactionResponse, type CashAppLimits, type CashAppSessionRequest, type CashAppSessionResponse, type CashAppSessionStatusResponse, type ChainType, type ConfirmIntegrationTransferResult, type CreateDepositAddressRequest, type CreateExchangeSessionRequest, type CreateExchangeSessionResponse, type CreateIntegrationTransferParams, type CreateIntegrationTransferResult, type DefaultTokenChain, type DefaultTokenMetadata, type DefaultTokenResponse, type DepositAddressResponse, type DepositEvent, DepositEventType, type DepositMethod, type DepositQuote, type DepositQuoteRequest, type DestinationToken, type DestinationTokenChain, type DirectExecution, type DirectExecutionResponse, type DirectExecutionSucceededEvent, type EvmContractCall, type ExchangeProviderInfo, type ExchangeProvidersResponse, type ExchangeSessionStartParams, type ExchangeWalletAddress, ExecutionStatus, type ExternalWalletChainType, type ExternalWalletInfo, type ExternalWalletsResponse, type FeaturedToken, type FeaturedWallet, type FiatCurrenciesResponse, type FiatCurrency, type GetExchangesQuery, type HypercoreActivationRequest, type HypercoreActivationResponse, type I18nStrings, type IconUrl, IneligibilityReason, type IntegrationAccount, type IntegrationExchangeInfo, type IntegrationExchangesResponse, type IntegrationFeeAmount, type IntegrationHoldingsResponse, IntegrationProvider, type IpAddressResponse, type LockedQuoteLimits, type LockedQuotePreview, type LockedQuotePreviewRequest, type OnrampQuote, type OnrampQuotesRequest, type OnrampQuotesResponse, type OnrampSessionCreatedData, type OnrampSessionCreatedEvent, type OnrampSessionRequest, type OnrampSessionResponse, type PaymentIntent, type PaymentIntentDepositAddress, type PaymentIntentExecutionsResponse, type PaymentIntentStatus, type PaymentIntentType, type PaymentNetwork, type PollExecutionsRequest, type PollExecutionsResponse, type ProductType, type ProjectConfigResponse, type QueryExecutionsRequest, type QueryExecutionsResponse, type RefreshIntegrationTokenResult, SOLANA_USDC_ADDRESS, type SendHypercoreTransactionRequest, type SendHypercoreTransactionResponse, type SendSolanaTransactionRequest, type SendSolanaTransactionResponse, type SourceToken, type SourceTokenNetwork, type StartIntegrationOAuthResult, type SupportedChain, type SupportedDepositTokensResponse, type SupportedDestinationTokensResponse, type SupportedSourceTokensQuery, type SupportedSourceTokensResponse, type SupportedToken, type TokenBalance, type TokenChain, type TokenChainIconUrl, type TokenChainsResponse, type TokenIconUrl, type TokenInfo, type TokenMetadata, type TransferDefaultTokenParams, type TransferDefaultTokenResult, type UserIpInfo, type VerifyAddressRequest, type VerifyAddressResponse, type Wallet, type WalletMobileDeepLinkDepositAddress, type WalletMobileDeepLinkResponse, type WalletMobileDeepLinkWallet, type WithdrawDirectExecutionSucceededEvent, type WithdrawEvent, WithdrawEventType, authenticateIntegrationOAuth, buildHypercoreTransaction, buildSolanaTransaction, checkHypercoreActivation, confirmIntegrationTransfer, createCashAppSession, createDepositAddress, createExchangeSession, createIntegrationTransfer, createOnrampSession, formatStablecoinAmount, generateKSUID, generatePrefixedKSUID, getAddressBalance, getAddressBalances, getApiBaseUrl, getCashAppLimits, getCashAppSessionStatus, getChainName, getDefaultOnrampToken, getDepositAddress, getDepositQuote, getExchangeSessionStartUrl, getExchanges, getExternalWallets, getFiatCurrencies, getIconUrl, getIconUrlWithCdn, getIntegrationExchanges, getIntegrationHoldings, getIntegrationTransferDefaultToken, getIpAddress, getOnrampQuotes, getOnrampSessionStartUrl, getPreferredIconUrl, getProjectConfig, getSupportedDepositTokens, getSupportedDestinationTokens, getTokenChains, getTokenMetadata, getWalletByChainType, getWalletMobileDeepLink, i18n, listPaymentIntentExecutions, pollDirectExecutions, queryExecutions, refreshIntegrationToken, retrievePaymentIntent, revokeIntegrationToken, sendHypercoreTransaction, sendSolanaTransaction, setApiConfig, startIntegrationOAuth, useUserIp, verifyRecipientAddress };
|
package/dist/index.js
CHANGED
|
@@ -26,6 +26,7 @@ __export(index_exports, {
|
|
|
26
26
|
IneligibilityReason: () => IneligibilityReason,
|
|
27
27
|
IntegrationProvider: () => IntegrationProvider,
|
|
28
28
|
SOLANA_USDC_ADDRESS: () => SOLANA_USDC_ADDRESS,
|
|
29
|
+
WithdrawEventType: () => WithdrawEventType,
|
|
29
30
|
authenticateIntegrationOAuth: () => authenticateIntegrationOAuth,
|
|
30
31
|
buildHypercoreTransaction: () => buildHypercoreTransaction,
|
|
31
32
|
buildSolanaTransaction: () => buildSolanaTransaction,
|
|
@@ -1102,8 +1103,13 @@ async function sendHypercoreTransaction(request, publishableKey) {
|
|
|
1102
1103
|
// src/lib/events.ts
|
|
1103
1104
|
var DepositEventType = /* @__PURE__ */ ((DepositEventType2) => {
|
|
1104
1105
|
DepositEventType2["ONRAMP_SESSION_CREATED"] = "onramp_session.created";
|
|
1106
|
+
DepositEventType2["DIRECT_EXECUTION_SUCCEEDED"] = "direct_execution.succeeded";
|
|
1105
1107
|
return DepositEventType2;
|
|
1106
1108
|
})(DepositEventType || {});
|
|
1109
|
+
var WithdrawEventType = /* @__PURE__ */ ((WithdrawEventType2) => {
|
|
1110
|
+
WithdrawEventType2["DIRECT_EXECUTION_SUCCEEDED"] = "direct_execution.succeeded";
|
|
1111
|
+
return WithdrawEventType2;
|
|
1112
|
+
})(WithdrawEventType || {});
|
|
1107
1113
|
|
|
1108
1114
|
// src/hooks/use-user-ip.ts
|
|
1109
1115
|
var import_react_query = require("@tanstack/react-query");
|
|
@@ -1244,6 +1250,7 @@ var i18n = en_default;
|
|
|
1244
1250
|
IneligibilityReason,
|
|
1245
1251
|
IntegrationProvider,
|
|
1246
1252
|
SOLANA_USDC_ADDRESS,
|
|
1253
|
+
WithdrawEventType,
|
|
1247
1254
|
authenticateIntegrationOAuth,
|
|
1248
1255
|
buildHypercoreTransaction,
|
|
1249
1256
|
buildSolanaTransaction,
|
package/dist/index.mjs
CHANGED
|
@@ -1016,8 +1016,13 @@ async function sendHypercoreTransaction(request, publishableKey) {
|
|
|
1016
1016
|
// src/lib/events.ts
|
|
1017
1017
|
var DepositEventType = /* @__PURE__ */ ((DepositEventType2) => {
|
|
1018
1018
|
DepositEventType2["ONRAMP_SESSION_CREATED"] = "onramp_session.created";
|
|
1019
|
+
DepositEventType2["DIRECT_EXECUTION_SUCCEEDED"] = "direct_execution.succeeded";
|
|
1019
1020
|
return DepositEventType2;
|
|
1020
1021
|
})(DepositEventType || {});
|
|
1022
|
+
var WithdrawEventType = /* @__PURE__ */ ((WithdrawEventType2) => {
|
|
1023
|
+
WithdrawEventType2["DIRECT_EXECUTION_SUCCEEDED"] = "direct_execution.succeeded";
|
|
1024
|
+
return WithdrawEventType2;
|
|
1025
|
+
})(WithdrawEventType || {});
|
|
1021
1026
|
|
|
1022
1027
|
// src/hooks/use-user-ip.ts
|
|
1023
1028
|
import { useQuery } from "@tanstack/react-query";
|
|
@@ -1157,6 +1162,7 @@ export {
|
|
|
1157
1162
|
IneligibilityReason,
|
|
1158
1163
|
IntegrationProvider,
|
|
1159
1164
|
SOLANA_USDC_ADDRESS,
|
|
1165
|
+
WithdrawEventType,
|
|
1160
1166
|
authenticateIntegrationOAuth,
|
|
1161
1167
|
buildHypercoreTransaction,
|
|
1162
1168
|
buildSolanaTransaction,
|