@xoxno/sdk-js 1.0.123 → 1.0.126
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/README.md +3 -0
- package/dist/index.bundled.d.cts +79 -2
- package/dist/index.bundled.d.ts +79 -2
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/sdk/stellar/cctp.d.ts +16 -0
- package/dist/sdk/stellar/index.d.ts +4 -0
- package/dist/sdk/stellar/lending.d.ts +27 -0
- package/dist/sdk/stellar/position-mode.d.ts +7 -0
- package/dist/sdk/stellar/prepare.d.ts +14 -0
- package/dist/sdk/stellar/repay-swap.d.ts +7 -0
- package/dist/sdk/swagger.d.ts +13 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -290,6 +290,9 @@ sdk.collection.drops.search(...); // CollectionMintProfilePaginated
|
|
|
290
290
|
// GET /collection/:collection/analytics/volume
|
|
291
291
|
sdk.collection.collection("...").analytics.volume(...); // AnalyticsVolumeDto[]
|
|
292
292
|
|
|
293
|
+
// GET /collections/analytics/volume
|
|
294
|
+
sdk.collections.analytics.volume(...); // Record<string, AnalyticsVolumeDto[]>
|
|
295
|
+
|
|
293
296
|
// GET /countries
|
|
294
297
|
sdk.countries(...); // string[]
|
|
295
298
|
|
package/dist/index.bundled.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
-
import { xdr } from '@stellar/stellar-sdk';
|
|
3
|
+
import { rpc, xdr } from '@stellar/stellar-sdk';
|
|
4
4
|
import { ActivePerpAssetCtx, ActiveSpotAssetCtx, AirdropDtoHydrated, AnalyticsMarketplaceUniqueUsers, AnalyticsVolumeDto, AnsweredQuestionWithDetails, AssetConfigRawDto, BageQRData, BarDto, BorrowArgs, ChatMessageDocHydrated, ChatMessagePaginated, CheckLikeStatusResponseDto, CollectionHoldersDto, CollectionHoldersExportDto, CollectionMintProfileDocHydrated, CollectionMintProfileDocWithStages, CollectionMintProfileFilter, CollectionMintProfilePaginated, CollectionOffersFilter, CollectionOwnerDto, CollectionPinnedStatusDto, CollectionProfileDoc, CollectionProfileEditDto, CollectionProfileFilter, CollectionProfilePaginated, CollectionRanksDTO, CollectionStatsDocHydrated, CollectionStatsFilter, CollectionStatsPaginated, CreatorDetailsDto, CreatorMarketingNotificationDto, CreatorProfileDoc, CreatorProfileDto, CreatorProfileEditDto, DelegationDataOutput, DiscountCodeValidationResponse, EventAcceptInvitation, EventCheckInQR, EventClaimInvitationDto, EventCountGroupedByCountry, EventGuestApproveDto, EventGuestExport, EventGuestFilter, EventGuestProfile, EventGuestProfileQuery, EventGuestRegistrationDto, EventInvitation, EventInvitationCreateDto, EventInvitationDoc, EventInvitationFilter, EventInvitationQuery, EventNotificationDto, EventProfile, EventProfileCreateDto, EventProfileEditDto, EventProfileFilter, EventProfileQuery, EventQuestionCreateDto, EventQuestionDoc, EventQuestionEditDto, EventReferralConfigCreateDto, EventReferralConfigDoc, EventReferralConfigEditDto, EventReferralConfigFilter, EventReferralConfigPaginated, EventReferralCreateDto, EventReferralDoc, EventReferralEditDto, EventReferralFilter, EventReferralPaginated, EventRegistrationResponseDto, EventStageProfileCreateDto, EventStageProfileDoc, EventStageProfileEditDto, EventTicketProfileCreateDto, EventTicketProfileDoc, EventTicketProfileEditDto, EventUserRole, EventUserRoleCreateDto, EventUserRoleDoc, EventUserRoleEditDto, EventVoucherCreateDto, EventVoucherDoc, EventVoucherEditDto, EventVoucherFilter, EventVoucherQuery, FilterQueryDto, FlashLoanArgs, FloorPriceDto, FollowCollectionDto, GlobalAnalyticsOverviewResponseDto, GlobalConversationSummaryDto, GlobalOfferPaginated, GlobalSearchResourcesPaginated, InterestRateModelDto, InventorySummaryDtoHydrated, L2BookPerpResponseSingle, LendingAccountPnl, LendingAccountProfile, LendingAccountSummary, LendingEModeCategoryProfile, LendingIndexesDto, LendingMarketAnalyticsGraph, LendingMarketAverageGraph, LendingMarketProfile, LendingMarketProfileFilter, LendingMarketProfileQuery, LendingNftAttributes, LendingOverallStats, LendingPositionStatus, LendingTokenPriceDto, LikeNftDto, LiquidateArgs, ListingsResponseDto, LoginAccessDto, LoginRequestDto, ManualCheckInDto, MarketOracleConfigInputDto, MarketParamsRawDto, MobileDeviceDoc, MobileDeviceRegistrationDto, MultiplyArgs, NativeWalletDto, NftActivityDocHydrated, NftActivityFilter, NftActivityPaginated, NftDocFilter, NftDocFull, NftDocHydrated, NftOfferDocFilter, NftOfferDocHydrated, NftOfferPaginated, NftPaginated, NotificationDoc, NotificationPaginated, NotificationPreferencesPostDto, NotificationSuccessResponseDto, OracleSourceConfigInputDto, OwnedCollectionsDto, OwnedServicesDto, PerpCoinExtended, PerpCoinExtendedSlim, PerpEvent, PerpLegalCheck, PerpOrderResponse, PerpSpotCoinExtended, PerpSpotCoinExtendedSlim, PinnedCollectionDto, PositionLimitsDto, ProtocolAprType, ProviderDto, PublicOnly, PushNotificationCountResponse, PushNotificationDoc, PushNotificationResponse, RateType, RepayArgs, RepayDebtWithCollateralArgs, SendChatMessageDto, SetEmailDto, SetPhoneDto, ShareholderDto, SignAcceptGlobalOfferDto, SignDataDto, SignMintDto, SignWithdrawDto, SoroswapQuoteResponseDto, StakingCreatorDoc, StakingEditDto, StakingExploreDtoHydrated, StakingPoolDoc, StakingSummary, StakingUserPoolNfts, StellarAggregatorQuoteRequestDto, StellarAggregatorQuoteResponseDto, StellarChallengeResponseDto, StellarLendingDecodedEvent, StellarTokenKind, SuccessDto, SuccessWithMessageDto, SupplyArgs, SwapCollateralArgs, SwapDebtArgs, SwitchWalletDto, SymbolInfoDto, TicketCalculationRequestDto, TicketPricesResponse, TicketValidationResult, TokenDataDocHydrated, TradesPerpResponseSingle, TradesilvaniaSignature, TraitInfo, TransactionCostData, TransactionCreate, TransactionDetailed, TransactionProcessStatus, TransactionSendResult, UserAnalyticsDto, UserBillingDetails, UserBlockPaginated, UserConversationPaginated, UserFavoriteResponseDto, UserInfo, UserNetworkInfoDto, UserProfileDoc, UserProfileDto, UserProfileEditDto, UserSettingsDoc, UserStakingSummaryDto, UserStatsDto, UserTokenInventoryResponseDto, ValueFp, VerifyEmailDto, VolumeGraph, Web2UserDoc, Web2UserShardsDto, Web2WalletDto, WebSocketTokenDto, WithdrawArgs, XoxnoInfo, XoxnoLiquidStatsDto } from '@xoxno/types';
|
|
5
5
|
import { ActivityChain, KustoOrderDirection, LendingPositionOrderByColumn, OfferType, StakingStatus, TokenCategory, UserStatsOrderByColumn } from '@xoxno/types/enums';
|
|
6
6
|
|
|
@@ -418,7 +418,9 @@ declare const endpoints: {
|
|
|
418
418
|
readonly output: LendingAccountProfile[];
|
|
419
419
|
};
|
|
420
420
|
readonly "/lending/market/indexes": {
|
|
421
|
-
readonly input: {
|
|
421
|
+
readonly input: {
|
|
422
|
+
chain?: ActivityChain[];
|
|
423
|
+
};
|
|
422
424
|
readonly output: Record<string, LendingIndexesDto>;
|
|
423
425
|
};
|
|
424
426
|
readonly "/user/lending/position/:identifier": {
|
|
@@ -1177,6 +1179,16 @@ declare const endpoints: {
|
|
|
1177
1179
|
};
|
|
1178
1180
|
readonly output: AnalyticsVolumeDto[];
|
|
1179
1181
|
};
|
|
1182
|
+
readonly "/collections/analytics/volume": {
|
|
1183
|
+
readonly input: {
|
|
1184
|
+
collections: string;
|
|
1185
|
+
startTime?: string;
|
|
1186
|
+
endTime?: string;
|
|
1187
|
+
bin?: string;
|
|
1188
|
+
chain: ActivityChain[];
|
|
1189
|
+
};
|
|
1190
|
+
readonly output: Record<string, AnalyticsVolumeDto[]>;
|
|
1191
|
+
};
|
|
1180
1192
|
readonly "/user/:address/analytics/volume": {
|
|
1181
1193
|
readonly input: {};
|
|
1182
1194
|
readonly output: UserAnalyticsDto;
|
|
@@ -2215,20 +2227,47 @@ export type StellarSwapPathInput = StellarStrategySwapPathInput;
|
|
|
2215
2227
|
* does this via `rpc.Server.prepareTransaction`.
|
|
2216
2228
|
*/
|
|
2217
2229
|
export declare function buildTx(opts: StellarBuilderOptions, method: string, params: xdr.ScVal[]): BuiltStellarTx;
|
|
2230
|
+
export interface StellarTokenAmount {
|
|
2231
|
+
token: string;
|
|
2232
|
+
amount: string;
|
|
2233
|
+
}
|
|
2234
|
+
export interface StellarSupplyBatchArgs {
|
|
2235
|
+
accountNonce?: number;
|
|
2236
|
+
eModeCategory?: number;
|
|
2237
|
+
assets: ReadonlyArray<StellarTokenAmount>;
|
|
2238
|
+
}
|
|
2239
|
+
export interface StellarBorrowBatchArgs {
|
|
2240
|
+
accountNonce: number;
|
|
2241
|
+
borrows: ReadonlyArray<StellarTokenAmount>;
|
|
2242
|
+
}
|
|
2243
|
+
export interface StellarWithdrawBatchArgs {
|
|
2244
|
+
accountNonce: number;
|
|
2245
|
+
withdrawals: ReadonlyArray<StellarTokenAmount>;
|
|
2246
|
+
}
|
|
2247
|
+
export interface StellarRepayBatchArgs {
|
|
2248
|
+
accountNonce: number;
|
|
2249
|
+
payments: ReadonlyArray<StellarTokenAmount>;
|
|
2250
|
+
}
|
|
2218
2251
|
/**
|
|
2219
2252
|
* supply(caller, account_id: u64, e_mode_category: u32, assets: Vec<(Address, i128)>)
|
|
2253
|
+
*/
|
|
2254
|
+
export declare function buildStellarSupplyBatchTx(opts: StellarBuilderOptions, args: StellarSupplyBatchArgs): BuiltStellarTx;
|
|
2255
|
+
/**
|
|
2220
2256
|
* @xoxno/types `SupplyArgs` is a single-asset shape; the Stellar contract
|
|
2221
2257
|
* expects a batch — we wrap the single asset in a 1-element Vec.
|
|
2222
2258
|
*/
|
|
2223
2259
|
export declare function buildStellarSupplyTx(opts: StellarBuilderOptions, args: SupplyArgs): BuiltStellarTx;
|
|
2260
|
+
export declare function buildStellarBorrowBatchTx(opts: StellarBuilderOptions, args: StellarBorrowBatchArgs): BuiltStellarTx;
|
|
2224
2261
|
/**
|
|
2225
2262
|
* borrow(caller, account_id: u64, borrows: Vec<(Address, i128)>)
|
|
2226
2263
|
*/
|
|
2227
2264
|
export declare function buildStellarBorrowTx(opts: StellarBuilderOptions, args: BorrowArgs): BuiltStellarTx;
|
|
2265
|
+
export declare function buildStellarWithdrawBatchTx(opts: StellarBuilderOptions, args: StellarWithdrawBatchArgs): BuiltStellarTx;
|
|
2228
2266
|
/**
|
|
2229
2267
|
* withdraw(caller, account_id: u64, withdrawals: Vec<(Address, i128)>)
|
|
2230
2268
|
*/
|
|
2231
2269
|
export declare function buildStellarWithdrawTx(opts: StellarBuilderOptions, args: WithdrawArgs): BuiltStellarTx;
|
|
2270
|
+
export declare function buildStellarRepayBatchTx(opts: StellarBuilderOptions, args: StellarRepayBatchArgs): BuiltStellarTx;
|
|
2232
2271
|
/**
|
|
2233
2272
|
* repay(caller, account_id: u64, payments: Vec<(Address, i128)>)
|
|
2234
2273
|
*/
|
|
@@ -2590,6 +2629,44 @@ export declare function mapQuoteResponseToStrategySwap(quote: StellarAggregatorQ
|
|
|
2590
2629
|
}): StellarStrategySwapInput;
|
|
2591
2630
|
/** @deprecated Use `mapQuoteResponseToStrategyPayload`. */
|
|
2592
2631
|
export declare const mapQuoteResponseToAggregatorSwap: typeof mapQuoteResponseToStrategyPayload;
|
|
2632
|
+
export declare function tagStellarInvokedContractError(contractId: string, error: unknown): Error;
|
|
2633
|
+
/**
|
|
2634
|
+
* Simulate a built Soroban envelope (footprint, auth, resource fee) and return
|
|
2635
|
+
* prepared base64 XDR. Optionally tag failures with the invoked contract id so
|
|
2636
|
+
* UIs can map `Error(Contract, #N)` codes to the right ABI.
|
|
2637
|
+
*/
|
|
2638
|
+
export declare function prepareStellarTxXdr(server: Pick<rpc.Server, "prepareTransaction">, xdr: string, opts?: {
|
|
2639
|
+
invokedContractId?: string;
|
|
2640
|
+
}): Promise<string>;
|
|
2641
|
+
export declare function prepareStellarBuiltTx(server: Pick<rpc.Server, "prepareTransaction">, built: BuiltStellarTx, opts?: {
|
|
2642
|
+
invokedContractId?: string;
|
|
2643
|
+
}): Promise<string>;
|
|
2644
|
+
/**
|
|
2645
|
+
* Map MVX `PositionMode` numbering to the Stellar lending controller enum.
|
|
2646
|
+
*
|
|
2647
|
+
* MVX: None=0, Normal=1, Multiply=2, Long=3, Short=4
|
|
2648
|
+
* Stellar: Normal=0, Multiply=1, Long=2, Short=3
|
|
2649
|
+
*/
|
|
2650
|
+
export declare function toStellarPositionMode(mvxMode: number): number;
|
|
2651
|
+
/**
|
|
2652
|
+
* Placeholder aggregator route when `repay_debt_with_collateral` has
|
|
2653
|
+
* `collateral_token === debt_token`. The controller short-circuits and never
|
|
2654
|
+
* decodes the route, but the Soroban arg must still be valid `Bytes`.
|
|
2655
|
+
*/
|
|
2656
|
+
export declare function buildSameTokenRepaySwapSteps(token: string, collateralAmount: string): StellarStrategyPayloadInput;
|
|
2657
|
+
export interface BuildStellarCctpForwardTxArgs extends StellarBuilderOptions {
|
|
2658
|
+
forwarderAddress: string;
|
|
2659
|
+
message: string;
|
|
2660
|
+
attestation: string;
|
|
2661
|
+
/** Default 10_000_000 stroops — CCTP mint_and_forward is resource-heavy. */
|
|
2662
|
+
fee?: string;
|
|
2663
|
+
/** Default 120 seconds. */
|
|
2664
|
+
timeoutSeconds?: number;
|
|
2665
|
+
}
|
|
2666
|
+
/**
|
|
2667
|
+
* Build an unsigned XDR for the Stellar CCTP forwarder `mint_and_forward`.
|
|
2668
|
+
*/
|
|
2669
|
+
export declare function buildStellarCctpForwardTx(opts: BuildStellarCctpForwardTxArgs): BuiltStellarTx;
|
|
2593
2670
|
export declare function buildSdk(client: XOXNOClient): SDK;
|
|
2594
2671
|
|
|
2595
2672
|
export {};
|
package/dist/index.bundled.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
-
import { xdr } from '@stellar/stellar-sdk';
|
|
3
|
+
import { rpc, xdr } from '@stellar/stellar-sdk';
|
|
4
4
|
import { ActivePerpAssetCtx, ActiveSpotAssetCtx, AirdropDtoHydrated, AnalyticsMarketplaceUniqueUsers, AnalyticsVolumeDto, AnsweredQuestionWithDetails, AssetConfigRawDto, BageQRData, BarDto, BorrowArgs, ChatMessageDocHydrated, ChatMessagePaginated, CheckLikeStatusResponseDto, CollectionHoldersDto, CollectionHoldersExportDto, CollectionMintProfileDocHydrated, CollectionMintProfileDocWithStages, CollectionMintProfileFilter, CollectionMintProfilePaginated, CollectionOffersFilter, CollectionOwnerDto, CollectionPinnedStatusDto, CollectionProfileDoc, CollectionProfileEditDto, CollectionProfileFilter, CollectionProfilePaginated, CollectionRanksDTO, CollectionStatsDocHydrated, CollectionStatsFilter, CollectionStatsPaginated, CreatorDetailsDto, CreatorMarketingNotificationDto, CreatorProfileDoc, CreatorProfileDto, CreatorProfileEditDto, DelegationDataOutput, DiscountCodeValidationResponse, EventAcceptInvitation, EventCheckInQR, EventClaimInvitationDto, EventCountGroupedByCountry, EventGuestApproveDto, EventGuestExport, EventGuestFilter, EventGuestProfile, EventGuestProfileQuery, EventGuestRegistrationDto, EventInvitation, EventInvitationCreateDto, EventInvitationDoc, EventInvitationFilter, EventInvitationQuery, EventNotificationDto, EventProfile, EventProfileCreateDto, EventProfileEditDto, EventProfileFilter, EventProfileQuery, EventQuestionCreateDto, EventQuestionDoc, EventQuestionEditDto, EventReferralConfigCreateDto, EventReferralConfigDoc, EventReferralConfigEditDto, EventReferralConfigFilter, EventReferralConfigPaginated, EventReferralCreateDto, EventReferralDoc, EventReferralEditDto, EventReferralFilter, EventReferralPaginated, EventRegistrationResponseDto, EventStageProfileCreateDto, EventStageProfileDoc, EventStageProfileEditDto, EventTicketProfileCreateDto, EventTicketProfileDoc, EventTicketProfileEditDto, EventUserRole, EventUserRoleCreateDto, EventUserRoleDoc, EventUserRoleEditDto, EventVoucherCreateDto, EventVoucherDoc, EventVoucherEditDto, EventVoucherFilter, EventVoucherQuery, FilterQueryDto, FlashLoanArgs, FloorPriceDto, FollowCollectionDto, GlobalAnalyticsOverviewResponseDto, GlobalConversationSummaryDto, GlobalOfferPaginated, GlobalSearchResourcesPaginated, InterestRateModelDto, InventorySummaryDtoHydrated, L2BookPerpResponseSingle, LendingAccountPnl, LendingAccountProfile, LendingAccountSummary, LendingEModeCategoryProfile, LendingIndexesDto, LendingMarketAnalyticsGraph, LendingMarketAverageGraph, LendingMarketProfile, LendingMarketProfileFilter, LendingMarketProfileQuery, LendingNftAttributes, LendingOverallStats, LendingPositionStatus, LendingTokenPriceDto, LikeNftDto, LiquidateArgs, ListingsResponseDto, LoginAccessDto, LoginRequestDto, ManualCheckInDto, MarketOracleConfigInputDto, MarketParamsRawDto, MobileDeviceDoc, MobileDeviceRegistrationDto, MultiplyArgs, NativeWalletDto, NftActivityDocHydrated, NftActivityFilter, NftActivityPaginated, NftDocFilter, NftDocFull, NftDocHydrated, NftOfferDocFilter, NftOfferDocHydrated, NftOfferPaginated, NftPaginated, NotificationDoc, NotificationPaginated, NotificationPreferencesPostDto, NotificationSuccessResponseDto, OracleSourceConfigInputDto, OwnedCollectionsDto, OwnedServicesDto, PerpCoinExtended, PerpCoinExtendedSlim, PerpEvent, PerpLegalCheck, PerpOrderResponse, PerpSpotCoinExtended, PerpSpotCoinExtendedSlim, PinnedCollectionDto, PositionLimitsDto, ProtocolAprType, ProviderDto, PublicOnly, PushNotificationCountResponse, PushNotificationDoc, PushNotificationResponse, RateType, RepayArgs, RepayDebtWithCollateralArgs, SendChatMessageDto, SetEmailDto, SetPhoneDto, ShareholderDto, SignAcceptGlobalOfferDto, SignDataDto, SignMintDto, SignWithdrawDto, SoroswapQuoteResponseDto, StakingCreatorDoc, StakingEditDto, StakingExploreDtoHydrated, StakingPoolDoc, StakingSummary, StakingUserPoolNfts, StellarAggregatorQuoteRequestDto, StellarAggregatorQuoteResponseDto, StellarChallengeResponseDto, StellarLendingDecodedEvent, StellarTokenKind, SuccessDto, SuccessWithMessageDto, SupplyArgs, SwapCollateralArgs, SwapDebtArgs, SwitchWalletDto, SymbolInfoDto, TicketCalculationRequestDto, TicketPricesResponse, TicketValidationResult, TokenDataDocHydrated, TradesPerpResponseSingle, TradesilvaniaSignature, TraitInfo, TransactionCostData, TransactionCreate, TransactionDetailed, TransactionProcessStatus, TransactionSendResult, UserAnalyticsDto, UserBillingDetails, UserBlockPaginated, UserConversationPaginated, UserFavoriteResponseDto, UserInfo, UserNetworkInfoDto, UserProfileDoc, UserProfileDto, UserProfileEditDto, UserSettingsDoc, UserStakingSummaryDto, UserStatsDto, UserTokenInventoryResponseDto, ValueFp, VerifyEmailDto, VolumeGraph, Web2UserDoc, Web2UserShardsDto, Web2WalletDto, WebSocketTokenDto, WithdrawArgs, XoxnoInfo, XoxnoLiquidStatsDto } from '@xoxno/types';
|
|
5
5
|
import { ActivityChain, KustoOrderDirection, LendingPositionOrderByColumn, OfferType, StakingStatus, TokenCategory, UserStatsOrderByColumn } from '@xoxno/types/enums';
|
|
6
6
|
|
|
@@ -418,7 +418,9 @@ declare const endpoints: {
|
|
|
418
418
|
readonly output: LendingAccountProfile[];
|
|
419
419
|
};
|
|
420
420
|
readonly "/lending/market/indexes": {
|
|
421
|
-
readonly input: {
|
|
421
|
+
readonly input: {
|
|
422
|
+
chain?: ActivityChain[];
|
|
423
|
+
};
|
|
422
424
|
readonly output: Record<string, LendingIndexesDto>;
|
|
423
425
|
};
|
|
424
426
|
readonly "/user/lending/position/:identifier": {
|
|
@@ -1177,6 +1179,16 @@ declare const endpoints: {
|
|
|
1177
1179
|
};
|
|
1178
1180
|
readonly output: AnalyticsVolumeDto[];
|
|
1179
1181
|
};
|
|
1182
|
+
readonly "/collections/analytics/volume": {
|
|
1183
|
+
readonly input: {
|
|
1184
|
+
collections: string;
|
|
1185
|
+
startTime?: string;
|
|
1186
|
+
endTime?: string;
|
|
1187
|
+
bin?: string;
|
|
1188
|
+
chain: ActivityChain[];
|
|
1189
|
+
};
|
|
1190
|
+
readonly output: Record<string, AnalyticsVolumeDto[]>;
|
|
1191
|
+
};
|
|
1180
1192
|
readonly "/user/:address/analytics/volume": {
|
|
1181
1193
|
readonly input: {};
|
|
1182
1194
|
readonly output: UserAnalyticsDto;
|
|
@@ -2215,20 +2227,47 @@ export type StellarSwapPathInput = StellarStrategySwapPathInput;
|
|
|
2215
2227
|
* does this via `rpc.Server.prepareTransaction`.
|
|
2216
2228
|
*/
|
|
2217
2229
|
export declare function buildTx(opts: StellarBuilderOptions, method: string, params: xdr.ScVal[]): BuiltStellarTx;
|
|
2230
|
+
export interface StellarTokenAmount {
|
|
2231
|
+
token: string;
|
|
2232
|
+
amount: string;
|
|
2233
|
+
}
|
|
2234
|
+
export interface StellarSupplyBatchArgs {
|
|
2235
|
+
accountNonce?: number;
|
|
2236
|
+
eModeCategory?: number;
|
|
2237
|
+
assets: ReadonlyArray<StellarTokenAmount>;
|
|
2238
|
+
}
|
|
2239
|
+
export interface StellarBorrowBatchArgs {
|
|
2240
|
+
accountNonce: number;
|
|
2241
|
+
borrows: ReadonlyArray<StellarTokenAmount>;
|
|
2242
|
+
}
|
|
2243
|
+
export interface StellarWithdrawBatchArgs {
|
|
2244
|
+
accountNonce: number;
|
|
2245
|
+
withdrawals: ReadonlyArray<StellarTokenAmount>;
|
|
2246
|
+
}
|
|
2247
|
+
export interface StellarRepayBatchArgs {
|
|
2248
|
+
accountNonce: number;
|
|
2249
|
+
payments: ReadonlyArray<StellarTokenAmount>;
|
|
2250
|
+
}
|
|
2218
2251
|
/**
|
|
2219
2252
|
* supply(caller, account_id: u64, e_mode_category: u32, assets: Vec<(Address, i128)>)
|
|
2253
|
+
*/
|
|
2254
|
+
export declare function buildStellarSupplyBatchTx(opts: StellarBuilderOptions, args: StellarSupplyBatchArgs): BuiltStellarTx;
|
|
2255
|
+
/**
|
|
2220
2256
|
* @xoxno/types `SupplyArgs` is a single-asset shape; the Stellar contract
|
|
2221
2257
|
* expects a batch — we wrap the single asset in a 1-element Vec.
|
|
2222
2258
|
*/
|
|
2223
2259
|
export declare function buildStellarSupplyTx(opts: StellarBuilderOptions, args: SupplyArgs): BuiltStellarTx;
|
|
2260
|
+
export declare function buildStellarBorrowBatchTx(opts: StellarBuilderOptions, args: StellarBorrowBatchArgs): BuiltStellarTx;
|
|
2224
2261
|
/**
|
|
2225
2262
|
* borrow(caller, account_id: u64, borrows: Vec<(Address, i128)>)
|
|
2226
2263
|
*/
|
|
2227
2264
|
export declare function buildStellarBorrowTx(opts: StellarBuilderOptions, args: BorrowArgs): BuiltStellarTx;
|
|
2265
|
+
export declare function buildStellarWithdrawBatchTx(opts: StellarBuilderOptions, args: StellarWithdrawBatchArgs): BuiltStellarTx;
|
|
2228
2266
|
/**
|
|
2229
2267
|
* withdraw(caller, account_id: u64, withdrawals: Vec<(Address, i128)>)
|
|
2230
2268
|
*/
|
|
2231
2269
|
export declare function buildStellarWithdrawTx(opts: StellarBuilderOptions, args: WithdrawArgs): BuiltStellarTx;
|
|
2270
|
+
export declare function buildStellarRepayBatchTx(opts: StellarBuilderOptions, args: StellarRepayBatchArgs): BuiltStellarTx;
|
|
2232
2271
|
/**
|
|
2233
2272
|
* repay(caller, account_id: u64, payments: Vec<(Address, i128)>)
|
|
2234
2273
|
*/
|
|
@@ -2590,6 +2629,44 @@ export declare function mapQuoteResponseToStrategySwap(quote: StellarAggregatorQ
|
|
|
2590
2629
|
}): StellarStrategySwapInput;
|
|
2591
2630
|
/** @deprecated Use `mapQuoteResponseToStrategyPayload`. */
|
|
2592
2631
|
export declare const mapQuoteResponseToAggregatorSwap: typeof mapQuoteResponseToStrategyPayload;
|
|
2632
|
+
export declare function tagStellarInvokedContractError(contractId: string, error: unknown): Error;
|
|
2633
|
+
/**
|
|
2634
|
+
* Simulate a built Soroban envelope (footprint, auth, resource fee) and return
|
|
2635
|
+
* prepared base64 XDR. Optionally tag failures with the invoked contract id so
|
|
2636
|
+
* UIs can map `Error(Contract, #N)` codes to the right ABI.
|
|
2637
|
+
*/
|
|
2638
|
+
export declare function prepareStellarTxXdr(server: Pick<rpc.Server, "prepareTransaction">, xdr: string, opts?: {
|
|
2639
|
+
invokedContractId?: string;
|
|
2640
|
+
}): Promise<string>;
|
|
2641
|
+
export declare function prepareStellarBuiltTx(server: Pick<rpc.Server, "prepareTransaction">, built: BuiltStellarTx, opts?: {
|
|
2642
|
+
invokedContractId?: string;
|
|
2643
|
+
}): Promise<string>;
|
|
2644
|
+
/**
|
|
2645
|
+
* Map MVX `PositionMode` numbering to the Stellar lending controller enum.
|
|
2646
|
+
*
|
|
2647
|
+
* MVX: None=0, Normal=1, Multiply=2, Long=3, Short=4
|
|
2648
|
+
* Stellar: Normal=0, Multiply=1, Long=2, Short=3
|
|
2649
|
+
*/
|
|
2650
|
+
export declare function toStellarPositionMode(mvxMode: number): number;
|
|
2651
|
+
/**
|
|
2652
|
+
* Placeholder aggregator route when `repay_debt_with_collateral` has
|
|
2653
|
+
* `collateral_token === debt_token`. The controller short-circuits and never
|
|
2654
|
+
* decodes the route, but the Soroban arg must still be valid `Bytes`.
|
|
2655
|
+
*/
|
|
2656
|
+
export declare function buildSameTokenRepaySwapSteps(token: string, collateralAmount: string): StellarStrategyPayloadInput;
|
|
2657
|
+
export interface BuildStellarCctpForwardTxArgs extends StellarBuilderOptions {
|
|
2658
|
+
forwarderAddress: string;
|
|
2659
|
+
message: string;
|
|
2660
|
+
attestation: string;
|
|
2661
|
+
/** Default 10_000_000 stroops — CCTP mint_and_forward is resource-heavy. */
|
|
2662
|
+
fee?: string;
|
|
2663
|
+
/** Default 120 seconds. */
|
|
2664
|
+
timeoutSeconds?: number;
|
|
2665
|
+
}
|
|
2666
|
+
/**
|
|
2667
|
+
* Build an unsigned XDR for the Stellar CCTP forwarder `mint_and_forward`.
|
|
2668
|
+
*/
|
|
2669
|
+
export declare function buildStellarCctpForwardTx(opts: BuildStellarCctpForwardTxArgs): BuiltStellarTx;
|
|
2593
2670
|
export declare function buildSdk(client: XOXNOClient): SDK;
|
|
2594
2671
|
|
|
2595
2672
|
export {};
|