@xoxno/sdk-js 1.0.120 → 1.0.125

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.
@@ -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
 
@@ -2215,20 +2215,47 @@ export type StellarSwapPathInput = StellarStrategySwapPathInput;
2215
2215
  * does this via `rpc.Server.prepareTransaction`.
2216
2216
  */
2217
2217
  export declare function buildTx(opts: StellarBuilderOptions, method: string, params: xdr.ScVal[]): BuiltStellarTx;
2218
+ export interface StellarTokenAmount {
2219
+ token: string;
2220
+ amount: string;
2221
+ }
2222
+ export interface StellarSupplyBatchArgs {
2223
+ accountNonce?: number;
2224
+ eModeCategory?: number;
2225
+ assets: ReadonlyArray<StellarTokenAmount>;
2226
+ }
2227
+ export interface StellarBorrowBatchArgs {
2228
+ accountNonce: number;
2229
+ borrows: ReadonlyArray<StellarTokenAmount>;
2230
+ }
2231
+ export interface StellarWithdrawBatchArgs {
2232
+ accountNonce: number;
2233
+ withdrawals: ReadonlyArray<StellarTokenAmount>;
2234
+ }
2235
+ export interface StellarRepayBatchArgs {
2236
+ accountNonce: number;
2237
+ payments: ReadonlyArray<StellarTokenAmount>;
2238
+ }
2218
2239
  /**
2219
2240
  * supply(caller, account_id: u64, e_mode_category: u32, assets: Vec<(Address, i128)>)
2241
+ */
2242
+ export declare function buildStellarSupplyBatchTx(opts: StellarBuilderOptions, args: StellarSupplyBatchArgs): BuiltStellarTx;
2243
+ /**
2220
2244
  * @xoxno/types `SupplyArgs` is a single-asset shape; the Stellar contract
2221
2245
  * expects a batch — we wrap the single asset in a 1-element Vec.
2222
2246
  */
2223
2247
  export declare function buildStellarSupplyTx(opts: StellarBuilderOptions, args: SupplyArgs): BuiltStellarTx;
2248
+ export declare function buildStellarBorrowBatchTx(opts: StellarBuilderOptions, args: StellarBorrowBatchArgs): BuiltStellarTx;
2224
2249
  /**
2225
2250
  * borrow(caller, account_id: u64, borrows: Vec<(Address, i128)>)
2226
2251
  */
2227
2252
  export declare function buildStellarBorrowTx(opts: StellarBuilderOptions, args: BorrowArgs): BuiltStellarTx;
2253
+ export declare function buildStellarWithdrawBatchTx(opts: StellarBuilderOptions, args: StellarWithdrawBatchArgs): BuiltStellarTx;
2228
2254
  /**
2229
2255
  * withdraw(caller, account_id: u64, withdrawals: Vec<(Address, i128)>)
2230
2256
  */
2231
2257
  export declare function buildStellarWithdrawTx(opts: StellarBuilderOptions, args: WithdrawArgs): BuiltStellarTx;
2258
+ export declare function buildStellarRepayBatchTx(opts: StellarBuilderOptions, args: StellarRepayBatchArgs): BuiltStellarTx;
2232
2259
  /**
2233
2260
  * repay(caller, account_id: u64, payments: Vec<(Address, i128)>)
2234
2261
  */
@@ -2590,6 +2617,44 @@ export declare function mapQuoteResponseToStrategySwap(quote: StellarAggregatorQ
2590
2617
  }): StellarStrategySwapInput;
2591
2618
  /** @deprecated Use `mapQuoteResponseToStrategyPayload`. */
2592
2619
  export declare const mapQuoteResponseToAggregatorSwap: typeof mapQuoteResponseToStrategyPayload;
2620
+ export declare function tagStellarInvokedContractError(contractId: string, error: unknown): Error;
2621
+ /**
2622
+ * Simulate a built Soroban envelope (footprint, auth, resource fee) and return
2623
+ * prepared base64 XDR. Optionally tag failures with the invoked contract id so
2624
+ * UIs can map `Error(Contract, #N)` codes to the right ABI.
2625
+ */
2626
+ export declare function prepareStellarTxXdr(server: Pick<rpc.Server, "prepareTransaction">, xdr: string, opts?: {
2627
+ invokedContractId?: string;
2628
+ }): Promise<string>;
2629
+ export declare function prepareStellarBuiltTx(server: Pick<rpc.Server, "prepareTransaction">, built: BuiltStellarTx, opts?: {
2630
+ invokedContractId?: string;
2631
+ }): Promise<string>;
2632
+ /**
2633
+ * Map MVX `PositionMode` numbering to the Stellar lending controller enum.
2634
+ *
2635
+ * MVX: None=0, Normal=1, Multiply=2, Long=3, Short=4
2636
+ * Stellar: Normal=0, Multiply=1, Long=2, Short=3
2637
+ */
2638
+ export declare function toStellarPositionMode(mvxMode: number): number;
2639
+ /**
2640
+ * Placeholder aggregator route when `repay_debt_with_collateral` has
2641
+ * `collateral_token === debt_token`. The controller short-circuits and never
2642
+ * decodes the route, but the Soroban arg must still be valid `Bytes`.
2643
+ */
2644
+ export declare function buildSameTokenRepaySwapSteps(token: string, collateralAmount: string): StellarStrategyPayloadInput;
2645
+ export interface BuildStellarCctpForwardTxArgs extends StellarBuilderOptions {
2646
+ forwarderAddress: string;
2647
+ message: string;
2648
+ attestation: string;
2649
+ /** Default 10_000_000 stroops — CCTP mint_and_forward is resource-heavy. */
2650
+ fee?: string;
2651
+ /** Default 120 seconds. */
2652
+ timeoutSeconds?: number;
2653
+ }
2654
+ /**
2655
+ * Build an unsigned XDR for the Stellar CCTP forwarder `mint_and_forward`.
2656
+ */
2657
+ export declare function buildStellarCctpForwardTx(opts: BuildStellarCctpForwardTxArgs): BuiltStellarTx;
2593
2658
  export declare function buildSdk(client: XOXNOClient): SDK;
2594
2659
 
2595
2660
  export {};
@@ -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
 
@@ -2215,20 +2215,47 @@ export type StellarSwapPathInput = StellarStrategySwapPathInput;
2215
2215
  * does this via `rpc.Server.prepareTransaction`.
2216
2216
  */
2217
2217
  export declare function buildTx(opts: StellarBuilderOptions, method: string, params: xdr.ScVal[]): BuiltStellarTx;
2218
+ export interface StellarTokenAmount {
2219
+ token: string;
2220
+ amount: string;
2221
+ }
2222
+ export interface StellarSupplyBatchArgs {
2223
+ accountNonce?: number;
2224
+ eModeCategory?: number;
2225
+ assets: ReadonlyArray<StellarTokenAmount>;
2226
+ }
2227
+ export interface StellarBorrowBatchArgs {
2228
+ accountNonce: number;
2229
+ borrows: ReadonlyArray<StellarTokenAmount>;
2230
+ }
2231
+ export interface StellarWithdrawBatchArgs {
2232
+ accountNonce: number;
2233
+ withdrawals: ReadonlyArray<StellarTokenAmount>;
2234
+ }
2235
+ export interface StellarRepayBatchArgs {
2236
+ accountNonce: number;
2237
+ payments: ReadonlyArray<StellarTokenAmount>;
2238
+ }
2218
2239
  /**
2219
2240
  * supply(caller, account_id: u64, e_mode_category: u32, assets: Vec<(Address, i128)>)
2241
+ */
2242
+ export declare function buildStellarSupplyBatchTx(opts: StellarBuilderOptions, args: StellarSupplyBatchArgs): BuiltStellarTx;
2243
+ /**
2220
2244
  * @xoxno/types `SupplyArgs` is a single-asset shape; the Stellar contract
2221
2245
  * expects a batch — we wrap the single asset in a 1-element Vec.
2222
2246
  */
2223
2247
  export declare function buildStellarSupplyTx(opts: StellarBuilderOptions, args: SupplyArgs): BuiltStellarTx;
2248
+ export declare function buildStellarBorrowBatchTx(opts: StellarBuilderOptions, args: StellarBorrowBatchArgs): BuiltStellarTx;
2224
2249
  /**
2225
2250
  * borrow(caller, account_id: u64, borrows: Vec<(Address, i128)>)
2226
2251
  */
2227
2252
  export declare function buildStellarBorrowTx(opts: StellarBuilderOptions, args: BorrowArgs): BuiltStellarTx;
2253
+ export declare function buildStellarWithdrawBatchTx(opts: StellarBuilderOptions, args: StellarWithdrawBatchArgs): BuiltStellarTx;
2228
2254
  /**
2229
2255
  * withdraw(caller, account_id: u64, withdrawals: Vec<(Address, i128)>)
2230
2256
  */
2231
2257
  export declare function buildStellarWithdrawTx(opts: StellarBuilderOptions, args: WithdrawArgs): BuiltStellarTx;
2258
+ export declare function buildStellarRepayBatchTx(opts: StellarBuilderOptions, args: StellarRepayBatchArgs): BuiltStellarTx;
2232
2259
  /**
2233
2260
  * repay(caller, account_id: u64, payments: Vec<(Address, i128)>)
2234
2261
  */
@@ -2590,6 +2617,44 @@ export declare function mapQuoteResponseToStrategySwap(quote: StellarAggregatorQ
2590
2617
  }): StellarStrategySwapInput;
2591
2618
  /** @deprecated Use `mapQuoteResponseToStrategyPayload`. */
2592
2619
  export declare const mapQuoteResponseToAggregatorSwap: typeof mapQuoteResponseToStrategyPayload;
2620
+ export declare function tagStellarInvokedContractError(contractId: string, error: unknown): Error;
2621
+ /**
2622
+ * Simulate a built Soroban envelope (footprint, auth, resource fee) and return
2623
+ * prepared base64 XDR. Optionally tag failures with the invoked contract id so
2624
+ * UIs can map `Error(Contract, #N)` codes to the right ABI.
2625
+ */
2626
+ export declare function prepareStellarTxXdr(server: Pick<rpc.Server, "prepareTransaction">, xdr: string, opts?: {
2627
+ invokedContractId?: string;
2628
+ }): Promise<string>;
2629
+ export declare function prepareStellarBuiltTx(server: Pick<rpc.Server, "prepareTransaction">, built: BuiltStellarTx, opts?: {
2630
+ invokedContractId?: string;
2631
+ }): Promise<string>;
2632
+ /**
2633
+ * Map MVX `PositionMode` numbering to the Stellar lending controller enum.
2634
+ *
2635
+ * MVX: None=0, Normal=1, Multiply=2, Long=3, Short=4
2636
+ * Stellar: Normal=0, Multiply=1, Long=2, Short=3
2637
+ */
2638
+ export declare function toStellarPositionMode(mvxMode: number): number;
2639
+ /**
2640
+ * Placeholder aggregator route when `repay_debt_with_collateral` has
2641
+ * `collateral_token === debt_token`. The controller short-circuits and never
2642
+ * decodes the route, but the Soroban arg must still be valid `Bytes`.
2643
+ */
2644
+ export declare function buildSameTokenRepaySwapSteps(token: string, collateralAmount: string): StellarStrategyPayloadInput;
2645
+ export interface BuildStellarCctpForwardTxArgs extends StellarBuilderOptions {
2646
+ forwarderAddress: string;
2647
+ message: string;
2648
+ attestation: string;
2649
+ /** Default 10_000_000 stroops — CCTP mint_and_forward is resource-heavy. */
2650
+ fee?: string;
2651
+ /** Default 120 seconds. */
2652
+ timeoutSeconds?: number;
2653
+ }
2654
+ /**
2655
+ * Build an unsigned XDR for the Stellar CCTP forwarder `mint_and_forward`.
2656
+ */
2657
+ export declare function buildStellarCctpForwardTx(opts: BuildStellarCctpForwardTxArgs): BuiltStellarTx;
2593
2658
  export declare function buildSdk(client: XOXNOClient): SDK;
2594
2659
 
2595
2660
  export {};