diff --git a/.changeset/five-geese-roll.md b/.changeset/five-geese-roll.md new file mode 100644 index 000000000..d59be47bd --- /dev/null +++ b/.changeset/five-geese-roll.md @@ -0,0 +1,8 @@ +--- +"@lightsparkdev/lightspark-cli": patch +--- + +Add remote signing support +- adds option to select node for operations that use a node +- updates wasm packed lightspark_crypto lib +- uses loadNodeSigningKey to unlock/provide credentials for both OSK and remote signing nodes diff --git a/.changeset/forty-poets-dance.md b/.changeset/forty-poets-dance.md new file mode 100644 index 000000000..86e4d89ca --- /dev/null +++ b/.changeset/forty-poets-dance.md @@ -0,0 +1,6 @@ +--- +"@lightsparkdev/core": major +--- + +Change SigningKey hashing method depending on environment +BREAKING: NodeKeyCaches loadKey now requires signingKeyType as a parameter diff --git a/.changeset/shaggy-swans-invent.md b/.changeset/shaggy-swans-invent.md new file mode 100644 index 000000000..999edc598 --- /dev/null +++ b/.changeset/shaggy-swans-invent.md @@ -0,0 +1,5 @@ +--- +"@lightsparkdev/wallet-sdk": patch +--- + +Update to latest 3P API schema diff --git a/.changeset/six-camels-tell.md b/.changeset/six-camels-tell.md new file mode 100644 index 000000000..431f0221d --- /dev/null +++ b/.changeset/six-camels-tell.md @@ -0,0 +1,16 @@ +--- +"@lightsparkdev/lightspark-sdk": major +--- + +Update to latest 3P API schema +Add uma mutations +Add remote signing support + +- adds enum for signing key types +- adds property to NodeKeyCache to save signing key type +- changes Requester to add signing data specific to signing key type +- adds wasm packed lightspark_crypto lib +- adds loadNodeSigningKey function to client which handles both rsa and secp key types for OSK and remote signing +- updates documentation to reflect new loadNodeSigningKey function +- updates wasm packed lightspark_crypto lib +- BREAKING: Removes LightsparkClient unlockNode and adds loadNodeSigningKey which should be used for loading signing keys instead diff --git a/apps/examples/streaming-wallet-extension/craco.config.js b/apps/examples/streaming-wallet-extension/craco.config.js index 71bcaa62b..d9d24a238 100644 --- a/apps/examples/streaming-wallet-extension/craco.config.js +++ b/apps/examples/streaming-wallet-extension/craco.config.js @@ -35,6 +35,14 @@ module.exports = { configure: (webpackConfig, { env, paths }) => { return { ...webpackConfig, + resolve: { + extensions: [".js", ".jsx", ".ts", ".tsx"], + fallback: { + path: false, + fs: false, + util: false, + }, + }, entry: { main: [ env === "development" && diff --git a/apps/examples/streaming-wallet-extension/src/components/TransactionRow.tsx b/apps/examples/streaming-wallet-extension/src/components/TransactionRow.tsx index 7bd0f9d79..8d72d7468 100644 --- a/apps/examples/streaming-wallet-extension/src/components/TransactionRow.tsx +++ b/apps/examples/streaming-wallet-extension/src/components/TransactionRow.tsx @@ -2,7 +2,6 @@ import styled from "@emotion/styled"; import { ChannelClosingTransaction, ChannelOpeningTransaction, - IncomingPayment, OutgoingPayment, RoutingTransaction, Transaction, @@ -43,7 +42,7 @@ const getTransactionOtherNode = (transaction: Transaction): Maybe => { case "OutgoingPayment": return (transaction as OutgoingPayment).destinationId; case "IncomingPayment": - return (transaction as IncomingPayment).originId; + return "Unknown"; case "RoutingTransaction": return (transaction as RoutingTransaction).incomingChannelId; default: diff --git a/package.json b/package.json index 41efbbb3f..a50bbcc26 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,8 @@ "lint": "turbo run lint", "lint:fix": "turbo run lint:fix", "release": "turbo build && changeset publish", - "start:check": "turbo run build && turbo run start types:watch lint:watch --parallel --concurrency 60", - "start": "turbo run build && turbo run start --concurrency 60", + "start:check": "turbo run build && turbo run start types:watch lint:watch --parallel --concurrency 64", + "start": "turbo run build && turbo run start --concurrency 64", "test": "turbo run test", "types": "turbo run types" }, diff --git a/packages/core/package.json b/packages/core/package.json index 03b7a9d25..fd7094cdb 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -68,6 +68,7 @@ "dayjs": "^1.11.7", "graphql": "^16.6.0", "graphql-ws": "^5.11.3", + "secp256k1": "^5.0.0", "text-encoding": "^0.7.0", "ws": "^8.12.1", "zen-observable-ts": "^1.1.0" @@ -76,6 +77,7 @@ "@lightsparkdev/eslint-config": "*", "@lightsparkdev/tsconfig": "0.0.0", "@types/crypto-js": "^4.1.1", + "@types/secp256k1": "^4.0.3", "@types/ws": "^8.5.4", "eslint": "^8.3.0", "eslint-watch": "^8.0.0", diff --git a/packages/core/src/crypto/NodeKeyCache.ts b/packages/core/src/crypto/NodeKeyCache.ts index bda70be20..f0836048c 100644 --- a/packages/core/src/crypto/NodeKeyCache.ts +++ b/packages/core/src/crypto/NodeKeyCache.ts @@ -4,11 +4,18 @@ import autoBind from "auto-bind"; import { b64decode } from "../utils/base64.js"; import type { CryptoInterface } from "./crypto.js"; -import { DefaultCrypto } from "./crypto.js"; +import { DefaultCrypto, LightsparkSigningException } from "./crypto.js"; import type { KeyOrAliasType } from "./KeyOrAlias.js"; +import { + RSASigningKey, + Secp256k1SigningKey, + type SigningKey, +} from "./SigningKey.js"; +import { SigningKeyType } from "./types.js"; class NodeKeyCache { - private idToKey: Map; + private idToKey: Map; + constructor(private readonly cryptoImpl: CryptoInterface = DefaultCrypto) { this.idToKey = new Map(); autoBind(this); @@ -17,23 +24,51 @@ class NodeKeyCache { public async loadKey( id: string, keyOrAlias: KeyOrAliasType, - ): Promise { + signingKeyType: SigningKeyType, + ): Promise { + let signingKey: SigningKey; + if (keyOrAlias.alias !== undefined) { - this.idToKey.set(id, keyOrAlias.alias); - return keyOrAlias.alias; + switch (signingKeyType) { + case SigningKeyType.RSASigningKey: + signingKey = new RSASigningKey( + { alias: keyOrAlias.alias }, + this.cryptoImpl, + ); + break; + default: + throw new LightsparkSigningException( + `Aliases are not supported for signing key type ${signingKeyType}`, + ); + } + + this.idToKey.set(id, signingKey); + return signingKey; } - const decoded = b64decode(this.stripPemTags(keyOrAlias.key)); + try { - const key = await this.cryptoImpl.importPrivateSigningKey(decoded); - this.idToKey.set(id, key); - return key; + if (signingKeyType === SigningKeyType.Secp256k1SigningKey) { + signingKey = new Secp256k1SigningKey(keyOrAlias.key); + } else { + const decoded = b64decode(this.stripPemTags(keyOrAlias.key)); + const cryptoKeyOrAlias = + await this.cryptoImpl.importPrivateSigningKey(decoded); + const key = + typeof cryptoKeyOrAlias === "string" + ? { alias: cryptoKeyOrAlias } + : cryptoKeyOrAlias; + signingKey = new RSASigningKey(key, this.cryptoImpl); + } + + this.idToKey.set(id, signingKey); + return signingKey; } catch (e) { console.log("Error importing key: ", e); } return null; } - public getKey(id: string): CryptoKey | string | undefined { + public getKey(id: string): SigningKey | undefined { return this.idToKey.get(id); } diff --git a/packages/core/src/crypto/SigningKey.ts b/packages/core/src/crypto/SigningKey.ts new file mode 100644 index 000000000..d9cca7f8f --- /dev/null +++ b/packages/core/src/crypto/SigningKey.ts @@ -0,0 +1,54 @@ +import secp256k1 from "secp256k1"; +import { + createSha256Hash, + hexToBytes, + SigningKeyType, + type CryptoInterface, +} from "../index.js"; + +interface Alias { + alias: string; +} + +function isAlias(key: CryptoKey | Alias): key is Alias { + return "alias" in key; +} + +export abstract class SigningKey { + readonly type: SigningKeyType; + + constructor(type: SigningKeyType) { + this.type = type; + } + + abstract sign(data: Uint8Array): Promise; +} + +export class RSASigningKey extends SigningKey { + constructor( + private readonly privateKey: CryptoKey | Alias, + private readonly cryptoImpl: CryptoInterface, + ) { + super(SigningKeyType.RSASigningKey); + } + + async sign(data: Uint8Array) { + const key = isAlias(this.privateKey) + ? this.privateKey.alias + : this.privateKey; + return this.cryptoImpl.sign(key, data); + } +} + +export class Secp256k1SigningKey extends SigningKey { + constructor(private readonly privateKey: string) { + super(SigningKeyType.Secp256k1SigningKey); + } + + async sign(data: Uint8Array) { + const keyBytes = new Uint8Array(hexToBytes(this.privateKey)); + const hash = await createSha256Hash(data); + const signResult = secp256k1.ecdsaSign(hash, keyBytes); + return signResult.signature; + } +} diff --git a/packages/core/src/crypto/index.ts b/packages/core/src/crypto/index.ts index a2223cdb9..efcd95e12 100644 --- a/packages/core/src/crypto/index.ts +++ b/packages/core/src/crypto/index.ts @@ -4,3 +4,5 @@ export * from "./crypto.js"; export * from "./KeyOrAlias.js"; export { default as LightsparkSigningException } from "./LightsparkSigningException.js"; export { default as NodeKeyCache } from "./NodeKeyCache.js"; +export * from "./SigningKey.js"; +export * from "./types.js"; diff --git a/packages/core/src/crypto/types.ts b/packages/core/src/crypto/types.ts new file mode 100644 index 000000000..92050040c --- /dev/null +++ b/packages/core/src/crypto/types.ts @@ -0,0 +1,4 @@ +export enum SigningKeyType { + RSASigningKey = "RSASigningKey", + Secp256k1SigningKey = "Secp256k1SigningKey", +} diff --git a/packages/core/src/requester/Requester.ts b/packages/core/src/requester/Requester.ts index d7e08cda3..4083799cb 100644 --- a/packages/core/src/requester/Requester.ts +++ b/packages/core/src/requester/Requester.ts @@ -228,9 +228,10 @@ class Requester { const encodedPayload = new TextEncoderImpl().encode( JSON.stringify(payload), ); - const signedPayload = await this.cryptoImpl.sign(key, encodedPayload); - const encodedSignedPayload = b64encode(signedPayload); + const signedPayload = await key.sign(encodedPayload); + + const encodedSignedPayload = b64encode(signedPayload); headers["X-Lightspark-Signing"] = JSON.stringify({ v: "1", signature: encodedSignedPayload, diff --git a/packages/core/src/utils/createHash.ts b/packages/core/src/utils/createHash.ts new file mode 100644 index 000000000..179d600a4 --- /dev/null +++ b/packages/core/src/utils/createHash.ts @@ -0,0 +1,12 @@ +import { isBrowser } from "./environment.js"; + +export const createSha256Hash = async ( + data: Uint8Array, +): Promise => { + if (isBrowser) { + return new Uint8Array(await window.crypto.subtle.digest("SHA-256", data)); + } else { + const { createHash } = await import("crypto"); + return createHash("sha256").update(data).digest(); + } +}; diff --git a/packages/core/src/utils/hex.ts b/packages/core/src/utils/hex.ts new file mode 100644 index 000000000..01856ffc6 --- /dev/null +++ b/packages/core/src/utils/hex.ts @@ -0,0 +1,15 @@ +export const bytesToHex = (bytes: Uint8Array): string => { + return bytes.reduce((acc: string, byte: number) => { + return (acc += ("0" + byte.toString(16)).slice(-2)); + }, ""); +}; + +export const hexToBytes = (hex: string): Uint8Array => { + const bytes: number[] = []; + + for (let c = 0; c < hex.length; c += 2) { + bytes.push(parseInt(hex.substr(c, 2), 16)); + } + + return Uint8Array.from(bytes); +}; diff --git a/packages/core/src/utils/index.ts b/packages/core/src/utils/index.ts index c7ef930ca..dcf683e7a 100644 --- a/packages/core/src/utils/index.ts +++ b/packages/core/src/utils/index.ts @@ -1,6 +1,8 @@ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved export * from "./base64.js"; +export * from "./createHash.js"; export * from "./currency.js"; export * from "./environment.js"; +export * from "./hex.js"; export * from "./types.js"; diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index 541ea73bb..c381e522e 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -1,5 +1,5 @@ { "extends": "@lightsparkdev/tsconfig/base.json", - "include": ["src"], + "include": ["src", "src/crypto/types.ts"], "exclude": ["test", "node_modules", "dist"] } diff --git a/packages/lightspark-cli/lightspark_crypto/lightspark_crypto.d.ts b/packages/lightspark-cli/lightspark_crypto/lightspark_crypto.d.ts index cb9563175..31d9bf161 100644 --- a/packages/lightspark-cli/lightspark_crypto/lightspark_crypto.d.ts +++ b/packages/lightspark-cli/lightspark_crypto/lightspark_crypto.d.ts @@ -2,18 +2,40 @@ /* eslint-disable */ /** */ +export enum Network { + Bitcoin = 0, + Testnet = 1, + Regtest = 2, +} +/** +*/ +export class InvoiceSignature { + free(): void; +/** +* @returns {Uint8Array} +*/ + get_signature(): Uint8Array; +/** +* @returns {number} +*/ + get_recovery_id(): number; +} +/** +*/ export class LightsparkSigner { free(): void; /** * @param {Seed} seed +* @param {number} network * @returns {LightsparkSigner} */ - static new(seed: Seed): LightsparkSigner; + static new(seed: Seed, network: number): LightsparkSigner; /** * @param {Uint8Array} seed +* @param {number} network * @returns {LightsparkSigner} */ - static from_bytes(seed: Uint8Array): LightsparkSigner; + static from_bytes(seed: Uint8Array, network: number): LightsparkSigner; /** * @returns {string} */ @@ -26,33 +48,58 @@ export class LightsparkSigner { /** * @param {Uint8Array} message * @param {string} derivation_path +* @param {boolean} is_raw * @param {Uint8Array | undefined} add_tweak * @param {Uint8Array | undefined} mul_tweak * @returns {Uint8Array} */ - derive_key_and_sign(message: Uint8Array, derivation_path: string, add_tweak?: Uint8Array, mul_tweak?: Uint8Array): Uint8Array; + derive_key_and_sign(message: Uint8Array, derivation_path: string, is_raw: boolean, add_tweak?: Uint8Array, mul_tweak?: Uint8Array): Uint8Array; /** -* @param {string} public_key +* @param {Uint8Array} public_key * @returns {Uint8Array} */ - ecdh(public_key: string): Uint8Array; + ecdh(public_key: Uint8Array): Uint8Array; /** -* @param {string} unsigned_invoice +* @param {string} derivation_path +* @param {bigint} per_commitment_point_idx * @returns {Uint8Array} */ - sign_invoice(unsigned_invoice: string): Uint8Array; + get_per_commitment_point(derivation_path: string, per_commitment_point_idx: bigint): Uint8Array; /** -* @param {bigint} channel +* @param {string} derivation_path * @param {bigint} per_commitment_point_idx * @returns {Uint8Array} */ - get_per_commitment_point(channel: bigint, per_commitment_point_idx: bigint): Uint8Array; + release_per_commitment_secret(derivation_path: string, per_commitment_point_idx: bigint): Uint8Array; /** -* @param {bigint} channel -* @param {bigint} per_commitment_point_idx * @returns {Uint8Array} */ - build_commitment_secret(channel: bigint, per_commitment_point_idx: bigint): Uint8Array; + generate_preimage_nonce(): Uint8Array; +/** +* @param {Uint8Array} nonce +* @returns {Uint8Array} +*/ + generate_preimage(nonce: Uint8Array): Uint8Array; +/** +* @param {Uint8Array} nonce +* @returns {Uint8Array} +*/ + generate_preimage_hash(nonce: Uint8Array): Uint8Array; +/** +* @param {string} derivation_path +* @returns {string} +*/ + derive_private_key(derivation_path: string): string; +/** +* @param {string} unsigned_invoice +* @returns {InvoiceSignature} +*/ + sign_invoice_wasm(unsigned_invoice: string): InvoiceSignature; +/** +* @param {Uint8Array} invoice_hash +* @returns {InvoiceSignature} +*/ + sign_invoice_hash_wasm(invoice_hash: Uint8Array): InvoiceSignature; } /** */ @@ -61,7 +108,7 @@ export class Mnemonic { /** * @returns {Mnemonic} */ - static new(): Mnemonic; + static random(): Mnemonic; /** * @param {Uint8Array} entropy * @returns {Mnemonic} diff --git a/packages/lightspark-cli/lightspark_crypto/lightspark_crypto.js b/packages/lightspark-cli/lightspark_crypto/lightspark_crypto.js index c8a4b717b..c64a6162a 100644 --- a/packages/lightspark-cli/lightspark_crypto/lightspark_crypto.js +++ b/packages/lightspark-cli/lightspark_crypto/lightspark_crypto.js @@ -50,15 +50,6 @@ function takeObject(idx) { return ret; } -let WASM_VECTOR_LEN = 0; - -function passArray8ToWasm0(arg, malloc) { - const ptr = malloc(arg.length * 1, 1) >>> 0; - getUint8Memory0().set(arg, ptr / 1); - WASM_VECTOR_LEN = arg.length; - return ptr; -} - let cachedInt32Memory0 = null; function getInt32Memory0() { @@ -68,6 +59,15 @@ function getInt32Memory0() { return cachedInt32Memory0; } +let WASM_VECTOR_LEN = 0; + +function passArray8ToWasm0(arg, malloc) { + const ptr = malloc(arg.length * 1, 1) >>> 0; + getUint8Memory0().set(arg, ptr / 1); + WASM_VECTOR_LEN = arg.length; + return ptr; +} + let cachedTextEncoder = new TextEncoder('utf-8'); const encodeString = (typeof cachedTextEncoder.encodeInto === 'function' @@ -146,6 +146,57 @@ function handleError(f, args) { } /** */ +module.exports.Network = Object.freeze({ Bitcoin:0,"0":"Bitcoin",Testnet:1,"1":"Testnet",Regtest:2,"2":"Regtest", }); +/** +*/ +class InvoiceSignature { + + static __wrap(ptr) { + ptr = ptr >>> 0; + const obj = Object.create(InvoiceSignature.prototype); + obj.__wbg_ptr = ptr; + + return obj; + } + + __destroy_into_raw() { + const ptr = this.__wbg_ptr; + this.__wbg_ptr = 0; + + return ptr; + } + + free() { + const ptr = this.__destroy_into_raw(); + wasm.__wbg_invoicesignature_free(ptr); + } + /** + * @returns {Uint8Array} + */ + get_signature() { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + wasm.invoicesignature_get_signature(retptr, this.__wbg_ptr); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var v1 = getArrayU8FromWasm0(r0, r1).slice(); + wasm.__wbindgen_free(r0, r1 * 1); + return v1; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @returns {number} + */ + get_recovery_id() { + const ret = wasm.invoicesignature_get_recovery_id(this.__wbg_ptr); + return ret; + } +} +module.exports.InvoiceSignature = InvoiceSignature; +/** +*/ class LightsparkSigner { static __wrap(ptr) { @@ -169,22 +220,46 @@ class LightsparkSigner { } /** * @param {Seed} seed + * @param {number} network * @returns {LightsparkSigner} */ - static new(seed) { - _assertClass(seed, Seed); - const ret = wasm.lightsparksigner_new(seed.__wbg_ptr); - return LightsparkSigner.__wrap(ret); + static new(seed, network) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + _assertClass(seed, Seed); + wasm.lightsparksigner_new(retptr, seed.__wbg_ptr, network); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + if (r2) { + throw takeObject(r1); + } + return LightsparkSigner.__wrap(r0); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } } /** * @param {Uint8Array} seed + * @param {number} network * @returns {LightsparkSigner} */ - static from_bytes(seed) { - const ptr0 = passArray8ToWasm0(seed, wasm.__wbindgen_malloc); - const len0 = WASM_VECTOR_LEN; - const ret = wasm.lightsparksigner_from_bytes(ptr0, len0); - return LightsparkSigner.__wrap(ret); + static from_bytes(seed, network) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passArray8ToWasm0(seed, wasm.__wbindgen_malloc); + const len0 = WASM_VECTOR_LEN; + wasm.lightsparksigner_from_bytes(retptr, ptr0, len0, network); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + if (r2) { + throw takeObject(r1); + } + return LightsparkSigner.__wrap(r0); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } } /** * @returns {string} @@ -246,11 +321,12 @@ class LightsparkSigner { /** * @param {Uint8Array} message * @param {string} derivation_path + * @param {boolean} is_raw * @param {Uint8Array | undefined} add_tweak * @param {Uint8Array | undefined} mul_tweak * @returns {Uint8Array} */ - derive_key_and_sign(message, derivation_path, add_tweak, mul_tweak) { + derive_key_and_sign(message, derivation_path, is_raw, add_tweak, mul_tweak) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc); @@ -261,7 +337,7 @@ class LightsparkSigner { var len2 = WASM_VECTOR_LEN; var ptr3 = isLikeNone(mul_tweak) ? 0 : passArray8ToWasm0(mul_tweak, wasm.__wbindgen_malloc); var len3 = WASM_VECTOR_LEN; - wasm.lightsparksigner_derive_key_and_sign(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3); + wasm.lightsparksigner_derive_key_and_sign(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, is_raw, ptr2, len2, ptr3, len3); var r0 = getInt32Memory0()[retptr / 4 + 0]; var r1 = getInt32Memory0()[retptr / 4 + 1]; var r2 = getInt32Memory0()[retptr / 4 + 2]; @@ -277,13 +353,13 @@ class LightsparkSigner { } } /** - * @param {string} public_key + * @param {Uint8Array} public_key * @returns {Uint8Array} */ ecdh(public_key) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - const ptr0 = passStringToWasm0(public_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const ptr0 = passArray8ToWasm0(public_key, wasm.__wbindgen_malloc); const len0 = WASM_VECTOR_LEN; wasm.lightsparksigner_ecdh(retptr, this.__wbg_ptr, ptr0, len0); var r0 = getInt32Memory0()[retptr / 4 + 0]; @@ -301,17 +377,23 @@ class LightsparkSigner { } } /** - * @param {string} unsigned_invoice + * @param {string} derivation_path + * @param {bigint} per_commitment_point_idx * @returns {Uint8Array} */ - sign_invoice(unsigned_invoice) { + get_per_commitment_point(derivation_path, per_commitment_point_idx) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - const ptr0 = passStringToWasm0(unsigned_invoice, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const ptr0 = passStringToWasm0(derivation_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; - wasm.lightsparksigner_sign_invoice(retptr, this.__wbg_ptr, ptr0, len0); + wasm.lightsparksigner_get_per_commitment_point(retptr, this.__wbg_ptr, ptr0, len0, per_commitment_point_idx); var r0 = getInt32Memory0()[retptr / 4 + 0]; var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + var r3 = getInt32Memory0()[retptr / 4 + 3]; + if (r3) { + throw takeObject(r2); + } var v2 = getArrayU8FromWasm0(r0, r1).slice(); wasm.__wbindgen_free(r0, r1 * 1); return v2; @@ -320,32 +402,37 @@ class LightsparkSigner { } } /** - * @param {bigint} channel + * @param {string} derivation_path * @param {bigint} per_commitment_point_idx * @returns {Uint8Array} */ - get_per_commitment_point(channel, per_commitment_point_idx) { + release_per_commitment_secret(derivation_path, per_commitment_point_idx) { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.lightsparksigner_get_per_commitment_point(retptr, this.__wbg_ptr, channel, per_commitment_point_idx); + const ptr0 = passStringToWasm0(derivation_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len0 = WASM_VECTOR_LEN; + wasm.lightsparksigner_release_per_commitment_secret(retptr, this.__wbg_ptr, ptr0, len0, per_commitment_point_idx); var r0 = getInt32Memory0()[retptr / 4 + 0]; var r1 = getInt32Memory0()[retptr / 4 + 1]; - var v1 = getArrayU8FromWasm0(r0, r1).slice(); + var r2 = getInt32Memory0()[retptr / 4 + 2]; + var r3 = getInt32Memory0()[retptr / 4 + 3]; + if (r3) { + throw takeObject(r2); + } + var v2 = getArrayU8FromWasm0(r0, r1).slice(); wasm.__wbindgen_free(r0, r1 * 1); - return v1; + return v2; } finally { wasm.__wbindgen_add_to_stack_pointer(16); } } /** - * @param {bigint} channel - * @param {bigint} per_commitment_point_idx * @returns {Uint8Array} */ - build_commitment_secret(channel, per_commitment_point_idx) { + generate_preimage_nonce() { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.lightsparksigner_build_commitment_secret(retptr, this.__wbg_ptr, channel, per_commitment_point_idx); + wasm.lightsparksigner_generate_preimage_nonce(retptr, this.__wbg_ptr); var r0 = getInt32Memory0()[retptr / 4 + 0]; var r1 = getInt32Memory0()[retptr / 4 + 1]; var v1 = getArrayU8FromWasm0(r0, r1).slice(); @@ -355,6 +442,126 @@ class LightsparkSigner { wasm.__wbindgen_add_to_stack_pointer(16); } } + /** + * @param {Uint8Array} nonce + * @returns {Uint8Array} + */ + generate_preimage(nonce) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passArray8ToWasm0(nonce, wasm.__wbindgen_malloc); + const len0 = WASM_VECTOR_LEN; + wasm.lightsparksigner_generate_preimage(retptr, this.__wbg_ptr, ptr0, len0); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + var r3 = getInt32Memory0()[retptr / 4 + 3]; + if (r3) { + throw takeObject(r2); + } + var v2 = getArrayU8FromWasm0(r0, r1).slice(); + wasm.__wbindgen_free(r0, r1 * 1); + return v2; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @param {Uint8Array} nonce + * @returns {Uint8Array} + */ + generate_preimage_hash(nonce) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passArray8ToWasm0(nonce, wasm.__wbindgen_malloc); + const len0 = WASM_VECTOR_LEN; + wasm.lightsparksigner_generate_preimage_hash(retptr, this.__wbg_ptr, ptr0, len0); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + var r3 = getInt32Memory0()[retptr / 4 + 3]; + if (r3) { + throw takeObject(r2); + } + var v2 = getArrayU8FromWasm0(r0, r1).slice(); + wasm.__wbindgen_free(r0, r1 * 1); + return v2; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @param {string} derivation_path + * @returns {string} + */ + derive_private_key(derivation_path) { + let deferred3_0; + let deferred3_1; + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0(derivation_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len0 = WASM_VECTOR_LEN; + wasm.lightsparksigner_derive_private_key(retptr, this.__wbg_ptr, ptr0, len0); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + var r3 = getInt32Memory0()[retptr / 4 + 3]; + var ptr2 = r0; + var len2 = r1; + if (r3) { + ptr2 = 0; len2 = 0; + throw takeObject(r2); + } + deferred3_0 = ptr2; + deferred3_1 = len2; + return getStringFromWasm0(ptr2, len2); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + wasm.__wbindgen_free(deferred3_0, deferred3_1, 1); + } + } + /** + * @param {string} unsigned_invoice + * @returns {InvoiceSignature} + */ + sign_invoice_wasm(unsigned_invoice) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0(unsigned_invoice, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len0 = WASM_VECTOR_LEN; + wasm.lightsparksigner_sign_invoice_wasm(retptr, this.__wbg_ptr, ptr0, len0); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + if (r2) { + throw takeObject(r1); + } + return InvoiceSignature.__wrap(r0); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @param {Uint8Array} invoice_hash + * @returns {InvoiceSignature} + */ + sign_invoice_hash_wasm(invoice_hash) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passArray8ToWasm0(invoice_hash, wasm.__wbindgen_malloc); + const len0 = WASM_VECTOR_LEN; + wasm.lightsparksigner_sign_invoice_hash_wasm(retptr, this.__wbg_ptr, ptr0, len0); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + if (r2) { + throw takeObject(r1); + } + return InvoiceSignature.__wrap(r0); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } } module.exports.LightsparkSigner = LightsparkSigner; /** @@ -383,9 +590,20 @@ class Mnemonic { /** * @returns {Mnemonic} */ - static new() { - const ret = wasm.mnemonic_new(); - return Mnemonic.__wrap(ret); + static random() { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + wasm.mnemonic_random(retptr); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + if (r2) { + throw takeObject(r1); + } + return Mnemonic.__wrap(r0); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } } /** * @param {Uint8Array} entropy @@ -498,7 +716,7 @@ class Seed { as_bytes() { try { const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); - wasm.seed_as_bytes(retptr, this.__wbg_ptr); + wasm.invoicesignature_get_signature(retptr, this.__wbg_ptr); var r0 = getInt32Memory0()[retptr / 4 + 0]; var r1 = getInt32Memory0()[retptr / 4 + 1]; var v1 = getArrayU8FromWasm0(r0, r1).slice(); diff --git a/packages/lightspark-cli/lightspark_crypto/lightspark_crypto_bg.wasm b/packages/lightspark-cli/lightspark_crypto/lightspark_crypto_bg.wasm index 0e554f36d..b1288f85c 100644 Binary files a/packages/lightspark-cli/lightspark_crypto/lightspark_crypto_bg.wasm and b/packages/lightspark-cli/lightspark_crypto/lightspark_crypto_bg.wasm differ diff --git a/packages/lightspark-cli/lightspark_crypto/lightspark_crypto_bg.wasm.d.ts b/packages/lightspark-cli/lightspark_crypto/lightspark_crypto_bg.wasm.d.ts index b4f195c9e..cb3f77b22 100644 --- a/packages/lightspark-cli/lightspark_crypto/lightspark_crypto_bg.wasm.d.ts +++ b/packages/lightspark-cli/lightspark_crypto/lightspark_crypto_bg.wasm.d.ts @@ -2,24 +2,36 @@ /* eslint-disable */ export const memory: WebAssembly.Memory; export function __wbg_mnemonic_free(a: number): void; -export function mnemonic_new(): number; +export function mnemonic_random(a: number): void; export function mnemonic_from_entropy(a: number, b: number, c: number): void; export function mnemonic_from_phrase(a: number, b: number, c: number): void; export function mnemonic_as_string(a: number, b: number): void; export function __wbg_seed_free(a: number): void; export function seed_from_mnemonic(a: number): number; export function seed_new(a: number, b: number): number; -export function seed_as_bytes(a: number, b: number): void; +export function __wbg_invoicesignature_free(a: number): void; +export function invoicesignature_get_signature(a: number, b: number): void; +export function invoicesignature_get_recovery_id(a: number): number; export function __wbg_lightsparksigner_free(a: number): void; -export function lightsparksigner_new(a: number): number; -export function lightsparksigner_from_bytes(a: number, b: number): number; +export function lightsparksigner_new(a: number, b: number, c: number): void; +export function lightsparksigner_from_bytes(a: number, b: number, c: number, d: number): void; export function lightsparksigner_get_master_public_key(a: number, b: number): void; export function lightsparksigner_derive_public_key(a: number, b: number, c: number, d: number): void; -export function lightsparksigner_derive_key_and_sign(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number): void; +export function lightsparksigner_derive_key_and_sign(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number): void; export function lightsparksigner_ecdh(a: number, b: number, c: number, d: number): void; -export function lightsparksigner_sign_invoice(a: number, b: number, c: number, d: number): void; -export function lightsparksigner_get_per_commitment_point(a: number, b: number, c: number, d: number): void; -export function lightsparksigner_build_commitment_secret(a: number, b: number, c: number, d: number): void; +export function lightsparksigner_get_per_commitment_point(a: number, b: number, c: number, d: number, e: number): void; +export function lightsparksigner_release_per_commitment_secret(a: number, b: number, c: number, d: number, e: number): void; +export function lightsparksigner_generate_preimage_nonce(a: number, b: number): void; +export function lightsparksigner_generate_preimage(a: number, b: number, c: number, d: number): void; +export function lightsparksigner_generate_preimage_hash(a: number, b: number, c: number, d: number): void; +export function lightsparksigner_derive_private_key(a: number, b: number, c: number, d: number): void; +export function lightsparksigner_sign_invoice_wasm(a: number, b: number, c: number, d: number): void; +export function lightsparksigner_sign_invoice_hash_wasm(a: number, b: number, c: number, d: number): void; +export function seed_as_bytes(a: number, b: number): void; +export function rustsecp256k1_v0_8_1_context_create(a: number): number; +export function rustsecp256k1_v0_8_1_context_destroy(a: number): void; +export function rustsecp256k1_v0_8_1_default_illegal_callback_fn(a: number, b: number): void; +export function rustsecp256k1_v0_8_1_default_error_callback_fn(a: number, b: number): void; export function __wbindgen_add_to_stack_pointer(a: number): number; export function __wbindgen_malloc(a: number, b: number): number; export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number; diff --git a/packages/lightspark-cli/src/helpers.ts b/packages/lightspark-cli/src/helpers.ts index 36587b783..41357d5ba 100644 --- a/packages/lightspark-cli/src/helpers.ts +++ b/packages/lightspark-cli/src/helpers.ts @@ -1,8 +1,10 @@ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved +import { input, rawlist } from "@inquirer/prompts"; import type { LightsparkClient } from "@lightsparkdev/lightspark-sdk"; import { BitcoinNetwork } from "@lightsparkdev/lightspark-sdk"; import fs from "fs"; +import { Network } from "../lightspark_crypto/lightspark_crypto.js"; const BITCOIN_NETWORKS = [ BitcoinNetwork.MAINNET, @@ -39,25 +41,25 @@ export const getBitcoinNetworkOrThrow = ( return bitcoinNetwork; }; -export const getNodeId = async ( +export const getNodeIds = async ( client: LightsparkClient, bitcoinNetwork: BitcoinNetwork, -): Promise => { +): Promise => { const account = await client.getCurrentAccount(); if (!account) { throw new Error("Failed to get current account"); } const entities = (await account.getNodes(client)).entities; - const entityForNetwork = entities.find( + const entitiesForNetwork = entities.filter( (entity) => entity.bitcoinNetwork === bitcoinNetwork, ); - if (!entityForNetwork) { - throw new Error(`Failed to find node on ${bitcoinNetwork}`); + if (!entitiesForNetwork.length) { + throw new Error(`Failed to find any nodes on ${bitcoinNetwork}`); } - return entityForNetwork.id; + return entitiesForNetwork.map((entity) => entity.id); }; export const bytesToHex = (bytes: Uint8Array): string => { @@ -65,3 +67,51 @@ export const bytesToHex = (bytes: Uint8Array): string => { return (acc += ("0" + byte.toString(16)).slice(-2)); }, ""); }; + +export const hexToBytes = (hex: string): Uint8Array => { + const bytes: number[] = []; + + for (let c = 0; c < hex.length; c += 2) { + bytes.push(parseInt(hex.substr(c, 2), 16)); + } + + return Uint8Array.from(bytes); +}; + +export const selectNodeId = async (nodeIds: string[]): Promise => { + if (nodeIds.length === 1) { + return nodeIds[0]; + } + + console.log("Multiple nodes found."); + const selectedNodeId = await rawlist({ + message: "Select a node to use:", + choices: nodeIds.map((nodeId) => ({ value: nodeId })), + }); + + return selectedNodeId; +}; + +export const inputRemoteSigningSeedHex = async (): Promise => { + return await input({ + message: "Provide your hex-encoded, remote-signing seed:", + validate: (value) => value.length > 0, + }); +}; + +export const getCryptoLibNetwork = ( + bitcoinNetwork: BitcoinNetwork, +): Network => { + switch (bitcoinNetwork) { + case BitcoinNetwork.MAINNET: + return Network.Bitcoin; + case BitcoinNetwork.TESTNET: + return Network.Testnet; + case BitcoinNetwork.REGTEST: + return Network.Regtest; + default: + throw new Error( + `Unsupported lightspark_crypto network ${bitcoinNetwork}.`, + ); + } +}; diff --git a/packages/lightspark-cli/src/index.ts b/packages/lightspark-cli/src/index.ts index 23b8afaab..8056f0dce 100644 --- a/packages/lightspark-cli/src/index.ts +++ b/packages/lightspark-cli/src/index.ts @@ -27,9 +27,13 @@ import { import { bytesToHex, getBitcoinNetworkOrThrow, - getNodeId, + getCryptoLibNetwork, + getNodeIds, getPackageVersion, + hexToBytes, + inputRemoteSigningSeedHex, isBitcoinNetwork, + selectNodeId, } from "./helpers.js"; const main = async ( @@ -88,15 +92,15 @@ const initEnv = async (options: OptionValues) => { let content = `export ${RequiredCredentials.ClientId}="${clientId}"\n`; content += `export ${RequiredCredentials.ClientSecret}="${clientSecret}"\n`; - let baseUrl: string | undefined; + let baseApiUrl: string | undefined; if (options.env === "dev") { - baseUrl = "api.dev.dev.sparkinfra.net"; - content += `export LIGHTSPARK_BASE_URL="${baseUrl}"\n`; + baseApiUrl = "api.dev.dev.sparkinfra.net"; + content += `export LIGHTSPARK_BASE_URL="${baseApiUrl}" # API url for dev deployment environment\n`; } const client = new LightsparkClient( new AccountTokenAuthProvider(clientId, clientSecret), - baseUrl, + baseApiUrl, ); let tokenBitcoinNetwork; @@ -136,7 +140,9 @@ const createInvoice = async ( credentials: EnvCredentials, ) => { const bitcoinNetwork = getBitcoinNetworkOrThrow(credentials.bitcoinNetwork); - const nodeId = await getNodeId(client, bitcoinNetwork); + const nodeIds = await getNodeIds(client, bitcoinNetwork); + + const selectedNodeId = await selectNodeId(nodeIds); let { amount, memo, amp } = options; if (!amount) { @@ -164,12 +170,14 @@ const createInvoice = async ( JSON.stringify({ amount, memo, amp }, null, 2), "\n", ); + const encodedInvoice = await client.createInvoice( - nodeId, + selectedNodeId, Number(amount) * 1000, memo, amp ? InvoiceType.AMP : InvoiceType.STANDARD, ); + if (!encodedInvoice) { throw new Error("Failed to create invoice"); } @@ -181,7 +189,9 @@ const createTestModeInvoice = async ( client: LightsparkClient, options: OptionValues, ) => { - const nodeId = await getNodeId(client, BitcoinNetwork.REGTEST); + const nodeIds = await getNodeIds(client, BitcoinNetwork.REGTEST); + + const selectedNodeId = await selectNodeId(nodeIds); console.log( "Creating a test-mode invoice with options: ", @@ -189,7 +199,7 @@ const createTestModeInvoice = async ( "\n", ); const encodedInvoice = await client.createTestModeInvoice( - nodeId, + selectedNodeId, options.amount * 1000, options.memo, ); @@ -283,10 +293,15 @@ const singleNodeDashboard = async ( credentials: EnvCredentials, ) => { const bitcoinNetwork = getBitcoinNetworkOrThrow(credentials.bitcoinNetwork); - const nodeId = await getNodeId(client, bitcoinNetwork); + const nodeIds = await getNodeIds(client, bitcoinNetwork); + + const selectedNodeId = await selectNodeId(nodeIds); console.log(`Fetching single node dashboard in ${bitcoinNetwork}...\n`); - const dashboard = await client.getSingleNodeDashboard(nodeId, bitcoinNetwork); + const dashboard = await client.getSingleNodeDashboard( + selectedNodeId, + bitcoinNetwork, + ); console.log("Dashboard:", JSON.stringify(dashboard, null, 2)); }; @@ -321,10 +336,14 @@ const createNodeWalletAddress = async ( credentials: EnvCredentials, ) => { const bitcoinNetwork = getBitcoinNetworkOrThrow(credentials.bitcoinNetwork); - const nodeId = await getNodeId(client, bitcoinNetwork); + const nodeIds = await getNodeIds(client, bitcoinNetwork); + + const selectedNodeId = await selectNodeId(nodeIds); - console.log(`Creating bitcoin funding address for node ${nodeId}...\n`); - const address = await client.createNodeWalletAddress(nodeId); + console.log( + `Creating bitcoin funding address for node ${selectedNodeId}...\n`, + ); + const address = await client.createNodeWalletAddress(selectedNodeId); console.log("Address:", address); }; @@ -334,7 +353,9 @@ const payInvoice = async ( credentials: EnvCredentials, ) => { const bitcoinNetwork = getBitcoinNetworkOrThrow(credentials.bitcoinNetwork); - const nodeId = await getNodeId(client, bitcoinNetwork); + const nodeIds = await getNodeIds(client, bitcoinNetwork); + + const selectedNodeId = await selectNodeId(nodeIds); let encodedInvoice = options.invoice; if (!encodedInvoice) { @@ -344,25 +365,32 @@ const payInvoice = async ( }); } - let nodePassword = options.password; - if (bitcoinNetwork === BitcoinNetwork.REGTEST) { - nodePassword = nodePassword || credentials.testNodePassword; - } else if (!nodePassword) { - nodePassword = await password({ - message: `What is the password for the node (${nodeId})?`, - mask: "*", - }); + let loaderArgs; + if (selectedNodeId.startsWith("LightsparkNodeWithRemoteSigning")) { + const seedHex = await inputRemoteSigningSeedHex(); + loaderArgs = { masterSeed: hexToBytes(seedHex), network: bitcoinNetwork }; + } else { + let nodePassword = options.password; + if (bitcoinNetwork === BitcoinNetwork.REGTEST) { + nodePassword = nodePassword || credentials.testNodePassword; + } else if (!nodePassword) { + nodePassword = await password({ + message: `What is the password for the node (${selectedNodeId})?`, + mask: "*", + }); + } + loaderArgs = { password: nodePassword }; } + await client.loadNodeSigningKey(selectedNodeId, loaderArgs); + console.log( - "Paying invoice with options: ", - JSON.stringify({ ...options, invoice: encodedInvoice }, null, 2), + "Paying an invoice with options: ", + JSON.stringify({ ...options }, null, 2), "\n", ); - - await client.unlockNode(nodeId, nodePassword); const payment = await client.payInvoice( - nodeId, + selectedNodeId, encodedInvoice, 1_000_000, 60, // Default @@ -376,7 +404,9 @@ const createTestModePayment = async ( options: OptionValues, credentials?: EnvCredentials, ) => { - const nodeId = await getNodeId(client, BitcoinNetwork.REGTEST); + const nodeIds = await getNodeIds(client, BitcoinNetwork.REGTEST); + + const selectedNodeId = await selectNodeId(nodeIds); let encodedInvoice = options.invoice; if (!encodedInvoice) { @@ -386,15 +416,30 @@ const createTestModePayment = async ( }); } - console.log("Paying invoice...\n"); - const nodePassword = credentials?.testNodePassword; - if (!nodePassword) { - throw new Error("Node password not found in environment."); + let loaderArgs; + if (selectedNodeId.startsWith("LightsparkNodeWithRemoteSigning")) { + const seedHex = await inputRemoteSigningSeedHex(); + loaderArgs = { + masterSeed: hexToBytes(seedHex), + network: BitcoinNetwork.REGTEST, + }; + } else { + const nodePassword = credentials?.testNodePassword; + if (!nodePassword) { + throw new Error("Node password not found in environment."); + } + loaderArgs = { password: nodePassword }; } - await client.unlockNode(nodeId, nodePassword); + await client.loadNodeSigningKey(selectedNodeId, loaderArgs); + + console.log( + "Paying an invoice with options: ", + JSON.stringify({ ...options }, null, 2), + "\n", + ); const payment = await client.createTestModePayment( - nodeId, + selectedNodeId, encodedInvoice, options.amount === -1 ? undefined : options.amount * 1000, ); @@ -421,6 +466,7 @@ const getNodeChannels = async ( const generateNodeKeys = async ( client: LightsparkClient, options: OptionValues, + credentials: EnvCredentials, ) => { let mnemonic: Mnemonic; let seedPhrase = options.seedPhrase; @@ -438,7 +484,7 @@ const generateNodeKeys = async ( }); mnemonic = Mnemonic.from_phrase(seedPhrase); } else { - mnemonic = Mnemonic.new(); + mnemonic = Mnemonic.random(); } } else { mnemonic = Mnemonic.from_phrase(seedPhrase); @@ -447,7 +493,10 @@ const generateNodeKeys = async ( console.log("Generating node keys...\n"); const seed = Seed.from_mnemonic(mnemonic); - const lightsparkSigner = LightsparkSigner.new(seed); + const lightsparkSigner = LightsparkSigner.new( + seed, + getCryptoLibNetwork(credentials.bitcoinNetwork), + ); const extendedPublicKey = lightsparkSigner.get_master_public_key(); const seedAsHex = bytesToHex(seed.as_bytes()); diff --git a/packages/lightspark-sdk/.eslintrc.cjs b/packages/lightspark-sdk/.eslintrc.cjs index 7741ddd5a..c93d222c5 100644 --- a/packages/lightspark-sdk/.eslintrc.cjs +++ b/packages/lightspark-sdk/.eslintrc.cjs @@ -1,6 +1,6 @@ module.exports = { extends: ["@lightsparkdev/eslint-config/base"], - ignorePatterns: ["jest.config.ts"], + ignorePatterns: ["jest.config.ts", "lightspark_crypto.js", "tsup.config.ts"], overrides: [ { files: ["./src/objects/**/*.ts?(x)"], diff --git a/packages/lightspark-sdk/README.md b/packages/lightspark-sdk/README.md index 464bb5694..400e8bc59 100644 --- a/packages/lightspark-sdk/README.md +++ b/packages/lightspark-sdk/README.md @@ -49,7 +49,7 @@ const nodeID = ; const nodePassword = ; try { - await lightsparkClient.unlockNode(nodeID, nodePassword); + await lightsparkClient.loadNodeSigningKey(nodeID, { password: nodePassword }); } catch (e) { console.error("Failed to unlock node", e); } diff --git a/packages/lightspark-sdk/examples/node-scripts/internal_example.ts b/packages/lightspark-sdk/examples/node-scripts/internal_example.ts index 87c257685..6263465ec 100644 --- a/packages/lightspark-sdk/examples/node-scripts/internal_example.ts +++ b/packages/lightspark-sdk/examples/node-scripts/internal_example.ts @@ -251,7 +251,7 @@ console.log(""); // Let's send the payment. // First, we need to recover the signing key. -await client.unlockNode(node2Id, credentials.node2Password!); +await client.loadNodeSigningKey(node2Id, { password: credentials.node2Password! }); console.log(`${credentials.node2Name}'s signing key has been loaded.`); // Then we can send the payment diff --git a/packages/lightspark-sdk/package.json b/packages/lightspark-sdk/package.json index 31374337e..893a57780 100644 --- a/packages/lightspark-sdk/package.json +++ b/packages/lightspark-sdk/package.json @@ -48,7 +48,9 @@ "main": "./dist/index.js", "module": "./dist/index.js", "browser": { - "crypto": false + "crypto": false, + "fs": false, + "path": false }, "files": [ "src/*", @@ -56,7 +58,7 @@ "CHANGELOG.md" ], "scripts": { - "build": "tsup --entry src/index.ts --entry src/objects/index.ts --format cjs,esm --dts", + "build": "tsup", "clean": "rm -rf .turbo && rm -rf dist", "dev": "yarn build -- --watch", "docs": "typedoc src", diff --git a/packages/lightspark-sdk/src/NodeKeyLoaderCache.ts b/packages/lightspark-sdk/src/NodeKeyLoaderCache.ts new file mode 100644 index 000000000..5648a51fd --- /dev/null +++ b/packages/lightspark-sdk/src/NodeKeyLoaderCache.ts @@ -0,0 +1,87 @@ +import { + LightsparkSigningException, + type CryptoInterface, + type NodeKeyCache, + type Requester, + type SigningKey, +} from "@lightsparkdev/core"; +import { + isMasterSeedSigningKeyLoaderArgs, + isNodeIdAndPasswordSigningKeyLoaderArgs, + MasterSeedSigningKeyLoader, + NodeIdAndPasswordSigningKeyLoader, + type SigningKeyLoader, + type SigningKeyLoaderArgs, +} from "./SigningKeyLoader.js"; + +/** + * A cache for SigningKeyLoaders associated with nodes. + */ +export default class NodeKeyLoaderCache { + private idToLoader: Map; + + constructor( + private readonly nodeKeyCache: NodeKeyCache, + private readonly cryptoImpl: CryptoInterface = DefaultCrypto, + ) { + this.idToLoader = new Map(); + } + + /** + * Sets the signing key loader for a node. + * Instantiates a signing key loader based on the type of args passed in by the user. + * + * @param nodeId The ID of the node to get the key for + * @param loaderArgs Loader arguments for loading the key + * @param requester Requester used for loading the key + */ + setLoader( + nodeId: string, + loaderArgs: SigningKeyLoaderArgs, + requester: Requester, + ) { + let loader: SigningKeyLoader; + if (isNodeIdAndPasswordSigningKeyLoaderArgs(loaderArgs)) { + loader = new NodeIdAndPasswordSigningKeyLoader( + { nodeId, ...loaderArgs }, + requester, + this.cryptoImpl, + ); + } else if (isMasterSeedSigningKeyLoaderArgs(loaderArgs)) { + loader = new MasterSeedSigningKeyLoader({ ...loaderArgs }); + } else { + throw new LightsparkSigningException("Invalid signing key loader args"); + } + + this.idToLoader.set(nodeId, loader); + } + + /** + * Gets the key for a node using the loader set by [setLoader] + * + * @param id The ID of the node to get the key for + * @returns The loaded key + */ + async getKeyWithLoader(id: string): Promise { + if (this.nodeKeyCache.hasKey(id)) { + return this.nodeKeyCache.getKey(id); + } + + const loader = this.idToLoader.get(id); + if (!loader) { + throw new LightsparkSigningException( + "No signing key loader found for node " + id, + ); + } + const loaderResult = await loader.loadSigningKey(); + if (!loaderResult) { + return; + } + + return this.nodeKeyCache.loadKey( + id, + { key: loaderResult.key }, + loaderResult.type, + ); + } +} diff --git a/packages/lightspark-sdk/src/SigningKeyLoader.ts b/packages/lightspark-sdk/src/SigningKeyLoader.ts new file mode 100644 index 000000000..d290e3319 --- /dev/null +++ b/packages/lightspark-sdk/src/SigningKeyLoader.ts @@ -0,0 +1,177 @@ +import { + b64encode, + LightsparkSigningException, + SigningKeyType, + type CryptoInterface, + type Maybe, + type Requester, +} from "@lightsparkdev/core"; +import { RecoverNodeSigningKey } from "./graphql/RecoverNodeSigningKey.js"; +import { BitcoinNetwork } from "./index.js"; +import { + LightsparkSigner, + Network, +} from "./lightspark_crypto/lightspark_crypto.js"; + +const SIGNING_KEY_PATH = "m/5"; + +const getCryptoLibNetwork = (bitcoinNetwork: BitcoinNetwork): Network => { + switch (bitcoinNetwork) { + case BitcoinNetwork.MAINNET: + return Network.Bitcoin; + case BitcoinNetwork.TESTNET: + return Network.Testnet; + case BitcoinNetwork.REGTEST: + return Network.Regtest; + default: + throw new Error( + `Unsupported lightspark_crypto network ${bitcoinNetwork}.`, + ); + } +}; + +/** + * Args for creating a new SigningKeyLoader. Must be one of the sub types. + */ +export type SigningKeyLoaderArgs = + | NodeIdAndPasswordSigningKeyLoaderArgs + | MasterSeedSigningKeyLoaderArgs; + +/** + * Args for creating a new SigningKeyLoader from a node ID and password. + * This cannot be used if you are using remote signing. It is used to recover an RSA operation signing key using + * the password you chose when setting up your node. For REGTEST nodes, the password is "1234!@#$". + */ +export interface NodeIdAndPasswordSigningKeyLoaderArgs { + password: string; +} + +/** + * Internal version of NodeIdAndPasswordSigningKeyLoaderArgs that includes the node ID. + */ +interface NodeIdAndPasswordSigningKeyLoaderArgsInternal + extends NodeIdAndPasswordSigningKeyLoaderArgs { + nodeId: string; +} + +/** + * Args for creating a new SigningKeyLoader from a master seed and network. + * This should be used if you are using remote signing, rather than an RSA operation signing key. + */ +export interface MasterSeedSigningKeyLoaderArgs { + masterSeed: Uint8Array; + network: BitcoinNetwork; +} + +/** + * The result of loading a signing key. + */ +export interface SigningKeyLoaderResult { + key: string; + type: SigningKeyType; +} + +export interface SigningKeyLoader { + loadSigningKey: () => Promise; +} + +export function isNodeIdAndPasswordSigningKeyLoaderArgs( + args: SigningKeyLoaderArgs, +): args is NodeIdAndPasswordSigningKeyLoaderArgs { + return (args as NodeIdAndPasswordSigningKeyLoaderArgs).password !== undefined; +} + +export function isMasterSeedSigningKeyLoaderArgs( + args: SigningKeyLoaderArgs, +): args is MasterSeedSigningKeyLoaderArgs { + return (args as MasterSeedSigningKeyLoaderArgs).masterSeed !== undefined; +} + +/** + * Key loader that loads an RSA signing key by providing a node ID and password to recover the key from Lightspark. + */ +export class NodeIdAndPasswordSigningKeyLoader implements SigningKeyLoader { + private readonly nodeId: string; + private readonly password: string; + private readonly requester: Requester; + private readonly cryptoImpl: CryptoInterface; + + constructor( + args: NodeIdAndPasswordSigningKeyLoaderArgsInternal, + requester: Requester, + cryptoImpl: CryptoInterface, + ) { + this.nodeId = args.nodeId; + this.password = args.password; + this.requester = requester; + this.cryptoImpl = cryptoImpl; + } + + async loadSigningKey() { + const encryptedKey = await this.recoverNodeSigningKey(); + if (!encryptedKey) { + console.warn("No encrypted key found for node " + this.nodeId); + return; + } + + const signingPrivateKey = + await this.cryptoImpl.decryptSecretWithNodePassword( + encryptedKey.cipher, + encryptedKey.encrypted_value, + this.password, + ); + + if (!signingPrivateKey) { + throw new LightsparkSigningException( + "Unable to decrypt signing key with provided password. Please try again.", + ); + } + + let signingPrivateKeyPEM = ""; + if (new Uint8Array(signingPrivateKey)[0] === 48) { + // Support DER format - https://github.com/lightsparkdev/webdev/pull/1982 + signingPrivateKeyPEM = b64encode(signingPrivateKey); + } else { + const dec = new TextDecoder(); + signingPrivateKeyPEM = dec.decode(signingPrivateKey); + } + + return { key: signingPrivateKeyPEM, type: SigningKeyType.RSASigningKey }; + } + + private async recoverNodeSigningKey(): Promise< + Maybe<{ encrypted_value: string; cipher: string }> + > { + const response = await this.requester.makeRawRequest( + RecoverNodeSigningKey, + { nodeId: this.nodeId }, + ); + const nodeEntity = response.entity; + if (nodeEntity?.__typename === "LightsparkNodeWithOSK") { + return nodeEntity.encrypted_signing_private_key; + } + return null; + } +} + +/** + * Key loader that loads a Secp256k1 signing key from a master seed. + */ +export class MasterSeedSigningKeyLoader implements SigningKeyLoader { + private readonly masterSeed: Uint8Array; + private readonly network: BitcoinNetwork; + + constructor(args: MasterSeedSigningKeyLoaderArgs) { + this.masterSeed = args.masterSeed; + this.network = args.network; + } + + async loadSigningKey() { + const lightsparkSigner = LightsparkSigner.from_bytes( + this.masterSeed, + getCryptoLibNetwork(this.network), + ); + const privateKey = lightsparkSigner.derive_private_key(SIGNING_KEY_PATH); + return { key: privateKey, type: SigningKeyType.Secp256k1SigningKey }; + } +} diff --git a/packages/lightspark-sdk/src/client.ts b/packages/lightspark-sdk/src/client.ts index c5f7beaf5..7304b7cb8 100644 --- a/packages/lightspark-sdk/src/client.ts +++ b/packages/lightspark-sdk/src/client.ts @@ -9,16 +9,16 @@ import type { KeyOrAliasType, Maybe, Query, + SigningKey, } from "@lightsparkdev/core"; import { - b64encode, DefaultCrypto, - KeyOrAlias, LightsparkAuthException, LightsparkException, LightsparkSigningException, NodeKeyCache, Requester, + SigningKeyType, StubAuthProvider, } from "@lightsparkdev/core"; import { createHash } from "crypto"; @@ -30,6 +30,7 @@ import { CreateLnurlInvoice } from "./graphql/CreateLnurlInvoice.js"; import { CreateNodeWalletAddress } from "./graphql/CreateNodeWalletAddress.js"; import { CreateTestModeInvoice } from "./graphql/CreateTestModeInvoice.js"; import { CreateTestModePayment } from "./graphql/CreateTestModePayment.js"; +import { CreateUmaInvoice } from "./graphql/CreateUmaInvoice.js"; import { DecodeInvoice } from "./graphql/DecodeInvoice.js"; import { DeleteApiToken } from "./graphql/DeleteApiToken.js"; import { FundNode } from "./graphql/FundNode.js"; @@ -38,12 +39,13 @@ import { LightningFeeEstimateForNode } from "./graphql/LightningFeeEstimateForNo import type { AccountDashboard } from "./graphql/MultiNodeDashboard.js"; import { MultiNodeDashboard } from "./graphql/MultiNodeDashboard.js"; import { PayInvoice } from "./graphql/PayInvoice.js"; -import { RecoverNodeSigningKey } from "./graphql/RecoverNodeSigningKey.js"; +import { PayUmaInvoice } from "./graphql/PayUmaInvoice.js"; import { RequestWithdrawal } from "./graphql/RequestWithdrawal.js"; import { SendPayment } from "./graphql/SendPayment.js"; import { SingleNodeDashboard as SingleNodeDashboardQuery } from "./graphql/SingleNodeDashboard.js"; import { TransactionsForNode } from "./graphql/TransactionsForNode.js"; import { TransactionSubscription } from "./graphql/TransactionSubscription.js"; +import NodeKeyLoaderCache from "./NodeKeyLoaderCache.js"; import Account from "./objects/Account.js"; import { ApiTokenFromJson } from "./objects/ApiToken.js"; import BitcoinNetwork from "./objects/BitcoinNetwork.js"; @@ -68,6 +70,7 @@ import { TransactionUpdateFromJson } from "./objects/TransactionUpdate.js"; import type WithdrawalMode from "./objects/WithdrawalMode.js"; import type WithdrawalRequest from "./objects/WithdrawalRequest.js"; import { WithdrawalRequestFromJson } from "./objects/WithdrawalRequest.js"; +import { type SigningKeyLoaderArgs } from "./SigningKeyLoader.js"; const sdkVersion = packageJson.version; @@ -97,6 +100,9 @@ const sdkVersion = packageJson.version; class LightsparkClient { private requester: Requester; private readonly nodeKeyCache: NodeKeyCache; + private readonly nodeKeyLoaderCache: NodeKeyLoaderCache; + private readonly LIGHTSPARK_SDK_ENDPOINT = + process.env.LIGHTSPARK_SDK_ENDPOINT || "graphql/server/2023-09-13"; /** * Constructs a new LightsparkClient. @@ -113,9 +119,13 @@ class LightsparkClient { private readonly cryptoImpl: CryptoInterface = DefaultCrypto, ) { this.nodeKeyCache = new NodeKeyCache(this.cryptoImpl); + this.nodeKeyLoaderCache = new NodeKeyLoaderCache( + this.nodeKeyCache, + this.cryptoImpl, + ); this.requester = new Requester( this.nodeKeyCache, - LIGHTSPARK_SDK_ENDPOINT, + this.LIGHTSPARK_SDK_ENDPOINT, `js-lightspark-sdk/${sdkVersion}`, authProvider, serverUrl, @@ -125,6 +135,35 @@ class LightsparkClient { autoBind(this); } + /** + * Sets the key loader for a node. This unlocks client operations that require a private key. + * Passing in [NodeIdAndPasswordSigningKeyLoaderArgs] loads the RSA key for an OSK node. + * Passing in [MasterSeedSigningKeyLoaderArgs] loads the Secp256k1 key for a remote signing node. + * + * @param nodeId The ID of the node the key is for + * @param loader The loader for the key + */ + public async loadNodeSigningKey( + nodeId: string, + loaderArgs: SigningKeyLoaderArgs, + ) { + this.nodeKeyLoaderCache.setLoader(nodeId, loaderArgs, this.requester); + const key = await this.getNodeSigningKey(nodeId); + return !!key; + } + + /** + * Gets the signing key for a node. Must have previously called [loadNodeSigningKey]. + * + * @param nodeId The ID of the node the key is for + * @returns The signing key for the node + */ + public async getNodeSigningKey( + nodeId: string, + ): Promise { + return await this.nodeKeyLoaderCache.getKeyWithLoader(nodeId); + } + /** * Sets the auth provider for the client. This is useful for switching between auth providers if you are using * multiple accounts or waiting for the user to log in. @@ -134,7 +173,7 @@ class LightsparkClient { public async setAuthProvider(authProvider: AuthProvider) { this.requester = new Requester( this.nodeKeyCache, - LIGHTSPARK_SDK_ENDPOINT, + this.LIGHTSPARK_SDK_ENDPOINT, `js-lightspark-sdk/${sdkVersion}`, authProvider, this.serverUrl, @@ -251,7 +290,6 @@ class LightsparkClient { return { color: node.color, displayName: node.display_name, - purpose: node.purpose, id: node.id, publicKey: node.public_key, status: node.status, @@ -354,7 +392,6 @@ class LightsparkClient { return { color: node.color, displayName: account.name, - purpose: node.purpose, id: node.id, publicKey: node.public_key, status: node.status, @@ -395,6 +432,7 @@ class LightsparkClient { * @param type The type of invoice to create. Defaults to a normal payment invoice, but you can pass InvoiceType.AMP * to create an [AMP invoice](https://docs.lightning.engineering/lightning-network-tools/lnd/amp), which can be * paid multiple times. + * @param expirySecs The number of seconds until the invoice expires. Defaults to 86400 (1 day). * @returns An encoded payment request for the invoice, or undefined if the invoice could not be created. */ public async createInvoice( @@ -402,13 +440,21 @@ class LightsparkClient { amountMsats: number, memo: string, type: InvoiceType | undefined = undefined, + expirySecs: number | undefined = undefined, ): Promise { - const response = await this.requester.makeRawRequest(CreateInvoice, { + const variables = { node_id: nodeId, amount_msats: amountMsats, memo, type, - }); + }; + if (expirySecs !== undefined) { + variables["expiry_secs"] = expirySecs; + } + const response = await this.requester.makeRawRequest( + CreateInvoice, + variables, + ); return response.create_invoice?.invoice.data?.encoded_payment_request; } @@ -424,18 +470,27 @@ class LightsparkClient { * @param metadata The LNURL metadata payload field in the initial payreq response. This wil be hashed and present in the * h-tag (SHA256 purpose of payment) of the resulting Bolt 11 invoice. See * [this spec](https://github.com/lnurl/luds/blob/luds/06.md#pay-to-static-qrnfclink) for details. + * @param expirySecs The number of seconds until the invoice expires. Defaults to 86400 (1 day). * @returns An Invoice object representing the generated invoice. */ public async createLnurlInvoice( nodeId: string, amountMsats: number, metadata: string, + expirySecs: number | undefined = undefined, ): Promise { - const response = await this.requester.makeRawRequest(CreateLnurlInvoice, { + const variables = { node_id: nodeId, amount_msats: amountMsats, metadata_hash: createHash("sha256").update(metadata).digest("hex"), - }); + }; + if (expirySecs !== undefined) { + variables["expiry_secs"] = expirySecs; + } + const response = await this.requester.makeRawRequest( + CreateLnurlInvoice, + variables, + ); const invoiceJson = response.create_lnurl_invoice?.invoice; if (!invoiceJson) { return undefined; @@ -443,6 +498,43 @@ class LightsparkClient { return InvoiceFromJson(invoiceJson); } + /** + * Creates a new invoice for the UMA protocol. The metadata is hashed and included in the invoice. + * This API generates a Lightning Invoice (follows the Bolt 11 specification) to request a payment + * from another Lightning Node. This should only be used for generating invoices for UMA, with `createInvoice` + * preferred in the general case. + * + * @param nodeId The node ID for which to create an invoice. + * @param amountMsats The amount of the invoice in msats. You can create a zero-amount invoice to accept any payment amount. + * @param metadata The LNURL metadata payload field in the initial payreq response. This wil be hashed and present in the + * h-tag (SHA256 purpose of payment) of the resulting Bolt 11 invoice. See + * [this spec](https://github.com/lnurl/luds/blob/luds/06.md#pay-to-static-qrnfclink) for details. + * @param expirySecs The number of seconds until the invoice expires. Defaults to 3600 (1 hour). + * @returns An Invoice object representing the generated invoice. + */ + public async createUmaInvoice( + nodeId: string, + amountMsats: number, + metadata: string, + expirySecs: number | undefined = undefined, + ): Promise { + const variables = { + node_id: nodeId, + amount_msats: amountMsats, + metadata_hash: createHash("sha256").update(metadata).digest("hex"), + expiry_secs: expirySecs !== undefined ? expirySecs : 3600, + }; + const response = await this.requester.makeRawRequest( + CreateUmaInvoice, + variables, + ); + const invoiceJson = response.create_uma_invoice?.invoice; + if (!invoiceJson) { + return undefined; + } + return InvoiceFromJson(invoiceJson); + } + /** * Decodes an encoded lightning invoice string. * @@ -529,63 +621,6 @@ class LightsparkClient { ); } - /** - * Unlock the given node for sensitive operations like sending payments. - * - * @param nodeId The ID of the node to unlock. - * @param password The node password assigned at node creation. - * @returns True if the node was unlocked successfully, false otherwise. - */ - public async unlockNode(nodeId: string, password: string): Promise { - const encryptedKey = await this.recoverNodeSigningKey(nodeId); - if (!encryptedKey) { - console.warn("No encrypted key found for node " + nodeId); - return false; - } - - const signingPrivateKey = - await this.cryptoImpl.decryptSecretWithNodePassword( - encryptedKey.cipher, - encryptedKey.encrypted_value, - password, - ); - - if (!signingPrivateKey) { - throw new LightsparkSigningException( - "Unable to decrypt signing key with provided password. Please try again.", - ); - } - - let signingPrivateKeyPEM = ""; - if (new Uint8Array(signingPrivateKey)[0] === 48) { - // Support DER format - https://github.com/lightsparkdev/webdev/pull/1982 - signingPrivateKeyPEM = b64encode(signingPrivateKey); - } else { - const dec = new TextDecoder(); - signingPrivateKeyPEM = dec.decode(signingPrivateKey); - } - - await this.nodeKeyCache.loadKey( - nodeId, - KeyOrAlias.key(signingPrivateKeyPEM), - ); - return true; - } - - private async recoverNodeSigningKey( - nodeId: string, - ): Promise> { - const response = await this.requester.makeRawRequest( - RecoverNodeSigningKey, - { nodeId }, - ); - const nodeEntity = response.entity; - if (nodeEntity?.__typename === "LightsparkNode") { - return nodeEntity.encrypted_signing_private_key; - } - return null; - } - /** * Directly unlocks a node with a signing private key or alias. * @@ -596,7 +631,11 @@ class LightsparkClient { nodeId: string, signingPrivateKeyOrAlias: KeyOrAliasType, ) { - await this.nodeKeyCache.loadKey(nodeId, signingPrivateKeyOrAlias); + await this.nodeKeyCache.loadKey( + nodeId, + signingPrivateKeyOrAlias, + SigningKeyType.RSASigningKey, + ); } /** @@ -652,6 +691,58 @@ class LightsparkClient { ); } + /** + * sends an UMA payment to a node on the Lightning Network, based on the invoice + * (as defined by the BOLT11 specification) that you provide. + * This should only be used for paying UMA invoices, with `payInvoice` preferred in the general case. + * + * @param payerNodeId The ID of the node that will pay the invoice. + * @param encodedInvoice The encoded invoice to pay. + * @param maximumFeesMsats Maximum fees (in msats) to pay for the payment. This parameter is required. + * As guidance, a maximum fee of 16 basis points should make almost all transactions succeed. For example, + * for a transaction between 10k sats and 100k sats, this would mean a fee limit of 16 to 160 sats. + * @param timeoutSecs A timeout for the payment in seconds. Defaults to 60 seconds. + * @param amountMsats The amount to pay in msats for a zero-amount invoice. Defaults to the full amount of the + * invoice. NOTE: This parameter can only be passed for a zero-amount invoice. Otherwise, the call will fail. + * @returns An `OutgoingPayment` object if the payment was successful, or undefined if the payment failed. + */ + public async payUmaInvoice( + payerNodeId: string, + encodedInvoice: string, + maximumFeesMsats: number, + timeoutSecs: number = 60, + amountMsats: number | undefined = undefined, + ): Promise { + if (!this.nodeKeyCache.hasKey(payerNodeId)) { + throw new LightsparkSigningException("Paying node is not unlocked"); + } + const variables: Record = { + node_id: payerNodeId, + encoded_invoice: encodedInvoice, + timeout_secs: timeoutSecs, + maximum_fees_msats: maximumFeesMsats, + }; + if (amountMsats !== undefined) { + variables.amount_msats = amountMsats; + } + const response = await this.requester.makeRawRequest( + PayUmaInvoice, + variables, + payerNodeId, + ); + if (response.pay_invoice?.payment.outgoing_payment_failure_message) { + throw new LightsparkException( + "PaymentError", + response.pay_invoice?.payment.outgoing_payment_failure_message + .rich_text_text, + ); + } + return ( + response.pay_uma_invoice && + OutgoingPaymentFromJson(response.pay_invoice.payment) + ); + } + /** * Sends a payment directly to a node on the Lightning Network through the public key of the node without an invoice. * @@ -897,6 +988,4 @@ class LightsparkClient { } } -const LIGHTSPARK_SDK_ENDPOINT = "graphql/server/2023-04-04"; - export default LightsparkClient; diff --git a/packages/lightspark-sdk/src/graphql/CreateInvoice.ts b/packages/lightspark-sdk/src/graphql/CreateInvoice.ts index 2ba3da329..1ad7857b9 100644 --- a/packages/lightspark-sdk/src/graphql/CreateInvoice.ts +++ b/packages/lightspark-sdk/src/graphql/CreateInvoice.ts @@ -6,8 +6,9 @@ export const CreateInvoice = ` $amount_msats: Long! $memo: String $type: InvoiceType = null - ) { - create_invoice(input: { node_id: $node_id, amount_msats: $amount_msats, memo: $memo, invoice_type: $type }) { + $expiry_secs: Int = null + ) { + create_invoice(input: { node_id: $node_id, amount_msats: $amount_msats, memo: $memo, invoice_type: $type, expiry_secs: $expiry_secs }) { invoice { data { encoded_payment_request diff --git a/packages/lightspark-sdk/src/graphql/CreateLnurlInvoice.ts b/packages/lightspark-sdk/src/graphql/CreateLnurlInvoice.ts index e25990925..b9e284bec 100644 --- a/packages/lightspark-sdk/src/graphql/CreateLnurlInvoice.ts +++ b/packages/lightspark-sdk/src/graphql/CreateLnurlInvoice.ts @@ -6,11 +6,13 @@ mutation CreateLnurlInvoice( $node_id: ID! $amount_msats: Long! $metadata_hash: String! + $expiry_secs: Int = null ) { create_lnurl_invoice(input: { node_id: $node_id amount_msats: $amount_msats metadata_hash: $metadata_hash + expiry_secs: $expiry_secs }) { invoice { ...InvoiceFragment diff --git a/packages/lightspark-sdk/src/graphql/CreateUmaInvoice.ts b/packages/lightspark-sdk/src/graphql/CreateUmaInvoice.ts new file mode 100644 index 000000000..3b0ef4efe --- /dev/null +++ b/packages/lightspark-sdk/src/graphql/CreateUmaInvoice.ts @@ -0,0 +1,23 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved +import { FRAGMENT as InvoiceFragment } from "../objects/Invoice.js"; + +export const CreateUmaInvoice = ` +mutation CreateUmaInvoice( + $node_id: ID! + $amount_msats: Long! + $metadata_hash: String! + $expiry_secs: Int = null +) { + create_uma_invoice(input: { + node_id: $node_id + amount_msats: $amount_msats + metadata_hash: $metadata_hash + expiry_secs: $expiry_secs + }) { + invoice { + ...InvoiceFragment + } + } +} +${InvoiceFragment} +`; diff --git a/packages/lightspark-sdk/src/graphql/MultiNodeDashboard.ts b/packages/lightspark-sdk/src/graphql/MultiNodeDashboard.ts index f3f35e553..46d51f138 100644 --- a/packages/lightspark-sdk/src/graphql/MultiNodeDashboard.ts +++ b/packages/lightspark-sdk/src/graphql/MultiNodeDashboard.ts @@ -3,7 +3,6 @@ import type { Maybe } from "@lightsparkdev/core"; import type CurrencyAmount from "../objects/CurrencyAmount.js"; import { FRAGMENT as CurrencyAmountFragment } from "../objects/CurrencyAmount.js"; -import type LightsparkNodePurpose from "../objects/LightsparkNodePurpose.js"; import type LightsparkNodeStatus from "../objects/LightsparkNodeStatus.js"; import type NodeAddressType from "../objects/NodeAddressType.js"; @@ -14,7 +13,6 @@ export type AccountDashboard = { id: string; color: Maybe; displayName: string; - purpose: Maybe; publicKey: Maybe; status: Maybe; addresses: { @@ -57,7 +55,6 @@ export const MultiNodeDashboard = ` entities { color display_name - purpose id addresses(first: 1) { entities { diff --git a/packages/lightspark-sdk/src/graphql/PayUmaInvoice.ts b/packages/lightspark-sdk/src/graphql/PayUmaInvoice.ts new file mode 100644 index 000000000..3632702f6 --- /dev/null +++ b/packages/lightspark-sdk/src/graphql/PayUmaInvoice.ts @@ -0,0 +1,29 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +import { FRAGMENT as OutgoingPaymentFragment } from "../objects/OutgoingPayment.js"; + +export const PayUmaInvoice = ` + mutation PayUmaInvoice( + $node_id: ID! + $encoded_invoice: String! + $timeout_secs: Int! + $maximum_fees_msats: Long! + $amount_msats: Long + ) { + pay_uma_invoice( + input: { + node_id: $node_id + encoded_invoice: $encoded_invoice + timeout_secs: $timeout_secs + maximum_fees_msats: $maximum_fees_msats + amount_msats: $amount_msats + } + ) { + payment { + ...OutgoingPaymentFragment + } + } + } + + ${OutgoingPaymentFragment} +`; diff --git a/packages/lightspark-sdk/src/graphql/RecoverNodeSigningKey.ts b/packages/lightspark-sdk/src/graphql/RecoverNodeSigningKey.ts index 5c4ee37cc..f02d9add3 100644 --- a/packages/lightspark-sdk/src/graphql/RecoverNodeSigningKey.ts +++ b/packages/lightspark-sdk/src/graphql/RecoverNodeSigningKey.ts @@ -4,7 +4,7 @@ export const RecoverNodeSigningKey = ` query RecoverNodeSigningKey($nodeId: ID!) { entity(id: $nodeId) { __typename - ... on LightsparkNode { + ... on LightsparkNodeWithOSK { encrypted_signing_private_key { encrypted_value cipher diff --git a/packages/lightspark-sdk/src/graphql/SingleNodeDashboard.ts b/packages/lightspark-sdk/src/graphql/SingleNodeDashboard.ts index f62887ed5..aa6003388 100644 --- a/packages/lightspark-sdk/src/graphql/SingleNodeDashboard.ts +++ b/packages/lightspark-sdk/src/graphql/SingleNodeDashboard.ts @@ -24,7 +24,6 @@ query SingleNodeDashboard( entities { color display_name - purpose id addresses(first: 1) { entities { diff --git a/packages/lightspark-sdk/src/lightspark_crypto/lightspark_crypto.d.ts b/packages/lightspark-sdk/src/lightspark_crypto/lightspark_crypto.d.ts new file mode 100644 index 000000000..c3e9221fe --- /dev/null +++ b/packages/lightspark-sdk/src/lightspark_crypto/lightspark_crypto.d.ts @@ -0,0 +1,157 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + */ +export enum Network { + Bitcoin = 0, + Testnet = 1, + Regtest = 2, +} +/** + */ +export class InvoiceSignature { + free(): void; + /** + * @returns {Uint8Array} + */ + get_signature(): Uint8Array; + /** + * @returns {number} + */ + get_recovery_id(): number; +} +/** + */ +export class LightsparkSigner { + free(): void; + /** + * @param {Seed} seed + * @param {number} network + * @returns {LightsparkSigner} + */ + static new(seed: Seed, network: number): LightsparkSigner; + /** + * @param {Uint8Array} seed + * @param {number} network + * @returns {LightsparkSigner} + */ + static from_bytes(seed: Uint8Array, network: number): LightsparkSigner; + /** + * @returns {string} + */ + get_master_public_key(): string; + /** + * @param {string} derivation_path + * @returns {string} + */ + derive_public_key(derivation_path: string): string; + /** + * @param {Uint8Array} message + * @param {string} derivation_path + * @param {boolean} is_raw + * @param {Uint8Array | undefined} add_tweak + * @param {Uint8Array | undefined} mul_tweak + * @returns {Uint8Array} + */ + derive_key_and_sign( + message: Uint8Array, + derivation_path: string, + is_raw: boolean, + add_tweak?: Uint8Array, + mul_tweak?: Uint8Array, + ): Uint8Array; + /** + * @param {Uint8Array} public_key + * @returns {Uint8Array} + */ + ecdh(public_key: Uint8Array): Uint8Array; + /** + * @param {string} derivation_path + * @param {bigint} per_commitment_point_idx + * @returns {Uint8Array} + */ + get_per_commitment_point( + derivation_path: string, + per_commitment_point_idx: bigint, + ): Uint8Array; + /** + * @param {string} derivation_path + * @param {bigint} per_commitment_point_idx + * @returns {Uint8Array} + */ + release_per_commitment_secret( + derivation_path: string, + per_commitment_point_idx: bigint, + ): Uint8Array; + /** + * @returns {Uint8Array} + */ + generate_preimage_nonce(): Uint8Array; + /** + * @param {Uint8Array} nonce + * @returns {Uint8Array} + */ + generate_preimage(nonce: Uint8Array): Uint8Array; + /** + * @param {Uint8Array} nonce + * @returns {Uint8Array} + */ + generate_preimage_hash(nonce: Uint8Array): Uint8Array; + /** + * @param {string} derivation_path + * @returns {string} + */ + derive_private_key(derivation_path: string): string; + /** + * @param {string} unsigned_invoice + * @returns {InvoiceSignature} + */ + sign_invoice_wasm(unsigned_invoice: string): InvoiceSignature; + /** + * @param {Uint8Array} invoice_hash + * @returns {InvoiceSignature} + */ + sign_invoice_hash_wasm(invoice_hash: Uint8Array): InvoiceSignature; +} +/** + */ +export class Mnemonic { + free(): void; + /** + * @returns {Mnemonic} + */ + static random(): Mnemonic; + /** + * @param {Uint8Array} entropy + * @returns {Mnemonic} + */ + static from_entropy(entropy: Uint8Array): Mnemonic; + /** + * @param {string} phrase + * @returns {Mnemonic} + */ + static from_phrase(phrase: string): Mnemonic; + /** + * @returns {string} + */ + as_string(): string; +} +/** + */ +export class Seed { + free(): void; + /** + * @param {Mnemonic} mnemonic + * @returns {Seed} + */ + static from_mnemonic(mnemonic: Mnemonic): Seed; + /** + * @param {Uint8Array} seed + * @returns {Seed} + */ + static new(seed: Uint8Array): Seed; + /** + * @returns {Uint8Array} + */ + as_bytes(): Uint8Array; +} diff --git a/packages/lightspark-sdk/src/lightspark_crypto/lightspark_crypto.js b/packages/lightspark-sdk/src/lightspark_crypto/lightspark_crypto.js new file mode 100644 index 000000000..e36ef86bb --- /dev/null +++ b/packages/lightspark-sdk/src/lightspark_crypto/lightspark_crypto.js @@ -0,0 +1,1010 @@ +let imports = {}; +imports["__wbindgen_placeholder__"] = module.exports; +let wasm; +const { TextDecoder, TextEncoder } = require(`util`); + +let cachedTextDecoder = new TextDecoder("utf-8", { + ignoreBOM: true, + fatal: true, +}); + +cachedTextDecoder.decode(); + +let cachedUint8Memory0 = null; + +function getUint8Memory0() { + if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) { + cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); + } + return cachedUint8Memory0; +} + +function getStringFromWasm0(ptr, len) { + ptr = ptr >>> 0; + return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); +} + +const heap = new Array(128).fill(undefined); + +heap.push(undefined, null, true, false); + +let heap_next = heap.length; + +function addHeapObject(obj) { + if (heap_next === heap.length) heap.push(heap.length + 1); + const idx = heap_next; + heap_next = heap[idx]; + + heap[idx] = obj; + return idx; +} + +function getObject(idx) { + return heap[idx]; +} + +function dropObject(idx) { + if (idx < 132) return; + heap[idx] = heap_next; + heap_next = idx; +} + +function takeObject(idx) { + const ret = getObject(idx); + dropObject(idx); + return ret; +} + +let cachedInt32Memory0 = null; + +function getInt32Memory0() { + if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) { + cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); + } + return cachedInt32Memory0; +} + +let WASM_VECTOR_LEN = 0; + +function passArray8ToWasm0(arg, malloc) { + const ptr = malloc(arg.length * 1, 1) >>> 0; + getUint8Memory0().set(arg, ptr / 1); + WASM_VECTOR_LEN = arg.length; + return ptr; +} + +let cachedTextEncoder = new TextEncoder("utf-8"); + +const encodeString = + typeof cachedTextEncoder.encodeInto === "function" + ? function (arg, view) { + return cachedTextEncoder.encodeInto(arg, view); + } + : function (arg, view) { + const buf = cachedTextEncoder.encode(arg); + view.set(buf); + return { + read: arg.length, + written: buf.length, + }; + }; + +function passStringToWasm0(arg, malloc, realloc) { + if (realloc === undefined) { + const buf = cachedTextEncoder.encode(arg); + const ptr = malloc(buf.length, 1) >>> 0; + getUint8Memory0() + .subarray(ptr, ptr + buf.length) + .set(buf); + WASM_VECTOR_LEN = buf.length; + return ptr; + } + + let len = arg.length; + let ptr = malloc(len, 1) >>> 0; + + const mem = getUint8Memory0(); + + let offset = 0; + + for (; offset < len; offset++) { + const code = arg.charCodeAt(offset); + if (code > 0x7f) break; + mem[ptr + offset] = code; + } + + if (offset !== len) { + if (offset !== 0) { + arg = arg.slice(offset); + } + ptr = realloc(ptr, len, (len = offset + arg.length * 3), 1) >>> 0; + const view = getUint8Memory0().subarray(ptr + offset, ptr + len); + const ret = encodeString(arg, view); + + offset += ret.written; + } + + WASM_VECTOR_LEN = offset; + return ptr; +} + +function _assertClass(instance, klass) { + if (!(instance instanceof klass)) { + throw new Error(`expected instance of ${klass.name}`); + } + return instance.ptr; +} + +function getArrayU8FromWasm0(ptr, len) { + ptr = ptr >>> 0; + return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len); +} + +function isLikeNone(x) { + return x === undefined || x === null; +} + +function handleError(f, args) { + try { + return f.apply(this, args); + } catch (e) { + wasm.__wbindgen_exn_store(addHeapObject(e)); + } +} +/** + */ +module.exports.Network = Object.freeze({ + Bitcoin: 0, + 0: "Bitcoin", + Testnet: 1, + 1: "Testnet", + Regtest: 2, + 2: "Regtest", +}); +/** + */ +class InvoiceSignature { + static __wrap(ptr) { + ptr = ptr >>> 0; + const obj = Object.create(InvoiceSignature.prototype); + obj.__wbg_ptr = ptr; + + return obj; + } + + __destroy_into_raw() { + const ptr = this.__wbg_ptr; + this.__wbg_ptr = 0; + + return ptr; + } + + free() { + const ptr = this.__destroy_into_raw(); + wasm.__wbg_invoicesignature_free(ptr); + } + /** + * @returns {Uint8Array} + */ + get_signature() { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + wasm.invoicesignature_get_signature(retptr, this.__wbg_ptr); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var v1 = getArrayU8FromWasm0(r0, r1).slice(); + wasm.__wbindgen_free(r0, r1 * 1); + return v1; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @returns {number} + */ + get_recovery_id() { + const ret = wasm.invoicesignature_get_recovery_id(this.__wbg_ptr); + return ret; + } +} +module.exports.InvoiceSignature = InvoiceSignature; +/** + */ +class LightsparkSigner { + static __wrap(ptr) { + ptr = ptr >>> 0; + const obj = Object.create(LightsparkSigner.prototype); + obj.__wbg_ptr = ptr; + + return obj; + } + + __destroy_into_raw() { + const ptr = this.__wbg_ptr; + this.__wbg_ptr = 0; + + return ptr; + } + + free() { + const ptr = this.__destroy_into_raw(); + wasm.__wbg_lightsparksigner_free(ptr); + } + /** + * @param {Seed} seed + * @param {number} network + * @returns {LightsparkSigner} + */ + static new(seed, network) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + _assertClass(seed, Seed); + wasm.lightsparksigner_new(retptr, seed.__wbg_ptr, network); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + if (r2) { + throw takeObject(r1); + } + return LightsparkSigner.__wrap(r0); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @param {Uint8Array} seed + * @param {number} network + * @returns {LightsparkSigner} + */ + static from_bytes(seed, network) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passArray8ToWasm0(seed, wasm.__wbindgen_malloc); + const len0 = WASM_VECTOR_LEN; + wasm.lightsparksigner_from_bytes(retptr, ptr0, len0, network); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + if (r2) { + throw takeObject(r1); + } + return LightsparkSigner.__wrap(r0); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @returns {string} + */ + get_master_public_key() { + let deferred2_0; + let deferred2_1; + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + wasm.lightsparksigner_get_master_public_key(retptr, this.__wbg_ptr); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + var r3 = getInt32Memory0()[retptr / 4 + 3]; + var ptr1 = r0; + var len1 = r1; + if (r3) { + ptr1 = 0; + len1 = 0; + throw takeObject(r2); + } + deferred2_0 = ptr1; + deferred2_1 = len1; + return getStringFromWasm0(ptr1, len1); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); + } + } + /** + * @param {string} derivation_path + * @returns {string} + */ + derive_public_key(derivation_path) { + let deferred3_0; + let deferred3_1; + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0( + derivation_path, + wasm.__wbindgen_malloc, + wasm.__wbindgen_realloc, + ); + const len0 = WASM_VECTOR_LEN; + wasm.lightsparksigner_derive_public_key( + retptr, + this.__wbg_ptr, + ptr0, + len0, + ); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + var r3 = getInt32Memory0()[retptr / 4 + 3]; + var ptr2 = r0; + var len2 = r1; + if (r3) { + ptr2 = 0; + len2 = 0; + throw takeObject(r2); + } + deferred3_0 = ptr2; + deferred3_1 = len2; + return getStringFromWasm0(ptr2, len2); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + wasm.__wbindgen_free(deferred3_0, deferred3_1, 1); + } + } + /** + * @param {Uint8Array} message + * @param {string} derivation_path + * @param {boolean} is_raw + * @param {Uint8Array | undefined} add_tweak + * @param {Uint8Array | undefined} mul_tweak + * @returns {Uint8Array} + */ + derive_key_and_sign(message, derivation_path, is_raw, add_tweak, mul_tweak) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passArray8ToWasm0(message, wasm.__wbindgen_malloc); + const len0 = WASM_VECTOR_LEN; + const ptr1 = passStringToWasm0( + derivation_path, + wasm.__wbindgen_malloc, + wasm.__wbindgen_realloc, + ); + const len1 = WASM_VECTOR_LEN; + var ptr2 = isLikeNone(add_tweak) + ? 0 + : passArray8ToWasm0(add_tweak, wasm.__wbindgen_malloc); + var len2 = WASM_VECTOR_LEN; + var ptr3 = isLikeNone(mul_tweak) + ? 0 + : passArray8ToWasm0(mul_tweak, wasm.__wbindgen_malloc); + var len3 = WASM_VECTOR_LEN; + wasm.lightsparksigner_derive_key_and_sign( + retptr, + this.__wbg_ptr, + ptr0, + len0, + ptr1, + len1, + is_raw, + ptr2, + len2, + ptr3, + len3, + ); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + var r3 = getInt32Memory0()[retptr / 4 + 3]; + if (r3) { + throw takeObject(r2); + } + var v5 = getArrayU8FromWasm0(r0, r1).slice(); + wasm.__wbindgen_free(r0, r1 * 1); + return v5; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @param {Uint8Array} public_key + * @returns {Uint8Array} + */ + ecdh(public_key) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passArray8ToWasm0(public_key, wasm.__wbindgen_malloc); + const len0 = WASM_VECTOR_LEN; + wasm.lightsparksigner_ecdh(retptr, this.__wbg_ptr, ptr0, len0); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + var r3 = getInt32Memory0()[retptr / 4 + 3]; + if (r3) { + throw takeObject(r2); + } + var v2 = getArrayU8FromWasm0(r0, r1).slice(); + wasm.__wbindgen_free(r0, r1 * 1); + return v2; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @param {string} derivation_path + * @param {bigint} per_commitment_point_idx + * @returns {Uint8Array} + */ + get_per_commitment_point(derivation_path, per_commitment_point_idx) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0( + derivation_path, + wasm.__wbindgen_malloc, + wasm.__wbindgen_realloc, + ); + const len0 = WASM_VECTOR_LEN; + wasm.lightsparksigner_get_per_commitment_point( + retptr, + this.__wbg_ptr, + ptr0, + len0, + per_commitment_point_idx, + ); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + var r3 = getInt32Memory0()[retptr / 4 + 3]; + if (r3) { + throw takeObject(r2); + } + var v2 = getArrayU8FromWasm0(r0, r1).slice(); + wasm.__wbindgen_free(r0, r1 * 1); + return v2; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @param {string} derivation_path + * @param {bigint} per_commitment_point_idx + * @returns {Uint8Array} + */ + release_per_commitment_secret(derivation_path, per_commitment_point_idx) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0( + derivation_path, + wasm.__wbindgen_malloc, + wasm.__wbindgen_realloc, + ); + const len0 = WASM_VECTOR_LEN; + wasm.lightsparksigner_release_per_commitment_secret( + retptr, + this.__wbg_ptr, + ptr0, + len0, + per_commitment_point_idx, + ); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + var r3 = getInt32Memory0()[retptr / 4 + 3]; + if (r3) { + throw takeObject(r2); + } + var v2 = getArrayU8FromWasm0(r0, r1).slice(); + wasm.__wbindgen_free(r0, r1 * 1); + return v2; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @returns {Uint8Array} + */ + generate_preimage_nonce() { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + wasm.lightsparksigner_generate_preimage_nonce(retptr, this.__wbg_ptr); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var v1 = getArrayU8FromWasm0(r0, r1).slice(); + wasm.__wbindgen_free(r0, r1 * 1); + return v1; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @param {Uint8Array} nonce + * @returns {Uint8Array} + */ + generate_preimage(nonce) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passArray8ToWasm0(nonce, wasm.__wbindgen_malloc); + const len0 = WASM_VECTOR_LEN; + wasm.lightsparksigner_generate_preimage( + retptr, + this.__wbg_ptr, + ptr0, + len0, + ); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + var r3 = getInt32Memory0()[retptr / 4 + 3]; + if (r3) { + throw takeObject(r2); + } + var v2 = getArrayU8FromWasm0(r0, r1).slice(); + wasm.__wbindgen_free(r0, r1 * 1); + return v2; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @param {Uint8Array} nonce + * @returns {Uint8Array} + */ + generate_preimage_hash(nonce) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passArray8ToWasm0(nonce, wasm.__wbindgen_malloc); + const len0 = WASM_VECTOR_LEN; + wasm.lightsparksigner_generate_preimage_hash( + retptr, + this.__wbg_ptr, + ptr0, + len0, + ); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + var r3 = getInt32Memory0()[retptr / 4 + 3]; + if (r3) { + throw takeObject(r2); + } + var v2 = getArrayU8FromWasm0(r0, r1).slice(); + wasm.__wbindgen_free(r0, r1 * 1); + return v2; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @param {string} derivation_path + * @returns {string} + */ + derive_private_key(derivation_path) { + let deferred3_0; + let deferred3_1; + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0( + derivation_path, + wasm.__wbindgen_malloc, + wasm.__wbindgen_realloc, + ); + const len0 = WASM_VECTOR_LEN; + wasm.lightsparksigner_derive_private_key( + retptr, + this.__wbg_ptr, + ptr0, + len0, + ); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + var r3 = getInt32Memory0()[retptr / 4 + 3]; + var ptr2 = r0; + var len2 = r1; + if (r3) { + ptr2 = 0; + len2 = 0; + throw takeObject(r2); + } + deferred3_0 = ptr2; + deferred3_1 = len2; + return getStringFromWasm0(ptr2, len2); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + wasm.__wbindgen_free(deferred3_0, deferred3_1, 1); + } + } + /** + * @param {string} unsigned_invoice + * @returns {InvoiceSignature} + */ + sign_invoice_wasm(unsigned_invoice) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0( + unsigned_invoice, + wasm.__wbindgen_malloc, + wasm.__wbindgen_realloc, + ); + const len0 = WASM_VECTOR_LEN; + wasm.lightsparksigner_sign_invoice_wasm( + retptr, + this.__wbg_ptr, + ptr0, + len0, + ); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + if (r2) { + throw takeObject(r1); + } + return InvoiceSignature.__wrap(r0); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @param {Uint8Array} invoice_hash + * @returns {InvoiceSignature} + */ + sign_invoice_hash_wasm(invoice_hash) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passArray8ToWasm0(invoice_hash, wasm.__wbindgen_malloc); + const len0 = WASM_VECTOR_LEN; + wasm.lightsparksigner_sign_invoice_hash_wasm( + retptr, + this.__wbg_ptr, + ptr0, + len0, + ); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + if (r2) { + throw takeObject(r1); + } + return InvoiceSignature.__wrap(r0); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } +} +module.exports.LightsparkSigner = LightsparkSigner; +/** + */ +class Mnemonic { + static __wrap(ptr) { + ptr = ptr >>> 0; + const obj = Object.create(Mnemonic.prototype); + obj.__wbg_ptr = ptr; + + return obj; + } + + __destroy_into_raw() { + const ptr = this.__wbg_ptr; + this.__wbg_ptr = 0; + + return ptr; + } + + free() { + const ptr = this.__destroy_into_raw(); + wasm.__wbg_mnemonic_free(ptr); + } + /** + * @returns {Mnemonic} + */ + static random() { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + wasm.mnemonic_random(retptr); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + if (r2) { + throw takeObject(r1); + } + return Mnemonic.__wrap(r0); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @param {Uint8Array} entropy + * @returns {Mnemonic} + */ + static from_entropy(entropy) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passArray8ToWasm0(entropy, wasm.__wbindgen_malloc); + const len0 = WASM_VECTOR_LEN; + wasm.mnemonic_from_entropy(retptr, ptr0, len0); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + if (r2) { + throw takeObject(r1); + } + return Mnemonic.__wrap(r0); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @param {string} phrase + * @returns {Mnemonic} + */ + static from_phrase(phrase) { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + const ptr0 = passStringToWasm0( + phrase, + wasm.__wbindgen_malloc, + wasm.__wbindgen_realloc, + ); + const len0 = WASM_VECTOR_LEN; + wasm.mnemonic_from_phrase(retptr, ptr0, len0); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var r2 = getInt32Memory0()[retptr / 4 + 2]; + if (r2) { + throw takeObject(r1); + } + return Mnemonic.__wrap(r0); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } + /** + * @returns {string} + */ + as_string() { + let deferred1_0; + let deferred1_1; + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + wasm.mnemonic_as_string(retptr, this.__wbg_ptr); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + deferred1_0 = r0; + deferred1_1 = r1; + return getStringFromWasm0(r0, r1); + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + wasm.__wbindgen_free(deferred1_0, deferred1_1, 1); + } + } +} +module.exports.Mnemonic = Mnemonic; +/** + */ +class Seed { + static __wrap(ptr) { + ptr = ptr >>> 0; + const obj = Object.create(Seed.prototype); + obj.__wbg_ptr = ptr; + + return obj; + } + + __destroy_into_raw() { + const ptr = this.__wbg_ptr; + this.__wbg_ptr = 0; + + return ptr; + } + + free() { + const ptr = this.__destroy_into_raw(); + wasm.__wbg_seed_free(ptr); + } + /** + * @param {Mnemonic} mnemonic + * @returns {Seed} + */ + static from_mnemonic(mnemonic) { + _assertClass(mnemonic, Mnemonic); + const ret = wasm.seed_from_mnemonic(mnemonic.__wbg_ptr); + return Seed.__wrap(ret); + } + /** + * @param {Uint8Array} seed + * @returns {Seed} + */ + static new(seed) { + const ptr0 = passArray8ToWasm0(seed, wasm.__wbindgen_malloc); + const len0 = WASM_VECTOR_LEN; + const ret = wasm.seed_new(ptr0, len0); + return Seed.__wrap(ret); + } + /** + * @returns {Uint8Array} + */ + as_bytes() { + try { + const retptr = wasm.__wbindgen_add_to_stack_pointer(-16); + wasm.invoicesignature_get_signature(retptr, this.__wbg_ptr); + var r0 = getInt32Memory0()[retptr / 4 + 0]; + var r1 = getInt32Memory0()[retptr / 4 + 1]; + var v1 = getArrayU8FromWasm0(r0, r1).slice(); + wasm.__wbindgen_free(r0, r1 * 1); + return v1; + } finally { + wasm.__wbindgen_add_to_stack_pointer(16); + } + } +} +module.exports.Seed = Seed; + +module.exports.__wbindgen_error_new = function (arg0, arg1) { + const ret = new Error(getStringFromWasm0(arg0, arg1)); + return addHeapObject(ret); +}; + +module.exports.__wbg_getRandomValues_37fa2ca9e4e07fab = function () { + return handleError(function (arg0, arg1) { + getObject(arg0).getRandomValues(getObject(arg1)); + }, arguments); +}; + +module.exports.__wbindgen_object_drop_ref = function (arg0) { + takeObject(arg0); +}; + +module.exports.__wbg_randomFillSync_dc1e9a60c158336d = function () { + return handleError(function (arg0, arg1) { + getObject(arg0).randomFillSync(takeObject(arg1)); + }, arguments); +}; + +module.exports.__wbg_crypto_c48a774b022d20ac = function (arg0) { + const ret = getObject(arg0).crypto; + return addHeapObject(ret); +}; + +module.exports.__wbindgen_is_object = function (arg0) { + const val = getObject(arg0); + const ret = typeof val === "object" && val !== null; + return ret; +}; + +module.exports.__wbg_process_298734cf255a885d = function (arg0) { + const ret = getObject(arg0).process; + return addHeapObject(ret); +}; + +module.exports.__wbg_versions_e2e78e134e3e5d01 = function (arg0) { + const ret = getObject(arg0).versions; + return addHeapObject(ret); +}; + +module.exports.__wbg_node_1cd7a5d853dbea79 = function (arg0) { + const ret = getObject(arg0).node; + return addHeapObject(ret); +}; + +module.exports.__wbindgen_is_string = function (arg0) { + const ret = typeof getObject(arg0) === "string"; + return ret; +}; + +module.exports.__wbg_msCrypto_bcb970640f50a1e8 = function (arg0) { + const ret = getObject(arg0).msCrypto; + return addHeapObject(ret); +}; + +module.exports.__wbg_require_8f08ceecec0f4fee = function () { + return handleError(function () { + const ret = module.require; + return addHeapObject(ret); + }, arguments); +}; + +module.exports.__wbindgen_is_function = function (arg0) { + const ret = typeof getObject(arg0) === "function"; + return ret; +}; + +module.exports.__wbindgen_string_new = function (arg0, arg1) { + const ret = getStringFromWasm0(arg0, arg1); + return addHeapObject(ret); +}; + +module.exports.__wbg_newnoargs_581967eacc0e2604 = function (arg0, arg1) { + const ret = new Function(getStringFromWasm0(arg0, arg1)); + return addHeapObject(ret); +}; + +module.exports.__wbg_call_cb65541d95d71282 = function () { + return handleError(function (arg0, arg1) { + const ret = getObject(arg0).call(getObject(arg1)); + return addHeapObject(ret); + }, arguments); +}; + +module.exports.__wbindgen_object_clone_ref = function (arg0) { + const ret = getObject(arg0); + return addHeapObject(ret); +}; + +module.exports.__wbg_self_1ff1d729e9aae938 = function () { + return handleError(function () { + const ret = self.self; + return addHeapObject(ret); + }, arguments); +}; + +module.exports.__wbg_window_5f4faef6c12b79ec = function () { + return handleError(function () { + const ret = window.window; + return addHeapObject(ret); + }, arguments); +}; + +module.exports.__wbg_globalThis_1d39714405582d3c = function () { + return handleError(function () { + const ret = globalThis.globalThis; + return addHeapObject(ret); + }, arguments); +}; + +module.exports.__wbg_global_651f05c6a0944d1c = function () { + return handleError(function () { + const ret = global.global; + return addHeapObject(ret); + }, arguments); +}; + +module.exports.__wbindgen_is_undefined = function (arg0) { + const ret = getObject(arg0) === undefined; + return ret; +}; + +module.exports.__wbg_call_01734de55d61e11d = function () { + return handleError(function (arg0, arg1, arg2) { + const ret = getObject(arg0).call(getObject(arg1), getObject(arg2)); + return addHeapObject(ret); + }, arguments); +}; + +module.exports.__wbg_buffer_085ec1f694018c4f = function (arg0) { + const ret = getObject(arg0).buffer; + return addHeapObject(ret); +}; + +module.exports.__wbg_newwithbyteoffsetandlength_6da8e527659b86aa = function ( + arg0, + arg1, + arg2, +) { + const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); + return addHeapObject(ret); +}; + +module.exports.__wbg_new_8125e318e6245eed = function (arg0) { + const ret = new Uint8Array(getObject(arg0)); + return addHeapObject(ret); +}; + +module.exports.__wbg_set_5cf90238115182c3 = function (arg0, arg1, arg2) { + getObject(arg0).set(getObject(arg1), arg2 >>> 0); +}; + +module.exports.__wbg_newwithlength_e5d69174d6984cd7 = function (arg0) { + const ret = new Uint8Array(arg0 >>> 0); + return addHeapObject(ret); +}; + +module.exports.__wbg_subarray_13db269f57aa838d = function (arg0, arg1, arg2) { + const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0); + return addHeapObject(ret); +}; + +module.exports.__wbindgen_throw = function (arg0, arg1) { + throw new Error(getStringFromWasm0(arg0, arg1)); +}; + +module.exports.__wbindgen_memory = function () { + const ret = wasm.memory; + return addHeapObject(ret); +}; + +const path = require("path").join(__dirname, "lightspark_crypto_bg.wasm"); +const bytes = require("fs").readFileSync(path); + +const wasmModule = new WebAssembly.Module(bytes); +const wasmInstance = new WebAssembly.Instance(wasmModule, imports); +wasm = wasmInstance.exports; +module.exports.__wasm = wasm; diff --git a/packages/lightspark-sdk/src/lightspark_crypto/lightspark_crypto_bg.wasm b/packages/lightspark-sdk/src/lightspark_crypto/lightspark_crypto_bg.wasm new file mode 100644 index 000000000..b1288f85c Binary files /dev/null and b/packages/lightspark-sdk/src/lightspark_crypto/lightspark_crypto_bg.wasm differ diff --git a/packages/lightspark-sdk/src/lightspark_crypto/lightspark_crypto_bg.wasm.d.ts b/packages/lightspark-sdk/src/lightspark_crypto/lightspark_crypto_bg.wasm.d.ts new file mode 100644 index 000000000..523315ae6 --- /dev/null +++ b/packages/lightspark-sdk/src/lightspark_crypto/lightspark_crypto_bg.wasm.d.ts @@ -0,0 +1,120 @@ +/* tslint:disable */ +/* eslint-disable */ +export const memory: WebAssembly.Memory; +export function __wbg_mnemonic_free(a: number): void; +export function mnemonic_random(a: number): void; +export function mnemonic_from_entropy(a: number, b: number, c: number): void; +export function mnemonic_from_phrase(a: number, b: number, c: number): void; +export function mnemonic_as_string(a: number, b: number): void; +export function __wbg_seed_free(a: number): void; +export function seed_from_mnemonic(a: number): number; +export function seed_new(a: number, b: number): number; +export function __wbg_invoicesignature_free(a: number): void; +export function invoicesignature_get_signature(a: number, b: number): void; +export function invoicesignature_get_recovery_id(a: number): number; +export function __wbg_lightsparksigner_free(a: number): void; +export function lightsparksigner_new(a: number, b: number, c: number): void; +export function lightsparksigner_from_bytes( + a: number, + b: number, + c: number, + d: number, +): void; +export function lightsparksigner_get_master_public_key( + a: number, + b: number, +): void; +export function lightsparksigner_derive_public_key( + a: number, + b: number, + c: number, + d: number, +): void; +export function lightsparksigner_derive_key_and_sign( + a: number, + b: number, + c: number, + d: number, + e: number, + f: number, + g: number, + h: number, + i: number, + j: number, + k: number, +): void; +export function lightsparksigner_ecdh( + a: number, + b: number, + c: number, + d: number, +): void; +export function lightsparksigner_get_per_commitment_point( + a: number, + b: number, + c: number, + d: number, + e: number, +): void; +export function lightsparksigner_release_per_commitment_secret( + a: number, + b: number, + c: number, + d: number, + e: number, +): void; +export function lightsparksigner_generate_preimage_nonce( + a: number, + b: number, +): void; +export function lightsparksigner_generate_preimage( + a: number, + b: number, + c: number, + d: number, +): void; +export function lightsparksigner_generate_preimage_hash( + a: number, + b: number, + c: number, + d: number, +): void; +export function lightsparksigner_derive_private_key( + a: number, + b: number, + c: number, + d: number, +): void; +export function lightsparksigner_sign_invoice_wasm( + a: number, + b: number, + c: number, + d: number, +): void; +export function lightsparksigner_sign_invoice_hash_wasm( + a: number, + b: number, + c: number, + d: number, +): void; +export function seed_as_bytes(a: number, b: number): void; +export function rustsecp256k1_v0_8_1_context_create(a: number): number; +export function rustsecp256k1_v0_8_1_context_destroy(a: number): void; +export function rustsecp256k1_v0_8_1_default_illegal_callback_fn( + a: number, + b: number, +): void; +export function rustsecp256k1_v0_8_1_default_error_callback_fn( + a: number, + b: number, +): void; +export function __wbindgen_add_to_stack_pointer(a: number): number; +export function __wbindgen_malloc(a: number, b: number): number; +export function __wbindgen_realloc( + a: number, + b: number, + c: number, + d: number, +): number; +export function __wbindgen_free(a: number, b: number, c: number): void; +export function __wbindgen_exn_store(a: number): void; diff --git a/packages/lightspark-sdk/src/lightspark_crypto/package.json b/packages/lightspark-sdk/src/lightspark_crypto/package.json new file mode 100644 index 000000000..c574ed8c2 --- /dev/null +++ b/packages/lightspark-sdk/src/lightspark_crypto/package.json @@ -0,0 +1,11 @@ +{ + "name": "lightspark-crypto", + "version": "0.1.0", + "files": [ + "lightspark_crypto_bg.wasm", + "lightspark_crypto.js", + "lightspark_crypto.d.ts" + ], + "main": "lightspark_crypto.js", + "types": "lightspark_crypto.d.ts" +} diff --git a/packages/lightspark-sdk/src/objects/Account.ts b/packages/lightspark-sdk/src/objects/Account.ts index 2711e3f59..fe9667c6c 100644 --- a/packages/lightspark-sdk/src/objects/Account.ts +++ b/packages/lightspark-sdk/src/objects/Account.ts @@ -227,27 +227,24 @@ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetw page_info_start_cursor: start_cursor page_info_end_cursor: end_cursor } - account_to_nodes_connection_purpose: purpose account_to_nodes_connection_entities: entities { __typename - lightspark_node_id: id - lightspark_node_created_at: created_at - lightspark_node_updated_at: updated_at - lightspark_node_alias: alias - lightspark_node_bitcoin_network: bitcoin_network - lightspark_node_color: color - lightspark_node_conductivity: conductivity - lightspark_node_display_name: display_name - lightspark_node_public_key: public_key - lightspark_node_account: account { - id - } - lightspark_node_owner: owner { - id - } - lightspark_node_blockchain_balance: blockchain_balance { + ... on LightsparkNodeWithOSK { __typename - blockchain_balance_total_balance: total_balance { + lightspark_node_with_o_s_k_id: id + lightspark_node_with_o_s_k_created_at: created_at + lightspark_node_with_o_s_k_updated_at: updated_at + lightspark_node_with_o_s_k_alias: alias + lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network + lightspark_node_with_o_s_k_color: color + lightspark_node_with_o_s_k_conductivity: conductivity + lightspark_node_with_o_s_k_display_name: display_name + lightspark_node_with_o_s_k_public_key: public_key + lightspark_node_with_o_s_k_owner: owner { + id + } + lightspark_node_with_o_s_k_status: status + lightspark_node_with_o_s_k_total_balance: total_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -255,7 +252,7 @@ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetw currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - blockchain_balance_confirmed_balance: confirmed_balance { + lightspark_node_with_o_s_k_total_local_balance: total_local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -263,7 +260,7 @@ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetw currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - blockchain_balance_unconfirmed_balance: unconfirmed_balance { + lightspark_node_with_o_s_k_local_balance: local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -271,7 +268,7 @@ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetw currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - blockchain_balance_locked_balance: locked_balance { + lightspark_node_with_o_s_k_remote_balance: remote_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -279,7 +276,80 @@ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetw currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - blockchain_balance_required_reserve: required_reserve { + lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos + lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key { + __typename + secret_encrypted_value: encrypted_value + secret_cipher: cipher + } + } + ... on LightsparkNodeWithRemoteSigning { + __typename + lightspark_node_with_remote_signing_id: id + lightspark_node_with_remote_signing_created_at: created_at + lightspark_node_with_remote_signing_updated_at: updated_at + lightspark_node_with_remote_signing_alias: alias + lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network + lightspark_node_with_remote_signing_color: color + lightspark_node_with_remote_signing_conductivity: conductivity + lightspark_node_with_remote_signing_display_name: display_name + lightspark_node_with_remote_signing_public_key: public_key + lightspark_node_with_remote_signing_owner: owner { + id + } + lightspark_node_with_remote_signing_status: status + lightspark_node_with_remote_signing_total_balance: total_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -287,7 +357,7 @@ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetw currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - blockchain_balance_available_balance: available_balance { + lightspark_node_with_remote_signing_total_local_balance: total_local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -295,46 +365,75 @@ query FetchAccountToNodesConnection($first: Int, $bitcoin_networks: [BitcoinNetw currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } + lightspark_node_with_remote_signing_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_remote_signing_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos } - lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key { - __typename - secret_encrypted_value: encrypted_value - secret_cipher: cipher - } - lightspark_node_total_balance: total_balance { - __typename - currency_amount_original_value: original_value - currency_amount_original_unit: original_unit - currency_amount_preferred_currency_unit: preferred_currency_unit - currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded - currency_amount_preferred_currency_value_approx: preferred_currency_value_approx - } - lightspark_node_total_local_balance: total_local_balance { - __typename - currency_amount_original_value: original_value - currency_amount_original_unit: original_unit - currency_amount_preferred_currency_unit: preferred_currency_unit - currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded - currency_amount_preferred_currency_value_approx: preferred_currency_value_approx - } - lightspark_node_local_balance: local_balance { - __typename - currency_amount_original_value: original_value - currency_amount_original_unit: original_unit - currency_amount_preferred_currency_unit: preferred_currency_unit - currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded - currency_amount_preferred_currency_value_approx: preferred_currency_value_approx - } - lightspark_node_purpose: purpose - lightspark_node_remote_balance: remote_balance { - __typename - currency_amount_original_value: original_value - currency_amount_original_unit: original_unit - currency_amount_preferred_currency_unit: preferred_currency_unit - currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded - currency_amount_preferred_currency_value_approx: preferred_currency_value_approx - } - lightspark_node_status: status } } } @@ -708,15 +807,24 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types: currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } incoming_payment_transaction_hash: transaction_hash - incoming_payment_origin: origin { - id - } incoming_payment_destination: destination { id } incoming_payment_payment_request: payment_request { id } + incoming_payment_uma_post_transaction_data: uma_post_transaction_data { + __typename + post_transaction_data_utxo: utxo + post_transaction_data_amount: amount { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } } ... on OutgoingPayment { __typename @@ -780,24 +888,54 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types: graph_node_display_name: display_name graph_node_public_key: public_key } - ... on LightsparkNode { + ... on LightsparkNodeWithOSK { __typename - lightspark_node_id: id - lightspark_node_created_at: created_at - lightspark_node_updated_at: updated_at - lightspark_node_alias: alias - lightspark_node_bitcoin_network: bitcoin_network - lightspark_node_color: color - lightspark_node_conductivity: conductivity - lightspark_node_display_name: display_name - lightspark_node_public_key: public_key - lightspark_node_account: account { + lightspark_node_with_o_s_k_id: id + lightspark_node_with_o_s_k_created_at: created_at + lightspark_node_with_o_s_k_updated_at: updated_at + lightspark_node_with_o_s_k_alias: alias + lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network + lightspark_node_with_o_s_k_color: color + lightspark_node_with_o_s_k_conductivity: conductivity + lightspark_node_with_o_s_k_display_name: display_name + lightspark_node_with_o_s_k_public_key: public_key + lightspark_node_with_o_s_k_owner: owner { id } - lightspark_node_owner: owner { - id + lightspark_node_with_o_s_k_status: status + lightspark_node_with_o_s_k_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_total_local_balance: total_local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_blockchain_balance: blockchain_balance { + lightspark_node_with_o_s_k_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance { __typename blockchain_balance_total_balance: total_balance { __typename @@ -848,12 +986,29 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types: currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } } - lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key { + lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos + lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key { __typename secret_encrypted_value: encrypted_value secret_cipher: cipher } - lightspark_node_total_balance: total_balance { + } + ... on LightsparkNodeWithRemoteSigning { + __typename + lightspark_node_with_remote_signing_id: id + lightspark_node_with_remote_signing_created_at: created_at + lightspark_node_with_remote_signing_updated_at: updated_at + lightspark_node_with_remote_signing_alias: alias + lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network + lightspark_node_with_remote_signing_color: color + lightspark_node_with_remote_signing_conductivity: conductivity + lightspark_node_with_remote_signing_display_name: display_name + lightspark_node_with_remote_signing_public_key: public_key + lightspark_node_with_remote_signing_owner: owner { + id + } + lightspark_node_with_remote_signing_status: status + lightspark_node_with_remote_signing_total_balance: total_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -861,7 +1016,7 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types: currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_total_local_balance: total_local_balance { + lightspark_node_with_remote_signing_total_local_balance: total_local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -869,7 +1024,7 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types: currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_local_balance: local_balance { + lightspark_node_with_remote_signing_local_balance: local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -877,8 +1032,7 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types: currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_purpose: purpose - lightspark_node_remote_balance: remote_balance { + lightspark_node_with_remote_signing_remote_balance: remote_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -886,7 +1040,58 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types: currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_status: status + lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos } } } @@ -896,6 +1101,18 @@ query FetchAccountToTransactionsConnection($first: Int, $after: String, $types: __typename rich_text_text: text } + outgoing_payment_uma_post_transaction_data: uma_post_transaction_data { + __typename + post_transaction_data_utxo: utxo + post_transaction_data_amount: amount { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } } ... on RoutingTransaction { __typename @@ -1050,24 +1267,54 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte graph_node_display_name: display_name graph_node_public_key: public_key } - ... on LightsparkNode { + ... on LightsparkNodeWithOSK { __typename - lightspark_node_id: id - lightspark_node_created_at: created_at - lightspark_node_updated_at: updated_at - lightspark_node_alias: alias - lightspark_node_bitcoin_network: bitcoin_network - lightspark_node_color: color - lightspark_node_conductivity: conductivity - lightspark_node_display_name: display_name - lightspark_node_public_key: public_key - lightspark_node_account: account { + lightspark_node_with_o_s_k_id: id + lightspark_node_with_o_s_k_created_at: created_at + lightspark_node_with_o_s_k_updated_at: updated_at + lightspark_node_with_o_s_k_alias: alias + lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network + lightspark_node_with_o_s_k_color: color + lightspark_node_with_o_s_k_conductivity: conductivity + lightspark_node_with_o_s_k_display_name: display_name + lightspark_node_with_o_s_k_public_key: public_key + lightspark_node_with_o_s_k_owner: owner { id } - lightspark_node_owner: owner { - id + lightspark_node_with_o_s_k_status: status + lightspark_node_with_o_s_k_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_blockchain_balance: blockchain_balance { + lightspark_node_with_o_s_k_total_local_balance: total_local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance { __typename blockchain_balance_total_balance: total_balance { __typename @@ -1118,12 +1365,29 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } } - lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key { + lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos + lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key { __typename secret_encrypted_value: encrypted_value secret_cipher: cipher } - lightspark_node_total_balance: total_balance { + } + ... on LightsparkNodeWithRemoteSigning { + __typename + lightspark_node_with_remote_signing_id: id + lightspark_node_with_remote_signing_created_at: created_at + lightspark_node_with_remote_signing_updated_at: updated_at + lightspark_node_with_remote_signing_alias: alias + lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network + lightspark_node_with_remote_signing_color: color + lightspark_node_with_remote_signing_conductivity: conductivity + lightspark_node_with_remote_signing_display_name: display_name + lightspark_node_with_remote_signing_public_key: public_key + lightspark_node_with_remote_signing_owner: owner { + id + } + lightspark_node_with_remote_signing_status: status + lightspark_node_with_remote_signing_total_balance: total_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -1131,7 +1395,7 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_total_local_balance: total_local_balance { + lightspark_node_with_remote_signing_total_local_balance: total_local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -1139,7 +1403,7 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_local_balance: local_balance { + lightspark_node_with_remote_signing_local_balance: local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -1147,8 +1411,7 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_purpose: purpose - lightspark_node_remote_balance: remote_balance { + lightspark_node_with_remote_signing_remote_balance: remote_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -1156,7 +1419,58 @@ query FetchAccountToPaymentRequestsConnection($first: Int, $after: String, $afte currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_status: status + lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos } } } @@ -1246,6 +1560,9 @@ query FetchAccountToWalletsConnection($first: Int, $after: String, $third_party_ } } wallet_third_party_identifier: third_party_identifier + wallet_account: account { + id + } wallet_status: status } } diff --git a/packages/lightspark-sdk/src/objects/AccountToNodesConnection.ts b/packages/lightspark-sdk/src/objects/AccountToNodesConnection.ts index abced25a7..ecb2ff028 100644 --- a/packages/lightspark-sdk/src/objects/AccountToNodesConnection.ts +++ b/packages/lightspark-sdk/src/objects/AccountToNodesConnection.ts @@ -3,7 +3,6 @@ import type Connection from "./Connection.js"; import type LightsparkNode from "./LightsparkNode.js"; import { LightsparkNodeFromJson } from "./LightsparkNode.js"; -import LightsparkNodePurpose from "./LightsparkNodePurpose.js"; import type PageInfo from "./PageInfo.js"; import { PageInfoFromJson } from "./PageInfo.js"; @@ -23,13 +22,6 @@ type AccountToNodesConnection = Connection & { /** The typename of the object **/ typename: string; - - /** - * The main purpose for the selected set of nodes. It is automatically determined from the nodes that - * are selected in this connection and is used for optimization purposes, as well as to determine the - * variation of the UI that should be presented to the user. - **/ - purpose?: LightsparkNodePurpose; }; export const AccountToNodesConnectionFromJson = ( @@ -42,10 +34,6 @@ export const AccountToNodesConnectionFromJson = ( LightsparkNodeFromJson(e), ), typename: "AccountToNodesConnection", - purpose: !!obj["account_to_nodes_connection_purpose"] - ? LightsparkNodePurpose[obj["account_to_nodes_connection_purpose"]] ?? - LightsparkNodePurpose.FUTURE_VALUE - : null, } as AccountToNodesConnection; }; @@ -60,7 +48,6 @@ fragment AccountToNodesConnectionFragment on AccountToNodesConnection { page_info_start_cursor: start_cursor page_info_end_cursor: end_cursor } - account_to_nodes_connection_purpose: purpose account_to_nodes_connection_entities: entities { id } diff --git a/packages/lightspark-sdk/src/objects/CryptoSanctionsScreeningProvider.ts b/packages/lightspark-sdk/src/objects/ComplianceProvider.ts similarity index 64% rename from packages/lightspark-sdk/src/objects/CryptoSanctionsScreeningProvider.ts rename to packages/lightspark-sdk/src/objects/ComplianceProvider.ts index 3ee6d6bd6..6b4100aee 100644 --- a/packages/lightspark-sdk/src/objects/CryptoSanctionsScreeningProvider.ts +++ b/packages/lightspark-sdk/src/objects/ComplianceProvider.ts @@ -1,7 +1,7 @@ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved -/** This is an enum identifying a type of crypto sanctions screening provider. **/ -export enum CryptoSanctionsScreeningProvider { +/** This is an enum identifying a type of compliance provider. **/ +export enum ComplianceProvider { /** * This is an enum value that represents values that could be added in the future. * Clients should support unknown values as more of them could be added without notice. @@ -11,4 +11,4 @@ export enum CryptoSanctionsScreeningProvider { CHAINALYSIS = "CHAINALYSIS", } -export default CryptoSanctionsScreeningProvider; +export default ComplianceProvider; diff --git a/packages/lightspark-sdk/src/objects/Connection.ts b/packages/lightspark-sdk/src/objects/Connection.ts index f729554e1..849b24741 100644 --- a/packages/lightspark-sdk/src/objects/Connection.ts +++ b/packages/lightspark-sdk/src/objects/Connection.ts @@ -13,7 +13,6 @@ import { HopFromJson } from "./Hop.js"; import { IncomingPaymentAttemptFromJson } from "./IncomingPaymentAttempt.js"; import type IncomingPaymentToAttemptsConnection from "./IncomingPaymentToAttemptsConnection.js"; import { LightsparkNodeFromJson } from "./LightsparkNode.js"; -import LightsparkNodePurpose from "./LightsparkNodePurpose.js"; import type LightsparkNodeToChannelsConnection from "./LightsparkNodeToChannelsConnection.js"; import { OutgoingPaymentAttemptFromJson } from "./OutgoingPaymentAttempt.js"; import type OutgoingPaymentAttemptToHopsConnection from "./OutgoingPaymentAttemptToHopsConnection.js"; @@ -61,10 +60,6 @@ export const ConnectionFromJson = (obj: any): Connection => { LightsparkNodeFromJson(e), ), typename: "AccountToNodesConnection", - purpose: !!obj["account_to_nodes_connection_purpose"] - ? LightsparkNodePurpose[obj["account_to_nodes_connection_purpose"]] ?? - LightsparkNodePurpose.FUTURE_VALUE - : null, } as AccountToNodesConnection; } if (obj["__typename"] == "AccountToPaymentRequestsConnection") { @@ -227,7 +222,6 @@ fragment ConnectionFragment on Connection { page_info_start_cursor: start_cursor page_info_end_cursor: end_cursor } - account_to_nodes_connection_purpose: purpose account_to_nodes_connection_entities: entities { id } diff --git a/packages/lightspark-sdk/src/objects/CreateInvoiceInput.ts b/packages/lightspark-sdk/src/objects/CreateInvoiceInput.ts index 8b4731f95..75f9825c9 100644 --- a/packages/lightspark-sdk/src/objects/CreateInvoiceInput.ts +++ b/packages/lightspark-sdk/src/objects/CreateInvoiceInput.ts @@ -15,10 +15,6 @@ type CreateInvoiceInput = { /** The expiry of the invoice in seconds. Default value is 86400 (1 day). **/ expirySecs?: number; - - paymentHash?: string; - - preimageNonce?: string; }; export const CreateInvoiceInputFromJson = (obj: any): CreateInvoiceInput => { @@ -31,8 +27,6 @@ export const CreateInvoiceInputFromJson = (obj: any): CreateInvoiceInput => { InvoiceType.FUTURE_VALUE : null, expirySecs: obj["create_invoice_input_expiry_secs"], - paymentHash: obj["create_invoice_input_payment_hash"], - preimageNonce: obj["create_invoice_input_preimage_nonce"], } as CreateInvoiceInput; }; diff --git a/packages/lightspark-sdk/src/objects/CreateLnurlInvoiceInput.ts b/packages/lightspark-sdk/src/objects/CreateLnurlInvoiceInput.ts index de3e46b5b..25e6183d1 100644 --- a/packages/lightspark-sdk/src/objects/CreateLnurlInvoiceInput.ts +++ b/packages/lightspark-sdk/src/objects/CreateLnurlInvoiceInput.ts @@ -15,10 +15,6 @@ type CreateLnurlInvoiceInput = { /** The expiry of the invoice in seconds. Default value is 86400 (1 day). **/ expirySecs?: number; - - paymentHash?: string; - - preimageNonce?: string; }; export const CreateLnurlInvoiceInputFromJson = ( @@ -29,8 +25,6 @@ export const CreateLnurlInvoiceInputFromJson = ( amountMsats: obj["create_lnurl_invoice_input_amount_msats"], metadataHash: obj["create_lnurl_invoice_input_metadata_hash"], expirySecs: obj["create_lnurl_invoice_input_expiry_secs"], - paymentHash: obj["create_lnurl_invoice_input_payment_hash"], - preimageNonce: obj["create_lnurl_invoice_input_preimage_nonce"], } as CreateLnurlInvoiceInput; }; diff --git a/packages/lightspark-sdk/src/objects/CreateTestModePaymentoutput.ts b/packages/lightspark-sdk/src/objects/CreateTestModePaymentoutput.ts index eada5dd0e..512a8d2b9 100644 --- a/packages/lightspark-sdk/src/objects/CreateTestModePaymentoutput.ts +++ b/packages/lightspark-sdk/src/objects/CreateTestModePaymentoutput.ts @@ -2,8 +2,15 @@ /** This is an object identifying the output of a test mode payment. This object can be used to retrieve the associated payment made from a Test Mode Payment call. **/ type CreateTestModePaymentoutput = { - /** The payment that has been sent. **/ + /** + * The payment that has been sent. + * + * @deprecated Use incoming_payment instead. + **/ paymentId: string; + + /** The payment that has been received. **/ + incomingPaymentId: string; }; export const CreateTestModePaymentoutputFromJson = ( @@ -11,6 +18,8 @@ export const CreateTestModePaymentoutputFromJson = ( ): CreateTestModePaymentoutput => { return { paymentId: obj["create_test_mode_paymentoutput_payment"].id, + incomingPaymentId: + obj["create_test_mode_paymentoutput_incoming_payment"].id, } as CreateTestModePaymentoutput; }; @@ -20,6 +29,9 @@ fragment CreateTestModePaymentoutputFragment on CreateTestModePaymentoutput { create_test_mode_paymentoutput_payment: payment { id } + create_test_mode_paymentoutput_incoming_payment: incoming_payment { + id + } }`; export default CreateTestModePaymentoutput; diff --git a/packages/lightspark-sdk/src/objects/CreateUmaInvoiceInput.ts b/packages/lightspark-sdk/src/objects/CreateUmaInvoiceInput.ts new file mode 100644 index 000000000..715e41364 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/CreateUmaInvoiceInput.ts @@ -0,0 +1,24 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +type CreateUmaInvoiceInput = { + nodeId: string; + + amountMsats: number; + + metadataHash: string; + + expirySecs?: number; +}; + +export const CreateUmaInvoiceInputFromJson = ( + obj: any, +): CreateUmaInvoiceInput => { + return { + nodeId: obj["create_uma_invoice_input_node_id"], + amountMsats: obj["create_uma_invoice_input_amount_msats"], + metadataHash: obj["create_uma_invoice_input_metadata_hash"], + expirySecs: obj["create_uma_invoice_input_expiry_secs"], + } as CreateUmaInvoiceInput; +}; + +export default CreateUmaInvoiceInput; diff --git a/packages/lightspark-sdk/src/objects/DeclineToSignMessagesInput.ts b/packages/lightspark-sdk/src/objects/DeclineToSignMessagesInput.ts new file mode 100644 index 000000000..2cbc5bceb --- /dev/null +++ b/packages/lightspark-sdk/src/objects/DeclineToSignMessagesInput.ts @@ -0,0 +1,16 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +type DeclineToSignMessagesInput = { + /** List of payload ids to decline to sign because validation failed. **/ + payloadIds: string[]; +}; + +export const DeclineToSignMessagesInputFromJson = ( + obj: any, +): DeclineToSignMessagesInput => { + return { + payloadIds: obj["decline_to_sign_messages_input_payload_ids"], + } as DeclineToSignMessagesInput; +}; + +export default DeclineToSignMessagesInput; diff --git a/packages/lightspark-sdk/src/objects/DeclineToSignMessagesOutput.ts b/packages/lightspark-sdk/src/objects/DeclineToSignMessagesOutput.ts new file mode 100644 index 000000000..16c135a2a --- /dev/null +++ b/packages/lightspark-sdk/src/objects/DeclineToSignMessagesOutput.ts @@ -0,0 +1,28 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +import type SignablePayload from "./SignablePayload.js"; +import { SignablePayloadFromJson } from "./SignablePayload.js"; + +type DeclineToSignMessagesOutput = { + declinedPayloads: SignablePayload[]; +}; + +export const DeclineToSignMessagesOutputFromJson = ( + obj: any, +): DeclineToSignMessagesOutput => { + return { + declinedPayloads: obj[ + "decline_to_sign_messages_output_declined_payloads" + ].map((e) => SignablePayloadFromJson(e)), + } as DeclineToSignMessagesOutput; +}; + +export const FRAGMENT = ` +fragment DeclineToSignMessagesOutputFragment on DeclineToSignMessagesOutput { + __typename + decline_to_sign_messages_output_declined_payloads: declined_payloads { + id + } +}`; + +export default DeclineToSignMessagesOutput; diff --git a/packages/lightspark-sdk/src/objects/Entity.ts b/packages/lightspark-sdk/src/objects/Entity.ts index f905fa99a..699f45d2a 100644 --- a/packages/lightspark-sdk/src/objects/Entity.ts +++ b/packages/lightspark-sdk/src/objects/Entity.ts @@ -283,15 +283,24 @@ fragment EntityFragment on Entity { currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } incoming_payment_transaction_hash: transaction_hash - incoming_payment_origin: origin { - id - } incoming_payment_destination: destination { id } incoming_payment_payment_request: payment_request { id } + incoming_payment_uma_post_transaction_data: uma_post_transaction_data { + __typename + post_transaction_data_utxo: utxo + post_transaction_data_amount: amount { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } } ... on IncomingPaymentAttempt { __typename @@ -347,24 +356,54 @@ fragment EntityFragment on Entity { graph_node_display_name: display_name graph_node_public_key: public_key } - ... on LightsparkNode { + ... on LightsparkNodeWithOSK { __typename - lightspark_node_id: id - lightspark_node_created_at: created_at - lightspark_node_updated_at: updated_at - lightspark_node_alias: alias - lightspark_node_bitcoin_network: bitcoin_network - lightspark_node_color: color - lightspark_node_conductivity: conductivity - lightspark_node_display_name: display_name - lightspark_node_public_key: public_key - lightspark_node_account: account { + lightspark_node_with_o_s_k_id: id + lightspark_node_with_o_s_k_created_at: created_at + lightspark_node_with_o_s_k_updated_at: updated_at + lightspark_node_with_o_s_k_alias: alias + lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network + lightspark_node_with_o_s_k_color: color + lightspark_node_with_o_s_k_conductivity: conductivity + lightspark_node_with_o_s_k_display_name: display_name + lightspark_node_with_o_s_k_public_key: public_key + lightspark_node_with_o_s_k_owner: owner { id } - lightspark_node_owner: owner { - id + lightspark_node_with_o_s_k_status: status + lightspark_node_with_o_s_k_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_blockchain_balance: blockchain_balance { + lightspark_node_with_o_s_k_total_local_balance: total_local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance { __typename blockchain_balance_total_balance: total_balance { __typename @@ -415,12 +454,29 @@ fragment EntityFragment on Entity { currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } } - lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key { + lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos + lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key { __typename secret_encrypted_value: encrypted_value secret_cipher: cipher } - lightspark_node_total_balance: total_balance { + } + ... on LightsparkNodeWithRemoteSigning { + __typename + lightspark_node_with_remote_signing_id: id + lightspark_node_with_remote_signing_created_at: created_at + lightspark_node_with_remote_signing_updated_at: updated_at + lightspark_node_with_remote_signing_alias: alias + lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network + lightspark_node_with_remote_signing_color: color + lightspark_node_with_remote_signing_conductivity: conductivity + lightspark_node_with_remote_signing_display_name: display_name + lightspark_node_with_remote_signing_public_key: public_key + lightspark_node_with_remote_signing_owner: owner { + id + } + lightspark_node_with_remote_signing_status: status + lightspark_node_with_remote_signing_total_balance: total_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -428,7 +484,7 @@ fragment EntityFragment on Entity { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_total_local_balance: total_local_balance { + lightspark_node_with_remote_signing_total_local_balance: total_local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -436,7 +492,7 @@ fragment EntityFragment on Entity { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_local_balance: local_balance { + lightspark_node_with_remote_signing_local_balance: local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -444,8 +500,7 @@ fragment EntityFragment on Entity { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_purpose: purpose - lightspark_node_remote_balance: remote_balance { + lightspark_node_with_remote_signing_remote_balance: remote_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -453,7 +508,58 @@ fragment EntityFragment on Entity { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_status: status + lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos } } } @@ -467,24 +573,54 @@ fragment EntityFragment on Entity { currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } } - ... on LightsparkNode { + ... on LightsparkNodeWithOSK { __typename - lightspark_node_id: id - lightspark_node_created_at: created_at - lightspark_node_updated_at: updated_at - lightspark_node_alias: alias - lightspark_node_bitcoin_network: bitcoin_network - lightspark_node_color: color - lightspark_node_conductivity: conductivity - lightspark_node_display_name: display_name - lightspark_node_public_key: public_key - lightspark_node_account: account { + lightspark_node_with_o_s_k_id: id + lightspark_node_with_o_s_k_created_at: created_at + lightspark_node_with_o_s_k_updated_at: updated_at + lightspark_node_with_o_s_k_alias: alias + lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network + lightspark_node_with_o_s_k_color: color + lightspark_node_with_o_s_k_conductivity: conductivity + lightspark_node_with_o_s_k_display_name: display_name + lightspark_node_with_o_s_k_public_key: public_key + lightspark_node_with_o_s_k_owner: owner { id } - lightspark_node_owner: owner { - id + lightspark_node_with_o_s_k_status: status + lightspark_node_with_o_s_k_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_total_local_balance: total_local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_blockchain_balance: blockchain_balance { + lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance { __typename blockchain_balance_total_balance: total_balance { __typename @@ -535,12 +671,29 @@ fragment EntityFragment on Entity { currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } } - lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key { + lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos + lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key { __typename secret_encrypted_value: encrypted_value secret_cipher: cipher } - lightspark_node_total_balance: total_balance { + } + ... on LightsparkNodeWithRemoteSigning { + __typename + lightspark_node_with_remote_signing_id: id + lightspark_node_with_remote_signing_created_at: created_at + lightspark_node_with_remote_signing_updated_at: updated_at + lightspark_node_with_remote_signing_alias: alias + lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network + lightspark_node_with_remote_signing_color: color + lightspark_node_with_remote_signing_conductivity: conductivity + lightspark_node_with_remote_signing_display_name: display_name + lightspark_node_with_remote_signing_public_key: public_key + lightspark_node_with_remote_signing_owner: owner { + id + } + lightspark_node_with_remote_signing_status: status + lightspark_node_with_remote_signing_total_balance: total_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -548,7 +701,7 @@ fragment EntityFragment on Entity { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_total_local_balance: total_local_balance { + lightspark_node_with_remote_signing_total_local_balance: total_local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -556,7 +709,7 @@ fragment EntityFragment on Entity { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_local_balance: local_balance { + lightspark_node_with_remote_signing_local_balance: local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -564,8 +717,7 @@ fragment EntityFragment on Entity { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_purpose: purpose - lightspark_node_remote_balance: remote_balance { + lightspark_node_with_remote_signing_remote_balance: remote_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -573,7 +725,58 @@ fragment EntityFragment on Entity { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_status: status + lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos } ... on OutgoingPayment { __typename @@ -637,24 +840,54 @@ fragment EntityFragment on Entity { graph_node_display_name: display_name graph_node_public_key: public_key } - ... on LightsparkNode { + ... on LightsparkNodeWithOSK { __typename - lightspark_node_id: id - lightspark_node_created_at: created_at - lightspark_node_updated_at: updated_at - lightspark_node_alias: alias - lightspark_node_bitcoin_network: bitcoin_network - lightspark_node_color: color - lightspark_node_conductivity: conductivity - lightspark_node_display_name: display_name - lightspark_node_public_key: public_key - lightspark_node_account: account { + lightspark_node_with_o_s_k_id: id + lightspark_node_with_o_s_k_created_at: created_at + lightspark_node_with_o_s_k_updated_at: updated_at + lightspark_node_with_o_s_k_alias: alias + lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network + lightspark_node_with_o_s_k_color: color + lightspark_node_with_o_s_k_conductivity: conductivity + lightspark_node_with_o_s_k_display_name: display_name + lightspark_node_with_o_s_k_public_key: public_key + lightspark_node_with_o_s_k_owner: owner { id } - lightspark_node_owner: owner { - id + lightspark_node_with_o_s_k_status: status + lightspark_node_with_o_s_k_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_total_local_balance: total_local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_blockchain_balance: blockchain_balance { + lightspark_node_with_o_s_k_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance { __typename blockchain_balance_total_balance: total_balance { __typename @@ -705,12 +938,29 @@ fragment EntityFragment on Entity { currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } } - lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key { + lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos + lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key { __typename secret_encrypted_value: encrypted_value secret_cipher: cipher } - lightspark_node_total_balance: total_balance { + } + ... on LightsparkNodeWithRemoteSigning { + __typename + lightspark_node_with_remote_signing_id: id + lightspark_node_with_remote_signing_created_at: created_at + lightspark_node_with_remote_signing_updated_at: updated_at + lightspark_node_with_remote_signing_alias: alias + lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network + lightspark_node_with_remote_signing_color: color + lightspark_node_with_remote_signing_conductivity: conductivity + lightspark_node_with_remote_signing_display_name: display_name + lightspark_node_with_remote_signing_public_key: public_key + lightspark_node_with_remote_signing_owner: owner { + id + } + lightspark_node_with_remote_signing_status: status + lightspark_node_with_remote_signing_total_balance: total_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -718,7 +968,7 @@ fragment EntityFragment on Entity { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_total_local_balance: total_local_balance { + lightspark_node_with_remote_signing_total_local_balance: total_local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -726,7 +976,7 @@ fragment EntityFragment on Entity { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_local_balance: local_balance { + lightspark_node_with_remote_signing_local_balance: local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -734,8 +984,7 @@ fragment EntityFragment on Entity { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_purpose: purpose - lightspark_node_remote_balance: remote_balance { + lightspark_node_with_remote_signing_remote_balance: remote_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -743,7 +992,58 @@ fragment EntityFragment on Entity { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_status: status + lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos } } } @@ -753,6 +1053,18 @@ fragment EntityFragment on Entity { __typename rich_text_text: text } + outgoing_payment_uma_post_transaction_data: uma_post_transaction_data { + __typename + post_transaction_data_utxo: utxo + post_transaction_data_amount: amount { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } } ... on OutgoingPaymentAttempt { __typename @@ -819,6 +1131,26 @@ fragment EntityFragment on Entity { } routing_transaction_failure_reason: failure_reason } + ... on Signable { + __typename + signable_id: id + signable_created_at: created_at + signable_updated_at: updated_at + } + ... on SignablePayload { + __typename + signable_payload_id: id + signable_payload_created_at: created_at + signable_payload_updated_at: updated_at + signable_payload_payload: payload + signable_payload_derivation_path: derivation_path + signable_payload_status: status + signable_payload_add_tweak: add_tweak + signable_payload_mul_tweak: mul_tweak + signable_payload_signable: signable { + id + } + } ... on Wallet { __typename wallet_id: id @@ -853,6 +1185,9 @@ fragment EntityFragment on Entity { } } wallet_third_party_identifier: third_party_identifier + wallet_account: account { + id + } wallet_status: status } ... on Withdrawal { diff --git a/packages/lightspark-sdk/src/objects/IdAndSignature.ts b/packages/lightspark-sdk/src/objects/IdAndSignature.ts new file mode 100644 index 000000000..52c238bda --- /dev/null +++ b/packages/lightspark-sdk/src/objects/IdAndSignature.ts @@ -0,0 +1,16 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +type IdAndSignature = { + id: string; + + signature: string; +}; + +export const IdAndSignatureFromJson = (obj: any): IdAndSignature => { + return { + id: obj["id_and_signature_id"], + signature: obj["id_and_signature_signature"], + } as IdAndSignature; +}; + +export default IdAndSignature; diff --git a/packages/lightspark-sdk/src/objects/IncomingPayment.ts b/packages/lightspark-sdk/src/objects/IncomingPayment.ts index 5a7d5aba0..f774cf349 100644 --- a/packages/lightspark-sdk/src/objects/IncomingPayment.ts +++ b/packages/lightspark-sdk/src/objects/IncomingPayment.ts @@ -9,6 +9,8 @@ import type IncomingPaymentAttemptStatus from "./IncomingPaymentAttemptStatus.js import type IncomingPaymentToAttemptsConnection from "./IncomingPaymentToAttemptsConnection.js"; import { IncomingPaymentToAttemptsConnectionFromJson } from "./IncomingPaymentToAttemptsConnection.js"; import type LightningTransaction from "./LightningTransaction.js"; +import type PostTransactionData from "./PostTransactionData.js"; +import { PostTransactionDataFromJson } from "./PostTransactionData.js"; import TransactionStatus from "./TransactionStatus.js"; /** This object represents any payment sent to a Lightspark node on the Lightning Network. You can retrieve this object to receive payment related information about a specific payment received by a Lightspark node. **/ @@ -23,8 +25,8 @@ class IncomingPayment implements LightningTransaction { public readonly typename: string, public readonly resolvedAt?: string, public readonly transactionHash?: string, - public readonly originId?: string, public readonly paymentRequestId?: string, + public readonly umaPostTransactionData?: PostTransactionData[], ) { autoBind(this); } @@ -118,8 +120,10 @@ export const IncomingPaymentFromJson = (obj: any): IncomingPayment => { "IncomingPayment", obj["incoming_payment_resolved_at"], obj["incoming_payment_transaction_hash"], - obj["incoming_payment_origin"]?.id ?? undefined, obj["incoming_payment_payment_request"]?.id ?? undefined, + obj["incoming_payment_uma_post_transaction_data"]?.map((e) => + PostTransactionDataFromJson(e), + ), ); }; @@ -140,15 +144,24 @@ fragment IncomingPaymentFragment on IncomingPayment { currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } incoming_payment_transaction_hash: transaction_hash - incoming_payment_origin: origin { - id - } incoming_payment_destination: destination { id } incoming_payment_payment_request: payment_request { id } + incoming_payment_uma_post_transaction_data: uma_post_transaction_data { + __typename + post_transaction_data_utxo: utxo + post_transaction_data_amount: amount { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } }`; export default IncomingPayment; diff --git a/packages/lightspark-sdk/src/objects/Invoice.ts b/packages/lightspark-sdk/src/objects/Invoice.ts index 6dc504359..22e552945 100644 --- a/packages/lightspark-sdk/src/objects/Invoice.ts +++ b/packages/lightspark-sdk/src/objects/Invoice.ts @@ -89,24 +89,54 @@ fragment InvoiceFragment on Invoice { graph_node_display_name: display_name graph_node_public_key: public_key } - ... on LightsparkNode { + ... on LightsparkNodeWithOSK { __typename - lightspark_node_id: id - lightspark_node_created_at: created_at - lightspark_node_updated_at: updated_at - lightspark_node_alias: alias - lightspark_node_bitcoin_network: bitcoin_network - lightspark_node_color: color - lightspark_node_conductivity: conductivity - lightspark_node_display_name: display_name - lightspark_node_public_key: public_key - lightspark_node_account: account { + lightspark_node_with_o_s_k_id: id + lightspark_node_with_o_s_k_created_at: created_at + lightspark_node_with_o_s_k_updated_at: updated_at + lightspark_node_with_o_s_k_alias: alias + lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network + lightspark_node_with_o_s_k_color: color + lightspark_node_with_o_s_k_conductivity: conductivity + lightspark_node_with_o_s_k_display_name: display_name + lightspark_node_with_o_s_k_public_key: public_key + lightspark_node_with_o_s_k_owner: owner { id } - lightspark_node_owner: owner { - id + lightspark_node_with_o_s_k_status: status + lightspark_node_with_o_s_k_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_total_local_balance: total_local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_blockchain_balance: blockchain_balance { + lightspark_node_with_o_s_k_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance { __typename blockchain_balance_total_balance: total_balance { __typename @@ -157,12 +187,29 @@ fragment InvoiceFragment on Invoice { currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } } - lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key { + lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos + lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key { __typename secret_encrypted_value: encrypted_value secret_cipher: cipher } - lightspark_node_total_balance: total_balance { + } + ... on LightsparkNodeWithRemoteSigning { + __typename + lightspark_node_with_remote_signing_id: id + lightspark_node_with_remote_signing_created_at: created_at + lightspark_node_with_remote_signing_updated_at: updated_at + lightspark_node_with_remote_signing_alias: alias + lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network + lightspark_node_with_remote_signing_color: color + lightspark_node_with_remote_signing_conductivity: conductivity + lightspark_node_with_remote_signing_display_name: display_name + lightspark_node_with_remote_signing_public_key: public_key + lightspark_node_with_remote_signing_owner: owner { + id + } + lightspark_node_with_remote_signing_status: status + lightspark_node_with_remote_signing_total_balance: total_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -170,7 +217,7 @@ fragment InvoiceFragment on Invoice { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_total_local_balance: total_local_balance { + lightspark_node_with_remote_signing_total_local_balance: total_local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -178,7 +225,7 @@ fragment InvoiceFragment on Invoice { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_local_balance: local_balance { + lightspark_node_with_remote_signing_local_balance: local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -186,8 +233,7 @@ fragment InvoiceFragment on Invoice { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_purpose: purpose - lightspark_node_remote_balance: remote_balance { + lightspark_node_with_remote_signing_remote_balance: remote_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -195,7 +241,58 @@ fragment InvoiceFragment on Invoice { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_status: status + lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos } } } diff --git a/packages/lightspark-sdk/src/objects/InvoiceData.ts b/packages/lightspark-sdk/src/objects/InvoiceData.ts index 7048f17f1..727551c89 100644 --- a/packages/lightspark-sdk/src/objects/InvoiceData.ts +++ b/packages/lightspark-sdk/src/objects/InvoiceData.ts @@ -85,24 +85,54 @@ fragment InvoiceDataFragment on InvoiceData { graph_node_display_name: display_name graph_node_public_key: public_key } - ... on LightsparkNode { + ... on LightsparkNodeWithOSK { __typename - lightspark_node_id: id - lightspark_node_created_at: created_at - lightspark_node_updated_at: updated_at - lightspark_node_alias: alias - lightspark_node_bitcoin_network: bitcoin_network - lightspark_node_color: color - lightspark_node_conductivity: conductivity - lightspark_node_display_name: display_name - lightspark_node_public_key: public_key - lightspark_node_account: account { + lightspark_node_with_o_s_k_id: id + lightspark_node_with_o_s_k_created_at: created_at + lightspark_node_with_o_s_k_updated_at: updated_at + lightspark_node_with_o_s_k_alias: alias + lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network + lightspark_node_with_o_s_k_color: color + lightspark_node_with_o_s_k_conductivity: conductivity + lightspark_node_with_o_s_k_display_name: display_name + lightspark_node_with_o_s_k_public_key: public_key + lightspark_node_with_o_s_k_owner: owner { id } - lightspark_node_owner: owner { - id + lightspark_node_with_o_s_k_status: status + lightspark_node_with_o_s_k_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_total_local_balance: total_local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_blockchain_balance: blockchain_balance { + lightspark_node_with_o_s_k_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance { __typename blockchain_balance_total_balance: total_balance { __typename @@ -153,12 +183,29 @@ fragment InvoiceDataFragment on InvoiceData { currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } } - lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key { + lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos + lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key { __typename secret_encrypted_value: encrypted_value secret_cipher: cipher } - lightspark_node_total_balance: total_balance { + } + ... on LightsparkNodeWithRemoteSigning { + __typename + lightspark_node_with_remote_signing_id: id + lightspark_node_with_remote_signing_created_at: created_at + lightspark_node_with_remote_signing_updated_at: updated_at + lightspark_node_with_remote_signing_alias: alias + lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network + lightspark_node_with_remote_signing_color: color + lightspark_node_with_remote_signing_conductivity: conductivity + lightspark_node_with_remote_signing_display_name: display_name + lightspark_node_with_remote_signing_public_key: public_key + lightspark_node_with_remote_signing_owner: owner { + id + } + lightspark_node_with_remote_signing_status: status + lightspark_node_with_remote_signing_total_balance: total_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -166,7 +213,7 @@ fragment InvoiceDataFragment on InvoiceData { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_total_local_balance: total_local_balance { + lightspark_node_with_remote_signing_total_local_balance: total_local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -174,7 +221,7 @@ fragment InvoiceDataFragment on InvoiceData { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_local_balance: local_balance { + lightspark_node_with_remote_signing_local_balance: local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -182,8 +229,7 @@ fragment InvoiceDataFragment on InvoiceData { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_purpose: purpose - lightspark_node_remote_balance: remote_balance { + lightspark_node_with_remote_signing_remote_balance: remote_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -191,7 +237,58 @@ fragment InvoiceDataFragment on InvoiceData { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_status: status + lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos } } }`; diff --git a/packages/lightspark-sdk/src/objects/LightningTransaction.ts b/packages/lightspark-sdk/src/objects/LightningTransaction.ts index 166fb36b2..73c391a17 100644 --- a/packages/lightspark-sdk/src/objects/LightningTransaction.ts +++ b/packages/lightspark-sdk/src/objects/LightningTransaction.ts @@ -8,6 +8,7 @@ import IncomingPayment from "./IncomingPayment.js"; import OutgoingPayment from "./OutgoingPayment.js"; import PaymentFailureReason from "./PaymentFailureReason.js"; import { PaymentRequestDataFromJson } from "./PaymentRequestData.js"; +import { PostTransactionDataFromJson } from "./PostTransactionData.js"; import { RichTextFromJson } from "./RichText.js"; import type RoutingTransaction from "./RoutingTransaction.js"; import RoutingTransactionFailureReason from "./RoutingTransactionFailureReason.js"; @@ -60,8 +61,10 @@ export const LightningTransactionFromJson = ( "IncomingPayment", obj["incoming_payment_resolved_at"], obj["incoming_payment_transaction_hash"], - obj["incoming_payment_origin"]?.id ?? undefined, obj["incoming_payment_payment_request"]?.id ?? undefined, + obj["incoming_payment_uma_post_transaction_data"]?.map((e) => + PostTransactionDataFromJson(e), + ), ); } if (obj["__typename"] == "OutgoingPayment") { @@ -92,6 +95,9 @@ export const LightningTransactionFromJson = ( !!obj["outgoing_payment_failure_message"] ? RichTextFromJson(obj["outgoing_payment_failure_message"]) : undefined, + obj["outgoing_payment_uma_post_transaction_data"]?.map((e) => + PostTransactionDataFromJson(e), + ), ); } if (obj["__typename"] == "RoutingTransaction") { @@ -148,15 +154,24 @@ fragment LightningTransactionFragment on LightningTransaction { currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } incoming_payment_transaction_hash: transaction_hash - incoming_payment_origin: origin { - id - } incoming_payment_destination: destination { id } incoming_payment_payment_request: payment_request { id } + incoming_payment_uma_post_transaction_data: uma_post_transaction_data { + __typename + post_transaction_data_utxo: utxo + post_transaction_data_amount: amount { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } } ... on OutgoingPayment { __typename @@ -220,24 +235,54 @@ fragment LightningTransactionFragment on LightningTransaction { graph_node_display_name: display_name graph_node_public_key: public_key } - ... on LightsparkNode { + ... on LightsparkNodeWithOSK { __typename - lightspark_node_id: id - lightspark_node_created_at: created_at - lightspark_node_updated_at: updated_at - lightspark_node_alias: alias - lightspark_node_bitcoin_network: bitcoin_network - lightspark_node_color: color - lightspark_node_conductivity: conductivity - lightspark_node_display_name: display_name - lightspark_node_public_key: public_key - lightspark_node_account: account { + lightspark_node_with_o_s_k_id: id + lightspark_node_with_o_s_k_created_at: created_at + lightspark_node_with_o_s_k_updated_at: updated_at + lightspark_node_with_o_s_k_alias: alias + lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network + lightspark_node_with_o_s_k_color: color + lightspark_node_with_o_s_k_conductivity: conductivity + lightspark_node_with_o_s_k_display_name: display_name + lightspark_node_with_o_s_k_public_key: public_key + lightspark_node_with_o_s_k_owner: owner { id } - lightspark_node_owner: owner { - id + lightspark_node_with_o_s_k_status: status + lightspark_node_with_o_s_k_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_total_local_balance: total_local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_blockchain_balance: blockchain_balance { + lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance { __typename blockchain_balance_total_balance: total_balance { __typename @@ -288,12 +333,29 @@ fragment LightningTransactionFragment on LightningTransaction { currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } } - lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key { + lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos + lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key { __typename secret_encrypted_value: encrypted_value secret_cipher: cipher } - lightspark_node_total_balance: total_balance { + } + ... on LightsparkNodeWithRemoteSigning { + __typename + lightspark_node_with_remote_signing_id: id + lightspark_node_with_remote_signing_created_at: created_at + lightspark_node_with_remote_signing_updated_at: updated_at + lightspark_node_with_remote_signing_alias: alias + lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network + lightspark_node_with_remote_signing_color: color + lightspark_node_with_remote_signing_conductivity: conductivity + lightspark_node_with_remote_signing_display_name: display_name + lightspark_node_with_remote_signing_public_key: public_key + lightspark_node_with_remote_signing_owner: owner { + id + } + lightspark_node_with_remote_signing_status: status + lightspark_node_with_remote_signing_total_balance: total_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -301,7 +363,7 @@ fragment LightningTransactionFragment on LightningTransaction { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_total_local_balance: total_local_balance { + lightspark_node_with_remote_signing_total_local_balance: total_local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -309,7 +371,7 @@ fragment LightningTransactionFragment on LightningTransaction { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_local_balance: local_balance { + lightspark_node_with_remote_signing_local_balance: local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -317,8 +379,7 @@ fragment LightningTransactionFragment on LightningTransaction { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_purpose: purpose - lightspark_node_remote_balance: remote_balance { + lightspark_node_with_remote_signing_remote_balance: remote_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -326,7 +387,58 @@ fragment LightningTransactionFragment on LightningTransaction { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_status: status + lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos } } } @@ -336,6 +448,18 @@ fragment LightningTransactionFragment on LightningTransaction { __typename rich_text_text: text } + outgoing_payment_uma_post_transaction_data: uma_post_transaction_data { + __typename + post_transaction_data_utxo: utxo + post_transaction_data_amount: amount { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } } ... on RoutingTransaction { __typename diff --git a/packages/lightspark-sdk/src/objects/LightsparkNode.ts b/packages/lightspark-sdk/src/objects/LightsparkNode.ts index 40078310d..655f480e1 100644 --- a/packages/lightspark-sdk/src/objects/LightsparkNode.ts +++ b/packages/lightspark-sdk/src/objects/LightsparkNode.ts @@ -1,6 +1,6 @@ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved -import { type Query } from "@lightsparkdev/core"; +import { LightsparkException, type Query } from "@lightsparkdev/core"; import autoBind from "auto-bind"; import type LightsparkClient from "../client.js"; import BitcoinNetwork from "./BitcoinNetwork.js"; @@ -9,18 +9,18 @@ import { BlockchainBalanceFromJson } from "./BlockchainBalance.js"; import type ChannelStatus from "./ChannelStatus.js"; import type CurrencyAmount from "./CurrencyAmount.js"; import { CurrencyAmountFromJson } from "./CurrencyAmount.js"; -import LightsparkNodePurpose from "./LightsparkNodePurpose.js"; import LightsparkNodeStatus from "./LightsparkNodeStatus.js"; import type LightsparkNodeToChannelsConnection from "./LightsparkNodeToChannelsConnection.js"; import { LightsparkNodeToChannelsConnectionFromJson } from "./LightsparkNodeToChannelsConnection.js"; +import LightsparkNodeWithOSK from "./LightsparkNodeWithOSK.js"; +import LightsparkNodeWithRemoteSigning from "./LightsparkNodeWithRemoteSigning.js"; import type Node from "./Node.js"; import type NodeAddressType from "./NodeAddressType.js"; import type NodeToAddressesConnection from "./NodeToAddressesConnection.js"; import { NodeToAddressesConnectionFromJson } from "./NodeToAddressesConnection.js"; -import type Secret from "./Secret.js"; import { SecretFromJson } from "./Secret.js"; -/** This is a node that is managed by Lightspark and is managed within the current connected account. It contains many details about the node configuration, state, and metadata. **/ +/** This is an object representing a node managed by Lightspark and owned by the current connected account. This object contains information about the node’s configuration, state, and metadata. **/ class LightsparkNode implements Node { constructor( public readonly id: string, @@ -28,21 +28,19 @@ class LightsparkNode implements Node { public readonly updatedAt: string, public readonly bitcoinNetwork: BitcoinNetwork, public readonly displayName: string, - public readonly accountId: string, public readonly ownerId: string, + public readonly umaPrescreeningUtxos: string[], public readonly typename: string, public readonly alias?: string, public readonly color?: string, public readonly conductivity?: number, public readonly publicKey?: string, - public readonly blockchainBalance?: BlockchainBalance, - public readonly encryptedSigningPrivateKey?: Secret, + public readonly status?: LightsparkNodeStatus, public readonly totalBalance?: CurrencyAmount, public readonly totalLocalBalance?: CurrencyAmount, public readonly localBalance?: CurrencyAmount, - public readonly purpose?: LightsparkNodePurpose, public readonly remoteBalance?: CurrencyAmount, - public readonly status?: LightsparkNodeStatus, + public readonly blockchainBalance?: BlockchainBalance, ) { autoBind(this); } @@ -231,70 +229,130 @@ ${FRAGMENT} } export const LightsparkNodeFromJson = (obj: any): LightsparkNode => { - return new LightsparkNode( - obj["lightspark_node_id"], - obj["lightspark_node_created_at"], - obj["lightspark_node_updated_at"], - BitcoinNetwork[obj["lightspark_node_bitcoin_network"]] ?? - BitcoinNetwork.FUTURE_VALUE, - obj["lightspark_node_display_name"], - obj["lightspark_node_account"].id, - obj["lightspark_node_owner"].id, - "LightsparkNode", - obj["lightspark_node_alias"], - obj["lightspark_node_color"], - obj["lightspark_node_conductivity"], - obj["lightspark_node_public_key"], - !!obj["lightspark_node_blockchain_balance"] - ? BlockchainBalanceFromJson(obj["lightspark_node_blockchain_balance"]) - : undefined, - !!obj["lightspark_node_encrypted_signing_private_key"] - ? SecretFromJson(obj["lightspark_node_encrypted_signing_private_key"]) - : undefined, - !!obj["lightspark_node_total_balance"] - ? CurrencyAmountFromJson(obj["lightspark_node_total_balance"]) - : undefined, - !!obj["lightspark_node_total_local_balance"] - ? CurrencyAmountFromJson(obj["lightspark_node_total_local_balance"]) - : undefined, - !!obj["lightspark_node_local_balance"] - ? CurrencyAmountFromJson(obj["lightspark_node_local_balance"]) - : undefined, - !!obj["lightspark_node_purpose"] - ? LightsparkNodePurpose[obj["lightspark_node_purpose"]] ?? - LightsparkNodePurpose.FUTURE_VALUE - : null, - !!obj["lightspark_node_remote_balance"] - ? CurrencyAmountFromJson(obj["lightspark_node_remote_balance"]) - : undefined, - !!obj["lightspark_node_status"] - ? LightsparkNodeStatus[obj["lightspark_node_status"]] ?? - LightsparkNodeStatus.FUTURE_VALUE - : null, + if (obj["__typename"] == "LightsparkNodeWithOSK") { + return new LightsparkNodeWithOSK( + obj["lightspark_node_with_o_s_k_id"], + obj["lightspark_node_with_o_s_k_created_at"], + obj["lightspark_node_with_o_s_k_updated_at"], + BitcoinNetwork[obj["lightspark_node_with_o_s_k_bitcoin_network"]] ?? + BitcoinNetwork.FUTURE_VALUE, + obj["lightspark_node_with_o_s_k_display_name"], + obj["lightspark_node_with_o_s_k_owner"].id, + obj["lightspark_node_with_o_s_k_uma_prescreening_utxos"], + "LightsparkNodeWithOSK", + obj["lightspark_node_with_o_s_k_alias"], + obj["lightspark_node_with_o_s_k_color"], + obj["lightspark_node_with_o_s_k_conductivity"], + obj["lightspark_node_with_o_s_k_public_key"], + !!obj["lightspark_node_with_o_s_k_status"] + ? LightsparkNodeStatus[obj["lightspark_node_with_o_s_k_status"]] ?? + LightsparkNodeStatus.FUTURE_VALUE + : null, + !!obj["lightspark_node_with_o_s_k_total_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_o_s_k_total_balance"], + ) + : undefined, + !!obj["lightspark_node_with_o_s_k_total_local_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_o_s_k_total_local_balance"], + ) + : undefined, + !!obj["lightspark_node_with_o_s_k_local_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_o_s_k_local_balance"], + ) + : undefined, + !!obj["lightspark_node_with_o_s_k_remote_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_o_s_k_remote_balance"], + ) + : undefined, + !!obj["lightspark_node_with_o_s_k_blockchain_balance"] + ? BlockchainBalanceFromJson( + obj["lightspark_node_with_o_s_k_blockchain_balance"], + ) + : undefined, + !!obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"] + ? SecretFromJson( + obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"], + ) + : undefined, + ); + } + if (obj["__typename"] == "LightsparkNodeWithRemoteSigning") { + return new LightsparkNodeWithRemoteSigning( + obj["lightspark_node_with_remote_signing_id"], + obj["lightspark_node_with_remote_signing_created_at"], + obj["lightspark_node_with_remote_signing_updated_at"], + BitcoinNetwork[ + obj["lightspark_node_with_remote_signing_bitcoin_network"] + ] ?? BitcoinNetwork.FUTURE_VALUE, + obj["lightspark_node_with_remote_signing_display_name"], + obj["lightspark_node_with_remote_signing_owner"].id, + obj["lightspark_node_with_remote_signing_uma_prescreening_utxos"], + "LightsparkNodeWithRemoteSigning", + obj["lightspark_node_with_remote_signing_alias"], + obj["lightspark_node_with_remote_signing_color"], + obj["lightspark_node_with_remote_signing_conductivity"], + obj["lightspark_node_with_remote_signing_public_key"], + !!obj["lightspark_node_with_remote_signing_status"] + ? LightsparkNodeStatus[ + obj["lightspark_node_with_remote_signing_status"] + ] ?? LightsparkNodeStatus.FUTURE_VALUE + : null, + !!obj["lightspark_node_with_remote_signing_total_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_remote_signing_total_balance"], + ) + : undefined, + !!obj["lightspark_node_with_remote_signing_total_local_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_remote_signing_total_local_balance"], + ) + : undefined, + !!obj["lightspark_node_with_remote_signing_local_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_remote_signing_local_balance"], + ) + : undefined, + !!obj["lightspark_node_with_remote_signing_remote_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_remote_signing_remote_balance"], + ) + : undefined, + !!obj["lightspark_node_with_remote_signing_blockchain_balance"] + ? BlockchainBalanceFromJson( + obj["lightspark_node_with_remote_signing_blockchain_balance"], + ) + : undefined, + ); + } + throw new LightsparkException( + "DeserializationError", + `Couldn't find a concrete type for interface LightsparkNode corresponding to the typename=${obj["__typename"]}`, ); }; export const FRAGMENT = ` fragment LightsparkNodeFragment on LightsparkNode { __typename - lightspark_node_id: id - lightspark_node_created_at: created_at - lightspark_node_updated_at: updated_at - lightspark_node_alias: alias - lightspark_node_bitcoin_network: bitcoin_network - lightspark_node_color: color - lightspark_node_conductivity: conductivity - lightspark_node_display_name: display_name - lightspark_node_public_key: public_key - lightspark_node_account: account { - id - } - lightspark_node_owner: owner { - id - } - lightspark_node_blockchain_balance: blockchain_balance { + ... on LightsparkNodeWithOSK { __typename - blockchain_balance_total_balance: total_balance { + lightspark_node_with_o_s_k_id: id + lightspark_node_with_o_s_k_created_at: created_at + lightspark_node_with_o_s_k_updated_at: updated_at + lightspark_node_with_o_s_k_alias: alias + lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network + lightspark_node_with_o_s_k_color: color + lightspark_node_with_o_s_k_conductivity: conductivity + lightspark_node_with_o_s_k_display_name: display_name + lightspark_node_with_o_s_k_public_key: public_key + lightspark_node_with_o_s_k_owner: owner { + id + } + lightspark_node_with_o_s_k_status: status + lightspark_node_with_o_s_k_total_balance: total_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -302,7 +360,7 @@ fragment LightsparkNodeFragment on LightsparkNode { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - blockchain_balance_confirmed_balance: confirmed_balance { + lightspark_node_with_o_s_k_total_local_balance: total_local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -310,7 +368,7 @@ fragment LightsparkNodeFragment on LightsparkNode { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - blockchain_balance_unconfirmed_balance: unconfirmed_balance { + lightspark_node_with_o_s_k_local_balance: local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -318,7 +376,7 @@ fragment LightsparkNodeFragment on LightsparkNode { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - blockchain_balance_locked_balance: locked_balance { + lightspark_node_with_o_s_k_remote_balance: remote_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -326,7 +384,80 @@ fragment LightsparkNodeFragment on LightsparkNode { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - blockchain_balance_required_reserve: required_reserve { + lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos + lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key { + __typename + secret_encrypted_value: encrypted_value + secret_cipher: cipher + } + } + ... on LightsparkNodeWithRemoteSigning { + __typename + lightspark_node_with_remote_signing_id: id + lightspark_node_with_remote_signing_created_at: created_at + lightspark_node_with_remote_signing_updated_at: updated_at + lightspark_node_with_remote_signing_alias: alias + lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network + lightspark_node_with_remote_signing_color: color + lightspark_node_with_remote_signing_conductivity: conductivity + lightspark_node_with_remote_signing_display_name: display_name + lightspark_node_with_remote_signing_public_key: public_key + lightspark_node_with_remote_signing_owner: owner { + id + } + lightspark_node_with_remote_signing_status: status + lightspark_node_with_remote_signing_total_balance: total_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -334,7 +465,7 @@ fragment LightsparkNodeFragment on LightsparkNode { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - blockchain_balance_available_balance: available_balance { + lightspark_node_with_remote_signing_total_local_balance: total_local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -342,46 +473,75 @@ fragment LightsparkNodeFragment on LightsparkNode { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } + lightspark_node_with_remote_signing_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_remote_signing_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos } - lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key { - __typename - secret_encrypted_value: encrypted_value - secret_cipher: cipher - } - lightspark_node_total_balance: total_balance { - __typename - currency_amount_original_value: original_value - currency_amount_original_unit: original_unit - currency_amount_preferred_currency_unit: preferred_currency_unit - currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded - currency_amount_preferred_currency_value_approx: preferred_currency_value_approx - } - lightspark_node_total_local_balance: total_local_balance { - __typename - currency_amount_original_value: original_value - currency_amount_original_unit: original_unit - currency_amount_preferred_currency_unit: preferred_currency_unit - currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded - currency_amount_preferred_currency_value_approx: preferred_currency_value_approx - } - lightspark_node_local_balance: local_balance { - __typename - currency_amount_original_value: original_value - currency_amount_original_unit: original_unit - currency_amount_preferred_currency_unit: preferred_currency_unit - currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded - currency_amount_preferred_currency_value_approx: preferred_currency_value_approx - } - lightspark_node_purpose: purpose - lightspark_node_remote_balance: remote_balance { - __typename - currency_amount_original_value: original_value - currency_amount_original_unit: original_unit - currency_amount_preferred_currency_unit: preferred_currency_unit - currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded - currency_amount_preferred_currency_value_approx: preferred_currency_value_approx - } - lightspark_node_status: status }`; export default LightsparkNode; diff --git a/packages/lightspark-sdk/src/objects/LightsparkNodeOwner.ts b/packages/lightspark-sdk/src/objects/LightsparkNodeOwner.ts index 3ac293584..0594f07ac 100644 --- a/packages/lightspark-sdk/src/objects/LightsparkNodeOwner.ts +++ b/packages/lightspark-sdk/src/objects/LightsparkNodeOwner.ts @@ -47,6 +47,7 @@ export const LightsparkNodeOwnerFromJson = (obj: any): LightsparkNodeOwner => { !!obj["wallet_balances"] ? BalancesFromJson(obj["wallet_balances"]) : undefined, + obj["wallet_account"]?.id ?? undefined, ); } throw new LightsparkException( @@ -99,6 +100,9 @@ fragment LightsparkNodeOwnerFragment on LightsparkNodeOwner { } } wallet_third_party_identifier: third_party_identifier + wallet_account: account { + id + } wallet_status: status } }`; diff --git a/packages/lightspark-sdk/src/objects/LightsparkNodeWithOSK.ts b/packages/lightspark-sdk/src/objects/LightsparkNodeWithOSK.ts new file mode 100644 index 000000000..92dcdfe6c --- /dev/null +++ b/packages/lightspark-sdk/src/objects/LightsparkNodeWithOSK.ts @@ -0,0 +1,389 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +import { type Query } from "@lightsparkdev/core"; +import autoBind from "auto-bind"; +import type LightsparkClient from "../client.js"; +import BitcoinNetwork from "./BitcoinNetwork.js"; +import type BlockchainBalance from "./BlockchainBalance.js"; +import { BlockchainBalanceFromJson } from "./BlockchainBalance.js"; +import type ChannelStatus from "./ChannelStatus.js"; +import type CurrencyAmount from "./CurrencyAmount.js"; +import { CurrencyAmountFromJson } from "./CurrencyAmount.js"; +import type LightsparkNode from "./LightsparkNode.js"; +import LightsparkNodeStatus from "./LightsparkNodeStatus.js"; +import type LightsparkNodeToChannelsConnection from "./LightsparkNodeToChannelsConnection.js"; +import { LightsparkNodeToChannelsConnectionFromJson } from "./LightsparkNodeToChannelsConnection.js"; +import type NodeAddressType from "./NodeAddressType.js"; +import type NodeToAddressesConnection from "./NodeToAddressesConnection.js"; +import { NodeToAddressesConnectionFromJson } from "./NodeToAddressesConnection.js"; +import type Secret from "./Secret.js"; +import { SecretFromJson } from "./Secret.js"; + +/** This is a Lightspark node with OSK. **/ +class LightsparkNodeWithOSK implements LightsparkNode { + constructor( + public readonly id: string, + public readonly createdAt: string, + public readonly updatedAt: string, + public readonly bitcoinNetwork: BitcoinNetwork, + public readonly displayName: string, + public readonly ownerId: string, + public readonly umaPrescreeningUtxos: string[], + public readonly typename: string, + public readonly alias?: string, + public readonly color?: string, + public readonly conductivity?: number, + public readonly publicKey?: string, + public readonly status?: LightsparkNodeStatus, + public readonly totalBalance?: CurrencyAmount, + public readonly totalLocalBalance?: CurrencyAmount, + public readonly localBalance?: CurrencyAmount, + public readonly remoteBalance?: CurrencyAmount, + public readonly blockchainBalance?: BlockchainBalance, + public readonly encryptedSigningPrivateKey?: Secret, + ) { + autoBind(this); + } + + public async getAddresses( + client: LightsparkClient, + first: number | undefined = undefined, + types: NodeAddressType[] | undefined = undefined, + ): Promise { + return (await client.executeRawQuery({ + queryPayload: ` +query FetchNodeToAddressesConnection($entity_id: ID!, $first: Int, $types: [NodeAddressType!]) { + entity(id: $entity_id) { + ... on LightsparkNodeWithOSK { + addresses(, first: $first, types: $types) { + __typename + node_to_addresses_connection_count: count + node_to_addresses_connection_entities: entities { + __typename + node_address_address: address + node_address_type: type + } + } + } + } +} +`, + variables: { entity_id: this.id, first: first, types: types }, + constructObject: (json) => { + const connection = json["entity"]["addresses"]; + return NodeToAddressesConnectionFromJson(connection); + }, + }))!; + } + + public async getChannels( + client: LightsparkClient, + first: number | undefined = undefined, + statuses: ChannelStatus[] | undefined = undefined, + after: string | undefined = undefined, + ): Promise { + return (await client.executeRawQuery({ + queryPayload: ` +query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $statuses: [ChannelStatus!], $after: String) { + entity(id: $entity_id) { + ... on LightsparkNodeWithOSK { + channels(, first: $first, statuses: $statuses, after: $after) { + __typename + lightspark_node_to_channels_connection_count: count + lightspark_node_to_channels_connection_page_info: page_info { + __typename + page_info_has_next_page: has_next_page + page_info_has_previous_page: has_previous_page + page_info_start_cursor: start_cursor + page_info_end_cursor: end_cursor + } + lightspark_node_to_channels_connection_entities: entities { + __typename + channel_id: id + channel_created_at: created_at + channel_updated_at: updated_at + channel_funding_transaction: funding_transaction { + id + } + channel_capacity: capacity { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + channel_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + channel_local_unsettled_balance: local_unsettled_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + channel_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + channel_remote_unsettled_balance: remote_unsettled_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + channel_unsettled_balance: unsettled_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + channel_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + channel_status: status + channel_estimated_force_closure_wait_minutes: estimated_force_closure_wait_minutes + channel_commit_fee: commit_fee { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + channel_fees: fees { + __typename + channel_fees_base_fee: base_fee { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + channel_fees_fee_rate_per_mil: fee_rate_per_mil + } + channel_remote_node: remote_node { + id + } + channel_local_node: local_node { + id + } + channel_short_channel_id: short_channel_id + } + } + } + } +} +`, + variables: { + entity_id: this.id, + first: first, + statuses: statuses, + after: after, + }, + constructObject: (json) => { + const connection = json["entity"]["channels"]; + return LightsparkNodeToChannelsConnectionFromJson(connection); + }, + }))!; + } + + static getLightsparkNodeWithOSKQuery( + id: string, + ): Query { + return { + queryPayload: ` +query GetLightsparkNodeWithOSK($id: ID!) { + entity(id: $id) { + ... on LightsparkNodeWithOSK { + ...LightsparkNodeWithOSKFragment + } + } +} + +${FRAGMENT} +`, + variables: { id }, + constructObject: (data: any) => + LightsparkNodeWithOSKFromJson(data.entity), + }; + } +} + +export const LightsparkNodeWithOSKFromJson = ( + obj: any, +): LightsparkNodeWithOSK => { + return new LightsparkNodeWithOSK( + obj["lightspark_node_with_o_s_k_id"], + obj["lightspark_node_with_o_s_k_created_at"], + obj["lightspark_node_with_o_s_k_updated_at"], + BitcoinNetwork[obj["lightspark_node_with_o_s_k_bitcoin_network"]] ?? + BitcoinNetwork.FUTURE_VALUE, + obj["lightspark_node_with_o_s_k_display_name"], + obj["lightspark_node_with_o_s_k_owner"].id, + obj["lightspark_node_with_o_s_k_uma_prescreening_utxos"], + "LightsparkNodeWithOSK", + obj["lightspark_node_with_o_s_k_alias"], + obj["lightspark_node_with_o_s_k_color"], + obj["lightspark_node_with_o_s_k_conductivity"], + obj["lightspark_node_with_o_s_k_public_key"], + !!obj["lightspark_node_with_o_s_k_status"] + ? LightsparkNodeStatus[obj["lightspark_node_with_o_s_k_status"]] ?? + LightsparkNodeStatus.FUTURE_VALUE + : null, + !!obj["lightspark_node_with_o_s_k_total_balance"] + ? CurrencyAmountFromJson(obj["lightspark_node_with_o_s_k_total_balance"]) + : undefined, + !!obj["lightspark_node_with_o_s_k_total_local_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_o_s_k_total_local_balance"], + ) + : undefined, + !!obj["lightspark_node_with_o_s_k_local_balance"] + ? CurrencyAmountFromJson(obj["lightspark_node_with_o_s_k_local_balance"]) + : undefined, + !!obj["lightspark_node_with_o_s_k_remote_balance"] + ? CurrencyAmountFromJson(obj["lightspark_node_with_o_s_k_remote_balance"]) + : undefined, + !!obj["lightspark_node_with_o_s_k_blockchain_balance"] + ? BlockchainBalanceFromJson( + obj["lightspark_node_with_o_s_k_blockchain_balance"], + ) + : undefined, + !!obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"] + ? SecretFromJson( + obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"], + ) + : undefined, + ); +}; + +export const FRAGMENT = ` +fragment LightsparkNodeWithOSKFragment on LightsparkNodeWithOSK { + __typename + lightspark_node_with_o_s_k_id: id + lightspark_node_with_o_s_k_created_at: created_at + lightspark_node_with_o_s_k_updated_at: updated_at + lightspark_node_with_o_s_k_alias: alias + lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network + lightspark_node_with_o_s_k_color: color + lightspark_node_with_o_s_k_conductivity: conductivity + lightspark_node_with_o_s_k_display_name: display_name + lightspark_node_with_o_s_k_public_key: public_key + lightspark_node_with_o_s_k_owner: owner { + id + } + lightspark_node_with_o_s_k_status: status + lightspark_node_with_o_s_k_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_total_local_balance: total_local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos + lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key { + __typename + secret_encrypted_value: encrypted_value + secret_cipher: cipher + } +}`; + +export default LightsparkNodeWithOSK; diff --git a/packages/lightspark-sdk/src/objects/LightsparkNodeWithRemoteSigning.ts b/packages/lightspark-sdk/src/objects/LightsparkNodeWithRemoteSigning.ts new file mode 100644 index 000000000..f41c1e196 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/LightsparkNodeWithRemoteSigning.ts @@ -0,0 +1,384 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +import { type Query } from "@lightsparkdev/core"; +import autoBind from "auto-bind"; +import type LightsparkClient from "../client.js"; +import BitcoinNetwork from "./BitcoinNetwork.js"; +import type BlockchainBalance from "./BlockchainBalance.js"; +import { BlockchainBalanceFromJson } from "./BlockchainBalance.js"; +import type ChannelStatus from "./ChannelStatus.js"; +import type CurrencyAmount from "./CurrencyAmount.js"; +import { CurrencyAmountFromJson } from "./CurrencyAmount.js"; +import type LightsparkNode from "./LightsparkNode.js"; +import LightsparkNodeStatus from "./LightsparkNodeStatus.js"; +import type LightsparkNodeToChannelsConnection from "./LightsparkNodeToChannelsConnection.js"; +import { LightsparkNodeToChannelsConnectionFromJson } from "./LightsparkNodeToChannelsConnection.js"; +import type NodeAddressType from "./NodeAddressType.js"; +import type NodeToAddressesConnection from "./NodeToAddressesConnection.js"; +import { NodeToAddressesConnectionFromJson } from "./NodeToAddressesConnection.js"; + +/** This is a Lightspark node with remote signing. **/ +class LightsparkNodeWithRemoteSigning implements LightsparkNode { + constructor( + public readonly id: string, + public readonly createdAt: string, + public readonly updatedAt: string, + public readonly bitcoinNetwork: BitcoinNetwork, + public readonly displayName: string, + public readonly ownerId: string, + public readonly umaPrescreeningUtxos: string[], + public readonly typename: string, + public readonly alias?: string, + public readonly color?: string, + public readonly conductivity?: number, + public readonly publicKey?: string, + public readonly status?: LightsparkNodeStatus, + public readonly totalBalance?: CurrencyAmount, + public readonly totalLocalBalance?: CurrencyAmount, + public readonly localBalance?: CurrencyAmount, + public readonly remoteBalance?: CurrencyAmount, + public readonly blockchainBalance?: BlockchainBalance, + ) { + autoBind(this); + } + + public async getAddresses( + client: LightsparkClient, + first: number | undefined = undefined, + types: NodeAddressType[] | undefined = undefined, + ): Promise { + return (await client.executeRawQuery({ + queryPayload: ` +query FetchNodeToAddressesConnection($entity_id: ID!, $first: Int, $types: [NodeAddressType!]) { + entity(id: $entity_id) { + ... on LightsparkNodeWithRemoteSigning { + addresses(, first: $first, types: $types) { + __typename + node_to_addresses_connection_count: count + node_to_addresses_connection_entities: entities { + __typename + node_address_address: address + node_address_type: type + } + } + } + } +} +`, + variables: { entity_id: this.id, first: first, types: types }, + constructObject: (json) => { + const connection = json["entity"]["addresses"]; + return NodeToAddressesConnectionFromJson(connection); + }, + }))!; + } + + public async getChannels( + client: LightsparkClient, + first: number | undefined = undefined, + statuses: ChannelStatus[] | undefined = undefined, + after: string | undefined = undefined, + ): Promise { + return (await client.executeRawQuery({ + queryPayload: ` +query FetchLightsparkNodeToChannelsConnection($entity_id: ID!, $first: Int, $statuses: [ChannelStatus!], $after: String) { + entity(id: $entity_id) { + ... on LightsparkNodeWithRemoteSigning { + channels(, first: $first, statuses: $statuses, after: $after) { + __typename + lightspark_node_to_channels_connection_count: count + lightspark_node_to_channels_connection_page_info: page_info { + __typename + page_info_has_next_page: has_next_page + page_info_has_previous_page: has_previous_page + page_info_start_cursor: start_cursor + page_info_end_cursor: end_cursor + } + lightspark_node_to_channels_connection_entities: entities { + __typename + channel_id: id + channel_created_at: created_at + channel_updated_at: updated_at + channel_funding_transaction: funding_transaction { + id + } + channel_capacity: capacity { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + channel_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + channel_local_unsettled_balance: local_unsettled_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + channel_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + channel_remote_unsettled_balance: remote_unsettled_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + channel_unsettled_balance: unsettled_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + channel_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + channel_status: status + channel_estimated_force_closure_wait_minutes: estimated_force_closure_wait_minutes + channel_commit_fee: commit_fee { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + channel_fees: fees { + __typename + channel_fees_base_fee: base_fee { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + channel_fees_fee_rate_per_mil: fee_rate_per_mil + } + channel_remote_node: remote_node { + id + } + channel_local_node: local_node { + id + } + channel_short_channel_id: short_channel_id + } + } + } + } +} +`, + variables: { + entity_id: this.id, + first: first, + statuses: statuses, + after: after, + }, + constructObject: (json) => { + const connection = json["entity"]["channels"]; + return LightsparkNodeToChannelsConnectionFromJson(connection); + }, + }))!; + } + + static getLightsparkNodeWithRemoteSigningQuery( + id: string, + ): Query { + return { + queryPayload: ` +query GetLightsparkNodeWithRemoteSigning($id: ID!) { + entity(id: $id) { + ... on LightsparkNodeWithRemoteSigning { + ...LightsparkNodeWithRemoteSigningFragment + } + } +} + +${FRAGMENT} +`, + variables: { id }, + constructObject: (data: any) => + LightsparkNodeWithRemoteSigningFromJson(data.entity), + }; + } +} + +export const LightsparkNodeWithRemoteSigningFromJson = ( + obj: any, +): LightsparkNodeWithRemoteSigning => { + return new LightsparkNodeWithRemoteSigning( + obj["lightspark_node_with_remote_signing_id"], + obj["lightspark_node_with_remote_signing_created_at"], + obj["lightspark_node_with_remote_signing_updated_at"], + BitcoinNetwork[ + obj["lightspark_node_with_remote_signing_bitcoin_network"] + ] ?? BitcoinNetwork.FUTURE_VALUE, + obj["lightspark_node_with_remote_signing_display_name"], + obj["lightspark_node_with_remote_signing_owner"].id, + obj["lightspark_node_with_remote_signing_uma_prescreening_utxos"], + "LightsparkNodeWithRemoteSigning", + obj["lightspark_node_with_remote_signing_alias"], + obj["lightspark_node_with_remote_signing_color"], + obj["lightspark_node_with_remote_signing_conductivity"], + obj["lightspark_node_with_remote_signing_public_key"], + !!obj["lightspark_node_with_remote_signing_status"] + ? LightsparkNodeStatus[ + obj["lightspark_node_with_remote_signing_status"] + ] ?? LightsparkNodeStatus.FUTURE_VALUE + : null, + !!obj["lightspark_node_with_remote_signing_total_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_remote_signing_total_balance"], + ) + : undefined, + !!obj["lightspark_node_with_remote_signing_total_local_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_remote_signing_total_local_balance"], + ) + : undefined, + !!obj["lightspark_node_with_remote_signing_local_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_remote_signing_local_balance"], + ) + : undefined, + !!obj["lightspark_node_with_remote_signing_remote_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_remote_signing_remote_balance"], + ) + : undefined, + !!obj["lightspark_node_with_remote_signing_blockchain_balance"] + ? BlockchainBalanceFromJson( + obj["lightspark_node_with_remote_signing_blockchain_balance"], + ) + : undefined, + ); +}; + +export const FRAGMENT = ` +fragment LightsparkNodeWithRemoteSigningFragment on LightsparkNodeWithRemoteSigning { + __typename + lightspark_node_with_remote_signing_id: id + lightspark_node_with_remote_signing_created_at: created_at + lightspark_node_with_remote_signing_updated_at: updated_at + lightspark_node_with_remote_signing_alias: alias + lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network + lightspark_node_with_remote_signing_color: color + lightspark_node_with_remote_signing_conductivity: conductivity + lightspark_node_with_remote_signing_display_name: display_name + lightspark_node_with_remote_signing_public_key: public_key + lightspark_node_with_remote_signing_owner: owner { + id + } + lightspark_node_with_remote_signing_status: status + lightspark_node_with_remote_signing_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_remote_signing_total_local_balance: total_local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_remote_signing_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_remote_signing_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos +}`; + +export default LightsparkNodeWithRemoteSigning; diff --git a/packages/lightspark-sdk/src/objects/Node.ts b/packages/lightspark-sdk/src/objects/Node.ts index 7d028e3e3..ef612ad6b 100644 --- a/packages/lightspark-sdk/src/objects/Node.ts +++ b/packages/lightspark-sdk/src/objects/Node.ts @@ -8,9 +8,9 @@ import { BlockchainBalanceFromJson } from "./BlockchainBalance.js"; import { CurrencyAmountFromJson } from "./CurrencyAmount.js"; import type Entity from "./Entity.js"; import GraphNode from "./GraphNode.js"; -import LightsparkNode from "./LightsparkNode.js"; -import LightsparkNodePurpose from "./LightsparkNodePurpose.js"; import LightsparkNodeStatus from "./LightsparkNodeStatus.js"; +import LightsparkNodeWithOSK from "./LightsparkNodeWithOSK.js"; +import LightsparkNodeWithRemoteSigning from "./LightsparkNodeWithRemoteSigning.js"; import type NodeAddressType from "./NodeAddressType.js"; import type NodeToAddressesConnection from "./NodeToAddressesConnection.js"; import { NodeToAddressesConnectionFromJson } from "./NodeToAddressesConnection.js"; @@ -99,47 +99,103 @@ export const NodeFromJson = (obj: any): Node => { obj["graph_node_public_key"], ); } - if (obj["__typename"] == "LightsparkNode") { - return new LightsparkNode( - obj["lightspark_node_id"], - obj["lightspark_node_created_at"], - obj["lightspark_node_updated_at"], - BitcoinNetwork[obj["lightspark_node_bitcoin_network"]] ?? + if (obj["__typename"] == "LightsparkNodeWithOSK") { + return new LightsparkNodeWithOSK( + obj["lightspark_node_with_o_s_k_id"], + obj["lightspark_node_with_o_s_k_created_at"], + obj["lightspark_node_with_o_s_k_updated_at"], + BitcoinNetwork[obj["lightspark_node_with_o_s_k_bitcoin_network"]] ?? BitcoinNetwork.FUTURE_VALUE, - obj["lightspark_node_display_name"], - obj["lightspark_node_account"].id, - obj["lightspark_node_owner"].id, - "LightsparkNode", - obj["lightspark_node_alias"], - obj["lightspark_node_color"], - obj["lightspark_node_conductivity"], - obj["lightspark_node_public_key"], - !!obj["lightspark_node_blockchain_balance"] - ? BlockchainBalanceFromJson(obj["lightspark_node_blockchain_balance"]) + obj["lightspark_node_with_o_s_k_display_name"], + obj["lightspark_node_with_o_s_k_owner"].id, + obj["lightspark_node_with_o_s_k_uma_prescreening_utxos"], + "LightsparkNodeWithOSK", + obj["lightspark_node_with_o_s_k_alias"], + obj["lightspark_node_with_o_s_k_color"], + obj["lightspark_node_with_o_s_k_conductivity"], + obj["lightspark_node_with_o_s_k_public_key"], + !!obj["lightspark_node_with_o_s_k_status"] + ? LightsparkNodeStatus[obj["lightspark_node_with_o_s_k_status"]] ?? + LightsparkNodeStatus.FUTURE_VALUE + : null, + !!obj["lightspark_node_with_o_s_k_total_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_o_s_k_total_balance"], + ) : undefined, - !!obj["lightspark_node_encrypted_signing_private_key"] - ? SecretFromJson(obj["lightspark_node_encrypted_signing_private_key"]) + !!obj["lightspark_node_with_o_s_k_total_local_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_o_s_k_total_local_balance"], + ) : undefined, - !!obj["lightspark_node_total_balance"] - ? CurrencyAmountFromJson(obj["lightspark_node_total_balance"]) + !!obj["lightspark_node_with_o_s_k_local_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_o_s_k_local_balance"], + ) : undefined, - !!obj["lightspark_node_total_local_balance"] - ? CurrencyAmountFromJson(obj["lightspark_node_total_local_balance"]) + !!obj["lightspark_node_with_o_s_k_remote_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_o_s_k_remote_balance"], + ) : undefined, - !!obj["lightspark_node_local_balance"] - ? CurrencyAmountFromJson(obj["lightspark_node_local_balance"]) + !!obj["lightspark_node_with_o_s_k_blockchain_balance"] + ? BlockchainBalanceFromJson( + obj["lightspark_node_with_o_s_k_blockchain_balance"], + ) : undefined, - !!obj["lightspark_node_purpose"] - ? LightsparkNodePurpose[obj["lightspark_node_purpose"]] ?? - LightsparkNodePurpose.FUTURE_VALUE - : null, - !!obj["lightspark_node_remote_balance"] - ? CurrencyAmountFromJson(obj["lightspark_node_remote_balance"]) + !!obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"] + ? SecretFromJson( + obj["lightspark_node_with_o_s_k_encrypted_signing_private_key"], + ) : undefined, - !!obj["lightspark_node_status"] - ? LightsparkNodeStatus[obj["lightspark_node_status"]] ?? - LightsparkNodeStatus.FUTURE_VALUE + ); + } + if (obj["__typename"] == "LightsparkNodeWithRemoteSigning") { + return new LightsparkNodeWithRemoteSigning( + obj["lightspark_node_with_remote_signing_id"], + obj["lightspark_node_with_remote_signing_created_at"], + obj["lightspark_node_with_remote_signing_updated_at"], + BitcoinNetwork[ + obj["lightspark_node_with_remote_signing_bitcoin_network"] + ] ?? BitcoinNetwork.FUTURE_VALUE, + obj["lightspark_node_with_remote_signing_display_name"], + obj["lightspark_node_with_remote_signing_owner"].id, + obj["lightspark_node_with_remote_signing_uma_prescreening_utxos"], + "LightsparkNodeWithRemoteSigning", + obj["lightspark_node_with_remote_signing_alias"], + obj["lightspark_node_with_remote_signing_color"], + obj["lightspark_node_with_remote_signing_conductivity"], + obj["lightspark_node_with_remote_signing_public_key"], + !!obj["lightspark_node_with_remote_signing_status"] + ? LightsparkNodeStatus[ + obj["lightspark_node_with_remote_signing_status"] + ] ?? LightsparkNodeStatus.FUTURE_VALUE : null, + !!obj["lightspark_node_with_remote_signing_total_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_remote_signing_total_balance"], + ) + : undefined, + !!obj["lightspark_node_with_remote_signing_total_local_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_remote_signing_total_local_balance"], + ) + : undefined, + !!obj["lightspark_node_with_remote_signing_local_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_remote_signing_local_balance"], + ) + : undefined, + !!obj["lightspark_node_with_remote_signing_remote_balance"] + ? CurrencyAmountFromJson( + obj["lightspark_node_with_remote_signing_remote_balance"], + ) + : undefined, + !!obj["lightspark_node_with_remote_signing_blockchain_balance"] + ? BlockchainBalanceFromJson( + obj["lightspark_node_with_remote_signing_blockchain_balance"], + ) + : undefined, ); } throw new LightsparkException( @@ -163,24 +219,54 @@ fragment NodeFragment on Node { graph_node_display_name: display_name graph_node_public_key: public_key } - ... on LightsparkNode { + ... on LightsparkNodeWithOSK { __typename - lightspark_node_id: id - lightspark_node_created_at: created_at - lightspark_node_updated_at: updated_at - lightspark_node_alias: alias - lightspark_node_bitcoin_network: bitcoin_network - lightspark_node_color: color - lightspark_node_conductivity: conductivity - lightspark_node_display_name: display_name - lightspark_node_public_key: public_key - lightspark_node_account: account { + lightspark_node_with_o_s_k_id: id + lightspark_node_with_o_s_k_created_at: created_at + lightspark_node_with_o_s_k_updated_at: updated_at + lightspark_node_with_o_s_k_alias: alias + lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network + lightspark_node_with_o_s_k_color: color + lightspark_node_with_o_s_k_conductivity: conductivity + lightspark_node_with_o_s_k_display_name: display_name + lightspark_node_with_o_s_k_public_key: public_key + lightspark_node_with_o_s_k_owner: owner { id } - lightspark_node_owner: owner { - id + lightspark_node_with_o_s_k_status: status + lightspark_node_with_o_s_k_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_blockchain_balance: blockchain_balance { + lightspark_node_with_o_s_k_total_local_balance: total_local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance { __typename blockchain_balance_total_balance: total_balance { __typename @@ -231,12 +317,29 @@ fragment NodeFragment on Node { currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } } - lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key { + lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos + lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key { __typename secret_encrypted_value: encrypted_value secret_cipher: cipher } - lightspark_node_total_balance: total_balance { + } + ... on LightsparkNodeWithRemoteSigning { + __typename + lightspark_node_with_remote_signing_id: id + lightspark_node_with_remote_signing_created_at: created_at + lightspark_node_with_remote_signing_updated_at: updated_at + lightspark_node_with_remote_signing_alias: alias + lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network + lightspark_node_with_remote_signing_color: color + lightspark_node_with_remote_signing_conductivity: conductivity + lightspark_node_with_remote_signing_display_name: display_name + lightspark_node_with_remote_signing_public_key: public_key + lightspark_node_with_remote_signing_owner: owner { + id + } + lightspark_node_with_remote_signing_status: status + lightspark_node_with_remote_signing_total_balance: total_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -244,7 +347,7 @@ fragment NodeFragment on Node { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_total_local_balance: total_local_balance { + lightspark_node_with_remote_signing_total_local_balance: total_local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -252,7 +355,7 @@ fragment NodeFragment on Node { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_local_balance: local_balance { + lightspark_node_with_remote_signing_local_balance: local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -260,8 +363,7 @@ fragment NodeFragment on Node { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_purpose: purpose - lightspark_node_remote_balance: remote_balance { + lightspark_node_with_remote_signing_remote_balance: remote_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -269,7 +371,58 @@ fragment NodeFragment on Node { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_status: status + lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos } }`; diff --git a/packages/lightspark-sdk/src/objects/OutgoingPayment.ts b/packages/lightspark-sdk/src/objects/OutgoingPayment.ts index 23b96aff9..aec39b8c9 100644 --- a/packages/lightspark-sdk/src/objects/OutgoingPayment.ts +++ b/packages/lightspark-sdk/src/objects/OutgoingPayment.ts @@ -11,6 +11,8 @@ import { OutgoingPaymentToAttemptsConnectionFromJson } from "./OutgoingPaymentTo import PaymentFailureReason from "./PaymentFailureReason.js"; import type PaymentRequestData from "./PaymentRequestData.js"; import { PaymentRequestDataFromJson } from "./PaymentRequestData.js"; +import type PostTransactionData from "./PostTransactionData.js"; +import { PostTransactionDataFromJson } from "./PostTransactionData.js"; import type RichText from "./RichText.js"; import { RichTextFromJson } from "./RichText.js"; import TransactionStatus from "./TransactionStatus.js"; @@ -32,6 +34,7 @@ class OutgoingPayment implements LightningTransaction { public readonly paymentRequestData?: PaymentRequestData, public readonly failureReason?: PaymentFailureReason, public readonly failureMessage?: RichText, + public readonly umaPostTransactionData?: PostTransactionData[], ) { autoBind(this); } @@ -143,6 +146,9 @@ export const OutgoingPaymentFromJson = (obj: any): OutgoingPayment => { !!obj["outgoing_payment_failure_message"] ? RichTextFromJson(obj["outgoing_payment_failure_message"]) : undefined, + obj["outgoing_payment_uma_post_transaction_data"]?.map((e) => + PostTransactionDataFromJson(e), + ), ); }; @@ -209,24 +215,54 @@ fragment OutgoingPaymentFragment on OutgoingPayment { graph_node_display_name: display_name graph_node_public_key: public_key } - ... on LightsparkNode { + ... on LightsparkNodeWithOSK { __typename - lightspark_node_id: id - lightspark_node_created_at: created_at - lightspark_node_updated_at: updated_at - lightspark_node_alias: alias - lightspark_node_bitcoin_network: bitcoin_network - lightspark_node_color: color - lightspark_node_conductivity: conductivity - lightspark_node_display_name: display_name - lightspark_node_public_key: public_key - lightspark_node_account: account { + lightspark_node_with_o_s_k_id: id + lightspark_node_with_o_s_k_created_at: created_at + lightspark_node_with_o_s_k_updated_at: updated_at + lightspark_node_with_o_s_k_alias: alias + lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network + lightspark_node_with_o_s_k_color: color + lightspark_node_with_o_s_k_conductivity: conductivity + lightspark_node_with_o_s_k_display_name: display_name + lightspark_node_with_o_s_k_public_key: public_key + lightspark_node_with_o_s_k_owner: owner { id } - lightspark_node_owner: owner { - id + lightspark_node_with_o_s_k_status: status + lightspark_node_with_o_s_k_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_total_local_balance: total_local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_blockchain_balance: blockchain_balance { + lightspark_node_with_o_s_k_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance { __typename blockchain_balance_total_balance: total_balance { __typename @@ -277,12 +313,29 @@ fragment OutgoingPaymentFragment on OutgoingPayment { currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } } - lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key { + lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos + lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key { __typename secret_encrypted_value: encrypted_value secret_cipher: cipher } - lightspark_node_total_balance: total_balance { + } + ... on LightsparkNodeWithRemoteSigning { + __typename + lightspark_node_with_remote_signing_id: id + lightspark_node_with_remote_signing_created_at: created_at + lightspark_node_with_remote_signing_updated_at: updated_at + lightspark_node_with_remote_signing_alias: alias + lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network + lightspark_node_with_remote_signing_color: color + lightspark_node_with_remote_signing_conductivity: conductivity + lightspark_node_with_remote_signing_display_name: display_name + lightspark_node_with_remote_signing_public_key: public_key + lightspark_node_with_remote_signing_owner: owner { + id + } + lightspark_node_with_remote_signing_status: status + lightspark_node_with_remote_signing_total_balance: total_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -290,7 +343,7 @@ fragment OutgoingPaymentFragment on OutgoingPayment { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_total_local_balance: total_local_balance { + lightspark_node_with_remote_signing_total_local_balance: total_local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -298,7 +351,7 @@ fragment OutgoingPaymentFragment on OutgoingPayment { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_local_balance: local_balance { + lightspark_node_with_remote_signing_local_balance: local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -306,8 +359,7 @@ fragment OutgoingPaymentFragment on OutgoingPayment { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_purpose: purpose - lightspark_node_remote_balance: remote_balance { + lightspark_node_with_remote_signing_remote_balance: remote_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -315,7 +367,58 @@ fragment OutgoingPaymentFragment on OutgoingPayment { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_status: status + lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos } } } @@ -325,6 +428,18 @@ fragment OutgoingPaymentFragment on OutgoingPayment { __typename rich_text_text: text } + outgoing_payment_uma_post_transaction_data: uma_post_transaction_data { + __typename + post_transaction_data_utxo: utxo + post_transaction_data_amount: amount { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } }`; export default OutgoingPayment; diff --git a/packages/lightspark-sdk/src/objects/OutgoingPaymentsForInvoiceQueryInput.ts b/packages/lightspark-sdk/src/objects/OutgoingPaymentsForInvoiceQueryInput.ts new file mode 100644 index 000000000..1b393aaf9 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/OutgoingPaymentsForInvoiceQueryInput.ts @@ -0,0 +1,25 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +import TransactionStatus from "./TransactionStatus.js"; + +type OutgoingPaymentsForInvoiceQueryInput = { + /** The encoded invoice that the outgoing payments paid to. **/ + encodedInvoice: string; + + /** An optional filter to only query outgoing payments of given statuses. **/ + statuses?: TransactionStatus[]; +}; + +export const OutgoingPaymentsForInvoiceQueryInputFromJson = ( + obj: any, +): OutgoingPaymentsForInvoiceQueryInput => { + return { + encodedInvoice: + obj["outgoing_payments_for_invoice_query_input_encoded_invoice"], + statuses: obj["outgoing_payments_for_invoice_query_input_statuses"]?.map( + (e) => TransactionStatus[e], + ), + } as OutgoingPaymentsForInvoiceQueryInput; +}; + +export default OutgoingPaymentsForInvoiceQueryInput; diff --git a/packages/lightspark-sdk/src/objects/OutgoingPaymentsForInvoiceQueryOutput.ts b/packages/lightspark-sdk/src/objects/OutgoingPaymentsForInvoiceQueryOutput.ts new file mode 100644 index 000000000..91e39a8f8 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/OutgoingPaymentsForInvoiceQueryOutput.ts @@ -0,0 +1,28 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +import type OutgoingPayment from "./OutgoingPayment.js"; +import { OutgoingPaymentFromJson } from "./OutgoingPayment.js"; + +type OutgoingPaymentsForInvoiceQueryOutput = { + payments: OutgoingPayment[]; +}; + +export const OutgoingPaymentsForInvoiceQueryOutputFromJson = ( + obj: any, +): OutgoingPaymentsForInvoiceQueryOutput => { + return { + payments: obj["outgoing_payments_for_invoice_query_output_payments"].map( + (e) => OutgoingPaymentFromJson(e), + ), + } as OutgoingPaymentsForInvoiceQueryOutput; +}; + +export const FRAGMENT = ` +fragment OutgoingPaymentsForInvoiceQueryOutputFragment on OutgoingPaymentsForInvoiceQueryOutput { + __typename + outgoing_payments_for_invoice_query_output_payments: payments { + id + } +}`; + +export default OutgoingPaymentsForInvoiceQueryOutput; diff --git a/packages/lightspark-sdk/src/objects/PayUmaInvoiceInput.ts b/packages/lightspark-sdk/src/objects/PayUmaInvoiceInput.ts new file mode 100644 index 000000000..b074f9ce6 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/PayUmaInvoiceInput.ts @@ -0,0 +1,25 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +type PayUmaInvoiceInput = { + nodeId: string; + + encodedInvoice: string; + + timeoutSecs: number; + + maximumFeesMsats: number; + + amountMsats?: number; +}; + +export const PayUmaInvoiceInputFromJson = (obj: any): PayUmaInvoiceInput => { + return { + nodeId: obj["pay_uma_invoice_input_node_id"], + encodedInvoice: obj["pay_uma_invoice_input_encoded_invoice"], + timeoutSecs: obj["pay_uma_invoice_input_timeout_secs"], + maximumFeesMsats: obj["pay_uma_invoice_input_maximum_fees_msats"], + amountMsats: obj["pay_uma_invoice_input_amount_msats"], + } as PayUmaInvoiceInput; +}; + +export default PayUmaInvoiceInput; diff --git a/packages/lightspark-sdk/src/objects/LightsparkNodePurpose.ts b/packages/lightspark-sdk/src/objects/PaymentDirection.ts similarity index 57% rename from packages/lightspark-sdk/src/objects/LightsparkNodePurpose.ts rename to packages/lightspark-sdk/src/objects/PaymentDirection.ts index cb7934241..50aa9e706 100644 --- a/packages/lightspark-sdk/src/objects/LightsparkNodePurpose.ts +++ b/packages/lightspark-sdk/src/objects/PaymentDirection.ts @@ -1,18 +1,16 @@ // Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved -/** This is an enum of potential purposes set by a user for a Lightspark node. **/ -export enum LightsparkNodePurpose { +/** This is an enum indicating the direction of the payment. **/ +export enum PaymentDirection { /** * This is an enum value that represents values that could be added in the future. * Clients should support unknown values as more of them could be added without notice. */ FUTURE_VALUE = "FUTURE_VALUE", - SEND = "SEND", + SENT = "SENT", - RECEIVE = "RECEIVE", - - ROUTING = "ROUTING", + RECEIVED = "RECEIVED", } -export default LightsparkNodePurpose; +export default PaymentDirection; diff --git a/packages/lightspark-sdk/src/objects/PaymentRequest.ts b/packages/lightspark-sdk/src/objects/PaymentRequest.ts index c3e63d972..3e32d5d9b 100644 --- a/packages/lightspark-sdk/src/objects/PaymentRequest.ts +++ b/packages/lightspark-sdk/src/objects/PaymentRequest.ts @@ -92,24 +92,54 @@ fragment PaymentRequestFragment on PaymentRequest { graph_node_display_name: display_name graph_node_public_key: public_key } - ... on LightsparkNode { + ... on LightsparkNodeWithOSK { __typename - lightspark_node_id: id - lightspark_node_created_at: created_at - lightspark_node_updated_at: updated_at - lightspark_node_alias: alias - lightspark_node_bitcoin_network: bitcoin_network - lightspark_node_color: color - lightspark_node_conductivity: conductivity - lightspark_node_display_name: display_name - lightspark_node_public_key: public_key - lightspark_node_account: account { + lightspark_node_with_o_s_k_id: id + lightspark_node_with_o_s_k_created_at: created_at + lightspark_node_with_o_s_k_updated_at: updated_at + lightspark_node_with_o_s_k_alias: alias + lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network + lightspark_node_with_o_s_k_color: color + lightspark_node_with_o_s_k_conductivity: conductivity + lightspark_node_with_o_s_k_display_name: display_name + lightspark_node_with_o_s_k_public_key: public_key + lightspark_node_with_o_s_k_owner: owner { id } - lightspark_node_owner: owner { - id + lightspark_node_with_o_s_k_status: status + lightspark_node_with_o_s_k_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_total_local_balance: total_local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_blockchain_balance: blockchain_balance { + lightspark_node_with_o_s_k_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance { __typename blockchain_balance_total_balance: total_balance { __typename @@ -160,12 +190,29 @@ fragment PaymentRequestFragment on PaymentRequest { currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } } - lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key { + lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos + lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key { __typename secret_encrypted_value: encrypted_value secret_cipher: cipher } - lightspark_node_total_balance: total_balance { + } + ... on LightsparkNodeWithRemoteSigning { + __typename + lightspark_node_with_remote_signing_id: id + lightspark_node_with_remote_signing_created_at: created_at + lightspark_node_with_remote_signing_updated_at: updated_at + lightspark_node_with_remote_signing_alias: alias + lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network + lightspark_node_with_remote_signing_color: color + lightspark_node_with_remote_signing_conductivity: conductivity + lightspark_node_with_remote_signing_display_name: display_name + lightspark_node_with_remote_signing_public_key: public_key + lightspark_node_with_remote_signing_owner: owner { + id + } + lightspark_node_with_remote_signing_status: status + lightspark_node_with_remote_signing_total_balance: total_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -173,7 +220,7 @@ fragment PaymentRequestFragment on PaymentRequest { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_total_local_balance: total_local_balance { + lightspark_node_with_remote_signing_total_local_balance: total_local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -181,7 +228,7 @@ fragment PaymentRequestFragment on PaymentRequest { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_local_balance: local_balance { + lightspark_node_with_remote_signing_local_balance: local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -189,8 +236,7 @@ fragment PaymentRequestFragment on PaymentRequest { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_purpose: purpose - lightspark_node_remote_balance: remote_balance { + lightspark_node_with_remote_signing_remote_balance: remote_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -198,7 +244,58 @@ fragment PaymentRequestFragment on PaymentRequest { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_status: status + lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos } } } diff --git a/packages/lightspark-sdk/src/objects/PaymentRequestData.ts b/packages/lightspark-sdk/src/objects/PaymentRequestData.ts index 2cded3186..5127c4290 100644 --- a/packages/lightspark-sdk/src/objects/PaymentRequestData.ts +++ b/packages/lightspark-sdk/src/objects/PaymentRequestData.ts @@ -71,24 +71,54 @@ fragment PaymentRequestDataFragment on PaymentRequestData { graph_node_display_name: display_name graph_node_public_key: public_key } - ... on LightsparkNode { + ... on LightsparkNodeWithOSK { __typename - lightspark_node_id: id - lightspark_node_created_at: created_at - lightspark_node_updated_at: updated_at - lightspark_node_alias: alias - lightspark_node_bitcoin_network: bitcoin_network - lightspark_node_color: color - lightspark_node_conductivity: conductivity - lightspark_node_display_name: display_name - lightspark_node_public_key: public_key - lightspark_node_account: account { + lightspark_node_with_o_s_k_id: id + lightspark_node_with_o_s_k_created_at: created_at + lightspark_node_with_o_s_k_updated_at: updated_at + lightspark_node_with_o_s_k_alias: alias + lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network + lightspark_node_with_o_s_k_color: color + lightspark_node_with_o_s_k_conductivity: conductivity + lightspark_node_with_o_s_k_display_name: display_name + lightspark_node_with_o_s_k_public_key: public_key + lightspark_node_with_o_s_k_owner: owner { id } - lightspark_node_owner: owner { - id + lightspark_node_with_o_s_k_status: status + lightspark_node_with_o_s_k_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_total_local_balance: total_local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_blockchain_balance: blockchain_balance { + lightspark_node_with_o_s_k_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance { __typename blockchain_balance_total_balance: total_balance { __typename @@ -139,12 +169,29 @@ fragment PaymentRequestDataFragment on PaymentRequestData { currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } } - lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key { + lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos + lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key { __typename secret_encrypted_value: encrypted_value secret_cipher: cipher } - lightspark_node_total_balance: total_balance { + } + ... on LightsparkNodeWithRemoteSigning { + __typename + lightspark_node_with_remote_signing_id: id + lightspark_node_with_remote_signing_created_at: created_at + lightspark_node_with_remote_signing_updated_at: updated_at + lightspark_node_with_remote_signing_alias: alias + lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network + lightspark_node_with_remote_signing_color: color + lightspark_node_with_remote_signing_conductivity: conductivity + lightspark_node_with_remote_signing_display_name: display_name + lightspark_node_with_remote_signing_public_key: public_key + lightspark_node_with_remote_signing_owner: owner { + id + } + lightspark_node_with_remote_signing_status: status + lightspark_node_with_remote_signing_total_balance: total_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -152,7 +199,7 @@ fragment PaymentRequestDataFragment on PaymentRequestData { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_total_local_balance: total_local_balance { + lightspark_node_with_remote_signing_total_local_balance: total_local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -160,7 +207,7 @@ fragment PaymentRequestDataFragment on PaymentRequestData { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_local_balance: local_balance { + lightspark_node_with_remote_signing_local_balance: local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -168,8 +215,7 @@ fragment PaymentRequestDataFragment on PaymentRequestData { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_purpose: purpose - lightspark_node_remote_balance: remote_balance { + lightspark_node_with_remote_signing_remote_balance: remote_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -177,7 +223,58 @@ fragment PaymentRequestDataFragment on PaymentRequestData { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_status: status + lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos } } } diff --git a/packages/lightspark-sdk/src/objects/PostTransactionData.ts b/packages/lightspark-sdk/src/objects/PostTransactionData.ts new file mode 100644 index 000000000..7ba8a4948 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/PostTransactionData.ts @@ -0,0 +1,39 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +import type CurrencyAmount from "./CurrencyAmount.js"; +import { CurrencyAmountFromJson } from "./CurrencyAmount.js"; + +/** This object represents post-transaction data that could be used to register payment for KYT. **/ +type PostTransactionData = { + /** + * The utxo of the channel over which the payment went through in the format of + * :. + **/ + utxo: string; + + /** The amount of funds transferred in the payment. **/ + amount: CurrencyAmount; +}; + +export const PostTransactionDataFromJson = (obj: any): PostTransactionData => { + return { + utxo: obj["post_transaction_data_utxo"], + amount: CurrencyAmountFromJson(obj["post_transaction_data_amount"]), + } as PostTransactionData; +}; + +export const FRAGMENT = ` +fragment PostTransactionDataFragment on PostTransactionData { + __typename + post_transaction_data_utxo: utxo + post_transaction_data_amount: amount { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } +}`; + +export default PostTransactionData; diff --git a/packages/lightspark-sdk/src/objects/RegisterPaymentInput.ts b/packages/lightspark-sdk/src/objects/RegisterPaymentInput.ts new file mode 100644 index 000000000..0b0a99229 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/RegisterPaymentInput.ts @@ -0,0 +1,31 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +import ComplianceProvider from "./ComplianceProvider.js"; +import PaymentDirection from "./PaymentDirection.js"; + +type RegisterPaymentInput = { + provider: ComplianceProvider; + + paymentId: string; + + nodePubkey: string; + + direction: PaymentDirection; +}; + +export const RegisterPaymentInputFromJson = ( + obj: any, +): RegisterPaymentInput => { + return { + provider: + ComplianceProvider[obj["register_payment_input_provider"]] ?? + ComplianceProvider.FUTURE_VALUE, + paymentId: obj["register_payment_input_payment_id"], + nodePubkey: obj["register_payment_input_node_pubkey"], + direction: + PaymentDirection[obj["register_payment_input_direction"]] ?? + PaymentDirection.FUTURE_VALUE, + } as RegisterPaymentInput; +}; + +export default RegisterPaymentInput; diff --git a/packages/lightspark-sdk/src/objects/RegisterPaymentOutput.ts b/packages/lightspark-sdk/src/objects/RegisterPaymentOutput.ts new file mode 100644 index 000000000..87907a46b --- /dev/null +++ b/packages/lightspark-sdk/src/objects/RegisterPaymentOutput.ts @@ -0,0 +1,23 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +type RegisterPaymentOutput = { + paymentId: string; +}; + +export const RegisterPaymentOutputFromJson = ( + obj: any, +): RegisterPaymentOutput => { + return { + paymentId: obj["register_payment_output_payment"].id, + } as RegisterPaymentOutput; +}; + +export const FRAGMENT = ` +fragment RegisterPaymentOutputFragment on RegisterPaymentOutput { + __typename + register_payment_output_payment: payment { + id + } +}`; + +export default RegisterPaymentOutput; diff --git a/packages/lightspark-sdk/src/objects/ReleaseChannelPerCommitmentSecretInput.ts b/packages/lightspark-sdk/src/objects/ReleaseChannelPerCommitmentSecretInput.ts new file mode 100644 index 000000000..6eaa1e59d --- /dev/null +++ b/packages/lightspark-sdk/src/objects/ReleaseChannelPerCommitmentSecretInput.ts @@ -0,0 +1,23 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +type ReleaseChannelPerCommitmentSecretInput = { + channelId: string; + + perCommitmentSecret: string; + + perCommitmentIndex: number; +}; + +export const ReleaseChannelPerCommitmentSecretInputFromJson = ( + obj: any, +): ReleaseChannelPerCommitmentSecretInput => { + return { + channelId: obj["release_channel_per_commitment_secret_input_channel_id"], + perCommitmentSecret: + obj["release_channel_per_commitment_secret_input_per_commitment_secret"], + perCommitmentIndex: + obj["release_channel_per_commitment_secret_input_per_commitment_index"], + } as ReleaseChannelPerCommitmentSecretInput; +}; + +export default ReleaseChannelPerCommitmentSecretInput; diff --git a/packages/lightspark-sdk/src/objects/ReleaseChannelPerCommitmentSecretOutput.ts b/packages/lightspark-sdk/src/objects/ReleaseChannelPerCommitmentSecretOutput.ts new file mode 100644 index 000000000..b1de2b77e --- /dev/null +++ b/packages/lightspark-sdk/src/objects/ReleaseChannelPerCommitmentSecretOutput.ts @@ -0,0 +1,23 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +type ReleaseChannelPerCommitmentSecretOutput = { + channelId: string; +}; + +export const ReleaseChannelPerCommitmentSecretOutputFromJson = ( + obj: any, +): ReleaseChannelPerCommitmentSecretOutput => { + return { + channelId: obj["release_channel_per_commitment_secret_output_channel"].id, + } as ReleaseChannelPerCommitmentSecretOutput; +}; + +export const FRAGMENT = ` +fragment ReleaseChannelPerCommitmentSecretOutputFragment on ReleaseChannelPerCommitmentSecretOutput { + __typename + release_channel_per_commitment_secret_output_channel: channel { + id + } +}`; + +export default ReleaseChannelPerCommitmentSecretOutput; diff --git a/packages/lightspark-sdk/src/objects/ReleasePaymentPreimageInput.ts b/packages/lightspark-sdk/src/objects/ReleasePaymentPreimageInput.ts new file mode 100644 index 000000000..039238747 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/ReleasePaymentPreimageInput.ts @@ -0,0 +1,20 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +type ReleasePaymentPreimageInput = { + /** The invoice the preimage belongs to. **/ + invoiceId: string; + + /** The preimage to release. **/ + paymentPreimage: string; +}; + +export const ReleasePaymentPreimageInputFromJson = ( + obj: any, +): ReleasePaymentPreimageInput => { + return { + invoiceId: obj["release_payment_preimage_input_invoice_id"], + paymentPreimage: obj["release_payment_preimage_input_payment_preimage"], + } as ReleasePaymentPreimageInput; +}; + +export default ReleasePaymentPreimageInput; diff --git a/packages/lightspark-sdk/src/objects/ReleasePaymentPreimageOutput.ts b/packages/lightspark-sdk/src/objects/ReleasePaymentPreimageOutput.ts new file mode 100644 index 000000000..3f6d2ab9c --- /dev/null +++ b/packages/lightspark-sdk/src/objects/ReleasePaymentPreimageOutput.ts @@ -0,0 +1,23 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +type ReleasePaymentPreimageOutput = { + invoiceId: string; +}; + +export const ReleasePaymentPreimageOutputFromJson = ( + obj: any, +): ReleasePaymentPreimageOutput => { + return { + invoiceId: obj["release_payment_preimage_output_invoice"].id, + } as ReleasePaymentPreimageOutput; +}; + +export const FRAGMENT = ` +fragment ReleasePaymentPreimageOutputFragment on ReleasePaymentPreimageOutput { + __typename + release_payment_preimage_output_invoice: invoice { + id + } +}`; + +export default ReleasePaymentPreimageOutput; diff --git a/packages/lightspark-sdk/src/objects/RemoteSigningSubEventType.ts b/packages/lightspark-sdk/src/objects/RemoteSigningSubEventType.ts new file mode 100644 index 000000000..629a3e385 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/RemoteSigningSubEventType.ts @@ -0,0 +1,26 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +/** This is an enum of the potential sub-event types for Remote Signing webook events. **/ +export enum RemoteSigningSubEventType { + /** + * This is an enum value that represents values that could be added in the future. + * Clients should support unknown values as more of them could be added without notice. + */ + FUTURE_VALUE = "FUTURE_VALUE", + + ECDH = "ECDH", + + GET_PER_COMMITMENT_POINT = "GET_PER_COMMITMENT_POINT", + + RELEASE_PER_COMMITMENT_SECRET = "RELEASE_PER_COMMITMENT_SECRET", + + SIGN_INVOICE = "SIGN_INVOICE", + + DERIVE_KEY_AND_SIGN = "DERIVE_KEY_AND_SIGN", + + RELEASE_PAYMENT_PREIMAGE = "RELEASE_PAYMENT_PREIMAGE", + + REQUEST_INVOICE_PAYMENT_HASH = "REQUEST_INVOICE_PAYMENT_HASH", +} + +export default RemoteSigningSubEventType; diff --git a/packages/lightspark-sdk/src/objects/ScreenBitcoinAddressesInput.ts b/packages/lightspark-sdk/src/objects/ScreenBitcoinAddressesInput.ts deleted file mode 100644 index be23151ce..000000000 --- a/packages/lightspark-sdk/src/objects/ScreenBitcoinAddressesInput.ts +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved - -import CryptoSanctionsScreeningProvider from "./CryptoSanctionsScreeningProvider.js"; - -type ScreenBitcoinAddressesInput = { - provider: CryptoSanctionsScreeningProvider; - - addresses: string[]; -}; - -export const ScreenBitcoinAddressesInputFromJson = ( - obj: any, -): ScreenBitcoinAddressesInput => { - return { - provider: - CryptoSanctionsScreeningProvider[ - obj["screen_bitcoin_addresses_input_provider"] - ] ?? CryptoSanctionsScreeningProvider.FUTURE_VALUE, - addresses: obj["screen_bitcoin_addresses_input_addresses"], - } as ScreenBitcoinAddressesInput; -}; - -export default ScreenBitcoinAddressesInput; diff --git a/packages/lightspark-sdk/src/objects/ScreenBitcoinAddressesOutput.ts b/packages/lightspark-sdk/src/objects/ScreenBitcoinAddressesOutput.ts deleted file mode 100644 index 5e9a706e3..000000000 --- a/packages/lightspark-sdk/src/objects/ScreenBitcoinAddressesOutput.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved - -import RiskRating from "./RiskRating.js"; - -type ScreenBitcoinAddressesOutput = { - ratings: RiskRating[]; -}; - -export const ScreenBitcoinAddressesOutputFromJson = ( - obj: any, -): ScreenBitcoinAddressesOutput => { - return { - ratings: obj["screen_bitcoin_addresses_output_ratings"].map( - (e) => RiskRating[e], - ), - } as ScreenBitcoinAddressesOutput; -}; - -export const FRAGMENT = ` -fragment ScreenBitcoinAddressesOutputFragment on ScreenBitcoinAddressesOutput { - __typename - screen_bitcoin_addresses_output_ratings: ratings -}`; - -export default ScreenBitcoinAddressesOutput; diff --git a/packages/lightspark-sdk/src/objects/ScreenNodeInput.ts b/packages/lightspark-sdk/src/objects/ScreenNodeInput.ts new file mode 100644 index 000000000..b2f6d451b --- /dev/null +++ b/packages/lightspark-sdk/src/objects/ScreenNodeInput.ts @@ -0,0 +1,20 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +import ComplianceProvider from "./ComplianceProvider.js"; + +type ScreenNodeInput = { + provider: ComplianceProvider; + + nodePubkey: string; +}; + +export const ScreenNodeInputFromJson = (obj: any): ScreenNodeInput => { + return { + provider: + ComplianceProvider[obj["screen_node_input_provider"]] ?? + ComplianceProvider.FUTURE_VALUE, + nodePubkey: obj["screen_node_input_node_pubkey"], + } as ScreenNodeInput; +}; + +export default ScreenNodeInput; diff --git a/packages/lightspark-sdk/src/objects/ScreenNodeOutput.ts b/packages/lightspark-sdk/src/objects/ScreenNodeOutput.ts new file mode 100644 index 000000000..c4125e7a2 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/ScreenNodeOutput.ts @@ -0,0 +1,22 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +import RiskRating from "./RiskRating.js"; + +type ScreenNodeOutput = { + rating: RiskRating; +}; + +export const ScreenNodeOutputFromJson = (obj: any): ScreenNodeOutput => { + return { + rating: + RiskRating[obj["screen_node_output_rating"]] ?? RiskRating.FUTURE_VALUE, + } as ScreenNodeOutput; +}; + +export const FRAGMENT = ` +fragment ScreenNodeOutputFragment on ScreenNodeOutput { + __typename + screen_node_output_rating: rating +}`; + +export default ScreenNodeOutput; diff --git a/packages/lightspark-sdk/src/objects/SetInvoicePaymentHashInput.ts b/packages/lightspark-sdk/src/objects/SetInvoicePaymentHashInput.ts new file mode 100644 index 000000000..d2580e825 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/SetInvoicePaymentHashInput.ts @@ -0,0 +1,24 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +type SetInvoicePaymentHashInput = { + /** The invoice that needs to be updated. **/ + invoiceId: string; + + /** The 32-byte hash of the payment preimage. **/ + paymentHash: string; + + /** The 32-byte nonce used to generate the invoice preimage. **/ + preimageNonce: string; +}; + +export const SetInvoicePaymentHashInputFromJson = ( + obj: any, +): SetInvoicePaymentHashInput => { + return { + invoiceId: obj["set_invoice_payment_hash_input_invoice_id"], + paymentHash: obj["set_invoice_payment_hash_input_payment_hash"], + preimageNonce: obj["set_invoice_payment_hash_input_preimage_nonce"], + } as SetInvoicePaymentHashInput; +}; + +export default SetInvoicePaymentHashInput; diff --git a/packages/lightspark-sdk/src/objects/SetInvoicePaymentHashOutput.ts b/packages/lightspark-sdk/src/objects/SetInvoicePaymentHashOutput.ts new file mode 100644 index 000000000..c1fa96b59 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/SetInvoicePaymentHashOutput.ts @@ -0,0 +1,23 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +type SetInvoicePaymentHashOutput = { + invoiceId: string; +}; + +export const SetInvoicePaymentHashOutputFromJson = ( + obj: any, +): SetInvoicePaymentHashOutput => { + return { + invoiceId: obj["set_invoice_payment_hash_output_invoice"].id, + } as SetInvoicePaymentHashOutput; +}; + +export const FRAGMENT = ` +fragment SetInvoicePaymentHashOutputFragment on SetInvoicePaymentHashOutput { + __typename + set_invoice_payment_hash_output_invoice: invoice { + id + } +}`; + +export default SetInvoicePaymentHashOutput; diff --git a/packages/lightspark-sdk/src/objects/SignInvoiceInput.ts b/packages/lightspark-sdk/src/objects/SignInvoiceInput.ts new file mode 100644 index 000000000..793e17ae2 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/SignInvoiceInput.ts @@ -0,0 +1,19 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +type SignInvoiceInput = { + invoiceId: string; + + signature: string; + + recoveryId: number; +}; + +export const SignInvoiceInputFromJson = (obj: any): SignInvoiceInput => { + return { + invoiceId: obj["sign_invoice_input_invoice_id"], + signature: obj["sign_invoice_input_signature"], + recoveryId: obj["sign_invoice_input_recovery_id"], + } as SignInvoiceInput; +}; + +export default SignInvoiceInput; diff --git a/packages/lightspark-sdk/src/objects/SignInvoiceOutput.ts b/packages/lightspark-sdk/src/objects/SignInvoiceOutput.ts new file mode 100644 index 000000000..1319bb7d3 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/SignInvoiceOutput.ts @@ -0,0 +1,21 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +type SignInvoiceOutput = { + invoiceId: string; +}; + +export const SignInvoiceOutputFromJson = (obj: any): SignInvoiceOutput => { + return { + invoiceId: obj["sign_invoice_output_invoice"].id, + } as SignInvoiceOutput; +}; + +export const FRAGMENT = ` +fragment SignInvoiceOutputFragment on SignInvoiceOutput { + __typename + sign_invoice_output_invoice: invoice { + id + } +}`; + +export default SignInvoiceOutput; diff --git a/packages/lightspark-sdk/src/objects/SignMessagesInput.ts b/packages/lightspark-sdk/src/objects/SignMessagesInput.ts new file mode 100644 index 000000000..040a85507 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/SignMessagesInput.ts @@ -0,0 +1,18 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +import type IdAndSignature from "./IdAndSignature.js"; +import { IdAndSignatureFromJson } from "./IdAndSignature.js"; + +type SignMessagesInput = { + signatures: IdAndSignature[]; +}; + +export const SignMessagesInputFromJson = (obj: any): SignMessagesInput => { + return { + signatures: obj["sign_messages_input_signatures"].map((e) => + IdAndSignatureFromJson(e), + ), + } as SignMessagesInput; +}; + +export default SignMessagesInput; diff --git a/packages/lightspark-sdk/src/objects/SignMessagesOutput.ts b/packages/lightspark-sdk/src/objects/SignMessagesOutput.ts new file mode 100644 index 000000000..a9161d4a2 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/SignMessagesOutput.ts @@ -0,0 +1,26 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +import type SignablePayload from "./SignablePayload.js"; +import { SignablePayloadFromJson } from "./SignablePayload.js"; + +type SignMessagesOutput = { + signedPayloads: SignablePayload[]; +}; + +export const SignMessagesOutputFromJson = (obj: any): SignMessagesOutput => { + return { + signedPayloads: obj["sign_messages_output_signed_payloads"].map((e) => + SignablePayloadFromJson(e), + ), + } as SignMessagesOutput; +}; + +export const FRAGMENT = ` +fragment SignMessagesOutputFragment on SignMessagesOutput { + __typename + sign_messages_output_signed_payloads: signed_payloads { + id + } +}`; + +export default SignMessagesOutput; diff --git a/packages/lightspark-sdk/src/objects/Signable.ts b/packages/lightspark-sdk/src/objects/Signable.ts new file mode 100644 index 000000000..5e16d65e8 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/Signable.ts @@ -0,0 +1,58 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +import { type Query } from "@lightsparkdev/core"; +import type Entity from "./Entity.js"; + +type Signable = Entity & { + /** + * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque + * string. + **/ + id: string; + + /** The date and time when the entity was first created. **/ + createdAt: string; + + /** The date and time when the entity was last updated. **/ + updatedAt: string; + + /** The typename of the object **/ + typename: string; +}; + +export const SignableFromJson = (obj: any): Signable => { + return { + id: obj["signable_id"], + createdAt: obj["signable_created_at"], + updatedAt: obj["signable_updated_at"], + typename: "Signable", + } as Signable; +}; + +export const FRAGMENT = ` +fragment SignableFragment on Signable { + __typename + signable_id: id + signable_created_at: created_at + signable_updated_at: updated_at +}`; + +export const getSignableQuery = (id: string): Query => { + return { + queryPayload: ` +query GetSignable($id: ID!) { + entity(id: $id) { + ... on Signable { + ...SignableFragment + } + } +} + +${FRAGMENT} +`, + variables: { id }, + constructObject: (data: any) => SignableFromJson(data.entity), + }; +}; + +export default Signable; diff --git a/packages/lightspark-sdk/src/objects/SignablePayload.ts b/packages/lightspark-sdk/src/objects/SignablePayload.ts new file mode 100644 index 000000000..c4d95a722 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/SignablePayload.ts @@ -0,0 +1,93 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +import { type Query } from "@lightsparkdev/core"; +import type Entity from "./Entity.js"; +import SignablePayloadStatus from "./SignablePayloadStatus.js"; + +type SignablePayload = Entity & { + /** + * The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque + * string. + **/ + id: string; + + /** The date and time when the entity was first created. **/ + createdAt: string; + + /** The date and time when the entity was last updated. **/ + updatedAt: string; + + /** The payload that needs to be signed. **/ + payload: string; + + /** The consistent method for generating the same set of accounts and wallets for a given private key **/ + derivationPath: string; + + /** The status of the payload. **/ + status: SignablePayloadStatus; + + /** The signable this payload belongs to. **/ + signableId: string; + + /** The typename of the object **/ + typename: string; + + /** The tweak value to add. **/ + addTweak?: string; + + /** The tweak value to multiply. **/ + mulTweak?: string; +}; + +export const SignablePayloadFromJson = (obj: any): SignablePayload => { + return { + id: obj["signable_payload_id"], + createdAt: obj["signable_payload_created_at"], + updatedAt: obj["signable_payload_updated_at"], + payload: obj["signable_payload_payload"], + derivationPath: obj["signable_payload_derivation_path"], + status: + SignablePayloadStatus[obj["signable_payload_status"]] ?? + SignablePayloadStatus.FUTURE_VALUE, + signableId: obj["signable_payload_signable"].id, + typename: "SignablePayload", + addTweak: obj["signable_payload_add_tweak"], + mulTweak: obj["signable_payload_mul_tweak"], + } as SignablePayload; +}; + +export const FRAGMENT = ` +fragment SignablePayloadFragment on SignablePayload { + __typename + signable_payload_id: id + signable_payload_created_at: created_at + signable_payload_updated_at: updated_at + signable_payload_payload: payload + signable_payload_derivation_path: derivation_path + signable_payload_status: status + signable_payload_add_tweak: add_tweak + signable_payload_mul_tweak: mul_tweak + signable_payload_signable: signable { + id + } +}`; + +export const getSignablePayloadQuery = (id: string): Query => { + return { + queryPayload: ` +query GetSignablePayload($id: ID!) { + entity(id: $id) { + ... on SignablePayload { + ...SignablePayloadFragment + } + } +} + +${FRAGMENT} +`, + variables: { id }, + constructObject: (data: any) => SignablePayloadFromJson(data.entity), + }; +}; + +export default SignablePayload; diff --git a/packages/lightspark-sdk/src/objects/SignablePayloadStatus.ts b/packages/lightspark-sdk/src/objects/SignablePayloadStatus.ts new file mode 100644 index 000000000..90bec434c --- /dev/null +++ b/packages/lightspark-sdk/src/objects/SignablePayloadStatus.ts @@ -0,0 +1,17 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +export enum SignablePayloadStatus { + /** + * This is an enum value that represents values that could be added in the future. + * Clients should support unknown values as more of them could be added without notice. + */ + FUTURE_VALUE = "FUTURE_VALUE", + + CREATED = "CREATED", + + SIGNED = "SIGNED", + + VALIDATION_FAILED = "VALIDATION_FAILED", +} + +export default SignablePayloadStatus; diff --git a/packages/lightspark-sdk/src/objects/SingleNodeDashboard.ts b/packages/lightspark-sdk/src/objects/SingleNodeDashboard.ts index 8ea45d4a2..0d15cb8e3 100644 --- a/packages/lightspark-sdk/src/objects/SingleNodeDashboard.ts +++ b/packages/lightspark-sdk/src/objects/SingleNodeDashboard.ts @@ -1,6 +1,5 @@ import type { Maybe } from "@lightsparkdev/core"; import type CurrencyAmount from "./CurrencyAmount.js"; -import type LightsparkNodePurpose from "./LightsparkNodePurpose.js"; import type LightsparkNodeStatus from "./LightsparkNodeStatus.js"; import type NodeAddressType from "./NodeAddressType.js"; import type Transaction from "./Transaction.js"; @@ -8,7 +7,6 @@ import type Transaction from "./Transaction.js"; type SingleNodeDashboard = { id: string; displayName: string; - purpose: Maybe; color: Maybe; publicKey: Maybe; status: Maybe; diff --git a/packages/lightspark-sdk/src/objects/Transaction.ts b/packages/lightspark-sdk/src/objects/Transaction.ts index fe63b458f..48710b0f5 100644 --- a/packages/lightspark-sdk/src/objects/Transaction.ts +++ b/packages/lightspark-sdk/src/objects/Transaction.ts @@ -11,6 +11,7 @@ import IncomingPayment from "./IncomingPayment.js"; import OutgoingPayment from "./OutgoingPayment.js"; import PaymentFailureReason from "./PaymentFailureReason.js"; import { PaymentRequestDataFromJson } from "./PaymentRequestData.js"; +import { PostTransactionDataFromJson } from "./PostTransactionData.js"; import { RichTextFromJson } from "./RichText.js"; import type RoutingTransaction from "./RoutingTransaction.js"; import RoutingTransactionFailureReason from "./RoutingTransactionFailureReason.js"; @@ -128,8 +129,10 @@ export const TransactionFromJson = (obj: any): Transaction => { "IncomingPayment", obj["incoming_payment_resolved_at"], obj["incoming_payment_transaction_hash"], - obj["incoming_payment_origin"]?.id ?? undefined, obj["incoming_payment_payment_request"]?.id ?? undefined, + obj["incoming_payment_uma_post_transaction_data"]?.map((e) => + PostTransactionDataFromJson(e), + ), ); } if (obj["__typename"] == "OutgoingPayment") { @@ -160,6 +163,9 @@ export const TransactionFromJson = (obj: any): Transaction => { !!obj["outgoing_payment_failure_message"] ? RichTextFromJson(obj["outgoing_payment_failure_message"]) : undefined, + obj["outgoing_payment_uma_post_transaction_data"]?.map((e) => + PostTransactionDataFromJson(e), + ), ); } if (obj["__typename"] == "RoutingTransaction") { @@ -334,15 +340,24 @@ fragment TransactionFragment on Transaction { currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } incoming_payment_transaction_hash: transaction_hash - incoming_payment_origin: origin { - id - } incoming_payment_destination: destination { id } incoming_payment_payment_request: payment_request { id } + incoming_payment_uma_post_transaction_data: uma_post_transaction_data { + __typename + post_transaction_data_utxo: utxo + post_transaction_data_amount: amount { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } } ... on OutgoingPayment { __typename @@ -406,24 +421,54 @@ fragment TransactionFragment on Transaction { graph_node_display_name: display_name graph_node_public_key: public_key } - ... on LightsparkNode { + ... on LightsparkNodeWithOSK { __typename - lightspark_node_id: id - lightspark_node_created_at: created_at - lightspark_node_updated_at: updated_at - lightspark_node_alias: alias - lightspark_node_bitcoin_network: bitcoin_network - lightspark_node_color: color - lightspark_node_conductivity: conductivity - lightspark_node_display_name: display_name - lightspark_node_public_key: public_key - lightspark_node_account: account { + lightspark_node_with_o_s_k_id: id + lightspark_node_with_o_s_k_created_at: created_at + lightspark_node_with_o_s_k_updated_at: updated_at + lightspark_node_with_o_s_k_alias: alias + lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network + lightspark_node_with_o_s_k_color: color + lightspark_node_with_o_s_k_conductivity: conductivity + lightspark_node_with_o_s_k_display_name: display_name + lightspark_node_with_o_s_k_public_key: public_key + lightspark_node_with_o_s_k_owner: owner { id } - lightspark_node_owner: owner { - id + lightspark_node_with_o_s_k_status: status + lightspark_node_with_o_s_k_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_total_local_balance: total_local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_blockchain_balance: blockchain_balance { + lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance { __typename blockchain_balance_total_balance: total_balance { __typename @@ -474,12 +519,29 @@ fragment TransactionFragment on Transaction { currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } } - lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key { + lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos + lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key { __typename secret_encrypted_value: encrypted_value secret_cipher: cipher } - lightspark_node_total_balance: total_balance { + } + ... on LightsparkNodeWithRemoteSigning { + __typename + lightspark_node_with_remote_signing_id: id + lightspark_node_with_remote_signing_created_at: created_at + lightspark_node_with_remote_signing_updated_at: updated_at + lightspark_node_with_remote_signing_alias: alias + lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network + lightspark_node_with_remote_signing_color: color + lightspark_node_with_remote_signing_conductivity: conductivity + lightspark_node_with_remote_signing_display_name: display_name + lightspark_node_with_remote_signing_public_key: public_key + lightspark_node_with_remote_signing_owner: owner { + id + } + lightspark_node_with_remote_signing_status: status + lightspark_node_with_remote_signing_total_balance: total_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -487,7 +549,7 @@ fragment TransactionFragment on Transaction { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_total_local_balance: total_local_balance { + lightspark_node_with_remote_signing_total_local_balance: total_local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -495,7 +557,7 @@ fragment TransactionFragment on Transaction { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_local_balance: local_balance { + lightspark_node_with_remote_signing_local_balance: local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -503,8 +565,7 @@ fragment TransactionFragment on Transaction { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_purpose: purpose - lightspark_node_remote_balance: remote_balance { + lightspark_node_with_remote_signing_remote_balance: remote_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -512,7 +573,58 @@ fragment TransactionFragment on Transaction { currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_status: status + lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos } } } @@ -522,6 +634,18 @@ fragment TransactionFragment on Transaction { __typename rich_text_text: text } + outgoing_payment_uma_post_transaction_data: uma_post_transaction_data { + __typename + post_transaction_data_utxo: utxo + post_transaction_data_amount: amount { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } } ... on RoutingTransaction { __typename diff --git a/packages/lightspark-sdk/src/objects/UpdateChannelPerCommitmentPointInput.ts b/packages/lightspark-sdk/src/objects/UpdateChannelPerCommitmentPointInput.ts new file mode 100644 index 000000000..eed157d03 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/UpdateChannelPerCommitmentPointInput.ts @@ -0,0 +1,25 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +type UpdateChannelPerCommitmentPointInput = { + channelId: string; + + perCommitmentPoint: string; + + perCommitmentPointIndex: number; +}; + +export const UpdateChannelPerCommitmentPointInputFromJson = ( + obj: any, +): UpdateChannelPerCommitmentPointInput => { + return { + channelId: obj["update_channel_per_commitment_point_input_channel_id"], + perCommitmentPoint: + obj["update_channel_per_commitment_point_input_per_commitment_point"], + perCommitmentPointIndex: + obj[ + "update_channel_per_commitment_point_input_per_commitment_point_index" + ], + } as UpdateChannelPerCommitmentPointInput; +}; + +export default UpdateChannelPerCommitmentPointInput; diff --git a/packages/lightspark-sdk/src/objects/UpdateChannelPerCommitmentPointOutput.ts b/packages/lightspark-sdk/src/objects/UpdateChannelPerCommitmentPointOutput.ts new file mode 100644 index 000000000..2dc963f26 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/UpdateChannelPerCommitmentPointOutput.ts @@ -0,0 +1,23 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +type UpdateChannelPerCommitmentPointOutput = { + channelId: string; +}; + +export const UpdateChannelPerCommitmentPointOutputFromJson = ( + obj: any, +): UpdateChannelPerCommitmentPointOutput => { + return { + channelId: obj["update_channel_per_commitment_point_output_channel"].id, + } as UpdateChannelPerCommitmentPointOutput; +}; + +export const FRAGMENT = ` +fragment UpdateChannelPerCommitmentPointOutputFragment on UpdateChannelPerCommitmentPointOutput { + __typename + update_channel_per_commitment_point_output_channel: channel { + id + } +}`; + +export default UpdateChannelPerCommitmentPointOutput; diff --git a/packages/lightspark-sdk/src/objects/UpdateNodeSharedSecretInput.ts b/packages/lightspark-sdk/src/objects/UpdateNodeSharedSecretInput.ts new file mode 100644 index 000000000..6c6824c54 --- /dev/null +++ b/packages/lightspark-sdk/src/objects/UpdateNodeSharedSecretInput.ts @@ -0,0 +1,18 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +type UpdateNodeSharedSecretInput = { + nodeId: string; + + sharedSecret: string; +}; + +export const UpdateNodeSharedSecretInputFromJson = ( + obj: any, +): UpdateNodeSharedSecretInput => { + return { + nodeId: obj["update_node_shared_secret_input_node_id"], + sharedSecret: obj["update_node_shared_secret_input_shared_secret"], + } as UpdateNodeSharedSecretInput; +}; + +export default UpdateNodeSharedSecretInput; diff --git a/packages/lightspark-sdk/src/objects/UpdateNodeSharedSecretOutput.ts b/packages/lightspark-sdk/src/objects/UpdateNodeSharedSecretOutput.ts new file mode 100644 index 000000000..7554e773a --- /dev/null +++ b/packages/lightspark-sdk/src/objects/UpdateNodeSharedSecretOutput.ts @@ -0,0 +1,23 @@ +// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved + +type UpdateNodeSharedSecretOutput = { + nodeId: string; +}; + +export const UpdateNodeSharedSecretOutputFromJson = ( + obj: any, +): UpdateNodeSharedSecretOutput => { + return { + nodeId: obj["update_node_shared_secret_output_node"].id, + } as UpdateNodeSharedSecretOutput; +}; + +export const FRAGMENT = ` +fragment UpdateNodeSharedSecretOutputFragment on UpdateNodeSharedSecretOutput { + __typename + update_node_shared_secret_output_node: node { + id + } +}`; + +export default UpdateNodeSharedSecretOutput; diff --git a/packages/lightspark-sdk/src/objects/Wallet.ts b/packages/lightspark-sdk/src/objects/Wallet.ts index a3b0f9ae5..6ce4dd208 100644 --- a/packages/lightspark-sdk/src/objects/Wallet.ts +++ b/packages/lightspark-sdk/src/objects/Wallet.ts @@ -27,6 +27,7 @@ class Wallet implements LightsparkNodeOwner { public readonly typename: string, public readonly lastLoginAt?: string, public readonly balances?: Balances, + public readonly accountId?: string, ) { autoBind(this); } @@ -169,15 +170,24 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after: currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } incoming_payment_transaction_hash: transaction_hash - incoming_payment_origin: origin { - id - } incoming_payment_destination: destination { id } incoming_payment_payment_request: payment_request { id } + incoming_payment_uma_post_transaction_data: uma_post_transaction_data { + __typename + post_transaction_data_utxo: utxo + post_transaction_data_amount: amount { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } } ... on OutgoingPayment { __typename @@ -241,24 +251,54 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after: graph_node_display_name: display_name graph_node_public_key: public_key } - ... on LightsparkNode { + ... on LightsparkNodeWithOSK { __typename - lightspark_node_id: id - lightspark_node_created_at: created_at - lightspark_node_updated_at: updated_at - lightspark_node_alias: alias - lightspark_node_bitcoin_network: bitcoin_network - lightspark_node_color: color - lightspark_node_conductivity: conductivity - lightspark_node_display_name: display_name - lightspark_node_public_key: public_key - lightspark_node_account: account { + lightspark_node_with_o_s_k_id: id + lightspark_node_with_o_s_k_created_at: created_at + lightspark_node_with_o_s_k_updated_at: updated_at + lightspark_node_with_o_s_k_alias: alias + lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network + lightspark_node_with_o_s_k_color: color + lightspark_node_with_o_s_k_conductivity: conductivity + lightspark_node_with_o_s_k_display_name: display_name + lightspark_node_with_o_s_k_public_key: public_key + lightspark_node_with_o_s_k_owner: owner { id } - lightspark_node_owner: owner { - id + lightspark_node_with_o_s_k_status: status + lightspark_node_with_o_s_k_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_blockchain_balance: blockchain_balance { + lightspark_node_with_o_s_k_total_local_balance: total_local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance { __typename blockchain_balance_total_balance: total_balance { __typename @@ -309,12 +349,29 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after: currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } } - lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key { + lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos + lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key { __typename secret_encrypted_value: encrypted_value secret_cipher: cipher } - lightspark_node_total_balance: total_balance { + } + ... on LightsparkNodeWithRemoteSigning { + __typename + lightspark_node_with_remote_signing_id: id + lightspark_node_with_remote_signing_created_at: created_at + lightspark_node_with_remote_signing_updated_at: updated_at + lightspark_node_with_remote_signing_alias: alias + lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network + lightspark_node_with_remote_signing_color: color + lightspark_node_with_remote_signing_conductivity: conductivity + lightspark_node_with_remote_signing_display_name: display_name + lightspark_node_with_remote_signing_public_key: public_key + lightspark_node_with_remote_signing_owner: owner { + id + } + lightspark_node_with_remote_signing_status: status + lightspark_node_with_remote_signing_total_balance: total_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -322,7 +379,7 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after: currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_total_local_balance: total_local_balance { + lightspark_node_with_remote_signing_total_local_balance: total_local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -330,7 +387,7 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after: currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_local_balance: local_balance { + lightspark_node_with_remote_signing_local_balance: local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -338,8 +395,7 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after: currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_purpose: purpose - lightspark_node_remote_balance: remote_balance { + lightspark_node_with_remote_signing_remote_balance: remote_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -347,7 +403,58 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after: currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_status: status + lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos } } } @@ -357,6 +464,18 @@ query FetchWalletToTransactionsConnection($entity_id: ID!, $first: Int, $after: __typename rich_text_text: text } + outgoing_payment_uma_post_transaction_data: uma_post_transaction_data { + __typename + post_transaction_data_utxo: utxo + post_transaction_data_amount: amount { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } } ... on RoutingTransaction { __typename @@ -507,24 +626,54 @@ query FetchWalletToPaymentRequestsConnection($entity_id: ID!, $first: Int, $afte graph_node_display_name: display_name graph_node_public_key: public_key } - ... on LightsparkNode { + ... on LightsparkNodeWithOSK { __typename - lightspark_node_id: id - lightspark_node_created_at: created_at - lightspark_node_updated_at: updated_at - lightspark_node_alias: alias - lightspark_node_bitcoin_network: bitcoin_network - lightspark_node_color: color - lightspark_node_conductivity: conductivity - lightspark_node_display_name: display_name - lightspark_node_public_key: public_key - lightspark_node_account: account { + lightspark_node_with_o_s_k_id: id + lightspark_node_with_o_s_k_created_at: created_at + lightspark_node_with_o_s_k_updated_at: updated_at + lightspark_node_with_o_s_k_alias: alias + lightspark_node_with_o_s_k_bitcoin_network: bitcoin_network + lightspark_node_with_o_s_k_color: color + lightspark_node_with_o_s_k_conductivity: conductivity + lightspark_node_with_o_s_k_display_name: display_name + lightspark_node_with_o_s_k_public_key: public_key + lightspark_node_with_o_s_k_owner: owner { id } - lightspark_node_owner: owner { - id + lightspark_node_with_o_s_k_status: status + lightspark_node_with_o_s_k_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_total_local_balance: total_local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_blockchain_balance: blockchain_balance { + lightspark_node_with_o_s_k_local_balance: local_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_remote_balance: remote_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + lightspark_node_with_o_s_k_blockchain_balance: blockchain_balance { __typename blockchain_balance_total_balance: total_balance { __typename @@ -575,12 +724,29 @@ query FetchWalletToPaymentRequestsConnection($entity_id: ID!, $first: Int, $afte currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } } - lightspark_node_encrypted_signing_private_key: encrypted_signing_private_key { + lightspark_node_with_o_s_k_uma_prescreening_utxos: uma_prescreening_utxos + lightspark_node_with_o_s_k_encrypted_signing_private_key: encrypted_signing_private_key { __typename secret_encrypted_value: encrypted_value secret_cipher: cipher } - lightspark_node_total_balance: total_balance { + } + ... on LightsparkNodeWithRemoteSigning { + __typename + lightspark_node_with_remote_signing_id: id + lightspark_node_with_remote_signing_created_at: created_at + lightspark_node_with_remote_signing_updated_at: updated_at + lightspark_node_with_remote_signing_alias: alias + lightspark_node_with_remote_signing_bitcoin_network: bitcoin_network + lightspark_node_with_remote_signing_color: color + lightspark_node_with_remote_signing_conductivity: conductivity + lightspark_node_with_remote_signing_display_name: display_name + lightspark_node_with_remote_signing_public_key: public_key + lightspark_node_with_remote_signing_owner: owner { + id + } + lightspark_node_with_remote_signing_status: status + lightspark_node_with_remote_signing_total_balance: total_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -588,7 +754,7 @@ query FetchWalletToPaymentRequestsConnection($entity_id: ID!, $first: Int, $afte currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_total_local_balance: total_local_balance { + lightspark_node_with_remote_signing_total_local_balance: total_local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -596,7 +762,7 @@ query FetchWalletToPaymentRequestsConnection($entity_id: ID!, $first: Int, $afte currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_local_balance: local_balance { + lightspark_node_with_remote_signing_local_balance: local_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -604,8 +770,7 @@ query FetchWalletToPaymentRequestsConnection($entity_id: ID!, $first: Int, $afte currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_purpose: purpose - lightspark_node_remote_balance: remote_balance { + lightspark_node_with_remote_signing_remote_balance: remote_balance { __typename currency_amount_original_value: original_value currency_amount_original_unit: original_unit @@ -613,7 +778,58 @@ query FetchWalletToPaymentRequestsConnection($entity_id: ID!, $first: Int, $afte currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded currency_amount_preferred_currency_value_approx: preferred_currency_value_approx } - lightspark_node_status: status + lightspark_node_with_remote_signing_blockchain_balance: blockchain_balance { + __typename + blockchain_balance_total_balance: total_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_confirmed_balance: confirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_unconfirmed_balance: unconfirmed_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_locked_balance: locked_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_required_reserve: required_reserve { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + blockchain_balance_available_balance: available_balance { + __typename + currency_amount_original_value: original_value + currency_amount_original_unit: original_unit + currency_amount_preferred_currency_unit: preferred_currency_unit + currency_amount_preferred_currency_value_rounded: preferred_currency_value_rounded + currency_amount_preferred_currency_value_approx: preferred_currency_value_approx + } + } + lightspark_node_with_remote_signing_uma_prescreening_utxos: uma_prescreening_utxos } } } @@ -746,6 +962,7 @@ export const WalletFromJson = (obj: any): Wallet => { !!obj["wallet_balances"] ? BalancesFromJson(obj["wallet_balances"]) : undefined, + obj["wallet_account"]?.id ?? undefined, ); }; @@ -784,6 +1001,9 @@ fragment WalletFragment on Wallet { } } wallet_third_party_identifier: third_party_identifier + wallet_account: account { + id + } wallet_status: status }`; diff --git a/packages/lightspark-sdk/src/objects/index.ts b/packages/lightspark-sdk/src/objects/index.ts index ab33e9b10..7908dc0c0 100644 --- a/packages/lightspark-sdk/src/objects/index.ts +++ b/packages/lightspark-sdk/src/objects/index.ts @@ -21,6 +21,7 @@ export { } from "./ChannelOpeningTransaction.js"; export { default as ChannelStatus } from "./ChannelStatus.js"; export { default as ChannelToTransactionsConnection } from "./ChannelToTransactionsConnection.js"; +export { default as ComplianceProvider } from "./ComplianceProvider.js"; export { default as Connection } from "./Connection.js"; export { default as CreateApiTokenInput } from "./CreateApiTokenInput.js"; export { default as CreateApiTokenOutput } from "./CreateApiTokenOutput.js"; @@ -33,9 +34,11 @@ export { default as CreateTestModeInvoiceInput } from "./CreateTestModeInvoiceIn export { default as CreateTestModeInvoiceOutput } from "./CreateTestModeInvoiceOutput.js"; export { default as CreateTestModePaymentInput } from "./CreateTestModePaymentInput.js"; export { default as CreateTestModePaymentoutput } from "./CreateTestModePaymentoutput.js"; -export { default as CryptoSanctionsScreeningProvider } from "./CryptoSanctionsScreeningProvider.js"; +export { default as CreateUmaInvoiceInput } from "./CreateUmaInvoiceInput.js"; export { default as CurrencyAmount } from "./CurrencyAmount.js"; export { default as CurrencyUnit } from "./CurrencyUnit.js"; +export { default as DeclineToSignMessagesInput } from "./DeclineToSignMessagesInput.js"; +export { default as DeclineToSignMessagesOutput } from "./DeclineToSignMessagesOutput.js"; export { default as DeleteApiTokenInput } from "./DeleteApiTokenInput.js"; export { default as DeleteApiTokenOutput } from "./DeleteApiTokenOutput.js"; export { default as Deposit, getDepositQuery } from "./Deposit.js"; @@ -46,6 +49,7 @@ export { default as FundNodeOutput } from "./FundNodeOutput.js"; export { default as GraphNode } from "./GraphNode.js"; export { default as Hop, getHopQuery } from "./Hop.js"; export { default as HtlcAttemptFailureCode } from "./HtlcAttemptFailureCode.js"; +export { default as IdAndSignature } from "./IdAndSignature.js"; export { default as IncomingPayment } from "./IncomingPayment.js"; export { default as IncomingPaymentAttempt, @@ -68,9 +72,10 @@ export { default as LightsparkNodeOwner, getLightsparkNodeOwnerQuery, } from "./LightsparkNodeOwner.js"; -export { default as LightsparkNodePurpose } from "./LightsparkNodePurpose.js"; export { default as LightsparkNodeStatus } from "./LightsparkNodeStatus.js"; export { default as LightsparkNodeToChannelsConnection } from "./LightsparkNodeToChannelsConnection.js"; +export { default as LightsparkNodeWithOSK } from "./LightsparkNodeWithOSK.js"; +export { default as LightsparkNodeWithRemoteSigning } from "./LightsparkNodeWithRemoteSigning.js"; export { default as Node } from "./Node.js"; export { default as NodeAddress } from "./NodeAddress.js"; export { default as NodeAddressType } from "./NodeAddressType.js"; @@ -83,10 +88,13 @@ export { default as OutgoingPayment } from "./OutgoingPayment.js"; export { default as OutgoingPaymentAttempt } from "./OutgoingPaymentAttempt.js"; export { default as OutgoingPaymentAttemptStatus } from "./OutgoingPaymentAttemptStatus.js"; export { default as OutgoingPaymentAttemptToHopsConnection } from "./OutgoingPaymentAttemptToHopsConnection.js"; +export { default as OutgoingPaymentsForInvoiceQueryInput } from "./OutgoingPaymentsForInvoiceQueryInput.js"; +export { default as OutgoingPaymentsForInvoiceQueryOutput } from "./OutgoingPaymentsForInvoiceQueryOutput.js"; export { default as OutgoingPaymentToAttemptsConnection } from "./OutgoingPaymentToAttemptsConnection.js"; export { default as PageInfo } from "./PageInfo.js"; export { default as PayInvoiceInput } from "./PayInvoiceInput.js"; export { default as PayInvoiceOutput } from "./PayInvoiceOutput.js"; +export { default as PaymentDirection } from "./PaymentDirection.js"; export { default as PaymentFailureReason } from "./PaymentFailureReason.js"; export { default as PaymentRequest, @@ -94,7 +102,16 @@ export { } from "./PaymentRequest.js"; export { default as PaymentRequestData } from "./PaymentRequestData.js"; export { default as PaymentRequestStatus } from "./PaymentRequestStatus.js"; +export { default as PayUmaInvoiceInput } from "./PayUmaInvoiceInput.js"; export { default as Permission } from "./Permission.js"; +export { default as PostTransactionData } from "./PostTransactionData.js"; +export { default as RegisterPaymentInput } from "./RegisterPaymentInput.js"; +export { default as RegisterPaymentOutput } from "./RegisterPaymentOutput.js"; +export { default as ReleaseChannelPerCommitmentSecretInput } from "./ReleaseChannelPerCommitmentSecretInput.js"; +export { default as ReleaseChannelPerCommitmentSecretOutput } from "./ReleaseChannelPerCommitmentSecretOutput.js"; +export { default as ReleasePaymentPreimageInput } from "./ReleasePaymentPreimageInput.js"; +export { default as ReleasePaymentPreimageOutput } from "./ReleasePaymentPreimageOutput.js"; +export { default as RemoteSigningSubEventType } from "./RemoteSigningSubEventType.js"; export { default as RequestWithdrawalInput } from "./RequestWithdrawalInput.js"; export { default as RequestWithdrawalOutput } from "./RequestWithdrawalOutput.js"; export { default as RichText } from "./RichText.js"; @@ -104,17 +121,33 @@ export { getRoutingTransactionQuery, } from "./RoutingTransaction.js"; export { default as RoutingTransactionFailureReason } from "./RoutingTransactionFailureReason.js"; -export { default as ScreenBitcoinAddressesInput } from "./ScreenBitcoinAddressesInput.js"; -export { default as ScreenBitcoinAddressesOutput } from "./ScreenBitcoinAddressesOutput.js"; +export { default as ScreenNodeInput } from "./ScreenNodeInput.js"; +export { default as ScreenNodeOutput } from "./ScreenNodeOutput.js"; export { default as Secret } from "./Secret.js"; export { default as SendPaymentInput } from "./SendPaymentInput.js"; export { default as SendPaymentOutput } from "./SendPaymentOutput.js"; +export { default as SetInvoicePaymentHashInput } from "./SetInvoicePaymentHashInput.js"; +export { default as SetInvoicePaymentHashOutput } from "./SetInvoicePaymentHashOutput.js"; +export { default as Signable, getSignableQuery } from "./Signable.js"; +export { + default as SignablePayload, + getSignablePayloadQuery, +} from "./SignablePayload.js"; +export { default as SignablePayloadStatus } from "./SignablePayloadStatus.js"; +export { default as SignInvoiceInput } from "./SignInvoiceInput.js"; +export { default as SignInvoiceOutput } from "./SignInvoiceOutput.js"; +export { default as SignMessagesInput } from "./SignMessagesInput.js"; +export { default as SignMessagesOutput } from "./SignMessagesOutput.js"; export { default as SingleNodeDashboard } from "./SingleNodeDashboard.js"; export { default as Transaction, getTransactionQuery } from "./Transaction.js"; export { default as TransactionFailures } from "./TransactionFailures.js"; export { default as TransactionStatus } from "./TransactionStatus.js"; export { default as TransactionType } from "./TransactionType.js"; export { default as TransactionUpdate } from "./TransactionUpdate.js"; +export { default as UpdateChannelPerCommitmentPointInput } from "./UpdateChannelPerCommitmentPointInput.js"; +export { default as UpdateChannelPerCommitmentPointOutput } from "./UpdateChannelPerCommitmentPointOutput.js"; +export { default as UpdateNodeSharedSecretInput } from "./UpdateNodeSharedSecretInput.js"; +export { default as UpdateNodeSharedSecretOutput } from "./UpdateNodeSharedSecretOutput.js"; export { default as Wallet } from "./Wallet.js"; export { default as WalletStatus } from "./WalletStatus.js"; export { default as WalletToPaymentRequestsConnection } from "./WalletToPaymentRequestsConnection.js"; diff --git a/packages/lightspark-sdk/tsup.config.ts b/packages/lightspark-sdk/tsup.config.ts new file mode 100644 index 000000000..026bd7398 --- /dev/null +++ b/packages/lightspark-sdk/tsup.config.ts @@ -0,0 +1,11 @@ +import { defineConfig } from 'tsup' +import * as esbuild from 'esbuild' + +export default defineConfig({ + entry: ['src/index.ts', 'src/objects/index.ts'], + format: ['cjs', 'esm'], + dts: true, + esbuildOptions(options) { + options.external = ['./src/lightspark_crypto/*']; + } +}) diff --git a/packages/wallet-sdk/package.json b/packages/wallet-sdk/package.json index fc375e3e9..1f7298d5b 100644 --- a/packages/wallet-sdk/package.json +++ b/packages/wallet-sdk/package.json @@ -69,7 +69,7 @@ "lint:watch": "esw ./src -w --ext .ts,.tsx,.js --color", "lint": "eslint .", "postversion": "yarn build", - "test": "yarn jest --version && node --experimental-vm-modules $(yarn bin jest) --no-cache --runInBand --bail", + "test-skip": "yarn jest --version && node --experimental-vm-modules $(yarn bin jest) --no-cache --runInBand --bail", "types": "tsc" }, "license": "Apache-2.0", diff --git a/packages/wallet-sdk/src/client.ts b/packages/wallet-sdk/src/client.ts index 4e7401060..8370d626a 100644 --- a/packages/wallet-sdk/src/client.ts +++ b/packages/wallet-sdk/src/client.ts @@ -12,6 +12,7 @@ import { LightsparkException, NodeKeyCache, Requester, + SigningKeyType, StubAuthProvider, } from "@lightsparkdev/core"; import autoBind from "auto-bind"; @@ -99,11 +100,13 @@ class LightsparkClient { * @param serverUrl The base URL of the server to connect to. Defaults to lightspark production. * @param cryptoImpl The crypto implementation to use. Defaults to web and node compatible crypto. * For React Native, you should use the `ReactNativeCrypto` implementation from `@lightsparkdev/react-native`. + * @param signingKeyType The type of signing key used in the LightsparkClient. Different signing operations are used depending on the key type. */ constructor( private authProvider: AuthProvider = new StubAuthProvider(), private readonly serverUrl: string = "api.lightspark.com", private readonly cryptoImpl: CryptoInterface = DefaultCrypto, + private readonly signingKeyType: SigningKeyType = SigningKeyType.RSASigningKey, ) { this.nodeKeyCache = new NodeKeyCache(this.cryptoImpl); this.requester = new Requester( @@ -687,11 +690,15 @@ class LightsparkClient { * application outside of the SDK. It is the responsibility of the application to ensure that the key is valid and * that it is the correct key for the wallet. Otherwise signed requests will fail. * - * @param sigingKeyBytesOrAlias An object holding either the PEM encoded bytes of the wallet's private signing key or, + * @param signingKeyBytesOrAlias An object holding either the PEM encoded bytes of the wallet's private signing key or, * in the case of ReactNative, the alias of the key in the mobile keychain. */ - public loadWalletSigningKey(sigingKeyBytesOrAlias: KeyOrAliasType) { - return this.nodeKeyCache.loadKey(WALLET_NODE_ID_KEY, sigingKeyBytesOrAlias); + public loadWalletSigningKey(signingKeyBytesOrAlias: KeyOrAliasType) { + return this.nodeKeyCache.loadKey( + WALLET_NODE_ID_KEY, + signingKeyBytesOrAlias, + SigningKeyType.RSASigningKey, + ); } /** diff --git a/packages/wallet-sdk/src/objects/CreateTestModePaymentoutput.ts b/packages/wallet-sdk/src/objects/CreateTestModePaymentoutput.ts index eada5dd0e..512a8d2b9 100644 --- a/packages/wallet-sdk/src/objects/CreateTestModePaymentoutput.ts +++ b/packages/wallet-sdk/src/objects/CreateTestModePaymentoutput.ts @@ -2,8 +2,15 @@ /** This is an object identifying the output of a test mode payment. This object can be used to retrieve the associated payment made from a Test Mode Payment call. **/ type CreateTestModePaymentoutput = { - /** The payment that has been sent. **/ + /** + * The payment that has been sent. + * + * @deprecated Use incoming_payment instead. + **/ paymentId: string; + + /** The payment that has been received. **/ + incomingPaymentId: string; }; export const CreateTestModePaymentoutputFromJson = ( @@ -11,6 +18,8 @@ export const CreateTestModePaymentoutputFromJson = ( ): CreateTestModePaymentoutput => { return { paymentId: obj["create_test_mode_paymentoutput_payment"].id, + incomingPaymentId: + obj["create_test_mode_paymentoutput_incoming_payment"].id, } as CreateTestModePaymentoutput; }; @@ -20,6 +29,9 @@ fragment CreateTestModePaymentoutputFragment on CreateTestModePaymentoutput { create_test_mode_paymentoutput_payment: payment { id } + create_test_mode_paymentoutput_incoming_payment: incoming_payment { + id + } }`; export default CreateTestModePaymentoutput; diff --git a/yarn.lock b/yarn.lock index ba782f8ed..79a49758e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -55,8 +55,8 @@ __metadata: linkType: hard "@apollo/client@npm:^3.7.11": - version: 3.8.3 - resolution: "@apollo/client@npm:3.8.3" + version: 3.8.4 + resolution: "@apollo/client@npm:3.8.4" dependencies: "@graphql-typed-document-node/core": ^3.1.1 "@wry/context": ^0.7.3 @@ -86,7 +86,7 @@ __metadata: optional: true subscriptions-transport-ws: optional: true - checksum: cdecd5d613c0f941d00fc1904b9ecdeb502fc157c10400430231adb47d8f67727c78eed1b7489aed91cce6e20e32fc44e16b6c2d5424a42d7c100dcef65b942b + checksum: 509e37cdce7462cacda0a86c413ce471cd8f618625fb8ac3a60d6347d12f37a4fc60e12fc3fc1a375799caa21e56ff58d709e13ef5e13ab15e4dfc828a527848 languageName: node linkType: hard @@ -136,33 +136,33 @@ __metadata: languageName: node linkType: hard -"@babel/compat-data@npm:^7.20.5, @babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.22.9": - version: 7.22.9 - resolution: "@babel/compat-data@npm:7.22.9" - checksum: bed77d9044ce948b4327b30dd0de0779fa9f3a7ed1f2d31638714ed00229fa71fc4d1617ae0eb1fad419338d3658d0e9a5a083297451e09e73e078d0347ff808 +"@babel/compat-data@npm:^7.20.5, @babel/compat-data@npm:^7.22.20, @babel/compat-data@npm:^7.22.6, @babel/compat-data@npm:^7.22.9": + version: 7.22.20 + resolution: "@babel/compat-data@npm:7.22.20" + checksum: efedd1d18878c10fde95e4d82b1236a9aba41395ef798cbb651f58dbf5632dbff475736c507b8d13d4c8f44809d41c0eb2ef0d694283af9ba5dd8339b6dab451 languageName: node linkType: hard "@babel/core@npm:^7.1.0, @babel/core@npm:^7.11.1, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.13.16, @babel/core@npm:^7.16.0, @babel/core@npm:^7.20.0, @babel/core@npm:^7.20.2, @babel/core@npm:^7.21.3, @babel/core@npm:^7.21.4, @babel/core@npm:^7.22.9, @babel/core@npm:^7.7.2, @babel/core@npm:^7.8.0": - version: 7.22.17 - resolution: "@babel/core@npm:7.22.17" + version: 7.22.20 + resolution: "@babel/core@npm:7.22.20" dependencies: "@ampproject/remapping": ^2.2.0 "@babel/code-frame": ^7.22.13 "@babel/generator": ^7.22.15 "@babel/helper-compilation-targets": ^7.22.15 - "@babel/helper-module-transforms": ^7.22.17 + "@babel/helper-module-transforms": ^7.22.20 "@babel/helpers": ^7.22.15 "@babel/parser": ^7.22.16 "@babel/template": ^7.22.15 - "@babel/traverse": ^7.22.17 - "@babel/types": ^7.22.17 + "@babel/traverse": ^7.22.20 + "@babel/types": ^7.22.19 convert-source-map: ^1.7.0 debug: ^4.1.0 gensync: ^1.0.0-beta.2 json5: ^2.2.3 semver: ^6.3.1 - checksum: 355216a342d1b3952d7c040dd4c99ecef6b3501ba99a713703c1fec1ae73bc92a48a0c1234562bdbb4fd334b2e452f5a6c3bb282f0e613fa89e1518c91d1aea1 + checksum: 73663a079194b5dc406b2e2e5e50db81977d443e4faf7ef2c27e5836cd9a359e81e551115193dc9b1a93471275351a972e54904f4d3aa6cb156f51e26abf6765 languageName: node linkType: hard @@ -270,10 +270,10 @@ __metadata: languageName: node linkType: hard -"@babel/helper-environment-visitor@npm:^7.18.9, @babel/helper-environment-visitor@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-environment-visitor@npm:7.22.5" - checksum: 248532077d732a34cd0844eb7b078ff917c3a8ec81a7f133593f71a860a582f05b60f818dc5049c2212e5baa12289c27889a4b81d56ef409b4863db49646c4b1 +"@babel/helper-environment-visitor@npm:^7.18.9, @babel/helper-environment-visitor@npm:^7.22.20, @babel/helper-environment-visitor@npm:^7.22.5": + version: 7.22.20 + resolution: "@babel/helper-environment-visitor@npm:7.22.20" + checksum: d80ee98ff66f41e233f36ca1921774c37e88a803b2f7dca3db7c057a5fea0473804db9fb6729e5dbfd07f4bed722d60f7852035c2c739382e84c335661590b69 languageName: node linkType: hard @@ -296,7 +296,7 @@ __metadata: languageName: node linkType: hard -"@babel/helper-member-expression-to-functions@npm:^7.22.15, @babel/helper-member-expression-to-functions@npm:^7.22.5": +"@babel/helper-member-expression-to-functions@npm:^7.22.15": version: 7.22.15 resolution: "@babel/helper-member-expression-to-functions@npm:7.22.15" dependencies: @@ -314,18 +314,18 @@ __metadata: languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.22.15, @babel/helper-module-transforms@npm:^7.22.17, @babel/helper-module-transforms@npm:^7.22.5, @babel/helper-module-transforms@npm:^7.22.9": - version: 7.22.17 - resolution: "@babel/helper-module-transforms@npm:7.22.17" +"@babel/helper-module-transforms@npm:^7.22.15, @babel/helper-module-transforms@npm:^7.22.20, @babel/helper-module-transforms@npm:^7.22.5, @babel/helper-module-transforms@npm:^7.22.9": + version: 7.22.20 + resolution: "@babel/helper-module-transforms@npm:7.22.20" dependencies: - "@babel/helper-environment-visitor": ^7.22.5 + "@babel/helper-environment-visitor": ^7.22.20 "@babel/helper-module-imports": ^7.22.15 "@babel/helper-simple-access": ^7.22.5 "@babel/helper-split-export-declaration": ^7.22.6 - "@babel/helper-validator-identifier": ^7.22.15 + "@babel/helper-validator-identifier": ^7.22.20 peerDependencies: "@babel/core": ^7.0.0 - checksum: 458021c74093e66179765fcc9d1c1cb694f7bdf98656f23486901d35636495c38aab4661547fac2142e13d887987d1ea30cc9fe42968376a51a99bcd207b4989 + checksum: 8fce25362df8711bd4620f41c5c18769edfeafe7f8f1dae9691966ef368e57f9da68dfa1707cd63c834c89dc4eaa82c26f12ea33e88fd262ac62844b11dcc389 languageName: node linkType: hard @@ -346,28 +346,28 @@ __metadata: linkType: hard "@babel/helper-remap-async-to-generator@npm:^7.18.9, @babel/helper-remap-async-to-generator@npm:^7.22.5, @babel/helper-remap-async-to-generator@npm:^7.22.9": - version: 7.22.17 - resolution: "@babel/helper-remap-async-to-generator@npm:7.22.17" + version: 7.22.20 + resolution: "@babel/helper-remap-async-to-generator@npm:7.22.20" dependencies: "@babel/helper-annotate-as-pure": ^7.22.5 - "@babel/helper-environment-visitor": ^7.22.5 - "@babel/helper-wrap-function": ^7.22.17 + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-wrap-function": ^7.22.20 peerDependencies: "@babel/core": ^7.0.0 - checksum: 59307e623d00b6f5fa7f974e29081b2243e3f7bc3a89df331e8c1f8815d83f97bd092404a28b8bef5299028e3259450b5a943f34e1b32c7c55350436d218ab13 + checksum: 2fe6300a6f1b58211dffa0aed1b45d4958506d096543663dba83bd9251fe8d670fa909143a65b45e72acb49e7e20fbdb73eae315d9ddaced467948c3329986e7 languageName: node linkType: hard "@babel/helper-replace-supers@npm:^7.22.5, @babel/helper-replace-supers@npm:^7.22.9": - version: 7.22.9 - resolution: "@babel/helper-replace-supers@npm:7.22.9" + version: 7.22.20 + resolution: "@babel/helper-replace-supers@npm:7.22.20" dependencies: - "@babel/helper-environment-visitor": ^7.22.5 - "@babel/helper-member-expression-to-functions": ^7.22.5 + "@babel/helper-environment-visitor": ^7.22.20 + "@babel/helper-member-expression-to-functions": ^7.22.15 "@babel/helper-optimise-call-expression": ^7.22.5 peerDependencies: "@babel/core": ^7.0.0 - checksum: d41471f56ff2616459d35a5df1900d5f0756ae78b1027040365325ef332d66e08e3be02a9489756d870887585ff222403a228546e93dd7019e19e59c0c0fe586 + checksum: a0008332e24daedea2e9498733e3c39b389d6d4512637e000f96f62b797e702ee24a407ccbcd7a236a551590a38f31282829a8ef35c50a3c0457d88218cae639 languageName: node linkType: hard @@ -405,10 +405,10 @@ __metadata: languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.22.15, @babel/helper-validator-identifier@npm:^7.22.5": - version: 7.22.15 - resolution: "@babel/helper-validator-identifier@npm:7.22.15" - checksum: eb0bee4bda664c0959924bc1ad5611eacfce806f46612202dd164fef1df8fef1a11682a1e7615288987100e9fb304982b6e2a4ff07ffe842ab8765b95ed1118c +"@babel/helper-validator-identifier@npm:^7.22.19, @babel/helper-validator-identifier@npm:^7.22.20, @babel/helper-validator-identifier@npm:^7.22.5": + version: 7.22.20 + resolution: "@babel/helper-validator-identifier@npm:7.22.20" + checksum: 136412784d9428266bcdd4d91c32bcf9ff0e8d25534a9d94b044f77fe76bc50f941a90319b05aafd1ec04f7d127cd57a179a3716009ff7f3412ef835ada95bdc languageName: node linkType: hard @@ -419,14 +419,14 @@ __metadata: languageName: node linkType: hard -"@babel/helper-wrap-function@npm:^7.22.17": - version: 7.22.17 - resolution: "@babel/helper-wrap-function@npm:7.22.17" +"@babel/helper-wrap-function@npm:^7.22.20": + version: 7.22.20 + resolution: "@babel/helper-wrap-function@npm:7.22.20" dependencies: "@babel/helper-function-name": ^7.22.5 "@babel/template": ^7.22.15 - "@babel/types": ^7.22.17 - checksum: 95328b508049b6edd9cadd2ac89b4d4812ebdfa54a2ae77791939d795d88d561b31fd3669eea5d13558372cf2422eda05177d7f742690b5023c712bc3f0aec8e + "@babel/types": ^7.22.19 + checksum: 221ed9b5572612aeb571e4ce6a256f2dee85b3c9536f1dd5e611b0255e5f59a3d0ec392d8d46d4152149156a8109f92f20379b1d6d36abb613176e0e33f05fca languageName: node linkType: hard @@ -442,13 +442,13 @@ __metadata: linkType: hard "@babel/highlight@npm:^7.10.4, @babel/highlight@npm:^7.22.13": - version: 7.22.13 - resolution: "@babel/highlight@npm:7.22.13" + version: 7.22.20 + resolution: "@babel/highlight@npm:7.22.20" dependencies: - "@babel/helper-validator-identifier": ^7.22.5 + "@babel/helper-validator-identifier": ^7.22.20 chalk: ^2.4.2 js-tokens: ^4.0.0 - checksum: 7266d2bff8aa8fc78eb65b6e92a8211e12897a731126a282d2f9bb50d8fcaa4c1b02af2284f990ac7e3ab8d892d448a2cab8f5ed0ea8a90bce2c025b11ebe802 + checksum: 84bd034dca309a5e680083cd827a766780ca63cef37308404f17653d32366ea76262bd2364b2d38776232f2d01b649f26721417d507e8b4b6da3e4e739f6d134 languageName: node linkType: hard @@ -1619,10 +1619,10 @@ __metadata: linkType: hard "@babel/preset-env@npm:^7.11.0, @babel/preset-env@npm:^7.12.1, @babel/preset-env@npm:^7.16.4, @babel/preset-env@npm:^7.20.0, @babel/preset-env@npm:^7.20.2": - version: 7.22.15 - resolution: "@babel/preset-env@npm:7.22.15" + version: 7.22.20 + resolution: "@babel/preset-env@npm:7.22.20" dependencies: - "@babel/compat-data": ^7.22.9 + "@babel/compat-data": ^7.22.20 "@babel/helper-compilation-targets": ^7.22.15 "@babel/helper-plugin-utils": ^7.22.5 "@babel/helper-validator-option": ^7.22.15 @@ -1696,7 +1696,7 @@ __metadata: "@babel/plugin-transform-unicode-regex": ^7.22.5 "@babel/plugin-transform-unicode-sets-regex": ^7.22.5 "@babel/preset-modules": 0.1.6-no-external-plugins - "@babel/types": ^7.22.15 + "@babel/types": ^7.22.19 babel-plugin-polyfill-corejs2: ^0.4.5 babel-plugin-polyfill-corejs3: ^0.8.3 babel-plugin-polyfill-regenerator: ^0.5.2 @@ -1704,7 +1704,7 @@ __metadata: semver: ^6.3.1 peerDependencies: "@babel/core": ^7.0.0-0 - checksum: c3cf0223cab006cbf0c563a49a5076caa0b62e3b61b4f10ba857347fcd4f85dbb662a78e6f289e4f29f72c36974696737ae86c23da114617f5b00ab2c1c66126 + checksum: 99357a5cb30f53bacdc0d1cd6dff0f052ea6c2d1ba874d969bba69897ef716e87283e84a59dc52fb49aa31fd1b6f55ed756c64c04f5678380700239f6030b881 languageName: node linkType: hard @@ -1807,32 +1807,32 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.20.0, @babel/traverse@npm:^7.22.15, @babel/traverse@npm:^7.22.17, @babel/traverse@npm:^7.7.2": - version: 7.22.17 - resolution: "@babel/traverse@npm:7.22.17" +"@babel/traverse@npm:^7.20.0, @babel/traverse@npm:^7.22.15, @babel/traverse@npm:^7.22.20, @babel/traverse@npm:^7.7.2": + version: 7.22.20 + resolution: "@babel/traverse@npm:7.22.20" dependencies: "@babel/code-frame": ^7.22.13 "@babel/generator": ^7.22.15 - "@babel/helper-environment-visitor": ^7.22.5 + "@babel/helper-environment-visitor": ^7.22.20 "@babel/helper-function-name": ^7.22.5 "@babel/helper-hoist-variables": ^7.22.5 "@babel/helper-split-export-declaration": ^7.22.6 "@babel/parser": ^7.22.16 - "@babel/types": ^7.22.17 + "@babel/types": ^7.22.19 debug: ^4.1.0 globals: ^11.1.0 - checksum: 1153ca166a0a9b3fddf67f7f7c8c5b4f88aa2c2c00261ff2fc8424a63bc93250ed3fd08b04bd526ad19e797aeb6f22161120646a570cbfe5ff2a5d2f5d28af01 + checksum: 97da9afa7f8f505ce52c36ac2531129bc4a0e250880aaf9b467dc044f30a5bce2b756c1af4d961958bc225659546e811a7d536ab3d920fd60921087989b841b9 languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.6, @babel/types@npm:^7.20.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.3, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.17, @babel/types@npm:^7.22.5, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": - version: 7.22.17 - resolution: "@babel/types@npm:7.22.17" +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.6, @babel/types@npm:^7.20.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.21.3, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": + version: 7.22.19 + resolution: "@babel/types@npm:7.22.19" dependencies: "@babel/helper-string-parser": ^7.22.5 - "@babel/helper-validator-identifier": ^7.22.15 + "@babel/helper-validator-identifier": ^7.22.19 to-fast-properties: ^2.0.0 - checksum: 7382220f6eb2548f2c867a98916c3aa8a6063498d5372e5d21d8d184ba354033defb72aeba5858c1b2b42177058b896a34a7dcbae5eccd47fb0104721efa909d + checksum: 2d69740e69b55ba36ece0c17d5afb7b7213b34297157df39ef9ba24965aff677c56f014413052ecc5b2fbbf26910c63e5bb24a969df84d7a17153750cf75915e languageName: node linkType: hard @@ -2769,9 +2769,9 @@ __metadata: linkType: hard "@eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1": - version: 4.8.0 - resolution: "@eslint-community/regexpp@npm:4.8.0" - checksum: 601e6d033d556e98e8c929905bef335f20d7389762812df4d0f709d9b4d2631610dda975fb272e23b5b68e24a163b3851b114c8080a0a19fb4c141a1eff6305b + version: 4.8.1 + resolution: "@eslint-community/regexpp@npm:4.8.1" + checksum: 82d62c845ef42b810f268cfdc84d803a2da01735fb52e902fd34bdc09f92464a094fd8e4802839874b000b2f73f67c972859e813ba705233515d3e954f234bf2 languageName: node linkType: hard @@ -2919,11 +2919,12 @@ __metadata: languageName: node linkType: hard -"@expo/config-plugins@npm:~7.4.0": - version: 7.4.0 - resolution: "@expo/config-plugins@npm:7.4.0" +"@expo/config-plugins@npm:~7.5.0": + version: 7.5.0 + resolution: "@expo/config-plugins@npm:7.5.0" dependencies: "@expo/config-types": ^50.0.0-alpha.1 + "@expo/fingerprint": ^0.2.0 "@expo/json-file": ~8.2.37 "@expo/plist": ^0.0.20 "@expo/sdk-runtime-versions": ^1.0.0 @@ -2938,7 +2939,7 @@ __metadata: slash: ^3.0.0 xcode: ^3.0.1 xml2js: 0.6.0 - checksum: bf46881e4cb13b237b3dd69cbb67a330f7b763e3937671e208c52f5fe6fb2a9740008f17fc3dc06e46269472dd55d77da06f9228bbd2c933e1a6776c6fd44bce + checksum: 107f02b61ca815df6bb7a8b493b102aa77d2ae869d96a3b3959a6d7b14162a0b1e942754d3a38feab3d126a95c052d3127903f1ec6b103bc3140f7a791f66c69 languageName: node linkType: hard @@ -2950,9 +2951,9 @@ __metadata: linkType: hard "@expo/config-types@npm:^50.0.0-alpha.1": - version: 50.0.0-alpha.1 - resolution: "@expo/config-types@npm:50.0.0-alpha.1" - checksum: 85783161b330abbf79c8f45e673fe07389640511aeb4ec4e765449fb5bd24c3fa5b23c25f0c861b7726f48656c61e39d938d26e5ec5bbe1ef53405b59681023c + version: 50.0.0-alpha.2 + resolution: "@expo/config-types@npm:50.0.0-alpha.2" + checksum: 1bdd0733479a32933eae66daca1c245f873b21e650ea124cb0c3edb41a2624bb0027363239eb3266a71ac49e80090bcb34a7a443988ea1f46498508548053551 languageName: node linkType: hard @@ -2976,11 +2977,11 @@ __metadata: linkType: hard "@expo/config@npm:~8.3.0": - version: 8.3.0 - resolution: "@expo/config@npm:8.3.0" + version: 8.3.1 + resolution: "@expo/config@npm:8.3.1" dependencies: "@babel/code-frame": ~7.10.4 - "@expo/config-plugins": ~7.4.0 + "@expo/config-plugins": ~7.5.0 "@expo/config-types": ^50.0.0-alpha.1 "@expo/json-file": ^8.2.37 getenv: ^1.0.0 @@ -2990,7 +2991,7 @@ __metadata: semver: 7.5.3 slugify: ^1.3.4 sucrase: ^3.20.0 - checksum: 23fe846d5831a3073944bfbbcf2f17a2ad0362a99ae6a32a2f9a3640d5cd2612f32399e0dbb16308f20144468c397dd26c540218065a176b7875701b58d6af29 + checksum: a11aa22f4574fff89a07ef6b9c58f60b8edc2a58c81ab17efb6aa466000e78d9a9bbde5060ea6ff0f4892656b34b8fd1a0eaccd506d03d422e3ef97e48074a14 languageName: node linkType: hard @@ -3058,6 +3059,23 @@ __metadata: languageName: node linkType: hard +"@expo/fingerprint@npm:^0.2.0": + version: 0.2.0 + resolution: "@expo/fingerprint@npm:0.2.0" + dependencies: + "@expo/spawn-async": ^1.5.0 + chalk: ^4.1.2 + debug: ^4.3.4 + find-up: ^5.0.0 + minimatch: ^3.0.4 + p-limit: ^3.1.0 + resolve-from: ^5.0.0 + bin: + fingerprint: bin/cli.js + checksum: b98a1d3924b93bec2f1681f7f053f98548b37436ef219a471f7e15e898eb4c94f0ad1cf8ad4304433a29d717710fe6137dc8c3e4f424d99e4ec40214feae5e33 + languageName: node + linkType: hard + "@expo/image-utils@npm:0.3.22": version: 0.3.22 resolution: "@expo/image-utils@npm:0.3.22" @@ -3241,8 +3259,8 @@ __metadata: linkType: hard "@expo/webpack-config@npm:^18.0.1": - version: 18.1.2 - resolution: "@expo/webpack-config@npm:18.1.2" + version: 18.1.3 + resolution: "@expo/webpack-config@npm:18.1.3" dependencies: "@babel/core": ^7.20.2 babel-loader: ^8.3.0 @@ -3251,7 +3269,7 @@ __metadata: copy-webpack-plugin: ^10.2.0 css-loader: ^6.5.1 css-minimizer-webpack-plugin: ^3.4.1 - expo-pwa: 0.0.126 + expo-pwa: 0.0.127 find-up: ^5.0.0 find-yarn-workspace-root: ~2.0.0 getenv: ^1.0.0 @@ -3267,8 +3285,8 @@ __metadata: webpack-dev-server: ^4.11.1 webpack-manifest-plugin: ^4.1.1 peerDependencies: - expo: ^48.0.17 - checksum: 23200b62c699d9d2537c922a1d88be9301a53dd3eb043f94383118f64874da2ba1607b5fa5281d4b2fd2b05fd33fac5b11deb6f2704c7ddfd5133af56a9cd007 + expo: ^49.0.7 + checksum: 9cb2ad20e4259a15a95a61e21448266802d9330419b94cd318d7efcd4ed7dcf7543830295829c867ad6bb61a2166a8ea509578f6f528d717f7c4b2e548b3576b languageName: node linkType: hard @@ -3286,29 +3304,29 @@ __metadata: languageName: node linkType: hard -"@floating-ui/core@npm:^1.4.1": - version: 1.4.1 - resolution: "@floating-ui/core@npm:1.4.1" +"@floating-ui/core@npm:^1.4.2": + version: 1.5.0 + resolution: "@floating-ui/core@npm:1.5.0" dependencies: - "@floating-ui/utils": ^0.1.1 - checksum: be4ab864fe17eeba5e205bd554c264b9a4895a57c573661bbf638357fa3108677fed7ba3269ec15b4da90e29274c9b626d5a15414e8d1fe691e210d02a03695c + "@floating-ui/utils": ^0.1.3 + checksum: 54b4fe26b3c228746ac5589f97303abf158b80aa5f8b99027259decd68d1c2030c4c637648ebd33dfe78a4212699453bc2bd7537fd5a594d3bd3e63d362f666f languageName: node linkType: hard "@floating-ui/dom@npm:^1.0.0": - version: 1.5.1 - resolution: "@floating-ui/dom@npm:1.5.1" + version: 1.5.3 + resolution: "@floating-ui/dom@npm:1.5.3" dependencies: - "@floating-ui/core": ^1.4.1 - "@floating-ui/utils": ^0.1.1 - checksum: ddb509030978536ba7b321cf8c764ae9d0142a3b1fefb7e6bc050a5de7e825e12131fa5089009edabf7c125fb274886da211a5220fe17a71d875a7a96eb1386c + "@floating-ui/core": ^1.4.2 + "@floating-ui/utils": ^0.1.3 + checksum: 00053742064aac70957f0bd5c1542caafb3bfe9716588bfe1d409fef72a67ed5e60450d08eb492a77f78c22ed1ce4f7955873cc72bf9f9caf2b0f43ae3561c21 languageName: node linkType: hard -"@floating-ui/utils@npm:^0.1.1": - version: 0.1.1 - resolution: "@floating-ui/utils@npm:0.1.1" - checksum: 548acdda7902f45b0afbe34e2e7f4cbff0696b95bad8c039f80936519de24ef2ec20e79902825b7815294b37f51a7c52ee86288b0688869a57cc229a164d86b4 +"@floating-ui/utils@npm:^0.1.3": + version: 0.1.4 + resolution: "@floating-ui/utils@npm:0.1.4" + checksum: e6195ded5b3a6fd38411a833605184c31f24609b08feab2615e90ccc063bf4d3965383d817642fc7e8ca5ab6a54c29c71103e874f3afb0518595c8bd3390ba16 languageName: node linkType: hard @@ -3370,15 +3388,15 @@ __metadata: linkType: hard "@inquirer/checkbox@npm:^1.2.8": - version: 1.3.9 - resolution: "@inquirer/checkbox@npm:1.3.9" + version: 1.3.11 + resolution: "@inquirer/checkbox@npm:1.3.11" dependencies: - "@inquirer/core": ^4.0.0 - "@inquirer/type": ^1.1.2 + "@inquirer/core": ^5.0.0 + "@inquirer/type": ^1.1.4 ansi-escapes: ^4.3.2 chalk: ^4.1.2 figures: ^3.2.0 - checksum: a5041cbfb20a863311368c9501ec76f046a134fe43175d31e0ef42279f3a09b92590a2cde695b4895311d3b3d9f4a19a3cd9a81488ed6f9925464222adb91b9f + checksum: 66d3399e758cc933c7a09cd99c1fd7319c1550f5d6444f73ebae941a48f014bb405af1586e0c021c9e7d26e7f10fefe77f5021c21ad5282472bafc2b5d70e7f7 languageName: node linkType: hard @@ -3412,13 +3430,13 @@ __metadata: languageName: node linkType: hard -"@inquirer/core@npm:^4.0.0": - version: 4.0.0 - resolution: "@inquirer/core@npm:4.0.0" +"@inquirer/core@npm:^5.0.0": + version: 5.0.0 + resolution: "@inquirer/core@npm:5.0.0" dependencies: - "@inquirer/type": ^1.1.2 + "@inquirer/type": ^1.1.4 "@types/mute-stream": ^0.0.1 - "@types/node": ^20.5.6 + "@types/node": ^20.6.0 "@types/wrap-ansi": ^3.0.0 ansi-escapes: ^4.3.2 chalk: ^4.1.2 @@ -3427,56 +3445,57 @@ __metadata: figures: ^3.2.0 mute-stream: ^1.0.0 run-async: ^3.0.0 + signal-exit: ^4.1.0 strip-ansi: ^6.0.1 wrap-ansi: ^6.2.0 - checksum: 0eaa3d458c2aaacb5d6b74536b73e117035a1f330960a754096aabeef4134da894c4222d9acc972bc3fc339ab13489797cbfc81b95683a6b3e04429a42be5380 + checksum: 9af00b83706c8771c7558bda015842443269a505ddb50f7df09f338848f21e2a24290c8e9fdf9673e1fd4bcebe925e391af22bec80601be5ae2f253e0d1111e0 languageName: node linkType: hard "@inquirer/editor@npm:^1.0.11": - version: 1.2.8 - resolution: "@inquirer/editor@npm:1.2.8" + version: 1.2.10 + resolution: "@inquirer/editor@npm:1.2.10" dependencies: - "@inquirer/core": ^4.0.0 - "@inquirer/type": ^1.1.2 + "@inquirer/core": ^5.0.0 + "@inquirer/type": ^1.1.4 chalk: ^4.1.2 external-editor: ^3.1.0 - checksum: ec021624bd93b66da658d8f497e192efe8b366fb70913d3802672cff20828a446194c47be38a971b5e9d03074993c4be8fd12961b19aef23c11f12b8dc704fa1 + checksum: e14c40bdae7027b106aa84fe669a1f35924555be2fdd00e7f89d38da4e5c003c806261ad6d622406e04e8e64c57deb9a230942e1bea83c86701489bd5dd2706b languageName: node linkType: hard "@inquirer/expand@npm:^1.0.11": - version: 1.1.9 - resolution: "@inquirer/expand@npm:1.1.9" + version: 1.1.11 + resolution: "@inquirer/expand@npm:1.1.11" dependencies: - "@inquirer/core": ^4.0.0 - "@inquirer/type": ^1.1.2 + "@inquirer/core": ^5.0.0 + "@inquirer/type": ^1.1.4 chalk: ^4.1.2 figures: ^3.2.0 - checksum: d76d4eba206d842ff5817ea340ccdb51642dba2ec18564909924bda4365ebaf2f4b0d054cb8ed40230b4bd9af360c5bd65191f8e67c2aeb330f5d5f04f46f60f + checksum: a1951eb76a27487bb9a85f5ffe4b74430c842486179378730bc960d2107b5ffa33c561e7fbb0b7515e2f29f61919a8553e2154c8b9718064bb4e49ac8366ad6f languageName: node linkType: hard -"@inquirer/input@npm:^1.1.2, @inquirer/input@npm:^1.2.9": - version: 1.2.9 - resolution: "@inquirer/input@npm:1.2.9" +"@inquirer/input@npm:^1.1.2, @inquirer/input@npm:^1.2.11": + version: 1.2.11 + resolution: "@inquirer/input@npm:1.2.11" dependencies: - "@inquirer/core": ^4.0.0 - "@inquirer/type": ^1.1.2 + "@inquirer/core": ^5.0.0 + "@inquirer/type": ^1.1.4 chalk: ^4.1.2 - checksum: 5d11df1bf61c27771fa4e1c537cb17f2e239de6fa938d46fe93680c06a08d064cfb548a4060992289b6f8cd443282a297b5a9226449c1d97cb672bb85641fc81 + checksum: 525034e758527a6252cf8eff584a8a0abac9f51a515fac200dd3c33f2b95ff60472e68d6ec6b0528cda570b6542d6fc30bd1a9e8a8331f4bfbd9bdb86212bdfc languageName: node linkType: hard "@inquirer/password@npm:^1.0.11": - version: 1.1.9 - resolution: "@inquirer/password@npm:1.1.9" + version: 1.1.11 + resolution: "@inquirer/password@npm:1.1.11" dependencies: - "@inquirer/input": ^1.2.9 - "@inquirer/type": ^1.1.2 + "@inquirer/input": ^1.2.11 + "@inquirer/type": ^1.1.4 ansi-escapes: ^4.3.2 chalk: ^4.1.2 - checksum: cd0637cf7461c8c0f9d9b1f0c1f1b735d1f07e7d366fbaaac30e7531850686736b8cf04fc35d8d60edde53aa62bb8ece927bbc14376f69ab9ae4626d765eb630 + checksum: 3d8dc970184c4a48322e7932f706488daf7bdf2da84d8625667bb269a25849610e0664a49e276f43dae8b206bd4e7c0d32ee008f491cca8ad851810d823f55ad languageName: node linkType: hard @@ -3498,33 +3517,33 @@ __metadata: linkType: hard "@inquirer/rawlist@npm:^1.1.3": - version: 1.2.9 - resolution: "@inquirer/rawlist@npm:1.2.9" + version: 1.2.11 + resolution: "@inquirer/rawlist@npm:1.2.11" dependencies: - "@inquirer/core": ^4.0.0 - "@inquirer/type": ^1.1.2 + "@inquirer/core": ^5.0.0 + "@inquirer/type": ^1.1.4 chalk: ^4.1.2 - checksum: 1f3257139ea8235a9f76686d29e488cef2acbcb738e5d555880255e0b7240bc45c5bb384ddd41ca45e81599312c881be569be8925bce0bc8c37595f7f67ec913 + checksum: aa97cb6192e3e44440bf6914f2a3a2cd592764d5d8692012150ba8ef63e8e73927cc135ff081707d15aa7a9cc2fd035ad869eb5e49a9380407da3ed157e864c6 languageName: node linkType: hard "@inquirer/select@npm:^1.1.7": - version: 1.2.9 - resolution: "@inquirer/select@npm:1.2.9" + version: 1.2.11 + resolution: "@inquirer/select@npm:1.2.11" dependencies: - "@inquirer/core": ^4.0.0 - "@inquirer/type": ^1.1.2 + "@inquirer/core": ^5.0.0 + "@inquirer/type": ^1.1.4 ansi-escapes: ^4.3.2 chalk: ^4.1.2 figures: ^3.2.0 - checksum: 271f15b488fe659e81cfa5217b5f1ba5a5d46acb55df5569fd3d756ad935147cf9f13534a5ae0283ae5d2595f32007e17c64e47c8ea21a7359385b737a234745 + checksum: 2d2e3bcb9cb5cbc909115869f798c004b04620082146d2806c3268d009ab91e62923d38606f3c787fcec2b810ea75dca6881e5950c7cc6d620af00c804176c43 languageName: node linkType: hard -"@inquirer/type@npm:^1.0.5, @inquirer/type@npm:^1.1.2": - version: 1.1.2 - resolution: "@inquirer/type@npm:1.1.2" - checksum: a5747c3d3317790b6cfa92d3ae160bbd33c1500881a3a949cff0467d3d08a4b9f0d4aff10c34db727f4fdabbb9e16372243589e04003529cbb532affe3e201b4 +"@inquirer/type@npm:^1.0.5, @inquirer/type@npm:^1.1.4": + version: 1.1.4 + resolution: "@inquirer/type@npm:1.1.4" + checksum: 278ba6aa095ee65629a23e5586fd09e7d9a23e112bf208eb8bb7a6f187b81fdf3dbd1356f9b3c610cc323cae086aa8d5956059ee1f7f55b02adc980dcb52fadc languageName: node linkType: hard @@ -3590,17 +3609,17 @@ __metadata: languageName: node linkType: hard -"@jest/console@npm:^29.6.4": - version: 29.6.4 - resolution: "@jest/console@npm:29.6.4" +"@jest/console@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/console@npm:29.7.0" dependencies: "@jest/types": ^29.6.3 "@types/node": "*" chalk: ^4.0.0 - jest-message-util: ^29.6.3 - jest-util: ^29.6.3 + jest-message-util: ^29.7.0 + jest-util: ^29.7.0 slash: ^3.0.0 - checksum: 1caf061a39266b86e96ca13358401839e4d930742cbaa9e87e79d7ce170a83195e52e5b2d22eb5aa9a949219b61a163a81e337ec98b8323d88d79853051df96c + checksum: 0e3624e32c5a8e7361e889db70b170876401b7d70f509a2538c31d5cd50deb0c1ae4b92dc63fe18a0902e0a48c590c21d53787a0df41a52b34fa7cab96c384d6 languageName: node linkType: hard @@ -3645,14 +3664,14 @@ __metadata: languageName: node linkType: hard -"@jest/core@npm:^29.6.4": - version: 29.6.4 - resolution: "@jest/core@npm:29.6.4" +"@jest/core@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/core@npm:29.7.0" dependencies: - "@jest/console": ^29.6.4 - "@jest/reporters": ^29.6.4 - "@jest/test-result": ^29.6.4 - "@jest/transform": ^29.6.4 + "@jest/console": ^29.7.0 + "@jest/reporters": ^29.7.0 + "@jest/test-result": ^29.7.0 + "@jest/transform": ^29.7.0 "@jest/types": ^29.6.3 "@types/node": "*" ansi-escapes: ^4.2.1 @@ -3660,21 +3679,21 @@ __metadata: ci-info: ^3.2.0 exit: ^0.1.2 graceful-fs: ^4.2.9 - jest-changed-files: ^29.6.3 - jest-config: ^29.6.4 - jest-haste-map: ^29.6.4 - jest-message-util: ^29.6.3 + jest-changed-files: ^29.7.0 + jest-config: ^29.7.0 + jest-haste-map: ^29.7.0 + jest-message-util: ^29.7.0 jest-regex-util: ^29.6.3 - jest-resolve: ^29.6.4 - jest-resolve-dependencies: ^29.6.4 - jest-runner: ^29.6.4 - jest-runtime: ^29.6.4 - jest-snapshot: ^29.6.4 - jest-util: ^29.6.3 - jest-validate: ^29.6.3 - jest-watcher: ^29.6.4 + jest-resolve: ^29.7.0 + jest-resolve-dependencies: ^29.7.0 + jest-runner: ^29.7.0 + jest-runtime: ^29.7.0 + jest-snapshot: ^29.7.0 + jest-util: ^29.7.0 + jest-validate: ^29.7.0 + jest-watcher: ^29.7.0 micromatch: ^4.0.4 - pretty-format: ^29.6.3 + pretty-format: ^29.7.0 slash: ^3.0.0 strip-ansi: ^6.0.0 peerDependencies: @@ -3682,16 +3701,16 @@ __metadata: peerDependenciesMeta: node-notifier: optional: true - checksum: 0f36532c909775814cb7d4310d61881beaefdec6229ef0b7493c6191dfca20ae5222120846ea5ef8cdeaa8cef265aae9cea8989dcab572d8daea9afd14247c7a + checksum: af759c9781cfc914553320446ce4e47775ae42779e73621c438feb1e4231a5d4862f84b1d8565926f2d1aab29b3ec3dcfdc84db28608bdf5f29867124ebcfc0d languageName: node linkType: hard "@jest/create-cache-key-function@npm:^29.2.1": - version: 29.6.3 - resolution: "@jest/create-cache-key-function@npm:29.6.3" + version: 29.7.0 + resolution: "@jest/create-cache-key-function@npm:29.7.0" dependencies: "@jest/types": ^29.6.3 - checksum: 33f1f022d047b7e0fad60f41ac8aeac449ad176e8f8a70e1bc7bc570411e132b1a7944cd0844b9c176e23138ca9fef1977fc42cd078e994fd9dc6d7026286855 + checksum: 681bc761fa1d6fa3dd77578d444f97f28296ea80755e90e46d1c8fa68661b9e67f54dd38b988742db636d26cf160450dc6011892cec98b3a7ceb58cad8ff3aae languageName: node linkType: hard @@ -3707,34 +3726,34 @@ __metadata: languageName: node linkType: hard -"@jest/environment@npm:^29.6.4": - version: 29.6.4 - resolution: "@jest/environment@npm:29.6.4" +"@jest/environment@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/environment@npm:29.7.0" dependencies: - "@jest/fake-timers": ^29.6.4 + "@jest/fake-timers": ^29.7.0 "@jest/types": ^29.6.3 "@types/node": "*" - jest-mock: ^29.6.3 - checksum: 810d8f1fc26d293acfc44927bcb78adc58ed4ea580a64c8d94aa6c67239dcb149186bf25b94ff28b79de15253e0c877ad8d330feac205f185f3517593168510c + jest-mock: ^29.7.0 + checksum: 6fb398143b2543d4b9b8d1c6dbce83fa5247f84f550330604be744e24c2bd2178bb893657d62d1b97cf2f24baf85c450223f8237cccb71192c36a38ea2272934 languageName: node linkType: hard -"@jest/expect-utils@npm:^29.6.4": - version: 29.6.4 - resolution: "@jest/expect-utils@npm:29.6.4" +"@jest/expect-utils@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/expect-utils@npm:29.7.0" dependencies: jest-get-type: ^29.6.3 - checksum: a17059e02a4c0fca98e2abb7e9e58c70df3cd3d4ebcc6a960cb57c571726f7bd738c6cd008a9bf99770b77e92f7e21c75fe1f9ceec9b7a7710010f9340bb28ad + checksum: 75eb177f3d00b6331bcaa057e07c0ccb0733a1d0a1943e1d8db346779039cb7f103789f16e502f888a3096fb58c2300c38d1f3748b36a7fa762eb6f6d1b160ed languageName: node linkType: hard -"@jest/expect@npm:^29.6.4": - version: 29.6.4 - resolution: "@jest/expect@npm:29.6.4" +"@jest/expect@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/expect@npm:29.7.0" dependencies: - expect: ^29.6.4 - jest-snapshot: ^29.6.4 - checksum: e9d7306a96e2f9f9f7a0d93d41850cbad987ebda951a5d9a63d3f5fb61da4c1e41adb54af7f7222e4a185454ecb17ddc77845e18001ee28ac114f7a7fe9e671d + expect: ^29.7.0 + jest-snapshot: ^29.7.0 + checksum: a01cb85fd9401bab3370618f4b9013b90c93536562222d920e702a0b575d239d74cecfe98010aaec7ad464f67cf534a353d92d181646a4b792acaa7e912ae55e languageName: node linkType: hard @@ -3752,17 +3771,17 @@ __metadata: languageName: node linkType: hard -"@jest/fake-timers@npm:^29.6.4": - version: 29.6.4 - resolution: "@jest/fake-timers@npm:29.6.4" +"@jest/fake-timers@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/fake-timers@npm:29.7.0" dependencies: "@jest/types": ^29.6.3 "@sinonjs/fake-timers": ^10.0.2 "@types/node": "*" - jest-message-util: ^29.6.3 - jest-mock: ^29.6.3 - jest-util: ^29.6.3 - checksum: 3f06d1090cbaaf781920fe59b10509ad86b587c401818a066ee1550101c6203e0718f0f83bbd2afa8bdf7b43eb280f89fb9f8c98886094e53ccabe5e64de9be1 + jest-message-util: ^29.7.0 + jest-mock: ^29.7.0 + jest-util: ^29.7.0 + checksum: caf2bbd11f71c9241b458d1b5a66cbe95debc5a15d96442444b5d5c7ba774f523c76627c6931cca5e10e76f0d08761f6f1f01a608898f4751a0eee54fc3d8d00 languageName: node linkType: hard @@ -3777,15 +3796,15 @@ __metadata: languageName: node linkType: hard -"@jest/globals@npm:^29.6.4": - version: 29.6.4 - resolution: "@jest/globals@npm:29.6.4" +"@jest/globals@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/globals@npm:29.7.0" dependencies: - "@jest/environment": ^29.6.4 - "@jest/expect": ^29.6.4 + "@jest/environment": ^29.7.0 + "@jest/expect": ^29.7.0 "@jest/types": ^29.6.3 - jest-mock: ^29.6.3 - checksum: a41b18871a248151264668a38b13cb305f03db112bfd89ec44e858af0e79066e0b03d6b68c8baf1ec6c578be6fdb87519389c83438608b91471d17a5724858e0 + jest-mock: ^29.7.0 + checksum: 97dbb9459135693ad3a422e65ca1c250f03d82b2a77f6207e7fa0edd2c9d2015fbe4346f3dc9ebff1678b9d8da74754d4d440b7837497f8927059c0642a22123 languageName: node linkType: hard @@ -3827,14 +3846,14 @@ __metadata: languageName: node linkType: hard -"@jest/reporters@npm:^29.6.4": - version: 29.6.4 - resolution: "@jest/reporters@npm:29.6.4" +"@jest/reporters@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/reporters@npm:29.7.0" dependencies: "@bcoe/v8-coverage": ^0.2.3 - "@jest/console": ^29.6.4 - "@jest/test-result": ^29.6.4 - "@jest/transform": ^29.6.4 + "@jest/console": ^29.7.0 + "@jest/test-result": ^29.7.0 + "@jest/transform": ^29.7.0 "@jest/types": ^29.6.3 "@jridgewell/trace-mapping": ^0.3.18 "@types/node": "*" @@ -3848,9 +3867,9 @@ __metadata: istanbul-lib-report: ^3.0.0 istanbul-lib-source-maps: ^4.0.0 istanbul-reports: ^3.1.3 - jest-message-util: ^29.6.3 - jest-util: ^29.6.3 - jest-worker: ^29.6.4 + jest-message-util: ^29.7.0 + jest-util: ^29.7.0 + jest-worker: ^29.7.0 slash: ^3.0.0 string-length: ^4.0.1 strip-ansi: ^6.0.0 @@ -3860,7 +3879,7 @@ __metadata: peerDependenciesMeta: node-notifier: optional: true - checksum: 9ee0db497f3a826f535d3af0575ceb67984f9708bc6386450359517c212c67218ae98b8ea93ab05df2f920aed9c4166ef64209d66a09b7e30fc0077c91347ad0 + checksum: 7eadabd62cc344f629024b8a268ecc8367dba756152b761bdcb7b7e570a3864fc51b2a9810cd310d85e0a0173ef002ba4528d5ea0329fbf66ee2a3ada9c40455 languageName: node linkType: hard @@ -3928,15 +3947,15 @@ __metadata: languageName: node linkType: hard -"@jest/test-result@npm:^29.6.4": - version: 29.6.4 - resolution: "@jest/test-result@npm:29.6.4" +"@jest/test-result@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/test-result@npm:29.7.0" dependencies: - "@jest/console": ^29.6.4 + "@jest/console": ^29.7.0 "@jest/types": ^29.6.3 "@types/istanbul-lib-coverage": ^2.0.0 collect-v8-coverage: ^1.0.0 - checksum: a13c82d29038e80059191a1a443240678c6934ea832fdabaec12b3ece397b6303022a064494a6bbd167a024f04e6b4d9ace1001300927ff70405ec9d854f1193 + checksum: 67b6317d526e335212e5da0e768e3b8ab8a53df110361b80761353ad23b6aea4432b7c5665bdeb87658ea373b90fb1afe02ed3611ef6c858c7fba377505057fa languageName: node linkType: hard @@ -3952,15 +3971,15 @@ __metadata: languageName: node linkType: hard -"@jest/test-sequencer@npm:^29.6.4": - version: 29.6.4 - resolution: "@jest/test-sequencer@npm:29.6.4" +"@jest/test-sequencer@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/test-sequencer@npm:29.7.0" dependencies: - "@jest/test-result": ^29.6.4 + "@jest/test-result": ^29.7.0 graceful-fs: ^4.2.9 - jest-haste-map: ^29.6.4 + jest-haste-map: ^29.7.0 slash: ^3.0.0 - checksum: 517fc66b74a87431a8a1429e4505d85bd09c11f2ba835e46c07c79911fbee23b89c01ec444c7c1d12d1b36f9eba60fcbbccc8e1bc1ae54a1a8b03b5f530ff81b + checksum: 73f43599017946be85c0b6357993b038f875b796e2f0950487a82f4ebcb115fa12131932dd9904026b4ad8be131fe6e28bd8d0aa93b1563705185f9804bff8bd languageName: node linkType: hard @@ -3987,9 +4006,9 @@ __metadata: languageName: node linkType: hard -"@jest/transform@npm:^29.6.4": - version: 29.6.4 - resolution: "@jest/transform@npm:29.6.4" +"@jest/transform@npm:^29.7.0": + version: 29.7.0 + resolution: "@jest/transform@npm:29.7.0" dependencies: "@babel/core": ^7.11.6 "@jest/types": ^29.6.3 @@ -3999,14 +4018,14 @@ __metadata: convert-source-map: ^2.0.0 fast-json-stable-stringify: ^2.1.0 graceful-fs: ^4.2.9 - jest-haste-map: ^29.6.4 + jest-haste-map: ^29.7.0 jest-regex-util: ^29.6.3 - jest-util: ^29.6.3 + jest-util: ^29.7.0 micromatch: ^4.0.4 pirates: ^4.0.4 slash: ^3.0.0 write-file-atomic: ^4.0.2 - checksum: 0341a200a0bb926fc67ab9aede91c7b4009458206495e92057e72a115c55da5fed117457e68c6ea821e24c58b55da75c6a7b0f272ed63c2693db583d689a3383 + checksum: 0f8ac9f413903b3cb6d240102db848f2a354f63971ab885833799a9964999dd51c388162106a807f810071f864302cdd8e3f0c241c29ce02d85a36f18f3f40ab languageName: node linkType: hard @@ -4156,6 +4175,7 @@ __metadata: "@lightsparkdev/eslint-config": "*" "@lightsparkdev/tsconfig": 0.0.0 "@types/crypto-js": ^4.1.1 + "@types/secp256k1": ^4.0.3 "@types/ws": ^8.5.4 auto-bind: ^5.0.1 crypto: ^1.0.1 @@ -4168,6 +4188,7 @@ __metadata: jest: ^29.6.2 prettier: 3.0.2 prettier-plugin-organize-imports: ^3.2.2 + secp256k1: ^5.0.0 text-encoding: ^0.7.0 ts-jest: ^29.1.1 tsc-absolute: ^1.0.1 @@ -5121,7 +5142,7 @@ __metadata: languageName: node linkType: hard -"@rollup/pluginutils@npm:^5.0.2": +"@rollup/pluginutils@npm:^5.0.4": version: 5.0.4 resolution: "@rollup/pluginutils@npm:5.0.4" dependencies: @@ -5138,9 +5159,9 @@ __metadata: linkType: hard "@rushstack/eslint-patch@npm:^1.1.0": - version: 1.3.3 - resolution: "@rushstack/eslint-patch@npm:1.3.3" - checksum: fd8a19ec5842634da8e4c2c479a4d13ecbefa4f212e42c7f9c39e8706f9eeef7a50db8d6ea939884ac0ff36bb21930c9642068cf68e8309ad491c54f2fc30c01 + version: 1.4.0 + resolution: "@rushstack/eslint-patch@npm:1.4.0" + checksum: 29b216288deda3dee69dfb49adb1d809217d67331775a854de18771905268a65c11be5325313d47fb1c62ea0b477733e17310bc9708ccb7f3fb6f0a3816b82d9 languageName: node linkType: hard @@ -5246,6 +5267,15 @@ __metadata: languageName: node linkType: hard +"@svgr/babel-plugin-add-jsx-attribute@npm:8.0.0": + version: 8.0.0 + resolution: "@svgr/babel-plugin-add-jsx-attribute@npm:8.0.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 3fc8e35d16f5abe0af5efe5851f27581225ac405d6a1ca44cda0df064cddfcc29a428c48c2e4bef6cebf627c9ac2f652a096030edb02cf5a120ce28d3c234710 + languageName: node + linkType: hard + "@svgr/babel-plugin-add-jsx-attribute@npm:^5.4.0": version: 5.4.0 resolution: "@svgr/babel-plugin-add-jsx-attribute@npm:5.4.0" @@ -5262,6 +5292,15 @@ __metadata: languageName: node linkType: hard +"@svgr/babel-plugin-remove-jsx-attribute@npm:8.0.0": + version: 8.0.0 + resolution: "@svgr/babel-plugin-remove-jsx-attribute@npm:8.0.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: ff992893c6c4ac802713ba3a97c13be34e62e6d981c813af40daabcd676df68a72a61bd1e692bb1eda3587f1b1d700ea462222ae2153bb0f46886632d4f88d08 + languageName: node + linkType: hard + "@svgr/babel-plugin-remove-jsx-attribute@npm:^5.4.0": version: 5.4.0 resolution: "@svgr/babel-plugin-remove-jsx-attribute@npm:5.4.0" @@ -5278,6 +5317,15 @@ __metadata: languageName: node linkType: hard +"@svgr/babel-plugin-remove-jsx-empty-expression@npm:8.0.0": + version: 8.0.0 + resolution: "@svgr/babel-plugin-remove-jsx-empty-expression@npm:8.0.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 0fb691b63a21bac00da3aa2dccec50d0d5a5b347ff408d60803b84410d8af168f2656e4ba1ee1f24dab0ae4e4af77901f2928752bb0434c1f6788133ec599ec8 + languageName: node + linkType: hard + "@svgr/babel-plugin-remove-jsx-empty-expression@npm:^5.0.1": version: 5.0.1 resolution: "@svgr/babel-plugin-remove-jsx-empty-expression@npm:5.0.1" @@ -5294,6 +5342,15 @@ __metadata: languageName: node linkType: hard +"@svgr/babel-plugin-replace-jsx-attribute-value@npm:8.0.0": + version: 8.0.0 + resolution: "@svgr/babel-plugin-replace-jsx-attribute-value@npm:8.0.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 1edda65ef4f4dd8f021143c8ec276a08f6baa6f733b8e8ee2e7775597bf6b97afb47fdeefd579d6ae6c959fe2e634f55cd61d99377631212228c8cfb351b8921 + languageName: node + linkType: hard + "@svgr/babel-plugin-replace-jsx-attribute-value@npm:^5.0.1": version: 5.0.1 resolution: "@svgr/babel-plugin-replace-jsx-attribute-value@npm:5.0.1" @@ -5310,6 +5367,15 @@ __metadata: languageName: node linkType: hard +"@svgr/babel-plugin-svg-dynamic-title@npm:8.0.0": + version: 8.0.0 + resolution: "@svgr/babel-plugin-svg-dynamic-title@npm:8.0.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 876cec891488992e6a9aebb8155e2bea4ec461b4718c51de36e988e00e271c6d9d01ef6be17b9effd44b2b3d7db0b41c161a5904a46ae6f38b26b387ad7f3709 + languageName: node + linkType: hard + "@svgr/babel-plugin-svg-dynamic-title@npm:^5.4.0": version: 5.4.0 resolution: "@svgr/babel-plugin-svg-dynamic-title@npm:5.4.0" @@ -5326,6 +5392,15 @@ __metadata: languageName: node linkType: hard +"@svgr/babel-plugin-svg-em-dimensions@npm:8.0.0": + version: 8.0.0 + resolution: "@svgr/babel-plugin-svg-em-dimensions@npm:8.0.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: be0e2d391164428327d9ec469a52cea7d93189c6b0e2c290999e048f597d777852f701c64dca44cd45b31ed14a7f859520326e2e4ad7c3a4545d0aa235bc7e9a + languageName: node + linkType: hard + "@svgr/babel-plugin-svg-em-dimensions@npm:^5.4.0": version: 5.4.0 resolution: "@svgr/babel-plugin-svg-em-dimensions@npm:5.4.0" @@ -5342,6 +5417,15 @@ __metadata: languageName: node linkType: hard +"@svgr/babel-plugin-transform-react-native-svg@npm:8.1.0": + version: 8.1.0 + resolution: "@svgr/babel-plugin-transform-react-native-svg@npm:8.1.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 85b434a57572f53bd2b9f0606f253e1fcf57b4a8c554ec3f2d43ed17f50d8cae200cb3aaf1ec9d626e1456e8b135dce530ae047eb0bed6d4bf98a752d6640459 + languageName: node + linkType: hard + "@svgr/babel-plugin-transform-react-native-svg@npm:^5.4.0": version: 5.4.0 resolution: "@svgr/babel-plugin-transform-react-native-svg@npm:5.4.0" @@ -5358,6 +5442,15 @@ __metadata: languageName: node linkType: hard +"@svgr/babel-plugin-transform-svg-component@npm:8.0.0": + version: 8.0.0 + resolution: "@svgr/babel-plugin-transform-svg-component@npm:8.0.0" + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 04e2023d75693eeb0890341c40e449881184663056c249be7e5c80168e4aabb0fadd255e8d5d2dbf54b8c2a6e700efba994377135bfa4060dc4a2e860116ef8c + languageName: node + linkType: hard + "@svgr/babel-plugin-transform-svg-component@npm:^5.5.0": version: 5.5.0 resolution: "@svgr/babel-plugin-transform-svg-component@npm:5.5.0" @@ -5374,6 +5467,24 @@ __metadata: languageName: node linkType: hard +"@svgr/babel-preset@npm:8.1.0": + version: 8.1.0 + resolution: "@svgr/babel-preset@npm:8.1.0" + dependencies: + "@svgr/babel-plugin-add-jsx-attribute": 8.0.0 + "@svgr/babel-plugin-remove-jsx-attribute": 8.0.0 + "@svgr/babel-plugin-remove-jsx-empty-expression": 8.0.0 + "@svgr/babel-plugin-replace-jsx-attribute-value": 8.0.0 + "@svgr/babel-plugin-svg-dynamic-title": 8.0.0 + "@svgr/babel-plugin-svg-em-dimensions": 8.0.0 + "@svgr/babel-plugin-transform-react-native-svg": 8.1.0 + "@svgr/babel-plugin-transform-svg-component": 8.0.0 + peerDependencies: + "@babel/core": ^7.0.0-0 + checksum: 3a67930f080b8891e1e8e2595716b879c944d253112bae763dce59807ba23454d162216c8d66a0a0e3d4f38a649ecd6c387e545d1e1261dd69a68e9a3392ee08 + languageName: node + linkType: hard + "@svgr/babel-preset@npm:^5.5.0": version: 5.5.0 resolution: "@svgr/babel-preset@npm:5.5.0" @@ -5431,6 +5542,29 @@ __metadata: languageName: node linkType: hard +"@svgr/core@npm:^8.1.0": + version: 8.1.0 + resolution: "@svgr/core@npm:8.1.0" + dependencies: + "@babel/core": ^7.21.3 + "@svgr/babel-preset": 8.1.0 + camelcase: ^6.2.0 + cosmiconfig: ^8.1.3 + snake-case: ^3.0.4 + checksum: da4a12865c7dc59829d58df8bd232d6c85b7115fda40da0d2f844a1a51886e2e945560596ecfc0345d37837ac457de86a931e8b8d8550e729e0c688c02250d8a + languageName: node + linkType: hard + +"@svgr/hast-util-to-babel-ast@npm:8.0.0": + version: 8.0.0 + resolution: "@svgr/hast-util-to-babel-ast@npm:8.0.0" + dependencies: + "@babel/types": ^7.21.3 + entities: ^4.4.0 + checksum: 88401281a38bbc7527e65ff5437970414391a86158ef4b4046c89764c156d2d39ecd7cce77be8a51994c9fb3249170cb1eb8b9128b62faaa81743ef6ed3534ab + languageName: node + linkType: hard + "@svgr/hast-util-to-babel-ast@npm:^5.5.0": version: 5.5.0 resolution: "@svgr/hast-util-to-babel-ast@npm:5.5.0" @@ -5474,6 +5608,20 @@ __metadata: languageName: node linkType: hard +"@svgr/plugin-jsx@npm:^8.1.0": + version: 8.1.0 + resolution: "@svgr/plugin-jsx@npm:8.1.0" + dependencies: + "@babel/core": ^7.21.3 + "@svgr/babel-preset": 8.1.0 + "@svgr/hast-util-to-babel-ast": 8.0.0 + svg-parser: ^2.0.4 + peerDependencies: + "@svgr/core": "*" + checksum: 0418a9780753d3544912ee2dad5d2cf8d12e1ba74df8053651b3886aeda54d5f0f7d2dece0af5e0d838332c4f139a57f0dabaa3ca1afa4d1a765efce6a7656f2 + languageName: node + linkType: hard + "@svgr/plugin-svgo@npm:^5.5.0": version: 5.5.0 resolution: "@svgr/plugin-svgo@npm:5.5.0" @@ -5623,43 +5771,43 @@ __metadata: linkType: hard "@types/babel__core@npm:^7.0.0, @types/babel__core@npm:^7.1.14": - version: 7.20.1 - resolution: "@types/babel__core@npm:7.20.1" + version: 7.20.2 + resolution: "@types/babel__core@npm:7.20.2" dependencies: "@babel/parser": ^7.20.7 "@babel/types": ^7.20.7 "@types/babel__generator": "*" "@types/babel__template": "*" "@types/babel__traverse": "*" - checksum: 9fcd9691a33074802d9057ff70b0e3ff3778f52470475b68698a0f6714fbe2ccb36c16b43dc924eb978cd8a81c1f845e5ff4699e7a47606043b539eb8c6331a8 + checksum: 564fbaa8ff1305d50807ada0ec227c3e7528bebb2f8fe6b2ed88db0735a31511a74ad18729679c43eeed8025ed29d408f53059289719e95ab1352ed559a100bd languageName: node linkType: hard "@types/babel__generator@npm:*": - version: 7.6.4 - resolution: "@types/babel__generator@npm:7.6.4" + version: 7.6.5 + resolution: "@types/babel__generator@npm:7.6.5" dependencies: "@babel/types": ^7.0.0 - checksum: 20effbbb5f8a3a0211e95959d06ae70c097fb6191011b73b38fe86deebefad8e09ee014605e0fd3cdaedc73d158be555866810e9166e1f09e4cfd880b874dcb0 + checksum: c7459f5025c4c800eaf58f4db3b24e9d736331fe7df40961d9bc49f31b46e2a3be83dc9276e8688f10a5ed752ae153ad5f1bdd45e2245bac95273730b9115ec2 languageName: node linkType: hard "@types/babel__template@npm:*": - version: 7.4.1 - resolution: "@types/babel__template@npm:7.4.1" + version: 7.4.2 + resolution: "@types/babel__template@npm:7.4.2" dependencies: "@babel/parser": ^7.1.0 "@babel/types": ^7.0.0 - checksum: 649fe8b42c2876be1fd28c6ed9b276f78152d5904ec290b6c861d9ef324206e0a5c242e8305c421ac52ecf6358fa7e32ab7a692f55370484825c1df29b1596ee + checksum: 0fe977b45a3269336c77f3ae4641a6c48abf0fa35ab1a23fb571690786af02d6cec08255a43499b0b25c5633800f7ae882ace450cce905e3060fa9e6995047ae languageName: node linkType: hard "@types/babel__traverse@npm:*, @types/babel__traverse@npm:^7.0.4, @types/babel__traverse@npm:^7.0.6": - version: 7.20.1 - resolution: "@types/babel__traverse@npm:7.20.1" + version: 7.20.2 + resolution: "@types/babel__traverse@npm:7.20.2" dependencies: "@babel/types": ^7.20.7 - checksum: 58341e23c649c0eba134a1682d4f20d027fad290d92e5740faa1279978f6ed476fc467ae51ce17a877e2566d805aeac64eae541168994367761ec883a4150221 + checksum: 981340286479524436348d32373eaa3bf993c635cbf70307b4b69463eee83406a959ac4844f683911e0db8ab8d9f0025ab630dc7a8c170fee9ee74144c2a528f languageName: node linkType: hard @@ -5671,21 +5819,21 @@ __metadata: linkType: hard "@types/body-parser@npm:*": - version: 1.19.2 - resolution: "@types/body-parser@npm:1.19.2" + version: 1.19.3 + resolution: "@types/body-parser@npm:1.19.3" dependencies: "@types/connect": "*" "@types/node": "*" - checksum: e17840c7d747a549f00aebe72c89313d09fbc4b632b949b2470c5cb3b1cb73863901ae84d9335b567a79ec5efcfb8a28ff8e3f36bc8748a9686756b6d5681f40 + checksum: 932fa71437c275023799123680ef26ffd90efd37f51a1abe405e6ae6e5b4ad9511b7a3a8f5a12877ed1444a02b6286c0a137a98e914b3c61932390c83643cc2c languageName: node linkType: hard "@types/bonjour@npm:^3.5.9": - version: 3.5.10 - resolution: "@types/bonjour@npm:3.5.10" + version: 3.5.11 + resolution: "@types/bonjour@npm:3.5.11" dependencies: "@types/node": "*" - checksum: bfcadb042a41b124c4e3de4925e3be6d35b78f93f27c4535d5ff86980dc0f8bc407ed99b9b54528952dc62834d5a779392f7a12c2947dd19330eb05a6bcae15a + checksum: 12fb86a1bb4a610f16ef6d7d68f85e7c31070029f02b6622073794a271e75abcf58230ed205a2ae23c53be2c08b9e507d3b91fa0dc9dfe76c4b1f5e19e9370cb languageName: node linkType: hard @@ -5784,18 +5932,18 @@ __metadata: linkType: hard "@types/filesystem@npm:*": - version: 0.0.32 - resolution: "@types/filesystem@npm:0.0.32" + version: 0.0.33 + resolution: "@types/filesystem@npm:0.0.33" dependencies: "@types/filewriter": "*" - checksum: 4b9079d200a3b241722b90e1c5806c4b32c4dac87d42a1c7ef76a2c0dafdbe7d5f1a379b873ad5de73622b44de6599e1522908f67b938d54e785bd1c36e302a0 + checksum: 49fc883317beef658d463994117676c0f494743c17d9d191e4c7c9764000490f7c657218b4a5427a076e399086cf6e2aa30e70fc6787a29646339813eb921a43 languageName: node linkType: hard "@types/filewriter@npm:*": - version: 0.0.29 - resolution: "@types/filewriter@npm:0.0.29" - checksum: 0c58aa875c2c245be7dbc42b20212f3203e13d11ec013a4a5cd0febf0e8b87214be5882c05ff9d7bdf0398f145a4fdbc24b7e6cf7b094e134a3b4c7a0598502f + version: 0.0.30 + resolution: "@types/filewriter@npm:0.0.30" + checksum: 95d9484e1ba9ed8e2c670042ac49ddeab4c6f365e4297befdd9a3eee9596fd65808f064dd79e2a2ed2cecde46055c73736618d28e22d90dbdfd2f8be67d65ebe languageName: node linkType: hard @@ -5810,18 +5958,18 @@ __metadata: linkType: hard "@types/graceful-fs@npm:^4.1.2, @types/graceful-fs@npm:^4.1.3": - version: 4.1.6 - resolution: "@types/graceful-fs@npm:4.1.6" + version: 4.1.7 + resolution: "@types/graceful-fs@npm:4.1.7" dependencies: "@types/node": "*" - checksum: c3070ccdc9ca0f40df747bced1c96c71a61992d6f7c767e8fd24bb6a3c2de26e8b84135ede000b7e79db530a23e7e88dcd9db60eee6395d0f4ce1dae91369dd4 + checksum: 8b97e208f85c9efd02a6003a582c77646dd87be0af13aec9419a720771560a8a87a979eaca73ae193d7c73127f34d0a958403a9b5d6246e450289fd8c79adf09 languageName: node linkType: hard "@types/har-format@npm:*": - version: 1.2.12 - resolution: "@types/har-format@npm:1.2.12" - checksum: f52c1617859983437f4c06d02fda052500c0e5b2e8ffd5deb0172f1adc2222d4569db2df3ca2b99007c2572dbae01ba7a042b51e7b6ec6a4a44d53eea8230895 + version: 1.2.13 + resolution: "@types/har-format@npm:1.2.13" + checksum: d322ee0282bc9206c697ec04c0a19abe8df581e2fe0f04114fd51d28fa854092ebdfbfcff66f9f2d661c93274230c4545a42df352d42cd01874517a77f2764bc languageName: node linkType: hard @@ -5833,18 +5981,18 @@ __metadata: linkType: hard "@types/http-errors@npm:*": - version: 2.0.1 - resolution: "@types/http-errors@npm:2.0.1" - checksum: 3bb0c50b0a652e679a84c30cd0340d696c32ef6558518268c238840346c077f899315daaf1c26c09c57ddd5dc80510f2a7f46acd52bf949e339e35ed3ee9654f + version: 2.0.2 + resolution: "@types/http-errors@npm:2.0.2" + checksum: d7f14045240ac4b563725130942b8e5c8080bfabc724c8ff3f166ea928ff7ae02c5194763bc8f6aaf21897e8a44049b0492493b9de3e058247e58fdfe0f86692 languageName: node linkType: hard "@types/http-proxy@npm:^1.17.8": - version: 1.17.11 - resolution: "@types/http-proxy@npm:1.17.11" + version: 1.17.12 + resolution: "@types/http-proxy@npm:1.17.12" dependencies: "@types/node": "*" - checksum: 38ef4f8c91c7a5b664cf6dd4d90de7863f88549a9f8ef997f2f1184e4f8cf2e7b9b63c04f0b7b962f34a09983073a31a9856de5aae5159b2ddbb905a4c44dc9f + checksum: 89700c8e3c8f2c59c87c8db8e7a070c97a3b30a4a38223aca6b8b817e6f2ca931f5a500e16ecadc1ebcfed2676cc60e073d8f887e621d84420298728ec6fd000 languageName: node linkType: hard @@ -5883,21 +6031,21 @@ __metadata: linkType: hard "@types/jest@npm:^29.2.1, @types/jest@npm:^29.5.3": - version: 29.5.4 - resolution: "@types/jest@npm:29.5.4" + version: 29.5.5 + resolution: "@types/jest@npm:29.5.5" dependencies: expect: ^29.0.0 pretty-format: ^29.0.0 - checksum: 38ed5942f44336452efd0f071eab60aaa57cd8d46530348d0a3aa5a691dcbf1366c4ca8f6ee8364efb45b4413bfefae443e5d4f469246a472a03b21ac11cd4ed + checksum: 56e55cde9949bcc0ee2fa34ce5b7c32c2bfb20e53424aa4ff3a210859eeaaa3fdf6f42f81a3f655238039cdaaaf108b054b7a8602f394e6c52b903659338d8c6 languageName: node linkType: hard "@types/jquery@npm:^3.5.5": - version: 3.5.18 - resolution: "@types/jquery@npm:3.5.18" + version: 3.5.19 + resolution: "@types/jquery@npm:3.5.19" dependencies: "@types/sizzle": "*" - checksum: 6576bc9a6d35671ceb464e8f937b7eb916227b38b4edf8769a0bc628cfbb9f211b61ccd4158d42aa31591f2c6766b7095430f820d374f70245258ac6cec3e439 + checksum: 0298e53a353089e2abae4be2f660b5f2bfb4797464623701c5c2f2c911317b554f1887c2c3d587d0f724d70a3fb5e31907bf7fa5d96df33af07e2842660ef52a languageName: node linkType: hard @@ -5913,9 +6061,9 @@ __metadata: linkType: hard "@types/json-schema@npm:*, @types/json-schema@npm:^7.0.12, @types/json-schema@npm:^7.0.4, @types/json-schema@npm:^7.0.5, @types/json-schema@npm:^7.0.8, @types/json-schema@npm:^7.0.9": - version: 7.0.12 - resolution: "@types/json-schema@npm:7.0.12" - checksum: 00239e97234eeb5ceefb0c1875d98ade6e922bfec39dd365ec6bd360b5c2f825e612ac4f6e5f1d13601b8b30f378f15e6faa805a3a732f4a1bbe61915163d293 + version: 7.0.13 + resolution: "@types/json-schema@npm:7.0.13" + checksum: 345df21a678fa72fb389f35f33de77833d09d4a142bb2bcb27c18690efa4cf70fc2876e43843cefb3fbdb9fcb12cd3e970a90936df30f53bbee899865ff605ab languageName: node linkType: hard @@ -5927,11 +6075,11 @@ __metadata: linkType: hard "@types/jsonwebtoken@npm:^9.0.2": - version: 9.0.2 - resolution: "@types/jsonwebtoken@npm:9.0.2" + version: 9.0.3 + resolution: "@types/jsonwebtoken@npm:9.0.3" dependencies: "@types/node": "*" - checksum: 3bb8d40e78d7eb53e427db6e9f0f22e0890cfee80965dcf741d08341814913afb211306de6e9847c6d241cc8e36f8a59090cbfdcc510ab7c81af9d650c5afe0e + checksum: 2debf3adb19b827a023205234ec439b7258aee6ca9273472abe360738a84f08db78c6e853172e842ec303169ec0bb2df39701ab9a13b9e7868fe284ef9136567 languageName: node linkType: hard @@ -5997,10 +6145,10 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:^20.2.5, @types/node@npm:^20.5.6": - version: 20.6.0 - resolution: "@types/node@npm:20.6.0" - checksum: 52611801af5cf151c6fac1963aa4a8a8ca2e388a9e9ed82b01b70bca762088ded5b32cc789c5564220d5d7dccba2b8dd34446a3d4fc74736805e1f2cf262e29d +"@types/node@npm:*, @types/node@npm:^20.2.5, @types/node@npm:^20.6.0": + version: 20.6.3 + resolution: "@types/node@npm:20.6.3" + checksum: 444a6f1f41cfa8d3e20ce0108e6e43960fb2ae0e481f233bb1c14d6252aa63a92e021de561cd317d9fdb411688f871065f40175a1f18763282dee2613a08f8a3 languageName: node linkType: hard @@ -6033,9 +6181,9 @@ __metadata: linkType: hard "@types/prop-types@npm:*": - version: 15.7.5 - resolution: "@types/prop-types@npm:15.7.5" - checksum: 5b43b8b15415e1f298243165f1d44390403bb2bd42e662bca3b5b5633fdd39c938e91b7fce3a9483699db0f7a715d08cef220c121f723a634972fdf596aec980 + version: 15.7.6 + resolution: "@types/prop-types@npm:15.7.6" + checksum: 5f2796c7330461a556c4d18035fb914b372f96b1619a4f8302d07e1ea708e06a2dbe666dfcd8ff03f64c625aa4c12b31f677d0298a32910f5ab7ee51521d8086 languageName: node linkType: hard @@ -6086,22 +6234,22 @@ __metadata: linkType: hard "@types/react-test-renderer@npm:>=16.9.0": - version: 18.0.1 - resolution: "@types/react-test-renderer@npm:18.0.1" + version: 18.0.2 + resolution: "@types/react-test-renderer@npm:18.0.2" dependencies: "@types/react": "*" - checksum: ec149c2ab4d76c7286ef5d8ca9546765632e0c7a0788e5850081af38526f7fcb6413641e083520ee4b2fc57755f475990fbfabcbcdda8d954aa708708c866a96 + checksum: 2845b05adcb28180e530b63c47495b2c0beb1a669a0ce962dcfa6ed5b88d37c8438de1f29cb2e599b5f229307a4479e424677407111a571bbcab06bd538ea1df languageName: node linkType: hard "@types/react@npm:*, @types/react@npm:>=16.9.0, @types/react@npm:^18.2.12": - version: 18.2.21 - resolution: "@types/react@npm:18.2.21" + version: 18.2.22 + resolution: "@types/react@npm:18.2.22" dependencies: "@types/prop-types": "*" "@types/scheduler": "*" csstype: ^3.0.2 - checksum: ffed203bfe7aad772b8286f7953305c9181ac3a8f27d3f5400fbbc2a8e27ca8e5bbff818ee014f39ca0d19d2b3bb154e5bdbec7e232c6f80b59069375aa78349 + checksum: 44289523dabaadcd3fd85689abb98f9ebcc8492d7e978348d1c986138acef4801030b279e89a19e38a6319e294bcea77559e37e0c803e4bacf2b8ae3a56ba587 languageName: node linkType: hard @@ -6154,9 +6302,9 @@ __metadata: linkType: hard "@types/semver@npm:^7.3.12, @types/semver@npm:^7.5.0": - version: 7.5.1 - resolution: "@types/semver@npm:7.5.1" - checksum: 2fffe938c7ac168711f245a16e1856a3578d77161ca17e29a05c3e02c7be3e9c5beefa29a3350f6c1bd982fb70aa28cc52e4845eb7d36246bcdc0377170d584d + version: 7.5.2 + resolution: "@types/semver@npm:7.5.2" + checksum: 743aa8a2b58e20b329c19bd2459152cb049d12fafab7279b90ac11e0f268c97efbcb606ea0c681cca03f79015381b40d9b1244349b354270bec3f939ed49f6e9 languageName: node linkType: hard @@ -6221,23 +6369,23 @@ __metadata: linkType: hard "@types/tough-cookie@npm:*": - version: 4.0.2 - resolution: "@types/tough-cookie@npm:4.0.2" - checksum: e055556ffdaa39ad85ede0af192c93f93f986f4bd9e9426efdc2948e3e2632db3a4a584d4937dbf6d7620527419bc99e6182d3daf2b08685e710f2eda5291905 + version: 4.0.3 + resolution: "@types/tough-cookie@npm:4.0.3" + checksum: f201be1bbca2f2d3572032513cdb9825845114d2604a7f4091af848eeee3228a573cdc5e8082b04468a2848bb1d058f1adbb97db822e22c975ebd6fcd851a453 languageName: node linkType: hard "@types/trusted-types@npm:^2.0.2": - version: 2.0.3 - resolution: "@types/trusted-types@npm:2.0.3" - checksum: 4794804bc4a4a173d589841b6d26cf455ff5dc4f3e704e847de7d65d215f2e7043d8757e4741ce3a823af3f08260a8d04a1a6e9c5ec9b20b7b04586956a6b005 + version: 2.0.4 + resolution: "@types/trusted-types@npm:2.0.4" + checksum: 5256c4576cd1c90d33ddd9cc9cbd4f202b39c98cbe8b7f74963298f9eb2159c285ea5c25a6181b4c594d8d75641765bff85d72c2d251ad076e6529ce0eeedd1c languageName: node linkType: hard "@types/uuid@npm:^9.0.1": - version: 9.0.3 - resolution: "@types/uuid@npm:9.0.3" - checksum: 3dde198defd71c067dd14b3050a8fe6d1ead5fe94ec318472e2c30a399d13f18941fe66cffabdcac7267177c9de2f975fdee6f0cc87cde610a2578e1ce4cc3af + version: 9.0.4 + resolution: "@types/uuid@npm:9.0.4" + checksum: 356e2504456eaebbc43a5af5ca6c07d71f5ae5520b5767cb1c62cd0ec55475fc4ee3d16a2874f4a5fce78e40e8583025afd3a7d9ba41f82939de310665f53f0e languageName: node linkType: hard @@ -6316,14 +6464,14 @@ __metadata: linkType: hard "@typescript-eslint/eslint-plugin@npm:^6.0.0, @typescript-eslint/eslint-plugin@npm:^6.2.0": - version: 6.6.0 - resolution: "@typescript-eslint/eslint-plugin@npm:6.6.0" + version: 6.7.2 + resolution: "@typescript-eslint/eslint-plugin@npm:6.7.2" dependencies: "@eslint-community/regexpp": ^4.5.1 - "@typescript-eslint/scope-manager": 6.6.0 - "@typescript-eslint/type-utils": 6.6.0 - "@typescript-eslint/utils": 6.6.0 - "@typescript-eslint/visitor-keys": 6.6.0 + "@typescript-eslint/scope-manager": 6.7.2 + "@typescript-eslint/type-utils": 6.7.2 + "@typescript-eslint/utils": 6.7.2 + "@typescript-eslint/visitor-keys": 6.7.2 debug: ^4.3.4 graphemer: ^1.4.0 ignore: ^5.2.4 @@ -6336,7 +6484,7 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: ed41c6df87096706777e9c1f53adabd998fd840691b57f5b68b18903e567f16c0a8354ff0ad29229c249f29440ba4a017c9fe966da182a455dde9769232a4344 + checksum: 4d6f612619282a20518cd6581bce16cd7c50ac4e49f5eeca2ab916a923049379aa382817568c929216381fb2c1bfbc1c4e6fde16ac8bfdd63862a9126f0ab797 languageName: node linkType: hard @@ -6369,20 +6517,20 @@ __metadata: linkType: hard "@typescript-eslint/parser@npm:^6.0.0": - version: 6.6.0 - resolution: "@typescript-eslint/parser@npm:6.6.0" + version: 6.7.2 + resolution: "@typescript-eslint/parser@npm:6.7.2" dependencies: - "@typescript-eslint/scope-manager": 6.6.0 - "@typescript-eslint/types": 6.6.0 - "@typescript-eslint/typescript-estree": 6.6.0 - "@typescript-eslint/visitor-keys": 6.6.0 + "@typescript-eslint/scope-manager": 6.7.2 + "@typescript-eslint/types": 6.7.2 + "@typescript-eslint/typescript-estree": 6.7.2 + "@typescript-eslint/visitor-keys": 6.7.2 debug: ^4.3.4 peerDependencies: eslint: ^7.0.0 || ^8.0.0 peerDependenciesMeta: typescript: optional: true - checksum: b2d0082b6acc1a85997ebbb60fc73a43f3fe5e5028cb4130938a2cffddc94872c8e0d00a1742be8f8b755bc1994d43b55b7e4660dc88946744094ff2aca4ffd3 + checksum: 9e93d3eb432ed5457a852e25a31782d07518f728966cd477620175ae64db9be04f5d8e605f3561dbfe9a365f209a83b2a3788efb9b3cf33669c8bca17f1bcf6f languageName: node linkType: hard @@ -6396,13 +6544,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:6.6.0": - version: 6.6.0 - resolution: "@typescript-eslint/scope-manager@npm:6.6.0" +"@typescript-eslint/scope-manager@npm:6.7.2": + version: 6.7.2 + resolution: "@typescript-eslint/scope-manager@npm:6.7.2" dependencies: - "@typescript-eslint/types": 6.6.0 - "@typescript-eslint/visitor-keys": 6.6.0 - checksum: 18b552fee98894c4f35e9f3d71a276f266ad4e2d7c6b9bb32a9b25caa36cc3768928676972b4e78308098ad53fa8dc6626a82810f17d51c667ce959da3ac11bc + "@typescript-eslint/types": 6.7.2 + "@typescript-eslint/visitor-keys": 6.7.2 + checksum: e35fa23ecb16252c3ad00b5f1ec05d9b8d33ee30d4c57543892f900443ed77926be9bd2836f06463c31b483f5f0f79070273bc51c4a606f55ac3cd1d9c9cd542 languageName: node linkType: hard @@ -6423,12 +6571,12 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:6.6.0": - version: 6.6.0 - resolution: "@typescript-eslint/type-utils@npm:6.6.0" +"@typescript-eslint/type-utils@npm:6.7.2": + version: 6.7.2 + resolution: "@typescript-eslint/type-utils@npm:6.7.2" dependencies: - "@typescript-eslint/typescript-estree": 6.6.0 - "@typescript-eslint/utils": 6.6.0 + "@typescript-eslint/typescript-estree": 6.7.2 + "@typescript-eslint/utils": 6.7.2 debug: ^4.3.4 ts-api-utils: ^1.0.1 peerDependencies: @@ -6436,7 +6584,7 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: be68ebc1d8da9d4db48933cfd5c8f22382fdf1faf4116b0eb929c65eaeaf00ef224f38b03e7f6ea2de4496d046380876dd5db514c65d078ebc7a25e771a61265 + checksum: 67743f8e4b77d0ab3d82907eda0411ffd221357b60ac9cbd29683d5b8c77127369ebfafcf0bfc30a1f1828927ccd5635fab5b2eaf2b2f1d12a9361549cab3e62 languageName: node linkType: hard @@ -6454,10 +6602,10 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/types@npm:6.6.0": - version: 6.6.0 - resolution: "@typescript-eslint/types@npm:6.6.0" - checksum: d0642ad52e904062a4ac75ac4e6cc51d81ec6030f8830e230df476e69786d3232d45ca0c9ce011add9ede13f0eba4ab7f1eaf679954c6602cf4f43e1ba002be9 +"@typescript-eslint/types@npm:6.7.2": + version: 6.7.2 + resolution: "@typescript-eslint/types@npm:6.7.2" + checksum: 5a7c4cd456f721649757d2edb4cae71d1405c1c2c35672031f012b27007b9d49b7118297eec746dc3351370e6aa414e5d2c493fb658c7b910154b7998c0278e1 languageName: node linkType: hard @@ -6479,12 +6627,12 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:6.6.0": - version: 6.6.0 - resolution: "@typescript-eslint/typescript-estree@npm:6.6.0" +"@typescript-eslint/typescript-estree@npm:6.7.2": + version: 6.7.2 + resolution: "@typescript-eslint/typescript-estree@npm:6.7.2" dependencies: - "@typescript-eslint/types": 6.6.0 - "@typescript-eslint/visitor-keys": 6.6.0 + "@typescript-eslint/types": 6.7.2 + "@typescript-eslint/visitor-keys": 6.7.2 debug: ^4.3.4 globby: ^11.1.0 is-glob: ^4.0.3 @@ -6493,7 +6641,7 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 100620bc5865dc9d2551c6be520a34b931bc70eca144c5ab0e275b81e57aa92f24a9d3a57f332d98b96e4581cf7e87211c3196d964f4951c7a2508105e3bd3f5 + checksum: c30b9803567c37527e2806badd98f3083ae125db9a430d8a28647b153e446e6a4b830833f229cca27d5aa0ff5497c149aaa524aa3a6dbf932b557c60d0bfd4f9 languageName: node linkType: hard @@ -6533,20 +6681,20 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@npm:6.6.0": - version: 6.6.0 - resolution: "@typescript-eslint/utils@npm:6.6.0" +"@typescript-eslint/utils@npm:6.7.2": + version: 6.7.2 + resolution: "@typescript-eslint/utils@npm:6.7.2" dependencies: "@eslint-community/eslint-utils": ^4.4.0 "@types/json-schema": ^7.0.12 "@types/semver": ^7.5.0 - "@typescript-eslint/scope-manager": 6.6.0 - "@typescript-eslint/types": 6.6.0 - "@typescript-eslint/typescript-estree": 6.6.0 + "@typescript-eslint/scope-manager": 6.7.2 + "@typescript-eslint/types": 6.7.2 + "@typescript-eslint/typescript-estree": 6.7.2 semver: ^7.5.4 peerDependencies: eslint: ^7.0.0 || ^8.0.0 - checksum: da02305703569549eb7deebb7512940cd40426eccec684680087a5b8c8e08052e2ff0ff6951a2ca64740e86e4b5b390903d0b13ad51efc374d9ae54f70c6a046 + checksum: 97f950562dba2bda63ffe64672f643ef940123cf74007bc878afcf31c75f905c99934a3ad77da3d5a4fe7807d5d69c791b20c429712ad5a5525e331ebc313756 languageName: node linkType: hard @@ -6570,13 +6718,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:6.6.0": - version: 6.6.0 - resolution: "@typescript-eslint/visitor-keys@npm:6.6.0" +"@typescript-eslint/visitor-keys@npm:6.7.2": + version: 6.7.2 + resolution: "@typescript-eslint/visitor-keys@npm:6.7.2" dependencies: - "@typescript-eslint/types": 6.6.0 + "@typescript-eslint/types": 6.7.2 eslint-visitor-keys: ^3.4.1 - checksum: 28171124c5c7d5d10c04c204530508f1488214f2af5eb7e64a5f1cc410c64f02676c04be087adcfd0deb5566f5bb7337b208afcb249719614634c38bcc3da897 + checksum: b4915fbc0f3d44c81b92b7151830b698e8b6ed2dee8587bb65540c888c7a84300d3fd6b0c159e2131c7c6df1bebe49fb0d21c347ecdbf7f3e4aec05acebbb0bc languageName: node linkType: hard @@ -6593,12 +6741,12 @@ __metadata: linkType: hard "@urql/core@npm:>=2.3.1": - version: 4.1.2 - resolution: "@urql/core@npm:4.1.2" + version: 4.1.3 + resolution: "@urql/core@npm:4.1.3" dependencies: "@0no-co/graphql.web": ^1.0.1 wonka: ^6.3.2 - checksum: b446cfce8c59cccaa77cc3b5d89e788016c7af1e6870d344427915aca41462645dd0b06e6db9716e91b54a3bb419a9301399bc056d9e6a9f4cab216f495567a5 + checksum: bb8bea3caa4cdcf92c5109da8d643b4a70784d7a8987bb48aa466d41c126cb48fcd8693f0ee160bd363b0438c525068816a9e77f60984a63473e503f8b39b7d8 languageName: node linkType: hard @@ -7418,7 +7566,7 @@ __metadata: languageName: node linkType: hard -"arraybuffer.prototype.slice@npm:^1.0.1": +"arraybuffer.prototype.slice@npm:^1.0.2": version: 1.0.2 resolution: "arraybuffer.prototype.slice@npm:1.0.2" dependencies: @@ -7564,12 +7712,12 @@ __metadata: linkType: hard "autoprefixer@npm:^10.4.12, autoprefixer@npm:^10.4.13": - version: 10.4.15 - resolution: "autoprefixer@npm:10.4.15" + version: 10.4.16 + resolution: "autoprefixer@npm:10.4.16" dependencies: browserslist: ^4.21.10 - caniuse-lite: ^1.0.30001520 - fraction.js: ^4.2.0 + caniuse-lite: ^1.0.30001538 + fraction.js: ^4.3.6 normalize-range: ^0.1.2 picocolors: ^1.0.0 postcss-value-parser: ^4.2.0 @@ -7577,7 +7725,7 @@ __metadata: postcss: ^8.1.0 bin: autoprefixer: bin/autoprefixer - checksum: d490b14fb098c043e109fc13cd23628f146af99a493d35b9df3a26f8ec0b4dd8937c5601cdbaeb465b98ea31d3ea05aa7184711d4d93dfb52358d073dcb67032 + checksum: 45fad7086495048dacb14bb7b00313e70e135b5d8e8751dcc60548889400763705ab16fc2d99ea628b44c3472698fb0e39598f595ba28409c965ab159035afde languageName: node linkType: hard @@ -7631,11 +7779,11 @@ __metadata: languageName: node linkType: hard -"babel-jest@npm:^29.2.1, babel-jest@npm:^29.6.4": - version: 29.6.4 - resolution: "babel-jest@npm:29.6.4" +"babel-jest@npm:^29.2.1, babel-jest@npm:^29.7.0": + version: 29.7.0 + resolution: "babel-jest@npm:29.7.0" dependencies: - "@jest/transform": ^29.6.4 + "@jest/transform": ^29.7.0 "@types/babel__core": ^7.1.14 babel-plugin-istanbul: ^6.1.1 babel-preset-jest: ^29.6.3 @@ -7644,7 +7792,7 @@ __metadata: slash: ^3.0.0 peerDependencies: "@babel/core": ^7.8.0 - checksum: c574f1805ab6b51a7d0f5a028aad19eec4634be81e66e6f4631b79b34d8ea05dfb53629f3686c77345163872730aa0408c9e5937ed85f846984228f7ab5e5d96 + checksum: ee6f8e0495afee07cac5e4ee167be705c711a8cc8a737e05a587a131fdae2b3c8f9aa55dfd4d9c03009ac2d27f2de63d8ba96d3e8460da4d00e8af19ef9a83f7 languageName: node linkType: hard @@ -7862,9 +8010,9 @@ __metadata: languageName: node linkType: hard -"babel-preset-expo@npm:~9.6.0": - version: 9.6.2 - resolution: "babel-preset-expo@npm:9.6.2" +"babel-preset-expo@npm:~9.7.0": + version: 9.7.0 + resolution: "babel-preset-expo@npm:9.7.0" dependencies: "@babel/plugin-proposal-decorators": ^7.12.9 "@babel/plugin-proposal-export-namespace-from": ^7.18.9 @@ -7874,7 +8022,7 @@ __metadata: babel-plugin-module-resolver: ^5.0.0 babel-plugin-react-native-web: ~0.18.10 metro-react-native-babel-preset: 0.76.8 - checksum: 7521c141cf07fef8de4f6224702b66a4906936e331f63373d189e8a1dc28c99859a5ee164fe3083e9c89e84ee68266041f2f577203f7d5d3cc47a5070e5c8693 + checksum: 4a52a8eeaff5686d08dd23eb7780421515097ee817ac74208c8f918e7418cd95dfd5d0c6c0a0ad409bcadf8999b14f50f1d92bc3872a88816b8b0bd9fa237f86 languageName: node linkType: hard @@ -8625,10 +8773,10 @@ __metadata: languageName: node linkType: hard -"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001517, caniuse-lite@npm:^1.0.30001520": - version: 1.0.30001532 - resolution: "caniuse-lite@npm:1.0.30001532" - checksum: 613abeb15e03dde307d543195a7860f7ba7450c9c9262d45642b2c8fbe097914fa060d68c8647f9d443947b1f62b09d891858bde7d2cac94fae8133a0b518b28 +"caniuse-lite@npm:^1.0.0, caniuse-lite@npm:^1.0.30001517, caniuse-lite@npm:^1.0.30001538": + version: 1.0.30001538 + resolution: "caniuse-lite@npm:1.0.30001538" + checksum: 94c5d55757a339c7cc175f08a024671e2b4e7c04f130b1015793303d637061347efb6ad84447c3b8137333e742d150b8ad9672716bbf2482646c2e63a56f6c55 languageName: node linkType: hard @@ -8834,9 +8982,9 @@ __metadata: linkType: hard "cli-spinners@npm:^2.0.0, cli-spinners@npm:^2.5.0, cli-spinners@npm:^2.8.0, cli-spinners@npm:^2.9.0": - version: 2.9.0 - resolution: "cli-spinners@npm:2.9.0" - checksum: a9c56e1f44457d4a9f4f535364e729cb8726198efa9e98990cfd9eda9e220dfa4ba12f92808d1be5e29029cdfead781db82dc8549b97b31c907d55f96aa9b0e2 + version: 2.9.1 + resolution: "cli-spinners@npm:2.9.1" + checksum: 1780618be58309c469205bc315db697934bac68bce78cd5dfd46248e507a533172d623c7348ecfd904734f597ce0a4e5538684843d2cfb7af485d4466699940c languageName: node linkType: hard @@ -9370,8 +9518,8 @@ __metadata: linkType: hard "cosmiconfig@npm:^8.1.3": - version: 8.3.5 - resolution: "cosmiconfig@npm:8.3.5" + version: 8.3.6 + resolution: "cosmiconfig@npm:8.3.6" dependencies: import-fresh: ^3.3.0 js-yaml: ^4.1.0 @@ -9382,7 +9530,7 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: c6e44bb3cabf268b70049e7bd4ee8ecf00068854e53cbc32f9104794927ef406817f9e64e1c4949bd10776b604c01f7b50674336fcd2d5b9efc4cf8277fdf025 + checksum: dc339ebea427898c9e03bf01b56ba7afbac07fc7d2a2d5a15d6e9c14de98275a9565da949375aee1809591c152c0a3877bb86dbeaf74d5bd5aaa79955ad9e7a0 languageName: node linkType: hard @@ -9423,6 +9571,23 @@ __metadata: languageName: node linkType: hard +"create-jest@npm:^29.7.0": + version: 29.7.0 + resolution: "create-jest@npm:29.7.0" + dependencies: + "@jest/types": ^29.6.3 + chalk: ^4.0.0 + exit: ^0.1.2 + graceful-fs: ^4.2.9 + jest-config: ^29.7.0 + jest-util: ^29.7.0 + prompts: ^2.0.1 + bin: + create-jest: bin/create-jest.js + checksum: 1427d49458adcd88547ef6fa39041e1fe9033a661293aa8d2c3aa1b4967cb5bf4f0c00436c7a61816558f28ba2ba81a94d5c962e8022ea9a883978fc8e1f2945 + languageName: node + linkType: hard + "create-react-class@npm:^15.7.0": version: 15.7.0 resolution: "create-react-class@npm:15.7.0" @@ -10019,9 +10184,9 @@ __metadata: linkType: hard "dayjs@npm:^1.11.7, dayjs@npm:^1.8.15": - version: 1.11.9 - resolution: "dayjs@npm:1.11.9" - checksum: a4844d83dc87f921348bb9b1b93af851c51e6f71fa259604809cfe1b49d1230e6b0212dab44d1cb01994c096ad3a77ea1cf18fa55154da6efcc9d3610526ac38 + version: 1.11.10 + resolution: "dayjs@npm:1.11.10" + checksum: a6b5a3813b8884f5cd557e2e6b7fa569f4c5d0c97aca9558e38534af4f2d60daafd3ff8c2000fed3435cfcec9e805bcebd99f90130c6d1c5ef524084ced588c4 languageName: node linkType: hard @@ -10199,6 +10364,17 @@ __metadata: languageName: node linkType: hard +"define-data-property@npm:^1.0.1": + version: 1.1.0 + resolution: "define-data-property@npm:1.1.0" + dependencies: + get-intrinsic: ^1.2.1 + gopd: ^1.0.1 + has-property-descriptors: ^1.0.0 + checksum: 7ad4ee84cca8ad427a4831f5693526804b62ce9dfd4efac77214e95a4382aed930072251d4075dc8dc9fc949a353ed51f19f5285a84a788ba9216cc51472a093 + languageName: node + linkType: hard + "define-lazy-prop@npm:^2.0.0": version: 2.0.0 resolution: "define-lazy-prop@npm:2.0.0" @@ -10213,13 +10389,14 @@ __metadata: languageName: node linkType: hard -"define-properties@npm:^1.1.3, define-properties@npm:^1.1.4, define-properties@npm:^1.2.0": - version: 1.2.0 - resolution: "define-properties@npm:1.2.0" +"define-properties@npm:^1.1.3, define-properties@npm:^1.1.4, define-properties@npm:^1.2.0, define-properties@npm:^1.2.1": + version: 1.2.1 + resolution: "define-properties@npm:1.2.1" dependencies: + define-data-property: ^1.0.1 has-property-descriptors: ^1.0.0 object-keys: ^1.1.1 - checksum: e60aee6a19b102df4e2b1f301816804e81ab48bb91f00d0d935f269bf4b3f79c88b39e4f89eaa132890d23267335fd1140dfcd8d5ccd61031a0a2c41a54e33a6 + checksum: b4ccd00597dd46cb2d4a379398f5b19fca84a16f3374e2249201992f36b30f6835949a9429669ee6b41b6e837205a163eadd745e472069e70dfc10f03e5fcc12 languageName: node linkType: hard @@ -10899,9 +11076,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.4.477": - version: 1.4.513 - resolution: "electron-to-chromium@npm:1.4.513" - checksum: 613b66da177dcf5abca2441c502cde4b4fb247665dc049c54d1fe3b79fc3a5a3ecae92faf97d3147af0fec9c50bf90db09e8ca3f0953a5ec2fdb472d6d6253c2 + version: 1.4.525 + resolution: "electron-to-chromium@npm:1.4.525" + checksum: b713e2a3f1f2a2a0303362e40012d548a2ba8b5edb5e2b71350afdc257d7f4e54e9c4a7f1eb331443fdd77093a4761617bfa418528baaafb7f05669ba4814f4a languageName: node linkType: hard @@ -11087,16 +11264,16 @@ __metadata: linkType: hard "es-abstract@npm:^1.17.2, es-abstract@npm:^1.22.1": - version: 1.22.1 - resolution: "es-abstract@npm:1.22.1" + version: 1.22.2 + resolution: "es-abstract@npm:1.22.2" dependencies: array-buffer-byte-length: ^1.0.0 - arraybuffer.prototype.slice: ^1.0.1 + arraybuffer.prototype.slice: ^1.0.2 available-typed-arrays: ^1.0.5 call-bind: ^1.0.2 es-set-tostringtag: ^2.0.1 es-to-primitive: ^1.2.1 - function.prototype.name: ^1.1.5 + function.prototype.name: ^1.1.6 get-intrinsic: ^1.2.1 get-symbol-description: ^1.0.0 globalthis: ^1.0.3 @@ -11112,24 +11289,24 @@ __metadata: is-regex: ^1.1.4 is-shared-array-buffer: ^1.0.2 is-string: ^1.0.7 - is-typed-array: ^1.1.10 + is-typed-array: ^1.1.12 is-weakref: ^1.0.2 object-inspect: ^1.12.3 object-keys: ^1.1.1 object.assign: ^4.1.4 - regexp.prototype.flags: ^1.5.0 - safe-array-concat: ^1.0.0 + regexp.prototype.flags: ^1.5.1 + safe-array-concat: ^1.0.1 safe-regex-test: ^1.0.0 - string.prototype.trim: ^1.2.7 - string.prototype.trimend: ^1.0.6 - string.prototype.trimstart: ^1.0.6 + string.prototype.trim: ^1.2.8 + string.prototype.trimend: ^1.0.7 + string.prototype.trimstart: ^1.0.7 typed-array-buffer: ^1.0.0 typed-array-byte-length: ^1.0.0 typed-array-byte-offset: ^1.0.0 typed-array-length: ^1.0.4 unbox-primitive: ^1.0.2 - which-typed-array: ^1.1.10 - checksum: 614e2c1c3717cb8d30b6128ef12ea110e06fd7d75ad77091ca1c5dbfb00da130e62e4bbbbbdda190eada098a22b27fe0f99ae5a1171dac2c8663b1e8be8a3a9b + which-typed-array: ^1.1.11 + checksum: cc70e592d360d7d729859013dee7a610c6b27ed8630df0547c16b0d16d9fe6505a70ee14d1af08d970fdd132b3f88c9ca7815ce72c9011608abf8ab0e55fc515 languageName: node linkType: hard @@ -11141,12 +11318,12 @@ __metadata: linkType: hard "es-iterator-helpers@npm:^1.0.12": - version: 1.0.14 - resolution: "es-iterator-helpers@npm:1.0.14" + version: 1.0.15 + resolution: "es-iterator-helpers@npm:1.0.15" dependencies: asynciterator.prototype: ^1.0.0 call-bind: ^1.0.2 - define-properties: ^1.2.0 + define-properties: ^1.2.1 es-abstract: ^1.22.1 es-set-tostringtag: ^2.0.1 function-bind: ^1.1.1 @@ -11156,16 +11333,16 @@ __metadata: has-proto: ^1.0.1 has-symbols: ^1.0.3 internal-slot: ^1.0.5 - iterator.prototype: ^1.1.0 - safe-array-concat: ^1.0.0 - checksum: 484ca398389d5e259855e2d848573233985a7e7a4126c5de62c8a554174495aea47320ae1d2b55b757ece62ac1cb8455532aa61fd123fe4e01d0567eb2d7adfa + iterator.prototype: ^1.1.2 + safe-array-concat: ^1.0.1 + checksum: 50081ae5c549efe62e5c1d244df0194b40b075f7897fc2116b7e1aa437eb3c41f946d2afda18c33f9b31266ec544765932542765af839f76fa6d7b7855d1e0e1 languageName: node linkType: hard "es-module-lexer@npm:^1.2.1": - version: 1.3.0 - resolution: "es-module-lexer@npm:1.3.0" - checksum: 48fd9f504a9d2a894126f75c8b7ccc6273a289983e9b67255f165bfd9ae765d50100218251e94e702ca567826905ea2f7b3b4a0c4d74d3ce99cce3a2a606a238 + version: 1.3.1 + resolution: "es-module-lexer@npm:1.3.1" + checksum: 3beafa7e171eb1e8cc45695edf8d51638488dddf65294d7911f8d6a96249da6a9838c87529262cc6ea53988d8272cec0f4bff93f476ed031a54ba3afb51a0ed3 languageName: node linkType: hard @@ -12058,16 +12235,16 @@ __metadata: languageName: node linkType: hard -"expect@npm:^29.0.0, expect@npm:^29.6.4": - version: 29.6.4 - resolution: "expect@npm:29.6.4" +"expect@npm:^29.0.0, expect@npm:^29.7.0": + version: 29.7.0 + resolution: "expect@npm:29.7.0" dependencies: - "@jest/expect-utils": ^29.6.4 + "@jest/expect-utils": ^29.7.0 jest-get-type: ^29.6.3 - jest-matcher-utils: ^29.6.4 - jest-message-util: ^29.6.3 - jest-util: ^29.6.3 - checksum: 019b187d665562e4948b239e011a8791363e916f3076a229298d625e67fdadb06e8c2748798c49b4cf418ea223673eadd1de06537e08ba3c055c6f0efefc2306 + jest-matcher-utils: ^29.7.0 + jest-message-util: ^29.7.0 + jest-util: ^29.7.0 + checksum: 9257f10288e149b81254a0fda8ffe8d54a7061cd61d7515779998b012579d2b8c22354b0eb901daf0145f347403da582f75f359f4810c007182ad3fb318b5c0c languageName: node linkType: hard @@ -12162,15 +12339,15 @@ __metadata: linkType: hard "expo-module-scripts@npm:^3.0.4": - version: 3.1.0 - resolution: "expo-module-scripts@npm:3.1.0" + version: 3.1.1 + resolution: "expo-module-scripts@npm:3.1.1" dependencies: "@babel/cli": ^7.1.2 "@expo/npm-proofread": ^1.0.1 "@testing-library/react-hooks": ^7.0.1 "@tsconfig/node14": ^1.0.3 "@types/jest": ^29.2.1 - babel-preset-expo: ~9.6.0 + babel-preset-expo: ~9.7.0 commander: ^2.19.0 eslint-config-universe: ^12.0.0 find-yarn-workspace-root: ^2.0.0 @@ -12181,7 +12358,7 @@ __metadata: typescript: ^5.1.3 bin: expo-module: bin/expo-module.js - checksum: 1a85033524ef44d25de0a753e29ea30657b4741620533d4b3d6516426bdd55c259f79e88ccebe01bc1ce41f567764c57a773c20d48a8d9cd8d297b9a21c2b598 + checksum: 0680361886eb972221b3193eb34bf12f323ba6c9b49b6fe733e19977de20b1311b32976750a5a51ff0d06230ecea9e3060ff2dfff829d14656bca03c4b719a29 languageName: node linkType: hard @@ -12210,9 +12387,9 @@ __metadata: languageName: node linkType: hard -"expo-pwa@npm:0.0.126": - version: 0.0.126 - resolution: "expo-pwa@npm:0.0.126" +"expo-pwa@npm:0.0.127": + version: 0.0.127 + resolution: "expo-pwa@npm:0.0.127" dependencies: "@expo/image-utils": 0.3.23 chalk: ^4.0.0 @@ -12222,7 +12399,7 @@ __metadata: expo: "*" bin: expo-pwa: build/cli.js - checksum: 6a0de8082649913ce23e1015c786bd68218ce5e5ce58dc99d808a820055907a5ab871574fc50b3b802b3d1933749c76971be92145f4a8a178f440b693868b83c + checksum: d9fd7bd6d875342caf7eb4a0b893928301b507a4d26830722c56f96e2a973be852bc8ec77a277dde8bc166e95b7c09c58e3014fb8849ba125289f55bd01e39f8 languageName: node linkType: hard @@ -12425,13 +12602,13 @@ __metadata: linkType: hard "fast-xml-parser@npm:^4.0.12": - version: 4.2.7 - resolution: "fast-xml-parser@npm:4.2.7" + version: 4.3.0 + resolution: "fast-xml-parser@npm:4.3.0" dependencies: strnum: ^1.0.5 bin: fxparser: src/cli/cli.js - checksum: d8b0c9e04756f6c43fa0399428f30149acadae21350e42e26e8fe98e24e6afa6b9b00aa554453795036b00e9fee974a1b556fe2ba18be391d51a9bf1ab790e7c + checksum: 8cd2262a19a1a5c5ebf782eb17d7d52f4d8192edee49c188feecf6bfaf70046c088edbb6a92f0a6911ba18b8fd2d2c0c3b87f018b297983ef621c1ddfa09c0a0 languageName: node linkType: hard @@ -12749,9 +12926,9 @@ __metadata: linkType: hard "flatted@npm:^3.2.7": - version: 3.2.7 - resolution: "flatted@npm:3.2.7" - checksum: 427633049d55bdb80201c68f7eb1cbd533e03eac541f97d3aecab8c5526f12a20ccecaeede08b57503e772c769e7f8680b37e8d482d1e5f8d7e2194687f9ea35 + version: 3.2.9 + resolution: "flatted@npm:3.2.9" + checksum: f14167fbe26a9d20f6fca8d998e8f1f41df72c8e81f9f2c9d61ed2bea058248f5e1cbd05e7f88c0e5087a6a0b822a1e5e2b446e879f3cfbe0b07ba2d7f80b026 languageName: node linkType: hard @@ -12798,12 +12975,12 @@ __metadata: linkType: hard "follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.13.3": - version: 1.15.2 - resolution: "follow-redirects@npm:1.15.2" + version: 1.15.3 + resolution: "follow-redirects@npm:1.15.3" peerDependenciesMeta: debug: optional: true - checksum: faa66059b66358ba65c234c2f2a37fcec029dc22775f35d9ad6abac56003268baf41e55f9ee645957b32c7d9f62baf1f0b906e68267276f54ec4b4c597c2b190 + checksum: 584da22ec5420c837bd096559ebfb8fe69d82512d5585004e36a3b4a6ef6d5905780e0c74508c7b72f907d1fa2b7bd339e613859e9c304d0dc96af2027fd0231 languageName: node linkType: hard @@ -12900,7 +13077,7 @@ __metadata: languageName: node linkType: hard -"fraction.js@npm:^4.2.0": +"fraction.js@npm:^4.3.6": version: 4.3.6 resolution: "fraction.js@npm:4.3.6" checksum: e96ae77e64ebfd442d3a5a01a3f0637b0663fc2440bcf2841b3ad9341ba24c81fb2e3e7142e43ef7d088558c6b3f8609df135b201adc7a1c674aea6a71384162 @@ -13052,7 +13229,7 @@ __metadata: languageName: node linkType: hard -"function.prototype.name@npm:^1.1.5": +"function.prototype.name@npm:^1.1.5, function.prototype.name@npm:^1.1.6": version: 1.1.6 resolution: "function.prototype.name@npm:1.1.6" dependencies: @@ -13325,11 +13502,11 @@ __metadata: linkType: hard "globals@npm:^13.19.0": - version: 13.21.0 - resolution: "globals@npm:13.21.0" + version: 13.22.0 + resolution: "globals@npm:13.22.0" dependencies: type-fest: ^0.20.2 - checksum: 86c92ca8a04efd864c10852cd9abb1ebe6d447dcc72936783e66eaba1087d7dba5c9c3421a48d6ca722c319378754dbcc3f3f732dbe47592d7de908edf58a773 + checksum: 64af5a09565341432770444085f7aa98b54331c3b69732e0de411003921fa2dd060222ae7b50bec0b98f29c4d00b4f49bf434049ba9f7c36ca4ee1773f60458c languageName: node linkType: hard @@ -13478,9 +13655,9 @@ __metadata: linkType: hard "graphql@npm:^16.6.0": - version: 16.8.0 - resolution: "graphql@npm:16.8.0" - checksum: d853d4085b0c911a7e2a926c3b0d379934ec61cd4329e70cdf281763102f024fd80a97db7a505b8b04fed9050cb4875f8f518150ea854557a500a0b41dcd7f4e + version: 16.8.1 + resolution: "graphql@npm:16.8.1" + checksum: 8d304b7b6f708c8c5cc164b06e92467dfe36aff6d4f2cf31dd19c4c2905a0e7b89edac4b7e225871131fd24e21460836b369de0c06532644d15b461d55b1ccc0 languageName: node linkType: hard @@ -14724,7 +14901,7 @@ __metadata: languageName: node linkType: hard -"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.9": +"is-typed-array@npm:^1.1.10, is-typed-array@npm:^1.1.12, is-typed-array@npm:^1.1.9": version: 1.1.12 resolution: "is-typed-array@npm:1.1.12" dependencies: @@ -14921,15 +15098,16 @@ __metadata: languageName: node linkType: hard -"iterator.prototype@npm:^1.1.0": - version: 1.1.1 - resolution: "iterator.prototype@npm:1.1.1" +"iterator.prototype@npm:^1.1.2": + version: 1.1.2 + resolution: "iterator.prototype@npm:1.1.2" dependencies: - define-properties: ^1.2.0 + define-properties: ^1.2.1 get-intrinsic: ^1.2.1 has-symbols: ^1.0.3 - reflect.getprototypeof: ^1.0.3 - checksum: 2807469a39e280ff25ed95f8f84197b870a12fae2b15cb8779bbb0d12bc0e648be4d6277bedb6f4ae05d3fc94f05a29f90c018335003f27045582cf5455248df + reflect.getprototypeof: ^1.0.4 + set-function-name: ^2.0.1 + checksum: d8a507e2ccdc2ce762e8a1d3f4438c5669160ac72b88b648e59a688eec6bc4e64b22338e74000518418d9e693faf2a092d2af21b9ec7dbf7763b037a54701168 languageName: node linkType: hard @@ -14971,14 +15149,14 @@ __metadata: languageName: node linkType: hard -"jest-changed-files@npm:^29.6.3": - version: 29.6.3 - resolution: "jest-changed-files@npm:29.6.3" +"jest-changed-files@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-changed-files@npm:29.7.0" dependencies: execa: ^5.0.0 - jest-util: ^29.6.3 + jest-util: ^29.7.0 p-limit: ^3.1.0 - checksum: 55bc820a70c220a02fec214d5c48d5e0d829549e5c7b9959776b4ca3f76f5ff20c7c8ff816a847822766f1d712477ab3027f7a66ec61bf65de3f852e878b4dfd + checksum: 963e203893c396c5dfc75e00a49426688efea7361b0f0e040035809cecd2d46b3c01c02be2d9e8d38b1138357d2de7719ea5b5be21f66c10f2e9685a5a73bb99 languageName: node linkType: hard @@ -15009,31 +15187,31 @@ __metadata: languageName: node linkType: hard -"jest-circus@npm:^29.6.4": - version: 29.6.4 - resolution: "jest-circus@npm:29.6.4" +"jest-circus@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-circus@npm:29.7.0" dependencies: - "@jest/environment": ^29.6.4 - "@jest/expect": ^29.6.4 - "@jest/test-result": ^29.6.4 + "@jest/environment": ^29.7.0 + "@jest/expect": ^29.7.0 + "@jest/test-result": ^29.7.0 "@jest/types": ^29.6.3 "@types/node": "*" chalk: ^4.0.0 co: ^4.6.0 dedent: ^1.0.0 is-generator-fn: ^2.0.0 - jest-each: ^29.6.3 - jest-matcher-utils: ^29.6.4 - jest-message-util: ^29.6.3 - jest-runtime: ^29.6.4 - jest-snapshot: ^29.6.4 - jest-util: ^29.6.3 + jest-each: ^29.7.0 + jest-matcher-utils: ^29.7.0 + jest-message-util: ^29.7.0 + jest-runtime: ^29.7.0 + jest-snapshot: ^29.7.0 + jest-util: ^29.7.0 p-limit: ^3.1.0 - pretty-format: ^29.6.3 + pretty-format: ^29.7.0 pure-rand: ^6.0.0 slash: ^3.0.0 stack-utils: ^2.0.3 - checksum: 31f64ddf6df4aefe30ef5f8de9da137c9cba58ab5e2a25cf749450735088dc88a9974591a4256d481af0fe64608173c921219f9fad9a7dd87cbe47a79e111be8 + checksum: 349437148924a5a109c9b8aad6d393a9591b4dac1918fc97d81b7fc515bc905af9918495055071404af1fab4e48e4b04ac3593477b1d5dcf48c4e71b527c70a7 languageName: node linkType: hard @@ -15064,21 +15242,20 @@ __metadata: languageName: node linkType: hard -"jest-cli@npm:^29.6.4": - version: 29.6.4 - resolution: "jest-cli@npm:29.6.4" +"jest-cli@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-cli@npm:29.7.0" dependencies: - "@jest/core": ^29.6.4 - "@jest/test-result": ^29.6.4 + "@jest/core": ^29.7.0 + "@jest/test-result": ^29.7.0 "@jest/types": ^29.6.3 chalk: ^4.0.0 + create-jest: ^29.7.0 exit: ^0.1.2 - graceful-fs: ^4.2.9 import-local: ^3.0.2 - jest-config: ^29.6.4 - jest-util: ^29.6.3 - jest-validate: ^29.6.3 - prompts: ^2.0.1 + jest-config: ^29.7.0 + jest-util: ^29.7.0 + jest-validate: ^29.7.0 yargs: ^17.3.1 peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 @@ -15087,7 +15264,7 @@ __metadata: optional: true bin: jest: bin/jest.js - checksum: 87a85a27eff0e502717b6ee0ce861d3e50d8c47d7298477f8ca10964b958f06c20241d28f1360ce2a85072763483e4924248106a8ed530ca460a56db3fdfc53e + checksum: 664901277a3f5007ea4870632ed6e7889db9da35b2434e7cb488443e6bf5513889b344b7fddf15112135495b9875892b156faeb2d7391ddb9e2a849dcb7b6c36 languageName: node linkType: hard @@ -15128,30 +15305,30 @@ __metadata: languageName: node linkType: hard -"jest-config@npm:^29.6.4": - version: 29.6.4 - resolution: "jest-config@npm:29.6.4" +"jest-config@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-config@npm:29.7.0" dependencies: "@babel/core": ^7.11.6 - "@jest/test-sequencer": ^29.6.4 + "@jest/test-sequencer": ^29.7.0 "@jest/types": ^29.6.3 - babel-jest: ^29.6.4 + babel-jest: ^29.7.0 chalk: ^4.0.0 ci-info: ^3.2.0 deepmerge: ^4.2.2 glob: ^7.1.3 graceful-fs: ^4.2.9 - jest-circus: ^29.6.4 - jest-environment-node: ^29.6.4 + jest-circus: ^29.7.0 + jest-environment-node: ^29.7.0 jest-get-type: ^29.6.3 jest-regex-util: ^29.6.3 - jest-resolve: ^29.6.4 - jest-runner: ^29.6.4 - jest-util: ^29.6.3 - jest-validate: ^29.6.3 + jest-resolve: ^29.7.0 + jest-runner: ^29.7.0 + jest-util: ^29.7.0 + jest-validate: ^29.7.0 micromatch: ^4.0.4 parse-json: ^5.2.0 - pretty-format: ^29.6.3 + pretty-format: ^29.7.0 slash: ^3.0.0 strip-json-comments: ^3.1.1 peerDependencies: @@ -15162,7 +15339,7 @@ __metadata: optional: true ts-node: optional: true - checksum: 177352658774344896df3988dbe892e0b117579f45cc43aebc588493665bf19a557e202f097f5b4a987314ec2d84afa0769299ac6e702c5923d1fd3cfa4692b0 + checksum: 4cabf8f894c180cac80b7df1038912a3fc88f96f2622de33832f4b3314f83e22b08fb751da570c0ab2b7988f21604bdabade95e3c0c041068ac578c085cf7dff languageName: node linkType: hard @@ -15178,15 +15355,15 @@ __metadata: languageName: node linkType: hard -"jest-diff@npm:^29.6.4": - version: 29.6.4 - resolution: "jest-diff@npm:29.6.4" +"jest-diff@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-diff@npm:29.7.0" dependencies: chalk: ^4.0.0 diff-sequences: ^29.6.3 jest-get-type: ^29.6.3 - pretty-format: ^29.6.3 - checksum: e205c45ab6dbcc660dc2a682cddb20f6a3cbbbdecd2821cce2050619f96dbd7560ee25f7f51d42c302596aeaddbea54390b78be3ab639340d24d67e4d270a8b0 + pretty-format: ^29.7.0 + checksum: 08e24a9dd43bfba1ef07a6374e5af138f53137b79ec3d5cc71a2303515335898888fa5409959172e1e05de966c9e714368d15e8994b0af7441f0721ee8e1bb77 languageName: node linkType: hard @@ -15199,12 +15376,12 @@ __metadata: languageName: node linkType: hard -"jest-docblock@npm:^29.6.3": - version: 29.6.3 - resolution: "jest-docblock@npm:29.6.3" +"jest-docblock@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-docblock@npm:29.7.0" dependencies: detect-newline: ^3.0.0 - checksum: 6f3213a1e79e7eedafeb462acfa9a41303f9c0167893b140f6818fa16d7eb6bf3f9b9cf4669097ca6b7154847793489ecd6b4f6cfb0e416b88cfa3b4b36715b6 + checksum: 66390c3e9451f8d96c5da62f577a1dad701180cfa9b071c5025acab2f94d7a3efc2515cfa1654ebe707213241541ce9c5530232cdc8017c91ed64eea1bd3b192 languageName: node linkType: hard @@ -15221,16 +15398,16 @@ __metadata: languageName: node linkType: hard -"jest-each@npm:^29.6.3": - version: 29.6.3 - resolution: "jest-each@npm:29.6.3" +"jest-each@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-each@npm:29.7.0" dependencies: "@jest/types": ^29.6.3 chalk: ^4.0.0 jest-get-type: ^29.6.3 - jest-util: ^29.6.3 - pretty-format: ^29.6.3 - checksum: fe06e80b3554e2a8464f5f5c61943e02db1f8a7177139cb55b3201a1d1513cb089d8800401f102729a31bf8dd6f88229044e6088fea9dd5647ed11e841b6b88c + jest-util: ^29.7.0 + pretty-format: ^29.7.0 + checksum: e88f99f0184000fc8813f2a0aa79e29deeb63700a3b9b7928b8a418d7d93cd24933608591dbbdea732b473eb2021c72991b5cc51a17966842841c6e28e6f691c languageName: node linkType: hard @@ -15250,23 +15427,23 @@ __metadata: linkType: hard "jest-environment-jsdom@npm:^29.2.1": - version: 29.6.4 - resolution: "jest-environment-jsdom@npm:29.6.4" + version: 29.7.0 + resolution: "jest-environment-jsdom@npm:29.7.0" dependencies: - "@jest/environment": ^29.6.4 - "@jest/fake-timers": ^29.6.4 + "@jest/environment": ^29.7.0 + "@jest/fake-timers": ^29.7.0 "@jest/types": ^29.6.3 "@types/jsdom": ^20.0.0 "@types/node": "*" - jest-mock: ^29.6.3 - jest-util: ^29.6.3 + jest-mock: ^29.7.0 + jest-util: ^29.7.0 jsdom: ^20.0.0 peerDependencies: canvas: ^2.5.0 peerDependenciesMeta: canvas: optional: true - checksum: 2afe105f12d7d93ca56e2e6f67ab07ada3dd3da0516d1198f254930683ab9feb2b8c14417baaca53544eed88fd7fb5744f0dbce2e100269746187317ce0347df + checksum: 559aac134c196fccc1dfc794d8fc87377e9f78e894bb13012b0831d88dec0abd7ece99abec69da564b8073803be4f04a9eb4f4d1bb80e29eec0cb252c254deb8 languageName: node linkType: hard @@ -15284,23 +15461,23 @@ __metadata: languageName: node linkType: hard -"jest-environment-node@npm:^29.2.1, jest-environment-node@npm:^29.6.4": - version: 29.6.4 - resolution: "jest-environment-node@npm:29.6.4" +"jest-environment-node@npm:^29.2.1, jest-environment-node@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-environment-node@npm:29.7.0" dependencies: - "@jest/environment": ^29.6.4 - "@jest/fake-timers": ^29.6.4 + "@jest/environment": ^29.7.0 + "@jest/fake-timers": ^29.7.0 "@jest/types": ^29.6.3 "@types/node": "*" - jest-mock: ^29.6.3 - jest-util: ^29.6.3 - checksum: 518221505af4bd32c84f2af2c03f9d771de2711bd69fe7723b648fcc2e05d95b4e75f493afa9010209e26a4a3309ebee971f9b18c45b540891771d3b68c3a16e + jest-mock: ^29.7.0 + jest-util: ^29.7.0 + checksum: 501a9966292cbe0ca3f40057a37587cb6def25e1e0c5e39ac6c650fe78d3c70a2428304341d084ac0cced5041483acef41c477abac47e9a290d5545fd2f15646 languageName: node linkType: hard "jest-expo@npm:~50.0.0-alpha.0": - version: 50.0.0-alpha.1 - resolution: "jest-expo@npm:50.0.0-alpha.1" + version: 50.0.0-alpha.2 + resolution: "jest-expo@npm:50.0.0-alpha.2" dependencies: "@expo/config": ~8.3.0 "@expo/json-file": ^8.2.37 @@ -15315,7 +15492,7 @@ __metadata: react-test-renderer: 18.2.0 bin: jest: bin/jest.js - checksum: 7d0e187c2cc6a554a6e10b0b92a565dc5ccd8e3ad1e74d93377d9b9d87be3ec6c0ea84cbe06966a8d792d08959e2b2fe1c4e969efb83f5c1811a9ceabb156ff0 + checksum: 0fce6805a58c6b1bffeb0695f8d2923df57f8c2fefa047c175dd31d800013d82e8ef20f37d09cadf38aecffbf3c57b9099c8b391e1cc291731b360295c55f7c8 languageName: node linkType: hard @@ -15364,9 +15541,9 @@ __metadata: languageName: node linkType: hard -"jest-haste-map@npm:^29.6.4": - version: 29.6.4 - resolution: "jest-haste-map@npm:29.6.4" +"jest-haste-map@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-haste-map@npm:29.7.0" dependencies: "@jest/types": ^29.6.3 "@types/graceful-fs": ^4.1.3 @@ -15376,14 +15553,14 @@ __metadata: fsevents: ^2.3.2 graceful-fs: ^4.2.9 jest-regex-util: ^29.6.3 - jest-util: ^29.6.3 - jest-worker: ^29.6.4 + jest-util: ^29.7.0 + jest-worker: ^29.7.0 micromatch: ^4.0.4 walker: ^1.0.8 dependenciesMeta: fsevents: optional: true - checksum: 4f720fd3813bb38400b7a9a094e55664cbddd907ba1769457ed746f6c870c615167647a5b697a788183d832b1dcb1b66143e52990a6f4403283f6686077fa868 + checksum: c2c8f2d3e792a963940fbdfa563ce14ef9e14d4d86da645b96d3cd346b8d35c5ce0b992ee08593939b5f718cf0a1f5a90011a056548a1dbf58397d4356786f01 languageName: node linkType: hard @@ -15422,13 +15599,13 @@ __metadata: languageName: node linkType: hard -"jest-leak-detector@npm:^29.6.3": - version: 29.6.3 - resolution: "jest-leak-detector@npm:29.6.3" +"jest-leak-detector@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-leak-detector@npm:29.7.0" dependencies: jest-get-type: ^29.6.3 - pretty-format: ^29.6.3 - checksum: 27548fcfc7602fe1b88f8600185e35ffff71751f3631e52bbfdfc72776f5a13a430185cf02fc632b41320a74f99ae90e40ce101c8887509f0f919608a7175129 + pretty-format: ^29.7.0 + checksum: e3950e3ddd71e1d0c22924c51a300a1c2db6cf69ec1e51f95ccf424bcc070f78664813bef7aed4b16b96dfbdeea53fe358f8aeaaea84346ae15c3735758f1605 languageName: node linkType: hard @@ -15444,15 +15621,15 @@ __metadata: languageName: node linkType: hard -"jest-matcher-utils@npm:^29.6.4": - version: 29.6.4 - resolution: "jest-matcher-utils@npm:29.6.4" +"jest-matcher-utils@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-matcher-utils@npm:29.7.0" dependencies: chalk: ^4.0.0 - jest-diff: ^29.6.4 + jest-diff: ^29.7.0 jest-get-type: ^29.6.3 - pretty-format: ^29.6.3 - checksum: 9e17bce282e74bdbba2ce5475c490e0bba4f464cd42132bfc5df0337e0853af4dba925c7f4f61cbb0a4818fa121d28d7ff0196ec8829773a22fce59a822976d2 + pretty-format: ^29.7.0 + checksum: d7259e5f995d915e8a37a8fd494cb7d6af24cd2a287b200f831717ba0d015190375f9f5dc35393b8ba2aae9b2ebd60984635269c7f8cff7d85b077543b7744cd languageName: node linkType: hard @@ -15490,9 +15667,9 @@ __metadata: languageName: node linkType: hard -"jest-message-util@npm:^29.6.3": - version: 29.6.3 - resolution: "jest-message-util@npm:29.6.3" +"jest-message-util@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-message-util@npm:29.7.0" dependencies: "@babel/code-frame": ^7.12.13 "@jest/types": ^29.6.3 @@ -15500,10 +15677,10 @@ __metadata: chalk: ^4.0.0 graceful-fs: ^4.2.9 micromatch: ^4.0.4 - pretty-format: ^29.6.3 + pretty-format: ^29.7.0 slash: ^3.0.0 stack-utils: ^2.0.3 - checksum: 59f5229a06c073a8877ba4d2e304cc07d63b0062bf5764d4bed14364403889e77f1825d1bd9017c19a840847d17dffd414dc06f1fcb537b5f9e03dbc65b84ada + checksum: a9d025b1c6726a2ff17d54cc694de088b0489456c69106be6b615db7a51b7beb66788bea7a59991a019d924fbf20f67d085a445aedb9a4d6760363f4d7d09930 languageName: node linkType: hard @@ -15517,14 +15694,14 @@ __metadata: languageName: node linkType: hard -"jest-mock@npm:^29.6.3": - version: 29.6.3 - resolution: "jest-mock@npm:29.6.3" +"jest-mock@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-mock@npm:29.7.0" dependencies: "@jest/types": ^29.6.3 "@types/node": "*" - jest-util: ^29.6.3 - checksum: 35772968010c0afb1bb1ef78570b9cbea907c6f967d24b4e95e1a596a1000c63d60e225fb9ddfdd5218674da4aa61d92a09927fc26310cecbbfaa8278d919e32 + jest-util: ^29.7.0 + checksum: 81ba9b68689a60be1482212878973700347cb72833c5e5af09895882b9eb5c4e02843a1bbdf23f94c52d42708bab53a30c45a3482952c9eec173d1eaac5b86c5 languageName: node linkType: hard @@ -15572,13 +15749,13 @@ __metadata: languageName: node linkType: hard -"jest-resolve-dependencies@npm:^29.6.4": - version: 29.6.4 - resolution: "jest-resolve-dependencies@npm:29.6.4" +"jest-resolve-dependencies@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-resolve-dependencies@npm:29.7.0" dependencies: jest-regex-util: ^29.6.3 - jest-snapshot: ^29.6.4 - checksum: 34f81d22cbd72203130cc14cbb66d5783d9f59fba4d366b9653f8fb4f6feeaac25d89696f2f77c700659843d5440dc92f58ad443ba05da1da46c39234866d916 + jest-snapshot: ^29.7.0 + checksum: aeb75d8150aaae60ca2bb345a0d198f23496494677cd6aefa26fc005faf354061f073982175daaf32b4b9d86b26ca928586344516e3e6969aa614cb13b883984 languageName: node linkType: hard @@ -15600,20 +15777,20 @@ __metadata: languageName: node linkType: hard -"jest-resolve@npm:^29.6.4": - version: 29.6.4 - resolution: "jest-resolve@npm:29.6.4" +"jest-resolve@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-resolve@npm:29.7.0" dependencies: chalk: ^4.0.0 graceful-fs: ^4.2.9 - jest-haste-map: ^29.6.4 + jest-haste-map: ^29.7.0 jest-pnp-resolver: ^1.2.2 - jest-util: ^29.6.3 - jest-validate: ^29.6.3 + jest-util: ^29.7.0 + jest-validate: ^29.7.0 resolve: ^1.20.0 resolve.exports: ^2.0.0 slash: ^3.0.0 - checksum: 5f0ef260aec79ef00e16e0ba7b27d527054e1faed08a144279cd191b5c5b71af67c52b9ddfd24aa2f563d254618ce9bf7519809f23fb2abf6c4fa375503caa28 + checksum: 0ca218e10731aa17920526ec39deaec59ab9b966237905ffc4545444481112cd422f01581230eceb7e82d86f44a543d520a71391ec66e1b4ef1a578bd5c73487 languageName: node linkType: hard @@ -15646,32 +15823,32 @@ __metadata: languageName: node linkType: hard -"jest-runner@npm:^29.6.4": - version: 29.6.4 - resolution: "jest-runner@npm:29.6.4" +"jest-runner@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-runner@npm:29.7.0" dependencies: - "@jest/console": ^29.6.4 - "@jest/environment": ^29.6.4 - "@jest/test-result": ^29.6.4 - "@jest/transform": ^29.6.4 + "@jest/console": ^29.7.0 + "@jest/environment": ^29.7.0 + "@jest/test-result": ^29.7.0 + "@jest/transform": ^29.7.0 "@jest/types": ^29.6.3 "@types/node": "*" chalk: ^4.0.0 emittery: ^0.13.1 graceful-fs: ^4.2.9 - jest-docblock: ^29.6.3 - jest-environment-node: ^29.6.4 - jest-haste-map: ^29.6.4 - jest-leak-detector: ^29.6.3 - jest-message-util: ^29.6.3 - jest-resolve: ^29.6.4 - jest-runtime: ^29.6.4 - jest-util: ^29.6.3 - jest-watcher: ^29.6.4 - jest-worker: ^29.6.4 + jest-docblock: ^29.7.0 + jest-environment-node: ^29.7.0 + jest-haste-map: ^29.7.0 + jest-leak-detector: ^29.7.0 + jest-message-util: ^29.7.0 + jest-resolve: ^29.7.0 + jest-runtime: ^29.7.0 + jest-util: ^29.7.0 + jest-watcher: ^29.7.0 + jest-worker: ^29.7.0 p-limit: ^3.1.0 source-map-support: 0.5.13 - checksum: ca977dd30262171fe000de8407a3187c16e7057ddf690bcc21068155aacd4824ee927b544e0fa9f2885948b47a5123b472da41e095e3bcbdebb79f1fa2f2fc56 + checksum: f0405778ea64812bf9b5c50b598850d94ccf95d7ba21f090c64827b41decd680ee19fcbb494007cdd7f5d0d8906bfc9eceddd8fa583e753e736ecd462d4682fb languageName: node linkType: hard @@ -15705,16 +15882,16 @@ __metadata: languageName: node linkType: hard -"jest-runtime@npm:^29.6.4": - version: 29.6.4 - resolution: "jest-runtime@npm:29.6.4" +"jest-runtime@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-runtime@npm:29.7.0" dependencies: - "@jest/environment": ^29.6.4 - "@jest/fake-timers": ^29.6.4 - "@jest/globals": ^29.6.4 + "@jest/environment": ^29.7.0 + "@jest/fake-timers": ^29.7.0 + "@jest/globals": ^29.7.0 "@jest/source-map": ^29.6.3 - "@jest/test-result": ^29.6.4 - "@jest/transform": ^29.6.4 + "@jest/test-result": ^29.7.0 + "@jest/transform": ^29.7.0 "@jest/types": ^29.6.3 "@types/node": "*" chalk: ^4.0.0 @@ -15722,16 +15899,16 @@ __metadata: collect-v8-coverage: ^1.0.0 glob: ^7.1.3 graceful-fs: ^4.2.9 - jest-haste-map: ^29.6.4 - jest-message-util: ^29.6.3 - jest-mock: ^29.6.3 + jest-haste-map: ^29.7.0 + jest-message-util: ^29.7.0 + jest-mock: ^29.7.0 jest-regex-util: ^29.6.3 - jest-resolve: ^29.6.4 - jest-snapshot: ^29.6.4 - jest-util: ^29.6.3 + jest-resolve: ^29.7.0 + jest-snapshot: ^29.7.0 + jest-util: ^29.7.0 slash: ^3.0.0 strip-bom: ^4.0.0 - checksum: 93deacd06f8f2bb808dbfb8acbcbc0b724187b3d3fffafd497a32c939bf385ca21f5a3f03eebd5b958a0e93865d0e68a0db73bd0fe16dafbd5e922558aa7b359 + checksum: d19f113d013e80691e07047f68e1e3448ef024ff2c6b586ce4f90cd7d4c62a2cd1d460110491019719f3c59bfebe16f0e201ed005ef9f80e2cf798c374eed54e languageName: node linkType: hard @@ -15775,31 +15952,31 @@ __metadata: languageName: node linkType: hard -"jest-snapshot@npm:^29.6.4": - version: 29.6.4 - resolution: "jest-snapshot@npm:29.6.4" +"jest-snapshot@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-snapshot@npm:29.7.0" dependencies: "@babel/core": ^7.11.6 "@babel/generator": ^7.7.2 "@babel/plugin-syntax-jsx": ^7.7.2 "@babel/plugin-syntax-typescript": ^7.7.2 "@babel/types": ^7.3.3 - "@jest/expect-utils": ^29.6.4 - "@jest/transform": ^29.6.4 + "@jest/expect-utils": ^29.7.0 + "@jest/transform": ^29.7.0 "@jest/types": ^29.6.3 babel-preset-current-node-syntax: ^1.0.0 chalk: ^4.0.0 - expect: ^29.6.4 + expect: ^29.7.0 graceful-fs: ^4.2.9 - jest-diff: ^29.6.4 + jest-diff: ^29.7.0 jest-get-type: ^29.6.3 - jest-matcher-utils: ^29.6.4 - jest-message-util: ^29.6.3 - jest-util: ^29.6.3 + jest-matcher-utils: ^29.7.0 + jest-message-util: ^29.7.0 + jest-util: ^29.7.0 natural-compare: ^1.4.0 - pretty-format: ^29.6.3 + pretty-format: ^29.7.0 semver: ^7.5.3 - checksum: 0c9b5ec640457fb780ac6c9b6caa814436e9e16bf744772eee3bfd055ae5f7a3085a6a09b2f30910e31915dafc3955d92357cc98189e4d5dcb417b5fdafda6e3 + checksum: 86821c3ad0b6899521ce75ee1ae7b01b17e6dfeff9166f2cf17f012e0c5d8c798f30f9e4f8f7f5bed01ea7b55a6bc159f5eda778311162cbfa48785447c237ad languageName: node linkType: hard @@ -15831,9 +16008,9 @@ __metadata: languageName: node linkType: hard -"jest-util@npm:^29.0.0, jest-util@npm:^29.6.3": - version: 29.6.3 - resolution: "jest-util@npm:29.6.3" +"jest-util@npm:^29.0.0, jest-util@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-util@npm:29.7.0" dependencies: "@jest/types": ^29.6.3 "@types/node": "*" @@ -15841,7 +16018,7 @@ __metadata: ci-info: ^3.2.0 graceful-fs: ^4.2.9 picomatch: ^2.2.3 - checksum: 7bf3ba3ac67ac6ceff7d8fdd23a86768e23ddd9133ecd9140ef87cc0c28708effabaf67a6cd45cd9d90a63d645a522ed0825d09ee59ac4c03b9c473b1fef4c7c + checksum: 042ab4980f4ccd4d50226e01e5c7376a8556b472442ca6091a8f102488c0f22e6e8b89ea874111d2328a2080083bf3225c86f3788c52af0bd0345a00eb57a3ca languageName: node linkType: hard @@ -15873,17 +16050,17 @@ __metadata: languageName: node linkType: hard -"jest-validate@npm:^29.6.3": - version: 29.6.3 - resolution: "jest-validate@npm:29.6.3" +"jest-validate@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-validate@npm:29.7.0" dependencies: "@jest/types": ^29.6.3 camelcase: ^6.2.0 chalk: ^4.0.0 jest-get-type: ^29.6.3 leven: ^3.1.0 - pretty-format: ^29.6.3 - checksum: caa489ed11080441c636b8035ab71bafbdc0c052b1e452855e4d2dd24ac15e497710a270ea6fc5ef8926b22c1ce4d6e07ec2dc193f0810cff5851d7a2222c045 + pretty-format: ^29.7.0 + checksum: 191fcdc980f8a0de4dbdd879fa276435d00eb157a48683af7b3b1b98b0f7d9de7ffe12689b617779097ff1ed77601b9f7126b0871bba4f776e222c40f62e9dae languageName: node linkType: hard @@ -15963,19 +16140,19 @@ __metadata: languageName: node linkType: hard -"jest-watcher@npm:^29.0.0, jest-watcher@npm:^29.6.4": - version: 29.6.4 - resolution: "jest-watcher@npm:29.6.4" +"jest-watcher@npm:^29.0.0, jest-watcher@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-watcher@npm:29.7.0" dependencies: - "@jest/test-result": ^29.6.4 + "@jest/test-result": ^29.7.0 "@jest/types": ^29.6.3 "@types/node": "*" ansi-escapes: ^4.2.1 chalk: ^4.0.0 emittery: ^0.13.1 - jest-util: ^29.6.3 + jest-util: ^29.7.0 string-length: ^4.0.1 - checksum: 13c0f96f7e9212e4f3ef2daf3e787045bdcec414061bf286eca934c7f4083fb04d38df9ced9c0edfbe15f3521ca581eb2ed6108c338a0db1f3e1def65687992f + checksum: 67e6e7fe695416deff96b93a14a561a6db69389a0667e9489f24485bb85e5b54e12f3b2ba511ec0b777eca1e727235b073e3ebcdd473d68888650489f88df92f languageName: node linkType: hard @@ -16012,15 +16189,15 @@ __metadata: languageName: node linkType: hard -"jest-worker@npm:^29.4.3, jest-worker@npm:^29.5.0, jest-worker@npm:^29.6.4": - version: 29.6.4 - resolution: "jest-worker@npm:29.6.4" +"jest-worker@npm:^29.4.3, jest-worker@npm:^29.5.0, jest-worker@npm:^29.7.0": + version: 29.7.0 + resolution: "jest-worker@npm:29.7.0" dependencies: "@types/node": "*" - jest-util: ^29.6.3 + jest-util: ^29.7.0 merge-stream: ^2.0.0 supports-color: ^8.0.0 - checksum: 05d19a5759ebfeb964036065be55ad8d8e8ddffa85d9b3a4c0b95765695efb1d8226ec824a4d8e660c38cda3389bfeb98d819f47232acf9fb0e79f553b7c0a76 + checksum: 30fff60af49675273644d408b650fc2eb4b5dcafc5a0a455f238322a8f9d8a98d847baca9d51ff197b6747f54c7901daa2287799230b856a0f48287d131f8c13 languageName: node linkType: hard @@ -16043,13 +16220,13 @@ __metadata: linkType: hard "jest@npm:^29.6.2": - version: 29.6.4 - resolution: "jest@npm:29.6.4" + version: 29.7.0 + resolution: "jest@npm:29.7.0" dependencies: - "@jest/core": ^29.6.4 + "@jest/core": ^29.7.0 "@jest/types": ^29.6.3 import-local: ^3.0.2 - jest-cli: ^29.6.4 + jest-cli: ^29.7.0 peerDependencies: node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0 peerDependenciesMeta: @@ -16057,7 +16234,7 @@ __metadata: optional: true bin: jest: bin/jest.js - checksum: ba28ca7a86d029bcd742bb254c0c8d0119c1e002ddae128ff6409ebabc0b29c36f69dbf3fdd326aff16e7b2500c9a918bbc6a9a5db4d966e035127242239439f + checksum: 17ca8d67504a7dbb1998cf3c3077ec9031ba3eb512da8d71cb91bcabb2b8995c4e4b292b740cb9bf1cbff5ce3e110b3f7c777b0cefb6f41ab05445f248d0ee0b languageName: node linkType: hard @@ -16085,15 +16262,15 @@ __metadata: linkType: hard "joi@npm:^17.2.1": - version: 17.10.1 - resolution: "joi@npm:17.10.1" + version: 17.10.2 + resolution: "joi@npm:17.10.2" dependencies: "@hapi/hoek": ^9.0.0 "@hapi/topo": ^5.0.0 "@sideway/address": ^4.1.3 "@sideway/formula": ^3.0.1 "@sideway/pinpoint": ^2.0.0 - checksum: 7affbb27ae9283596d6471871352b85ebf73a1e782c0be1998bce1ecc86ba48bee834c8af9a44d7143bb470654d6ae1248a29009ee5463618675d655dbd69306 + checksum: 2fac59e83b35465d04ffcd33a937c39795264bdd3d392bebee8034710f84631a400cd320a3bb0bb736e70ce930abb1ea551bc3ffbeca023b53417d864eb216a4 languageName: node linkType: hard @@ -20669,13 +20846,13 @@ __metadata: linkType: hard "postcss@npm:^8.1.7, postcss@npm:^8.2.14, postcss@npm:^8.3.5, postcss@npm:^8.4.21, postcss@npm:^8.4.23, postcss@npm:^8.4.24, postcss@npm:^8.4.27, postcss@npm:^8.4.4": - version: 8.4.29 - resolution: "postcss@npm:8.4.29" + version: 8.4.30 + resolution: "postcss@npm:8.4.30" dependencies: nanoid: ^3.3.6 picocolors: ^1.0.0 source-map-js: ^1.0.2 - checksum: dd6daa25e781db9ae5b651d9b7bfde0ec6e60e86a37da69a18eb4773d5ddd51e28fc4ff054fbdc04636a31462e6bf09a1e50986f69ac52b10d46b7457cd36d12 + checksum: 6c810c10c9bd3e03ca016e0b6b6756261e640aba1a9a7b1200b55502bc34b9165e38f590aef3493afc2f30ab55cdfcd43fd0f8408d69a77318ddbcf2a8ad164b languageName: node linkType: hard @@ -20853,14 +21030,14 @@ __metadata: languageName: node linkType: hard -"pretty-format@npm:^29.0.0, pretty-format@npm:^29.6.3": - version: 29.6.3 - resolution: "pretty-format@npm:29.6.3" +"pretty-format@npm:^29.0.0, pretty-format@npm:^29.7.0": + version: 29.7.0 + resolution: "pretty-format@npm:29.7.0" dependencies: "@jest/schemas": ^29.6.3 ansi-styles: ^5.0.0 react-is: ^18.0.0 - checksum: 4e1c0db48e65571c22e80ff92123925ff8b3a2a89b71c3a1683cfde711004d492de32fe60c6bc10eea8bf6c678e5cbe544ac6c56cb8096e1eb7caf856928b1c4 + checksum: 032c1602383e71e9c0c02a01bbd25d6759d60e9c7cf21937dde8357aa753da348fcec5def5d1002c9678a8524d5fe099ad98861286550ef44de8808cc61e43b6 languageName: node linkType: hard @@ -21482,15 +21659,15 @@ __metadata: linkType: hard "react-tooltip@npm:^5.10.1": - version: 5.21.3 - resolution: "react-tooltip@npm:5.21.3" + version: 5.21.4 + resolution: "react-tooltip@npm:5.21.4" dependencies: "@floating-ui/dom": ^1.0.0 classnames: ^2.3.0 peerDependencies: react: ">=16.14.0" react-dom: ">=16.14.0" - checksum: 4e16e2b9b3781c24c65bebf2c477d3ec33fc60a7d31243bd9ccd4289cf33f4877eb9dc0b0c54d9fa3eff2dc880c102e2dc38971686ff5a6e1d205aec57a423af + checksum: 9b663c5d9a1472b96d3ed708ecce01052aed267dc739520c9b55389a5e42c195a6bcd0717219f260bf0dadee2452d80a7c5fa14c5c3f8b5cdc6a9174d7f42d4a languageName: node linkType: hard @@ -21620,7 +21797,7 @@ __metadata: languageName: node linkType: hard -"reflect.getprototypeof@npm:^1.0.3": +"reflect.getprototypeof@npm:^1.0.4": version: 1.0.4 resolution: "reflect.getprototypeof@npm:1.0.4" dependencies: @@ -21635,11 +21812,11 @@ __metadata: linkType: hard "regenerate-unicode-properties@npm:^10.1.0": - version: 10.1.0 - resolution: "regenerate-unicode-properties@npm:10.1.0" + version: 10.1.1 + resolution: "regenerate-unicode-properties@npm:10.1.1" dependencies: regenerate: ^1.4.2 - checksum: b1a8929588433ab8b9dc1a34cf3665b3b472f79f2af6ceae00d905fc496b332b9af09c6718fb28c730918f19a00dc1d7310adbaa9b72a2ec7ad2f435da8ace17 + checksum: b80958ef40f125275824c2c47d5081dfaefebd80bff26c76761e9236767c748a4a95a69c053fe29d2df881177f2ca85df4a71fe70a82360388b31159ef19adcf languageName: node linkType: hard @@ -21690,14 +21867,14 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.5.0": - version: 1.5.0 - resolution: "regexp.prototype.flags@npm:1.5.0" +"regexp.prototype.flags@npm:^1.5.0, regexp.prototype.flags@npm:^1.5.1": + version: 1.5.1 + resolution: "regexp.prototype.flags@npm:1.5.1" dependencies: call-bind: ^1.0.2 define-properties: ^1.2.0 - functions-have-names: ^1.2.3 - checksum: c541687cdbdfff1b9a07f6e44879f82c66bbf07665f9a7544c5fd16acdb3ec8d1436caab01662d2fbcad403f3499d49ab0b77fbc7ef29ef961d98cc4bc9755b4 + set-function-name: ^2.0.0 + checksum: 869edff00288442f8d7fa4c9327f91d85f3b3acf8cbbef9ea7a220345cf23e9241b6def9263d2c1ebcf3a316b0aa52ad26a43a84aa02baca3381717b3e307f47 languageName: node linkType: hard @@ -21970,15 +22147,15 @@ __metadata: linkType: hard "resolve@npm:^1.1.7, resolve@npm:^1.10.0, resolve@npm:^1.10.1, resolve@npm:^1.13.1, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.21.0, resolve@npm:^1.22.1, resolve@npm:^1.22.2, resolve@npm:^1.22.4": - version: 1.22.4 - resolution: "resolve@npm:1.22.4" + version: 1.22.6 + resolution: "resolve@npm:1.22.6" dependencies: is-core-module: ^2.13.0 path-parse: ^1.0.7 supports-preserve-symlinks-flag: ^1.0.0 bin: resolve: bin/resolve - checksum: 23f25174c2736ce24c6d918910e0d1f89b6b38fefa07a995dff864acd7863d59a7f049e691f93b4b2ee29696303390d921552b6d1b841ed4a8101f517e1d0124 + checksum: d13bf66d4e2ee30d291491f16f2fa44edd4e0cefb85d53249dd6f93e70b2b8c20ec62f01b18662e3cd40e50a7528f18c4087a99490048992a3bb954cf3201a5b languageName: node linkType: hard @@ -22005,15 +22182,15 @@ __metadata: linkType: hard "resolve@patch:resolve@^1.1.7#~builtin, resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.10.1#~builtin, resolve@patch:resolve@^1.13.1#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.19.0#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.21.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin, resolve@patch:resolve@^1.22.2#~builtin, resolve@patch:resolve@^1.22.4#~builtin": - version: 1.22.4 - resolution: "resolve@patch:resolve@npm%3A1.22.4#~builtin::version=1.22.4&hash=c3c19d" + version: 1.22.6 + resolution: "resolve@patch:resolve@npm%3A1.22.6#~builtin::version=1.22.6&hash=c3c19d" dependencies: is-core-module: ^2.13.0 path-parse: ^1.0.7 supports-preserve-symlinks-flag: ^1.0.0 bin: resolve: bin/resolve - checksum: c45f2545fdc4d21883861b032789e20aa67a2f2692f68da320cc84d5724cd02f2923766c5354b3210897e88f1a7b3d6d2c7c22faeead8eed7078e4c783a444bc + checksum: 9d3b3c67aefd12cecbe5f10ca4d1f51ea190891096497c43f301b086883b426466918c3a64f1bbf1788fabb52b579d58809614006c5d0b49186702b3b8fb746a languageName: node linkType: hard @@ -22195,8 +22372,8 @@ __metadata: linkType: hard "rollup@npm:^3.2.5, rollup@npm:^3.27.1": - version: 3.29.0 - resolution: "rollup@npm:3.29.0" + version: 3.29.2 + resolution: "rollup@npm:3.29.2" dependencies: fsevents: ~2.3.2 dependenciesMeta: @@ -22204,7 +22381,7 @@ __metadata: optional: true bin: rollup: dist/bin/rollup - checksum: 77124a606f44c065dce95b615cd0c9955e1a12f67a30ad28c1128438d5080535b0f028d0edef9dda576ebe8806bdc48aff990198334978738da9716fe9677d72 + checksum: 2eacb5a2522cb41e46e0bd78cca2c2da29b09b1fbd5b7c6ebb0afb3864af125a06fba528dfd6699704e49384e106ff58b359ce4abef61d7db12a7840d3b56e54 languageName: node linkType: hard @@ -22233,7 +22410,7 @@ __metadata: languageName: node linkType: hard -"safe-array-concat@npm:^1.0.0": +"safe-array-concat@npm:^1.0.0, safe-array-concat@npm:^1.0.1": version: 1.0.1 resolution: "safe-array-concat@npm:1.0.1" dependencies: @@ -22611,6 +22788,17 @@ __metadata: languageName: node linkType: hard +"set-function-name@npm:^2.0.0, set-function-name@npm:^2.0.1": + version: 2.0.1 + resolution: "set-function-name@npm:2.0.1" + dependencies: + define-data-property: ^1.0.1 + functions-have-names: ^1.2.3 + has-property-descriptors: ^1.0.0 + checksum: 4975d17d90c40168eee2c7c9c59d023429f0a1690a89d75656306481ece0c3c1fb1ebcc0150ea546d1913e35fbd037bace91372c69e543e51fc5d1f31a9fa126 + languageName: node + linkType: hard + "set-value@npm:^2.0.0, set-value@npm:^2.0.1": version: 2.0.1 resolution: "set-value@npm:2.0.1" @@ -22734,7 +22922,7 @@ __metadata: languageName: node linkType: hard -"signal-exit@npm:^4.0.1": +"signal-exit@npm:^4.0.1, signal-exit@npm:^4.1.0": version: 4.1.0 resolution: "signal-exit@npm:4.1.0" checksum: 64c757b498cb8629ffa5f75485340594d2f8189e9b08700e69199069c8e3070fb3e255f7ab873c05dc0b3cec412aea7402e10a5990cb6a050bd33ba062a6c549 @@ -22857,6 +23045,16 @@ __metadata: languageName: node linkType: hard +"snake-case@npm:^3.0.4": + version: 3.0.4 + resolution: "snake-case@npm:3.0.4" + dependencies: + dot-case: ^3.0.4 + tslib: ^2.0.3 + checksum: 0a7a79900bbb36f8aaa922cf111702a3647ac6165736d5dc96d3ef367efc50465cac70c53cd172c382b022dac72ec91710608e5393de71f76d7142e6fd80e8a3 + languageName: node + linkType: hard + "snapdragon-node@npm:^2.0.1": version: 2.1.1 resolution: "snapdragon-node@npm:2.1.1" @@ -23080,9 +23278,9 @@ __metadata: linkType: hard "spdx-license-ids@npm:^3.0.0": - version: 3.0.13 - resolution: "spdx-license-ids@npm:3.0.13" - checksum: 3469d85c65f3245a279fa11afc250c3dca96e9e847f2f79d57f466940c5bb8495da08a542646086d499b7f24a74b8d0b42f3fc0f95d50ff99af1f599f6360ad7 + version: 3.0.15 + resolution: "spdx-license-ids@npm:3.0.15" + checksum: 99d567875b50504e1a7359f6da7d03e28db2b855b412ced18310679d091565a44f61ffd2585f19ea53a1192c35f2156c143507b12339dda26ef928547df32002 languageName: node linkType: hard @@ -23296,8 +23494,8 @@ __metadata: linkType: hard "string.prototype.matchall@npm:^4.0.6, string.prototype.matchall@npm:^4.0.8": - version: 4.0.9 - resolution: "string.prototype.matchall@npm:4.0.9" + version: 4.0.10 + resolution: "string.prototype.matchall@npm:4.0.10" dependencies: call-bind: ^1.0.2 define-properties: ^1.2.0 @@ -23306,12 +23504,13 @@ __metadata: has-symbols: ^1.0.3 internal-slot: ^1.0.5 regexp.prototype.flags: ^1.5.0 + set-function-name: ^2.0.0 side-channel: ^1.0.4 - checksum: a68a9914755ec8c9b9129d6fb70603d78b839a1ca4a907e601fcb860109cecfbd1884e8b38989885f9c825c1c2015ff5b1ed9ddac7c8d040e4e4b3c9bc4ed5ed + checksum: 3c78bdeff39360c8e435d7c4c6ea19f454aa7a63eda95fa6fadc3a5b984446a2f9f2c02d5c94171ce22268a573524263fbd0c8edbe3ce2e9890d7cc036cdc3ed languageName: node linkType: hard -"string.prototype.trim@npm:^1.2.7": +"string.prototype.trim@npm:^1.2.8": version: 1.2.8 resolution: "string.prototype.trim@npm:1.2.8" dependencies: @@ -23322,7 +23521,7 @@ __metadata: languageName: node linkType: hard -"string.prototype.trimend@npm:^1.0.6": +"string.prototype.trimend@npm:^1.0.7": version: 1.0.7 resolution: "string.prototype.trimend@npm:1.0.7" dependencies: @@ -23333,7 +23532,7 @@ __metadata: languageName: node linkType: hard -"string.prototype.trimstart@npm:^1.0.6": +"string.prototype.trimstart@npm:^1.0.7": version: 1.0.7 resolution: "string.prototype.trimstart@npm:1.0.7" dependencies: @@ -23878,8 +24077,8 @@ __metadata: linkType: hard "terser@npm:^5.0.0, terser@npm:^5.10.0, terser@npm:^5.15.0, terser@npm:^5.16.8": - version: 5.19.4 - resolution: "terser@npm:5.19.4" + version: 5.20.0 + resolution: "terser@npm:5.20.0" dependencies: "@jridgewell/source-map": ^0.3.3 acorn: ^8.8.2 @@ -23887,7 +24086,7 @@ __metadata: source-map-support: ~0.5.20 bin: terser: bin/terser - checksum: 09273ce7d3fbe8fea0ec2603ad1c06cc304838bdac42bbfe77835b0b0b6c4a894054575ca518fe16c95d5c401574a8c703f4fde97da45f1c972ea568e6ecafda + checksum: 251d1b62d7c651ace29f997cf336ff5d5f8e30c65c8698ab7b831764d9e012ab0640895cb609906fb939a5bdf5143d73b5781c5c8c67b9216c77ce92dafdc0bc languageName: node linkType: hard @@ -24964,8 +25163,8 @@ __metadata: linkType: hard "update-browserslist-db@npm:^1.0.11": - version: 1.0.11 - resolution: "update-browserslist-db@npm:1.0.11" + version: 1.0.12 + resolution: "update-browserslist-db@npm:1.0.12" dependencies: escalade: ^3.1.1 picocolors: ^1.0.0 @@ -24973,7 +25172,7 @@ __metadata: browserslist: ">= 4.21.0" bin: update-browserslist-db: cli.js - checksum: b98327518f9a345c7cad5437afae4d2ae7d865f9779554baf2a200fdf4bac4969076b679b1115434bd6557376bdd37ca7583d0f9b8f8e302d7d4cc1e91b5f231 + checksum: 60168fc8158935f70d60b30716a3b015a865b786434ebde91ade752bf94785f6f39c71b956cc0266d78f90cb895f6aa847fa9ca441940cd143d10caf0fbe764b languageName: node linkType: hard @@ -25106,11 +25305,11 @@ __metadata: linkType: hard "uuid@npm:^9.0.0": - version: 9.0.0 - resolution: "uuid@npm:9.0.0" + version: 9.0.1 + resolution: "uuid@npm:9.0.1" bin: uuid: dist/bin/uuid - checksum: 8dd2c83c43ddc7e1c71e36b60aea40030a6505139af6bee0f382ebcd1a56f6cd3028f7f06ffb07f8cf6ced320b76aea275284b224b002b289f89fe89c389b028 + checksum: 39931f6da74e307f51c0fb463dc2462807531dc80760a9bff1e35af4316131b4fc3203d16da60ae33f07fdca5b56f3f1dd662da0c99fea9aaeab2004780cc5f4 languageName: node linkType: hard @@ -25177,15 +25376,15 @@ __metadata: linkType: hard "vite-plugin-svgr@npm:^3.2.0": - version: 3.2.0 - resolution: "vite-plugin-svgr@npm:3.2.0" + version: 3.3.0 + resolution: "vite-plugin-svgr@npm:3.3.0" dependencies: - "@rollup/pluginutils": ^5.0.2 - "@svgr/core": ^7.0.0 - "@svgr/plugin-jsx": ^7.0.0 + "@rollup/pluginutils": ^5.0.4 + "@svgr/core": ^8.1.0 + "@svgr/plugin-jsx": ^8.1.0 peerDependencies: vite: ^2.6.0 || 3 || 4 - checksum: 19887e1db910ecdd6c12645e430d9e1d9ad40fe6945d3f7de68fc235fba0277586deffa47db1a6be2fa511207b01893a3c5bad9d1bd558ca28971feca13ecd9a + checksum: 014840a0d98a54422fb94520086bb20c99c7ee21285d7049e4496f529b7be69e23d34f543a29867372e5cbdf135c5a96eae01474c88ec1223c78b7e4b18008b0 languageName: node linkType: hard @@ -25567,9 +25766,9 @@ __metadata: linkType: hard "whatwg-fetch@npm:^3.0.0, whatwg-fetch@npm:^3.6.2": - version: 3.6.18 - resolution: "whatwg-fetch@npm:3.6.18" - checksum: 72fd318a00fd9031f7f5b28bfe30e458ca5e6ebc9b3de6e03edf810f455bca0ec954035bd9f1b5f9e6a82bbdc3fbba59b14bee24c039460c8a75f8f990ebe0b1 + version: 3.6.19 + resolution: "whatwg-fetch@npm:3.6.19" + checksum: 2896bc9ca867ea514392c73e2a272f65d5c4916248fe0837a9df5b1b92f247047bc76cf7c29c28a01ac6c5fb4314021d2718958c8a08292a96d56f72b2f56806 languageName: node linkType: hard @@ -25691,7 +25890,7 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.10, which-typed-array@npm:^1.1.11, which-typed-array@npm:^1.1.9": +"which-typed-array@npm:^1.1.11, which-typed-array@npm:^1.1.9": version: 1.1.11 resolution: "which-typed-array@npm:1.1.11" dependencies: @@ -26066,8 +26265,8 @@ __metadata: linkType: hard "ws@npm:^8.11.0, ws@npm:^8.12.1, ws@npm:^8.13.0": - version: 8.14.1 - resolution: "ws@npm:8.14.1" + version: 8.14.2 + resolution: "ws@npm:8.14.2" peerDependencies: bufferutil: ^4.0.1 utf-8-validate: ">=5.0.2" @@ -26076,7 +26275,7 @@ __metadata: optional: true utf-8-validate: optional: true - checksum: 9e310be2b0ff69e1f87d8c6d093ecd17a1ed4c37f281d17c35e8c30e2bd116401775b3d503249651374e6e0e1e9905db62fff096b694371c77561aee06bc3466 + checksum: 3ca0dad26e8cc6515ff392b622a1467430814c463b3368b0258e33696b1d4bed7510bc7030f7b72838b9fdeb8dbd8839cbf808367d6aae2e1d668ce741d4308b languageName: node linkType: hard