/* 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 { RoundStatus } from './RoundStatus'; import { RoundStatusFromJSON, RoundStatusFromJSONTyped, RoundStatusToJSON, RoundStatusToJSONTyped, } from './RoundStatus'; import type { RoundParticipationInfo } from './RoundParticipationInfo'; import { RoundParticipationInfoFromJSON, RoundParticipationInfoFromJSONTyped, RoundParticipationInfoToJSON, RoundParticipationInfoToJSONTyped, } from './RoundParticipationInfo'; /** * * @export * @interface PendingRoundInfo */ export interface PendingRoundInfo { /** * * @type {string} * @memberof PendingRoundInfo */ fundingTxHex?: string | null; /** * The round transaction id, if already assigned * @type {string} * @memberof PendingRoundInfo */ fundingTxid: string | null; /** * Unique identifier for the round * @type {number} * @memberof PendingRoundInfo */ id: number; /** * the round participation details * @type {RoundParticipationInfo} * @memberof PendingRoundInfo */ participation: RoundParticipationInfo; /** * the current status of the round * @type {RoundStatus} * @memberof PendingRoundInfo */ status: RoundStatus; /** * * @type {string} * @memberof PendingRoundInfo */ unlockHash: string | null; } /** * Check if a given object implements the PendingRoundInfo interface. */ export function instanceOfPendingRoundInfo(value: object): value is PendingRoundInfo { if (!('fundingTxid' in value) || value['fundingTxid'] === undefined) return false; if (!('id' in value) || value['id'] === undefined) return false; if (!('participation' in value) || value['participation'] === undefined) return false; if (!('status' in value) || value['status'] === undefined) return false; if (!('unlockHash' in value) || value['unlockHash'] === undefined) return false; return true; } export function PendingRoundInfoFromJSON(json: any): PendingRoundInfo { return PendingRoundInfoFromJSONTyped(json, false); } export function PendingRoundInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): PendingRoundInfo { if (json == null) { return json; } return { 'fundingTxHex': json['funding_tx_hex'] == null ? undefined : json['funding_tx_hex'], 'fundingTxid': json['funding_txid'], 'id': json['id'], 'participation': RoundParticipationInfoFromJSON(json['participation']), 'status': RoundStatusFromJSON(json['status']), 'unlockHash': json['unlock_hash'], }; } export function PendingRoundInfoToJSON(json: any): PendingRoundInfo { return PendingRoundInfoToJSONTyped(json, false); } export function PendingRoundInfoToJSONTyped(value?: PendingRoundInfo | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'funding_tx_hex': value['fundingTxHex'], 'funding_txid': value['fundingTxid'], 'id': value['id'], 'participation': RoundParticipationInfoToJSON(value['participation']), 'status': RoundStatusToJSON(value['status']), 'unlock_hash': value['unlockHash'], }; }