/* 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'; /** * A BIP 321 unified payment URI together with its individual destinations. * * The `bip321` field is the combined `bitcoin:` URI; the other fields expose * each generated destination separately for convenience. A field is `null` * when that destination was not requested or could not be produced. * @export * @interface Bip321UriResponse */ export interface Bip321UriResponse { /** * The generated Ark address, if any. * @type {string} * @memberof Bip321UriResponse */ ark?: string | null; /** * The combined BIP 321 `bitcoin:` URI. * @type {string} * @memberof Bip321UriResponse */ bip321: string; /** * The generated BOLT11 invoice, included only when an amount was given. * @type {string} * @memberof Bip321UriResponse */ bolt11?: string | null; /** * The generated on-chain address, included only when `onchain` was set. * @type {string} * @memberof Bip321UriResponse */ onchain?: string | null; } /** * Check if a given object implements the Bip321UriResponse interface. */ export function instanceOfBip321UriResponse(value: object): value is Bip321UriResponse { if (!('bip321' in value) || value['bip321'] === undefined) return false; return true; } export function Bip321UriResponseFromJSON(json: any): Bip321UriResponse { return Bip321UriResponseFromJSONTyped(json, false); } export function Bip321UriResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): Bip321UriResponse { if (json == null) { return json; } return { 'ark': json['ark'] == null ? undefined : json['ark'], 'bip321': json['bip321'], 'bolt11': json['bolt11'] == null ? undefined : json['bolt11'], 'onchain': json['onchain'] == null ? undefined : json['onchain'], }; } export function Bip321UriResponseToJSON(json: any): Bip321UriResponse { return Bip321UriResponseToJSONTyped(json, false); } export function Bip321UriResponseToJSONTyped(value?: Bip321UriResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'ark': value['ark'], 'bip321': value['bip321'], 'bolt11': value['bolt11'], 'onchain': value['onchain'], }; }