Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to core, ui, lightspark-sdk, lightspark-cli #433

Merged
merged 10 commits into from
Oct 22, 2024
6 changes: 6 additions & 0 deletions .changeset/serious-eagles-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@lightsparkdev/lightspark-cli": patch
"@lightsparkdev/core": patch
---

- Bump secp256k1 from 5.0.0 to 5.0.1
5 changes: 5 additions & 0 deletions .changeset/serious-eagles-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@lightsparkdev/lightspark-sdk": patch
---

- add more doc strings
7 changes: 7 additions & 0 deletions .changeset/thin-scissors-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@lightsparkdev/ui": patch
---

- Fix alignment of empty QR code
- Fix fonts for some projects
- Fix button themes and add quaternary button kind
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"dayjs": "^1.11.7",
"graphql": "^16.6.0",
"graphql-ws": "^5.11.3",
"secp256k1": "^5.0.0",
"secp256k1": "^5.0.1",
"ws": "^8.12.1",
"zen-observable-ts": "^1.1.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/lightspark-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"jose": "^4.15.5",
"jsonwebtoken": "^9.0.1",
"qrcode-terminal": "^0.12.0",
"secp256k1": "^5.0.0"
"secp256k1": "^5.0.1"
},
"engines": {
"node": ">=18"
Expand Down
2 changes: 1 addition & 1 deletion packages/lightspark-sdk/src/objects/Account.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import autoBind from "auto-bind";
import type LightsparkClient from "../client.js";
import type AccountToApiTokensConnection from "./AccountToApiTokensConnection.js";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,24 @@ interface AccountToTransactionsConnection {
/**
* Profit (or loss) generated by the transactions in this connection, with the set of filters
* and constraints provided.
*
* @deprecated Customer nodes do not route transactions anymore.
**/
profitLoss?: CurrencyAmount | undefined;

/**
* Average fee earned for the transactions in this connection, with the set of filters and
* constraints provided.
*
* @deprecated Customer nodes do not route transactions anymore.
**/
averageFeeEarned?: CurrencyAmount | undefined;

/**
* Total amount transacted by the transactions in this connection, with the set of filters and
* constraints provided.
*
* @deprecated Total amount can be calculated by summing up all transactions in `entities`.
**/
totalAmountTransacted?: CurrencyAmount | undefined;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/lightspark-sdk/src/objects/ApiToken.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import Permission from "./Permission.js";

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/lightspark-sdk/src/objects/AuditLogActor.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { LightsparkException, isObject, type Query } from "@lightsparkdev/core";
import { LightsparkException, type Query, isObject } from "@lightsparkdev/core";
import type ApiToken from "./ApiToken.js";
import Permission from "./Permission.js";

Expand Down
8 changes: 6 additions & 2 deletions packages/lightspark-sdk/src/objects/Channel.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import autoBind from "auto-bind";
import type LightsparkClient from "../client.js";
import type ChannelFees from "./ChannelFees.js";
Expand Down Expand Up @@ -71,7 +71,11 @@ class Channel implements Entity {
public readonly estimatedForceClosureWaitMinutes?: number | undefined,
/** The amount to be paid in fees for the current set of commitment transactions. **/
public readonly commitFee?: CurrencyAmount | undefined,
/** The fees charged for routing payments through this channel. **/
/**
* The fees charged for routing payments through this channel.
*
* @deprecated Customer nodes do not route payments anymore.
**/
public readonly fees?: ChannelFees | undefined,
/** If known, the remote node of the channel. **/
public readonly remoteNodeId?: string | undefined,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import type CurrencyAmount from "./CurrencyAmount.js";
import {
CurrencyAmountFromJson,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import type CurrencyAmount from "./CurrencyAmount.js";
import {
CurrencyAmountFromJson,
Expand Down
2 changes: 1 addition & 1 deletion packages/lightspark-sdk/src/objects/ChannelSnapshot.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import type CurrencyAmount from "./CurrencyAmount.js";
import {
CurrencyAmountFromJson,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

interface CreateUmaInvoiceInput {
/** The node from which to create the invoice. **/
nodeId: string;

/** The amount for which the invoice should be created, in millisatoshis. **/
amountMsats: number;

/**
* The SHA256 hash of the UMA metadata payload. This will be present in the h-tag (SHA256
* purpose of payment) of the resulting Bolt 11 invoice.
**/
metadataHash: string;

/** The expiry of the invoice in seconds. Default value is 86400 (1 day). **/
expirySecs?: number | undefined;

/** An optional, monthly-rotated, unique hashed identifier corresponding to the receiver of the
* payment. **/
receiverHash?: string | undefined;
}

Expand Down
2 changes: 2 additions & 0 deletions packages/lightspark-sdk/src/objects/CurrencyUnit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export enum CurrencyUnit {
MILLISATOSHI = "MILLISATOSHI",
/** United States Dollar. **/
USD = "USD",
/** Mexican Peso. **/
MXN = "MXN",
/**
* 0.000000001 (10e-9) Bitcoin or a billionth of a Bitcoin. We recommend using the Satoshi unit
* instead when possible. *
Expand Down
2 changes: 1 addition & 1 deletion packages/lightspark-sdk/src/objects/Deposit.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import type CurrencyAmount from "./CurrencyAmount.js";
import {
CurrencyAmountFromJson,
Expand Down
4 changes: 3 additions & 1 deletion packages/lightspark-sdk/src/objects/GraphNode.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import autoBind from "auto-bind";
import type LightsparkClient from "../client.js";
import BitcoinNetwork from "./BitcoinNetwork.js";
Expand Down Expand Up @@ -51,6 +51,8 @@ class GraphNode implements Node, Entity {
* A summary metric used to capture how well positioned a node is to send, receive, or route
* transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
* capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
*
* @deprecated Not supported.
**/
public readonly conductivity?: number | undefined,
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/lightspark-sdk/src/objects/Hop.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import type CurrencyAmount from "./CurrencyAmount.js";
import {
CurrencyAmountFromJson,
Expand Down
2 changes: 1 addition & 1 deletion packages/lightspark-sdk/src/objects/IncomingPayment.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import autoBind from "auto-bind";
import type LightsparkClient from "../client.js";
import type CurrencyAmount from "./CurrencyAmount.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import type CurrencyAmount from "./CurrencyAmount.js";
import {
CurrencyAmountFromJson,
Expand Down
2 changes: 1 addition & 1 deletion packages/lightspark-sdk/src/objects/Invoice.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import type CurrencyAmount from "./CurrencyAmount.js";
import {
CurrencyAmountFromJson,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { LightsparkException, isObject, type Query } from "@lightsparkdev/core";
import { LightsparkException, type Query, isObject } from "@lightsparkdev/core";
import type CurrencyAmount from "./CurrencyAmount.js";
import {
CurrencyAmountFromJson,
Expand Down
4 changes: 3 additions & 1 deletion packages/lightspark-sdk/src/objects/LightsparkNode.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { LightsparkException, isObject, type Query } from "@lightsparkdev/core";
import { LightsparkException, type Query, isObject } from "@lightsparkdev/core";
import type LightsparkClient from "../client.js";
import type Balances from "./Balances.js";
import { BalancesFromJson, BalancesToJson } from "./Balances.js";
Expand Down Expand Up @@ -82,6 +82,8 @@ interface LightsparkNode {
* A summary metric used to capture how well positioned a node is to send, receive, or route
* transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
* capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
*
* @deprecated Not supported.
**/
conductivity?: number | undefined;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { LightsparkException, isObject, type Query } from "@lightsparkdev/core";
import { LightsparkException, type Query, isObject } from "@lightsparkdev/core";
import Account from "./Account.js";
import { BalancesFromJson, BalancesToJson } from "./Balances.js";
import Wallet from "./Wallet.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import autoBind from "auto-bind";
import type LightsparkClient from "../client.js";
import type Balances from "./Balances.js";
Expand Down Expand Up @@ -76,6 +76,8 @@ class LightsparkNodeWithOSK implements LightsparkNode, Node, Entity {
* A summary metric used to capture how well positioned a node is to send, receive, or route
* transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
* capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
*
* @deprecated Not supported.
**/
public readonly conductivity?: number | undefined,
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import autoBind from "auto-bind";
import type LightsparkClient from "../client.js";
import type Balances from "./Balances.js";
Expand Down Expand Up @@ -74,6 +74,8 @@ class LightsparkNodeWithRemoteSigning implements LightsparkNode, Node, Entity {
* A summary metric used to capture how well positioned a node is to send, receive, or route
* transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
* capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
*
* @deprecated Not supported.
**/
public readonly conductivity?: number | undefined,
/**
Expand Down
4 changes: 3 additions & 1 deletion packages/lightspark-sdk/src/objects/Node.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { LightsparkException, isObject, type Query } from "@lightsparkdev/core";
import { LightsparkException, type Query, isObject } from "@lightsparkdev/core";
import type LightsparkClient from "../client.js";
import { BalancesFromJson, BalancesToJson } from "./Balances.js";
import BitcoinNetwork from "./BitcoinNetwork.js";
Expand Down Expand Up @@ -67,6 +67,8 @@ interface Node {
* A summary metric used to capture how well positioned a node is to send, receive, or route
* transactions efficiently. Maximizing a node's conductivity helps a node’s transactions to be
* capital efficient. The value is an integer ranging between 0 and 10 (bounds included).
*
* @deprecated Not supported.
**/
conductivity?: number | undefined;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { LightsparkException, isObject, type Query } from "@lightsparkdev/core";
import { LightsparkException, type Query, isObject } from "@lightsparkdev/core";
import type ChannelClosingTransaction from "./ChannelClosingTransaction.js";
import type ChannelOpeningTransaction from "./ChannelOpeningTransaction.js";
import type CurrencyAmount from "./CurrencyAmount.js";
Expand Down
2 changes: 1 addition & 1 deletion packages/lightspark-sdk/src/objects/OutgoingPayment.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import autoBind from "auto-bind";
import type LightsparkClient from "../client.js";
import type CurrencyAmount from "./CurrencyAmount.js";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import autoBind from "auto-bind";
import type LightsparkClient from "../client.js";
import type CurrencyAmount from "./CurrencyAmount.js";
Expand Down Expand Up @@ -60,7 +60,11 @@ class OutgoingPaymentAttempt implements Entity {
* one-hop payment, this value will be zero as we don't need to pay a fee to ourselves.
**/
public readonly fees?: CurrencyAmount | undefined,
/** The channel snapshot at the time the outgoing payment attempt was made. **/
/**
* The channel snapshot at the time the outgoing payment attempt was made.
*
* @deprecated Not supported.
**/
public readonly channelSnapshotId?: string | undefined,
) {
autoBind(this);
Expand Down
2 changes: 1 addition & 1 deletion packages/lightspark-sdk/src/objects/PaymentRequest.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { LightsparkException, isObject, type Query } from "@lightsparkdev/core";
import { LightsparkException, type Query, isObject } from "@lightsparkdev/core";
import {
CurrencyAmountFromJson,
CurrencyAmountToJson,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import type CurrencyAmount from "./CurrencyAmount.js";
import {
CurrencyAmountFromJson,
Expand Down
2 changes: 1 addition & 1 deletion packages/lightspark-sdk/src/objects/Signable.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";

interface Signable {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/lightspark-sdk/src/objects/SignablePayload.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import SignablePayloadStatus from "./SignablePayloadStatus.js";

interface SignablePayload {
Expand Down
2 changes: 1 addition & 1 deletion packages/lightspark-sdk/src/objects/Transaction.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { LightsparkException, isObject, type Query } from "@lightsparkdev/core";
import { LightsparkException, type Query, isObject } from "@lightsparkdev/core";
import type ChannelClosingTransaction from "./ChannelClosingTransaction.js";
import type ChannelOpeningTransaction from "./ChannelOpeningTransaction.js";
import type CurrencyAmount from "./CurrencyAmount.js";
Expand Down
2 changes: 1 addition & 1 deletion packages/lightspark-sdk/src/objects/UmaInvitation.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import IncentivesIneligibilityReason from "./IncentivesIneligibilityReason.js";
import IncentivesStatus from "./IncentivesStatus.js";

Expand Down
2 changes: 1 addition & 1 deletion packages/lightspark-sdk/src/objects/Wallet.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright ©, 2023-present, Lightspark Group, Inc. - All Rights Reserved

import { isObject, type Query } from "@lightsparkdev/core";
import { type Query, isObject } from "@lightsparkdev/core";
import autoBind from "auto-bind";
import type LightsparkClient from "../client.js";
import type Balances from "./Balances.js";
Expand Down
Loading
Loading