Skip to content

Commit

Permalink
Add descriptions and deprecation tags to JS class definitions. LIG-37…
Browse files Browse the repository at this point in the history
…94 (#321)

* [docs] add API reference pages (#7433)

## Why
We want API reference pages to show in detail parts of our graphql schema

## How
Parse the json file and automatically statically generate pages from all the types/queries/mutations

## Changes
- copies over graphql schemas to docs in introspection script
- generates API reference pages from the schema
- restructures routing structure to not use catch all segment for normal articles
- adds nav links to all api reference pages
- parses graphql type info into something that can be represented to the user (design tbd)
- reuses some parsing logic from old docs, but strongly types using the graphql schema json type instead of using `any`
- adds `schema` utils file for parsing the schema and getting types
- adds `strings` utils file for transforming schema type names into readable names
- changes collapsible animation to use height 100% which no longer animates nicely, but is necessary to make the height work for extremely large collapsibles such as the API reference one

![Screenshot 2023-11-09 at 1.13.59 PM.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/NU8OmLauzLqa61yWDJkY/4f1f4cc4-99d6-43a5-aefb-325b230e6a54.png)

## TODO
- [ ] get schema type from both lightspark and wallet sdks
- [ ] add links to types within api reference pages
- [ ] talk to design about placement of api reference in navs and actual page content

GitOrigin-RevId: 9d1e2fd6a899f7804320ee40e7dc50dcf041f55d

* Bump prettier-plugin-organize-imports from 3.2.3 to 3.2.4 in /js (#7444)

Bumps
[prettier-plugin-organize-imports](https://github.com/simonhaenisch/prettier-plugin-organize-imports)
from 3.2.3 to 3.2.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/simonhaenisch/prettier-plugin-organize-imports/releases">prettier-plugin-organize-imports's
releases</a>.</em></p>
<blockquote>
<h2>3.2.4</h2>
<h2>What's Changed</h2>
<ul>
<li>fix: skip when formatting ranges — by <a
href="https://github.com/MattLish"><code>@​MattLish</code></a> in <a
href="https://redirect.github.com/simonhaenisch/prettier-plugin-organize-imports/pull/112">simonhaenisch/prettier-plugin-organize-imports#112</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/MattLish"><code>@​MattLish</code></a>
made their first contribution in <a
href="https://redirect.github.com/simonhaenisch/prettier-plugin-organize-imports/pull/112">simonhaenisch/prettier-plugin-organize-imports#112</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/simonhaenisch/prettier-plugin-organize-imports/compare/v3.2.3...v3.2.4">https://github.com/simonhaenisch/prettier-plugin-organize-imports/compare/v3.2.3...v3.2.4</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/simonhaenisch/prettier-plugin-organize-imports/commit/2e4f07ef1e624c15385edb83ebc73eae9d664470"><code>2e4f07e</code></a>
3.2.4</li>
<li><a
href="https://github.com/simonhaenisch/prettier-plugin-organize-imports/commit/44a0cdd3f183dc8b78e29bb39c9207dc2fa92175"><code>44a0cdd</code></a>
chore(readme): update changelog</li>
<li><a
href="https://github.com/simonhaenisch/prettier-plugin-organize-imports/commit/5ebe7d13f9d10d18554f982eee656dd53ad87d6d"><code>5ebe7d1</code></a>
fix: skip when formatting ranges (<a
href="https://redirect.github.com/simonhaenisch/prettier-plugin-organize-imports/issues/112">#112</a>)</li>
<li><a
href="https://github.com/simonhaenisch/prettier-plugin-organize-imports/commit/9a10490ebacb7f8e223fe944cccf598d17ac4025"><code>9a10490</code></a>
chore(ci): drop node 14, add node 20</li>
<li><a
href="https://github.com/simonhaenisch/prettier-plugin-organize-imports/commit/52254f4cea8e85a99071629374b558d907284eff"><code>52254f4</code></a>
chore: bump deps</li>
<li>See full diff in <a
href="https://github.com/simonhaenisch/prettier-plugin-organize-imports/compare/v3.2.3...v3.2.4">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=prettier-plugin-organize-imports&package-manager=npm_and_yarn&previous-version=3.2.3&new-version=3.2.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)

</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Corey Martin <[email protected]>
GitOrigin-RevId: 509e4501badcb1460ebe45327c4bf8f09962e01f

* CI update lock file for PR

* Bump expo from 48.0.21 to 49.0.17 in /js (#7446)

Bumps [expo](https://github.com/expo/expo/tree/HEAD/packages/expo) from
48.0.21 to 49.0.17.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/expo/expo/blob/main/CHANGELOG.md">expo's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<p>This is the log of notable changes to the Expo client that are
developer-facing.
Package-specific changes not released in any SDK will be added here just
before the release. Until then, you can find them in changelogs of the
individual packages (see <a
href="https://github.com/expo/expo/blob/main/packages">packages</a>
directory).</p>
<h2>Unpublished</h2>
<h3>📚 3rd party library updates</h3>
<h3>🛠 Breaking changes</h3>
<h3>🎉 New features</h3>
<h3>🐛 Bug fixes</h3>
<h3>💡 Others</h3>
<h2>49.0.0 — 2023-06-27</h2>
<h3>📚 3rd party library updates</h3>
<ul>
<li>Updated <code>@react-native-community/datetimepicker</code> from
<code>6.7.3</code> to <code>7.2.0</code>. (<a
href="https://redirect.github.com/expo/expo/pull/23034">#23034</a> by <a
href="https://github.com/gabrieldonadel"><code>@​gabrieldonadel</code></a>)</li>
<li>Updated <code>@react-native-community/netinfo</code> from
<code>9.3.7</code> to <code>9.3.10</code>. (<a
href="https://redirect.github.com/expo/expo/pull/22892">#22892</a> by <a
href="https://github.com/douglowder"><code>@​douglowder</code></a>)</li>
<li>Updated <code>@react-native-masked-view/masked-view</code> from
<code>0.2.8</code> to <code>0.2.9</code>. (<a
href="https://redirect.github.com/expo/expo/pull/22875">#22875</a> by <a
href="https://github.com/gabrieldonadel"><code>@​gabrieldonadel</code></a>)</li>
<li>Updated <code>@react-native-picker/picker</code> from
<code>2.4.8</code> to <code>2.4.10</code>. (<a
href="https://redirect.github.com/expo/expo/pull/22919">#22919</a> by <a
href="https://github.com/keith-kurak"><code>@​keith-kurak</code></a>)</li>
<li>Updated
<code>@react-native-segmented-control/segmented-control</code> from
<code>2.4.0</code> to <code>2.4.1</code>. (<a
href="https://redirect.github.com/expo/expo/pull/22911">#22911</a> by <a
href="https://github.com/keith-kurak"><code>@​keith-kurak</code></a>)</li>
<li>Updated <code>@shopify/flash-list</code> from <code>1.4.0</code> to
<code>1.4.3</code>. (<a
href="https://redirect.github.com/expo/expo/pull/22893">#22893</a> by <a
href="https://github.com/gabrieldonadel"><code>@​gabrieldonadel</code></a>)</li>
<li>Updated <code>@shopify/react-native-skia</code> from
<code>0.1.172</code> to <code>0.1.196</code>. (<a
href="https://redirect.github.com/expo/expo/pull/22900">#22900</a>, <a
href="https://redirect.github.com/expo/expo/pull/23036">#23036</a>, <a
href="https://redirect.github.com/expo/expo/pull/23157">#23157</a> by <a
href="https://github.com/kudo"><code>@​kudo</code></a>)</li>
<li>Updated <code>lottie-react-native</code> from <code>5.1.4</code> to
<code>5.1.6</code>. (<a
href="https://redirect.github.com/expo/expo/pull/22868">#22868</a> by <a
href="https://github.com/alanjhughes"><code>@​alanjhughes</code></a>)</li>
<li>Updated <code>react-native-gesture-handler</code> from
<code>2.10.1</code> to <code>2.12.0</code>. (<a
href="https://redirect.github.com/expo/expo/pull/22906">#22621</a> by <a
href="https://github.com/aleqsio"><code>@​aleqsio</code></a>)</li>
<li>Updated <code>react-native-maps</code> from <code>1.3.2</code> to
<code>1.7.1</code>. (<a
href="https://redirect.github.com/expo/expo/pull/22908">#22908</a> by <a
href="https://github.com/aleqsio"><code>@​aleqsio</code></a>)</li>
<li>Updated <code>react-native-pager-view</code> from <code>6.1.2</code>
to <code>6.2.0</code>. (<a
href="https://redirect.github.com/expo/expo/pull/22892">#22892</a> by <a
href="https://github.com/douglowder"><code>@​douglowder</code></a>)</li>
<li>Updated <code>react-native-reanimated</code> from
<code>2.14.4</code> to <code>3.3.0</code>. (<a
href="https://redirect.github.com/expo/expo/pull/22907">#22907</a> by <a
href="https://github.com/kudo"><code>@​kudo</code></a>)</li>
<li>Updated <code>react-native-safe-area-context</code> from
<code>4.5.0</code> to <code>4.6.3</code>. (<a
href="https://redirect.github.com/expo/expo/pull/23026">#23026</a> by <a
href="https://github.com/tsapeta"><code>@​tsapeta</code></a>)</li>
<li>Updated <code>react-native-screens</code> from <code>3.20.0</code>
to <code>3.22.0</code>. (<a
href="https://redirect.github.com/expo/expo/pull/23022">#23022</a> by <a
href="https://github.com/tsapeta"><code>@​tsapeta</code></a>)</li>
<li>Updated <code>react-native-svg</code> from <code>13.4.0</code> to
<code>13.9.0</code>. (<a
href="https://redirect.github.com/expo/expo/pull/22934">#22934</a> by <a
href="https://github.com/alanjhughes"><code>@​alanjhughes</code></a>)</li>
<li>Updated <code>react-native-view-shot</code> from <code>3.5.0</code>
to <code>3.7.0</code>. (<a
href="https://redirect.github.com/expo/expo/pull/23024">#23024</a> by <a
href="https://github.com/tsapeta"><code>@​tsapeta</code></a>))</li>
<li>Updated <code>react-native-webview</code> from <code>11.26.0</code>
to <code>13.2.2</code>. (<a
href="https://redirect.github.com/expo/expo/pull/22913">#22913</a> by <a
href="https://github.com/aleqsio"><code>@​aleqsio</code></a>)</li>
<li><strong><code>expo-application</code></strong>
<ul>
<li>Updated <code>robolectric</code> to <code>4.10</code> and
<code>junit</code> to <code>4.13.2</code>. (<a
href="https://redirect.github.com/expo/expo/pull/22395">#22395</a> by <a
href="https://github.com/josephyanks"><code>@​josephyanks</code></a>)</li>
</ul>
</li>
<li><strong><code>expo-battery</code></strong>
<ul>
<li>Updated <code>robolectric</code> to <code>4.10</code> and
<code>junit</code> to <code>4.13.2</code>. (<a
href="https://redirect.github.com/expo/expo/pull/22395">#22395</a> by <a
href="https://github.com/josephyanks"><code>@​josephyanks</code></a>)</li>
</ul>
</li>
<li><strong><code>expo-clipboard</code></strong>
<ul>
<li>Updated <code>robolectric</code> to <code>4.10</code>. (<a
href="https://redirect.github.com/expo/expo/pull/22395">#22395</a> by <a
href="https://github.com/josephyanks"><code>@​josephyanks</code></a>)</li>
</ul>
</li>
<li><strong><code>expo-crypto</code></strong>
<ul>
<li>Updated <code>robolectric</code> to <code>4.10</code> and
<code>junit</code> to <code>4.13.2</code>. (<a
href="https://redirect.github.com/expo/expo/pull/22395">#22395</a> by <a
href="https://github.com/josephyanks"><code>@​josephyanks</code></a>)</li>
</ul>
</li>
<li><strong><code>expo-location</code></strong>
<ul>
<li>Updated <code>com.google.android.gms:play-services-location</code>
to <code>21.0.1</code> and <code>io.nlopez.smartlocation:library</code>
to <code>3.3.3</code> (<a
href="https://redirect.github.com/expo/expo/pull/22468">#22468</a> by <a
href="https://github.com/josephyanks"><code>@​josephyanks</code></a>)</li>
</ul>
</li>
<li><strong><code>expo-media-library</code></strong>
<ul>
<li>Updated <code>robolectric</code> to <code>4.10</code>. (<a
href="https://redirect.github.com/expo/expo/pull/22395">#22395</a> by <a
href="https://github.com/josephyanks"><code>@​josephyanks</code></a>)</li>
</ul>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/expo/expo/commits/HEAD/packages/expo">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=expo&package-manager=npm_and_yarn&previous-version=48.0.21&new-version=49.0.17)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)

</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
GitOrigin-RevId: 8ec309631010ee27e1ab7ae7a8b7d40975fcf621

* Bump @types/uuid from 9.0.6 to 9.0.7 in /js (#7445)

Bumps
[@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/uuid)
from 9.0.6 to 9.0.7.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/uuid">compare
view</a></li>
</ul>
</details>
<br />

[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/uuid&package-manager=npm_and_yarn&previous-version=9.0.6&new-version=9.0.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)

</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
GitOrigin-RevId: 0899d72d553e85593cbd2ac728444cf32027b04d

* CI update lock file for PR

* Add descriptions and deprecation tags to JS class definitions. (#7458)

FIXES LIG-3794

GitOrigin-RevId: 71e7a43ca45d05783d106b9e82590a93b1df0264

* Create red-zebras-dance.md

* [ui] fix collapsible expanding to full height even when not open (#7464)

GitOrigin-RevId: 55d8f8b1da4798320ea189f6f10b8b3b57a519b4

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Brian Siao Tick Chong <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Corey Martin <[email protected]>
Co-authored-by: Lightspark Eng <[email protected]>
Co-authored-by: Jeremy Klein <[email protected]>
  • Loading branch information
6 people authored Nov 13, 2023
1 parent aefe52c commit 219f60f
Show file tree
Hide file tree
Showing 30 changed files with 666 additions and 244 deletions.
6 changes: 6 additions & 0 deletions .changeset/red-zebras-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@lightsparkdev/lightspark-sdk": patch
"@lightsparkdev/wallet-sdk": patch
---

Add descriptions and deprecation tags to JS class definitions. LIG-3794
2 changes: 1 addition & 1 deletion apps/examples/ls-react-native-crypto-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"dependencies": {
"@expo/webpack-config": "^18.0.1",
"expo": "~48.0.18",
"expo": "~49.0.17",
"expo-modules-core": "~1.2.7",
"expo-splash-screen": "~0.18.2",
"expo-status-bar": "~1.4.4",
Expand Down
2 changes: 1 addition & 1 deletion apps/examples/remote-signing-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"jest": "^29.6.2",
"nodemon": "^2.0.22",
"prettier": "3.0.3",
"prettier-plugin-organize-imports": "^3.2.2",
"prettier-plugin-organize-imports": "^3.2.4",
"supertest": "^6.3.3",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
Expand Down
2 changes: 1 addition & 1 deletion apps/examples/streaming-wallet-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@types/node": "^20.2.5",
"@types/react": "^18.2.12",
"@types/react-dom": "^18.0.0",
"@types/uuid": "^9.0.1",
"@types/uuid": "^9.0.7",
"@vitejs/plugin-react": "^4.0.1",
"eslint-watch": "^8.0.0",
"tsc-absolute": "^1.0.1",
Expand Down
2 changes: 1 addition & 1 deletion apps/examples/uma-vasp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jest": "^29.6.2",
"nodemon": "^2.0.22",
"prettier": "3.0.3",
"prettier-plugin-organize-imports": "^3.2.2",
"prettier-plugin-organize-imports": "^3.2.4",
"supertest": "^6.3.3",
"ts-jest": "^29.1.1",
"ts-node": "^10.9.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"eslint-watch": "^8.0.0",
"jest": "^29.6.2",
"prettier": "3.0.3",
"prettier-plugin-organize-imports": "^3.2.2",
"prettier-plugin-organize-imports": "^3.2.4",
"ts-jest": "^29.1.1",
"tsc-absolute": "^1.0.1",
"tsup": "^7.2.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 @@ -37,7 +37,7 @@
"eslint-watch": "^8.0.0",
"nodemon": "^2.0.22",
"prettier": "3.0.3",
"prettier-plugin-organize-imports": "^3.2.2",
"prettier-plugin-organize-imports": "^3.2.4",
"ts-node": "^10.9.1",
"tsc-absolute": "^1.0.1",
"typescript": "^4.9.5"
Expand Down
2 changes: 1 addition & 1 deletion packages/lightspark-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
"eslint-watch": "^8.0.0",
"jest": "^29.6.2",
"prettier": "3.0.3",
"prettier-plugin-organize-imports": "^3.2.2",
"prettier-plugin-organize-imports": "^3.2.4",
"ts-jest": "^29.1.1",
"tsc-absolute": "^1.0.1",
"tsup": "^7.2.0",
Expand Down
8 changes: 8 additions & 0 deletions packages/lightspark-sdk/src/objects/Account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,18 @@ import type TransactionType from "./TransactionType.js";
/** This is an object representing the connected Lightspark account. You can retrieve this object to see your account information and objects tied to your account. **/
class Account implements LightsparkNodeOwner, Entity {
constructor(
/**
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
* string.
**/
public readonly id: string,
/** The date and time when the entity was first created. **/
public readonly createdAt: string,
/** The date and time when the entity was last updated. **/
public readonly updatedAt: string,
/** The typename of the object **/
public readonly typename: string,
/** The name of this account. **/
public readonly name?: string | undefined,
) {
autoBind(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import { ChannelFromJson } from "./Channel.js";

class AccountToChannelsConnection {
constructor(
/**
* The total count of objects in this connection, using the current filters. It is different from the
* number of objects returned in the current page (in the `entities` field).
**/
public readonly count: number,
/** The channels for the current page of this connection. **/
public readonly entities: Channel[],
) {
autoBind(this);
Expand Down
31 changes: 31 additions & 0 deletions packages/lightspark-sdk/src/objects/Channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,55 @@ import type TransactionType from "./TransactionType.js";
/** This is an object representing a channel on the Lightning Network. You can retrieve this object to get detailed information on a specific Lightning Network channel. **/
class Channel implements Entity {
constructor(
/**
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
* string.
**/
public readonly id: string,
/** The date and time when the entity was first created. **/
public readonly createdAt: string,
/** The date and time when the entity was last updated. **/
public readonly updatedAt: string,
/** The local Lightspark node of the channel. **/
public readonly localNodeId: string,
/** The typename of the object **/
public readonly typename: string,
/** The transaction that funded the channel upon channel opening. **/
public readonly fundingTransactionId?: string | undefined,
/**
* The total amount of funds in this channel, including the channel balance on the local node, the
* channel balance on the remote node and the on-chain fees to close the channel.
**/
public readonly capacity?: CurrencyAmount | undefined,
/** The channel balance on the local node. **/
public readonly localBalance?: CurrencyAmount | undefined,
/** The channel balance on the local node that is currently allocated to in-progress payments. **/
public readonly localUnsettledBalance?: CurrencyAmount | undefined,
/** The channel balance on the remote node. **/
public readonly remoteBalance?: CurrencyAmount | undefined,
/** The channel balance on the remote node that is currently allocated to in-progress payments. **/
public readonly remoteUnsettledBalance?: CurrencyAmount | undefined,
/** The channel balance that is currently allocated to in-progress payments. **/
public readonly unsettledBalance?: CurrencyAmount | undefined,
/** The total balance in this channel, including the channel balance on both local and remote nodes. **/
public readonly totalBalance?: CurrencyAmount | undefined,
/** The current status of this channel. **/
public readonly status?: ChannelStatus | undefined,
/**
* The estimated time to wait for the channel's hash timelock contract to expire when force closing
* the channel. It is in unit of minutes.
**/
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. **/
public readonly fees?: ChannelFees | undefined,
/** If known, the remote node of the channel. **/
public readonly remoteNodeId?: string | undefined,
/**
* The unique identifier of the channel on Lightning Network, which is the location in the chain that
* the channel was confirmed. The format is <block-height>:<tx-index>:<tx-output>.
**/
public readonly shortChannelId?: string | undefined,
) {
autoBind(this);
Expand Down
28 changes: 28 additions & 0 deletions packages/lightspark-sdk/src/objects/GraphNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,43 @@ import { NodeToAddressesConnectionFromJson } from "./NodeToAddressesConnection.j
/** This object represents a node that exists on the Lightning Network, including nodes not managed by Lightspark. You can retrieve this object to get publicly available information about any node on the Lightning Network. **/
class GraphNode implements Node, Entity {
constructor(
/**
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
* string.
**/
public readonly id: string,
/** The date and time when the entity was first created. **/
public readonly createdAt: string,
/** The date and time when the entity was last updated. **/
public readonly updatedAt: string,
/** The Bitcoin Network this node is deployed in. **/
public readonly bitcoinNetwork: BitcoinNetwork,
/**
* The name of this node in the network. It will be the most human-readable option possible, depending
* on the data available for this node.
**/
public readonly displayName: string,
/** The typename of the object **/
public readonly typename: string,
/**
* A name that identifies the node. It has no importance in terms of operating the node, it is just a
* way to identify and search for commercial services or popular nodes. This alias can be changed at
* any time by the node operator.
**/
public readonly alias?: string | undefined,
/**
* A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is white. It
* has no importance in terms of operating the node, it is just a way to visually differentiate nodes.
* That color can be changed at any time by the node operator.
**/
public readonly color?: string | undefined,
/**
* 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).
**/
public readonly conductivity?: number | undefined,
/** The public key of this node. It acts as a unique identifier of this node in the Lightning Network. **/
public readonly publicKey?: string | undefined,
) {
autoBind(this);
Expand Down
17 changes: 17 additions & 0 deletions packages/lightspark-sdk/src/objects/IncomingPayment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,33 @@ 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. **/
class IncomingPayment implements LightningTransaction, Transaction, Entity {
constructor(
/**
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
* string.
**/
public readonly id: string,
/** The date and time when this transaction was initiated. **/
public readonly createdAt: string,
/** The date and time when the entity was last updated. **/
public readonly updatedAt: string,
/** The current status of this transaction. **/
public readonly status: TransactionStatus,
/** The amount of money involved in this transaction. **/
public readonly amount: CurrencyAmount,
/** The recipient Lightspark node this payment was sent to. **/
public readonly destinationId: string,
/** The typename of the object **/
public readonly typename: string,
/** The date and time when this transaction was completed or failed. **/
public readonly resolvedAt?: string | undefined,
/** The hash of this transaction, so it can be uniquely identified on the Lightning Network. **/
public readonly transactionHash?: string | undefined,
/**
* The optional payment request for this incoming payment, which will be null if the payment is sent
* through keysend.
**/
public readonly paymentRequestId?: string | undefined,
/** The post transaction data which can be used in KYT payment registration. **/
public readonly umaPostTransactionData?: PostTransactionData[] | undefined,
) {
autoBind(this);
Expand Down
61 changes: 61 additions & 0 deletions packages/lightspark-sdk/src/objects/LightsparkNodeWithOSK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,86 @@ import { SecretFromJson, SecretToJson } from "./Secret.js";
/** This is a Lightspark node with OSK. **/
class LightsparkNodeWithOSK implements LightsparkNode, Node, Entity {
constructor(
/**
* The unique identifier of this entity across all Lightspark systems. Should be treated as an opaque
* string.
**/
public readonly id: string,
/** The date and time when the entity was first created. **/
public readonly createdAt: string,
/** The date and time when the entity was last updated. **/
public readonly updatedAt: string,
/** The Bitcoin Network this node is deployed in. **/
public readonly bitcoinNetwork: BitcoinNetwork,
/**
* The name of this node in the network. It will be the most human-readable option possible, depending
* on the data available for this node.
**/
public readonly displayName: string,
/** The owner of this LightsparkNode. **/
public readonly ownerId: string,
/**
* The utxos of the channels that are connected to this node. This is used in uma flow for
* pre-screening.
**/
public readonly umaPrescreeningUtxos: string[],
/** The typename of the object **/
public readonly typename: string,
/**
* A name that identifies the node. It has no importance in terms of operating the node, it is just a
* way to identify and search for commercial services or popular nodes. This alias can be changed at
* any time by the node operator.
**/
public readonly alias?: string | undefined,
/**
* A hexadecimal string that describes a color. For example "#000000" is black, "#FFFFFF" is white. It
* has no importance in terms of operating the node, it is just a way to visually differentiate nodes.
* That color can be changed at any time by the node operator.
**/
public readonly color?: string | undefined,
/**
* 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).
**/
public readonly conductivity?: number | undefined,
/** The public key of this node. It acts as a unique identifier of this node in the Lightning Network. **/
public readonly publicKey?: string | undefined,
/** The current status of this node. **/
public readonly status?: LightsparkNodeStatus | undefined,
/**
* The sum of the balance on the Bitcoin Network, channel balances, and commit fees on this node.
*
* @deprecated Use `balances` instead.
**/
public readonly totalBalance?: CurrencyAmount | undefined,
/**
* The total sum of the channel balances (online and offline) on this node.
*
* @deprecated Use `balances` instead.
**/
public readonly totalLocalBalance?: CurrencyAmount | undefined,
/**
* The sum of the channel balances (online only) that are available to send on this node.
*
* @deprecated Use `balances` instead.
**/
public readonly localBalance?: CurrencyAmount | undefined,
/**
* The sum of the channel balances that are available to receive on this node.
*
* @deprecated Use `balances` instead.
**/
public readonly remoteBalance?: CurrencyAmount | undefined,
/**
* The details of the balance of this node on the Bitcoin Network.
*
* @deprecated Use `balances` instead.
**/
public readonly blockchainBalance?: BlockchainBalance | undefined,
/** The balances that describe the funds in this node. **/
public readonly balances?: Balances | undefined,
/** The private key client is using to sign a GraphQL request which will be verified at server side. **/
public readonly encryptedSigningPrivateKey?: Secret | undefined,
) {
autoBind(this);
Expand Down
Loading

0 comments on commit 219f60f

Please sign in to comment.