/* 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 type { WalletNotificationOneOf } from './WalletNotificationOneOf'; import { instanceOfWalletNotificationOneOf, WalletNotificationOneOfFromJSON, WalletNotificationOneOfFromJSONTyped, WalletNotificationOneOfToJSON, } from './WalletNotificationOneOf'; import type { WalletNotificationOneOf1 } from './WalletNotificationOneOf1'; import { instanceOfWalletNotificationOneOf1, WalletNotificationOneOf1FromJSON, WalletNotificationOneOf1FromJSONTyped, WalletNotificationOneOf1ToJSON, } from './WalletNotificationOneOf1'; import type { WalletNotificationOneOf2 } from './WalletNotificationOneOf2'; import { instanceOfWalletNotificationOneOf2, WalletNotificationOneOf2FromJSON, WalletNotificationOneOf2FromJSONTyped, WalletNotificationOneOf2ToJSON, } from './WalletNotificationOneOf2'; /** * @type WalletNotification * A notification of something happening in the wallet * @export */ export type WalletNotification = WalletNotificationOneOf | WalletNotificationOneOf1 | WalletNotificationOneOf2; export function WalletNotificationFromJSON(json: any): WalletNotification { return WalletNotificationFromJSONTyped(json, false); } export function WalletNotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): WalletNotification { if (json == null) { return json; } if (typeof json !== 'object') { return json; } switch (json["type"]) { case "movement-created": return WalletNotificationOneOfFromJSONTyped(json, true); case "movement-updated": return WalletNotificationOneOf1FromJSONTyped(json, true); case "channel-lagging": return WalletNotificationOneOf2FromJSONTyped(json, true); default: return {} as any; } } export function WalletNotificationToJSON(json: any): any { return WalletNotificationToJSONTyped(json, false); } export function WalletNotificationToJSONTyped(value?: WalletNotification | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } if (typeof value !== 'object') { return value; } if (instanceOfWalletNotificationOneOf(value)) { return WalletNotificationOneOfToJSON(value as WalletNotificationOneOf); } if (instanceOfWalletNotificationOneOf1(value)) { return WalletNotificationOneOf1ToJSON(value as WalletNotificationOneOf1); } if (instanceOfWalletNotificationOneOf2(value)) { return WalletNotificationOneOf2ToJSON(value as WalletNotificationOneOf2); } return {}; }