/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types */ // HTTP types type HttpMethod = | "get" | "put" | "post" | "delete" | "options" | "head" | "patch" | "trace"; /** 2XX statuses */ type OkStatus = 200 | 201 | 202 | 203 | 204 | 206 | 207 | "2XX"; // prettier-ignore /** 4XX and 5XX statuses */ type ErrorStatus = 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 510 | 511 | '5XX' | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 429 | 431 | 444 | 450 | 451 | 497 | 498 | 499 | '4XX' | "default"; // OpenAPI type helpers /** Given an OpenAPI **Paths Object**, find all paths that have the given method */ type PathsWithMethod< Paths extends {}, PathnameMethod extends HttpMethod, > = { [Pathname in keyof Paths]: Paths[Pathname] extends { [K in PathnameMethod]: any; } ? Pathname : never; }[keyof Paths]; /** Return `responses` for an Operation Object */ type ResponseObjectMap = T extends { responses: any } ? T["responses"] : unknown; /** Return `content` for a Response Object */ type ResponseContent = T extends { content: any } ? T["content"] : unknown; /** Return `requestBody` for an Operation Object */ type OperationRequestBody = T extends { requestBody?: any } ? T["requestBody"] : never; /** Internal helper used in OperationRequestBodyContent */ type OperationRequestBodyMediaContent = undefined extends OperationRequestBody ? FilterKeys>, "content"> | undefined : FilterKeys, "content">; /** Return first `content` from a Request Object Mapping, allowing any media type */ type OperationRequestBodyContent = FilterKeys< OperationRequestBodyMediaContent, MediaType > extends never ? | FilterKeys>, MediaType> | undefined : FilterKeys, MediaType>; /** Return first 2XX response from a Response Object Map */ type SuccessResponse = ResponseContent>; /** Return first 5XX or 4XX response (in that order) from a Response Object Map */ type ErrorResponse = ResponseContent>; // Generic TS utils /** Find first match of multiple keys */ type FilterKeys = { [K in keyof Obj]: K extends Matchers ? Obj[K] : never; }[keyof Obj]; /** Return any `[string]/[string]` media type (important because openapi-fetch allows any content response, not just JSON-like) */ type MediaType = `${string}/${string}`; /** Filter objects that have required keys */ type FindRequiredKeys = K extends unknown ? undefined extends T[K] ? never : K : K; type HasRequiredKeys = FindRequiredKeys; // Note: though "any" is considered bad practice in general, this library relies // on "any" for type inference only it can give. Same goes for the "{}" type. /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types */ /** Options for each client instance */ interface ClientOptions extends Omit { /** set the common root URL for all API requests */ baseUrl?: string; /** custom fetch (defaults to globalThis.fetch) */ fetch?: typeof fetch; /** global querySerializer */ querySerializer?: QuerySerializer; /** global bodySerializer */ bodySerializer?: BodySerializer; headers?: HeadersOptions; } type HeadersOptions = | HeadersInit | Record; type QuerySerializer = ( query: T extends { parameters: any } ? NonNullable : Record, ) => string; type BodySerializer = (body: OperationRequestBodyContent) => any; type ParseAs = "json" | "text" | "blob" | "arrayBuffer" | "stream"; interface DefaultParamsOption { params?: { query?: Record; }; } type ParamsOption = T extends { parameters: any; } ? HasRequiredKeys extends never ? { params?: T["parameters"] } : { params: T["parameters"] } : DefaultParamsOption; type RequestBodyOption = OperationRequestBodyContent extends never ? { body?: never } : undefined extends OperationRequestBodyContent ? { body?: OperationRequestBodyContent } : { body: OperationRequestBodyContent }; type FetchOptions = RequestOptions & Omit; type FetchResponse = | { data: FilterKeys>, MediaType>; error?: never; response: Response; } | { data?: never; error: FilterKeys>, MediaType>; response: Response; }; type RequestOptions = ParamsOption & RequestBodyOption & { querySerializer?: QuerySerializer; bodySerializer?: BodySerializer; parseAs?: ParseAs; fetch?: ClientOptions["fetch"]; }; declare function createClient( clientOptions?: ClientOptions, ): { /** Call a GET endpoint */ GET

>( url: P, ...init: HasRequiredKeys< FetchOptions> > extends never ? [(FetchOptions> | undefined)?] : [FetchOptions>] ): Promise< FetchResponse< "get" extends infer T ? T extends "get" ? T extends keyof Paths[P] ? Paths[P][T] : unknown : never : never > >; /** Call a PUT endpoint */ PUT

>( url: P, ...init: HasRequiredKeys< FetchOptions> > extends never ? [(FetchOptions> | undefined)?] : [FetchOptions>] ): Promise< FetchResponse< "put" extends infer T ? T extends "put" ? T extends keyof Paths[P] ? Paths[P][T] : unknown : never : never > >; /** Call a POST endpoint */ POST

>( url: P, ...init: HasRequiredKeys< FetchOptions> > extends never ? [(FetchOptions> | undefined)?] : [FetchOptions>] ): Promise< FetchResponse< "post" extends infer T ? T extends "post" ? T extends keyof Paths[P] ? Paths[P][T] : unknown : never : never > >; /** Call a DELETE endpoint */ DELETE

>( url: P, ...init: HasRequiredKeys< FetchOptions> > extends never ? [(FetchOptions> | undefined)?] : [FetchOptions>] ): Promise< FetchResponse< "delete" extends infer T ? T extends "delete" ? T extends keyof Paths[P] ? Paths[P][T] : unknown : never : never > >; /** Call a OPTIONS endpoint */ OPTIONS

>( url: P, ...init: HasRequiredKeys< FetchOptions> > extends never ? [(FetchOptions> | undefined)?] : [FetchOptions>] ): Promise< FetchResponse< "options" extends infer T ? T extends "options" ? T extends keyof Paths[P] ? Paths[P][T] : unknown : never : never > >; /** Call a HEAD endpoint */ HEAD

>( url: P, ...init: HasRequiredKeys< FetchOptions> > extends never ? [(FetchOptions> | undefined)?] : [FetchOptions>] ): Promise< FetchResponse< "head" extends infer T ? T extends "head" ? T extends keyof Paths[P] ? Paths[P][T] : unknown : never : never > >; /** Call a PATCH endpoint */ PATCH

>( url: P, ...init: HasRequiredKeys< FetchOptions> > extends never ? [(FetchOptions> | undefined)?] : [FetchOptions>] ): Promise< FetchResponse< "patch" extends infer T ? T extends "patch" ? T extends keyof Paths[P] ? Paths[P][T] : unknown : never : never > >; /** Call a TRACE endpoint */ TRACE

>( url: P, ...init: HasRequiredKeys< FetchOptions> > extends never ? [(FetchOptions> | undefined)?] : [FetchOptions>] ): Promise< FetchResponse< "trace" extends infer T ? T extends "trace" ? T extends keyof Paths[P] ? Paths[P][T] : unknown : never : never > >; }; /** * This file was auto-generated by openapi-typescript. * Do not make direct changes to the file. */ interface paths { "/v0/transfer/quote": { /** * Request a Transfer Quote * @description Get a quote for each available route to find the best price. */ get: operations["v0.transfer.getQuote"]; }; "/v0/transfer/allowance": { /** * Get Token Allowance * @description Get the allowance of a given bridge contract with specific token on source chain */ get: operations["v0.transfer.getAllowance"]; }; "/v0/transfer/approve": { /** * Approve Token * @description Approve a bridge's contract for a specific token. */ get: operations["v0.transfer.getApproval"]; }; "/v0/transfer/send": { /** * Send (Transfer) * @description Get a transfer transaction for the route selected from the `getQuote` endpoint. */ post: operations["v0.transfer.transferToken"]; }; "/v0/transfer/status": { /** * Transfer Status * @description Check the transfer status for a specific transaction. */ get: operations["v0.transfer.getStatus"]; }; "/v0/transfer/history": { /** * Transfer History * @description Get a list of transactions made by a specific wallet address. */ get: operations["v0.transfer.getHistory"]; }; "/v0/transfer/sign": { /** * Sign * @deprecated * @description Generate a signature required by the `claim`. This is only required for transactions routing through the `WORMHOLE` bridge. */ post: operations["v0.transfer.sign"]; }; "/v0/transfer/sign/{id}": { /** * Sign * @description Generate a signature required by the `claim`. This is only required for transactions routing through the `WORMHOLE` bridge. */ post: operations["v0.transfer.signTx"]; parameters: { path: { /** @description The transaction db id */ id: string; }; }; }; "/v0/transfer/claim": { /** * Claim * @deprecated * @description Claim tokens from the bridge after a successful cross-chain transfer. This is only required for transactions routing through the `WORMHOLE` bridge. */ post: operations["v0.transfer.claim"]; }; "/v0/transfer/claim/{id}": { /** * Claim * @description Claim tokens from the bridge after a successful cross-chain transfer. This is only required for transactions routing through the `WORMHOLE` bridge. */ post: operations["v0.transfer.claimTx"]; parameters: { path: { /** @description The transaction db id */ id: string; }; }; }; "/v0/transfer/refund": { /** * Refund * @description Refund a failed bridge transfer. */ post: operations["v0.transfer.refund"]; }; "/v0/metrics/stats": { /** * Get Metrics * @description Get the metrics overview */ get: operations["v0.metrics.getMetricsOverview"]; }; "/v0/utils/wallet/validate": { /** * Wallet Screening * @description Check a bad actor wallet */ post: operations["v0.utils.walletscreening"]; }; "/v0/fee/balances": { /** * Get Fee Balance * @deprecated */ get: operations["v0.fee.balance"]; }; "/v1/fee/balances": { /** Get Fee Balance V1 */ get: operations["v1.fee.partnerbalance"]; }; "/v0/integrations/badge/verification/check": { /** * Check Eligibility For Minting Badge * @description Check Eligibility For Minting Badge */ get: operations["v0.integrations.badgeverification"]; }; "/v0/integrations/badge/verification/claim": { /** * Claim Badge * @description Claim Badge */ get: operations["v0.integrations.badgeclaim"]; }; } interface components { schemas: { /** TokenSymbol */ TokenSymbol: string; /** ChainSlug */ ChainSlug: string; /** * ProtocolType * @enum {string} */ ProtocolType: "evm" | "ibc" | "solana" | "multiversx"; /** Token */ Token: { /** @example USDT */ symbol: string; /** @example Polygon */ name?: string; /** @example 0xc2132D05D31c914a87C6611C10748AEb04B58e8F */ address: string; /** @example 18 */ decimals: number; /** @example 137 */ chainId?: number; /** @example ethereum */ chain?: string; /** @example https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png */ logoURI?: string; }; /** Chain */ Chain: { /** @example 137 */ chainId: number; /** @example Ethereum */ name?: string; slug: components["schemas"]["ChainSlug"]; protocolType: components["schemas"]["ProtocolType"]; /** @example https://raw.githubusercontent.com/polkaswitch/assets/master/blockchains/ethereum/info/logo.png */ logo?: string; /** * @description DEPRECATED - please see new platform API * @example false */ isSingleChainSupported?: boolean; /** * @description DEPRECATED - please see new platform API * @example false */ isSingleChainStakingSupported?: boolean; /** @description DEPRECATED - please see new tokenExplorer/txExplorer */ blockExploreUrls?: string[]; /** @example https://etherscan.io/tokens/{address} */ tokenExplorer?: string; /** @example https://etherscan.io/tx/{txHash} */ txExplorer?: string; /** @example ETH */ nativeCurrency?: string; /** @description DEPRECATED - please see new platform API */ allowSwapFromChains?: components["schemas"]["ChainSlug"][]; /** @description DEPRECATED - please see new platform API */ allowSwapToChains?: components["schemas"]["ChainSlug"][]; rpcUrls?: string[]; /** @description DEPRECATED - please see new rpcUrls */ restRpcs?: string[]; tokens?: components["schemas"]["Token"][]; }; /** Route */ Route: { bridge: components["schemas"]["Bridge"] | components["schemas"]["Aggregator"]; /** @example 0x1111111254fb6c44bac0bed2854e76f90643097d */ bridgeTokenAddress: string; steps: components["schemas"]["RouteSteps"]; path?: components["schemas"]["RouteSwapPath"][]; }; /** RouteSwapPath */ RouteSwapPath: { fromChain?: components["schemas"]["ChainSlug"]; toChain?: components["schemas"]["ChainSlug"]; fromToken?: components["schemas"]["Token"]; toToken?: components["schemas"]["Token"]; /** @example 1000000000000000000 */ amount?: string; /** @description Name of the underlying contract integration associated with this quote. Bridges, DEXs, Staking Providers, and Lending Protocols */ integration?: string; distribution?: components["schemas"]["RoutingDistribution"]; }; /** Bridge */ Bridge: string; /** Aggregator */ Aggregator: string; /** * Transaction * @description The underlying partner bridge or route taken for this Transaction whether it's a cross-chain swap/transfer or single-chain swap */ Transaction: { bridge?: components["schemas"]["Bridge"] | components["schemas"]["Aggregator"]; /** @description Swing Unique Identifier for this transaction. Can be used as a reference ID in support inquiries. */ id?: number; /** @description Associated Swing Project Id with this transaction */ projectId?: string; /** @description Associated Affiliate Partner Id with this transaction */ affiliateId?: string; /** @description Internal unique identifier used by underlying bridge. Not guaranteed to be the transaction hash. For celer this is the transferId. */ txId?: string; /** @description The main status of the transaction from start to finish */ status: components["schemas"]["TransferStatus"]; /** @description Name of the underlying contract integration associated with this quote. Bridges, DEXs, Staking Providers, and Lending Protocols */ integration?: string; /** @description Category of transaction including contract-call execution type */ type?: components["schemas"]["TransactionType"]; /** @description If true, need to call /claim endpoint to claim token on the destination chain for this specific transaction. */ needClaim?: boolean; /** * @description If transaction is in a refund state, this will reflect additional information about the state of the refund * @example BAD_LIQUIDITY */ refundReason?: string; /** @description If transaction is in a failed state, this will reflect additional information about the reason for the failure */ errorReason?: string; /** @description Token Address of sending token on the source chain */ fromTokenAddress?: string; /** @description Chain ID of the source chain */ fromChainId?: number; /** @description Chain slug of the source chain */ fromChainSlug?: components["schemas"]["ChainSlug"]; /** @description Initial token amount sent from the source chain */ fromAmount?: string; /** @description Initial token amount sent from the source chain (in $USD) */ fromAmountUsdValue?: string; /** @description Token Address of receiving token on the destination chain */ toTokenAddress?: string; /** @description Chain ID of the destination chain */ toChainId?: number; /** @description Chain slug of the destination chain */ toChainSlug?: components["schemas"]["ChainSlug"]; /** @description Final token amount deposited into the destination chain */ toAmount?: string; /** @description Final token amount deposited into the destination chain (in $USD) */ toAmountUsdValue?: string; /** @description The transaction hash returned from the source chain */ fromChainTxHash?: string; /** @description The transaction hash on the destination chain */ toChainTxHash?: string; /** @description Token symbol of the sending token on the source chain */ fromTokenSymbol?: string; /** @description Token symbol of the receiving token on the destination chain */ toTokenSymbol?: string; /** @description The source address for the transaction */ fromUserAddress?: string; /** @description The destination address for the transaction */ toUserAddress?: string; /** @description Unix timestamp of when the transaction was first initiated */ txStartedTimestamp?: number; /** @description Unix timestamp of when the Transaction was completed */ txCompletedTimestamp?: number; /** @description The final token address fallbacks into the destination chain */ fallbackTokenAddress?: string; /** @description The final token amount fallbacks into the destination chain */ fallbackAmount?: string; contractCall?: boolean; toContractCallAddress?: string; toContractCallData?: string; toContractCallTokenAddress?: string; toContractCallApprovalAddress?: string; toContractCallGasLimit?: string; destinationTxFee?: string; destinationTxFeeUsdValue?: string; bridgeFee?: string; bridgeFeeUsdValue?: string; bridgeFeeInNativeTokenUsdValue?: string; bridgeFeeInNativeToken?: string; bridgeTokenAddress?: string; bridgeTokenSymbol?: string; bridgeAmount?: string; bridgeAmountUsdValue?: string; gasUsage?: string; gasUsageUsdValue?: string; partnerShare?: string; partnerShareUsdValue?: string; swingShare?: string; swingShareUsdValue?: string; updatedAt?: string; createdAt?: string; flatFeeShare?: string; flatFeeShareUsdValue?: string; percentageFeeShare?: string; percentageFeeShareUsdValue?: string; }; /** * TransferTxData * @description A transaction data object describes a transaction that is to be sent to the network or otherwise processed. */ TransferTxData: { /** * @description The address this transaction is from (sender) * @example 0xEC0c6441cAc4EBC8d9CD12dF6FFB19829e9c427A */ from: string; /** * @description The address (or ENS name) this transaction it to * @example 0x1111111254fb6c44bac0bed2854e76f90643097d */ to: string; /** * @description The raw transaction data to be sent to the network * @example 0x2e95b6c8...2386f26fc1...d3b668f0adb6fd56...3b6d034026aad2da94c59524ac0d93f6d6cbf9071d7086f2cfee7c08 */ data: string; /** * @description The amount (in wei) this transaction is sending. * @example 10000000000000000 */ value?: string; /** * @description The maximum amount of gas this transaction is permitted to use. If left unspecified, the provider may use estimateGas() to determine the value to use. For transactions with unpredicatable gas estimates, this may be required to specify explicitly. * @example 143340 */ gas?: string; txId?: string; /** @description The nonce for this transaction. This should be set to the number of transactions ever sent from this address. */ nonce?: number; /** @description Additional metadata that might be helpful. For `ibc` transfers, this will include the `denom` value. */ meta?: Record; }; Quote: { /** @description Fee taken by the bridge */ bridgeFee: string; /** @description Average estimated length of time (in minutes) this transfer will take to complete */ duration?: number; /** @description Gas limit for the deposit */ gas: string; quote: string; bridgeTokenAddress: string; decimals: number; bridgeFeeInNativeToken: string; steps: components["schemas"]["RouteSteps"]; bridgeTokenSymbol?: string; destTokenAddress?: string; path: components["schemas"]["RouteSwapPath"][]; distribution?: components["schemas"]["RoutingDistribution"]; bridge?: components["schemas"]["Bridge"] | components["schemas"]["Aggregator"]; /** @description Name of the underlying contract integration associated with this quote. Bridges, DEXs, Staking Providers, and Lending Protocols */ integration?: string; /** @description Category of transaction including contract-call execution type */ type: components["schemas"]["TransactionType"]; success?: boolean; message?: string; fees?: components["schemas"]["Fee"][]; }; /** * TransactionType * @enum {string|null} */ TransactionType: "swap" | "custom_contract" | "deposit" | "withdraw" | "claim" | null; /** * TransactionType * @enum {string} */ TransactionModeType: "regular" | "gasless"; RoutingDistribution: { [key: string]: number; }; /** * DirectionPriority * @enum {string|null} */ DirectionPriority: "to" | "from" | null; /** * TransferStatus * @description - `Submitted`: meaning that the token is still on the source chain. The source chain tx is in pending status. * - `Pending Source Chain`: The tx on source chain is done, but the tx doesn’t appear on the dst chain yet. 2a. In case of token transfer, the bridge router is moving assets from source chain to destination chain. 2b. In case of cross-chain swap, this means either our contract is depositing token to the bridge contract or the bridge contract is finished but bridge router is moving assets from source chain to destination chain. * - `Pending Destination Chain`: The tx appears on the destination chain but it is still running. * - `Completed`: Token is delivered to use’s wallet on dest chain yet. * - `Refund Required`: Token is stuck on the bridge and required refund. (e.g. In case of Celer, clients need to call /refund endpoint). * - `Refunded`: Refund is successful. No more action needed. * - `Failed Source Chain`: Transaction failed on the source chain 1a. In case of the token transfer, this means we cannot invoke the bridge contract. The token will be returned back to user’s wallet on the source chain. 1b. In case of the cross-chain swap, this means our contract fails or we failed to invoke the bridge contract. The token will be returned back to the user’s wallet on the source chain. * - `Failed Destination Chain`: Transaction failed on the destination chain. 3a. In case of the token transfer, this shouldn't happen. 3b. In case of the cross-chain swap, this means our contract failed to run and the bridge token was sent to the user’s wallet on the destination chain. * - `Fallback`: The token swap fails on the destination chain and instead of getting the toToken got the bridge token. * - `Pending Source Chain`: The tx on source chain is done, but the tx doesn’t appear on the dst chain yet. 2a. In case of token transfer, the bridge router is moving assets from source chain to destination chain. 2b. In case of cross-chain swap, this means either our contract is depositing token to the bridge contract or the bridge contract is finished but bridge router is moving assets from source chain to destination chain. * - `Pending Destination Chain`: The tx appears on the destination chain but it is still running. * - `Completed`: Token is delivered to use’s wallet on dest chain yet. * - `Refund Required`: Token is stuck on the bridge and required refund. (e.g. In case of Celer, clients need to call /refund endpoint). * - `Refunded`: Refund is successful. No more action needed. * - `Failed Source Chain`: Transaction failed on the source chain 1a. In case of the token transfer, this means we cannot invoke the bridge contract. The token will be returned back to user’s wallet on the source chain. 1b. In case of the cross-chain swap, this means our contract fails or we failed to invoke the bridge contract. The token will be returned back to the user’s wallet on the source chain. * - `Failed Destination Chain`: Transaction failed on the destination chain. 3a. In case of the token transfer, this shouldn't happen. 3b. In case of the cross-chain swap, this means our contract failed to run and the bridge token was sent to the user’s wallet on the destination chain. * - `Not Sent`: The tx didn't send and was stopped at approval step. * * New Statuses * * - `Claim Required`: The transaction is still in-progress, but requires a claim step to complete the transfer on the destination chain. * @enum {string} */ TransferStatus: "Submitted" | "Pending Source Chain" | "Pending Destination Chain" | "Completed" | "Refund Required" | "Refunded" | "Failed Source Chain" | "Failed Destination Chain" | "Fallback" | "Not Sent" | "Claim Required"; /** * @description The status of the current transfer step. It should be in one of these values: allowance' | 'approve' | 'send' | 'nativeStaking' | 'bridge' | 'sign' | 'claim'; * @enum {string} */ TransferStep: "allowance" | "approve" | "send" | "nativeStaking" | "sign" | "claim" | "bridge"; /** * TransferStepStatus * @description The status of the current transfer step. It should be in one of these values: * * - `pending` waiting for step to start * * - `action_required` user action is required such as interacting with metamask * * - `chain_switch_required` wallet needs to switch chains before continuing * * - `wallet_connection_required` wallet with address needs to be connected * * - `confirming` waiting for transaction confirmation * * - `bridging` waiting for bridge contract transaction to complete * * - `failed` transfer process had an error * * - `success` transfer process is done * @enum {string} */ TransferStepStatus: "pending" | "chain_switch_required" | "action_required" | "wallet_connection_required" | "confirming" | "bridging" | "failed" | "success"; /** RouteSteps */ RouteSteps: components["schemas"]["TransferStep"][]; /** ContractCallInfo */ ContractCallInfo: { /** @description The address of the contract to interact with. */ toContractAddress: string; /** @description The callData to be sent to the contract for the interaction on the destination chain. */ toContractCallData: string; /** @description The estimated gas used by the destination call. If this value is incorrect, the interaction may fail -- choose this carefully! */ toContractGasLimit?: string; /** @description Some contract interactions will output a token (e.g. staking), specify the token address to forward the token to the user. Omit this parameter if no token should be returned to the user. */ outputTokenAddress?: string; /** @description If the approval address is different thant the contract to call, specify that address here. */ toApprovalAddress?: string; }; /** Fee */ Fee: { /** @description Specifies the type of fee. Possible values includes: 1. network gas fee 2. bridge fee 3. partner fee associated with the transfer */ type: components["schemas"]["FeesType"]; /** @description Fee amount in wei */ amount: string; /** @description Fee amount converted to USD$ equivalent */ amountUSD: string; /** @description Specifies the token symbol this fee is being deducted in */ tokenSymbol: components["schemas"]["TokenSymbol"]; /** @description Specifies the token address this fee is being deducted in */ tokenAddress: string; /** @description Specifies the chain this fee is being deducted from */ chainSlug: components["schemas"]["ChainSlug"]; decimals: number; /** @description Specifies whether this fee is deducted from the original source token amount. If false, this implies that this is an additional fee on top of the source token amount */ deductedFromSourceToken: boolean; }; /** * FeesType * @enum {string} */ FeesType: "bridge" | "gas" | "partner"; /** * Balance * @description Returns balances converted to USD of a wallet */ Balance: { amount: string; amountUSD: string; symbol: components["schemas"]["TokenSymbol"]; address: string; decimals: number; usdRate: string; isNative: boolean; chainSlug: components["schemas"]["ChainSlug"]; }; /** FeeBalance */ FeeBalance: { /** @description projectId from Swing Platform */ projectId?: string; /** @description The percentage of fee charged by partners in Basis Points (BPS) units. This will override the default fee rate configured via platform. 1 BPS = 0.01%. The maximum value is 1000 (which equals 10%). The minimum value is 1 (which equals 0.01%). */ feeRate?: number; /** @description Tokens balance per chain */ collectedFeeAmounts?: components["schemas"]["FeeBalanceToken"][]; /** @description The percentage the Swing platform will charge from the pool of collected partner fees in Basis Points (BPS) units. 1 BPS = 0.01%. 1500 BPS = 15% */ platformFeeRate?: number; amount?: number; amountUSD?: number; }; /** FeeBalanceV1 */ FeeBalanceV1: { /** @description projectId from Swing Platform */ projectSlug?: string; /** @description The percentage of fee charged by partners in Basis Points (BPS) units. This will override the default fee rate configured via platform. 1 BPS = 0.01%. The maximum value is 1000 (which equals 10%). The minimum value is 1 (which equals 0.01%). */ feeRate?: number; /** @description Tokens balance per chain */ collectedFeeAmounts?: components["schemas"]["FeeBalanceTokenV1"][]; /** @description The percentage the Swing platform will charge from the pool of collected partner fees in Basis Points (BPS) units. 1 BPS = 0.01%. 1500 BPS = 15% */ platformFeeRate?: number; amount?: number; amountUSD?: number; }; /** FeeBalanceToken */ FeeBalanceToken: { /** @description Chain Slug e.g. ethereum */ chainSlug?: string; /** @description Balance of each token */ balances?: components["schemas"]["TokenBalance"][]; /** @description Final fees collected into the source chain in ($USD) */ amountUsd?: number; /** @description Final fees collected into the source chain */ amount?: number; }; /** FeeBalanceTokenV1 */ FeeBalanceTokenV1: { /** @description Chain Slug e.g. ethereum */ chainSlug?: string; /** @description Balance of each partner address */ balances?: components["schemas"]["PartnerBalance"][]; /** @description Final fees collected into the source chain in ($USD) */ amountUsd?: number; /** @description Final fees collected into the source chain */ amount?: number; }; /** TokenBalance */ TokenBalance: { /** @description token symbol */ symbol?: string; /** @description decimal */ decimals?: number; /** @description token address */ tokenAddress?: string; /** @description amount from contract */ amount?: string; /** @description Fee collector smart contracts for the balance of each token for the partner address. */ feeCollectorAddress?: string; /** @description Fee collector intergration name. It could be swing, squid... */ feeIntergationName?: string; }; /** PartnerBalance */ PartnerBalance: { /** @description The partner address */ partnerAddress?: string; /** @description A list of fee tokens collected */ tokenFees?: components["schemas"]["TokenBalance"][]; }; /** Duration */ Duration: { unit: string; value: number; }; /** MintingBadge */ MintingBadge: { /** @enum {number} */ code: 0 | 1; message: string; eligibility: boolean; }; /** ClaimingBadge */ ClaimingBadge: { /** @enum {number} */ code: 0 | 1; message: string; tx?: components["schemas"]["TransferTxData"]; }; }; responses: never; parameters: never; requestBodies: never; headers: never; pathItems: never; } interface operations { /** * Request a Transfer Quote * @description Get a quote for each available route to find the best price. */ "v0.transfer.getQuote": { parameters: { query: { /** @description Token symbol on the source chain. */ tokenSymbol: components["schemas"]["TokenSymbol"]; /** @description Token symbol on the destination chain. */ toTokenSymbol: components["schemas"]["TokenSymbol"]; /** @description Token amount in minimal divisible unit (Wei) */ tokenAmount: string; /** @description Token address on source chain. */ fromTokenAddress: string; /** @description Source chain slug */ fromChain: components["schemas"]["ChainSlug"]; /** @description Destination chain slug. */ toChain: components["schemas"]["ChainSlug"]; /** @description User's wallet address from source chain. */ fromUserAddress?: string; /** @description An optional percentage value passed as a decimal between 0 and 1. (i.e 0.02 = 2%). Defaults to 3%. Your transaction will revert if the price changes unfavorably by more than this percentage. */ maxSlippage?: number; /** @description User's wallet address on the destination chain. */ toUserAddress?: string; /** @description Optional Contract Address of pre-determined list of Swing Partners */ partner?: string; /** @description Optional Project Identifier. Will return project-specific quote */ projectId?: string; /** @description Token address on the destination chain. */ toTokenAddress: string; /** @description Optionally set to any value - to return more verbose details on quote */ debug?: string; /** @description Optional. Set a value in milliseconds. Controls the cutoff duration on finding quotes before returning all valid quotes. */ timeoutMs?: string; /** @description Advanced option to specify exact DEXes to utilize in the quote. This will impact prices and quote availability. If the DEX key is invalid, it will revert to default behaviour. Each dex-aggregator is '|' seperated and then followed by a comma separated list of DEX names for each aggregator. See example: `paraswap:Aerodrome|openocean:12` */ includeDEXS?: string; /** @description Optionally set to true or false to identify contract call */ contractCall?: boolean; /** @description Optionally set to true or false to skip gas estimations to speed up quote response times */ skipGasEstimate?: boolean; /** @description Optionally set to true to return all available quotes. By default, we only return the best performing quotes. Much slower speeds */ full?: boolean; /** @description The percentage of fee charged by partners in Basis Points (BPS) units. This will override the default fee rate configured via platform. 1 BPS = 0.01%. The maximum value is 1000 (which equals 10%). The minimum value is 1 (which equals 0.01%). */ fee?: number; /** @description Optionally set to true or false to identify cosmos native staking */ nativeStaking?: boolean; /** @description Optional: Set “gasless” to receive a gasless quote. */ mode?: string; }; }; responses: { /** @description OK */ 200: { content: { "application/json": { fromToken: components["schemas"]["Token"]; toToken: components["schemas"]["Token"]; fromChain: components["schemas"]["Chain"]; toChain: components["schemas"]["Chain"]; routes: { /** @description Average estimated length of time (in minutes) this transfer will take to complete */ duration: number; /** * @description DEPRECATED - please see new fees return object. Gas limit for the deposit. * @example 4000000000 */ gas: string; route: components["schemas"]["Route"][]; distribution?: components["schemas"]["RoutingDistribution"]; quote: { /** @description DEPRECATED - please see new fees return object */ bridgeFeeInNativeToken: string; /** @description DEPRECATED - please see new fees return object */ bridgeFee: string; /** @description Name of the underlying contract integration associated with this quote. Bridges, DEXs, Staking Providers, and Lending Protocols */ integration: string; /** @description Category of transaction including contract-call execution type */ type: components["schemas"]["TransactionType"]; /** @description Default is regular. Determine which routes to treat as gasless. */ mode: components["schemas"]["TransactionModeType"]; fromAmount?: string; amount: string; decimals: number; amountUSD: string; /** @description DEPRECATED - please see new fees return object */ bridgeFeeUSD: string; /** @description DEPRECATED - please see new fees return object */ bridgeFeeInNativeTokenUSD: string; /** @description Returns all fees associated with this quote and transfer. This includes gas and bridge fees (i.e liquidity, protocol, relayer and bonder). Every fee is also denominated in either the source, destination or source-native token. Fees are also converted to USD$ equivalents for convenience. */ fees: components["schemas"]["Fee"][]; /** @description The price impact percent. */ priceImpact?: string; /** @description How long did the quote take to generate in milliseconds. */ executionTime?: number; }; /** @description DEPRECATED - please see new fees return object */ gasUSD: string; }[]; debug?: string[]; }; }; }; }; }; /** * Get Token Allowance * @description Get the allowance of a given bridge contract with specific token on source chain */ "v0.transfer.getAllowance": { parameters: { query: { /** @description Token symbol on the source chain. */ tokenSymbol: components["schemas"]["TokenSymbol"]; /** @description Token address on source chain. */ tokenAddress: string; /** @description Source chain slug */ fromChain: components["schemas"]["ChainSlug"]; /** @description Dest chain slug. Only required for token swap in Nxtp bridge */ toChain: components["schemas"]["ChainSlug"]; /** @description User's wallet address from source chain. */ fromAddress: string; /** @description Bridge/Aggregator slug */ bridge: components["schemas"]["Bridge"] | components["schemas"]["Aggregator"]; /** @description Token symbol on the destination chain. */ toTokenSymbol: components["schemas"]["TokenSymbol"]; /** @description Token address on destination chain. */ toTokenAddress: string; /** @description Optioanl Project Identifier for Transaction */ projectId?: string; /** @description Optionally set to true or false to identify contract call */ contractCall?: boolean; }; }; responses: { /** @description OK */ 200: { content: { "application/json": { /** @example 1000000 */ allowance: string; }; }; }; }; }; /** * Approve Token * @description Approve a bridge's contract for a specific token. */ "v0.transfer.getApproval": { parameters: { query: { /** @description Token symbol on the source chain. */ tokenSymbol: components["schemas"]["TokenSymbol"]; /** @description Token address on source chain. */ tokenAddress: string; /** @description Token amount in minimal divisible unit (Wei) */ tokenAmount: string; /** @description Source chain slug */ fromChain: components["schemas"]["ChainSlug"]; /** @description Dest chain slug. Only required in Across bridge. Optional in Nxtp bridge */ toChain: components["schemas"]["ChainSlug"]; /** @description User's wallet address from source chain. */ fromAddress: string; /** @description Bridge/Aggregator slug */ bridge: components["schemas"]["Bridge"] | components["schemas"]["Aggregator"]; /** @description Token symbol on the destination chain. */ toTokenSymbol: components["schemas"]["TokenSymbol"]; /** @description Token address on destination chain. */ toTokenAddress: string; /** @description Optioanl Project Identifier for Transaction */ projectId?: string; /** @description Optionally set to true or false to identify contract call */ contractCall?: boolean; }; }; responses: { /** @description OK */ 200: { content: { "application/json": { tx?: { /** @example 0x095ea7b3...1111111254fb6c44bac0bed2854e76f90643097d...174876e800 */ data: string; /** @example 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 */ to: string; /** @example 10000000 */ value?: string; /** @example 10000000 */ gas?: string; from: string; nonce?: number; }[]; fromChain: components["schemas"]["Chain"]; }; }; }; }; }; /** * Send (Transfer) * @description Get a transfer transaction for the route selected from the `getQuote` endpoint. */ "v0.transfer.transferToken": { requestBody?: { content: { "application/json": { tokenSymbol: components["schemas"]["TokenSymbol"]; toTokenSymbol: components["schemas"]["TokenSymbol"]; /** @description Amount in minimal divisible unit (wei) */ tokenAmount: string; fromChain: components["schemas"]["ChainSlug"]; /** @description Token address on source chain */ fromTokenAddress: string; /** @description User's wallet on source chain. */ fromUserAddress: string; toChain: components["schemas"]["ChainSlug"]; /** @description Destination token amount for contract call */ toTokenAmount?: string; /** @description Best route returned by Swing /quote endpoint */ route: components["schemas"]["Route"][]; /** @description Token address on the destination chain. */ toTokenAddress: string; /** @description User's wallet address on the destination chain. */ toUserAddress: string; /** @description Solana specific token account address (required if transfer is from Solana to EVM chains) */ fromTokenAccountAddress?: string; /** @description Solana specific token account address (required if transfer is from EVM chains to Solana) */ toTokenAccountAddress?: string; /** * @description An optional percentage value passed as a decimal between 0 and 1. (i.e 0.02 = 2%). Defaults between 0.5% and 1% based on chain and token. Your transaction will revert if the price changes unfavorably by more than this percentage. * @example 0.01 */ maxSlippage?: number; /** @description Nxtp requires encryptionPublicKey to encrypt callData. */ encryptionPublicKey?: string; /** @description partner company contract address */ partner?: string; /** * @description Project Identifier. Optional. Will return project-specific configuration * @example 41122b12-7aad-4c54-9e2f-a67627ac0787 */ projectId?: string; /** * @description Advanced option to specify exact DEXes to utilize in the quote. This will impact prices and quote availability. If the DEX key is invalid, it will revert to default behaviour. Each dex-aggregator is '|' seperated and then followed by a comma separated list of DEX names for each aggregator. See example: `paraswap:Aerodrome|openocean:12` * @example paraswap:Aerodrome|openocean:12 */ includeDEXS?: string; /** @description Parameters for contract call */ contractCallInfo?: components["schemas"]["ContractCallInfo"]; /** @description Optionally set the percentage of fee charged by partners per each transaction in Basis Points (BPS) units. This will override the default fee rate configured via platform. 1 BPS = 0.01%. The maximum value is 1000 (which equals 10%). The minimum value is 1 (which equals 0.01%). */ fee?: number; /** @description Affiliate ID for tracking purposes. Optional. */ affiliateId?: string; /** @description Setting to any truthy-value will skip transaction validations on-chain. By default, we check for transactions that will fail on-chain execution (ex. not enough allowance or in-sufficent funds) and return an error. */ skipValidation?: string; nativeStaking?: boolean; }; }; }; responses: { /** @description OK */ 200: { content: { "application/json": { fromToken: components["schemas"]["Token"]; toToken: components["schemas"]["Token"]; fromChain: components["schemas"]["Chain"]; toChain: components["schemas"]["Chain"]; /** @description Best route returned by Swing */ route: components["schemas"]["Route"][]; tx?: components["schemas"]["TransferTxData"]; /** @description Swing Unique Identifier used to track the transaction. Should be saved for further interactions with the API such as fetching latest status. */ id: number; }; }; }; }; }; /** * Transfer Status * @description Check the transfer status for a specific transaction. */ "v0.transfer.getStatus": { parameters: { query?: { /** @description Swing Unique Identifer for the Transaction as returned by /send endpoint. */ id?: number; /** @description Transaction Hash returned by signer (e.g. metamask) on source chain. */ txHash?: string; /** @description Optioanl Project Identifier for Transaction */ projectId?: string; }; }; responses: { /** @description OK */ 200: { content: { "application/json": components["schemas"]["Transaction"]; }; }; }; }; /** * Transfer History * @description Get a list of transactions made by a specific wallet address. */ "v0.transfer.getHistory": { parameters: { query?: { /** @description Source Chain Slug. Optional search filter. */ fromChain?: components["schemas"]["ChainSlug"]; /** @description Destination Chain Slug. Optional search filter. */ toChain?: components["schemas"]["ChainSlug"]; /** @description User's wallet address on source chain */ userAddress?: string; /** @description Project Identifier. Optional. Will return project-specific history */ projectId?: string; /** @description Bridge/Aggregator slug. Optional search filter. */ bridge?: components["schemas"]["Bridge"] | components["schemas"]["Aggregator"]; /** @description Optional. Number of transactions to return per page. Default is 100 */ limit?: number; /** @description Optional. The subset of transactions (page) to return based on the limit. This allows the ability to pageinate through all transactions. */ page?: number; }; }; responses: { /** @description OK */ 200: { content: { "application/json": { transactions?: components["schemas"]["Transaction"][]; /** @description For pagination. Returns the current numbered page or subset of transactions based on the limit. */ currentPageNumber?: number; /** @description For pagination. Returns the total number of pages or subset of transactions based on the limit. */ totalPageCount?: number; /** @description Returns the total number of transactions per the original query based on the filters provided. Not impacted by pagination or the limit. */ totalTransactionCount?: number; }; }; }; }; }; /** * Sign * @deprecated * @description Generate a signature required by the `claim`. This is only required for transactions routing through the `WORMHOLE` bridge. */ "v0.transfer.sign": { requestBody?: { content: { "application/json": { bridge: components["schemas"]["Bridge"]; /** * @description Transaction hash * @example 0x00000....000 */ txId: string; /** @description User's wallet address */ userAddress: string; /** @description Only required if bridge is cross swap. Default false which will use relayer fee */ useNativeTokenToClaim?: boolean; /** @description Source chain slug */ fromChain: components["schemas"]["ChainSlug"]; /** @description Dest chain slug */ toChain: components["schemas"]["ChainSlug"]; /** @description Transaction Hash returned by signer (e.g. metamask) on source chain. */ txHash: string; }; }; }; responses: { /** @description OK */ 200: { content: { "application/json": { /** @description hash of the signature that will be the input of the claim function */ hash: string; /** @description relayer fee of the signature that will be the input of the claim function */ relayerFee?: string; /** @description This will be used in '/claim' endpoint */ useNativeTokenToClaim?: boolean; /** @description Unsigned tx data to create associated token account. This is the optional, only for Solana */ associatedTokenTx?: string; }; }; }; }; }; /** * Sign * @description Generate a signature required by the `claim`. This is only required for transactions routing through the `WORMHOLE` bridge. */ "v0.transfer.signTx": { parameters: { path: { /** @description The transaction db id */ id: string; }; }; requestBody?: { content: { "application/json": Record; }; }; responses: { /** @description OK */ 200: { content: { "application/json": { /** @description hash of the signature that will be the input of the claim function */ hash: string; /** @description relayer fee of the signature that will be the input of the claim function */ relayerFee?: string; /** @description This will be used in '/claim' endpoint */ useNativeTokenToClaim?: boolean; /** @description Unsigned tx data to create associated token account. This is the optional, only for Solana */ associatedTokenTx?: string; }; }; }; }; }; /** * Claim * @deprecated * @description Claim tokens from the bridge after a successful cross-chain transfer. This is only required for transactions routing through the `WORMHOLE` bridge. */ "v0.transfer.claim": { requestBody?: { content: { "application/json": { fromChain: components["schemas"]["Chain"]; toChain: components["schemas"]["Chain"]; bridge: components["schemas"]["Bridge"]; /** * @description Transaction hash genereated by send request * @example 0x00000....000 */ txId: string; /** @description The user's wallet address on source chain */ userAddress: string; signature?: string; relayerFee?: string; /** @description Default false which will use relayer fee */ useNativeTokenToClaim?: boolean; /** @description The user's wallet address on destination chain */ toUserAddress: string; /** @description Transaction Hash returned by signer (e.g. metamask) on source chain. */ fromChainTxHash?: string; }; }; }; responses: { /** @description OK */ 200: { content: { "application/json": { tx?: components["schemas"]["TransferTxData"]; message?: string; }; }; }; }; }; /** * Claim * @description Claim tokens from the bridge after a successful cross-chain transfer. This is only required for transactions routing through the `WORMHOLE` bridge. */ "v0.transfer.claimTx": { parameters: { path: { /** @description The transaction db id */ id: string; }; }; requestBody?: { content: { "application/json": { signature?: string; }; }; }; responses: { /** @description OK */ 200: { content: { "application/json": { tx?: components["schemas"]["TransferTxData"]; message?: string; }; }; }; }; }; /** * Refund * @description Refund a failed bridge transfer. */ "v0.transfer.refund": { requestBody?: { content: { "application/json": { fromChain: components["schemas"]["Chain"]; toChain: components["schemas"]["Chain"]; bridge: components["schemas"]["Bridge"]; /** * @description Transaction hash genereated by send request * @example 0x00000....000 */ txId?: string; /** @description user's wallet address on destination chain */ userAddress: string; /** @description Transaction Hash returned by signer (e.g. metamask) on source chain. */ fromChainTxHash: string; }; }; }; responses: { /** @description OK */ 200: { content: { "application/json": { message?: string; }; }; }; }; }; /** * Get Metrics * @description Get the metrics overview */ "v0.metrics.getMetricsOverview": { parameters: { query?: { /** @description Optional Project Identifier. Will return project-specific configuration */ projectId?: string; /** @description Optional. Start date range filter in Unix Timestamp in seconds. */ startDate?: string; /** @description Optional. End date range filter in Unix Timestamp in seconds. */ endDate?: string; }; }; responses: { /** @description OK */ 200: { content: { "application/json": { /** @example YYYY-MM-DDThh:mm:ssZ */ startDate?: string; /** @example YYYY-MM-DDThh:mm:ssZ */ endDate?: string; /** @example 1232425 */ totalVolume?: string; /** @example 1232425 */ totalFees?: string; /** @example 1232425 */ totalUniqueAddresses?: number; /** @example 1232425 */ totalTransactionCount?: number; topBridges?: { /** @example hop */ name?: string; /** @example 12324242 */ volume?: string; /** @example 123 */ transactionCount?: number; }[]; topPairs?: { /** @example fantom */ fromChainSlug?: components["schemas"]["ChainSlug"]; /** @example polygon */ toChainSlug?: components["schemas"]["ChainSlug"]; /** @example 0xc2132D05D31c914a87C6611C10748AEb04B58e8F */ fromTokenAddress?: string; /** @example 0xc2132D05D31c914a87C6611C10748AEb04B58e8F */ toTokenAddress?: string; /** @example ETH */ fromTokenSymbol?: string; /** @example MATIC */ toTokenSymbol?: string; /** @example 12324242 */ volume?: string; /** @example 123 */ transactionCount?: number; }[]; topContractIntegrations?: { /** @example deposit */ type?: components["schemas"]["TransactionType"]; /** @example 12324242 */ totalVolume?: string; /** @example 123 */ totalTransactionCount?: number; integrations?: { /** @example lido */ name?: string; /** @example 12324242 */ volume?: string; /** @example 123 */ transactionCount?: number; }[]; }[]; historicalTransactionCount?: { /** @example July 30 */ date?: string; /** @example 12324242 */ value?: string; }[]; historicalVolume?: { /** @example July 30 */ date?: string; /** @example 12324242 */ value?: string; }[]; historicalVolumeByChain?: { /** @example July 30 */ date?: string; volume?: { /** @example polygon */ chainSlug?: components["schemas"]["ChainSlug"]; value?: unknown[]; }[]; }[]; historicalVolumeSamechain?: { /** @example July 30 */ date?: string; volume?: { /** @example polygon */ chainSlug?: components["schemas"]["ChainSlug"]; value?: unknown[]; }[]; }[]; historicalVolumeCrossChainChain?: { /** @example July 30 */ date?: string; volume?: { /** @example polygon */ chainSlug?: components["schemas"]["ChainSlug"]; value?: unknown[]; }[]; }[]; historicalFeeByChain?: { /** @example July 30 */ date?: string; required?: []; volume?: { chainSlug?: components["schemas"]["ChainSlug"]; value?: unknown[]; }[]; }[]; historicalUniqueAddresses?: { /** @example July 30 */ date?: string; /** @example 12324242 */ value?: string; }[]; }; }; }; }; }; /** * Wallet Screening * @description Check a bad actor wallet */ "v0.utils.walletscreening": { requestBody?: { content: { "application/json": { /** @description A user's wallet address connecting to API or SDK */ userAddress: string; }; }; }; responses: { /** @description OK */ 200: { headers: { }; content: { "application/json": { /** @description A wallet status of "False" means the wallet is a bad actor wallet and "True" is a good wallet */ status?: boolean; /** @description A message for reasoning */ message?: string; }; }; }; }; }; /** * Get Fee Balance * @deprecated */ "v0.fee.balance": { parameters: { query: { /** @description Project Slug from Swing Platform */ projectId: string; /** @description Active or Inactivate fee wallets */ enabled?: boolean; }; }; responses: { /** @description OK */ 200: { content: { "application/json": components["schemas"]["FeeBalance"]; }; }; }; }; /** Get Fee Balance V1 */ "v1.fee.partnerbalance": { parameters: { query: { /** @description Project Slug from Swing Platform */ projectId: string; /** @description Active or Inactivate fee wallets */ enabled?: boolean; }; }; responses: { /** @description OK */ 200: { content: { "application/json": components["schemas"]["FeeBalanceV1"]; }; }; }; }; /** * Check Eligibility For Minting Badge * @description Check Eligibility For Minting Badge */ "v0.integrations.badgeverification": { parameters: { query: { /** @description The badge contract address */ badge: string; /** @description The recipient is eligible for the badge */ recipient: string; }; }; responses: { /** @description OK */ 200: { content: { "application/json": components["schemas"]["MintingBadge"]; }; }; }; }; /** * Claim Badge * @description Claim Badge */ "v0.integrations.badgeclaim": { parameters: { query: { /** @description The badge contract address */ badge: string; /** @description The recipient is eligible for the badge */ recipient: string; }; }; responses: { /** @description OK */ 200: { content: { "application/json": components["schemas"]["ClaimingBadge"]; }; }; }; }; } type schemas = components["schemas"]; type Environment = "production" | "development" | "testnet" | ({} & string); type SwingAPI = ReturnType> & { environment: Environment; }; interface SwingAPIOptions { /** * The Swing API environment. * @default production */ environment?: Environment; /** * The base URL of the Swing Cross-Chain API. * * This option overrides the value set by the `environment` option. * * @default https://swap.prod.swing.xyz */ baseUrl?: string; /** * Default headers to send on each request. * * @default {} */ headers?: Record; } /** * Creates typescript Swing Cross-Chain API client. * @param environment The API environment to use. Default: production * @param baseUrl The base URL of the Swing Cross-Chain API. Default: https://swap.prod.swing.xyz * @param headers Default headers to send with each request. * @returns SwingAPI * * @example * import { getSwingAPI } from "@swing.xyz/cross-chain-api"; * const swingAPI = getSwingAPI(); * const response = await swingAPI.GET('/v0/transfer/config'); */ declare function getSwingAPI({ environment, baseUrl, headers, }?: SwingAPIOptions): SwingAPI; export { type Environment, type SwingAPI, type SwingAPIOptions, type components, getSwingAPI, type operations, type paths, type schemas };