SwapKitApi
const
SwapKitApi:object
Defined in: packages/helpers/src/api/index.ts:12
Type declaration
Section titled “Type declaration”mayachainMidgard
Section titled “mayachainMidgard”mayachainMidgard:
object
mayachainMidgard.getBorrowerDetail()
Section titled “mayachainMidgard.getBorrowerDetail()”getBorrowerDetail: (
address
) =>Promise
<object
[]>
Parameters
Section titled “Parameters”address
Section titled “address”string
Returns
Section titled “Returns”Promise
<object
[]>
mayachainMidgard.getBorrowerDetailRaw()
Section titled “mayachainMidgard.getBorrowerDetailRaw()”getBorrowerDetailRaw: (
address
) =>Promise
<BorrowerDetails
> =borrowerDetailGetter
Parameters
Section titled “Parameters”address
Section titled “address”string
Returns
Section titled “Returns”Promise
<BorrowerDetails
>
mayachainMidgard.getLiquidityPosition()
Section titled “mayachainMidgard.getLiquidityPosition()”getLiquidityPosition: (
address
) =>Promise
<object
[]>
Parameters
Section titled “Parameters”address
Section titled “address”string
Returns
Section titled “Returns”Promise
<object
[]>
mayachainMidgard.getLiquidityPositionRaw()
Section titled “mayachainMidgard.getLiquidityPositionRaw()”getLiquidityPositionRaw: (
address
) =>Promise
<MemberDetailsMayachain
> =liquidityPositionGetter
Parameters
Section titled “Parameters”address
Section titled “address”string
Returns
Section titled “Returns”Promise
<MemberDetailsMayachain
>
mayachainMidgard.getNameDetails()
Section titled “mayachainMidgard.getNameDetails()”getNameDetails: (
name
) =>Promise
<THORNameDetails
>
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise
<THORNameDetails
>
mayachainMidgard.getNamesByAddress()
Section titled “mayachainMidgard.getNamesByAddress()”getNamesByAddress: (
address
) =>Promise
<string
[]>
Parameters
Section titled “Parameters”address
Section titled “address”string
Returns
Section titled “Returns”Promise
<string
[]>
mayachainMidgard.getNamesByOwner()
Section titled “mayachainMidgard.getNamesByOwner()”getNamesByOwner: (
address
) =>Promise
<string
[]>
Parameters
Section titled “Parameters”address
Section titled “address”string
Returns
Section titled “Returns”Promise
<string
[]>
mayachainMidgard.getSaverDetailRaw()
Section titled “mayachainMidgard.getSaverDetailRaw()”getSaverDetailRaw: (
address
) =>Promise
<SaverDetails
> =saverDetailGetter
Parameters
Section titled “Parameters”address
Section titled “address”string
Returns
Section titled “Returns”Promise
<SaverDetails
>
mayachainMidgard.getSaversDetail()
Section titled “mayachainMidgard.getSaversDetail()”getSaversDetail: (
address
) =>Promise
<object
[]>
Parameters
Section titled “Parameters”address
Section titled “address”string
Returns
Section titled “Returns”Promise
<object
[]>
microgard
Section titled “microgard”microgard:
__module
thorchainMidgard
Section titled “thorchainMidgard”thorchainMidgard:
object
thorchainMidgard.getBorrowerDetail()
Section titled “thorchainMidgard.getBorrowerDetail()”getBorrowerDetail: (
address
) =>Promise
<object
[]>
Parameters
Section titled “Parameters”address
Section titled “address”string
Returns
Section titled “Returns”Promise
<object
[]>
thorchainMidgard.getBorrowerDetailRaw()
Section titled “thorchainMidgard.getBorrowerDetailRaw()”getBorrowerDetailRaw: (
address
) =>Promise
<BorrowerDetails
> =borrowerDetailGetter
Parameters
Section titled “Parameters”address
Section titled “address”string
Returns
Section titled “Returns”Promise
<BorrowerDetails
>
thorchainMidgard.getLiquidityPosition()
Section titled “thorchainMidgard.getLiquidityPosition()”getLiquidityPosition: (
address
) =>Promise
<object
[]>
Parameters
Section titled “Parameters”address
Section titled “address”string
Returns
Section titled “Returns”Promise
<object
[]>
thorchainMidgard.getLiquidityPositionRaw()
Section titled “thorchainMidgard.getLiquidityPositionRaw()”getLiquidityPositionRaw: (
address
) =>Promise
<MemberDetailsThorchain
> =liquidityPositionGetter
Parameters
Section titled “Parameters”address
Section titled “address”string
Returns
Section titled “Returns”Promise
<MemberDetailsThorchain
>
thorchainMidgard.getNameDetails()
Section titled “thorchainMidgard.getNameDetails()”getNameDetails: (
name
) =>Promise
<THORNameDetails
>
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”Promise
<THORNameDetails
>
thorchainMidgard.getNamesByAddress()
Section titled “thorchainMidgard.getNamesByAddress()”getNamesByAddress: (
address
) =>Promise
<string
[]>
Parameters
Section titled “Parameters”address
Section titled “address”string
Returns
Section titled “Returns”Promise
<string
[]>
thorchainMidgard.getNamesByOwner()
Section titled “thorchainMidgard.getNamesByOwner()”getNamesByOwner: (
address
) =>Promise
<string
[]>
Parameters
Section titled “Parameters”address
Section titled “address”string
Returns
Section titled “Returns”Promise
<string
[]>
thorchainMidgard.getSaverDetailRaw()
Section titled “thorchainMidgard.getSaverDetailRaw()”getSaverDetailRaw: (
address
) =>Promise
<SaverDetails
> =saverDetailGetter
Parameters
Section titled “Parameters”address
Section titled “address”string
Returns
Section titled “Returns”Promise
<SaverDetails
>
thorchainMidgard.getSaversDetail()
Section titled “thorchainMidgard.getSaversDetail()”getSaversDetail: (
address
) =>Promise
<object
[]>
Parameters
Section titled “Parameters”address
Section titled “address”string
Returns
Section titled “Returns”Promise
<object
[]>
thornode
Section titled “thornode”thornode:
__module
getChainBalance()
Section titled “getChainBalance()”getChainBalance<
T
>(__namedParameters
):Promise
<object
[]>
Type Parameters
Section titled “Type Parameters”T
extends Chain
Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”address
Section titled “address”string
T
scamFilter?
Section titled “scamFilter?”boolean
= true
Returns
Section titled “Returns”Promise
<object
[]>
getChainflipDepositChannel()
Section titled “getChainflipDepositChannel()”getChainflipDepositChannel(
body
):Promise
<{channelId
:string
;depositAddress
:string
; }>
Parameters
Section titled “Parameters”affiliateFees?
Section titled “affiliateFees?”object
[] = ...
brokerCommissionBps?
Section titled “brokerCommissionBps?”number
= ...
buyAsset
Section titled “buyAsset”{ asset
: string
; chain
: string
; } = ...
buyAsset.asset
Section titled “buyAsset.asset”string
= ...
buyAsset.chain
Section titled “buyAsset.chain”string
= ...
channelMetadata?
Section titled “channelMetadata?”{ cfParameters?
: string
; gasBudget?
: string
; message?
: string
; } = ...
channelMetadata.cfParameters?
Section titled “channelMetadata.cfParameters?”string
= ...
channelMetadata.gasBudget?
Section titled “channelMetadata.gasBudget?”string
= ...
channelMetadata.message?
Section titled “channelMetadata.message?”string
= ...
dcaParameters?
Section titled “dcaParameters?”{ chunkInterval?
: number
; numberOfChunks?
: number
; } = ...
dcaParameters.chunkInterval?
Section titled “dcaParameters.chunkInterval?”number
= ...
dcaParameters.numberOfChunks?
Section titled “dcaParameters.numberOfChunks?”number
= ...
destinationAddress
Section titled “destinationAddress”string
= ...
maxBoostFeeBps?
Section titled “maxBoostFeeBps?”number
= ...
refundParameters?
Section titled “refundParameters?”{ minPrice?
: string
; refundAddress?
: string
; retryDuration?
: number
; } = ...
refundParameters.minPrice?
Section titled “refundParameters.minPrice?”string
= ...
refundParameters.refundAddress?
Section titled “refundParameters.refundAddress?”string
= ...
refundParameters.retryDuration?
Section titled “refundParameters.retryDuration?”number
= ...
sellAsset
Section titled “sellAsset”{ asset
: string
; chain
: string
; } = ...
sellAsset.asset
Section titled “sellAsset.asset”string
= ...
sellAsset.chain
Section titled “sellAsset.chain”string
= ...
Returns
Section titled “Returns”Promise
<{ channelId
: string
; depositAddress
: string
; }>
getChainLogoForAsset()
Section titled “getChainLogoForAsset()”getChainLogoForAsset(
assetString
):string
Parameters
Section titled “Parameters”assetString
Section titled “assetString”string
Returns
Section titled “Returns”string
getGasRate()
Section titled “getGasRate()”getGasRate():
Promise
<object
[]>
Returns
Section titled “Returns”Promise
<object
[]>
getLogoForAsset()
Section titled “getLogoForAsset()”getLogoForAsset(
assetString
):string
Parameters
Section titled “Parameters”assetString
Section titled “assetString”string
Returns
Section titled “Returns”string
getPrice()
Section titled “getPrice()”getPrice(
body
):Promise
<object
[]>
Parameters
Section titled “Parameters”metadata
Section titled “metadata”boolean
= ...
tokens
Section titled “tokens”object
[] = ...
Returns
Section titled “Returns”Promise
<object
[]>
getProviderLogo()
Section titled “getProviderLogo()”getProviderLogo(
providerName
):Promise
<undefined
|string
>
Parameters
Section titled “Parameters”providerName
Section titled “providerName”string
Returns
Section titled “Returns”Promise
<undefined
| string
>
getStaticTokenList()
Section titled “getStaticTokenList()”getStaticTokenList(
tokenListName
):Promise
<TokensResponse
>
Parameters
Section titled “Parameters”tokenListName
Section titled “tokenListName”string
Returns
Section titled “Returns”Promise
<TokensResponse
>
getSwapQuote()
Section titled “getSwapQuote()”getSwapQuote(
json
):Promise
<{error?
:string
;providerErrors?
:object
[];quoteId
:string
;routes
:object
[]; }>
Parameters
Section titled “Parameters”affiliate?
Section titled “affiliate?”string
= ...
affiliateFee?
Section titled “affiliateFee?”number
= ...
allowSmartContractReceiver?
Section titled “allowSmartContractReceiver?”boolean
= ...
allowSmartContractSender?
Section titled “allowSmartContractSender?”boolean
= ...
buyAsset
Section titled “buyAsset”string
= ...
cfBoost?
Section titled “cfBoost?”boolean
= ...
destinationAddress?
Section titled “destinationAddress?”string
= ...
disableSecurityChecks?
Section titled “disableSecurityChecks?”boolean
= ...
includeTx?
Section titled “includeTx?”boolean
= ...
providers?
Section titled “providers?”string
[] = ...
referrer?
Section titled “referrer?”string
= ...
sellAmount
Section titled “sellAmount”string
= ...
sellAsset
Section titled “sellAsset”string
= ...
slippage?
Section titled “slippage?”number
= ...
sourceAddress?
Section titled “sourceAddress?”string
= ...
Returns
Section titled “Returns”Promise
<{ error?
: string
; providerErrors?
: object
[]; quoteId
: string
; routes
: object
[]; }>
getTokenList()
Section titled “getTokenList()”getTokenList(
provider
):Promise
<TokensResponseV2
>
Parameters
Section titled “Parameters”provider
Section titled “provider”ProviderName
Returns
Section titled “Returns”Promise
<TokensResponseV2
>
getTokenListProviders()
Section titled “getTokenListProviders()”getTokenListProviders():
Promise
<TokenListProvidersResponse
>
Returns
Section titled “Returns”Promise
<TokenListProvidersResponse
>
getTrackerDetails()
Section titled “getTrackerDetails()”getTrackerDetails(
json
):Promise
<TrackerResponse
>
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise
<TrackerResponse
>