@ln-markets/sdk
Version:
TypeScript SDK for LNMarkets API
16 lines (12 loc) • 344 B
text/typescript
import type { KyInstance } from 'ky'
export interface GetBitcoinAddressOutput {
address: string
}
type GetBitcoinAddress = () => Promise<GetBitcoinAddressOutput>
export const createGetBitcoinAddress = (
instance: KyInstance
): GetBitcoinAddress => {
return async () => {
return instance.get('account/address/bitcoin').json()
}
}