/* tslint:disable */ /* eslint-disable */ /** * barkd REST API * A simple REST API for barkd, a wallet daemon for integrating bitcoin payments into your app over HTTP. Supports self-custodial Lightning, Ark, and on-chain out of the box. barkd is a long-running daemon best suited for always-on or high-connectivity environments like nodes, servers, desktops, and point-of-sale terminals. All endpoints return JSON. Amounts are denominated in satoshis. * * The version of the OpenAPI document: 0.6.1 * Contact: hello@second.tech * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; import type { PpmExpiryFeeEntry } from './PpmExpiryFeeEntry'; import { PpmExpiryFeeEntryFromJSON, PpmExpiryFeeEntryFromJSONTyped, PpmExpiryFeeEntryToJSON, PpmExpiryFeeEntryToJSONTyped, } from './PpmExpiryFeeEntry'; /** * Fees for lightning send operations. * @export * @interface LightningSendFees */ export interface LightningSendFees { /** * A fee applied to every transaction regardless of value. * @type {number} * @memberof LightningSendFees */ baseFeeSat: number; /** * Minimum fee to charge. * @type {number} * @memberof LightningSendFees */ minFeeSat: number; /** * A table mapping how soon a VTXO will expire to a PPM (parts per million) fee rate. * The table should be sorted by each `expiry_blocks_threshold` value in ascending order. * @type {Array} * @memberof LightningSendFees */ ppmExpiryTable: Array; } /** * Check if a given object implements the LightningSendFees interface. */ export function instanceOfLightningSendFees(value: object): value is LightningSendFees { if (!('baseFeeSat' in value) || value['baseFeeSat'] === undefined) return false; if (!('minFeeSat' in value) || value['minFeeSat'] === undefined) return false; if (!('ppmExpiryTable' in value) || value['ppmExpiryTable'] === undefined) return false; return true; } export function LightningSendFeesFromJSON(json: any): LightningSendFees { return LightningSendFeesFromJSONTyped(json, false); } export function LightningSendFeesFromJSONTyped(json: any, ignoreDiscriminator: boolean): LightningSendFees { if (json == null) { return json; } return { 'baseFeeSat': json['base_fee_sat'], 'minFeeSat': json['min_fee_sat'], 'ppmExpiryTable': ((json['ppm_expiry_table'] as Array).map(PpmExpiryFeeEntryFromJSON)), }; } export function LightningSendFeesToJSON(json: any): LightningSendFees { return LightningSendFeesToJSONTyped(json, false); } export function LightningSendFeesToJSONTyped(value?: LightningSendFees | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'base_fee_sat': value['baseFeeSat'], 'min_fee_sat': value['minFeeSat'], 'ppm_expiry_table': ((value['ppmExpiryTable'] as Array).map(PpmExpiryFeeEntryToJSON)), }; }