UNPKG

@ln-markets/sdk

Version:
23 lines (18 loc) 495 B
import type { KyInstance } from 'ky' export interface AddBitcoinAddressInput { format?: 'p2tr' | 'p2wpkh' } export interface AddBitcoinAddressOutput { address: string createdAt: string } type AddBitcoinAddress = ( input?: AddBitcoinAddressInput ) => Promise<AddBitcoinAddressOutput> export const createAddBitcoinAddress = ( instance: KyInstance ): AddBitcoinAddress => { return async (input) => { return instance.post('account/address/bitcoin', { json: input }).json() } }