@ln-markets/sdk
Version:
TypeScript SDK for LNMarkets API v2
17 lines (15 loc) • 511 B
text/typescript
import type { UUID } from '../../index.js'
import type { RestFetcher } from '../../rest.js'
import type { Swap, SwapSource } from './types.js'
export const createGetSwapBySourceId = (request: RestFetcher) => {
/**
* @see https://docs.lnmarkets.com/api/operations/swapsgetswapbysourceid
*/
return async (params: { sourceId: UUID }, query: { source: SwapSource }) =>
request<Swap>({
method: 'GET',
path: `/swap/source/${params.sourceId}`,
query,
requireAuth: true,
})
}