@ln-markets/sdk
Version:
TypeScript SDK for LNMarkets API
20 lines (16 loc) • 426 B
text/typescript
import type { KyInstance } from 'ky'
export interface GetAccountOutput {
balance: number
email: null | string
feeTier: number
id: string
linkingpublickey: null | string
syntheticUsdBalance: number
username: string
}
type GetAccount = () => Promise<GetAccountOutput>
export const createGetAccount = (instance: KyInstance): GetAccount => {
return async () => {
return instance.get('account').json()
}
}