/* 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 offboarding from the ark. * @export * @interface OffboardFees */ export interface OffboardFees { /** * A fee applied to every transaction regardless of value. * @type {number} * @memberof OffboardFees */ baseFeeSat: number; /** * Fixed number of virtual bytes charged offboard on top of the output size * * The fee for an offboard will be this value, plus the offboard output virtual size, * multiplied with the offboard fee rate, plus the `base_fee`, and plus the additional fee * calculated with the `ppm_expiry_table`. * @type {number} * @memberof OffboardFees */ fixedAdditionalVb: 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 OffboardFees */ ppmExpiryTable: Array; } /** * Check if a given object implements the OffboardFees interface. */ export function instanceOfOffboardFees(value: object): value is OffboardFees { if (!('baseFeeSat' in value) || value['baseFeeSat'] === undefined) return false; if (!('fixedAdditionalVb' in value) || value['fixedAdditionalVb'] === undefined) return false; if (!('ppmExpiryTable' in value) || value['ppmExpiryTable'] === undefined) return false; return true; } export function OffboardFeesFromJSON(json: any): OffboardFees { return OffboardFeesFromJSONTyped(json, false); } export function OffboardFeesFromJSONTyped(json: any, ignoreDiscriminator: boolean): OffboardFees { if (json == null) { return json; } return { 'baseFeeSat': json['base_fee_sat'], 'fixedAdditionalVb': json['fixed_additional_vb'], 'ppmExpiryTable': ((json['ppm_expiry_table'] as Array).map(PpmExpiryFeeEntryFromJSON)), }; } export function OffboardFeesToJSON(json: any): OffboardFees { return OffboardFeesToJSONTyped(json, false); } export function OffboardFeesToJSONTyped(value?: OffboardFees | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'base_fee_sat': value['baseFeeSat'], 'fixed_additional_vb': value['fixedAdditionalVb'], 'ppm_expiry_table': ((value['ppmExpiryTable'] as Array).map(PpmExpiryFeeEntryToJSON)), }; }