From 9ee30901bbb26b97df8ae1320e5a262c7288fefa Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 10 May 2024 15:48:23 -0500
Subject: [PATCH 01/60] update README badges
---
README.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 6edbabf81..9a1e7baaa 100644
--- a/README.md
+++ b/README.md
@@ -7,9 +7,9 @@
-
-
-
+
+
+
From 8317c6c1579738f1a09c20a85bf6697b4516bb83 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 10 May 2024 18:44:16 -0500
Subject: [PATCH 02/60] remove conflicting class tags from call builder classes
---
src/horizon/account_call_builder.ts | 5 +++--
src/horizon/assets_call_builder.ts | 2 +-
src/horizon/call_builder.ts | 5 +++--
src/horizon/claimable_balances_call_builder.ts | 5 +++--
src/horizon/effect_call_builder.ts | 4 ++--
src/horizon/ledger_call_builder.ts | 5 +++--
src/horizon/liquidity_pool_call_builder.ts | 2 +-
src/horizon/offer_call_builder.ts | 5 +++--
src/horizon/operation_call_builder.ts | 5 +++--
src/horizon/trade_aggregation_call_builder.ts | 2 +-
src/horizon/trades_call_builder.ts | 5 +++--
src/horizon/transaction_call_builder.ts | 5 +++--
12 files changed, 29 insertions(+), 21 deletions(-)
diff --git a/src/horizon/account_call_builder.ts b/src/horizon/account_call_builder.ts
index 06997053a..8cc84f7e8 100644
--- a/src/horizon/account_call_builder.ts
+++ b/src/horizon/account_call_builder.ts
@@ -3,11 +3,12 @@ import { CallBuilder } from "./call_builder";
import { ServerApi } from "./server_api";
/**
- * Creates a new {@link AccountCallBuilder} pointed to server defined by serverUrl.
+ * Creates a new {@link AccountCallBuilder} pointed to server defined by `serverUrl`.
+ *
* Do not create this object directly, use {@link Server#accounts}.
*
* @see [All Accounts](https://developers.stellar.org/api/resources/accounts/)
- * @class AccountCallBuilder
+ *
* @extends CallBuilder
* @constructor
* @param {string} serverUrl Horizon server URL.
diff --git a/src/horizon/assets_call_builder.ts b/src/horizon/assets_call_builder.ts
index 29d63200a..b02a31e7f 100644
--- a/src/horizon/assets_call_builder.ts
+++ b/src/horizon/assets_call_builder.ts
@@ -5,7 +5,7 @@ import { ServerApi } from "./server_api";
* Creates a new {@link AssetsCallBuilder} pointed to server defined by serverUrl.
*
* Do not create this object directly, use {@link Server#assets}.
- * @class AssetsCallBuilder
+ *
* @constructor
* @extends CallBuilder
* @param {string} serverUrl Horizon server URL.
diff --git a/src/horizon/call_builder.ts b/src/horizon/call_builder.ts
index d8c6f8ec4..e7e79a260 100644
--- a/src/horizon/call_builder.ts
+++ b/src/horizon/call_builder.ts
@@ -28,8 +28,9 @@ let EventSource: Constructable = anyGlobal.EventSource ??
* Creates a new {@link CallBuilder} pointed to server defined by serverUrl.
*
* This is an **abstract** class. Do not create this object directly, use {@link Server} class.
+ *
+ * @constructor
* @param {string} serverUrl URL of Horizon server
- * @class CallBuilder
*/
export class CallBuilder<
T extends
@@ -402,4 +403,4 @@ export class CallBuilder<
return Promise.reject(new Error(error.message));
}
}
-}
\ No newline at end of file
+}
diff --git a/src/horizon/claimable_balances_call_builder.ts b/src/horizon/claimable_balances_call_builder.ts
index bf515702a..ef0902e30 100644
--- a/src/horizon/claimable_balances_call_builder.ts
+++ b/src/horizon/claimable_balances_call_builder.ts
@@ -4,12 +4,13 @@ import { ServerApi } from "./server_api";
/**
* Creates a new {@link ClaimableBalanceCallBuilder} pointed to server defined by serverUrl.
+ *
* Do not create this object directly, use {@link Server#claimableBalances}.
*
* @see [Claimable Balances](https://developers.stellar.org/api/resources/claimablebalances/)
- * @class ClaimableBalanceCallBuilder
- * @constructor
+ *
* @extends CallBuilder
+ * @constructor
* @param {string} serverUrl Horizon server URL.
*/
export class ClaimableBalanceCallBuilder extends CallBuilder<
diff --git a/src/horizon/effect_call_builder.ts b/src/horizon/effect_call_builder.ts
index d6db8cc28..ea822a39e 100644
--- a/src/horizon/effect_call_builder.ts
+++ b/src/horizon/effect_call_builder.ts
@@ -5,9 +5,9 @@ import { ServerApi } from "./server_api";
* Creates a new {@link EffectCallBuilder} pointed to server defined by serverUrl.
* Do not create this object directly, use {@link Server#effects}.
*
- * @class EffectCallBuilder
- * @extends CallBuilder
* @see [All Effects](https://developers.stellar.org/api/resources/effects/)
+ *
+ * @extends CallBuilder
* @constructor
* @param {string} serverUrl Horizon server URL.
*/
diff --git a/src/horizon/ledger_call_builder.ts b/src/horizon/ledger_call_builder.ts
index 5e74a85b5..34f1a4104 100644
--- a/src/horizon/ledger_call_builder.ts
+++ b/src/horizon/ledger_call_builder.ts
@@ -3,12 +3,13 @@ import { ServerApi } from "./server_api";
/**
* Creates a new {@link LedgerCallBuilder} pointed to server defined by serverUrl.
+ *
* Do not create this object directly, use {@link Server#ledgers}.
*
* @see [All Ledgers](https://developers.stellar.org/api/resources/ledgers/list/)
- * @constructor
- * @class LedgerCallBuilder
+ *
* @extends CallBuilder
+ * @constructor
* @param {string} serverUrl Horizon server URL.
*/
export class LedgerCallBuilder extends CallBuilder<
diff --git a/src/horizon/liquidity_pool_call_builder.ts b/src/horizon/liquidity_pool_call_builder.ts
index f6c24b1f5..2e429ba75 100644
--- a/src/horizon/liquidity_pool_call_builder.ts
+++ b/src/horizon/liquidity_pool_call_builder.ts
@@ -5,9 +5,9 @@ import { ServerApi } from "./server_api";
/**
* Creates a new {@link LiquidityPoolCallBuilder} pointed to server defined by serverUrl.
+ *
* Do not create this object directly, use {@link Server#liquidityPools}.
*
- * @class LiquidityPoolCallBuilder
* @extends CallBuilder
* @constructor
* @param {string} serverUrl Horizon server URL.
diff --git a/src/horizon/offer_call_builder.ts b/src/horizon/offer_call_builder.ts
index 4d40b1a4b..43d48bcd5 100644
--- a/src/horizon/offer_call_builder.ts
+++ b/src/horizon/offer_call_builder.ts
@@ -4,12 +4,13 @@ import { ServerApi } from "./server_api";
/**
* Creates a new {@link OfferCallBuilder} pointed to server defined by serverUrl.
+ *
* Do not create this object directly, use {@link Server#offers}.
*
* @see [Offers](https://developers.stellar.org/api/resources/offers/)
- * @class OfferCallBuilder
- * @constructor
+ *
* @extends CallBuilder
+ * @constructor
* @param {string} serverUrl Horizon server URL.
*/
export class OfferCallBuilder extends CallBuilder<
diff --git a/src/horizon/operation_call_builder.ts b/src/horizon/operation_call_builder.ts
index e7573e7ba..978d02f96 100644
--- a/src/horizon/operation_call_builder.ts
+++ b/src/horizon/operation_call_builder.ts
@@ -3,12 +3,13 @@ import { ServerApi } from "./server_api";
/**
* Creates a new {@link OperationCallBuilder} pointed to server defined by serverUrl.
+ *
* Do not create this object directly, use {@link Server#operations}.
*
* @see [All Operations](https://developers.stellar.org/api/resources/operations/)
- * @class OperationCallBuilder
- * @constructor
+ *
* @extends CallBuilder
+ * @constructor
* @param {string} serverUrl Horizon server URL.
*/
export class OperationCallBuilder extends CallBuilder<
diff --git a/src/horizon/trade_aggregation_call_builder.ts b/src/horizon/trade_aggregation_call_builder.ts
index 8dfff4f69..c97c1d9f1 100644
--- a/src/horizon/trade_aggregation_call_builder.ts
+++ b/src/horizon/trade_aggregation_call_builder.ts
@@ -16,9 +16,9 @@ const allowedResolutions = [
/**
* Trade Aggregations facilitate efficient gathering of historical trade data.
+ *
* Do not create this object directly, use {@link Server#tradeAggregation}.
*
- * @class TradeAggregationCallBuilder
* @extends CallBuilder
* @constructor
* @param {string} serverUrl serverUrl Horizon server URL.
diff --git a/src/horizon/trades_call_builder.ts b/src/horizon/trades_call_builder.ts
index 8c601454d..2608fa663 100644
--- a/src/horizon/trades_call_builder.ts
+++ b/src/horizon/trades_call_builder.ts
@@ -4,12 +4,13 @@ import { ServerApi } from "./server_api";
/**
* Creates a new {@link TradesCallBuilder} pointed to server defined by serverUrl.
+ *
* Do not create this object directly, use {@link Server#trades}.
*
- * @class TradesCallBuilder
+ * @see [Trades](https://developers.stellar.org/api/resources/trades/)
+ *
* @extends CallBuilder
* @constructor
- * @see [Trades](https://developers.stellar.org/api/resources/trades/)
* @param {string} serverUrl serverUrl Horizon server URL.
*/
export class TradesCallBuilder extends CallBuilder<
diff --git a/src/horizon/transaction_call_builder.ts b/src/horizon/transaction_call_builder.ts
index 831c4ee6f..7a209227a 100644
--- a/src/horizon/transaction_call_builder.ts
+++ b/src/horizon/transaction_call_builder.ts
@@ -3,12 +3,13 @@ import { ServerApi } from "./server_api";
/**
* Creates a new {@link TransactionCallBuilder} pointed to server defined by serverUrl.
+ *
* Do not create this object directly, use {@link Server#transactions}.
*
- * @class TransactionCallBuilder
- * @extends CallBuilder
* @see [All Transactions](https://developers.stellar.org/api/resources/transactions/)
+ *
* @constructor
+ * @extends CallBuilder
* @param {string} serverUrl Horizon server URL.
*/
export class TransactionCallBuilder extends CallBuilder<
From a5e188d349a07d4b904aa0858fc6e9d8a8bcdd71 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Mon, 13 May 2024 15:30:24 -0500
Subject: [PATCH 03/60] removing old soroban links in README.md
---
README.md | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index 9a1e7baaa..68db3bb5a 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@
js-stellar-sdk is a JavaScript library for communicating with a
-[Stellar Horizon server](https://github.com/stellar/go/tree/master/services/horizon) and [Soroban RPC](https://soroban.stellar.org/docs/reference/rpc).
+[Stellar Horizon server](https://github.com/stellar/go/tree/master/services/horizon) and [Soroban RPC](https://developers.stellar.org/network/soroban-rpc).
It is used for building Stellar apps either on Node.js or in the browser, though it can be used in other environments with some tinkering.
It provides:
@@ -89,14 +89,14 @@ If you don't want to use or install Bower, you can copy the packaged JS files fr
The usage documentation for this library lives in a handful of places:
- * across the [Stellar Developer Docs](), which includes tutorials and examples,
+ * across the [Stellar Developer Docs](https://developers.stellar.org), which includes tutorials and examples,
* within [this repository itself](https://github.com/stellar/js-stellar-sdk/blob/master/docs/reference/readme.md), and
* on the generated [API doc site](https://stellar.github.io/js-stellar-sdk/).
You can also refer to:
* the [documentation](https://developers.stellar.org/network/horizon) for the Horizon REST API (if using the `Horizon` module) and
- * the [documentation](https://soroban.stellar.org/docs/reference/rpc) for Soroban RPC's API (if using the `SorobanRpc` module)
+ * the [documentation](https://developers.stellar.org/network/soroban-rpc) for Soroban RPC's API (if using the `SorobanRpc` module)
### Usage with React-Native
From 82335be469f8279068786d431f24d87ea361175d Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Mon, 13 May 2024 15:31:07 -0500
Subject: [PATCH 04/60] changing old soroban link in another readme file
---
docs/reference/readme.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/reference/readme.md b/docs/reference/readme.md
index 12e0bdb56..5c049fb7d 100644
--- a/docs/reference/readme.md
+++ b/docs/reference/readme.md
@@ -1,7 +1,7 @@
---
title: Overview
---
-The JavaScript Stellar SDK facilitates integration with the Stellar [Horizon API server](https://developers.stellar.org/api/), the Stellar [Soroban RPC server](https://soroban.stellar.org/docs/reference/rpc) and submission of Stellar transactions, either on Node.js or in the browser. It has three main uses: [querying Horizon](#querying-horizon), [interacting with Soroban RPC](), and [building, signing, and submitting transactions to the Stellar network](#building-transactions).
+The JavaScript Stellar SDK facilitates integration with the Stellar [Horizon API server](https://developers.stellar.org/api/), the Stellar [Soroban RPC server](https://developers.stellar.org/network/soroban-rpc) and submission of Stellar transactions, either on Node.js or in the browser. It has three main uses: [querying Horizon](#querying-horizon), [interacting with Soroban RPC](), and [building, signing, and submitting transactions to the Stellar network](#building-transactions).
* [Building and installing the SDK](https://github.com/stellar/js-stellar-sdk)
* [Examples of using the SDK](./examples.md)
From cdfe297225f81486aef15a12f35024be28d29b3c Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Mon, 13 May 2024 15:34:53 -0500
Subject: [PATCH 05/60] changing old soroban links to new home in dev docs
---
src/soroban/api.ts | 12 ++++++------
src/soroban/server.ts | 24 ++++++++++++------------
2 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/soroban/api.ts b/src/soroban/api.ts
index 3c8d7806f..2c9041601 100644
--- a/src/soroban/api.ts
+++ b/src/soroban/api.ts
@@ -45,20 +45,20 @@ export namespace Api {
latestLedger: number;
}
- /** @see https://soroban.stellar.org/api/methods/getLedgerEntries */
+ /** @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getLedgerEntries */
export interface RawGetLedgerEntriesResponse {
entries?: RawLedgerEntryResult[];
latestLedger: number;
}
- /** @see https://soroban.stellar.org/api/methods/getNetwork */
+ /** @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getNetwork */
export interface GetNetworkResponse {
friendbotUrl?: string;
passphrase: string;
protocolVersion: string;
}
- /** @see https://soroban.stellar.org/api/methods/getLatestLedger */
+ /** @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getLatestLedger */
export interface GetLatestLedgerResponse {
id: string;
sequence: number;
@@ -71,7 +71,7 @@ export namespace Api {
FAILED = 'FAILED'
}
- /** @see https://soroban.stellar.org/api/methods/getTransaction */
+ /** @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getTransaction */
export type GetTransactionResponse =
| GetSuccessfulTransactionResponse
| GetFailedTransactionResponse
@@ -229,7 +229,7 @@ export namespace Api {
* fields
* - for all other errors, this only includes error fields
*
- * @see https://soroban.stellar.org/api/methods/simulateTransaction#returns
+ * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/simulateTransaction#returns
*/
export type SimulateTransactionResponse =
| SimulateTransactionSuccessResponse
@@ -328,7 +328,7 @@ export namespace Api {
xdr: string;
}
- /** @see https://soroban.stellar.org/api/methods/simulateTransaction#returns */
+ /** @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/simulateTransaction#returns */
export interface RawSimulateTransactionResponse {
id: string;
latestLedger: number;
diff --git a/src/soroban/server.ts b/src/soroban/server.ts
index c7e897b84..a706c5531 100644
--- a/src/soroban/server.ts
+++ b/src/soroban/server.ts
@@ -66,7 +66,7 @@ export namespace Server {
* You can also use {@link Config} class to set this globally.
* @param {Record} [opts.headers] allows setting custom headers
*
- * @see https://soroban.stellar.org/api/methods
+ * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods
*/
export class Server {
/** Soroban RPC Server URL (ex. `http://localhost:8000/soroban/rpc`). */
@@ -101,7 +101,7 @@ export class Server {
* @returns {Promise} a promise to the {@link Account} object with
* a populated sequence number
*
- * @see https://soroban.stellar.org/api/methods/getLedgerEntries
+ * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getLedgerEntries
* @example
* const accountId = "GBZC6Y2Y7Q3ZQ2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4";
* server.getAccount(accountId).then((account) => {
@@ -134,7 +134,7 @@ export class Server {
* {@link Api.GetHealthResponse} object with the status of the
* server (e.g. "healthy").
*
- * @see https://soroban.stellar.org/api/methods/getHealth
+ * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getHealth
* @example
* server.getHealth().then((health) => {
* console.log("status:", health.status);
@@ -167,7 +167,7 @@ export class Server {
* @warning If the data entry in question is a 'temporary' entry, it's
* entirely possible that it has expired out of existence.
*
- * @see https://soroban.stellar.org/api/methods/getLedgerEntries
+ * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getLedgerEntries
* @example
* const contractId = "CCJZ5DGASBWQXR5MPFCJXMBI333XE5U3FSJTNQU7RIKE3P5GN2K2WYD5";
* const key = xdr.ScVal.scvSymbol("counter");
@@ -251,7 +251,7 @@ export class Server {
* on-chain values for the given ledger keys
*
* @see Server._getLedgerEntries
- * @see https://soroban.stellar.org/api/methods/getLedgerEntries
+ * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getLedgerEntries
* @example
* const contractId = "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM";
* const key = xdr.LedgerKey.contractData(new xdr.LedgerKeyContractData({
@@ -295,7 +295,7 @@ export class Server {
* @returns {Promise} the status,
* result, and other details about the transaction
*
- * @see https://soroban.stellar.org/api/methods/getTransaction
+ * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getTransaction
* @example
* const transactionHash = "c4515e3bdc0897f21cc5dbec8c82cf0a936d4741cb74a8e158eb51b9fb00411a";
* server.getTransaction(transactionHash).then((tx) => {
@@ -368,7 +368,7 @@ export class Server {
* @returns {Promise} a paginatable set of the
* events matching the given event filters
*
- * @see https://soroban.stellar.org/api/methods/getEvents
+ * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getEvents
* @example
* server.getEvents({
* startLedger: 1000,
@@ -419,7 +419,7 @@ export class Server {
* @returns {Promise} metadata about the
* current network this RPC server is connected to
*
- * @see https://soroban.stellar.org/api/methods/getNetwork
+ * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getNetwork
* @example
* server.getNetwork().then((network) => {
* console.log("friendbotUrl:", network.friendbotUrl);
@@ -438,7 +438,7 @@ export class Server {
* @returns {Promise} metadata about the
* latest ledger on the network that this RPC server is connected to
*
- * @see https://soroban.stellar.org/api/methods/getLatestLedger
+ * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getLatestLedger
* @example
* server.getLatestLedger().then((response) => {
* console.log("hash:", response.id);
@@ -465,7 +465,7 @@ export class Server {
* the transaction
*
* @see https://developers.stellar.org/docs/glossary/transactions/
- * @see https://soroban.stellar.org/api/methods/simulateTransaction
+ * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/simulateTransaction
* @see Server.prepareTransaction
* @see assembleTransaction
*
@@ -553,7 +553,7 @@ export class Server {
* fees discovered from the simulation.
*
* @see assembleTransaction
- * @see https://soroban.stellar.org/api/methods/simulateTransaction
+ * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/simulateTransaction
* @throws {jsonrpc.Error|Error|Api.SimulateTransactionErrorResponse}
* if simulation fails
* @example
@@ -609,7 +609,7 @@ export class Server {
* transaction id, status, and any error if available
*
* @see https://developers.stellar.org/docs/glossary/transactions/
- * @see https://soroban.stellar.org/api/methods/sendTransaction
+ * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/sendTransaction
* @example
* const contractId = 'CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE';
* const contract = new StellarSdk.Contract(contractId);
From e7d721cd7135db5b52154849d829c9e844063ff7 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Mon, 13 May 2024 17:27:23 -0500
Subject: [PATCH 06/60] make WebAuth show up as a namespace
---
src/webauth/index.ts | 2 +-
src/webauth/utils.ts | 12 +++++++-----
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/webauth/index.ts b/src/webauth/index.ts
index b6a43f27f..e63282485 100644
--- a/src/webauth/index.ts
+++ b/src/webauth/index.ts
@@ -1,2 +1,2 @@
export * from './utils';
-export { InvalidChallengeError } from './errors';
\ No newline at end of file
+export { InvalidChallengeError } from './errors';
diff --git a/src/webauth/utils.ts b/src/webauth/utils.ts
index 3e6d13c73..8d5f41b10 100644
--- a/src/webauth/utils.ts
+++ b/src/webauth/utils.ts
@@ -17,6 +17,8 @@ import { Utils } from "../utils";
import { InvalidChallengeError } from "./errors";
import { ServerApi } from "../horizon/server_api";
+/** @namespace WebAuth */
+
/**
* Returns a valid [SEP-10](https://stellar.org/protocol/sep-10) challenge
* transaction which you can use for Stellar Web Authentication.
@@ -46,7 +48,7 @@ import { ServerApi } from "../horizon/server_api";
*
* @returns {string} A base64 encoded string of the raw TransactionEnvelope xdr
* struct for the transaction.
- * @see [SEP-10: Stellar Web Auth](https://stellar.org/protocol/sep-10).
+ * @see {@link https://stellar.org/protocol/sep-10|SEP-10: Stellar Web Auth}
*
* @example
* import { Keypair, Networks, WebAuth } from 'stellar-sdk'
@@ -164,7 +166,7 @@ export function buildChallengeTx(
* the matched home domain, and the memo attached to the transaction, which
* will be null if not present.
*
- * @see [SEP-10: Stellar Web Auth](https://stellar.org/protocol/sep-10).
+ * @see {@link https://stellar.org/protocol/sep-10|SEP-10: Stellar Web Auth}
*/
export function readChallengeTx(
challengeTx: string,
@@ -391,7 +393,7 @@ export function readChallengeTx(
* transaction, excluding the server account ID, given that the threshold was
* met.
*
- * @see [SEP-10: Stellar Web Auth](https://stellar.org/protocol/sep-10).
+ * @see {@link https://stellar.org/protocol/sep-10|SEP-10: Stellar Web Auth}
* @example
* import { Networks, TransactionBuilder, WebAuth } from 'stellar-sdk';
*
@@ -513,7 +515,7 @@ export function verifyChallengeTxThreshold(
* @returns {string[]} The list of signers public keys that have signed the
* transaction, excluding the server account ID.
*
- * @see [SEP-10: Stellar Web Auth](https://stellar.org/protocol/sep-10).
+ * @see {@link https://stellar.org/protocol/sep-10|SEP-10: Stellar Web Auth}
* @example
* import { Networks, TransactionBuilder, WebAuth } from 'stellar-sdk';
*
@@ -771,4 +773,4 @@ export function gatherTxSigners(
}
return Array.from(signersFound);
-}
\ No newline at end of file
+}
From 8bc0f5a25e2b0ace28c02f82d8779c5484211835 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Tue, 14 May 2024 09:48:51 -0500
Subject: [PATCH 07/60] collect methods and classes into a SorobanRpc namespace
for JSDoc
---
src/soroban/api.ts | 4 ++-
src/soroban/index.ts | 2 ++
src/soroban/parsers.ts | 61 +++++++++++++++++++++++++++-----------
src/soroban/server.ts | 6 ++--
src/soroban/transaction.ts | 20 ++++++-------
5 files changed, 61 insertions(+), 32 deletions(-)
diff --git a/src/soroban/api.ts b/src/soroban/api.ts
index 2c9041601..4bb703980 100644
--- a/src/soroban/api.ts
+++ b/src/soroban/api.ts
@@ -1,7 +1,9 @@
import { AssetType, Contract, SorobanDataBuilder, xdr } from '@stellar/stellar-base';
/* tslint:disable-next-line:no-namespace */
-/** @namespace Api */
+/**
+ * @memberof SorobanRpc
+ */
export namespace Api {
export interface Balance {
asset_type: AssetType.credit4 | AssetType.credit12;
diff --git a/src/soroban/index.ts b/src/soroban/index.ts
index 36e296ee1..2df0201c3 100644
--- a/src/soroban/index.ts
+++ b/src/soroban/index.ts
@@ -1,3 +1,5 @@
+/** @namespace SorobanRpc */
+
// tslint:disable-next-line: no-reference
///
diff --git a/src/soroban/parsers.ts b/src/soroban/parsers.ts
index 8ff1d1c6d..271222d9c 100644
--- a/src/soroban/parsers.ts
+++ b/src/soroban/parsers.ts
@@ -1,16 +1,23 @@
import { xdr, Contract, SorobanDataBuilder } from '@stellar/stellar-base';
import { Api } from './api';
+/**
+ * Parse the response from invoking the `submitTransaction` method of a Soroban RPC server.
+ * @memberof SorobanRpc
+ *
+ * @param {Api.RawSendTransactionResponse} raw the raw `submitTransaction` response from the Soroban RPC server to parse
+ * @returns {Api.SendTransactionResponse} transaction response parsed from the Soroban RPC server's response
+ */
export function parseRawSendTransaction(
- r: Api.RawSendTransactionResponse
+ raw: Api.RawSendTransactionResponse
): Api.SendTransactionResponse {
- const { errorResultXdr, diagnosticEventsXdr } = r;
- delete r.errorResultXdr;
- delete r.diagnosticEventsXdr;
+ const { errorResultXdr, diagnosticEventsXdr } = raw;
+ delete raw.errorResultXdr;
+ delete raw.diagnosticEventsXdr;
if (!!errorResultXdr) {
return {
- ...r,
+ ...raw,
...(
diagnosticEventsXdr !== undefined &&
diagnosticEventsXdr.length > 0 && {
@@ -23,15 +30,22 @@ export function parseRawSendTransaction(
};
}
- return { ...r } as Api.BaseSendTransactionResponse;
+ return { ...raw } as Api.BaseSendTransactionResponse;
}
+/**
+ * Parse and return the retrieved events, if any, from a raw response from a Soroban RPC server.
+ * @memberof SorobanRpc
+ *
+ * @param {Api.RawGetEventsResponse} raw the raw `getEvents` response from the Soroban RPC server to parse
+ * @returns {Api.GetEventsResponse} events parsed from the Soroban RPC server's response
+ */
export function parseRawEvents(
- r: Api.RawGetEventsResponse
+ raw: Api.RawGetEventsResponse
): Api.GetEventsResponse {
return {
- latestLedger: r.latestLedger,
- events: (r.events ?? []).map((evt) => {
+ latestLedger: raw.latestLedger,
+ events: (raw.events ?? []).map((evt) => {
const clone: Omit = { ...evt };
delete (clone as any).contractId; // `as any` hack because contractId field isn't optional
@@ -46,6 +60,13 @@ export function parseRawEvents(
};
}
+/**
+ * Parse and return the retrieved ledger entries, if any, from a raw response from a Soroban RPC server.
+ * @memberof SorobanRpc
+ *
+ * @param {Api.RawGetLedgerEntriesResponse} raw he raw `getLedgerEntries` response from the Soroban RPC server to parse
+ * @returns {Api.GetLedgerEntriesResponse} ledger entries parsed from the Soroban RPC server's response
+ */
export function parseRawLedgerEntries(
raw: Api.RawGetLedgerEntriesResponse
): Api.GetLedgerEntriesResponse {
@@ -71,16 +92,13 @@ export function parseRawLedgerEntries(
}
/**
- * Converts a raw response schema into one with parsed XDR fields and a
- * simplified interface.
+ * Converts a raw response schema into one with parsed XDR fields and a simplified interface.
+ * @warning This API is only exported for testing purposes and should not be relied on or considered "stable".
+ * @memberof SorobanRpc
*
- * @param raw the raw response schema (parsed ones are allowed, best-effort
+ * @param {Api.SimulateTransactionResponse | Api.RawSimulateTransactionResponse} sim the raw response schema (parsed ones are allowed, best-effort
* detected, and returned untouched)
- *
- * @returns the original parameter (if already parsed), parsed otherwise
- *
- * @warning This API is only exported for testing purposes and should not be
- * relied on or considered "stable".
+ * @returns {Api.SimulateTransactionResponse} the original parameter (if already parsed), parsed otherwise
*/
export function parseRawSimulation(
sim:
@@ -113,6 +131,15 @@ export function parseRawSimulation(
return parseSuccessful(sim, base);
}
+/**
+ * Parse whether or not the transaction simulation was successful, returning the relevant response.
+ * @memberof SorobanRpc
+ * @private
+ *
+ * @param {Api.RawSimulateTransactionResponse} sim a raw response from the `simulateTransaction` method of the Soroban RPC server to parse
+ * @param {Api.BaseSimulateTransactionResponse} partial a partially built simulate transaction response that will be used to build the return response
+ * @returns {Api.SimulateTransactionRestoreResponse | Api.SimulateTransactionSuccessResponse} Either a simulation response indicating what ledger entries should be restored, or if the simulation was successful.
+ */
function parseSuccessful(
sim: Api.RawSimulateTransactionResponse,
partial: Api.BaseSimulateTransactionResponse
diff --git a/src/soroban/server.ts b/src/soroban/server.ts
index a706c5531..4e7bca08f 100644
--- a/src/soroban/server.ts
+++ b/src/soroban/server.ts
@@ -57,10 +57,11 @@ export namespace Server {
* interface for requests to that instance.
*
* @constructor
+ * @memberof SorobanRpc
*
* @param {string} serverURL Soroban-RPC Server URL (ex.
* `http://localhost:8000/soroban/rpc`).
- * @param {object} [opts] Options object
+ * @param {Server.Options} [opts] Options object
* @param {boolean} [opts.allowHttp] allows connecting to insecure http servers
* (default: `false`). This must be set to false in production deployments!
* You can also use {@link Config} class to set this globally.
@@ -672,8 +673,7 @@ export class Server {
*
* @throws if Friendbot is not configured on this network or request failure
*
- * @see
- * https://developers.stellar.org/docs/fundamentals-and-concepts/testnet-and-pubnet#friendbot
+ * @see https://developers.stellar.org/docs/fundamentals-and-concepts/testnet-and-pubnet#friendbot
* @see Friendbot.Response
* @example
* server
diff --git a/src/soroban/transaction.ts b/src/soroban/transaction.ts
index c75f333b4..267efe9b0 100644
--- a/src/soroban/transaction.ts
+++ b/src/soroban/transaction.ts
@@ -11,19 +11,17 @@ import { parseRawSimulation } from './parsers';
/**
* Combines the given raw transaction alongside the simulation results.
*
- * @param raw the initial transaction, w/o simulation applied
- * @param simulation the Soroban RPC simulation result (see
- * {@link Server.simulateTransaction})
+ * If the given transaction already has authorization entries in a host function
+ * invocation (see {@link Operation.invokeHostFunction}), **the simulation
+ * entries are ignored**.
*
- * @returns a new, cloned transaction with the proper auth and resource (fee,
- * footprint) simulation data applied
+ * @param {Transaction|FeeBumpTransaction} raw the initial transaction, w/o simulation applied
+ * @param {Api.SimulateTransactionResponse|Api.RawSimulateTransactionResponse} simulation the Soroban RPC simulation result (see {@link Server.simulateTransaction})
+ * @returns {TransactionBuilder} a new, cloned transaction with the proper auth and resource (fee, footprint) simulation data applied
*
- * @note if the given transaction already has authorization entries in a host
- * function invocation (see {@link Operation.invokeHostFunction}), **the
- * simulation entries are ignored**.
- *
- * @see {Server.simulateTransaction}
- * @see {Server.prepareTransaction}
+ * @memberof SorobanRpc
+ * @see {@link Server.simulateTransaction}
+ * @see {@link Server.prepareTransaction}
*/
export function assembleTransaction(
raw: Transaction | FeeBumpTransaction,
From 887f35c34c89028b34218a735b2c4518a64c97f2 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Tue, 14 May 2024 10:40:51 -0500
Subject: [PATCH 08/60] create a Horizon JSDoc namespace and add the server
class to it
---
src/horizon/index.ts | 2 ++
src/horizon/server.ts | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/horizon/index.ts b/src/horizon/index.ts
index 2a690dda7..66cbc61a9 100644
--- a/src/horizon/index.ts
+++ b/src/horizon/index.ts
@@ -1,3 +1,5 @@
+/** @namespace Horizon */
+
// Expose all types
export * from "./horizon_api";
export * from "./server_api";
diff --git a/src/horizon/server.ts b/src/horizon/server.ts
index 48c92106d..57b4feb8e 100644
--- a/src/horizon/server.ts
+++ b/src/horizon/server.ts
@@ -58,6 +58,8 @@ function _getAmountInLumens(amt: BigNumber) {
* Server handles the network connection to a [Horizon](https://developers.stellar.org/api/introduction/)
* instance and exposes an interface for requests to that instance.
* @constructor
+ * @memberof Horizon
+ *
* @param {string} serverURL Horizon Server URL (ex. `https://horizon-testnet.stellar.org`).
* @param {object} [opts] Options object
* @param {boolean} [opts.allowHttp] - Allow connecting to http servers, default: `false`. This must be set to false in production deployments! You can also use {@link Config} class to set this globally.
From 0b5b3e85b4748078ebe5487448fd8b0fdc6e9cf8 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Tue, 14 May 2024 10:42:10 -0500
Subject: [PATCH 09/60] fix broken links to API dev docs
---
src/horizon/account_call_builder.ts | 10 +++++-----
src/horizon/account_response.ts | 2 +-
src/horizon/call_builder.ts | 8 ++++----
src/horizon/claimable_balances_call_builder.ts | 10 +++++-----
src/horizon/effect_call_builder.ts | 10 +++++-----
src/horizon/horizon_axios_client.ts | 2 ++
src/horizon/ledger_call_builder.ts | 2 +-
src/horizon/offer_call_builder.ts | 14 +++++++-------
src/horizon/operation_call_builder.ts | 12 ++++++------
src/horizon/orderbook_call_builder.ts | 2 +-
src/horizon/path_call_builder.ts | 2 +-
src/horizon/payment_call_builder.ts | 8 ++++----
src/horizon/server.ts | 9 ++++-----
src/horizon/strict_receive_path_call_builder.ts | 2 +-
src/horizon/strict_send_path_call_builder.ts | 2 +-
src/horizon/trades_call_builder.ts | 6 +++---
src/horizon/transaction_call_builder.ts | 10 +++++-----
17 files changed, 56 insertions(+), 55 deletions(-)
diff --git a/src/horizon/account_call_builder.ts b/src/horizon/account_call_builder.ts
index 8cc84f7e8..220534d55 100644
--- a/src/horizon/account_call_builder.ts
+++ b/src/horizon/account_call_builder.ts
@@ -7,7 +7,7 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Server#accounts}.
*
- * @see [All Accounts](https://developers.stellar.org/api/resources/accounts/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-accounts|All Accounts}
*
* @extends CallBuilder
* @constructor
@@ -25,7 +25,7 @@ export class AccountCallBuilder extends CallBuilder<
* Returns information and links relating to a single account.
* The balances section in the returned JSON will also list all the trust lines this account has set up.
*
- * @see [Account Details](https://developers.stellar.org/api/resources/accounts/single/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-an-account|Account Details}
* @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {CallBuilder} a new CallBuilder instance for the /accounts/:id endpoint
*/
@@ -37,7 +37,7 @@ export class AccountCallBuilder extends CallBuilder<
/**
* This endpoint filters accounts by signer account.
- * @see [Accounts](https://developers.stellar.org/api/resources/accounts/list/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-accounts|Accounts}
* @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {AccountCallBuilder} current AccountCallBuilder instance
*/
@@ -48,7 +48,7 @@ export class AccountCallBuilder extends CallBuilder<
/**
* This endpoint filters all accounts who are trustees to an asset.
- * @see [Accounts](https://developers.stellar.org/api/resources/accounts/list/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-accounts|Accounts}
* @see Asset
* @param {Asset} asset For example: `new Asset('USD','GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD')`
* @returns {AccountCallBuilder} current AccountCallBuilder instance
@@ -60,7 +60,7 @@ export class AccountCallBuilder extends CallBuilder<
/**
* This endpoint filters accounts where the given account is sponsoring the account or any of its sub-entries..
- * @see [Accounts](https://developers.stellar.org/api/resources/accounts/list/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-accounts|Accounts}
* @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {AccountCallBuilder} current AccountCallBuilder instance
*/
diff --git a/src/horizon/account_response.ts b/src/horizon/account_response.ts
index 376e9a197..d85e81d1b 100644
--- a/src/horizon/account_response.ts
+++ b/src/horizon/account_response.ts
@@ -11,7 +11,7 @@ import { ServerApi } from "./server_api";
* The balances section in the returned JSON will also list all the trust lines this account has set up.
* It also contains {@link Account} object and exposes it's methods so can be used in {@link TransactionBuilder}.
*
- * @see [Account Details](https://developers.stellar.org/api/resources/accounts/object/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/accounts/object|Account Details}
* @param {string} response Response from horizon account endpoint.
* @returns {AccountResponse} AccountResponse instance
*/
diff --git a/src/horizon/call_builder.ts b/src/horizon/call_builder.ts
index e7e79a260..ced719fbe 100644
--- a/src/horizon/call_builder.ts
+++ b/src/horizon/call_builder.ts
@@ -80,8 +80,8 @@ export class CallBuilder<
/**
* Creates an EventSource that listens for incoming messages from the server. To stop listening for new
* events call the function returned by this method.
- * @see [Horizon Response Format](https://developers.stellar.org/api/introduction/response-format/)
- * @see [MDN EventSource](https://developer.mozilla.org/en-US/docs/Web/API/EventSource)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/structure/response-format|Horizon Response Format}
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/EventSource|MDN EventSource}
* @param {object} [options] EventSource options.
* @param {function} [options.onmessage] Callback function to handle incoming messages.
* @param {function} [options.onerror] Callback function to handle errors.
@@ -184,7 +184,7 @@ export class CallBuilder<
/**
* Sets `cursor` parameter for the current call. Returns the CallBuilder object on which this method has been called.
- * @see [Paging](https://developers.stellar.org/api/introduction/pagination/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/structure/pagination|Paging}
* @param {string} cursor A cursor is a value that points to a specific location in a collection of resources.
* @returns {object} current CallBuilder instance
*/
@@ -195,7 +195,7 @@ export class CallBuilder<
/**
* Sets `limit` parameter for the current call. Returns the CallBuilder object on which this method has been called.
- * @see [Paging](https://developers.stellar.org/api/introduction/pagination/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/structure/pagination|Paging}
* @param {number} number Number of records the server should return.
* @returns {object} current CallBuilder instance
*/
diff --git a/src/horizon/claimable_balances_call_builder.ts b/src/horizon/claimable_balances_call_builder.ts
index ef0902e30..bcaf78083 100644
--- a/src/horizon/claimable_balances_call_builder.ts
+++ b/src/horizon/claimable_balances_call_builder.ts
@@ -7,7 +7,7 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Server#claimableBalances}.
*
- * @see [Claimable Balances](https://developers.stellar.org/api/resources/claimablebalances/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/claimablebalances|Claimable Balances}
*
* @extends CallBuilder
* @constructor
@@ -24,7 +24,7 @@ export class ClaimableBalanceCallBuilder extends CallBuilder<
/**
* The claimable balance details endpoint provides information on a single claimable balance.
*
- * @see [Claimable Balance Details](https://developers.stellar.org/api/resources/claimablebalances/single/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-a-claimable-balance|Claimable Balance Details}
* @param {string} claimableBalanceId Claimable balance ID
* @returns {CallBuilder} CallBuilder OperationCallBuilder instance
*/
@@ -41,7 +41,7 @@ export class ClaimableBalanceCallBuilder extends CallBuilder<
/**
* Returns all claimable balances which are sponsored by the given account ID.
*
- * @see [Claimable Balances](https://developers.stellar.org/api/resources/claimablebalances/list/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-claimable-balances|Claimable Balances}
* @param {string} sponsor For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {ClaimableBalanceCallBuilder} current ClaimableBalanceCallBuilder instance
*/
@@ -53,7 +53,7 @@ export class ClaimableBalanceCallBuilder extends CallBuilder<
/**
* Returns all claimable balances which can be claimed by the given account ID.
*
- * @see [Claimable Balances](https://developers.stellar.org/api/resources/claimablebalances/list/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-claimable-balances|Claimable Balances}
* @param {string} claimant For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {ClaimableBalanceCallBuilder} current ClaimableBalanceCallBuilder instance
*/
@@ -65,7 +65,7 @@ export class ClaimableBalanceCallBuilder extends CallBuilder<
/**
* Returns all claimable balances which provide a balance for the given asset.
*
- * @see [Claimable Balances](https://developers.stellar.org/api/resources/claimablebalances/list/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-claimable-balances|Claimable Balances}
* @param {Asset} The Asset held by the claimable balance
* @returns {ClaimableBalanceCallBuilder} current ClaimableBalanceCallBuilder instance
*/
diff --git a/src/horizon/effect_call_builder.ts b/src/horizon/effect_call_builder.ts
index ea822a39e..d11cb5638 100644
--- a/src/horizon/effect_call_builder.ts
+++ b/src/horizon/effect_call_builder.ts
@@ -5,7 +5,7 @@ import { ServerApi } from "./server_api";
* Creates a new {@link EffectCallBuilder} pointed to server defined by serverUrl.
* Do not create this object directly, use {@link Server#effects}.
*
- * @see [All Effects](https://developers.stellar.org/api/resources/effects/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/effects|All Effects}
*
* @extends CallBuilder
* @constructor
@@ -21,7 +21,7 @@ export class EffectCallBuilder extends CallBuilder<
/**
* This endpoint represents all effects that changed a given account. It will return relevant effects from the creation of the account to the current ledger.
- * @see [Effects for Account](https://developers.stellar.org/api/resources/accounts/effects/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/get-effects-by-account-id|Effects for Account}
* @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {EffectCallBuilder} this EffectCallBuilder instance
*/
@@ -33,7 +33,7 @@ export class EffectCallBuilder extends CallBuilder<
* Effects are the specific ways that the ledger was changed by any operation.
*
* This endpoint represents all effects that occurred in the given ledger.
- * @see [Effects for Ledger](https://developers.stellar.org/api/resources/ledgers/effects/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-a-ledgers-effects|Effects for Ledger}
* @param {number|string} sequence Ledger sequence
* @returns {EffectCallBuilder} this EffectCallBuilder instance
*/
@@ -43,7 +43,7 @@ export class EffectCallBuilder extends CallBuilder<
/**
* This endpoint represents all effects that occurred as a result of a given transaction.
- * @see [Effects for Transaction](https://developers.stellar.org/api/resources/transactions/effects/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-a-transactions-effects|Effects for Transaction}
* @param {string} transactionId Transaction ID
* @returns {EffectCallBuilder} this EffectCallBuilder instance
*/
@@ -53,7 +53,7 @@ export class EffectCallBuilder extends CallBuilder<
/**
* This endpoint represents all effects that occurred as a result of a given operation.
- * @see [Effects for Operation](https://developers.stellar.org/api/resources/operations/effects/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-an-operations-effects|Effects for Operation}
* @param {number} operationId Operation ID
* @returns {EffectCallBuilder} this EffectCallBuilder instance
*/
diff --git a/src/horizon/horizon_axios_client.ts b/src/horizon/horizon_axios_client.ts
index a76da401f..53e1bf8d9 100644
--- a/src/horizon/horizon_axios_client.ts
+++ b/src/horizon/horizon_axios_client.ts
@@ -57,6 +57,8 @@ export default AxiosClient;
* Given a hostname, get the current time of that server (i.e., use the last-
* recorded server time and offset it by the time since then.) If there IS no
* recorded server time, or it's been 5 minutes since the last, return null.
+ * @memberof Horizon
+ *
* @param {string} hostname Hostname of a Horizon server.
* @returns {number} The UNIX timestamp (in seconds, not milliseconds)
* representing the current time on that server, or `null` if we don't have
diff --git a/src/horizon/ledger_call_builder.ts b/src/horizon/ledger_call_builder.ts
index 34f1a4104..7e959d678 100644
--- a/src/horizon/ledger_call_builder.ts
+++ b/src/horizon/ledger_call_builder.ts
@@ -6,7 +6,7 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Server#ledgers}.
*
- * @see [All Ledgers](https://developers.stellar.org/api/resources/ledgers/list/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-ledgers|All Ledgers}
*
* @extends CallBuilder
* @constructor
diff --git a/src/horizon/offer_call_builder.ts b/src/horizon/offer_call_builder.ts
index 43d48bcd5..65a92a958 100644
--- a/src/horizon/offer_call_builder.ts
+++ b/src/horizon/offer_call_builder.ts
@@ -7,7 +7,7 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Server#offers}.
*
- * @see [Offers](https://developers.stellar.org/api/resources/offers/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/offers/|Offers}
*
* @extends CallBuilder
* @constructor
@@ -24,7 +24,7 @@ export class OfferCallBuilder extends CallBuilder<
/**
* The offer details endpoint provides information on a single offer. The offer ID provided in the id
* argument specifies which offer to load.
- * @see [Offer Details](https://developers.stellar.org/api/resources/offers/single/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/offers/single/|Offer Details}
* @param {string} offerId Offer ID
* @returns {CallBuilder} CallBuilder OperationCallBuilder instance
*/
@@ -37,7 +37,7 @@ export class OfferCallBuilder extends CallBuilder<
/**
* Returns all offers where the given account is involved.
*
- * @see [Offers](https://developers.stellar.org/api/resources/accounts/offers/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/accounts/offers/|Offers}
* @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {OfferCallBuilder} current OfferCallBuilder instance
*/
@@ -47,7 +47,7 @@ export class OfferCallBuilder extends CallBuilder<
/**
* Returns all offers buying an asset.
- * @see [Offers](https://developers.stellar.org/api/resources/offers/list/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/offers/list/|Offers}
* @see Asset
* @param {Asset} asset For example: `new Asset('USD','GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD')`
* @returns {OfferCallBuilder} current OfferCallBuilder instance
@@ -65,7 +65,7 @@ export class OfferCallBuilder extends CallBuilder<
/**
* Returns all offers selling an asset.
- * @see [Offers](https://developers.stellar.org/api/resources/offers/list/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/offers/list/|Offers}
* @see Asset
* @param {Asset} asset For example: `new Asset('EUR','GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD')`
* @returns {OfferCallBuilder} current OfferCallBuilder instance
@@ -83,7 +83,7 @@ export class OfferCallBuilder extends CallBuilder<
/**
* This endpoint filters offers where the given account is sponsoring the offer entry.
- * @see [Offers](https://developers.stellar.org/api/resources/offers/list/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/get-all-offers|Offers}
* @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {OfferCallBuilder} current OfferCallBuilder instance
*/
@@ -95,7 +95,7 @@ export class OfferCallBuilder extends CallBuilder<
/**
* This endpoint filters offers where the given account is the seller.
*
- * @see [Offers](https://developers.stellar.org/api/resources/offers/list/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/get-all-offers|Offers}
* @param {string} seller For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {OfferCallBuilder} current OfferCallBuilder instance
*/
diff --git a/src/horizon/operation_call_builder.ts b/src/horizon/operation_call_builder.ts
index 978d02f96..7e880ce0c 100644
--- a/src/horizon/operation_call_builder.ts
+++ b/src/horizon/operation_call_builder.ts
@@ -6,7 +6,7 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Server#operations}.
*
- * @see [All Operations](https://developers.stellar.org/api/resources/operations/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/operations|All Operations}
*
* @extends CallBuilder
* @constructor
@@ -23,7 +23,7 @@ export class OperationCallBuilder extends CallBuilder<
/**
* The operation details endpoint provides information on a single operation. The operation ID provided in the id
* argument specifies which operation to load.
- * @see [Operation Details](https://developers.stellar.org/api/resources/operations/single/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-an-operation|Operation Details}
* @param {number} operationId Operation ID
* @returns {CallBuilder} this OperationCallBuilder instance
*/
@@ -39,7 +39,7 @@ export class OperationCallBuilder extends CallBuilder<
/**
* This endpoint represents all operations that were included in valid transactions that affected a particular account.
- * @see [Operations for Account](https://developers.stellar.org/api/resources/accounts/operations/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/get-operations-by-account-id|Operations for Account}
* @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {OperationCallBuilder} this OperationCallBuilder instance
*/
@@ -49,7 +49,7 @@ export class OperationCallBuilder extends CallBuilder<
/**
* This endpoint represents all operations that reference a given claimable_balance.
- * @see [Operations for Claimable Balance](https://developers.stellar.org/api/resources/claimablebalances/operations/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/cb-retrieve-related-operations|Operations for Claimable Balance}
* @param {string} claimableBalanceId Claimable Balance ID
* @returns {OperationCallBuilder} this OperationCallBuilder instance
*/
@@ -60,7 +60,7 @@ export class OperationCallBuilder extends CallBuilder<
/**
* This endpoint returns all operations that occurred in a given ledger.
*
- * @see [Operations for Ledger](https://developers.stellar.org/api/resources/ledgers/operations/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-a-ledgers-operations|Operations for Ledger}
* @param {number|string} sequence Ledger sequence
* @returns {OperationCallBuilder} this OperationCallBuilder instance
*/
@@ -70,7 +70,7 @@ export class OperationCallBuilder extends CallBuilder<
/**
* This endpoint represents all operations that are part of a given transaction.
- * @see [Operations for Transaction](https://developers.stellar.org/api/resources/transactions/operations/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-a-transactions-operations|Operations for Transaction}
* @param {string} transactionId Transaction ID
* @returns {OperationCallBuilder} this OperationCallBuilder instance
*/
diff --git a/src/horizon/orderbook_call_builder.ts b/src/horizon/orderbook_call_builder.ts
index 0eb0bd72c..9b8d59057 100644
--- a/src/horizon/orderbook_call_builder.ts
+++ b/src/horizon/orderbook_call_builder.ts
@@ -6,7 +6,7 @@ import { ServerApi } from "./server_api";
* Creates a new {@link OrderbookCallBuilder} pointed to server defined by serverUrl.
*
* Do not create this object directly, use {@link Server#orderbook}.
- * @see [Orderbook Details](https://developers.stellar.org/api/aggregations/order-books/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/order-books|Orderbook Details}
* @param {string} serverUrl serverUrl Horizon server URL.
* @param {Asset} selling Asset being sold
* @param {Asset} buying Asset being bought
diff --git a/src/horizon/path_call_builder.ts b/src/horizon/path_call_builder.ts
index 4999e07d8..f7dcf9310 100644
--- a/src/horizon/path_call_builder.ts
+++ b/src/horizon/path_call_builder.ts
@@ -18,7 +18,7 @@ import { ServerApi } from "./server_api";
* used to determine if there a given path can satisfy a payment of the desired amount.
*
* Do not create this object directly, use {@link Server#paths}.
- * @see [Find Payment Paths](https://developers.stellar.org/api/aggregations/paths/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/paths|Find Payment Paths}
* @extends CallBuilder
* @param {string} serverUrl Horizon server URL.
* @param {string} source The sender's account ID. Any returned path must use a source that the sender can hold.
diff --git a/src/horizon/payment_call_builder.ts b/src/horizon/payment_call_builder.ts
index 82e103fb1..3e00e0b86 100644
--- a/src/horizon/payment_call_builder.ts
+++ b/src/horizon/payment_call_builder.ts
@@ -5,7 +5,7 @@ import { ServerApi } from "./server_api";
* Creates a new {@link PaymentCallBuilder} pointed to server defined by serverUrl.
*
* Do not create this object directly, use {@link Server#payments}.
- * @see [All Payments](https://developers.stellar.org/api/horizon/resources/list-all-payments/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/horizon/resources/list-all-payments/|All Payments}
* @constructor
* @extends CallBuilder
* @param {string} serverUrl Horizon server URL.
@@ -27,7 +27,7 @@ export class PaymentCallBuilder extends CallBuilder<
/**
* This endpoint responds with a collection of Payment operations where the given account was either the sender or receiver.
- * @see [Payments for Account](https://developers.stellar.org/api/horizon/resources/get-payments-by-account-id)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/horizon/resources/get-payments-by-account-id|Payments for Account}
* @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {PaymentCallBuilder} this PaymentCallBuilder instance
*/
@@ -37,7 +37,7 @@ export class PaymentCallBuilder extends CallBuilder<
/**
* This endpoint represents all payment operations that are part of a valid transactions in a given ledger.
- * @see [Payments for Ledger](https://developers.stellar.org/api/horizon/resources/retrieve-a-ledgers-payments)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/horizon/resources/retrieve-a-ledgers-payments|Payments for Ledger}
* @param {number|string} sequence Ledger sequence
* @returns {PaymentCallBuilder} this PaymentCallBuilder instance
*/
@@ -47,7 +47,7 @@ export class PaymentCallBuilder extends CallBuilder<
/**
* This endpoint represents all payment operations that are part of a given transaction.
- * @see [Payments for Transaction](https://developers.stellar.org/api/resources/transactions/payments/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/transactions/payments/|Payments for Transaction}
* @param {string} transactionId Transaction ID
* @returns {PaymentCallBuilder} this PaymentCallBuilder instance
*/
diff --git a/src/horizon/server.ts b/src/horizon/server.ts
index 57b4feb8e..fff7fc372 100644
--- a/src/horizon/server.ts
+++ b/src/horizon/server.ts
@@ -55,7 +55,7 @@ function _getAmountInLumens(amt: BigNumber) {
}
/**
- * Server handles the network connection to a [Horizon](https://developers.stellar.org/api/introduction/)
+ * Server handles the network connection to a [Horizon](https://developers.stellar.org/network/horizon)
* instance and exposes an interface for requests to that instance.
* @constructor
* @memberof Horizon
@@ -181,7 +181,7 @@ export class Server {
/**
* Fetch the fee stats endpoint.
- * @see [Fee Stats](https://developers.stellar.org/api/aggregations/fee-stats/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/fee-stats|Fee Stats}
* @returns {Promise} Promise that resolves to the fee stats returned by Horizon.
*/
public async feeStats(): Promise {
@@ -286,8 +286,7 @@ export class Server {
* * If `wasPartiallyFilled` is true, you can tell the user that
* `amountBought` or `amountSold` have already been transferred.
*
- * @see [Post
- * Transaction](https://developers.stellar.org/api/resources/transactions/post/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/submit-a-transaction|Submit a Transaction}
* @param {Transaction|FeeBumpTransaction} transaction - The transaction to submit.
* @param {object} [opts] Options object
* @param {boolean} [opts.skipMemoRequiredCheck] - Allow skipping memo
@@ -749,7 +748,7 @@ export class Server {
* Each account is checked sequentially instead of loading multiple accounts
* at the same time from Horizon.
*
- * @see https://stellar.org/protocol/sep-29
+ * @see {@link https://stellar.org/protocol/sep-29|SEP-29: Account Memo Requirements}
* @param {Transaction} transaction - The transaction to check.
* @returns {Promise} - If any of the destination account
* requires a memo, the promise will throw {@link AccountRequiresMemoError}.
diff --git a/src/horizon/strict_receive_path_call_builder.ts b/src/horizon/strict_receive_path_call_builder.ts
index b44876780..6d960007a 100644
--- a/src/horizon/strict_receive_path_call_builder.ts
+++ b/src/horizon/strict_receive_path_call_builder.ts
@@ -22,7 +22,7 @@ import { ServerApi } from "./server_api";
* paths from those source assets to the desired destination asset.
*
* Do not create this object directly, use {@link Server#strictReceivePaths}.
- * @see [Find Payment Paths](https://developers.stellar.org/api/aggregations/paths/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/paths|Find Payment Paths}
* @extends CallBuilder
* @param {string} serverUrl Horizon server URL.
* @param {string|Asset[]} source The sender's account ID or a list of Assets. Any returned path must use a source that the sender can hold.
diff --git a/src/horizon/strict_send_path_call_builder.ts b/src/horizon/strict_send_path_call_builder.ts
index da840374b..8d4bf3412 100644
--- a/src/horizon/strict_send_path_call_builder.ts
+++ b/src/horizon/strict_send_path_call_builder.ts
@@ -21,7 +21,7 @@ import { ServerApi } from "./server_api";
* amount.
*
* Do not create this object directly, use {@link Server#strictSendPaths}.
- * @see [Find Payment Paths](https://developers.stellar.org/api/aggregations/paths/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/paths|Find Payment Paths}
* @extends CallBuilder
* @param {string} serverUrl Horizon server URL.
* @param {Asset} sourceAsset The asset to be sent.
diff --git a/src/horizon/trades_call_builder.ts b/src/horizon/trades_call_builder.ts
index 2608fa663..0289c170f 100644
--- a/src/horizon/trades_call_builder.ts
+++ b/src/horizon/trades_call_builder.ts
@@ -7,7 +7,7 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Server#trades}.
*
- * @see [Trades](https://developers.stellar.org/api/resources/trades/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/trades|Trades}
*
* @extends CallBuilder
* @constructor
@@ -67,7 +67,7 @@ export class TradesCallBuilder extends CallBuilder<
/**
* Filter trades for a specific account
- * @see [Trades for Account](https://developers.stellar.org/api/resources/accounts/trades/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/get-trades-by-account-id|Trades for Account}
* @param {string} accountId For example: `GBYTR4MC5JAX4ALGUBJD7EIKZVM7CUGWKXIUJMRSMK573XH2O7VAK3SR`
* @returns {TradesCallBuilder} current TradesCallBuilder instance
*/
@@ -77,7 +77,7 @@ export class TradesCallBuilder extends CallBuilder<
/**
* Filter trades for a specific liquidity pool
- * @see [Trades for Liquidity Pool](https://developers.stellar.org/api/resources/liquiditypools/trades/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-related-trades|Trades for Liquidity Pool}
* @param {string} liquidityPoolId For example: `3b476aff8a406a6ec3b61d5c038009cef85f2ddfaf616822dc4fec92845149b4`
* @returns {TradesCallBuilder} current TradesCallBuilder instance
*/
diff --git a/src/horizon/transaction_call_builder.ts b/src/horizon/transaction_call_builder.ts
index 7a209227a..5173335f8 100644
--- a/src/horizon/transaction_call_builder.ts
+++ b/src/horizon/transaction_call_builder.ts
@@ -6,7 +6,7 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Server#transactions}.
*
- * @see [All Transactions](https://developers.stellar.org/api/resources/transactions/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-transactions|All Transactions}
*
* @constructor
* @extends CallBuilder
@@ -22,7 +22,7 @@ export class TransactionCallBuilder extends CallBuilder<
/**
* The transaction details endpoint provides information on a single transaction. The transaction hash provided in the hash argument specifies which transaction to load.
- * @see [Transaction Details](https://developers.stellar.org/api/resources/transactions/single/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-a-transaction|Transaction Details}
* @param {string} transactionId Transaction ID
* @returns {CallBuilder} a CallBuilder instance
*/
@@ -38,7 +38,7 @@ export class TransactionCallBuilder extends CallBuilder<
/**
* This endpoint represents all transactions that affected a given account.
- * @see [Transactions for Account](https://developers.stellar.org/api/resources/accounts/transactions/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/get-transactions-by-account-id|Transactions for Account}
* @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {TransactionCallBuilder} current TransactionCallBuilder instance
*/
@@ -48,7 +48,7 @@ export class TransactionCallBuilder extends CallBuilder<
/**
* This endpoint represents all transactions that reference a given claimable_balance.
- * @see [Operations for Claimable Balance](https://developers.stellar.org/api/resources/claimablebalances/transactions/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/cb-retrieve-related-transactions|Transactions for Claimable Balance}
* @param {string} claimableBalanceId Claimable Balance ID
* @returns {TransactionCallBuilder} this TransactionCallBuilder instance
*/
@@ -58,7 +58,7 @@ export class TransactionCallBuilder extends CallBuilder<
/**
* This endpoint represents all transactions in a given ledger.
- * @see [Transactions for Ledger](https://developers.stellar.org/api/resources/ledgers/transactions/)
+ * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-a-ledgers-transactions|Transactions for Ledger}
* @param {number|string} sequence Ledger sequence
* @returns {TransactionCallBuilder} current TransactionCallBuilder instance
*/
From 1c7c9b02d8d24498ca322c5abc91b4a5ac092cfa Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Tue, 14 May 2024 10:42:37 -0500
Subject: [PATCH 10/60] add the Durability enum to the SorobanRPC JSDoc
namespace
---
src/soroban/server.ts | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/soroban/server.ts b/src/soroban/server.ts
index 4e7bca08f..59829a79d 100644
--- a/src/soroban/server.ts
+++ b/src/soroban/server.ts
@@ -25,7 +25,14 @@ import {
export const SUBMIT_TRANSACTION_TIMEOUT = 60 * 1000;
-/** Specifies the durability namespace of contract-related ledger entries. */
+/**
+ * Specifies the durability namespace of contract-related ledger entries.
+ * @enum {('temporary' | 'persistent')}
+ * @memberof SorobanRpc
+ *
+ * @see {@link https://developers.stellar.org/docs/learn/smart-contract-internals/state-archival|State Archival docs}
+ * @see {@link https://docs.rs/soroban-sdk/latest/soroban_sdk/storage/struct.Storage.html|Rust SDK Storage docs}
+ */
export enum Durability {
Temporary = 'temporary',
Persistent = 'persistent'
From f1eb36a7a2f8f337eed79437330d903f2062b9cc Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Tue, 14 May 2024 10:47:28 -0500
Subject: [PATCH 11/60] fix links to the SorobanRPC server methods
---
src/soroban/server.ts | 8 ++++----
src/soroban/transaction.ts | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/soroban/server.ts b/src/soroban/server.ts
index 59829a79d..96fc3cc8b 100644
--- a/src/soroban/server.ts
+++ b/src/soroban/server.ts
@@ -160,7 +160,7 @@ export class Server {
*
* Allows you to directly inspect the current state of a contract. This is a
* backup way to access your contract data which may not be available via
- * events or {@link Server.simulateTransaction}.
+ * events or {@link SorobanRpc.Server#simulateTransaction}.
*
* @param {string|Address|Contract} contract the contract ID containing the
* data to load as a strkey (`C...` form), a {@link Contract}, or an
@@ -539,7 +539,7 @@ export class Server {
* and validate or take appropriate measures for interaction with user to
* confirm it is acceptable.
*
- * You can call the {@link Server.simulateTransaction} method directly first
+ * You can call the {@link SorobanRpc.Server#simulateTransaction} method directly first
* if you want to inspect estimated fees for a given transaction in detail
* first, then re-assemble it manually or via {@link assembleTransaction}.
*
@@ -609,7 +609,7 @@ export class Server {
*
* Unlike Horizon, Soroban RPC does not wait for transaction completion. It
* simply validates the transaction and enqueues it. Clients should call
- * {@link Server.getTransactionStatus} to learn about transaction
+ * {@link SorobanRpc.Server#getTransaction} to learn about transaction
* success/failure.
*
* @param {Transaction | FeeBumpTransaction} transaction to submit
@@ -670,7 +670,7 @@ export class Server {
* want to create and fund with friendbot
* @param {string} [friendbotUrl] optionally, an explicit address for
* friendbot (by default: this calls the Soroban RPC
- * {@link Server.getNetwork} method to try to discover this network's
+ * {@link SorobanRpc.Server#getNetwork} method to try to discover this network's
* Friendbot url).
*
* @returns {Promise} an {@link Account} object for the created
diff --git a/src/soroban/transaction.ts b/src/soroban/transaction.ts
index 267efe9b0..b521c1e7a 100644
--- a/src/soroban/transaction.ts
+++ b/src/soroban/transaction.ts
@@ -16,12 +16,12 @@ import { parseRawSimulation } from './parsers';
* entries are ignored**.
*
* @param {Transaction|FeeBumpTransaction} raw the initial transaction, w/o simulation applied
- * @param {Api.SimulateTransactionResponse|Api.RawSimulateTransactionResponse} simulation the Soroban RPC simulation result (see {@link Server.simulateTransaction})
+ * @param {Api.SimulateTransactionResponse|Api.RawSimulateTransactionResponse} simulation the Soroban RPC simulation result (see {@link SorobanRpc.Server#simulateTransaction})
* @returns {TransactionBuilder} a new, cloned transaction with the proper auth and resource (fee, footprint) simulation data applied
*
* @memberof SorobanRpc
- * @see {@link Server.simulateTransaction}
- * @see {@link Server.prepareTransaction}
+ * @see {@link SorobanRpc.Server#simulateTransaction}
+ * @see {@link SorobanRpc.Server#prepareTransaction}
*/
export function assembleTransaction(
raw: Transaction | FeeBumpTransaction,
From 22db24a80aeeb3a8d975762dc94f3d86d8d7de1b Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Tue, 14 May 2024 10:50:13 -0500
Subject: [PATCH 12/60] link call builders to the horizon.server methods
---
src/horizon/account_call_builder.ts | 2 +-
src/horizon/account_response.ts | 2 +-
src/horizon/assets_call_builder.ts | 2 +-
src/horizon/call_builder.ts | 2 +-
src/horizon/claimable_balances_call_builder.ts | 2 +-
src/horizon/effect_call_builder.ts | 2 +-
src/horizon/ledger_call_builder.ts | 2 +-
src/horizon/liquidity_pool_call_builder.ts | 2 +-
src/horizon/offer_call_builder.ts | 2 +-
src/horizon/operation_call_builder.ts | 2 +-
src/horizon/orderbook_call_builder.ts | 2 +-
src/horizon/path_call_builder.ts | 2 +-
src/horizon/payment_call_builder.ts | 2 +-
src/horizon/server.ts | 2 +-
src/horizon/strict_receive_path_call_builder.ts | 2 +-
src/horizon/strict_send_path_call_builder.ts | 2 +-
src/horizon/trade_aggregation_call_builder.ts | 2 +-
src/horizon/trades_call_builder.ts | 2 +-
src/horizon/transaction_call_builder.ts | 2 +-
19 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/src/horizon/account_call_builder.ts b/src/horizon/account_call_builder.ts
index 220534d55..380d4a96d 100644
--- a/src/horizon/account_call_builder.ts
+++ b/src/horizon/account_call_builder.ts
@@ -5,7 +5,7 @@ import { ServerApi } from "./server_api";
/**
* Creates a new {@link AccountCallBuilder} pointed to server defined by `serverUrl`.
*
- * Do not create this object directly, use {@link Server#accounts}.
+ * Do not create this object directly, use {@link Horizon.Server#accounts}.
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-accounts|All Accounts}
*
diff --git a/src/horizon/account_response.ts b/src/horizon/account_response.ts
index d85e81d1b..f94c086bc 100644
--- a/src/horizon/account_response.ts
+++ b/src/horizon/account_response.ts
@@ -5,7 +5,7 @@ import { HorizonApi } from "./horizon_api";
import { ServerApi } from "./server_api";
/**
- * Do not create this object directly, use {@link Server#loadAccount}.
+ * Do not create this object directly, use {@link Horizon.Server#loadAccount}.
*
* Returns information and links relating to a single account.
* The balances section in the returned JSON will also list all the trust lines this account has set up.
diff --git a/src/horizon/assets_call_builder.ts b/src/horizon/assets_call_builder.ts
index b02a31e7f..316afb54d 100644
--- a/src/horizon/assets_call_builder.ts
+++ b/src/horizon/assets_call_builder.ts
@@ -4,7 +4,7 @@ import { ServerApi } from "./server_api";
/**
* Creates a new {@link AssetsCallBuilder} pointed to server defined by serverUrl.
*
- * Do not create this object directly, use {@link Server#assets}.
+ * Do not create this object directly, use {@link Horizon.Server#assets}.
*
* @constructor
* @extends CallBuilder
diff --git a/src/horizon/call_builder.ts b/src/horizon/call_builder.ts
index ced719fbe..f1316491f 100644
--- a/src/horizon/call_builder.ts
+++ b/src/horizon/call_builder.ts
@@ -27,7 +27,7 @@ let EventSource: Constructable = anyGlobal.EventSource ??
/**
* Creates a new {@link CallBuilder} pointed to server defined by serverUrl.
*
- * This is an **abstract** class. Do not create this object directly, use {@link Server} class.
+ * This is an **abstract** class. Do not create this object directly, use {@link Horizon.Server} class.
*
* @constructor
* @param {string} serverUrl URL of Horizon server
diff --git a/src/horizon/claimable_balances_call_builder.ts b/src/horizon/claimable_balances_call_builder.ts
index bcaf78083..a195ad2a9 100644
--- a/src/horizon/claimable_balances_call_builder.ts
+++ b/src/horizon/claimable_balances_call_builder.ts
@@ -5,7 +5,7 @@ import { ServerApi } from "./server_api";
/**
* Creates a new {@link ClaimableBalanceCallBuilder} pointed to server defined by serverUrl.
*
- * Do not create this object directly, use {@link Server#claimableBalances}.
+ * Do not create this object directly, use {@link Horizon.Server#claimableBalances}.
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/claimablebalances|Claimable Balances}
*
diff --git a/src/horizon/effect_call_builder.ts b/src/horizon/effect_call_builder.ts
index d11cb5638..51a833eed 100644
--- a/src/horizon/effect_call_builder.ts
+++ b/src/horizon/effect_call_builder.ts
@@ -3,7 +3,7 @@ import { ServerApi } from "./server_api";
/**
* Creates a new {@link EffectCallBuilder} pointed to server defined by serverUrl.
- * Do not create this object directly, use {@link Server#effects}.
+ * Do not create this object directly, use {@link Horizon.Server#effects}.
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/effects|All Effects}
*
diff --git a/src/horizon/ledger_call_builder.ts b/src/horizon/ledger_call_builder.ts
index 7e959d678..bbdad2491 100644
--- a/src/horizon/ledger_call_builder.ts
+++ b/src/horizon/ledger_call_builder.ts
@@ -4,7 +4,7 @@ import { ServerApi } from "./server_api";
/**
* Creates a new {@link LedgerCallBuilder} pointed to server defined by serverUrl.
*
- * Do not create this object directly, use {@link Server#ledgers}.
+ * Do not create this object directly, use {@link Horizon.Server#ledgers}.
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-ledgers|All Ledgers}
*
diff --git a/src/horizon/liquidity_pool_call_builder.ts b/src/horizon/liquidity_pool_call_builder.ts
index 2e429ba75..592f01ad7 100644
--- a/src/horizon/liquidity_pool_call_builder.ts
+++ b/src/horizon/liquidity_pool_call_builder.ts
@@ -6,7 +6,7 @@ import { ServerApi } from "./server_api";
/**
* Creates a new {@link LiquidityPoolCallBuilder} pointed to server defined by serverUrl.
*
- * Do not create this object directly, use {@link Server#liquidityPools}.
+ * Do not create this object directly, use {@link Horizon.Server#liquidityPools}.
*
* @extends CallBuilder
* @constructor
diff --git a/src/horizon/offer_call_builder.ts b/src/horizon/offer_call_builder.ts
index 65a92a958..1dc7219b6 100644
--- a/src/horizon/offer_call_builder.ts
+++ b/src/horizon/offer_call_builder.ts
@@ -5,7 +5,7 @@ import { ServerApi } from "./server_api";
/**
* Creates a new {@link OfferCallBuilder} pointed to server defined by serverUrl.
*
- * Do not create this object directly, use {@link Server#offers}.
+ * Do not create this object directly, use {@link Horizon.Server#offers}.
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/offers/|Offers}
*
diff --git a/src/horizon/operation_call_builder.ts b/src/horizon/operation_call_builder.ts
index 7e880ce0c..eed9ae4b2 100644
--- a/src/horizon/operation_call_builder.ts
+++ b/src/horizon/operation_call_builder.ts
@@ -4,7 +4,7 @@ import { ServerApi } from "./server_api";
/**
* Creates a new {@link OperationCallBuilder} pointed to server defined by serverUrl.
*
- * Do not create this object directly, use {@link Server#operations}.
+ * Do not create this object directly, use {@link Horizon.Server#operations}.
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/operations|All Operations}
*
diff --git a/src/horizon/orderbook_call_builder.ts b/src/horizon/orderbook_call_builder.ts
index 9b8d59057..ea8e307f5 100644
--- a/src/horizon/orderbook_call_builder.ts
+++ b/src/horizon/orderbook_call_builder.ts
@@ -5,7 +5,7 @@ import { ServerApi } from "./server_api";
/**
* Creates a new {@link OrderbookCallBuilder} pointed to server defined by serverUrl.
*
- * Do not create this object directly, use {@link Server#orderbook}.
+ * Do not create this object directly, use {@link Horizon.Server#orderbook}.
* @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/order-books|Orderbook Details}
* @param {string} serverUrl serverUrl Horizon server URL.
* @param {Asset} selling Asset being sold
diff --git a/src/horizon/path_call_builder.ts b/src/horizon/path_call_builder.ts
index f7dcf9310..46e80be99 100644
--- a/src/horizon/path_call_builder.ts
+++ b/src/horizon/path_call_builder.ts
@@ -17,7 +17,7 @@ import { ServerApi } from "./server_api";
* payment paths from those source assets to the desired destination asset. The search's amount parameter will be
* used to determine if there a given path can satisfy a payment of the desired amount.
*
- * Do not create this object directly, use {@link Server#paths}.
+ * Do not create this object directly, use {@link Horizon.Server#paths}.
* @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/paths|Find Payment Paths}
* @extends CallBuilder
* @param {string} serverUrl Horizon server URL.
diff --git a/src/horizon/payment_call_builder.ts b/src/horizon/payment_call_builder.ts
index 3e00e0b86..9b4b3e472 100644
--- a/src/horizon/payment_call_builder.ts
+++ b/src/horizon/payment_call_builder.ts
@@ -4,7 +4,7 @@ import { ServerApi } from "./server_api";
/**
* Creates a new {@link PaymentCallBuilder} pointed to server defined by serverUrl.
*
- * Do not create this object directly, use {@link Server#payments}.
+ * Do not create this object directly, use {@link Horizon.Server#payments}.
* @see {@link https://developers.stellar.org/network/horizon/api-reference/horizon/resources/list-all-payments/|All Payments}
* @constructor
* @extends CallBuilder
diff --git a/src/horizon/server.ts b/src/horizon/server.ts
index fff7fc372..fa88f3edf 100644
--- a/src/horizon/server.ts
+++ b/src/horizon/server.ts
@@ -195,7 +195,7 @@ export class Server {
/**
* Submits a transaction to the network.
*
- * By default this function calls {@link Server#checkMemoRequired}, you can
+ * By default this function calls {@link Horizon.Server#checkMemoRequired}, you can
* skip this check by setting the option `skipMemoRequiredCheck` to `true`.
*
* If you submit any number of `manageOffer` operations, this will add an
diff --git a/src/horizon/strict_receive_path_call_builder.ts b/src/horizon/strict_receive_path_call_builder.ts
index 6d960007a..7f262de66 100644
--- a/src/horizon/strict_receive_path_call_builder.ts
+++ b/src/horizon/strict_receive_path_call_builder.ts
@@ -21,7 +21,7 @@ import { ServerApi } from "./server_api";
* If a list of assets is passed as the source, horizon will find any payment
* paths from those source assets to the desired destination asset.
*
- * Do not create this object directly, use {@link Server#strictReceivePaths}.
+ * Do not create this object directly, use {@link Horizon.Server#strictReceivePaths}.
* @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/paths|Find Payment Paths}
* @extends CallBuilder
* @param {string} serverUrl Horizon server URL.
diff --git a/src/horizon/strict_send_path_call_builder.ts b/src/horizon/strict_send_path_call_builder.ts
index 8d4bf3412..118de867e 100644
--- a/src/horizon/strict_send_path_call_builder.ts
+++ b/src/horizon/strict_send_path_call_builder.ts
@@ -20,7 +20,7 @@ import { ServerApi } from "./server_api";
* used to determine if there a given path can satisfy a payment of the desired
* amount.
*
- * Do not create this object directly, use {@link Server#strictSendPaths}.
+ * Do not create this object directly, use {@link Horizon.Server#strictSendPaths}.
* @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/paths|Find Payment Paths}
* @extends CallBuilder
* @param {string} serverUrl Horizon server URL.
diff --git a/src/horizon/trade_aggregation_call_builder.ts b/src/horizon/trade_aggregation_call_builder.ts
index c97c1d9f1..7282ff0b6 100644
--- a/src/horizon/trade_aggregation_call_builder.ts
+++ b/src/horizon/trade_aggregation_call_builder.ts
@@ -17,7 +17,7 @@ const allowedResolutions = [
/**
* Trade Aggregations facilitate efficient gathering of historical trade data.
*
- * Do not create this object directly, use {@link Server#tradeAggregation}.
+ * Do not create this object directly, use {@link Horizon.Server#tradeAggregation}.
*
* @extends CallBuilder
* @constructor
diff --git a/src/horizon/trades_call_builder.ts b/src/horizon/trades_call_builder.ts
index 0289c170f..1466a0a39 100644
--- a/src/horizon/trades_call_builder.ts
+++ b/src/horizon/trades_call_builder.ts
@@ -5,7 +5,7 @@ import { ServerApi } from "./server_api";
/**
* Creates a new {@link TradesCallBuilder} pointed to server defined by serverUrl.
*
- * Do not create this object directly, use {@link Server#trades}.
+ * Do not create this object directly, use {@link Horizon.Server#trades}.
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/trades|Trades}
*
diff --git a/src/horizon/transaction_call_builder.ts b/src/horizon/transaction_call_builder.ts
index 5173335f8..c0af81f69 100644
--- a/src/horizon/transaction_call_builder.ts
+++ b/src/horizon/transaction_call_builder.ts
@@ -4,7 +4,7 @@ import { ServerApi } from "./server_api";
/**
* Creates a new {@link TransactionCallBuilder} pointed to server defined by serverUrl.
*
- * Do not create this object directly, use {@link Server#transactions}.
+ * Do not create this object directly, use {@link Horizon.Server#transactions}.
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-transactions|All Transactions}
*
From 9d663a1c3f9f21f695d5ed316cc23cb215d72114 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Tue, 14 May 2024 10:56:59 -0500
Subject: [PATCH 13/60] create a util namespace and add validateTimebounds to
it
---
src/utils.ts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/utils.ts b/src/utils.ts
index 3186a51ff..e35de95e0 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -1,12 +1,15 @@
import { Transaction } from "@stellar/stellar-base";
+/** @namespace Utils */
export class Utils {
/**
* Verifies if the current date is within the transaction's timebonds
*
* @static
* @function
+ * @memberof Utils
* @param {Transaction} transaction the transaction whose timebonds will be validated.
+ * @param {number} [gracePeriod=0] an additional window of time that should be considered valid on either end of the transaction's time range.
* @returns {boolean} returns true if the current time is within the transaction's [minTime, maxTime] range.
*/
static validateTimebounds(
From c1d6a116d66345b061313c6f12e34d05c7e3af0f Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Tue, 14 May 2024 11:03:16 -0500
Subject: [PATCH 14/60] remove unnecessary code blocks from ContractSpec
examples
---
src/contract_spec.ts | 6 ------
1 file changed, 6 deletions(-)
diff --git a/src/contract_spec.ts b/src/contract_spec.ts
index 91add10fb..2c48ac73a 100644
--- a/src/contract_spec.ts
+++ b/src/contract_spec.ts
@@ -28,7 +28,6 @@ function readObj(args: object, input: xdr.ScSpecFunctionInputV0): any {
* This allows the class to be used to convert between native and raw `xdr.ScVal`s.
*
* @example
- * ```js
* const specEntries = [...]; // XDR spec entries of a smart contract
* const contractSpec = new ContractSpec(specEntries);
*
@@ -46,7 +45,6 @@ function readObj(args: object, input: xdr.ScSpecFunctionInputV0): any {
* const result = contractSpec.funcResToNative('funcName', resultScv);
*
* console.log(result); // {success: true}
- * ```
*/
export class ContractSpec {
public entries: xdr.ScSpecEntry[] = [];
@@ -115,13 +113,11 @@ export class ContractSpec {
* @throws {Error} if argument is missing or incorrect type
*
* @example
- * ```js
* const args = {
* arg1: 'value1',
* arg2: 1234
* };
* const scArgs = contractSpec.funcArgsToScVals('funcName', args);
- * ```
*/
funcArgsToScVals(name: string, args: object): xdr.ScVal[] {
let fn = this.getFunc(name);
@@ -140,10 +136,8 @@ export class ContractSpec {
* @throws {Error} if return type mismatch or invalid input
*
* @example
- * ```js
* const resultScv = 'AAA=='; // Base64 encoded ScVal
* const result = contractSpec.funcResToNative('funcName', resultScv);
- * ```
*/
funcResToNative(name: string, val_or_base64: xdr.ScVal | string): any {
let val =
From aee50b12f78ae7252f99950f42502f83bbde70e2 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Tue, 14 May 2024 17:31:38 -0500
Subject: [PATCH 15/60] group some const declarations into more relevant
namespaces/classes
---
src/contract_client/assembled_transaction.ts | 5 +++++
src/contract_client/utils.ts | 7 ++++++-
src/federation/server.ts | 6 +++++-
src/horizon/server.ts | 5 +++++
src/soroban/server.ts | 5 +++++
5 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/src/contract_client/assembled_transaction.ts b/src/contract_client/assembled_transaction.ts
index 120f1bffd..36391d9d5 100644
--- a/src/contract_client/assembled_transaction.ts
+++ b/src/contract_client/assembled_transaction.ts
@@ -23,6 +23,11 @@ import {
} from "./utils";
import { SentTransaction } from "./sent_transaction";
+/**
+ * An impossible account on the Stellar network
+ * @constant {string}
+ * @memberof ContractClient
+ */
export const NULL_ACCOUNT = "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF"
/**
diff --git a/src/contract_client/utils.ts b/src/contract_client/utils.ts
index b9d3d6603..f5beb332d 100644
--- a/src/contract_client/utils.ts
+++ b/src/contract_client/utils.ts
@@ -1,5 +1,7 @@
/**
* The default timeout for waiting for a transaction to be included in a block.
+ * @constant {number}
+ * @memberof ContractClient
*/
export const DEFAULT_TIMEOUT = 5 * 60;
@@ -70,7 +72,10 @@ export async function withExponentialBackoff(
* errors get included in the on-chain XDR that also describes your contract's
* methods. Each error will have a specific number. This Regular Expression
* matches these "expected error types" that a contract may throw, and helps
- * @{link AssembledTransaction} parse these errors.
+ * {@link AssembledTransaction} parse these errors.
+ *
+ * @constant {RegExp}
+ * @memberof ContractClient
*/
export const contractErrorPattern = /Error\(Contract, #(\d+)\)/;
diff --git a/src/federation/server.ts b/src/federation/server.ts
index 06d88fc87..8af97d719 100644
--- a/src/federation/server.ts
+++ b/src/federation/server.ts
@@ -8,7 +8,11 @@ import { Resolver } from "../stellartoml";
import { Api } from "./api";
-// FEDERATION_RESPONSE_MAX_SIZE is the maximum size of response from a federation server
+/**
+ * The maximum size of response from a federation server
+ * @constant {number}
+ * @memberof FederationServer
+ */
export const FEDERATION_RESPONSE_MAX_SIZE = 100 * 1024;
/**
diff --git a/src/horizon/server.ts b/src/horizon/server.ts
index fa88f3edf..247e52652 100644
--- a/src/horizon/server.ts
+++ b/src/horizon/server.ts
@@ -42,6 +42,11 @@ import AxiosClient, {
getCurrentServerTime,
} from "./horizon_axios_client";
+/**
+ * Default transaction submission timeout for Horizon requests (60 seconds)
+ * @constant {number}
+ * @memberof Horizon.Server
+ */
export const SUBMIT_TRANSACTION_TIMEOUT = 60 * 1000;
const STROOPS_IN_LUMEN = 10000000;
diff --git a/src/soroban/server.ts b/src/soroban/server.ts
index 96fc3cc8b..c42203877 100644
--- a/src/soroban/server.ts
+++ b/src/soroban/server.ts
@@ -23,6 +23,11 @@ import {
parseRawEvents
} from './parsers';
+/**
+ * Default transaction submission timeout for RPC requests (60 seconds)
+ * @constant {number}
+ * @memberof SorobanRpc
+ */
export const SUBMIT_TRANSACTION_TIMEOUT = 60 * 1000;
/**
From 94bd4926896eb248e5613a72e3c2adb15ed67633 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Tue, 14 May 2024 17:32:53 -0500
Subject: [PATCH 16/60] make a stellartoml JSDoc namespace
---
src/stellartoml/index.ts | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/stellartoml/index.ts b/src/stellartoml/index.ts
index ba0c965bf..5c8bb2cbc 100644
--- a/src/stellartoml/index.ts
+++ b/src/stellartoml/index.ts
@@ -4,14 +4,23 @@ import { Networks } from "@stellar/stellar-base";
import { Config } from "../config";
-/** the maximum size of stellar.toml file */
+/** @namespace StellarToml */
+
+/**
+ * The maximum size of stellar.toml file (100 KB)
+ * @const {number}
+ * @memberof StellarToml
+ */
export const STELLAR_TOML_MAX_SIZE = 100 * 1024;
// axios timeout doesn't catch missing urls, e.g. those with no response
// so we use the axios cancel token to ensure the timeout
const CancelToken = axios.CancelToken;
-/** Resolver allows resolving `stellar.toml` files. */
+/**
+ * Resolver allows resolving `stellar.toml` files.
+ * @memberof StellarToml
+ */
export class Resolver {
/**
* Returns a parsed `stellar.toml` file for a given domain.
@@ -24,7 +33,8 @@ export class Resolver {
* // stellar.toml does not exist or is invalid
* });
* ```
- * @see Stellar.toml doc
+ * @see {@link https://developers.stellar.org/docs/issuing-assets/publishing-asset-info|Stellar.toml doc}
+ *
* @param {string} domain Domain to get stellar.toml file for
* @param {object} [opts] Options object
* @param {boolean} [opts.allowHttp] - Allow connecting to http servers, default: `false`. This must be set to false in production deployments!
From ce3d74cf6a4db1ea2e8223c73e36224a51e605ee Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Tue, 14 May 2024 17:33:46 -0500
Subject: [PATCH 17/60] flesh out the jsdoc info for the jsonrpc postObject
function
---
src/soroban/jsonrpc.ts | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/soroban/jsonrpc.ts b/src/soroban/jsonrpc.ts
index bd93ebbef..3711a4b4a 100644
--- a/src/soroban/jsonrpc.ts
+++ b/src/soroban/jsonrpc.ts
@@ -26,7 +26,16 @@ export interface Error {
data?: E;
}
-/** Sends the jsonrpc 'params' as a single 'param' object (no array support). */
+/**
+ * Sends the jsonrpc 'params' as a single 'param' object (no array support).
+ * @memberof SorobanRpc.Server
+ * @private
+ *
+ * @param {string} url URL to the RPC instance
+ * @param {string} method RPC method name that should be called
+ * @param {(any | null)} [param=null] params that should be supplied to the method
+ * @returns {Promise}
+ */
export async function postObject(
url: string,
method: string,
From d9086091ea0d8e6e947c675fc08d9cd1aa10a351 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Tue, 14 May 2024 17:34:59 -0500
Subject: [PATCH 18/60] some minor jsdoc fixups
---
src/contract_spec.ts | 1 +
src/horizon/horizon_axios_client.ts | 12 ++++++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/contract_spec.ts b/src/contract_spec.ts
index 2c48ac73a..0240a9c9f 100644
--- a/src/contract_spec.ts
+++ b/src/contract_spec.ts
@@ -865,6 +865,7 @@ const PRIMITIVE_DEFINITONS: { [key: string]: JSONSchema7Definition } = {
/**
* @param typeDef type to convert to json schema reference
* @returns {JSONSchema7} a schema describing the type
+ * @private
*/
function typeRef(typeDef: xdr.ScSpecTypeDef): JSONSchema7 {
let t = typeDef.switch();
diff --git a/src/horizon/horizon_axios_client.ts b/src/horizon/horizon_axios_client.ts
index 53e1bf8d9..b2c538d4c 100644
--- a/src/horizon/horizon_axios_client.ts
+++ b/src/horizon/horizon_axios_client.ts
@@ -16,10 +16,14 @@ export interface ServerTime {
* each entry will map the server domain to the last-known time and the local
* time it was recorded, ex:
*
- * "horizon-testnet.stellar.org": {
- * serverTime: 1552513039,
- * localTimeRecorded: 1552513052
- * }
+ * @example
+ * "horizon-testnet.stellar.org": {
+ * serverTime: 1552513039,
+ * localTimeRecorded: 1552513052
+ * }
+ *
+ * @constant {Record.}
+ * @memberof Horizon
*/
export const SERVER_TIME_MAP: Record = {};
From 9f4555b323e2d0a6588fb8f2a9c029a44ff9389b Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Thu, 16 May 2024 15:00:45 -0500
Subject: [PATCH 19/60] make federation a module, include the typedefs
---
src/contract_client/sent_transaction.ts | 2 ++
src/federation/api.ts | 41 ++++++++++++++++++------
src/federation/index.ts | 4 +--
src/federation/server.ts | 42 ++++++++++---------------
4 files changed, 51 insertions(+), 38 deletions(-)
diff --git a/src/contract_client/sent_transaction.ts b/src/contract_client/sent_transaction.ts
index a1276f747..4df4716ca 100644
--- a/src/contract_client/sent_transaction.ts
+++ b/src/contract_client/sent_transaction.ts
@@ -16,6 +16,8 @@ import { AssembledTransaction } from "./assembled_transaction";
* {@link MethodOptions.timeoutInSeconds} seconds. See all attempts in
* `getTransactionResponseAll` and the most recent attempt in
* `getTransactionResponse`.
+ *
+ * @memberof ContractClient
*/
export class SentTransaction {
public server: SorobanRpc.Server;
diff --git a/src/federation/api.ts b/src/federation/api.ts
index 65c3e98c3..8c3665c7a 100644
--- a/src/federation/api.ts
+++ b/src/federation/api.ts
@@ -1,13 +1,34 @@
/* tslint:disable-next-line:no-namespace */
+
+/**
+ * @namespace Api
+ * @memberof module:Federation
+ */
+
+/**
+ * @typedef {Object} Record Record returned from a federation server.
+ * @memberof module:Federation.Api
+ * @property {string} account_id The Stellar public key resolved from the federation lookup
+ * @property {string} [memo_type] The type of memo, if any, required to send payments to this user
+ * @property {string} [memo] The memo value, if any, required to send payments to this user
+ */
+
+/**
+ * @typedef {Object} Options Options for configuring connections to federation servers.
+ * @memberof module:Federation.Api
+ * @property {boolean} [allowHttp=false] Allow connecting to http servers, default: `false`. This must be set to false in production deployments!
+ * @property {number} [timeout=0] Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue. You can also use {@link Config} class to set this globally.
+ */
+
export namespace Api {
- export interface Record {
- account_id: string;
- memo_type?: string;
- memo?: string;
- }
-
- export interface Options {
- allowHttp?: boolean;
- timeout?: number;
- }
+ export interface Record {
+ account_id: string;
+ memo_type?: string;
+ memo?: string;
+ }
+
+ export interface Options {
+ allowHttp?: boolean;
+ timeout?: number;
}
+}
diff --git a/src/federation/index.ts b/src/federation/index.ts
index b7c92ee06..beead6bb8 100644
--- a/src/federation/index.ts
+++ b/src/federation/index.ts
@@ -1,2 +1,2 @@
-export { FederationServer as Server, FEDERATION_RESPONSE_MAX_SIZE } from './server';
-export * as Api from './api';
\ No newline at end of file
+export { Server, FEDERATION_RESPONSE_MAX_SIZE } from './server';
+export * as Api from './api';
diff --git a/src/federation/server.ts b/src/federation/server.ts
index 8af97d719..1a5fe1a08 100644
--- a/src/federation/server.ts
+++ b/src/federation/server.ts
@@ -8,44 +8,41 @@ import { Resolver } from "../stellartoml";
import { Api } from "./api";
+/** @module Federation */
+
/**
* The maximum size of response from a federation server
* @constant {number}
- * @memberof FederationServer
*/
export const FEDERATION_RESPONSE_MAX_SIZE = 100 * 1024;
/**
- * FederationServer handles a network connection to a
+ * Server handles a network connection to a
* [federation server](https://developers.stellar.org/docs/glossary/federation/)
* instance and exposes an interface for requests to that instance.
* @constructor
+ * @memberof module:Federation
* @param {string} serverURL The federation server URL (ex. `https://acme.com/federation`).
* @param {string} domain Domain this server represents
- * @param {object} [opts] options object
- * @param {boolean} [opts.allowHttp] - Allow connecting to http servers, default: `false`. This must be set to false in production deployments! You can also use {@link Config} class to set this globally.
- * @param {number} [opts.timeout] - Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue. You can also use {@link Config} class to set this globally.
+ * @param {module:Federation.Api.Options} [opts] options object
* @returns {void}
*/
-export class FederationServer {
+export class Server {
/**
* The federation server URL (ex. `https://acme.com/federation`).
*
- * @memberof FederationServer
*/
private readonly serverURL: URI; // TODO: public or private? readonly?
/**
* Domain this server represents.
*
* @type {string}
- * @memberof FederationServer
*/
private readonly domain: string; // TODO: public or private? readonly?
/**
* Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue.
*
* @type {number}
- * @memberof FederationServer
*/
private readonly timeout: number; // TODO: public or private? readonly?
@@ -75,13 +72,8 @@ export class FederationServer {
* @see Federation doc
* @see Stellar.toml doc
* @param {string} value Stellar Address (ex. `bob*stellar.org`)
- * @param {object} [opts] Options object
- * @param {boolean} [opts.allowHttp] - Allow connecting to http servers, default: `false`. This must be set to false in production deployments!
- * @param {number} [opts.timeout] - Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue.
- * @returns {Promise} `Promise` that resolves to a JSON object with this shape:
- * * `account_id` - Account ID of the destination,
- * * `memo_type` (optional) - Memo type that needs to be attached to a transaction,
- * * `memo` (optional) - Memo value that needs to be attached to a transaction.
+ * @param {module:Federation.Api.Options} [opts] Options object
+ * @returns {Promise} A promise that resolves to the federation record
*/
public static async resolve(
value: string,
@@ -101,7 +93,7 @@ export class FederationServer {
if (addressParts.length !== 2 || !domain) {
return Promise.reject(new Error("Invalid Stellar address"));
}
- const federationServer = await FederationServer.createForDomain(
+ const federationServer = await Server.createForDomain(
domain,
opts,
);
@@ -126,22 +118,20 @@ export class FederationServer {
* ```
* @see Stellar.toml doc
* @param {string} domain Domain to get federation server for
- * @param {object} [opts] Options object
- * @param {boolean} [opts.allowHttp] - Allow connecting to http servers, default: `false`. This must be set to false in production deployments!
- * @param {number} [opts.timeout] - Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue.
- * @returns {Promise} `Promise` that resolves to a FederationServer object
+ * @param {module:Federation.Api.Options} [opts] Options object
+ * @returns {Promise} A promise that resolves to the federation record
*/
public static async createForDomain(
domain: string,
opts: Api.Options = {},
- ): Promise {
+ ): Promise {
const tomlObject = await Resolver.resolve(domain, opts);
if (!tomlObject.FEDERATION_SERVER) {
return Promise.reject(
new Error("stellar.toml does not contain FEDERATION_SERVER field"),
);
}
- return new FederationServer(tomlObject.FEDERATION_SERVER, domain, opts);
+ return new Server(tomlObject.FEDERATION_SERVER, domain, opts);
}
public constructor(
@@ -170,7 +160,7 @@ export class FederationServer {
* Get the federation record if the user was found for a given Stellar address
* @see Federation doc
* @param {string} address Stellar address (ex. `bob*stellar.org`). If `FederationServer` was instantiated with `domain` param only username (ex. `bob`) can be passed.
- * @returns {Promise} Promise that resolves to the federation record
+ * @returns {Promise} A promise that resolves to the federation record
*/
public async resolveAddress(
address: string,
@@ -194,7 +184,7 @@ export class FederationServer {
* Given an account ID, get their federation record if the user was found
* @see Federation doc
* @param {string} accountId Account ID (ex. `GBYNR2QJXLBCBTRN44MRORCMI4YO7FZPFBCNOKTOBCAAFC7KC3LNPRYS`)
- * @returns {Promise} A promise that resolves to the federation record
+ * @returns {Promise} A promise that resolves to the federation record
*/
public async resolveAccountId(
accountId: string,
@@ -207,7 +197,7 @@ export class FederationServer {
* Given a transactionId, get the federation record if the sender of the transaction was found
* @see Federation doc
* @param {string} transactionId Transaction ID (ex. `3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889`)
- * @returns {Promise} A promise that resolves to the federation record
+ * @returns {Promise} A promise that resolves to the federation record
*/
public async resolveTransactionId(
transactionId: string,
From 260b9c2d1541eedab908f71c9e842bcd3f86a717 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Thu, 16 May 2024 15:24:47 -0500
Subject: [PATCH 20/60] add throws tags to federation methods
---
src/federation/server.ts | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/federation/server.ts b/src/federation/server.ts
index 1a5fe1a08..60abdf5a0 100644
--- a/src/federation/server.ts
+++ b/src/federation/server.ts
@@ -57,8 +57,7 @@ export class Server {
* resolves if Account ID is valid and rejects in all other cases. Please note that this method does not check
* if the account actually exists in a ledger.
*
- * Example:
- * ```js
+ * @example
* StellarSdk.FederationServer.resolve('bob*stellar.org')
* .then(federationRecord => {
* // {
@@ -67,13 +66,13 @@ export class Server {
* // memo: 100
* // }
* });
- * ```
*
* @see Federation doc
* @see Stellar.toml doc
* @param {string} value Stellar Address (ex. `bob*stellar.org`)
* @param {module:Federation.Api.Options} [opts] Options object
* @returns {Promise} A promise that resolves to the federation record
+ * @throws Will throw an error if the provided account ID is not a valid Ed25519 public key.
*/
public static async resolve(
value: string,
@@ -120,6 +119,7 @@ export class Server {
* @param {string} domain Domain to get federation server for
* @param {module:Federation.Api.Options} [opts] Options object
* @returns {Promise} A promise that resolves to the federation record
+ * @throws Will throw an error if the domain's stellar.toml file does not contain a federation server field.
*/
public static async createForDomain(
domain: string,
@@ -161,6 +161,7 @@ export class Server {
* @see Federation doc
* @param {string} address Stellar address (ex. `bob*stellar.org`). If `FederationServer` was instantiated with `domain` param only username (ex. `bob`) can be passed.
* @returns {Promise} A promise that resolves to the federation record
+ * @throws Will throw an error if the federated address does not contain a domain, or if the server object was not instantiated with a `domain` parameter
*/
public async resolveAddress(
address: string,
@@ -185,6 +186,9 @@ export class Server {
* @see Federation doc
* @param {string} accountId Account ID (ex. `GBYNR2QJXLBCBTRN44MRORCMI4YO7FZPFBCNOKTOBCAAFC7KC3LNPRYS`)
* @returns {Promise} A promise that resolves to the federation record
+ * @throws Will throw an error if the federation server returns an invalid memo value.
+ * @throws Will throw an error if the federation server's response exceeds the allowed maximum size.
+ * @throws {BadResponseError} Will throw an error if the server query fails with an improper response.
*/
public async resolveAccountId(
accountId: string,
@@ -198,6 +202,9 @@ export class Server {
* @see Federation doc
* @param {string} transactionId Transaction ID (ex. `3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889`)
* @returns {Promise} A promise that resolves to the federation record
+ * @throws Will throw an error if the federation server returns an invalid memo value.
+ * @throws Will throw an error if the federation server's response exceeds the allowed maximum size.
+ * @throws {BadResponseError} Will throw an error if the server query fails with an improper response.
*/
public async resolveTransactionId(
transactionId: string,
From 879b9b595e33bc8002b2f453d0ea7137aa6a59c4 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 09:11:23 -0500
Subject: [PATCH 21/60] mark most of the "call builder" classes as private in
JSDoc
Since the comments clearly say "don't make this class yourself,"
it might make sense to mark them as `@private` so they don't show
up in the documentation.
The doc pages for those classes can still be visited, but they
don't show up in the sidebar to the left, unless you specifically
navigate to one of them. (Or, if you click a link for what the
return type on the `Horizon.Server.effects()` method, for example
---
src/horizon/account_call_builder.ts | 1 +
src/horizon/account_response.ts | 4 +++-
src/horizon/assets_call_builder.ts | 1 +
src/horizon/call_builder.ts | 4 +++-
.../claimable_balances_call_builder.ts | 1 +
src/horizon/effect_call_builder.ts | 1 +
src/horizon/horizon_axios_client.ts | 4 ++--
src/horizon/index.ts | 4 ++--
src/horizon/ledger_call_builder.ts | 1 +
src/horizon/liquidity_pool_call_builder.ts | 1 +
src/horizon/offer_call_builder.ts | 1 +
src/horizon/operation_call_builder.ts | 1 +
src/horizon/orderbook_call_builder.ts | 5 +++++
src/horizon/path_call_builder.ts | 5 +++++
src/horizon/payment_call_builder.ts | 6 +++++-
src/horizon/server.ts | 21 ++++++++++++-------
.../strict_receive_path_call_builder.ts | 5 +++++
src/horizon/strict_send_path_call_builder.ts | 5 +++++
src/horizon/trade_aggregation_call_builder.ts | 2 ++
src/horizon/trades_call_builder.ts | 2 ++
src/horizon/transaction_call_builder.ts | 4 +++-
21 files changed, 63 insertions(+), 16 deletions(-)
diff --git a/src/horizon/account_call_builder.ts b/src/horizon/account_call_builder.ts
index 380d4a96d..ec33c820e 100644
--- a/src/horizon/account_call_builder.ts
+++ b/src/horizon/account_call_builder.ts
@@ -10,6 +10,7 @@ import { ServerApi } from "./server_api";
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-accounts|All Accounts}
*
* @extends CallBuilder
+ * @private
* @constructor
* @param {string} serverUrl Horizon server URL.
*/
diff --git a/src/horizon/account_response.ts b/src/horizon/account_response.ts
index f94c086bc..8f49fcc3c 100644
--- a/src/horizon/account_response.ts
+++ b/src/horizon/account_response.ts
@@ -5,12 +5,14 @@ import { HorizonApi } from "./horizon_api";
import { ServerApi } from "./server_api";
/**
- * Do not create this object directly, use {@link Horizon.Server#loadAccount}.
+ * Do not create this object directly, use {@link module:Horizon.Server#loadAccount | Horizon.Server#loadAccount}.
*
* Returns information and links relating to a single account.
* The balances section in the returned JSON will also list all the trust lines this account has set up.
* It also contains {@link Account} object and exposes it's methods so can be used in {@link TransactionBuilder}.
*
+ * @memberof module:Horizon
+ *
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/accounts/object|Account Details}
* @param {string} response Response from horizon account endpoint.
* @returns {AccountResponse} AccountResponse instance
diff --git a/src/horizon/assets_call_builder.ts b/src/horizon/assets_call_builder.ts
index 316afb54d..3a3accc39 100644
--- a/src/horizon/assets_call_builder.ts
+++ b/src/horizon/assets_call_builder.ts
@@ -8,6 +8,7 @@ import { ServerApi } from "./server_api";
*
* @constructor
* @extends CallBuilder
+ * @private
* @param {string} serverUrl Horizon server URL.
*/
export class AssetsCallBuilder extends CallBuilder<
diff --git a/src/horizon/call_builder.ts b/src/horizon/call_builder.ts
index f1316491f..2f67bd22f 100644
--- a/src/horizon/call_builder.ts
+++ b/src/horizon/call_builder.ts
@@ -27,9 +27,11 @@ let EventSource: Constructable = anyGlobal.EventSource ??
/**
* Creates a new {@link CallBuilder} pointed to server defined by serverUrl.
*
- * This is an **abstract** class. Do not create this object directly, use {@link Horizon.Server} class.
+ * This is an **abstract** class. Do not create this object directly, use {@link module:Horizon.Server | Horizon.Server} class.
*
+ * @private
* @constructor
+ *
* @param {string} serverUrl URL of Horizon server
*/
export class CallBuilder<
diff --git a/src/horizon/claimable_balances_call_builder.ts b/src/horizon/claimable_balances_call_builder.ts
index a195ad2a9..ff4429b78 100644
--- a/src/horizon/claimable_balances_call_builder.ts
+++ b/src/horizon/claimable_balances_call_builder.ts
@@ -10,6 +10,7 @@ import { ServerApi } from "./server_api";
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/claimablebalances|Claimable Balances}
*
* @extends CallBuilder
+ * @private
* @constructor
* @param {string} serverUrl Horizon server URL.
*/
diff --git a/src/horizon/effect_call_builder.ts b/src/horizon/effect_call_builder.ts
index 51a833eed..d7278db03 100644
--- a/src/horizon/effect_call_builder.ts
+++ b/src/horizon/effect_call_builder.ts
@@ -8,6 +8,7 @@ import { ServerApi } from "./server_api";
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/effects|All Effects}
*
* @extends CallBuilder
+ * @private
* @constructor
* @param {string} serverUrl Horizon server URL.
*/
diff --git a/src/horizon/horizon_axios_client.ts b/src/horizon/horizon_axios_client.ts
index b2c538d4c..15a79bcec 100644
--- a/src/horizon/horizon_axios_client.ts
+++ b/src/horizon/horizon_axios_client.ts
@@ -23,7 +23,7 @@ export interface ServerTime {
* }
*
* @constant {Record.}
- * @memberof Horizon
+ * @memberof module:Horizon
*/
export const SERVER_TIME_MAP: Record = {};
@@ -61,7 +61,7 @@ export default AxiosClient;
* Given a hostname, get the current time of that server (i.e., use the last-
* recorded server time and offset it by the time since then.) If there IS no
* recorded server time, or it's been 5 minutes since the last, return null.
- * @memberof Horizon
+ * @memberof module:Horizon
*
* @param {string} hostname Hostname of a Horizon server.
* @returns {number} The UNIX timestamp (in seconds, not milliseconds)
diff --git a/src/horizon/index.ts b/src/horizon/index.ts
index 66cbc61a9..dd44af12d 100644
--- a/src/horizon/index.ts
+++ b/src/horizon/index.ts
@@ -1,4 +1,4 @@
-/** @namespace Horizon */
+/** @module Horizon */
// Expose all types
export * from "./horizon_api";
@@ -14,4 +14,4 @@ export {
getCurrentServerTime
} from "./horizon_axios_client";
-export default module.exports;
\ No newline at end of file
+export default module.exports;
diff --git a/src/horizon/ledger_call_builder.ts b/src/horizon/ledger_call_builder.ts
index bbdad2491..03f8ee856 100644
--- a/src/horizon/ledger_call_builder.ts
+++ b/src/horizon/ledger_call_builder.ts
@@ -9,6 +9,7 @@ import { ServerApi } from "./server_api";
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-ledgers|All Ledgers}
*
* @extends CallBuilder
+ * @private
* @constructor
* @param {string} serverUrl Horizon server URL.
*/
diff --git a/src/horizon/liquidity_pool_call_builder.ts b/src/horizon/liquidity_pool_call_builder.ts
index 592f01ad7..b18dd45ac 100644
--- a/src/horizon/liquidity_pool_call_builder.ts
+++ b/src/horizon/liquidity_pool_call_builder.ts
@@ -9,6 +9,7 @@ import { ServerApi } from "./server_api";
* Do not create this object directly, use {@link Horizon.Server#liquidityPools}.
*
* @extends CallBuilder
+ * @private
* @constructor
* @param {string} serverUrl Horizon server URL.
*/
diff --git a/src/horizon/offer_call_builder.ts b/src/horizon/offer_call_builder.ts
index 1dc7219b6..5d87d071d 100644
--- a/src/horizon/offer_call_builder.ts
+++ b/src/horizon/offer_call_builder.ts
@@ -10,6 +10,7 @@ import { ServerApi } from "./server_api";
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/offers/|Offers}
*
* @extends CallBuilder
+ * @private
* @constructor
* @param {string} serverUrl Horizon server URL.
*/
diff --git a/src/horizon/operation_call_builder.ts b/src/horizon/operation_call_builder.ts
index eed9ae4b2..0f0ff17f1 100644
--- a/src/horizon/operation_call_builder.ts
+++ b/src/horizon/operation_call_builder.ts
@@ -9,6 +9,7 @@ import { ServerApi } from "./server_api";
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/operations|All Operations}
*
* @extends CallBuilder
+ * @private
* @constructor
* @param {string} serverUrl Horizon server URL.
*/
diff --git a/src/horizon/orderbook_call_builder.ts b/src/horizon/orderbook_call_builder.ts
index ea8e307f5..e07f46051 100644
--- a/src/horizon/orderbook_call_builder.ts
+++ b/src/horizon/orderbook_call_builder.ts
@@ -6,7 +6,12 @@ import { ServerApi } from "./server_api";
* Creates a new {@link OrderbookCallBuilder} pointed to server defined by serverUrl.
*
* Do not create this object directly, use {@link Horizon.Server#orderbook}.
+ *
* @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/order-books|Orderbook Details}
+ *
+ * @extends CallBuilder
+ * @private
+ * @constructor
* @param {string} serverUrl serverUrl Horizon server URL.
* @param {Asset} selling Asset being sold
* @param {Asset} buying Asset being bought
diff --git a/src/horizon/path_call_builder.ts b/src/horizon/path_call_builder.ts
index 46e80be99..a41058b1c 100644
--- a/src/horizon/path_call_builder.ts
+++ b/src/horizon/path_call_builder.ts
@@ -18,8 +18,13 @@ import { ServerApi } from "./server_api";
* used to determine if there a given path can satisfy a payment of the desired amount.
*
* Do not create this object directly, use {@link Horizon.Server#paths}.
+ *
* @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/paths|Find Payment Paths}
+ *
* @extends CallBuilder
+ * @private
+ * @constructor
+ *
* @param {string} serverUrl Horizon server URL.
* @param {string} source The sender's account ID. Any returned path must use a source that the sender can hold.
* @param {string} destination The destination account ID that any returned path should use.
diff --git a/src/horizon/payment_call_builder.ts b/src/horizon/payment_call_builder.ts
index 9b4b3e472..22912da0a 100644
--- a/src/horizon/payment_call_builder.ts
+++ b/src/horizon/payment_call_builder.ts
@@ -5,9 +5,13 @@ import { ServerApi } from "./server_api";
* Creates a new {@link PaymentCallBuilder} pointed to server defined by serverUrl.
*
* Do not create this object directly, use {@link Horizon.Server#payments}.
+ *
* @see {@link https://developers.stellar.org/network/horizon/api-reference/horizon/resources/list-all-payments/|All Payments}
- * @constructor
+ *
* @extends CallBuilder
+ * @private
+ * @constructor
+ *
* @param {string} serverUrl Horizon server URL.
*/
export class PaymentCallBuilder extends CallBuilder<
diff --git a/src/horizon/server.ts b/src/horizon/server.ts
index 247e52652..58b113c24 100644
--- a/src/horizon/server.ts
+++ b/src/horizon/server.ts
@@ -45,7 +45,7 @@ import AxiosClient, {
/**
* Default transaction submission timeout for Horizon requests (60 seconds)
* @constant {number}
- * @memberof Horizon.Server
+ * @memberof module:Horizon~Server
*/
export const SUBMIT_TRANSACTION_TIMEOUT = 60 * 1000;
@@ -62,15 +62,10 @@ function _getAmountInLumens(amt: BigNumber) {
/**
* Server handles the network connection to a [Horizon](https://developers.stellar.org/network/horizon)
* instance and exposes an interface for requests to that instance.
- * @constructor
- * @memberof Horizon
+ * @memberof module:Horizon
*
* @param {string} serverURL Horizon Server URL (ex. `https://horizon-testnet.stellar.org`).
- * @param {object} [opts] Options object
- * @param {boolean} [opts.allowHttp] - Allow connecting to http servers, default: `false`. This must be set to false in production deployments! You can also use {@link Config} class to set this globally.
- * @param {string} [opts.appName] - Allow set custom header `X-App-Name`, default: `undefined`.
- * @param {string} [opts.appVersion] - Allow set custom header `X-App-Version`, default: `undefined`.
- * @param {string} [opts.authToken] - Allow set custom header `X-Auth-Token`, default: `undefined`.
+ * @param {Options} [opts] Options object
*/
export class Server {
/**
@@ -822,6 +817,16 @@ export class Server {
}
}
+/**
+ * Options for configuring connections to Horizon servers.
+ * @typedef {Object} Options
+ * @memberof module:Horizon.Server
+ * @property {boolean} [allowHttp] Allow connecting to http servers, default: `false`. This must be set to false in production deployments! You can also use {@link Config} class to set this globally.
+ * @property {string} [appName] Allow set custom header `X-App-Name`, default: `undefined`.
+ * @property {string} [appVersion] Allow set custom header `X-App-Version`, default: `undefined`.
+ * @property {string} [authToken] Allow set custom header `X-Auth-Token`, default: `undefined`.
+ */
+
export namespace Server {
export interface Options {
allowHttp?: boolean;
diff --git a/src/horizon/strict_receive_path_call_builder.ts b/src/horizon/strict_receive_path_call_builder.ts
index 7f262de66..de4e28df1 100644
--- a/src/horizon/strict_receive_path_call_builder.ts
+++ b/src/horizon/strict_receive_path_call_builder.ts
@@ -22,8 +22,13 @@ import { ServerApi } from "./server_api";
* paths from those source assets to the desired destination asset.
*
* Do not create this object directly, use {@link Horizon.Server#strictReceivePaths}.
+ *
* @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/paths|Find Payment Paths}
+ *
* @extends CallBuilder
+ * @private
+ * @constructor
+ *
* @param {string} serverUrl Horizon server URL.
* @param {string|Asset[]} source The sender's account ID or a list of Assets. Any returned path must use a source that the sender can hold.
* @param {Asset} destinationAsset The destination asset.
diff --git a/src/horizon/strict_send_path_call_builder.ts b/src/horizon/strict_send_path_call_builder.ts
index 118de867e..81c808259 100644
--- a/src/horizon/strict_send_path_call_builder.ts
+++ b/src/horizon/strict_send_path_call_builder.ts
@@ -21,8 +21,13 @@ import { ServerApi } from "./server_api";
* amount.
*
* Do not create this object directly, use {@link Horizon.Server#strictSendPaths}.
+ *
* @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/paths|Find Payment Paths}
+ *
* @extends CallBuilder
+ * @private
+ * @constructor
+ *
* @param {string} serverUrl Horizon server URL.
* @param {Asset} sourceAsset The asset to be sent.
* @param {string} sourceAmount The amount, denominated in the source asset, that any returned path should be able to satisfy.
diff --git a/src/horizon/trade_aggregation_call_builder.ts b/src/horizon/trade_aggregation_call_builder.ts
index 7282ff0b6..16234991d 100644
--- a/src/horizon/trade_aggregation_call_builder.ts
+++ b/src/horizon/trade_aggregation_call_builder.ts
@@ -20,7 +20,9 @@ const allowedResolutions = [
* Do not create this object directly, use {@link Horizon.Server#tradeAggregation}.
*
* @extends CallBuilder
+ * @private
* @constructor
+ *
* @param {string} serverUrl serverUrl Horizon server URL.
* @param {Asset} base base asset
* @param {Asset} counter counter asset
diff --git a/src/horizon/trades_call_builder.ts b/src/horizon/trades_call_builder.ts
index 1466a0a39..bc6cb2612 100644
--- a/src/horizon/trades_call_builder.ts
+++ b/src/horizon/trades_call_builder.ts
@@ -10,7 +10,9 @@ import { ServerApi } from "./server_api";
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/trades|Trades}
*
* @extends CallBuilder
+ * @private
* @constructor
+ *
* @param {string} serverUrl serverUrl Horizon server URL.
*/
export class TradesCallBuilder extends CallBuilder<
diff --git a/src/horizon/transaction_call_builder.ts b/src/horizon/transaction_call_builder.ts
index c0af81f69..ba65c9fcf 100644
--- a/src/horizon/transaction_call_builder.ts
+++ b/src/horizon/transaction_call_builder.ts
@@ -8,8 +8,10 @@ import { ServerApi } from "./server_api";
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-transactions|All Transactions}
*
- * @constructor
* @extends CallBuilder
+ * @private
+ * @constructor
+ *
* @param {string} serverUrl Horizon server URL.
*/
export class TransactionCallBuilder extends CallBuilder<
From 3da0c0be4fac490221cb81fcc9476f36f3eca7a9 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 09:15:22 -0500
Subject: [PATCH 22/60] fine-tune the JSDoc syntaxes and types in config.ts
---
src/config.ts | 26 +++++++++-----------------
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/src/config.ts b/src/config.ts
index 946c793d8..20022aa40 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -1,15 +1,12 @@
+/**
+ * @typedef {Object} Configuration
+ * @memberof Config
+ * @property {boolean} [allowHttp=false] Allow connecting to http servers, default: `false`. This must be set to false in production deployments!
+ * @property {number} [timeout=0] Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue. You can also use {@link Config} class to set this globally.
+ */
+
interface Configuration {
- /**
- * Allow connecting to http servers, default: `false`. This must be set to false in production deployments!
- *
- * @type {boolean}
- */
allowHttp: boolean;
- /**
- * Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue. You can also use {@link Config} class to set this globally.
- *
- * @type {number}
- */
timeout: number;
}
@@ -23,18 +20,13 @@ let config = Object.assign({}, defaultConfig);
/**
* Global config class.
*
- * Usage node:
- * ```
+ * @example Usage in node
* import {Config} from 'stellar-sdk';
* Config.setAllowHttp(true);
* Config.setTimeout(5000);
- * ```
- *
- * Usage browser:
- * ```
+ * @example Usage in the browser
* StellarSdk.Config.setAllowHttp(true);
* StellarSdk.Config.setTimeout(5000);
- * ```
* @static
*/
class Config {
From a19df6ecee63d102f9eddb14e613049a62467d65 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 09:16:34 -0500
Subject: [PATCH 23/60] JSDoc fixes for the Utils class
---
src/utils.ts | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/utils.ts b/src/utils.ts
index e35de95e0..7cecfb888 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -1,13 +1,12 @@
import { Transaction } from "@stellar/stellar-base";
-/** @namespace Utils */
+/** @class Utils */
export class Utils {
/**
* Verifies if the current date is within the transaction's timebonds
*
* @static
* @function
- * @memberof Utils
* @param {Transaction} transaction the transaction whose timebonds will be validated.
* @param {number} [gracePeriod=0] an additional window of time that should be considered valid on either end of the transaction's time range.
* @returns {boolean} returns true if the current time is within the transaction's [minTime, maxTime] range.
From 8253b2581b971cef45ca7541d5b1acbe0d2b5142 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 09:46:01 -0500
Subject: [PATCH 24/60] mark the Ok and Err rust type classes as private in
JSDoc
I don't _think_ they're accessible by SDK users, so I think it
makes sense to not render them in the docs?
---
src/rust_types/result.ts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/rust_types/result.ts b/src/rust_types/result.ts
index 8a47de4f4..b05093981 100644
--- a/src/rust_types/result.ts
+++ b/src/rust_types/result.ts
@@ -49,6 +49,7 @@ export interface ErrorMessage {
* Part of implementing {@link Result}, a minimal implementation of Rust's
* `Result` type. Used for contract methods that return Results, to maintain
* their distinction from methods that simply either return a value or throw.
+ * @private
*/
export class Ok implements Result {
constructor(readonly value: T) {}
@@ -62,6 +63,7 @@ export class Ok implements Result {
* Part of implementing {@link Result}, a minimal implementation of Rust's
* `Result` type. Used for contract methods that return Results, to maintain
* their distinction from methods that simply either return a value or throw.
+ * @private
*/
export class Err implements Result {
constructor(readonly error: E) {}
From db23f84ad142e87813d38738f45b2a20efde25cb Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 09:51:16 -0500
Subject: [PATCH 25/60] change StellarToml from a JSDoc namespace to a module
---
src/stellartoml/index.ts | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/stellartoml/index.ts b/src/stellartoml/index.ts
index 5c8bb2cbc..a98830525 100644
--- a/src/stellartoml/index.ts
+++ b/src/stellartoml/index.ts
@@ -4,12 +4,11 @@ import { Networks } from "@stellar/stellar-base";
import { Config } from "../config";
-/** @namespace StellarToml */
+/** @module StellarToml */
/**
* The maximum size of stellar.toml file (100 KB)
* @const {number}
- * @memberof StellarToml
*/
export const STELLAR_TOML_MAX_SIZE = 100 * 1024;
@@ -19,7 +18,6 @@ const CancelToken = axios.CancelToken;
/**
* Resolver allows resolving `stellar.toml` files.
- * @memberof StellarToml
*/
export class Resolver {
/**
From bdf6dbb631fee5f71b89ed917f47ba404d0e13c0 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 09:53:43 -0500
Subject: [PATCH 26/60] change webauth from a JSDoc namespace to a module
---
src/webauth/utils.ts | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/webauth/utils.ts b/src/webauth/utils.ts
index 8d5f41b10..922764611 100644
--- a/src/webauth/utils.ts
+++ b/src/webauth/utils.ts
@@ -17,14 +17,13 @@ import { Utils } from "../utils";
import { InvalidChallengeError } from "./errors";
import { ServerApi } from "../horizon/server_api";
-/** @namespace WebAuth */
+/** @module WebAuth */
/**
* Returns a valid [SEP-10](https://stellar.org/protocol/sep-10) challenge
* transaction which you can use for Stellar Web Authentication.
*
* @function
- * @memberof WebAuth
*
* @param {Keypair} serverKeypair Keypair for server's signing account.
* @param {string} clientAccountID The stellar account (G...) or muxed account
@@ -148,7 +147,6 @@ export function buildChallengeTx(
* - {@link verifyChallengeTxSigners}
*
* @function
- * @memberof WebAuth
*
* @param {string} challengeTx SEP0010 challenge transaction in base64.
* @param {string} serverAccountID The server's stellar account (public key).
@@ -371,7 +369,6 @@ export function readChallengeTx(
* - The signatures are all valid but do not meet the threshold.
*
* @function
- * @memberof WebAuth
*
* @param {string} challengeTx SEP0010 challenge transaction in base64.
* @param {string} serverAccountID The server's stellar account (public key).
@@ -498,7 +495,6 @@ export function verifyChallengeTxThreshold(
* server account or one of the signers provided in the arguments.
*
* @function
- * @memberof WebAuth
*
* @param {string} challengeTx SEP0010 challenge transaction in base64.
* @param {string} serverAccountID The server's stellar account (public key).
@@ -687,7 +683,6 @@ export function verifyChallengeTxSigners(
* Verifies if a transaction was signed by the given account id.
*
* @function
- * @memberof WebAuth
* @param {Transaction} transaction
* @param {string} accountID
* @returns {boolean}.
@@ -716,7 +711,6 @@ export function verifyTxSignedBy(
* given transaction.
*
* @function
- * @memberof WebAuth
* @param {Transaction} transaction the signed transaction.
* @param {string[]} signers The signers public keys.
* @returns {string[]} a list of signers that were found to have signed the
From 8269c167fd9ce2fc32a439862ccf4282f4464912 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 09:58:39 -0500
Subject: [PATCH 27/60] make SorobanRpc a JSDoc module instead of a namespace
---
src/soroban/api.ts | 3 ---
src/soroban/index.ts | 2 +-
src/soroban/jsonrpc.ts | 2 --
src/soroban/parsers.ts | 10 +++++-----
src/soroban/server.ts | 6 +++---
src/soroban/transaction.ts | 2 +-
6 files changed, 10 insertions(+), 15 deletions(-)
diff --git a/src/soroban/api.ts b/src/soroban/api.ts
index 4bb703980..27116a715 100644
--- a/src/soroban/api.ts
+++ b/src/soroban/api.ts
@@ -1,9 +1,6 @@
import { AssetType, Contract, SorobanDataBuilder, xdr } from '@stellar/stellar-base';
/* tslint:disable-next-line:no-namespace */
-/**
- * @memberof SorobanRpc
- */
export namespace Api {
export interface Balance {
asset_type: AssetType.credit4 | AssetType.credit12;
diff --git a/src/soroban/index.ts b/src/soroban/index.ts
index 2df0201c3..813f1d6cd 100644
--- a/src/soroban/index.ts
+++ b/src/soroban/index.ts
@@ -1,4 +1,4 @@
-/** @namespace SorobanRpc */
+/** @module SorobanRpc */
// tslint:disable-next-line: no-reference
///
diff --git a/src/soroban/jsonrpc.ts b/src/soroban/jsonrpc.ts
index 3711a4b4a..3fe34fd21 100644
--- a/src/soroban/jsonrpc.ts
+++ b/src/soroban/jsonrpc.ts
@@ -28,8 +28,6 @@ export interface Error {
/**
* Sends the jsonrpc 'params' as a single 'param' object (no array support).
- * @memberof SorobanRpc.Server
- * @private
*
* @param {string} url URL to the RPC instance
* @param {string} method RPC method name that should be called
diff --git a/src/soroban/parsers.ts b/src/soroban/parsers.ts
index 271222d9c..5ccdfeacf 100644
--- a/src/soroban/parsers.ts
+++ b/src/soroban/parsers.ts
@@ -3,7 +3,7 @@ import { Api } from './api';
/**
* Parse the response from invoking the `submitTransaction` method of a Soroban RPC server.
- * @memberof SorobanRpc
+ * @memberof module:SorobanRpc
*
* @param {Api.RawSendTransactionResponse} raw the raw `submitTransaction` response from the Soroban RPC server to parse
* @returns {Api.SendTransactionResponse} transaction response parsed from the Soroban RPC server's response
@@ -35,7 +35,7 @@ export function parseRawSendTransaction(
/**
* Parse and return the retrieved events, if any, from a raw response from a Soroban RPC server.
- * @memberof SorobanRpc
+ * @memberof module:SorobanRpc
*
* @param {Api.RawGetEventsResponse} raw the raw `getEvents` response from the Soroban RPC server to parse
* @returns {Api.GetEventsResponse} events parsed from the Soroban RPC server's response
@@ -62,7 +62,7 @@ export function parseRawEvents(
/**
* Parse and return the retrieved ledger entries, if any, from a raw response from a Soroban RPC server.
- * @memberof SorobanRpc
+ * @memberof module:SorobanRpc
*
* @param {Api.RawGetLedgerEntriesResponse} raw he raw `getLedgerEntries` response from the Soroban RPC server to parse
* @returns {Api.GetLedgerEntriesResponse} ledger entries parsed from the Soroban RPC server's response
@@ -94,7 +94,7 @@ export function parseRawLedgerEntries(
/**
* Converts a raw response schema into one with parsed XDR fields and a simplified interface.
* @warning This API is only exported for testing purposes and should not be relied on or considered "stable".
- * @memberof SorobanRpc
+ * @memberof module:SorobanRpc
*
* @param {Api.SimulateTransactionResponse | Api.RawSimulateTransactionResponse} sim the raw response schema (parsed ones are allowed, best-effort
* detected, and returned untouched)
@@ -133,7 +133,7 @@ export function parseRawSimulation(
/**
* Parse whether or not the transaction simulation was successful, returning the relevant response.
- * @memberof SorobanRpc
+ * @memberof module:SorobanRpc
* @private
*
* @param {Api.RawSimulateTransactionResponse} sim a raw response from the `simulateTransaction` method of the Soroban RPC server to parse
diff --git a/src/soroban/server.ts b/src/soroban/server.ts
index c42203877..21bdce44a 100644
--- a/src/soroban/server.ts
+++ b/src/soroban/server.ts
@@ -26,14 +26,14 @@ import {
/**
* Default transaction submission timeout for RPC requests (60 seconds)
* @constant {number}
- * @memberof SorobanRpc
+ * @memberof module:SorobanRpc
*/
export const SUBMIT_TRANSACTION_TIMEOUT = 60 * 1000;
/**
* Specifies the durability namespace of contract-related ledger entries.
* @enum {('temporary' | 'persistent')}
- * @memberof SorobanRpc
+ * @memberof module:SorobanRpc
*
* @see {@link https://developers.stellar.org/docs/learn/smart-contract-internals/state-archival|State Archival docs}
* @see {@link https://docs.rs/soroban-sdk/latest/soroban_sdk/storage/struct.Storage.html|Rust SDK Storage docs}
@@ -69,7 +69,7 @@ export namespace Server {
* interface for requests to that instance.
*
* @constructor
- * @memberof SorobanRpc
+ * @memberof module:SorobanRpc
*
* @param {string} serverURL Soroban-RPC Server URL (ex.
* `http://localhost:8000/soroban/rpc`).
diff --git a/src/soroban/transaction.ts b/src/soroban/transaction.ts
index b521c1e7a..48a54ff05 100644
--- a/src/soroban/transaction.ts
+++ b/src/soroban/transaction.ts
@@ -19,7 +19,7 @@ import { parseRawSimulation } from './parsers';
* @param {Api.SimulateTransactionResponse|Api.RawSimulateTransactionResponse} simulation the Soroban RPC simulation result (see {@link SorobanRpc.Server#simulateTransaction})
* @returns {TransactionBuilder} a new, cloned transaction with the proper auth and resource (fee, footprint) simulation data applied
*
- * @memberof SorobanRpc
+ * @memberof module:SorobanRpc
* @see {@link SorobanRpc.Server#simulateTransaction}
* @see {@link SorobanRpc.Server#prepareTransaction}
*/
From d04527aa3b52c5e2ef2b6820af29afcd1d27fed1 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 10:00:39 -0500
Subject: [PATCH 28/60] mark the AccountResponse class as private in JSDoc
---
src/horizon/account_response.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/horizon/account_response.ts b/src/horizon/account_response.ts
index 8f49fcc3c..0ce049368 100644
--- a/src/horizon/account_response.ts
+++ b/src/horizon/account_response.ts
@@ -12,6 +12,7 @@ import { ServerApi } from "./server_api";
* It also contains {@link Account} object and exposes it's methods so can be used in {@link TransactionBuilder}.
*
* @memberof module:Horizon
+ * @private
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/accounts/object|Account Details}
* @param {string} response Response from horizon account endpoint.
From ae18fa471c3e7de341f8aff77964bfd2632e2c5e Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 10:02:12 -0500
Subject: [PATCH 29/60] add soroban tx timeout const to the SorobanRpc.Server
module
---
src/soroban/server.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/soroban/server.ts b/src/soroban/server.ts
index 21bdce44a..5822e53a5 100644
--- a/src/soroban/server.ts
+++ b/src/soroban/server.ts
@@ -26,7 +26,7 @@ import {
/**
* Default transaction submission timeout for RPC requests (60 seconds)
* @constant {number}
- * @memberof module:SorobanRpc
+ * @memberof module:SorobanRpc.Server
*/
export const SUBMIT_TRANSACTION_TIMEOUT = 60 * 1000;
From 51f8016744a8953d70eee7bf01e2ec58196aa559 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 10:05:07 -0500
Subject: [PATCH 30/60] try out a new JSDoc theme
---
config/.jsdoc.json | 33 +++++++++-
package.json | 3 +-
yarn.lock | 152 ++++++++++++++++++++++++++++++++++++++++++---
3 files changed, 176 insertions(+), 12 deletions(-)
diff --git a/config/.jsdoc.json b/config/.jsdoc.json
index 55041dc28..4752784ef 100644
--- a/config/.jsdoc.json
+++ b/config/.jsdoc.json
@@ -3,11 +3,38 @@
"include": ["lib/", "js-stellar-base/src"],
"exclude": "js-stellar-base/src/generated"
},
+ "plugins": ["plugins/markdown"],
+ "template": {
+ "default": {
+ "useLongNameInNav": true
+ }
+ },
"opts": {
+ "readme": "README.md",
"destination": "jsdoc/",
"recurse": true,
- "template": "node_modules/minami",
- "readme": "README.md"
+ "verbose": true,
+ "template": "node_modules/clean-jsdoc-theme",
+ "theme_opts": {
+ "default_theme": "fallback-light",
+ "title": "Home",
+ "menu": [
+ {
+ "title": "GitHub",
+ "link": "https://github.com/stellar/js-stellar-sdk",
+ "target": "_blank"
+ },
+ {
+ "title": "npm",
+ "link": "https://www.npmjs.com/package/@stellar/stellar-sdk",
+ "target": "_blank"
+ }
+ ],
+ "prefixModuleToSidebarItems_experimental": true
+ }
},
- "plugins": ["plugins/markdown"]
+ "markdown": {
+ "hardwrap": false,
+ "idInHeadings": true
+ }
}
diff --git a/package.json b/package.json
index e093ae448..f1dc0160c 100644
--- a/package.json
+++ b/package.json
@@ -32,7 +32,7 @@
"build:browser": "webpack -c config/webpack.config.browser.js",
"build:docs": "cross-env NODE_ENV=docs yarn _babel",
"clean": "rm -rf lib/ dist/ coverage/ .nyc_output/ jsdoc/ test/e2e/.soroban",
- "docs": "yarn build:docs && jsdoc -c ./config/.jsdoc.json --verbose",
+ "docs": "yarn build:docs && jsdoc -c ./config/.jsdoc.json",
"test": "yarn build:test && yarn test:node && yarn test:integration && yarn test:browser",
"test:e2e": "./test/e2e/initialize.sh && ava",
"test:node": "yarn _nyc mocha --recursive 'test/unit/**/*.js'",
@@ -105,6 +105,7 @@
"chai": "^4.3.10",
"chai-as-promised": "^7.1.1",
"chai-http": "^4.3.0",
+ "clean-jsdoc-theme": "^4.3.0",
"cross-env": "^7.0.3",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
diff --git a/yarn.lock b/yarn.lock
index 63e94404e..24be429bf 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1271,7 +1271,7 @@
"@jridgewell/resolve-uri" "^3.1.0"
"@jridgewell/sourcemap-codec" "^1.4.14"
-"@jsdoc/salty@^0.2.1":
+"@jsdoc/salty@^0.2.1", "@jsdoc/salty@^0.2.4":
version "0.2.8"
resolved "https://registry.yarnpkg.com/@jsdoc/salty/-/salty-0.2.8.tgz#8d29923a9429694a437a50ab75004b576131d597"
integrity sha512-5e+SFVavj1ORKlKaKr2BmTOekmXbelU7dC0cDkQLqag7xfuTPuGMUFx7KWJuv4bYZrTsoL2Z18VVCOKYxzoHcg==
@@ -2589,6 +2589,14 @@ callsites@^4.0.0:
resolved "https://registry.yarnpkg.com/callsites/-/callsites-4.1.0.tgz#de72b98612eed4e1e2564c952498677faa9d86c2"
integrity sha512-aBMbD1Xxay75ViYezwT40aQONfr+pSXTHwNKvIXhXD6+LY3F1dLIcceoC5OZKBVHbXcysz1hL9D2w0JJIMXpUw==
+camel-case@^4.1.2:
+ version "4.1.2"
+ resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-4.1.2.tgz#9728072a954f805228225a6deea6b38461e1bd5a"
+ integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==
+ dependencies:
+ pascal-case "^3.1.2"
+ tslib "^2.0.3"
+
camelcase@^5.0.0, camelcase@^5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
@@ -2766,6 +2774,25 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:
inherits "^2.0.1"
safe-buffer "^5.0.1"
+clean-css@~5.3.2:
+ version "5.3.3"
+ resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.3.tgz#b330653cd3bd6b75009cc25c714cae7b93351ccd"
+ integrity sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==
+ dependencies:
+ source-map "~0.6.0"
+
+clean-jsdoc-theme@^4.3.0:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/clean-jsdoc-theme/-/clean-jsdoc-theme-4.3.0.tgz#6cd55ff7b25ff6d1719ae0ff9f1cdb5ef07bf640"
+ integrity sha512-QMrBdZ2KdPt6V2Ytg7dIt0/q32U4COpxvR0UDhPjRRKRL0o0MvRCR5YpY37/4rPF1SI1AYEKAWyof7ndCb/dzA==
+ dependencies:
+ "@jsdoc/salty" "^0.2.4"
+ fs-extra "^10.1.0"
+ html-minifier-terser "^7.2.0"
+ klaw-sync "^6.0.0"
+ lodash "^4.17.21"
+ showdown "^2.1.0"
+
clean-stack@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
@@ -2928,7 +2955,7 @@ commander@2.9.0:
dependencies:
graceful-readlink ">= 1.0.0"
-commander@^10.0.1:
+commander@^10.0.0, commander@^10.0.1:
version "10.0.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06"
integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==
@@ -2943,6 +2970,11 @@ commander@^4.0.1:
resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068"
integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==
+commander@^9.0.0:
+ version "9.5.0"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30"
+ integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==
+
commander@~2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.1.0.tgz#d121bbae860d9992a3d517ba96f56588e47c6781"
@@ -3373,6 +3405,14 @@ domain-browser@^4.22.0:
resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-4.23.0.tgz#427ebb91efcb070f05cffdfb8a4e9a6c25f8c94b"
integrity sha512-ArzcM/II1wCCujdCNyQjXrAFwS4mrLh4C7DZWlaI8mdh7h3BfKdNd3bKXITfl2PT9FtfQqaGvhi1vPRQPimjGA==
+dot-case@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751"
+ integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==
+ dependencies:
+ no-case "^3.0.4"
+ tslib "^2.0.3"
+
dotenv@^16.4.5:
version "16.4.5"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f"
@@ -4150,6 +4190,15 @@ fromentries@^1.2.0:
resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.3.2.tgz#e4bca6808816bf8f93b52750f1127f5a6fd86e3a"
integrity sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==
+fs-extra@^10.1.0:
+ version "10.1.0"
+ resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf"
+ integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==
+ dependencies:
+ graceful-fs "^4.2.0"
+ jsonfile "^6.0.1"
+ universalify "^2.0.0"
+
fs-extra@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0"
@@ -4376,7 +4425,7 @@ gopd@^1.0.1:
dependencies:
get-intrinsic "^1.1.3"
-graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9:
+graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9:
version "4.2.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
@@ -4524,6 +4573,19 @@ html-escaper@^2.0.0:
resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453"
integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==
+html-minifier-terser@^7.2.0:
+ version "7.2.0"
+ resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-7.2.0.tgz#18752e23a2f0ed4b0f550f217bb41693e975b942"
+ integrity sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==
+ dependencies:
+ camel-case "^4.1.2"
+ clean-css "~5.3.2"
+ commander "^10.0.0"
+ entities "^4.4.0"
+ param-case "^3.0.4"
+ relateurl "^0.2.7"
+ terser "^5.15.1"
+
http-errors@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3"
@@ -5195,6 +5257,15 @@ jsonfile@^4.0.0:
optionalDependencies:
graceful-fs "^4.1.6"
+jsonfile@^6.0.1:
+ version "6.1.0"
+ resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"
+ integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==
+ dependencies:
+ universalify "^2.0.0"
+ optionalDependencies:
+ graceful-fs "^4.1.6"
+
jsonpath-plus@^7.2.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/jsonpath-plus/-/jsonpath-plus-7.2.0.tgz#7ad94e147b3ed42f7939c315d2b9ce490c5a3899"
@@ -5310,6 +5381,13 @@ kind-of@^6.0.2:
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd"
integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==
+klaw-sync@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c"
+ integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==
+ dependencies:
+ graceful-fs "^4.1.11"
+
klaw@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/klaw/-/klaw-3.0.0.tgz#b11bec9cf2492f06756d6e809ab73a2910259146"
@@ -5483,6 +5561,13 @@ loupe@^2.3.6:
dependencies:
get-func-name "^2.0.1"
+lower-case@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28"
+ integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==
+ dependencies:
+ tslib "^2.0.3"
+
lru-cache@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
@@ -5837,6 +5922,14 @@ nise@^5.1.9:
just-extend "^6.2.0"
path-to-regexp "^6.2.1"
+no-case@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d"
+ integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==
+ dependencies:
+ lower-case "^2.0.2"
+ tslib "^2.0.3"
+
node-emoji@^2.1.3:
version "2.1.3"
resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-2.1.3.tgz#93cfabb5cc7c3653aa52f29d6ffb7927d8047c06"
@@ -6222,6 +6315,14 @@ pako@~1.0.5:
resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf"
integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==
+param-case@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5"
+ integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==
+ dependencies:
+ dot-case "^3.0.4"
+ tslib "^2.0.3"
+
parent-module@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2"
@@ -6268,6 +6369,14 @@ parseurl@~1.3.3:
resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
+pascal-case@^3.1.2:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb"
+ integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==
+ dependencies:
+ no-case "^3.0.4"
+ tslib "^2.0.3"
+
path-browserify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd"
@@ -6657,6 +6766,11 @@ regjsparser@^0.9.1:
dependencies:
jsesc "~0.5.0"
+relateurl@^0.2.7:
+ version "0.2.7"
+ resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9"
+ integrity sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==
+
release-zalgo@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/release-zalgo/-/release-zalgo-1.0.0.tgz#09700b7e5074329739330e535c5a90fb67851730"
@@ -6941,6 +7055,13 @@ shebang-regex@^3.0.0:
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
+showdown@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/showdown/-/showdown-2.1.0.tgz#1251f5ed8f773f0c0c7bfc8e6fd23581f9e545c5"
+ integrity sha512-/6NVYu4U819R2pUIk79n67SYgJHWCce0a5xTP979WbNp0FL9MN1I1QK662IDU1b6JzKTvmhgI7T7JYIxBi3kMQ==
+ dependencies:
+ commander "^9.0.0"
+
side-channel@^1.0.4, side-channel@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2"
@@ -7065,7 +7186,7 @@ source-map-support@^0.5.16, source-map-support@~0.5.20:
buffer-from "^1.0.0"
source-map "^0.6.0"
-source-map@^0.6.0, source-map@^0.6.1:
+source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
@@ -7438,7 +7559,7 @@ terser-webpack-plugin@^5.3.10:
serialize-javascript "^6.0.1"
terser "^5.26.0"
-terser@^5.26.0:
+terser@^5.15.1, terser@^5.26.0:
version "5.31.0"
resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.0.tgz#06eef86f17007dbad4593f11a574c7f5eb02c6a1"
integrity sha512-Q1JFAoUKE5IMfI4Z/lkE/E6+SwgzO+x4tq4v1AyBLRj8VSYvRO6A/rQrPg1yud4g0En9EKI1TvFRF2tQFcoUkg==
@@ -7562,7 +7683,7 @@ tsconfig-paths@^3.15.0:
minimist "^1.2.6"
strip-bom "^3.0.0"
-tslib@^2.6.2:
+tslib@^2.0.3, tslib@^2.6.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"
integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==
@@ -7715,12 +7836,12 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78"
integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==
-"typescript-5.3@npm:typescript@~5.3.0-0", typescript@5.3.3:
+"typescript-5.3@npm:typescript@~5.3.0-0":
version "5.3.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37"
integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==
-"typescript-5.4@npm:typescript@~5.4.0-0", typescript@^5.4.3:
+"typescript-5.4@npm:typescript@~5.4.0-0":
version "5.4.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611"
integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==
@@ -7730,6 +7851,16 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.0-dev.20240507.tgz#6374b9116c656f4d7bb5b28905f236a37ab68d10"
integrity sha512-5LtqwNqq8gx+AD5pTThWksRzORSFBNdUGmndlPmQ/fa34MY/1vsE5A/sFM6JD29X8uFiATeIJQepsO+l+tRJ0A==
+typescript@5.3.3:
+ version "5.3.3"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37"
+ integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==
+
+typescript@^5.4.3:
+ version "5.4.5"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611"
+ integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==
+
ua-parser-js@^0.7.30:
version "0.7.37"
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.37.tgz#e464e66dac2d33a7a1251d7d7a99d6157ec27832"
@@ -7793,6 +7924,11 @@ universalify@^0.1.0:
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
+universalify@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d"
+ integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==
+
unpipe@1.0.0, unpipe@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
From 334731aef0d574747d48ddfdd6c32ec1ebfa0296 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 10:23:02 -0500
Subject: [PATCH 31/60] rename SorobanRpc to rpc in JSDoc comments
---
src/rpc/index.ts | 2 ++
src/rpc/parsers.ts | 10 +++++-----
src/rpc/server.ts | 6 +++---
src/rpc/transaction.ts | 8 ++++----
4 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/src/rpc/index.ts b/src/rpc/index.ts
index 99ee2ba2a..a209f02d0 100644
--- a/src/rpc/index.ts
+++ b/src/rpc/index.ts
@@ -1,3 +1,5 @@
+/** @module rpc */
+
// tslint:disable-next-line: no-reference
///
diff --git a/src/rpc/parsers.ts b/src/rpc/parsers.ts
index 5ccdfeacf..e0d9beba6 100644
--- a/src/rpc/parsers.ts
+++ b/src/rpc/parsers.ts
@@ -3,7 +3,7 @@ import { Api } from './api';
/**
* Parse the response from invoking the `submitTransaction` method of a Soroban RPC server.
- * @memberof module:SorobanRpc
+ * @memberof module:rpc
*
* @param {Api.RawSendTransactionResponse} raw the raw `submitTransaction` response from the Soroban RPC server to parse
* @returns {Api.SendTransactionResponse} transaction response parsed from the Soroban RPC server's response
@@ -35,7 +35,7 @@ export function parseRawSendTransaction(
/**
* Parse and return the retrieved events, if any, from a raw response from a Soroban RPC server.
- * @memberof module:SorobanRpc
+ * @memberof module:rpc
*
* @param {Api.RawGetEventsResponse} raw the raw `getEvents` response from the Soroban RPC server to parse
* @returns {Api.GetEventsResponse} events parsed from the Soroban RPC server's response
@@ -62,7 +62,7 @@ export function parseRawEvents(
/**
* Parse and return the retrieved ledger entries, if any, from a raw response from a Soroban RPC server.
- * @memberof module:SorobanRpc
+ * @memberof module:rpc
*
* @param {Api.RawGetLedgerEntriesResponse} raw he raw `getLedgerEntries` response from the Soroban RPC server to parse
* @returns {Api.GetLedgerEntriesResponse} ledger entries parsed from the Soroban RPC server's response
@@ -94,7 +94,7 @@ export function parseRawLedgerEntries(
/**
* Converts a raw response schema into one with parsed XDR fields and a simplified interface.
* @warning This API is only exported for testing purposes and should not be relied on or considered "stable".
- * @memberof module:SorobanRpc
+ * @memberof module:rpc
*
* @param {Api.SimulateTransactionResponse | Api.RawSimulateTransactionResponse} sim the raw response schema (parsed ones are allowed, best-effort
* detected, and returned untouched)
@@ -133,7 +133,7 @@ export function parseRawSimulation(
/**
* Parse whether or not the transaction simulation was successful, returning the relevant response.
- * @memberof module:SorobanRpc
+ * @memberof module:rpc
* @private
*
* @param {Api.RawSimulateTransactionResponse} sim a raw response from the `simulateTransaction` method of the Soroban RPC server to parse
diff --git a/src/rpc/server.ts b/src/rpc/server.ts
index d490d7684..ef12fd84b 100644
--- a/src/rpc/server.ts
+++ b/src/rpc/server.ts
@@ -26,14 +26,14 @@ import {
/**
* Default transaction submission timeout for RPC requests (60 seconds)
* @constant {number}
- * @memberof module:SorobanRpc.Server
+ * @memberof module:rpc.Server
*/
export const SUBMIT_TRANSACTION_TIMEOUT = 60 * 1000;
/**
* Specifies the durability namespace of contract-related ledger entries.
* @enum {('temporary' | 'persistent')}
- * @memberof module:SorobanRpc
+ * @memberof module:rpc
*
* @see {@link https://developers.stellar.org/docs/learn/smart-contract-internals/state-archival|State Archival docs}
* @see {@link https://docs.rs/soroban-sdk/latest/soroban_sdk/storage/struct.Storage.html|Rust SDK Storage docs}
@@ -69,7 +69,7 @@ export namespace Server {
* interface for requests to that instance.
*
* @constructor
- * @memberof module:SorobanRpc
+ * @memberof module:rpc
*
* @param {string} serverURL Soroban-RPC Server URL (ex.
* `http://localhost:8000/soroban/rpc`).
diff --git a/src/rpc/transaction.ts b/src/rpc/transaction.ts
index 48a54ff05..f6e24c269 100644
--- a/src/rpc/transaction.ts
+++ b/src/rpc/transaction.ts
@@ -16,12 +16,12 @@ import { parseRawSimulation } from './parsers';
* entries are ignored**.
*
* @param {Transaction|FeeBumpTransaction} raw the initial transaction, w/o simulation applied
- * @param {Api.SimulateTransactionResponse|Api.RawSimulateTransactionResponse} simulation the Soroban RPC simulation result (see {@link SorobanRpc.Server#simulateTransaction})
+ * @param {Api.SimulateTransactionResponse|Api.RawSimulateTransactionResponse} simulation the Soroban RPC simulation result (see {@link rpc.Server#simulateTransaction})
* @returns {TransactionBuilder} a new, cloned transaction with the proper auth and resource (fee, footprint) simulation data applied
*
- * @memberof module:SorobanRpc
- * @see {@link SorobanRpc.Server#simulateTransaction}
- * @see {@link SorobanRpc.Server#prepareTransaction}
+ * @memberof module:rpc
+ * @see {@link rpc.Server#simulateTransaction}
+ * @see {@link rpc.Server#prepareTransaction}
*/
export function assembleTransaction(
raw: Transaction | FeeBumpTransaction,
From d95209f14405b8b116dfa305c8e776d7bee9179b Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 12:39:35 -0500
Subject: [PATCH 32/60] make contract a JSDoc module
---
src/contract/assembled_transaction.ts | 14 +++++---
src/contract/basic_node_signer.ts | 9 +++--
src/contract/client.ts | 48 +++++++++++++++------------
src/contract/sent_transaction.ts | 16 +++++++--
src/contract/spec.ts | 9 ++---
src/contract/utils.ts | 4 +--
6 files changed, 61 insertions(+), 39 deletions(-)
diff --git a/src/contract/assembled_transaction.ts b/src/contract/assembled_transaction.ts
index 40cff97a8..8a2ab0f02 100644
--- a/src/contract/assembled_transaction.ts
+++ b/src/contract/assembled_transaction.ts
@@ -29,10 +29,12 @@ import {
} from "./utils";
import { SentTransaction } from "./sent_transaction";
+/** @module contract */
+
/**
* An impossible account on the Stellar network
* @constant {string}
- * @memberof ContractClient
+ * @memberof module:contract
*/
export const NULL_ACCOUNT =
"GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF";
@@ -52,7 +54,7 @@ export const NULL_ACCOUNT =
* Let's look at examples of how to use `AssembledTransaction` for a variety of
* use-cases:
*
- * # 1. Simple read call
+ * #### 1. Simple read call
*
* Since these only require simulation, you can get the `result` of the call
* right after constructing your `AssembledTransaction`:
@@ -85,7 +87,7 @@ export const NULL_ACCOUNT =
* })
* ```
*
- * # 2. Simple write call
+ * #### 2. Simple write call
*
* For write calls that will be simulated and then sent to the network without
* further manipulation, only one more step is needed:
@@ -119,7 +121,7 @@ export const NULL_ACCOUNT =
* const { result } = await tx.signAndSend()
* ```
*
- * # 3. More fine-grained control over transaction construction
+ * #### 3. More fine-grained control over transaction construction
*
* If you need more control over the transaction before simulating it, you can
* set various {@link MethodOptions} when constructing your
@@ -152,7 +154,7 @@ export const NULL_ACCOUNT =
* If you need to inspect the simulation later, you can access it with
* `tx.simulation`.
*
- * # 4. Multi-auth workflows
+ * #### 4. Multi-auth workflows
*
* Soroban, and Stellar in general, allows multiple parties to sign a
* transaction.
@@ -239,6 +241,8 @@ export const NULL_ACCOUNT =
* To see an even more complicated example, where Alice swaps with Bob but the
* transaction is invoked by yet another party, check out
* [test-swap.js](../../test/e2e/src/test-swap.js).
+ *
+ * @memberof module:contract
*/
export class AssembledTransaction {
/**
diff --git a/src/contract/basic_node_signer.ts b/src/contract/basic_node_signer.ts
index 9e50327cd..0f18ad05b 100644
--- a/src/contract/basic_node_signer.ts
+++ b/src/contract/basic_node_signer.ts
@@ -3,16 +3,19 @@ import type { AssembledTransaction } from "./assembled_transaction";
import type { Client } from "./client";
/**
- * For use with {@link Client} and {@link AssembledTransaction}.
+ * For use with {@link Client} and {@link module:contract.AssembledTransaction}.
* Implements `signTransaction` and `signAuthEntry` with signatures expected by
* those classes. This is useful for testing and maybe some simple Node
* applications. Feel free to use this as a starting point for your own
* Wallet/TransactionSigner implementation.
+ *
+ * @memberof module:contract
+ *
+ * @param {Keypair} keypair {@link Keypair} to use to sign the transaction or auth entry
+ * @param {string} networkPassphrase passphrase of network to sign for
*/
export const basicNodeSigner = (
- /** {@link Keypair} to use to sign the transaction or auth entry */
keypair: Keypair,
- /** passphrase of network to sign for */
networkPassphrase: string,
) => ({
// eslint-disable-next-line require-await
diff --git a/src/contract/client.ts b/src/contract/client.ts
index e0c298b4a..a96fb9b0a 100644
--- a/src/contract/client.ts
+++ b/src/contract/client.ts
@@ -5,19 +5,23 @@ import { AssembledTransaction } from "./assembled_transaction";
import type { ClientOptions, MethodOptions } from "./types";
import { processSpecEntryStream } from './utils';
+/**
+ * Generate a class from the contract spec that where each contract method
+ * gets included with an identical name.
+ *
+ * Each method returns an {@link AssembledTransaction} that can be used to
+ * modify, simulate, decode results, and possibly sign, & submit the
+ * transaction.
+ *
+ * @memberof module:contract
+ *
+ * @constructor
+ * @param {module:contract.Spec} spec {@link Spec} to construct a Client for
+ * @param {ClientOptions} options see {@link ClientOptions}
+ */
export class Client {
- /**
- * Generate a class from the contract spec that where each contract method
- * gets included with an identical name.
- *
- * Each method returns an {@link AssembledTransaction} that can be used to
- * modify, simulate, decode results, and possibly sign, & submit the
- * transaction.
- */
constructor(
- /** {@link Spec} to construct a Client for */
public readonly spec: Spec,
- /** see {@link ClientOptions} */
public readonly options: ClientOptions,
) {
this.spec.funcs().forEach((xdrFn) => {
@@ -53,11 +57,11 @@ export class Client {
/**
* Generates a Client instance from the provided ClientOptions and the contract's wasm hash.
* The wasmHash can be provided in either hex or base64 format.
- *
- * @param wasmHash The hash of the contract's wasm binary, in either hex or base64 format.
- * @param options The ClientOptions object containing the necessary configuration, including the rpcUrl.
- * @param format The format of the provided wasmHash, either "hex" or "base64". Defaults to "hex".
- * @returns A Promise that resolves to a Client instance.
+ *
+ * @param {Buffer | string} wasmHash The hash of the contract's wasm binary, in either hex or base64 format.
+ * @param {ClientOptions} options The ClientOptions object containing the necessary configuration, including the rpcUrl.
+ * @param {('hex' | 'base64')} [format='hex'] The format of the provided wasmHash, either "hex" or "base64". Defaults to "hex".
+ * @returns {Promise} A Promise that resolves to a Client instance.
* @throws {TypeError} If the provided options object does not contain an rpcUrl.
*/
static async fromWasmHash(wasmHash: Buffer | string,
@@ -76,10 +80,10 @@ export class Client {
/**
* Generates a Client instance from the provided ClientOptions and the contract's wasm binary.
- *
- * @param wasm The contract's wasm binary as a Buffer.
- * @param options The ClientOptions object containing the necessary configuration.
- * @returns A Promise that resolves to a Client instance.
+ *
+ * @param {Buffer} wasm The contract's wasm binary as a Buffer.
+ * @param {ClientOptions} options The ClientOptions object containing the necessary configuration.
+ * @returns {Promise} A Promise that resolves to a Client instance.
* @throws {Error} If the contract spec cannot be obtained from the provided wasm binary.
*/
static async fromWasm(wasm: Buffer, options: ClientOptions): Promise {
@@ -96,9 +100,9 @@ export class Client {
/**
* Generates a Client instance from the provided ClientOptions, which must include the contractId and rpcUrl.
- *
- * @param options The ClientOptions object containing the necessary configuration, including the contractId and rpcUrl.
- * @returns A Promise that resolves to a Client instance.
+ *
+ * @param {ClientOptions} options The ClientOptions object containing the necessary configuration, including the contractId and rpcUrl.
+ * @returns {Promise} A Promise that resolves to a Client instance.
* @throws {TypeError} If the provided options object does not contain both rpcUrl and contractId.
*/
static async from(options: ClientOptions): Promise {
diff --git a/src/contract/sent_transaction.ts b/src/contract/sent_transaction.ts
index c17a14575..e33af5dd1 100644
--- a/src/contract/sent_transaction.ts
+++ b/src/contract/sent_transaction.ts
@@ -21,7 +21,11 @@ import type { AssembledTransaction } from "./assembled_transaction";
* `getTransactionResponseAll` and the most recent attempt in
* `getTransactionResponse`.
*
- * @memberof ContractClient
+ * @memberof module:contract
+ * @constructor
+ *
+ * @param {function} signTransaction More info in {@link MethodOptions}
+ * @param {module:contract.AssembledTransaction} assembled {@link AssembledTransaction} from which this SentTransaction was initialized
*/
export class SentTransaction {
public server: Server;
@@ -63,6 +67,10 @@ export class SentTransaction {
"You must provide a `signTransaction` function to send a transaction",
);
}
+ /**
+ * An RPC server that will be used to send this transaction to the network.
+ * @type {module:rpc.Server}
+ */
this.server = new Server(this.assembled.options.rpcUrl, {
allowHttp: this.assembled.options.allowHttp ?? false,
});
@@ -74,9 +82,7 @@ export class SentTransaction {
* network.
*/
static init = async (
- /** More info in {@link MethodOptions} */
signTransaction: ClientOptions["signTransaction"],
- /** {@link AssembledTransaction} from which this SentTransaction was initialized */
assembled: AssembledTransaction,
): Promise> => {
const tx = new SentTransaction(signTransaction, assembled);
@@ -105,6 +111,10 @@ export class SentTransaction {
},
);
+ /**
+ * The transaction, signed by the necessary keypair(s), ready for submission to the network.
+ * @type {Types.Tx}
+ */
this.signed = TransactionBuilder.fromXDR(
signature,
this.assembled.options.networkPassphrase,
diff --git a/src/contract/spec.ts b/src/contract/spec.ts
index 3144673cf..c8304484c 100644
--- a/src/contract/spec.ts
+++ b/src/contract/spec.ts
@@ -27,6 +27,11 @@ function readObj(args: object, input: xdr.ScSpecFunctionInputV0): any {
* Provides a ContractSpec class which can contains the XDR types defined by the contract.
* This allows the class to be used to convert between native and raw `xdr.ScVal`s.
*
+ * @memberof module:contract
+ * @constructor
+ * @param {xdr.ScSpecEntry[] | string[]} entries the XDR spec entries
+ * @throws {Error} if entries is invalid
+ *
* @example
* const specEntries = [...]; // XDR spec entries of a smart contract
* const contractSpec = new ContractSpec(specEntries);
@@ -51,10 +56,6 @@ export class Spec {
/**
* Constructs a new ContractSpec from an array of XDR spec entries.
- *
- * @param {xdr.ScSpecEntry[] | string[]} entries the XDR spec entries
- *
- * @throws {Error} if entries is invalid
*/
constructor(entries: xdr.ScSpecEntry[] | string[]) {
if (entries.length == 0) {
diff --git a/src/contract/utils.ts b/src/contract/utils.ts
index 055bfbe95..61e5beb23 100644
--- a/src/contract/utils.ts
+++ b/src/contract/utils.ts
@@ -4,7 +4,7 @@ import type { AssembledTransaction } from "./assembled_transaction";
/**
* The default timeout for waiting for a transaction to be included in a block.
* @constant {number}
- * @memberof ContractClient
+ * @memberof module:contract.Client
*/
export const DEFAULT_TIMEOUT = 5 * 60;
@@ -86,7 +86,7 @@ export async function withExponentialBackoff(
* {@link AssembledTransaction} parse these errors.
*
* @constant {RegExp}
- * @memberof ContractClient
+ * @memberof module:contract.Client
*/
export const contractErrorPattern = /Error\(Contract, #(\d+)\)/;
From 937b7b131a09c22f0b2f1fbcd7f3f7c4cf70671a Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 12:44:28 -0500
Subject: [PATCH 33/60] mark contract export as private in JSDoc
There was a weird `_default` global that came up from this. Not
sure why, but this seems to have done the trick without anything
weird going on after.
---
src/index.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/index.ts b/src/index.ts
index 83dfde51f..0d92c2263 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -42,6 +42,7 @@ export * as SorobanRpc from './rpc';
* ```ts
* import { Client } from '@stellar/stellar-sdk/contract';
* ```
+ * @private
*/
export * as contract from './contract'
From a0e21ff33dffd5aeb544c59b11970ccbc2e52494 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 12:47:38 -0500
Subject: [PATCH 34/60] mark postObject as private in JSDoc
it doesn't look like it's accessible anywhere for an SDK user, so
let's hide it from the generated docs
---
src/rpc/jsonrpc.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/rpc/jsonrpc.ts b/src/rpc/jsonrpc.ts
index 3fe34fd21..1c53119d3 100644
--- a/src/rpc/jsonrpc.ts
+++ b/src/rpc/jsonrpc.ts
@@ -33,6 +33,7 @@ export interface Error {
* @param {string} method RPC method name that should be called
* @param {(any | null)} [param=null] params that should be supplied to the method
* @returns {Promise}
+ * @private
*/
export async function postObject(
url: string,
From b684b806db8cd5a09b554643bd2fb6f380ec347a Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 12:51:10 -0500
Subject: [PATCH 35/60] mark contract/utils functions as private in JSDoc
---
src/contract/utils.ts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/contract/utils.ts b/src/contract/utils.ts
index 61e5beb23..9a9e4c071 100644
--- a/src/contract/utils.ts
+++ b/src/contract/utils.ts
@@ -11,6 +11,7 @@ export const DEFAULT_TIMEOUT = 5 * 60;
/**
* Keep calling a `fn` for `timeoutInSeconds` seconds, if `keepWaitingIf` is
* true. Returns an array of all attempts to call the function.
+ * @private
*/
export async function withExponentialBackoff(
/** Function to call repeatedly */
@@ -92,6 +93,7 @@ export const contractErrorPattern = /Error\(Contract, #(\d+)\)/;
/**
* A TypeScript type guard that checks if an object has a `toString` method.
+ * @private
*/
export function implementsToString(
/** some object that may or may not have a `toString` method */
@@ -102,6 +104,7 @@ export function implementsToString(
/**
* Reads a binary stream of ScSpecEntries into an array for processing by ContractSpec
+ * @private
*/
export function processSpecEntryStream(buffer: Buffer) {
const reader = new cereal.XdrReader(buffer);
From 01957086db804ba4308020b8ffc3fe493151d381 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 14:17:13 -0500
Subject: [PATCH 36/60] remove unused import to fix tests (i think?)
---
src/contract/basic_node_signer.ts | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/contract/basic_node_signer.ts b/src/contract/basic_node_signer.ts
index 0f18ad05b..bcd372a7e 100644
--- a/src/contract/basic_node_signer.ts
+++ b/src/contract/basic_node_signer.ts
@@ -1,5 +1,4 @@
import { Keypair, TransactionBuilder, hash } from "@stellar/stellar-base";
-import type { AssembledTransaction } from "./assembled_transaction";
import type { Client } from "./client";
/**
From 422c3a2b3f1c3ef97c4455c0e13aa8a84fa1e213 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 16:00:30 -0500
Subject: [PATCH 37/60] add some default values to JSDoc constants
---
src/contract/assembled_transaction.ts | 1 +
src/contract/utils.ts | 4 +++-
src/federation/server.ts | 1 +
src/horizon/horizon_axios_client.ts | 1 +
src/horizon/server.ts | 5 +++--
src/rpc/server.ts | 3 ++-
src/webauth/errors.ts | 8 ++++++--
7 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/src/contract/assembled_transaction.ts b/src/contract/assembled_transaction.ts
index 8a2ab0f02..b3158a164 100644
--- a/src/contract/assembled_transaction.ts
+++ b/src/contract/assembled_transaction.ts
@@ -34,6 +34,7 @@ import { SentTransaction } from "./sent_transaction";
/**
* An impossible account on the Stellar network
* @constant {string}
+ * @default GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF
* @memberof module:contract
*/
export const NULL_ACCOUNT =
diff --git a/src/contract/utils.ts b/src/contract/utils.ts
index 9a9e4c071..b9aec797a 100644
--- a/src/contract/utils.ts
+++ b/src/contract/utils.ts
@@ -2,8 +2,9 @@ import { xdr, cereal } from "@stellar/stellar-base";
import type { AssembledTransaction } from "./assembled_transaction";
/**
- * The default timeout for waiting for a transaction to be included in a block.
+ * The default timebounds, in seconds, during which a transaction will be valid.
* @constant {number}
+ * @default 300
* @memberof module:contract.Client
*/
export const DEFAULT_TIMEOUT = 5 * 60;
@@ -87,6 +88,7 @@ export async function withExponentialBackoff(
* {@link AssembledTransaction} parse these errors.
*
* @constant {RegExp}
+ * @default "/Error\(Contract, #(\d+)\)/"
* @memberof module:contract.Client
*/
export const contractErrorPattern = /Error\(Contract, #(\d+)\)/;
diff --git a/src/federation/server.ts b/src/federation/server.ts
index 60abdf5a0..0e9f52d11 100644
--- a/src/federation/server.ts
+++ b/src/federation/server.ts
@@ -13,6 +13,7 @@ import { Api } from "./api";
/**
* The maximum size of response from a federation server
* @constant {number}
+ * @default 102400
*/
export const FEDERATION_RESPONSE_MAX_SIZE = 100 * 1024;
diff --git a/src/horizon/horizon_axios_client.ts b/src/horizon/horizon_axios_client.ts
index 15a79bcec..73faca8d3 100644
--- a/src/horizon/horizon_axios_client.ts
+++ b/src/horizon/horizon_axios_client.ts
@@ -23,6 +23,7 @@ export interface ServerTime {
* }
*
* @constant {Record.}
+ * @default {}
* @memberof module:Horizon
*/
export const SERVER_TIME_MAP: Record = {};
diff --git a/src/horizon/server.ts b/src/horizon/server.ts
index 58b113c24..4ce59451a 100644
--- a/src/horizon/server.ts
+++ b/src/horizon/server.ts
@@ -43,9 +43,10 @@ import AxiosClient, {
} from "./horizon_axios_client";
/**
- * Default transaction submission timeout for Horizon requests (60 seconds)
+ * Default transaction submission timeout for Horizon requests, in milliseconds
* @constant {number}
- * @memberof module:Horizon~Server
+ * @default 60000
+ * @memberof module:Horizon.Server
*/
export const SUBMIT_TRANSACTION_TIMEOUT = 60 * 1000;
diff --git a/src/rpc/server.ts b/src/rpc/server.ts
index ef12fd84b..faa249514 100644
--- a/src/rpc/server.ts
+++ b/src/rpc/server.ts
@@ -24,8 +24,9 @@ import {
} from './parsers';
/**
- * Default transaction submission timeout for RPC requests (60 seconds)
+ * Default transaction submission timeout for RPC requests, in milliseconds
* @constant {number}
+ * @default 60000
* @memberof module:rpc.Server
*/
export const SUBMIT_TRANSACTION_TIMEOUT = 60 * 1000;
diff --git a/src/webauth/errors.ts b/src/webauth/errors.ts
index 5ba7bca43..653c13eb3 100644
--- a/src/webauth/errors.ts
+++ b/src/webauth/errors.ts
@@ -1,7 +1,11 @@
-
+/** @memberof module:WebAuth */
export class InvalidChallengeError extends Error {
public __proto__: InvalidChallengeError;
+ /**
+ * Create an InvalidChallengeError
+ * @param {string} message error message
+ */
constructor(message: string) {
const trueProto = new.target.prototype;
super(message);
@@ -9,4 +13,4 @@ export class InvalidChallengeError extends Error {
this.constructor = InvalidChallengeError;
this.name = "InvalidChallengeError";
}
- }
\ No newline at end of file
+ }
From b0b93bbd94a4628079d9aacb67ce82c02aaea812 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 16:15:04 -0500
Subject: [PATCH 38/60] fix error message type
---
src/errors.ts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/errors.ts b/src/errors.ts
index b84f72162..82894b138 100644
--- a/src/errors.ts
+++ b/src/errors.ts
@@ -83,9 +83,9 @@ export class AccountRequiresMemoError extends Error {
/**
* Create an AccountRequiresMemoError
- * @param {message} message - error message
- * @param {string} accountId - The account which requires a memo.
- * @param {number} operationIndex - The index of the operation where `accountId` is the destination.
+ * @param {string} message error message
+ * @param {string} accountId The account which requires a memo.
+ * @param {number} operationIndex The index of the operation where `accountId` is the destination.
*/
constructor(message: string, accountId: string, operationIndex: number) {
const trueProto = new.target.prototype;
From 403d165f97a1f85503442c39bb61949b9675057d Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 17:06:00 -0500
Subject: [PATCH 39/60] break the errors classes into multiple files for JSDoc
rendering
---
src/errors.ts | 99 -----------------------------
src/errors/account_requires_memo.ts | 37 +++++++++++
src/errors/bad_request.ts | 22 +++++++
src/errors/bad_response.ts | 24 +++++++
src/errors/index.ts | 5 ++
src/errors/network.ts | 46 ++++++++++++++
src/errors/not_found.ts | 22 +++++++
7 files changed, 156 insertions(+), 99 deletions(-)
delete mode 100644 src/errors.ts
create mode 100644 src/errors/account_requires_memo.ts
create mode 100644 src/errors/bad_request.ts
create mode 100644 src/errors/bad_response.ts
create mode 100644 src/errors/index.ts
create mode 100644 src/errors/network.ts
create mode 100644 src/errors/not_found.ts
diff --git a/src/errors.ts b/src/errors.ts
deleted file mode 100644
index 82894b138..000000000
--- a/src/errors.ts
+++ /dev/null
@@ -1,99 +0,0 @@
-import { HorizonApi } from "./horizon/horizon_api";
-
-// For ES5 compatibility (https://stackoverflow.com/a/55066280).
-/* tslint:disable:variable-name max-classes-per-file */
-
-export class NetworkError extends Error {
- public response: {
- data?: HorizonApi.ErrorResponseData;
- status?: number;
- statusText?: string;
- url?: string;
- };
- public __proto__: NetworkError;
-
- constructor(message: string, response: any) {
- const trueProto = new.target.prototype;
- super(message);
- this.__proto__ = trueProto;
- this.constructor = NetworkError;
- this.response = response;
- }
-
- public getResponse() {
- return this.response;
- }
-}
-
-export class NotFoundError extends NetworkError {
- constructor(message: string, response: any) {
- const trueProto = new.target.prototype;
- super(message, response);
- this.__proto__ = trueProto;
- this.constructor = NotFoundError;
- this.name = "NotFoundError";
- }
-}
-
-export class BadRequestError extends NetworkError {
- constructor(message: string, response: any) {
- const trueProto = new.target.prototype;
- super(message, response);
- this.__proto__ = trueProto;
- this.constructor = BadRequestError;
- this.name = "BadRequestError";
- }
-}
-
-export class BadResponseError extends NetworkError {
- constructor(message: string, response: any) {
- const trueProto = new.target.prototype;
- super(message, response);
- this.__proto__ = trueProto;
- this.constructor = BadResponseError;
- this.name = "BadResponseError";
- }
-}
-
-/**
- * AccountRequiresMemoError is raised when a transaction is trying to submit an
- * operation to an account which requires a memo. See
- * [SEP0029](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0029.md)
- * for more information.
- *
- * This error contains two attributes to help you identify the account requiring
- * the memo and the operation where the account is the destination
- *
- * ```
- * console.log('The following account requires a memo ', err.accountId)
- * console.log('The account is used in operation: ', err.operationIndex)
- * ```
- *
- */
-export class AccountRequiresMemoError extends Error {
- public __proto__: AccountRequiresMemoError;
- /**
- * accountId account which requires a memo.
- */
- public accountId: string;
- /**
- * operationIndex operation where accountId is the destination.
- */
- public operationIndex: number;
-
- /**
- * Create an AccountRequiresMemoError
- * @param {string} message error message
- * @param {string} accountId The account which requires a memo.
- * @param {number} operationIndex The index of the operation where `accountId` is the destination.
- */
- constructor(message: string, accountId: string, operationIndex: number) {
- const trueProto = new.target.prototype;
- super(message);
- this.__proto__ = trueProto;
- this.constructor = AccountRequiresMemoError;
- this.name = "AccountRequiresMemoError";
- this.accountId = accountId;
- this.operationIndex = operationIndex;
- }
-}
diff --git a/src/errors/account_requires_memo.ts b/src/errors/account_requires_memo.ts
new file mode 100644
index 000000000..2b493f4da
--- /dev/null
+++ b/src/errors/account_requires_memo.ts
@@ -0,0 +1,37 @@
+/**
+ * AccountRequiresMemoError is raised when a transaction is trying to submit an
+ * operation to an account which requires a memo. See
+ * [SEP0029](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0029.md)
+ * for more information.
+ *
+ * This error contains two attributes to help you identify the account requiring
+ * the memo and the operation where the account is the destination
+ *
+ * @example
+ * console.log('The following account requires a memo ', err.accountId)
+ * console.log('The account is used in operation: ', err.operationIndex)
+ *
+ */
+export class AccountRequiresMemoError extends Error {
+ public __proto__: AccountRequiresMemoError;
+ public accountId: string;
+ public operationIndex: number;
+
+ /**
+ * Create an AccountRequiresMemoError
+ * @param {string} message Human-readable error message
+ * @param {string} accountId The account which requires a memo
+ * @param {number} operationIndex The index of the operation where `accountId` is the destination
+ */
+ constructor(message: string, accountId: string, operationIndex: number) {
+ const trueProto = new.target.prototype;
+ super(message);
+ this.__proto__ = trueProto;
+ this.constructor = AccountRequiresMemoError;
+ this.name = "AccountRequiresMemoError";
+ /** @type {string} account which requires a memo. */
+ this.accountId = accountId;
+ /** @type {number} operation where accountId is the destination. */
+ this.operationIndex = operationIndex;
+ }
+}
diff --git a/src/errors/bad_request.ts b/src/errors/bad_request.ts
new file mode 100644
index 000000000..d82ef7cd4
--- /dev/null
+++ b/src/errors/bad_request.ts
@@ -0,0 +1,22 @@
+import { NetworkError } from "./network";
+
+/**
+ * BadRequestError is raised when a request made to Horizon is invalid in some
+ * way (incorrect timebounds for trade call builders, for example.)
+ * @extends NetworkError
+ * @inheritdoc
+ */
+export class BadRequestError extends NetworkError {
+ /**
+ * Create a BadRequestError.
+ * @param {string} message Human-readable error message
+ * @param {any} response Response details, received from the Horizon server
+ */
+ constructor(message: string, response: any) {
+ const trueProto = new.target.prototype;
+ super(message, response);
+ this.__proto__ = trueProto;
+ this.constructor = BadRequestError;
+ this.name = "BadRequestError";
+ }
+}
diff --git a/src/errors/bad_response.ts b/src/errors/bad_response.ts
new file mode 100644
index 000000000..97d0cc68a
--- /dev/null
+++ b/src/errors/bad_response.ts
@@ -0,0 +1,24 @@
+import { NetworkError } from "./network";
+
+/**
+ * BadResponseError is raised when a response from a {@link module:Horizon} or
+ * {@link module:Federation} is invalid in some way. For example, a federation
+ * response may exceed the maximum allowed size, or a transaction submission may
+ * have failed with Horizon.
+ * @extends NetworkError
+ * @inheritdoc
+ */
+export class BadResponseError extends NetworkError {
+ /**
+ * Create a BadResponseError.
+ * @param {string} message Human-readable error message.
+ * @param {any} response Response details, received from the Horizon server.
+ */
+ constructor(message: string, response: any) {
+ const trueProto = new.target.prototype;
+ super(message, response);
+ this.__proto__ = trueProto;
+ this.constructor = BadResponseError;
+ this.name = "BadResponseError";
+ }
+}
diff --git a/src/errors/index.ts b/src/errors/index.ts
new file mode 100644
index 000000000..cb4f19458
--- /dev/null
+++ b/src/errors/index.ts
@@ -0,0 +1,5 @@
+export * from "./network";
+export * from "./not_found";
+export * from "./bad_request";
+export * from "./bad_response";
+export * from "./account_requires_memo";
diff --git a/src/errors/network.ts b/src/errors/network.ts
new file mode 100644
index 000000000..f22114408
--- /dev/null
+++ b/src/errors/network.ts
@@ -0,0 +1,46 @@
+import { HorizonApi } from "../horizon/horizon_api";
+
+// For ES5 compatibility (https://stackoverflow.com/a/55066280).
+
+/**
+ * NetworkError is raised when an interaction with a Horizon server has caused
+ * some kind of problem.
+ */
+export class NetworkError extends Error {
+ public response: {
+ data?: HorizonApi.ErrorResponseData;
+ status?: number;
+ statusText?: string;
+ url?: string;
+ };
+ public __proto__: NetworkError;
+
+ /**
+ * Create a NetworkError.
+ * @param {string} message Human-readable error message
+ * @param {any} response Response details, received from the Horizon server
+ */
+ constructor(message: string, response: any) {
+ const trueProto = new.target.prototype;
+ super(message);
+ this.__proto__ = trueProto;
+ this.constructor = NetworkError;
+ /**
+ * @typedef {Object}
+ * @property {HorizonApi.ErrorResponseData} [data] The data returned by Horizon as part of the error: {@link https://developers.stellar.org/network/horizon/api-reference/errors/response | Error Response}
+ * @property {number} [status] HTTP status code describing the basic issue with a submitted transaction {@link https://developers.stellar.org/network/horizon/api-reference/errors/http-status-codes/standard | Standard Status Codes}
+ * @property {string} [statusText] A human-readable description of what the status code means: {@link https://developers.stellar.org/network/horizon/api-reference/errors/http-status-codes/horizon-specific | Horizon-Specific Status Codes}
+ * @property {string} [url] URL which can provide more information about the problem that occurred.
+ */
+ this.response = response;
+ }
+
+ /**
+ * Get the response object that created this error.
+ * @returns {any}
+ */
+ public getResponse() {
+ return this.response;
+ }
+}
+
diff --git a/src/errors/not_found.ts b/src/errors/not_found.ts
new file mode 100644
index 000000000..040e60edc
--- /dev/null
+++ b/src/errors/not_found.ts
@@ -0,0 +1,22 @@
+import { NetworkError } from "./network";
+
+/**
+ * NotFoundError is raised when the resource requested from Horizon is
+ * unavailable.
+ * @extends NetworkError
+ * @inheritdoc
+ */
+export class NotFoundError extends NetworkError {
+ /**
+ * Create a NotFoundError.
+ * @param {string} message Human-readable error message
+ * @param {any} response Response details, received from the Horizon server
+ */
+ constructor(message: string, response: any) {
+ const trueProto = new.target.prototype;
+ super(message, response);
+ this.__proto__ = trueProto;
+ this.constructor = NotFoundError;
+ this.name = "NotFoundError";
+ }
+}
From 4efede5c4f090f816463d6aae26268ac6ca064b5 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 17:20:57 -0500
Subject: [PATCH 40/60] add JSDoc type definition to friendbot api
because more type definitions are more better, right?
---
src/friendbot/index.ts | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/friendbot/index.ts b/src/friendbot/index.ts
index f7e15a14e..0ea081da6 100644
--- a/src/friendbot/index.ts
+++ b/src/friendbot/index.ts
@@ -1,3 +1,14 @@
+/**
+ * @namespace Api
+ * @memberof module:Friendbot
+ */
+
+/**
+ * @typedef {Object} Response
+ * @memberof module:Friendbot.Api
+ * @property {string} result_meta_xdr The base64-encoded XDR result meta of the transaction that Friendbot submitted to create the account.
+ */
+
export namespace Api {
// Just the fields we are interested in
export interface Response {
From afd392bd5d916ffdc0a57a753d4d5321276471e6 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 17:24:09 -0500
Subject: [PATCH 41/60] add default value to max toml file size in JSDoc
---
src/stellartoml/index.ts | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/stellartoml/index.ts b/src/stellartoml/index.ts
index a98830525..66ffe0376 100644
--- a/src/stellartoml/index.ts
+++ b/src/stellartoml/index.ts
@@ -7,8 +7,9 @@ import { Config } from "../config";
/** @module StellarToml */
/**
- * The maximum size of stellar.toml file (100 KB)
- * @const {number}
+ * The maximum size of stellar.toml file, in bytes
+ * @constant {number}
+ * @default 102400
*/
export const STELLAR_TOML_MAX_SIZE = 100 * 1024;
From 462e5f62b2c40dbbaa4204e1ac18e9d8efe3d34a Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 17 May 2024 17:35:07 -0500
Subject: [PATCH 42/60] try to clarify when timebounds are attached to tx in
JSDoc
---
src/contract/assembled_transaction.ts | 9 +++++----
src/contract/types.ts | 7 ++++---
src/contract/utils.ts | 2 ++
3 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/contract/assembled_transaction.ts b/src/contract/assembled_transaction.ts
index b3158a164..09c07833d 100644
--- a/src/contract/assembled_transaction.ts
+++ b/src/contract/assembled_transaction.ts
@@ -394,10 +394,11 @@ export class AssembledTransaction {
* If you don't want to simulate the transaction, you can set `simulate` to
* `false` in the options.
*
- * const tx = await AssembledTransaction.build({
- * ...,
- * simulate: false,
- * })
+ * @example
+ * const tx = await AssembledTransaction.build({
+ * ...,
+ * simulate: false,
+ * })
*/
static async build(
options: AssembledTransactionOptions,
diff --git a/src/contract/types.ts b/src/contract/types.ts
index 8b92276c2..c41171038 100644
--- a/src/contract/types.ts
+++ b/src/contract/types.ts
@@ -3,7 +3,6 @@
import { BASE_FEE, Memo, MemoType, Operation, Transaction, xdr } from "@stellar/stellar-base";
import type { Client } from "./client";
import type { AssembledTransaction } from "./assembled_transaction";
-import { DEFAULT_TIMEOUT } from "./utils";
export type XDR_BASE64 = string;
export type u32 = number;
@@ -99,8 +98,10 @@ export type MethodOptions = {
fee?: string;
/**
- * The maximum amount of time to wait for the transaction to complete.
- * Default: {@link DEFAULT_TIMEOUT}
+ * The timebounds which should be set for transactions generated by this
+ * contract client.
+ * @see {@link module:contract.Client#DEFAULT_TIMEOUT}
+ * @default module:contract.Client#DEFAULT_TIMEOUT
*/
timeoutInSeconds?: number;
diff --git a/src/contract/utils.ts b/src/contract/utils.ts
index b9aec797a..c25088a90 100644
--- a/src/contract/utils.ts
+++ b/src/contract/utils.ts
@@ -3,6 +3,8 @@ import type { AssembledTransaction } from "./assembled_transaction";
/**
* The default timebounds, in seconds, during which a transaction will be valid.
+ * This is attached to the transaction at the time it is built, which takes
+ * place _before_ transaction simulation, and _before_ transaction signing.
* @constant {number}
* @default 300
* @memberof module:contract.Client
From 5b12f6bbbdb4b919d4c0e6435375422728ea5c2d Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Tue, 21 May 2024 13:32:32 -0700
Subject: [PATCH 43/60] clarify note about when the timebounds are added to
client txs
---
src/contract/utils.ts | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/contract/utils.ts b/src/contract/utils.ts
index c25088a90..cbbbcd05c 100644
--- a/src/contract/utils.ts
+++ b/src/contract/utils.ts
@@ -3,8 +3,9 @@ import type { AssembledTransaction } from "./assembled_transaction";
/**
* The default timebounds, in seconds, during which a transaction will be valid.
- * This is attached to the transaction at the time it is built, which takes
- * place _before_ transaction simulation, and _before_ transaction signing.
+ * This is attached to the transaction _before_ transaction simulation (it is
+ * needed for simulation to succeed). It is also re-calculated and re-added
+ * _before_ transaction signing.
* @constant {number}
* @default 300
* @memberof module:contract.Client
From a42c08e0f29cf8699b460bb275e64f33e7bcf467 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Tue, 4 Jun 2024 13:20:03 -0500
Subject: [PATCH 44/60] update some federation links
---
src/federation/server.ts | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/src/federation/server.ts b/src/federation/server.ts
index 0e9f52d11..e8fb8c2ee 100644
--- a/src/federation/server.ts
+++ b/src/federation/server.ts
@@ -18,14 +18,14 @@ import { Api } from "./api";
export const FEDERATION_RESPONSE_MAX_SIZE = 100 * 1024;
/**
- * Server handles a network connection to a
- * [federation server](https://developers.stellar.org/docs/glossary/federation/)
+ * Federation.Server handles a network connection to a
+ * [federation server](https://developers.stellar.org/docs/learn/encyclopedia/federation)
* instance and exposes an interface for requests to that instance.
* @constructor
* @memberof module:Federation
* @param {string} serverURL The federation server URL (ex. `https://acme.com/federation`).
* @param {string} domain Domain this server represents
- * @param {module:Federation.Api.Options} [opts] options object
+ * @param {module:Federation.Api.Options} [opts] Options object
* @returns {void}
*/
export class Server {
@@ -68,8 +68,8 @@ export class Server {
* // }
* });
*
- * @see Federation doc
- * @see Stellar.toml doc
+ * @see Federation doc
+ * @see Stellar.toml doc
* @param {string} value Stellar Address (ex. `bob*stellar.org`)
* @param {module:Federation.Api.Options} [opts] Options object
* @returns {Promise} A promise that resolves to the federation record
@@ -102,12 +102,13 @@ export class Server {
/**
* Creates a `FederationServer` instance based on information from
- * [stellar.toml](https://developers.stellar.org/docs/issuing-assets/publishing-asset-info/)
+ * [stellar.toml](https://developers.stellar.org/docs/issuing-assets/publishing-asset-info)
* file for a given domain.
*
* If `stellar.toml` file does not exist for a given domain or it does not
* contain information about a federation server Promise will reject.
- * ```js
+ *
+ * @example
* StellarSdk.FederationServer.createForDomain('acme.com')
* .then(federationServer => {
* // federationServer.resolveAddress('bob').then(...)
@@ -115,8 +116,8 @@ export class Server {
* .catch(error => {
* // stellar.toml does not exist or it does not contain information about federation server.
* });
- * ```
- * @see Stellar.toml doc
+ *
+ * @see Stellar.toml doc
* @param {string} domain Domain to get federation server for
* @param {module:Federation.Api.Options} [opts] Options object
* @returns {Promise} A promise that resolves to the federation record
@@ -159,7 +160,7 @@ export class Server {
/**
* Get the federation record if the user was found for a given Stellar address
- * @see Federation doc
+ * @see Federation doc
* @param {string} address Stellar address (ex. `bob*stellar.org`). If `FederationServer` was instantiated with `domain` param only username (ex. `bob`) can be passed.
* @returns {Promise} A promise that resolves to the federation record
* @throws Will throw an error if the federated address does not contain a domain, or if the server object was not instantiated with a `domain` parameter
@@ -184,7 +185,7 @@ export class Server {
/**
* Given an account ID, get their federation record if the user was found
- * @see Federation doc
+ * @see Federation doc
* @param {string} accountId Account ID (ex. `GBYNR2QJXLBCBTRN44MRORCMI4YO7FZPFBCNOKTOBCAAFC7KC3LNPRYS`)
* @returns {Promise} A promise that resolves to the federation record
* @throws Will throw an error if the federation server returns an invalid memo value.
From e2707c497c64713f1448837ccaf5a7bd9c161abc Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Tue, 4 Jun 2024 16:02:37 -0500
Subject: [PATCH 45/60] fixes to rpc server links, types, etc.
---
src/rpc/api.ts | 13 +++
src/rpc/parsers.ts | 2 +
src/rpc/server.ts | 201 +++++++++++++++++++++++------------------
src/rpc/transaction.ts | 6 +-
4 files changed, 129 insertions(+), 93 deletions(-)
diff --git a/src/rpc/api.ts b/src/rpc/api.ts
index da73c4c14..23a28a4ec 100644
--- a/src/rpc/api.ts
+++ b/src/rpc/api.ts
@@ -361,3 +361,16 @@ export namespace Api {
stateChanges?: RawLedgerEntryChange[];
}
}
+
+/**
+ * @namespace Api
+ * @memberof module:rpc
+ */
+
+/**
+ * @typedef {Object} EventFilter
+ * @property {('contract' | 'system' | 'diagnostic')} [type] Type of contract event that must match in order for the event to pass through the filter.
+ * @property {Array.} [contractIds] Contract addresses (`C...`) that must match in order for the event to pass through the filter.
+ * @property {Array.>} [topics] Array of topics arrays that must match in order for the event to pass through the filter.
+ * @memberof module:rpc.Api
+ */
diff --git a/src/rpc/parsers.ts b/src/rpc/parsers.ts
index e439bbf18..38412b4e2 100644
--- a/src/rpc/parsers.ts
+++ b/src/rpc/parsers.ts
@@ -4,6 +4,7 @@ import { Api } from './api';
/**
* Parse the response from invoking the `submitTransaction` method of a Soroban RPC server.
* @memberof module:rpc
+ * @private
*
* @param {Api.RawSendTransactionResponse} raw the raw `submitTransaction` response from the Soroban RPC server to parse
* @returns {Api.SendTransactionResponse} transaction response parsed from the Soroban RPC server's response
@@ -63,6 +64,7 @@ export function parseRawEvents(
/**
* Parse and return the retrieved ledger entries, if any, from a raw response from a Soroban RPC server.
* @memberof module:rpc
+ * @private
*
* @param {Api.RawGetLedgerEntriesResponse} raw he raw `getLedgerEntries` response from the Soroban RPC server to parse
* @returns {Api.GetLedgerEntriesResponse} ledger entries parsed from the Soroban RPC server's response
diff --git a/src/rpc/server.ts b/src/rpc/server.ts
index faa249514..8cb4cb7d5 100644
--- a/src/rpc/server.ts
+++ b/src/rpc/server.ts
@@ -36,16 +36,38 @@ export const SUBMIT_TRANSACTION_TIMEOUT = 60 * 1000;
* @enum {('temporary' | 'persistent')}
* @memberof module:rpc
*
- * @see {@link https://developers.stellar.org/docs/learn/smart-contract-internals/state-archival|State Archival docs}
- * @see {@link https://docs.rs/soroban-sdk/latest/soroban_sdk/storage/struct.Storage.html|Rust SDK Storage docs}
+ * @see {@link https://developers.stellar.org/docs/learn/smart-contract-internals/state-archival | State Archival docs}
+ * @see {@link https://docs.rs/soroban-sdk/latest/soroban_sdk/storage/struct.Storage.html | Rust SDK Storage docs}
*/
export enum Durability {
Temporary = 'temporary',
Persistent = 'persistent'
}
+/**
+ * @typedef {Object} GetEventsRequest Describes the complex filter combinations available for event queries.
+ * @property {Array.} filters Filters to use when querying events from the RPC server.
+ * @property {number} [startLedger] Ledger number (inclusive) to begin querying events.
+ * @property {string} [cursor] Page cursor (exclusive) to begin querying events.
+ * @property {number} [limit=100] The maximum number of events that should be returned in the RPC response.
+ * @memberof module:rpc.Server
+ */
+
+/**
+ * @typedef {Object} ResourceLeeway Describes additional resource leeways for transaction simulation.
+ * @property {number} cpuInstructions Simulate the transaction with more CPU instructions available.
+ * @memberof module:rpc.Server
+ */
+
+/**
+ * @typedef {Object} Options Options for configuring connections to RPC servers.
+ * @property {boolean} [allowHttp=false] Allow connecting to http servers, default: `false`. This must be set to false in production deployments!
+ * @property {number} [timeout=0] Allow a timeout, default: 0. Allows user to avoid nasty lag. You can also use {@link Config} class to set this globally.
+ * @property {Record} [headers] Additional headers that should be added to any requests to the RPC server.
+ * @memberof module:rpc.Server
+ */
+
export namespace Server {
- /** Describes the complex filter combinations available for event queries. */
export interface GetEventsRequest {
filters: Api.EventFilter[];
startLedger?: number; // either this or cursor
@@ -53,7 +75,6 @@ export namespace Server {
limit?: number;
}
- /** Describes additional resource leeways for transaction simulation. */
export interface ResourceLeeway {
cpuInstructions: number;
}
@@ -72,21 +93,23 @@ export namespace Server {
* @constructor
* @memberof module:rpc
*
- * @param {string} serverURL Soroban-RPC Server URL (ex.
- * `http://localhost:8000/soroban/rpc`).
- * @param {Server.Options} [opts] Options object
- * @param {boolean} [opts.allowHttp] allows connecting to insecure http servers
+ * @param {string} serverURL Soroban-RPC Server URL (ex. `http://localhost:8000/soroban/rpc`).
+ * @param {module:rpc.Server.Options} [opts] Options object
+ * @param {boolean} [opts.allowHttp] Allows connecting to insecure http servers
* (default: `false`). This must be set to false in production deployments!
* You can also use {@link Config} class to set this globally.
- * @param {Record} [opts.headers] allows setting custom headers
+ * @param {Record} [opts.headers] Allows setting custom headers
*
- * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods
+ * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods | API reference docs}
*/
export class Server {
- /** Soroban RPC Server URL (ex. `http://localhost:8000/soroban/rpc`). */
public readonly serverURL: URI;
constructor(serverURL: string, opts: Server.Options = {}) {
+ /**
+ * RPC Server URL (ex. `http://localhost:8000/soroban/rpc`).
+ * @member {URI}
+ */
this.serverURL = URI(serverURL);
if (opts.headers && Object.keys(opts.headers).length === 0) {
@@ -110,12 +133,12 @@ export class Server {
* Needed to get the current sequence number for the account so you can build
* a successful transaction with {@link TransactionBuilder}.
*
- * @param {string} address - The public address of the account to load.
+ * @param {string} address The public address of the account to load.
+ * @returns {Promise} A promise which resolves to the {@link Account}
+ * object with a populated sequence number
*
- * @returns {Promise} a promise to the {@link Account} object with
- * a populated sequence number
+ * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getLedgerEntries | getLedgerEntries docs}
*
- * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getLedgerEntries
* @example
* const accountId = "GBZC6Y2Y7Q3ZQ2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4";
* server.getAccount(accountId).then((account) => {
@@ -144,11 +167,12 @@ export class Server {
/**
* General node health check.
*
- * @returns {Promise} a promise to the
- * {@link Api.GetHealthResponse} object with the status of the
- * server (e.g. "healthy").
+ * @returns {Promise} A promise which resolves to the
+ * {@link Api.GetHealthResponse} object with the status of the
+ * server (e.g. "healthy").
+ *
+ * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getHealth | getLedgerEntries docs}
*
- * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getHealth
* @example
* server.getHealth().then((health) => {
* console.log("status:", health.status);
@@ -166,22 +190,22 @@ export class Server {
*
* Allows you to directly inspect the current state of a contract. This is a
* backup way to access your contract data which may not be available via
- * events or {@link SorobanRpc.Server#simulateTransaction}.
+ * events or {@link module:rpc.Server#simulateTransaction}.
*
- * @param {string|Address|Contract} contract the contract ID containing the
+ * @param {string|Address|Contract} contract The contract ID containing the
* data to load as a strkey (`C...` form), a {@link Contract}, or an
* {@link Address} instance
- * @param {xdr.ScVal} key the key of the contract data to load
- * @param {Durability} [durability=Durability.Persistent] the "durability
+ * @param {xdr.ScVal} key The key of the contract data to load
+ * @param {module:rpc.Durability} [durability=Durability.Persistent] The "durability
* keyspace" that this ledger key belongs to, which is either 'temporary'
- * or 'persistent' (the default), see {@link Durability}.
- *
- * @returns {Promise} the current data value
+ * or 'persistent' (the default), see {@link module:rpc.Durability}.
+ * @returns {Promise} The current data value
*
* @warning If the data entry in question is a 'temporary' entry, it's
* entirely possible that it has expired out of existence.
*
- * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getLedgerEntries
+ * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getLedgerEntries | getLedgerEntries docs}
+ *
* @example
* const contractId = "CCJZ5DGASBWQXR5MPFCJXMBI333XE5U3FSJTNQU7RIKE3P5GN2K2WYD5";
* const key = xdr.ScVal.scvSymbol("counter");
@@ -256,13 +280,10 @@ export class Server {
* deployed on the Soroban network. The WASM bytecode represents the executable
* code of the contract.
*
- * @param {string} contractId the contract ID containing the
- * WASM bytecode to retrieve
- *
- * @returns {Promise} a Buffer containing the WASM bytecode
- *
+ * @param {string} contractId The contract ID containing the WASM bytecode to retrieve
+ * @returns {Promise} A Buffer containing the WASM bytecode
* @throws {Error} If the contract or its associated WASM bytecode cannot be
- * found on the network.
+ * found on the network.
*
* @example
* const contractId = "CCJZ5DGASBWQXR5MPFCJXMBI333XE5U3FSJTNQU7RIKE3P5GN2K2WYD5";
@@ -299,12 +320,10 @@ export class Server {
* deployed on the Soroban network using the contract's WASM hash. The WASM bytecode
* represents the executable code of the contract.
*
- * @param {Buffer} wasmHash the WASM hash of the contract
- *
- * @returns {Promise} a Buffer containing the WASM bytecode
- *
+ * @param {Buffer} wasmHash The WASM hash of the contract
+ * @returns {Promise} A Buffer containing the WASM bytecode
* @throws {Error} If the contract or its associated WASM bytecode cannot be
- * found on the network.
+ * found on the network.
*
* @example
* const wasmHash = Buffer.from("...");
@@ -346,13 +365,12 @@ export class Server {
* {@link xdr.LedgerKeyContractCode} ledger entry key (or see
* {@link Contract.getFootprint}).
*
- * @param {xdr.ScVal[]} keys one or more ledger entry keys to load
+ * @param {xdr.ScVal[]} keys One or more ledger entry keys to load
+ * @returns {Promise} The current on-chain
+ * values for the given ledger keys
*
- * @returns {Promise} the current
- * on-chain values for the given ledger keys
+ * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getLedgerEntries | getLedgerEntries docs}
*
- * @see Server._getLedgerEntries
- * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getLedgerEntries
* @example
* const contractId = "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM";
* const key = xdr.LedgerKey.contractData(new xdr.LedgerKeyContractData({
@@ -391,12 +409,12 @@ export class Server {
* After submitting a transaction, clients should poll this to tell when the
* transaction has completed.
*
- * @param {string} hash hex-encoded hash of the transaction to check
- *
- * @returns {Promise} the status,
+ * @param {string} hash Hex-encoded hash of the transaction to check
+ * @returns {Promise} The status,
* result, and other details about the transaction
*
- * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getTransaction
+ * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getTransaction | getTransaction docs}
+ *
* @example
* const transactionHash = "c4515e3bdc0897f21cc5dbec8c82cf0a936d4741cb74a8e158eb51b9fb00411a";
* server.getTransaction(transactionHash).then((tx) => {
@@ -458,18 +476,19 @@ export class Server {
/**
* Fetch all events that match a given set of filters.
*
- * The given filters (see {@link Api.EventFilter} for detailed fields)
- * are combined only in a logical OR fashion, and all of the fields in each
- * filter are optional.
+ * The given filters (see {@link module:rpc.Api.EventFilter | Api.EventFilter}
+ * for detailed fields) are combined only in a logical OR fashion, and all of
+ * the fields in each filter are optional.
*
* To page through events, use the `pagingToken` field on the relevant
* {@link Api.EventResponse} object to set the `cursor` parameter.
*
- * @param {Server.GetEventsRequest} request event filters
- * @returns {Promise} a paginatable set of the
- * events matching the given event filters
+ * @param {module:rpc.Server.GetEventsRequest} request Event filters
+ * @returns {Promise} A paginatable set of the events
+ * matching the given event filters
+ *
+ * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getEvents | getEvents docs}
*
- * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getEvents
* @example
* server.getEvents({
* startLedger: 1000,
@@ -517,10 +536,11 @@ export class Server {
/**
* Fetch metadata about the network this Soroban RPC server is connected to.
*
- * @returns {Promise} metadata about the
- * current network this RPC server is connected to
+ * @returns {Promise} Metadata about the current
+ * network this RPC server is connected to
+ *
+ * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getNetwork | getNetwork docs}
*
- * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getNetwork
* @example
* server.getNetwork().then((network) => {
* console.log("friendbotUrl:", network.friendbotUrl);
@@ -539,7 +559,8 @@ export class Server {
* @returns {Promise} metadata about the
* latest ledger on the network that this RPC server is connected to
*
- * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getLatestLedger
+ * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getLatestLedger | getLatestLedger docs}
+ *
* @example
* server.getLatestLedger().then((response) => {
* console.log("hash:", response.id);
@@ -555,20 +576,19 @@ export class Server {
* Submit a trial contract invocation to get back return values, expected
* ledger footprint, expected authorizations, and expected costs.
*
- * @param {Transaction | FeeBumpTransaction} transaction the transaction to
+ * @param {Transaction | FeeBumpTransaction} transaction The transaction to
* simulate, which should include exactly one operation (one of
* {@link xdr.InvokeHostFunctionOp}, {@link xdr.ExtendFootprintTTLOp}, or
* {@link xdr.RestoreFootprintOp}). Any provided footprint or auth
* information will be ignored.
- *
- * @returns {Promise} an object with the
+ * @returns {Promise} An object with the
* cost, footprint, result/auth requirements (if applicable), and error of
* the transaction
*
- * @see https://developers.stellar.org/docs/glossary/transactions/
- * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/simulateTransaction
- * @see Server.prepareTransaction
- * @see assembleTransaction
+ * @see {@link https://developers.stellar.org/docs/learn/fundamentals/stellar-data-structures/operations-and-transactions | transaction docs}
+ * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/simulateTransaction | simulateTransaction docs}
+ * @see module:rpc.Server#prepareTransaction
+ * @see module:rpc.assembleTransaction
*
* @example
* const contractId = 'CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE';
@@ -628,15 +648,16 @@ export class Server {
*
* The returned transaction will also have an updated fee that is the sum of
* fee set on incoming transaction with the contract resource fees estimated
- * from simulation. It is adviseable to check the fee on returned transaction
+ * from simulation. It is advisable to check the fee on returned transaction
* and validate or take appropriate measures for interaction with user to
* confirm it is acceptable.
*
- * You can call the {@link SorobanRpc.Server#simulateTransaction} method directly first
- * if you want to inspect estimated fees for a given transaction in detail
- * first, then re-assemble it manually or via {@link assembleTransaction}.
+ * You can call the {@link module:rpc.Server#simulateTransaction} method
+ * directly first if you want to inspect estimated fees for a given
+ * transaction in detail first, then re-assemble it manually or via
+ * {@link module:rpc.assembleTransaction}.
*
- * @param {Transaction | FeeBumpTransaction} transaction the transaction to
+ * @param {Transaction | FeeBumpTransaction} transaction The transaction to
* prepare. It should include exactly one operation, which must be one of
* {@link xdr.InvokeHostFunctionOp}, {@link xdr.ExtendFootprintTTLOp},
* or {@link xdr.RestoreFootprintOp}.
@@ -646,17 +667,17 @@ export class Server {
* from the simulation. In other words, if you include auth entries, you
* don't care about the auth returned from the simulation. Other fields
* (footprint, etc.) will be filled as normal.
- *
- * @returns {Promise} a copy of the
+ * @returns {Promise} A copy of the
* transaction with the expected authorizations (in the case of
* invocation), resources, and ledger footprints added. The transaction fee
* will also automatically be padded with the contract's minimum resource
* fees discovered from the simulation.
- *
- * @see assembleTransaction
- * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/simulateTransaction
* @throws {jsonrpc.Error|Error|Api.SimulateTransactionErrorResponse}
- * if simulation fails
+ * If simulation fails
+ *
+ * @see module:rpc.assembleTransaction
+ * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/simulateTransaction | simulateTransaction docs}
+ *
* @example
* const contractId = 'CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE';
* const contract = new StellarSdk.Contract(contractId);
@@ -702,15 +723,16 @@ export class Server {
*
* Unlike Horizon, Soroban RPC does not wait for transaction completion. It
* simply validates the transaction and enqueues it. Clients should call
- * {@link SorobanRpc.Server#getTransaction} to learn about transaction
+ * {@link module:rpc.Server#getTransaction} to learn about transaction
* success/failure.
*
* @param {Transaction | FeeBumpTransaction} transaction to submit
* @returns {Promise} the
* transaction id, status, and any error if available
*
- * @see https://developers.stellar.org/docs/glossary/transactions/
- * @see https://developers.stellar.org/network/soroban-rpc/api-reference/methods/sendTransaction
+ * @see {@link https://developers.stellar.org/docs/learn/fundamentals/stellar-data-structures/operations-and-transactions | transaction docs}
+ * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/sendTransaction | sendTransaction docs}
+ *
* @example
* const contractId = 'CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE';
* const contract = new StellarSdk.Contract(contractId);
@@ -757,24 +779,23 @@ export class Server {
}
/**
- * Fund a new account using the network's friendbot faucet, if any.
+ * Fund a new account using the network's Friendbot faucet, if any.
*
- * @param {string | Account} address the address or account instance that we
- * want to create and fund with friendbot
- * @param {string} [friendbotUrl] optionally, an explicit address for
+ * @param {string | Account} address The address or account instance that we
+ * want to create and fund with Friendbot
+ * @param {string} [friendbotUrl] Optionally, an explicit address for
* friendbot (by default: this calls the Soroban RPC
- * {@link SorobanRpc.Server#getNetwork} method to try to discover this network's
- * Friendbot url).
- *
- * @returns {Promise} an {@link Account} object for the created
+ * {@link module:rpc.Server#getNetwork | getNetwork} method to try to
+ * discover this network's Friendbot url).
+ * @returns {Promise} An {@link Account} object for the created
* account, or the existing account if it's already funded with the
* populated sequence number (note that the account will not be "topped
* off" if it already exists)
+ * @throws If Friendbot is not configured on this network or request failure
*
- * @throws if Friendbot is not configured on this network or request failure
+ * @see {@link https://developers.stellar.org/docs/learn/networks#friendbot | Friendbot docs}
+ * @see {@link module:Friendbot.Api.Response}
*
- * @see https://developers.stellar.org/docs/fundamentals-and-concepts/testnet-and-pubnet#friendbot
- * @see Friendbot.Response
* @example
* server
* .requestAirdrop("GBZC6Y2Y7Q3ZQ2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4")
diff --git a/src/rpc/transaction.ts b/src/rpc/transaction.ts
index f6e24c269..b73a05307 100644
--- a/src/rpc/transaction.ts
+++ b/src/rpc/transaction.ts
@@ -16,12 +16,12 @@ import { parseRawSimulation } from './parsers';
* entries are ignored**.
*
* @param {Transaction|FeeBumpTransaction} raw the initial transaction, w/o simulation applied
- * @param {Api.SimulateTransactionResponse|Api.RawSimulateTransactionResponse} simulation the Soroban RPC simulation result (see {@link rpc.Server#simulateTransaction})
+ * @param {Api.SimulateTransactionResponse|Api.RawSimulateTransactionResponse} simulation the Soroban RPC simulation result (see {@link module:rpc.Server#simulateTransaction})
* @returns {TransactionBuilder} a new, cloned transaction with the proper auth and resource (fee, footprint) simulation data applied
*
* @memberof module:rpc
- * @see {@link rpc.Server#simulateTransaction}
- * @see {@link rpc.Server#prepareTransaction}
+ * @see {@link module:rpc.Server#simulateTransaction}
+ * @see {@link module:rpc.Server#prepareTransaction}
*/
export function assembleTransaction(
raw: Transaction | FeeBumpTransaction,
From 0ac4f7d2c428bbe67dd9960c2fd605b518a99200 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Tue, 4 Jun 2024 22:15:56 -0500
Subject: [PATCH 46/60] some fixes to links, params, etc. in WebAuth module
---
src/webauth/errors.ts | 32 +++++++------
src/webauth/utils.ts | 102 +++++++++++++++++++++++-------------------
2 files changed, 74 insertions(+), 60 deletions(-)
diff --git a/src/webauth/errors.ts b/src/webauth/errors.ts
index 653c13eb3..415248ce8 100644
--- a/src/webauth/errors.ts
+++ b/src/webauth/errors.ts
@@ -1,16 +1,22 @@
-/** @memberof module:WebAuth */
+/**
+ * InvalidChallengeError is raised when a challenge transaction does not meet
+ * the requirements for a SEP-10 challenge transaction (for example, a non-zero
+ * sequence number).
+ *
+ * @memberof module:WebAuth
+ */
export class InvalidChallengeError extends Error {
- public __proto__: InvalidChallengeError;
+ public __proto__: InvalidChallengeError;
- /**
- * Create an InvalidChallengeError
- * @param {string} message error message
- */
- constructor(message: string) {
- const trueProto = new.target.prototype;
- super(message);
- this.__proto__ = trueProto;
- this.constructor = InvalidChallengeError;
- this.name = "InvalidChallengeError";
- }
+ /**
+ * Create an InvalidChallengeError.
+ * @param {string} message Human-readable error message
+ */
+ constructor(message: string) {
+ const trueProto = new.target.prototype;
+ super(message);
+ this.__proto__ = trueProto;
+ this.constructor = InvalidChallengeError;
+ this.name = "InvalidChallengeError";
}
+}
diff --git a/src/webauth/utils.ts b/src/webauth/utils.ts
index 922764611..15d9bd331 100644
--- a/src/webauth/utils.ts
+++ b/src/webauth/utils.ts
@@ -20,10 +20,8 @@ import { ServerApi } from "../horizon/server_api";
/** @module WebAuth */
/**
- * Returns a valid [SEP-10](https://stellar.org/protocol/sep-10) challenge
- * transaction which you can use for Stellar Web Authentication.
- *
- * @function
+ * Returns a valid {@link https://stellar.org/protocol/sep-10 | SEP-10}
+ * challenge transaction which you can use for Stellar Web Authentication.
*
* @param {Keypair} serverKeypair Keypair for server's signing account.
* @param {string} clientAccountID The stellar account (G...) or muxed account
@@ -44,13 +42,17 @@ import { ServerApi } from "../horizon/server_api";
* @param {string} [clientSigningKey] The public key assigned to the SIGNING_KEY
* attribute specified on the stellar.toml hosted on the client domain. Only
* necessary when the 'client_domain' parameter is passed.
- *
* @returns {string} A base64 encoded string of the raw TransactionEnvelope xdr
* struct for the transaction.
- * @see {@link https://stellar.org/protocol/sep-10|SEP-10: Stellar Web Auth}
+ * @throws {Error} Will throw if `clientAccountID is a muxed account, and `memo`
+ * is present.
+ * @throws {Error} Will throw if `clientDomain` is provided, but
+ * `clientSigningKey` is missing
+ *
+ * @see {@link https://stellar.org/protocol/sep-10 | SEP-10: Stellar Web Auth}
*
* @example
- * import { Keypair, Networks, WebAuth } from 'stellar-sdk'
+ * import { Keypair, Networks, WebAuth } from 'stellar-sdk'
*
* let serverKeyPair = Keypair.fromSecret("server-secret")
* let challenge = WebAuth.buildChallengeTx(
@@ -135,7 +137,15 @@ export function buildChallengeTx(
}
/**
- * Reads a SEP 10 challenge transaction and returns the decoded transaction and
+ * @typedef {Object} ChallengeTxParts A parsed and validated challenge transaction, and some of its constituent details.
+ * @property {Transaction} tx The challenge transaction.
+ * @property {string} clientAccountID The Stellar public key (master key) used to sign the Manage Data operation.
+ * @property {string} matchedHomeDomain The matched home domain.
+ * @property {string | null} [memo=null] The memo attached to the transaction, which will be null if not present
+ */
+
+/**
+ * Reads a SEP-10 challenge transaction and returns the decoded transaction and
* client account ID contained within.
*
* It also verifies that the transaction has been signed by the server.
@@ -143,28 +153,26 @@ export function buildChallengeTx(
* It does not verify that the transaction has been signed by the client or that
* any signatures other than the server's on the transaction are valid. Use one
* of the following functions to completely verify the transaction:
- * - {@link verifyChallengeTxThreshold}
- * - {@link verifyChallengeTxSigners}
*
- * @function
+ * - {@link module:WebAuth~verifyChallengeTxThreshold}
+ * - {@link module:WebAuth~verifyChallengeTxSigners}
*
* @param {string} challengeTx SEP0010 challenge transaction in base64.
* @param {string} serverAccountID The server's stellar account (public key).
* @param {string} networkPassphrase The network passphrase, e.g.: 'Test SDF
* Network ; September 2015' (see {@link Networks})
- * @param {string|string[]} [homeDomains] The home domain that is expected to be
- * included in the first Manage Data operation's string key. If an array is
- * provided, one of the domain names in the array must match.
+ * @param {string | Array.} homeDomains The home domain that is expected
+ * to be included in the first Manage Data operation's string key. If an
+ * array is provided, one of the domain names in the array must match.
* @param {string} webAuthDomain The home domain that is expected to be included
* as the value of the Manage Data operation with the 'web_auth_domain' key.
* If no such operation is included, this parameter is not used.
- *
- * @returns {Transaction|string|string|string} The actual transaction and the
- * stellar public key (master key) used to sign the Manage Data operation,
+ * @returns {module:WebAuth~ChallengeTxParts} The actual transaction and the
+ * Stellar public key (master key) used to sign the Manage Data operation,
* the matched home domain, and the memo attached to the transaction, which
* will be null if not present.
*
- * @see {@link https://stellar.org/protocol/sep-10|SEP-10: Stellar Web Auth}
+ * @see {@link https://stellar.org/protocol/sep-10 | SEP-10: Stellar Web Auth}
*/
export function readChallengeTx(
challengeTx: string,
@@ -362,37 +370,39 @@ export function readChallengeTx(
* ignored.
*
* Errors will be raised if:
- * - The transaction is invalid according to {@link readChallengeTx}.
+ * - The transaction is invalid according to
+ * {@link module:WebAuth~readChallengeTx}.
* - No client signatures are found on the transaction.
* - One or more signatures in the transaction are not identifiable as the
* server account or one of the signers provided in the arguments.
* - The signatures are all valid but do not meet the threshold.
*
- * @function
- *
* @param {string} challengeTx SEP0010 challenge transaction in base64.
* @param {string} serverAccountID The server's stellar account (public key).
* @param {string} networkPassphrase The network passphrase, e.g.: 'Test SDF
* Network ; September 2015' (see {@link Networks}).
* @param {number} threshold The required signatures threshold for verifying
* this transaction.
- * @param {ServerApi.AccountRecordSigners[]} signerSummary a map of all
+ * @param {Array.} signerSummary a map of all
* authorized signers to their weights. It's used to validate if the
* transaction signatures have met the given threshold.
- * @param {string|string[]} [homeDomains] The home domain(s) that should be
- * included in the first Manage Data operation's string key. Required in
+ * @param {string | Array.} homeDomains The home domain(s) that should
+ * be included in the first Manage Data operation's string key. Required in
* verifyChallengeTxSigners() => readChallengeTx().
* @param {string} webAuthDomain The home domain that is expected to be included
* as the value of the Manage Data operation with the 'web_auth_domain' key,
* if present. Used in verifyChallengeTxSigners() => readChallengeTx().
+ * @returns {Array.} The list of signers public keys that have signed
+ * the transaction, excluding the server account ID, given that the threshold
+ * was met.
+ * @throws {module:WebAuth.InvalidChallengeError} Will throw if the collective
+ * weight of the transaction's signers does not meet the necessary threshold
+ * to verify this transaction.
*
- * @returns {string[]} The list of signers public keys that have signed the
- * transaction, excluding the server account ID, given that the threshold was
- * met.
+ * @see {@link https://stellar.org/protocol/sep-10 | SEP-10: Stellar Web Auth}
*
- * @see {@link https://stellar.org/protocol/sep-10|SEP-10: Stellar Web Auth}
* @example
- * import { Networks, TransactionBuilder, WebAuth } from 'stellar-sdk';
+ * import { Networks, TransactionBuilder, WebAuth } from 'stellar-sdk';
*
* const serverKP = Keypair.random();
* const clientKP1 = Keypair.random();
@@ -489,27 +499,26 @@ export function verifyChallengeTxThreshold(
* ignored.
*
* Errors will be raised if:
- * - The transaction is invalid according to {@link readChallengeTx}.
+ * - The transaction is invalid according to
+ * {@link module:WebAuth~readChallengeTx}.
* - No client signatures are found on the transaction.
* - One or more signatures in the transaction are not identifiable as the
* server account or one of the signers provided in the arguments.
*
- * @function
- *
* @param {string} challengeTx SEP0010 challenge transaction in base64.
* @param {string} serverAccountID The server's stellar account (public key).
* @param {string} networkPassphrase The network passphrase, e.g.: 'Test SDF
* Network ; September 2015' (see {@link Networks}).
- * @param {string[]} signers The signers public keys. This list should contain
- * the public keys for all signers that have signed the transaction.
- * @param {string|string[]} [homeDomains] The home domain(s) that should be
- * included in the first Manage Data operation's string key. Required in
+ * @param {Array.} signers The signers public keys. This list should
+ * contain the public keys for all signers that have signed the transaction.
+ * @param {string | Array.} [homeDomains] The home domain(s) that should
+ * be included in the first Manage Data operation's string key. Required in
* readChallengeTx().
* @param {string} webAuthDomain The home domain that is expected to be included
* as the value of the Manage Data operation with the 'web_auth_domain' key,
* if present. Used in readChallengeTx().
- * @returns {string[]} The list of signers public keys that have signed the
- * transaction, excluding the server account ID.
+ * @returns {Array.} The list of signers public keys that have signed
+ * the transaction, excluding the server account ID.
*
* @see {@link https://stellar.org/protocol/sep-10|SEP-10: Stellar Web Auth}
* @example
@@ -682,10 +691,10 @@ export function verifyChallengeTxSigners(
/**
* Verifies if a transaction was signed by the given account id.
*
- * @function
- * @param {Transaction} transaction
- * @param {string} accountID
- * @returns {boolean}.
+ * @param {Transaction | FeeBumpTransaction} transaction The signed transaction.
+ * @param {string} accountID The signer's public key.
+ * @returns {boolean} Whether or not `accountID` was found to have signed the
+ * transaction.
*
* @example
* let keypair = Keypair.random();
@@ -710,11 +719,10 @@ export function verifyTxSignedBy(
* returning a list of non-repeated signers that were found to have signed the
* given transaction.
*
- * @function
- * @param {Transaction} transaction the signed transaction.
- * @param {string[]} signers The signers public keys.
- * @returns {string[]} a list of signers that were found to have signed the
- * transaction.
+ * @param {Transaction | FeeBumpTransaction} transaction The signed transaction.
+ * @param {Array.} signers The signer's public keys.
+ * @returns {Array.} A list of signers that were found to have signed
+ * the transaction.
*
* @example
* let keypair1 = Keypair.random();
From afaf06eb44049894e1fefef9abbc5ce4c8108ff2 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Tue, 18 Jun 2024 13:56:06 -0500
Subject: [PATCH 47/60] improving docs rendering for errors
---
config/.jsdoc.json | 49 +-
package.json | 1 +
src/contract/client.ts | 4 +-
src/contract/spec.ts | 5 -
src/contract/types.ts | 35 +-
src/errors/account_requires_memo.ts | 23 +-
src/errors/bad_request.ts | 9 +-
src/errors/bad_response.ts | 18 +-
src/errors/network.ts | 26 +-
src/errors/not_found.ts | 9 +-
src/rpc/api.ts | 13 -
src/stellartoml/index.ts | 21 +-
src/webauth/errors.ts | 9 +-
yarn.lock | 776 ++++++++++++++++++++++++++--
14 files changed, 866 insertions(+), 132 deletions(-)
diff --git a/config/.jsdoc.json b/config/.jsdoc.json
index 4752784ef..3b8e142a3 100644
--- a/config/.jsdoc.json
+++ b/config/.jsdoc.json
@@ -1,36 +1,47 @@
{
+ "tags": {
+ "allowUnknownTags": ["optional", "category", "warning"]
+ },
+ "plugins": [
+ "plugins/markdown",
+ "node_modules/better-docs/typescript",
+ "node_modules/better-docs/category"
+ ],
"source": {
"include": ["lib/", "js-stellar-base/src"],
+ "includePattern": "\\.(js|ts)$",
"exclude": "js-stellar-base/src/generated"
},
- "plugins": ["plugins/markdown"],
- "template": {
- "default": {
- "useLongNameInNav": true
- }
- },
"opts": {
+ "encoding": "utf8",
"readme": "README.md",
"destination": "jsdoc/",
"recurse": true,
"verbose": true,
- "template": "node_modules/clean-jsdoc-theme",
- "theme_opts": {
- "default_theme": "fallback-light",
- "title": "Home",
- "menu": [
+ "template": "node_modules/better-docs",
+ "private": true
+ },
+ "templates": {
+ "cleverLinks": false,
+ "monospaceLinks": false,
+ "search": true,
+ "default": {
+ "useLongnameInNav": true
+ },
+ "better-docs": {
+ "name": "@stellar/stellar-sdk",
+ "title": "@stellar/stellar-sdk Documentation",
+ "hideGenerator": false,
+ "navLinks": [
{
- "title": "GitHub",
- "link": "https://github.com/stellar/js-stellar-sdk",
- "target": "_blank"
+ "label": "GitHub",
+ "href": "https://github.com/stellar/stellar-sdk"
},
{
- "title": "npm",
- "link": "https://www.npmjs.com/package/@stellar/stellar-sdk",
- "target": "_blank"
+ "label": "npm",
+ "href": "https://www.npmjs.com/package/@stellar/stellar-sdk"
}
- ],
- "prefixModuleToSidebarItems_experimental": true
+ ]
}
},
"markdown": {
diff --git a/package.json b/package.json
index 70ec195eb..642b25996 100644
--- a/package.json
+++ b/package.json
@@ -165,6 +165,7 @@
"dependencies": {
"@stellar/stellar-base": "^12.0.0",
"axios": "^1.7.2",
+ "better-docs": "^2.7.3",
"bignumber.js": "^9.1.2",
"eventsource": "^2.0.2",
"randombytes": "^2.1.0",
diff --git a/src/contract/client.ts b/src/contract/client.ts
index a96fb9b0a..d085f8267 100644
--- a/src/contract/client.ts
+++ b/src/contract/client.ts
@@ -9,8 +9,8 @@ import { processSpecEntryStream } from './utils';
* Generate a class from the contract spec that where each contract method
* gets included with an identical name.
*
- * Each method returns an {@link AssembledTransaction} that can be used to
- * modify, simulate, decode results, and possibly sign, & submit the
+ * Each method returns a {@link module:contract.AssembledTransaction} that can
+ * be used to modify, simulate, decode results, and possibly sign, & submit the
* transaction.
*
* @memberof module:contract
diff --git a/src/contract/spec.ts b/src/contract/spec.ts
index c8304484c..e8a930eab 100644
--- a/src/contract/spec.ts
+++ b/src/contract/spec.ts
@@ -54,9 +54,6 @@ function readObj(args: object, input: xdr.ScSpecFunctionInputV0): any {
export class Spec {
public entries: xdr.ScSpecEntry[] = [];
- /**
- * Constructs a new ContractSpec from an array of XDR spec entries.
- */
constructor(entries: xdr.ScSpecEntry[] | string[]) {
if (entries.length == 0) {
throw new Error("Contract spec must have at least one entry");
@@ -73,9 +70,7 @@ export class Spec {
/**
* Gets the XDR functions from the spec.
- *
* @returns {xdr.ScSpecFunctionV0[]} all contract functions
- *
*/
funcs(): xdr.ScSpecFunctionV0[] {
return this.entries
diff --git a/src/contract/types.ts b/src/contract/types.ts
index c41171038..2059a73a9 100644
--- a/src/contract/types.ts
+++ b/src/contract/types.ts
@@ -5,7 +5,15 @@ import type { Client } from "./client";
import type { AssembledTransaction } from "./assembled_transaction";
export type XDR_BASE64 = string;
+/**
+ * An unsigned 32-bit integer.
+ * @type {number}
+ */
export type u32 = number;
+/**
+ * A signed 32-bit integer.
+ * @type {number}
+ */
export type i32 = number;
export type u64 = bigint;
export type i64 = bigint;
@@ -19,15 +27,20 @@ export type Duration = bigint;
/**
* A "regular" transaction, as opposed to a FeeBumpTransaction.
+ * @memberof module:contract
*/
export type Tx = Transaction, Operation[]>;
+/**
+ * Options for a smart contract client.
+ * @memberof module:contract
+ */
export type ClientOptions = {
/**
* The public key of the account that will send this transaction. You can
* override this for specific methods later, like
- * {@link AssembledTransaction#signAndSend} and
- * {@link AssembledTransaction#signAuthEntries}.
+ * {@link contract.AssembledTransaction#signAndSend} and
+ * {@link contract.AssembledTransaction#signAuthEntries}.
*/
publicKey?: string;
/**
@@ -36,7 +49,7 @@ export type ClientOptions = {
* calls, which only need to be simulated. If you do not need to sign and
* send, there is no need to provide this. If you do not provide it during
* initialization, you can provide it later when you call
- * {@link AssembledTransaction#signAndSend}.
+ * {@link contract.AssembledTransaction~signAndSend}.
*
* Matches signature of `signTransaction` from Freighter.
*/
@@ -63,12 +76,22 @@ export type ClientOptions = {
accountToSign?: string;
},
) => Promise;
+ /** The address of the contract the client will interact with. */
contractId: string;
+ /**
+ * The network passphrase for the Stellar network this contract is deployed
+ * to.
+ */
networkPassphrase: string;
+ /**
+ * The URL of the RPC instance that will be used to interact with this
+ * contract.
+ */
rpcUrl: string;
/**
* If true, will allow HTTP requests to the Soroban network. If false, will
- * only allow HTTPS requests. @default false
+ * only allow HTTPS requests.
+ * @default false
*/
allowHttp?: boolean;
/**
@@ -91,6 +114,10 @@ export type ClientOptions = {
errorTypes?: Record;
};
+/**
+ * Options for a smart contract method invocation.
+ * @memberof module:contract
+ */
export type MethodOptions = {
/**
* The fee to pay for the transaction. Default: {@link BASE_FEE}
diff --git a/src/errors/account_requires_memo.ts b/src/errors/account_requires_memo.ts
index 2b493f4da..a9840550c 100644
--- a/src/errors/account_requires_memo.ts
+++ b/src/errors/account_requires_memo.ts
@@ -6,32 +6,37 @@
*
* This error contains two attributes to help you identify the account requiring
* the memo and the operation where the account is the destination
+ * @category Errors
+ *
+ * @param {string} message Human-readable error message
+ * @param {string} accountId The account which requires a memo
+ * @param {number} operationIndex The index of the operation where `accountId` is the destination
*
* @example
* console.log('The following account requires a memo ', err.accountId)
* console.log('The account is used in operation: ', err.operationIndex)
- *
*/
export class AccountRequiresMemoError extends Error {
public __proto__: AccountRequiresMemoError;
public accountId: string;
public operationIndex: number;
- /**
- * Create an AccountRequiresMemoError
- * @param {string} message Human-readable error message
- * @param {string} accountId The account which requires a memo
- * @param {number} operationIndex The index of the operation where `accountId` is the destination
- */
constructor(message: string, accountId: string, operationIndex: number) {
const trueProto = new.target.prototype;
super(message);
this.__proto__ = trueProto;
this.constructor = AccountRequiresMemoError;
this.name = "AccountRequiresMemoError";
- /** @type {string} account which requires a memo. */
+
+ /**
+ * The account which requires a memo.
+ * @type {string}
+ */
this.accountId = accountId;
- /** @type {number} operation where accountId is the destination. */
+ /**
+ * Operation where accountId is the destination.
+ * @type {number}
+ */
this.operationIndex = operationIndex;
}
}
diff --git a/src/errors/bad_request.ts b/src/errors/bad_request.ts
index d82ef7cd4..c840f2284 100644
--- a/src/errors/bad_request.ts
+++ b/src/errors/bad_request.ts
@@ -5,13 +5,12 @@ import { NetworkError } from "./network";
* way (incorrect timebounds for trade call builders, for example.)
* @extends NetworkError
* @inheritdoc
+ * @category Errors
+ *
+ * @param {string} message Human-readable error message
+ * @param {any} response Response details, received from the Horizon server
*/
export class BadRequestError extends NetworkError {
- /**
- * Create a BadRequestError.
- * @param {string} message Human-readable error message
- * @param {any} response Response details, received from the Horizon server
- */
constructor(message: string, response: any) {
const trueProto = new.target.prototype;
super(message, response);
diff --git a/src/errors/bad_response.ts b/src/errors/bad_response.ts
index 97d0cc68a..302fba0ce 100644
--- a/src/errors/bad_response.ts
+++ b/src/errors/bad_response.ts
@@ -1,19 +1,19 @@
import { NetworkError } from "./network";
/**
- * BadResponseError is raised when a response from a {@link module:Horizon} or
- * {@link module:Federation} is invalid in some way. For example, a federation
- * response may exceed the maximum allowed size, or a transaction submission may
- * have failed with Horizon.
+ * BadResponseError is raised when a response from a
+ * {@link module:Horizon | Horizon} or {@link module:Federation | Federation}
+ * server is invalid in some way. For example, a federation response may exceed
+ * the maximum allowed size, or a transaction submission may have failed with
+ * Horizon.
* @extends NetworkError
* @inheritdoc
+ * @category Errors
+ *
+ * @param {string} message Human-readable error message.
+ * @param {any} response Response details, received from the server.
*/
export class BadResponseError extends NetworkError {
- /**
- * Create a BadResponseError.
- * @param {string} message Human-readable error message.
- * @param {any} response Response details, received from the Horizon server.
- */
constructor(message: string, response: any) {
const trueProto = new.target.prototype;
super(message, response);
diff --git a/src/errors/network.ts b/src/errors/network.ts
index f22114408..5a2c4487a 100644
--- a/src/errors/network.ts
+++ b/src/errors/network.ts
@@ -5,6 +5,14 @@ import { HorizonApi } from "../horizon/horizon_api";
/**
* NetworkError is raised when an interaction with a Horizon server has caused
* some kind of problem.
+ * @category Errors
+ *
+ * @param {string} message Human-readable error message
+ * @param {any} response Response details, received from the Horizon server.
+ * @param {HorizonApi.ErrorResponseData} [response.data] The data returned by Horizon as part of the error: {@link https://developers.stellar.org/network/horizon/api-reference/errors/response | Error Response}
+ * @param {number} [response.status] HTTP status code describing the basic issue with a submitted transaction {@link https://developers.stellar.org/network/horizon/api-reference/errors/http-status-codes/standard | Standard Status Codes}
+ * @param {string} [response.statusText] A human-readable description of what the status code means: {@link https://developers.stellar.org/network/horizon/api-reference/errors/http-status-codes/horizon-specific | Horizon-Specific Status Codes}
+ * @param {string} [response.url] URL which can provide more information about the problem that occurred.
*/
export class NetworkError extends Error {
public response: {
@@ -15,28 +23,24 @@ export class NetworkError extends Error {
};
public __proto__: NetworkError;
- /**
- * Create a NetworkError.
- * @param {string} message Human-readable error message
- * @param {any} response Response details, received from the Horizon server
- */
constructor(message: string, response: any) {
const trueProto = new.target.prototype;
super(message);
this.__proto__ = trueProto;
this.constructor = NetworkError;
/**
- * @typedef {Object}
- * @property {HorizonApi.ErrorResponseData} [data] The data returned by Horizon as part of the error: {@link https://developers.stellar.org/network/horizon/api-reference/errors/response | Error Response}
- * @property {number} [status] HTTP status code describing the basic issue with a submitted transaction {@link https://developers.stellar.org/network/horizon/api-reference/errors/http-status-codes/standard | Standard Status Codes}
- * @property {string} [statusText] A human-readable description of what the status code means: {@link https://developers.stellar.org/network/horizon/api-reference/errors/http-status-codes/horizon-specific | Horizon-Specific Status Codes}
- * @property {string} [url] URL which can provide more information about the problem that occurred.
+ * The response sent by the Horizon server.
+ * @type {Object} Response details, received from the Horizon server
+ * @property {HorizonApi.ErrorResponseData} [response.data] The data returned by Horizon as part of the error: {@link https://developers.stellar.org/network/horizon/api-reference/errors/response | Error Response}
+ * @property {number} [response.status] HTTP status code describing the basic issue with a submitted transaction {@link https://developers.stellar.org/network/horizon/api-reference/errors/http-status-codes/standard | Standard Status Codes}
+ * @property {string} [response.statusText] A human-readable description of what the status code means: {@link https://developers.stellar.org/network/horizon/api-reference/errors/http-status-codes/horizon-specific | Horizon-Specific Status Codes}
+ * @property {string} [response.url] URL which can provide more information about the problem that occurred.
*/
this.response = response;
}
/**
- * Get the response object that created this error.
+ * Returns the error response sent by the Horizon server.
* @returns {any}
*/
public getResponse() {
diff --git a/src/errors/not_found.ts b/src/errors/not_found.ts
index 040e60edc..bdfd21d69 100644
--- a/src/errors/not_found.ts
+++ b/src/errors/not_found.ts
@@ -5,13 +5,12 @@ import { NetworkError } from "./network";
* unavailable.
* @extends NetworkError
* @inheritdoc
+ * @category Errors
+ *
+ * @param {string} message Human-readable error message
+ * @param {any} response Response details, received from the Horizon server
*/
export class NotFoundError extends NetworkError {
- /**
- * Create a NotFoundError.
- * @param {string} message Human-readable error message
- * @param {any} response Response details, received from the Horizon server
- */
constructor(message: string, response: any) {
const trueProto = new.target.prototype;
super(message, response);
diff --git a/src/rpc/api.ts b/src/rpc/api.ts
index 23a28a4ec..da73c4c14 100644
--- a/src/rpc/api.ts
+++ b/src/rpc/api.ts
@@ -361,16 +361,3 @@ export namespace Api {
stateChanges?: RawLedgerEntryChange[];
}
}
-
-/**
- * @namespace Api
- * @memberof module:rpc
- */
-
-/**
- * @typedef {Object} EventFilter
- * @property {('contract' | 'system' | 'diagnostic')} [type] Type of contract event that must match in order for the event to pass through the filter.
- * @property {Array.} [contractIds] Contract addresses (`C...`) that must match in order for the event to pass through the filter.
- * @property {Array.>} [topics] Array of topics arrays that must match in order for the event to pass through the filter.
- * @memberof module:rpc.Api
- */
diff --git a/src/stellartoml/index.ts b/src/stellartoml/index.ts
index 66ffe0376..84314402e 100644
--- a/src/stellartoml/index.ts
+++ b/src/stellartoml/index.ts
@@ -19,26 +19,27 @@ const CancelToken = axios.CancelToken;
/**
* Resolver allows resolving `stellar.toml` files.
+ * @memberof module:StellarToml
*/
export class Resolver {
/**
* Returns a parsed `stellar.toml` file for a given domain.
- * ```js
- * StellarSdk.Resolver.resolve('acme.com')
- * .then(stellarToml => {
- * // stellarToml in an object representing domain stellar.toml file.
- * })
- * .catch(error => {
- * // stellar.toml does not exist or is invalid
- * });
- * ```
* @see {@link https://developers.stellar.org/docs/issuing-assets/publishing-asset-info|Stellar.toml doc}
*
* @param {string} domain Domain to get stellar.toml file for
- * @param {object} [opts] Options object
+ * @param {Object} [opts] Options object
* @param {boolean} [opts.allowHttp] - Allow connecting to http servers, default: `false`. This must be set to false in production deployments!
* @param {number} [opts.timeout] - Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue.
* @returns {Promise} A `Promise` that resolves to the parsed stellar.toml object
+ *
+ * @example
+ * StellarSdk.StellarToml.Resolver.resolve('acme.com')
+ * .then(stellarToml => {
+ * // stellarToml in an object representing domain stellar.toml file.
+ * })
+ * .catch(error => {
+ * // stellar.toml does not exist or is invalid
+ * });
*/
public static async resolve(
domain: string,
diff --git a/src/webauth/errors.ts b/src/webauth/errors.ts
index 415248ce8..3dc0f8b10 100644
--- a/src/webauth/errors.ts
+++ b/src/webauth/errors.ts
@@ -2,16 +2,13 @@
* InvalidChallengeError is raised when a challenge transaction does not meet
* the requirements for a SEP-10 challenge transaction (for example, a non-zero
* sequence number).
- *
* @memberof module:WebAuth
+ * @category Errors
+ *
+ * @param {string} message Human-readable error message.
*/
export class InvalidChallengeError extends Error {
public __proto__: InvalidChallengeError;
-
- /**
- * Create an InvalidChallengeError.
- * @param {string} message Human-readable error message
- */
constructor(message: string) {
const trueProto = new.target.prototype;
super(message);
diff --git a/yarn.lock b/yarn.lock
index b155c0098..db59b04e6 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -64,6 +64,14 @@
"@babel/highlight" "^7.24.6"
picocolors "^1.0.0"
+"@babel/code-frame@^7.24.7":
+ version "7.24.7"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465"
+ integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==
+ dependencies:
+ "@babel/highlight" "^7.24.7"
+ picocolors "^1.0.0"
+
"@babel/compat-data@^7.22.6", "@babel/compat-data@^7.24.6":
version "7.24.6"
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.24.6.tgz#b3600217688cabb26e25f8e467019e66d71b7ae2"
@@ -97,6 +105,16 @@
dependencies:
eslint-rule-composer "^0.3.0"
+"@babel/generator@^7.12.11", "@babel/generator@^7.24.7":
+ version "7.24.7"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.7.tgz#1654d01de20ad66b4b4d99c135471bc654c55e6d"
+ integrity sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==
+ dependencies:
+ "@babel/types" "^7.24.7"
+ "@jridgewell/gen-mapping" "^0.3.5"
+ "@jridgewell/trace-mapping" "^0.3.25"
+ jsesc "^2.5.1"
+
"@babel/generator@^7.24.6":
version "7.24.6"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.6.tgz#dfac82a228582a9d30c959fe50ad28951d4737a7"
@@ -172,6 +190,13 @@
resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.6.tgz#ac7ad5517821641550f6698dd5468f8cef78620d"
integrity sha512-Y50Cg3k0LKLMjxdPjIl40SdJgMB85iXn27Vk/qbHZCFx/o5XO3PSnpi675h1KEmmDb6OFArfd5SCQEQ5Q4H88g==
+"@babel/helper-environment-visitor@^7.24.7":
+ version "7.24.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz#4b31ba9551d1f90781ba83491dd59cf9b269f7d9"
+ integrity sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==
+ dependencies:
+ "@babel/types" "^7.24.7"
+
"@babel/helper-function-name@^7.24.6":
version "7.24.6"
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.24.6.tgz#cebdd063386fdb95d511d84b117e51fc68fec0c8"
@@ -180,6 +205,14 @@
"@babel/template" "^7.24.6"
"@babel/types" "^7.24.6"
+"@babel/helper-function-name@^7.24.7":
+ version "7.24.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz#75f1e1725742f39ac6584ee0b16d94513da38dd2"
+ integrity sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==
+ dependencies:
+ "@babel/template" "^7.24.7"
+ "@babel/types" "^7.24.7"
+
"@babel/helper-hoist-variables@^7.24.6":
version "7.24.6"
resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.6.tgz#8a7ece8c26756826b6ffcdd0e3cf65de275af7f9"
@@ -187,6 +220,13 @@
dependencies:
"@babel/types" "^7.24.6"
+"@babel/helper-hoist-variables@^7.24.7":
+ version "7.24.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz#b4ede1cde2fd89436397f30dc9376ee06b0f25ee"
+ integrity sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==
+ dependencies:
+ "@babel/types" "^7.24.7"
+
"@babel/helper-member-expression-to-functions@^7.24.6":
version "7.24.6"
resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.6.tgz#86084f3e0e4e2169a134754df3870bc7784db71e"
@@ -263,16 +303,33 @@
dependencies:
"@babel/types" "^7.24.6"
+"@babel/helper-split-export-declaration@^7.24.7":
+ version "7.24.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz#83949436890e07fa3d6873c61a96e3bbf692d856"
+ integrity sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==
+ dependencies:
+ "@babel/types" "^7.24.7"
+
"@babel/helper-string-parser@^7.24.6":
version "7.24.6"
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.6.tgz#28583c28b15f2a3339cfafafeaad42f9a0e828df"
integrity sha512-WdJjwMEkmBicq5T9fm/cHND3+UlFa2Yj8ALLgmoSQAJZysYbBjw+azChSGPN4DSPLXOcooGRvDwZWMcF/mLO2Q==
+"@babel/helper-string-parser@^7.24.7":
+ version "7.24.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz#4d2d0f14820ede3b9807ea5fc36dfc8cd7da07f2"
+ integrity sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==
+
"@babel/helper-validator-identifier@^7.24.6":
version "7.24.6"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.6.tgz#08bb6612b11bdec78f3feed3db196da682454a5e"
integrity sha512-4yA7s865JHaqUdRbnaxarZREuPTHrjpDT+pXoAZ1yhyo6uFnIEpS8VMu16siFOHDpZNKYv5BObhsB//ycbICyw==
+"@babel/helper-validator-identifier@^7.24.7":
+ version "7.24.7"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db"
+ integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==
+
"@babel/helper-validator-option@^7.24.6":
version "7.24.6"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.6.tgz#59d8e81c40b7d9109ab7e74457393442177f460a"
@@ -305,11 +362,26 @@
js-tokens "^4.0.0"
picocolors "^1.0.0"
+"@babel/highlight@^7.24.7":
+ version "7.24.7"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d"
+ integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==
+ dependencies:
+ "@babel/helper-validator-identifier" "^7.24.7"
+ chalk "^2.4.2"
+ js-tokens "^4.0.0"
+ picocolors "^1.0.0"
+
"@babel/parser@^7.14.7", "@babel/parser@^7.20.15", "@babel/parser@^7.24.6":
version "7.24.6"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.6.tgz#5e030f440c3c6c78d195528c3b688b101a365328"
integrity sha512-eNZXdfU35nJC2h24RznROuOpO94h6x8sg9ju0tT9biNtLZ2vuP8SduLqqV+/8+cebSLV9SJEAN5Z3zQbJG/M+Q==
+"@babel/parser@^7.2.3", "@babel/parser@^7.24.7":
+ version "7.24.7"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85"
+ integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==
+
"@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.24.6":
version "7.24.6"
resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.24.6.tgz#283a74ef365b1e954cda6b2724c678a978215e88"
@@ -1008,6 +1080,13 @@
resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310"
integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==
+"@babel/runtime@^7.7.6":
+ version "7.24.7"
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.7.tgz#f4f0d5530e8dbdf59b3451b9b3e594b6ba082e12"
+ integrity sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==
+ dependencies:
+ regenerator-runtime "^0.14.0"
+
"@babel/runtime@^7.8.4":
version "7.24.6"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.6.tgz#5b76eb89ad45e2e4a0a8db54c456251469a3358e"
@@ -1024,6 +1103,31 @@
"@babel/parser" "^7.24.6"
"@babel/types" "^7.24.6"
+"@babel/template@^7.24.7":
+ version "7.24.7"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.7.tgz#02efcee317d0609d2c07117cb70ef8fb17ab7315"
+ integrity sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==
+ dependencies:
+ "@babel/code-frame" "^7.24.7"
+ "@babel/parser" "^7.24.7"
+ "@babel/types" "^7.24.7"
+
+"@babel/traverse@^7.1.6":
+ version "7.24.7"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.7.tgz#de2b900163fa741721ba382163fe46a936c40cf5"
+ integrity sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==
+ dependencies:
+ "@babel/code-frame" "^7.24.7"
+ "@babel/generator" "^7.24.7"
+ "@babel/helper-environment-visitor" "^7.24.7"
+ "@babel/helper-function-name" "^7.24.7"
+ "@babel/helper-hoist-variables" "^7.24.7"
+ "@babel/helper-split-export-declaration" "^7.24.7"
+ "@babel/parser" "^7.24.7"
+ "@babel/types" "^7.24.7"
+ debug "^4.3.1"
+ globals "^11.1.0"
+
"@babel/traverse@^7.24.6":
version "7.24.6"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.6.tgz#0941ec50cdeaeacad0911eb67ae227a4f8424edc"
@@ -1040,6 +1144,15 @@
debug "^4.3.1"
globals "^11.1.0"
+"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.24.7":
+ version "7.24.7"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.7.tgz#6027fe12bc1aa724cd32ab113fb7f1988f1f66f2"
+ integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==
+ dependencies:
+ "@babel/helper-string-parser" "^7.24.7"
+ "@babel/helper-validator-identifier" "^7.24.7"
+ to-fast-properties "^2.0.0"
+
"@babel/types@^7.24.6", "@babel/types@^7.4.4":
version "7.24.6"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.6.tgz#ba4e1f59870c10dc2fa95a274ac4feec23b21912"
@@ -1049,6 +1162,11 @@
"@babel/helper-validator-identifier" "^7.24.6"
to-fast-properties "^2.0.0"
+"@bcoe/v8-coverage@^0.2.3":
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"
+ integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==
+
"@colors/colors@1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9"
@@ -1210,7 +1328,7 @@
resolved "https://registry.yarnpkg.com/@istanbuljs/nyc-config-babel/-/nyc-config-babel-3.0.0.tgz#56d0a5250d92b9455c7507775fcb5cb7215fee29"
integrity sha512-mPnSPXfTRWCzYsT64PnuPlce6/hGMCdVVMgU2FenXipbUd+FDwUlqlTihXxpxWzcNVOp8M+L1t/kIcgoC8A7hg==
-"@istanbuljs/schema@^0.1.2":
+"@istanbuljs/schema@^0.1.2", "@istanbuljs/schema@^0.1.3":
version "0.1.3"
resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98"
integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==
@@ -1274,7 +1392,7 @@
"@jridgewell/resolve-uri" "^3.0.3"
"@jridgewell/sourcemap-codec" "^1.4.10"
-"@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25":
+"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25":
version "0.3.25"
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0"
integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==
@@ -1433,6 +1551,18 @@
resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.4.tgz#0b92dcc0cc1c81f6f306a381f28e31b1a56536e9"
integrity sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==
+"@types/babel-types@*", "@types/babel-types@^7.0.0":
+ version "7.0.15"
+ resolved "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-7.0.15.tgz#11fb1ab5a4f984d00d1c80a768f6fb8d59f96966"
+ integrity sha512-JUgfZHUOMbtjopxiOQaaF+Uovk5wpDqpXR+XLWiOivCWSy1FccO30lvNNpCt8geFwq8VmGT2y9OMkOpA0g5O5g==
+
+"@types/babylon@^6.16.2":
+ version "6.16.9"
+ resolved "https://registry.yarnpkg.com/@types/babylon/-/babylon-6.16.9.tgz#7abf03f6591a921fe3171af91433077cd2666e36"
+ integrity sha512-sEKyxMVEowhcr8WLfN0jJYe4gS4Z9KC2DGz0vqfC7+MXFbmvOF7jSjALC77thvAO2TLgFUPa9vDeOak+AcUrZA==
+ dependencies:
+ "@types/babel-types" "*"
+
"@types/chai@4", "@types/chai@^4.3.14":
version "4.3.16"
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.16.tgz#b1572967f0b8b60bf3f87fe1d854a5604ea70c82"
@@ -1486,7 +1616,7 @@
resolved "https://registry.yarnpkg.com/@types/eventsource/-/eventsource-1.1.15.tgz#949383d3482e20557cbecbf3b038368d94b6be27"
integrity sha512-XQmGcbnxUNa06HR3VBVkc9+A2Vpi9ZyLJcdS5dwaQQ/4ZMWFO+5c90FnMUpbtMZwB/FChoYHwuVg8TvkECacTA==
-"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0":
+"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1":
version "2.0.6"
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7"
integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==
@@ -1904,6 +2034,18 @@ accepts@~1.3.4:
mime-types "~2.1.34"
negotiator "0.6.3"
+ace-builds@^1.4.13:
+ version "1.34.2"
+ resolved "https://registry.yarnpkg.com/ace-builds/-/ace-builds-1.34.2.tgz#c17c6fd7c661c7ba33f57533a42004a7b3f8dcbd"
+ integrity sha512-wiOZYuxyOSYfZzDasQTe+ZWmRlYxXSJM/kMKZ/bSqO1VgrBl+PaaTz/Sc+y7hXCKAUj3syUdpwxQyvwv9vQe6w==
+
+acorn-globals@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf"
+ integrity sha512-uWttZCk96+7itPxK8xCzY86PnxKTMrReKDqrHzv42VQY0K30PUO8WY13WMOuI+cOdX4EIdzdvQ8k6jkuGRFMYw==
+ dependencies:
+ acorn "^4.0.4"
+
acorn-import-assertions@^1.9.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz#507276249d684797c84e0734ef84860334cfb1ac"
@@ -1919,6 +2061,16 @@ acorn-walk@^8.1.1, acorn-walk@^8.2.0:
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.2.tgz#7703af9415f1b6db9315d6895503862e231d34aa"
integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==
+acorn@^3.1.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a"
+ integrity sha512-OLUyIIZ7mF5oaAUT1w0TFqQS81q3saT46x8t7ukpPjMNk+nbs4ZHhs7ToV8EWnLYLepjETXd4XaCE4uxkMeqUw==
+
+acorn@^4.0.4, acorn@~4.0.2:
+ version "4.0.13"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787"
+ integrity sha512-fu2ygVGuMmlzG8ZeRJ0bvR41nsAkxxhbyk8bZ1SS521Z7vmgJFTQQlfz/Mp/nJexGBz+v8sC9bM6+lNgskt4Ug==
+
acorn@^8.4.1, acorn@^8.7.1, acorn@^8.8.2, acorn@^8.9.0:
version "8.11.3"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.11.3.tgz#71e0b14e13a4ec160724b38fb7b0f233b1b81d7a"
@@ -1979,6 +2131,15 @@ ajv@^8.0.0, ajv@^8.9.0:
require-from-string "^2.0.2"
uri-js "^4.4.1"
+align-text@^0.1.1, align-text@^0.1.3:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
+ integrity sha512-GrTZLRpmp6wIC2ztrWW9MjjTgSKccffgFagbNDOX95/dcjEcYZibYTeaOntySQLcdw1ztBoFkviiUvTMbb9MYg==
+ dependencies:
+ kind-of "^3.0.2"
+ longest "^1.0.1"
+ repeat-string "^1.5.2"
+
ansi-colors@4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348"
@@ -2169,7 +2330,7 @@ arrify@^3.0.0:
resolved "https://registry.yarnpkg.com/arrify/-/arrify-3.0.0.tgz#ccdefb8eaf2a1d2ab0da1ca2ce53118759fd46bc"
integrity sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw==
-asap@^2.0.0:
+asap@^2.0.0, asap@~2.0.3:
version "2.0.6"
resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"
integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==
@@ -2211,6 +2372,18 @@ assertion-error@^1.1.0:
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b"
integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==
+ast-types@0.12.4, ast-types@^0.12.2:
+ version "0.12.4"
+ resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.12.4.tgz#71ce6383800f24efc9a1a3308f3a6e420a0974d1"
+ integrity sha512-ky/YVYCbtVAS8TdMIaTiPFHwEpRB5z1hctepJplTr3UW5q8TDrpIMCILyk8pmLxGtn2KCtC/lSn7zOsaI7nzDw==
+
+ast-types@^0.14.2:
+ version "0.14.2"
+ resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.14.2.tgz#600b882df8583e3cd4f2df5fa20fa83759d4bdfd"
+ integrity sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA==
+ dependencies:
+ tslib "^2.0.1"
+
asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
@@ -2347,6 +2520,29 @@ babel-plugin-polyfill-regenerator@^0.6.1:
dependencies:
"@babel/helper-define-polyfill-provider" "^0.6.2"
+babel-runtime@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
+ integrity sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==
+ dependencies:
+ core-js "^2.4.0"
+ regenerator-runtime "^0.11.0"
+
+babel-types@^6.26.0:
+ version "6.26.0"
+ resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497"
+ integrity sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==
+ dependencies:
+ babel-runtime "^6.26.0"
+ esutils "^2.0.2"
+ lodash "^4.17.4"
+ to-fast-properties "^1.0.3"
+
+babylon@^6.18.0:
+ version "6.18.0"
+ resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3"
+ integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==
+
balanced-match@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
@@ -2379,6 +2575,20 @@ bcrypt-pbkdf@^1.0.0:
dependencies:
tweetnacl "^0.14.3"
+better-docs@^2.7.3:
+ version "2.7.3"
+ resolved "https://registry.yarnpkg.com/better-docs/-/better-docs-2.7.3.tgz#bdeec1b24514bc22562af2a277c2cf527abbe726"
+ integrity sha512-OEk9e7RQUQbo1DmVo0mdsALZ+mT0SwIen7/DGnN4xKNktXKgz1j7+KQ2pObNHHVSFGu8YMQW/Ig1v6eiTkdnbw==
+ dependencies:
+ brace "^0.11.1"
+ react-ace "^9.5.0"
+ react-docgen "^5.4.0"
+ react-frame-component "^5.2.1"
+ typescript "^4.5.4"
+ underscore "^1.13.2"
+ vue-docgen-api "^3.26.0"
+ vue2-ace-editor "^0.0.15"
+
bignumber.js@^9.1.2:
version "9.1.2"
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.2.tgz#b7c4242259c008903b13707983b5f4bbd31eda0c"
@@ -2442,6 +2652,11 @@ brace-expansion@^2.0.1:
dependencies:
balanced-match "^1.0.0"
+brace@^0.11.0, brace@^0.11.1:
+ version "0.11.1"
+ resolved "https://registry.yarnpkg.com/brace/-/brace-0.11.1.tgz#4896fcc9d544eef45f4bb7660db320d3b379fe58"
+ integrity sha512-Fc8Ne62jJlKHiG/ajlonC4Sd66Pq68fFwK4ihJGNZpGqboc324SQk+lRvMzpPRuJOmfrJefdG8/7JdWX4bzJ2Q==
+
braces@^3.0.2, braces@^3.0.3, braces@~3.0.2:
version "3.0.3"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
@@ -2564,6 +2779,24 @@ bytes@3.1.2:
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5"
integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==
+c8@^7.6.0:
+ version "7.14.0"
+ resolved "https://registry.yarnpkg.com/c8/-/c8-7.14.0.tgz#f368184c73b125a80565e9ab2396ff0be4d732f3"
+ integrity sha512-i04rtkkcNcCf7zsQcSv/T9EbUn4RXQ6mropeMcjFOsQXQ0iGLAr/xT6TImQg4+U9hmNpN9XdvPkjUL1IzbgxJw==
+ dependencies:
+ "@bcoe/v8-coverage" "^0.2.3"
+ "@istanbuljs/schema" "^0.1.3"
+ find-up "^5.0.0"
+ foreground-child "^2.0.0"
+ istanbul-lib-coverage "^3.2.0"
+ istanbul-lib-report "^3.0.0"
+ istanbul-reports "^3.1.4"
+ rimraf "^3.0.2"
+ test-exclude "^6.0.0"
+ v8-to-istanbul "^9.0.0"
+ yargs "^16.2.0"
+ yargs-parser "^20.2.9"
+
cachedir@^2.0.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/cachedir/-/cachedir-2.4.0.tgz#7fef9cf7367233d7c88068fe6e34ed0d355a610d"
@@ -2613,6 +2846,11 @@ camel-case@^4.1.2:
pascal-case "^3.1.2"
tslib "^2.0.3"
+camelcase@^1.0.2:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
+ integrity sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==
+
camelcase@^5.0.0, camelcase@^5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
@@ -2647,6 +2885,14 @@ cbor@^8.1.0:
dependencies:
nofilter "^3.1.0"
+center-align@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
+ integrity sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ==
+ dependencies:
+ align-text "^0.1.3"
+ lazy-cache "^1.0.3"
+
chai-as-promised@^7.1.1:
version "7.1.2"
resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.2.tgz#70cd73b74afd519754161386421fb71832c6d041"
@@ -2708,6 +2954,13 @@ char-regex@^1.0.2:
resolved "https://registry.yarnpkg.com/char-regex/-/char-regex-1.0.2.tgz#d744358226217f981ed58f479b1d6bcc29545dcf"
integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==
+character-parser@^2.1.1:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/character-parser/-/character-parser-2.2.0.tgz#c7ce28f36d4bcd9744e5ffc2c5fcde1c73261fc0"
+ integrity sha512-+UqJQjFEFaTAs3bNsF2j2kEN1baG/zghZbdqoYEDxGZtJo9LBzl1A+m0D4n3qKx8N2FNv8/Xp6yV9mQmBuptaw==
+ dependencies:
+ is-regex "^1.0.3"
+
charm@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/charm/-/charm-1.0.2.tgz#8add367153a6d9a581331052c4090991da995e35"
@@ -2790,6 +3043,13 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:
inherits "^2.0.1"
safe-buffer "^5.0.1"
+clean-css@^4.1.11:
+ version "4.2.4"
+ resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.4.tgz#733bf46eba4e607c6891ea57c24a989356831178"
+ integrity sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==
+ dependencies:
+ source-map "~0.6.0"
+
clean-css@~5.3.2:
version "5.3.3"
resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.3.tgz#b330653cd3bd6b75009cc25c714cae7b93351ccd"
@@ -2870,6 +3130,15 @@ cli-truncate@^4.0.0:
slice-ansi "^5.0.0"
string-width "^7.0.0"
+cliui@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
+ integrity sha512-GIOYRizG+TGoc7Wgc1LiOTLare95R3mzKgoln+Q/lE4ceiYH19gUpl0l0Ffq4lJDEf3FxujMe6IBfOCs7pfqNA==
+ dependencies:
+ center-align "^0.1.1"
+ right-align "^0.1.1"
+ wordwrap "0.0.2"
+
cliui@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1"
@@ -2971,7 +3240,7 @@ commander@^10.0.0, commander@^10.0.1:
resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06"
integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==
-commander@^2.20.0:
+commander@^2.19.0, commander@^2.20.0:
version "2.20.3"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
@@ -2981,16 +3250,16 @@ commander@^6.2.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c"
integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==
-commander@~12.1.0:
- version "12.1.0"
- resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3"
- integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==
-
commander@^9.0.0:
version "9.5.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30"
integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==
+commander@~12.1.0:
+ version "12.1.0"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3"
+ integrity sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==
+
commander@~2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.1.0.tgz#d121bbae860d9992a3d517ba96f56588e47c6781"
@@ -3070,6 +3339,16 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0:
resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==
+constantinople@^3.0.1, constantinople@^3.1.2:
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/constantinople/-/constantinople-3.1.2.tgz#d45ed724f57d3d10500017a7d3a889c1381ae647"
+ integrity sha512-yePcBqEFhLOqSBtwYOGGS1exHo/s1xjekXiinh4itpNQGCu4KA1euPh1fg07N2wMITZXQkBz75Ntdt1ctGZouw==
+ dependencies:
+ "@types/babel-types" "^7.0.0"
+ "@types/babylon" "^6.16.2"
+ babel-types "^6.26.0"
+ babylon "^6.18.0"
+
constants-browserify@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75"
@@ -3112,6 +3391,11 @@ core-js-compat@^3.31.0, core-js-compat@^3.36.1:
dependencies:
browserslist "^4.23.0"
+core-js@^2.4.0:
+ version "2.6.12"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec"
+ integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==
+
core-util-is@1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
@@ -3257,6 +3541,11 @@ date-time@^3.1.0:
dependencies:
time-zone "^1.0.0"
+de-indent@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d"
+ integrity sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==
+
debug@2.6.9:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
@@ -3278,7 +3567,7 @@ debug@^3.2.7:
dependencies:
ms "^2.1.1"
-decamelize@^1.2.0:
+decamelize@^1.0.0, decamelize@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==
@@ -3366,6 +3655,11 @@ di@^0.0.1:
resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c"
integrity sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA==
+diff-match-patch@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/diff-match-patch/-/diff-match-patch-1.0.5.tgz#abb584d5f10cd1196dfc55aa03701592ae3f7b37"
+ integrity sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==
+
diff@5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b"
@@ -3411,6 +3705,11 @@ doctrine@^3.0.0:
dependencies:
esutils "^2.0.2"
+doctypes@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/doctypes/-/doctypes-1.1.0.tgz#ea80b106a87538774e8a3a4a5afe293de489e0a9"
+ integrity sha512-LLBi6pEqS6Do3EKQ3J0NqHWV5hhb78Pi8vvESYwyOy2c31ZEZVdtitdzsQsKb7878PEERhzUk0ftqGhG6Mz+pQ==
+
dom-serialize@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b"
@@ -3895,7 +4194,7 @@ espree@^9.6.0, espree@^9.6.1:
acorn-jsx "^5.3.2"
eslint-visitor-keys "^3.4.1"
-esprima@^4.0.0:
+esprima@^4.0.0, esprima@~4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
@@ -3924,6 +4223,15 @@ estraverse@^5.1.0, estraverse@^5.2.0:
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123"
integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==
+estree-to-babel@^3.1.0:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/estree-to-babel/-/estree-to-babel-3.2.1.tgz#82e78315275c3ca74475fdc8ac1a5103c8a75bf5"
+ integrity sha512-YNF+mZ/Wu2FU/gvmzuWtYc8rloubL7wfXCTgouFrnjGVXPA/EeYYA7pupXWrb3Iv1cTBeSSxxJIbK23l4MRNqg==
+ dependencies:
+ "@babel/traverse" "^7.1.6"
+ "@babel/types" "^7.2.0"
+ c8 "^7.6.0"
+
esutils@^2.0.2, esutils@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
@@ -4556,6 +4864,11 @@ hash-base@~3.0:
inherits "^2.0.1"
safe-buffer "^5.0.1"
+hash-sum@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/hash-sum/-/hash-sum-1.0.2.tgz#33b40777754c6432573c120cc3808bbd10d47f04"
+ integrity sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==
+
hash.js@^1.0.0, hash.js@^1.0.3:
version "1.1.7"
resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42"
@@ -4579,7 +4892,7 @@ hasown@^2.0.0, hasown@^2.0.1, hasown@^2.0.2:
dependencies:
function-bind "^1.1.2"
-he@1.2.0:
+he@1.2.0, he@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
@@ -4800,6 +5113,11 @@ is-boolean-object@^1.1.0:
call-bind "^1.0.2"
has-tostringtag "^1.0.0"
+is-buffer@^1.1.5:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
+ integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==
+
is-buffer@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191"
@@ -4841,6 +5159,14 @@ is-error@^2.2.2:
resolved "https://registry.yarnpkg.com/is-error/-/is-error-2.2.2.tgz#c10ade187b3c93510c5470a5567833ee25649843"
integrity sha512-IOQqts/aHWbiisY5DuPJQ0gcbvaLFCa7fBa9xoLfxBZvQ+ZI/Zh9xoI7Gk+G64N0FdK4AbibytHht2tWgpJWLg==
+is-expression@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-expression/-/is-expression-3.0.0.tgz#39acaa6be7fd1f3471dc42c7416e61c24317ac9f"
+ integrity sha512-vyMeQMq+AiH5uUnoBfMTwf18tO3bM6k1QXBE9D6ueAAquEfCZe3AJPtud9g6qS0+4X8xA7ndpZiDyeb2l2qOBw==
+ dependencies:
+ acorn "~4.0.2"
+ object-assign "^4.0.1"
+
is-extglob@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
@@ -4938,12 +5264,17 @@ is-plain-object@^5.0.0:
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344"
integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==
+is-promise@^2.0.0:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1"
+ integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==
+
is-promise@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-4.0.0.tgz#42ff9f84206c1991d26debf520dd5c01042dd2f3"
integrity sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==
-is-regex@^1.1.4:
+is-regex@^1.0.3, is-regex@^1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958"
integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==
@@ -5121,7 +5452,7 @@ istanbul-lib-source-maps@^4.0.0, istanbul-lib-source-maps@^4.0.1:
istanbul-lib-coverage "^3.0.0"
source-map "^0.6.1"
-istanbul-reports@^3.0.2, istanbul-reports@^3.0.5:
+istanbul-reports@^3.0.2, istanbul-reports@^3.0.5, istanbul-reports@^3.1.4:
version "3.1.7"
resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.1.7.tgz#daed12b9e1dca518e15c056e1e537e741280fa0b"
integrity sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==
@@ -5165,7 +5496,12 @@ js-string-escape@^1.0.1:
resolved "https://registry.yarnpkg.com/js-string-escape/-/js-string-escape-1.0.1.tgz#e2625badbc0d67c7533e9edc1068c587ae4137ef"
integrity sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==
-js-tokens@^4.0.0:
+js-stringify@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/js-stringify/-/js-stringify-1.0.2.tgz#1736fddfd9724f28a3682adc6230ae7e4e9679db"
+ integrity sha512-rtS5ATOo2Q5k1G+DADISilDA6lv79zIiwFd6CcjuIxGKLFm5C+RLImRscVap9k55i+MOZwgliw+NejvkLuGD5g==
+
+"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
@@ -5328,6 +5664,14 @@ jsprim@^1.2.2:
json-schema "0.4.0"
verror "1.10.0"
+jstransformer@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/jstransformer/-/jstransformer-1.0.0.tgz#ed8bf0921e2f3f1ed4d5c1a44f68709ed24722c3"
+ integrity sha512-C9YK3Rf8q6VAPDCCU9fnqo3mAfOH6vUGnMcP4AQAYIEpWtfGLpwOTmZ+igtdK5y+VvI2n3CyYSzy4Qh34eq24A==
+ dependencies:
+ is-promise "^2.0.0"
+ promise "^7.0.1"
+
just-extend@^6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-6.2.0.tgz#b816abfb3d67ee860482e7401564672558163947"
@@ -5423,6 +5767,13 @@ keyv@^4.5.3:
dependencies:
json-buffer "3.0.1"
+kind-of@^3.0.2:
+ version "3.2.2"
+ resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
+ integrity sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==
+ dependencies:
+ is-buffer "^1.1.5"
+
kind-of@^6.0.2:
version "6.0.3"
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd"
@@ -5442,6 +5793,11 @@ klaw@^3.0.0:
dependencies:
graceful-fs "^4.1.9"
+lazy-cache@^1.0.3:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
+ integrity sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ==
+
levn@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade"
@@ -5561,12 +5917,17 @@ lodash.get@^4.4.2:
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==
+lodash.isequal@^4.5.0:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
+ integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==
+
lodash.merge@^4.6.2:
version "4.6.2"
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a"
integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==
-lodash@^4.17.15, lodash@^4.17.21:
+lodash@^4.17.15, lodash@^4.17.21, lodash@^4.17.4:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
@@ -5601,6 +5962,18 @@ log4js@^6.4.1:
rfdc "^1.3.0"
streamroller "^3.1.5"
+longest@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
+ integrity sha512-k+yt5n3l48JU4k8ftnKG6V7u32wyH2NfKzeMto9F/QRE0amxy/LayxwlvjjkZEIzqR+19IrtFO8p5kB9QaYUFg==
+
+loose-envify@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
+ integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
+ dependencies:
+ js-tokens "^3.0.0 || ^4.0.0"
+
loupe@^2.3.6:
version "2.3.7"
resolved "https://registry.yarnpkg.com/loupe/-/loupe-2.3.7.tgz#6e69b7d4db7d3ab436328013d37d1c8c3540c697"
@@ -5615,6 +5988,14 @@ lower-case@^2.0.2:
dependencies:
tslib "^2.0.3"
+lru-cache@^4.1.5:
+ version "4.1.5"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd"
+ integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==
+ dependencies:
+ pseudomap "^1.0.2"
+ yallist "^2.1.2"
+
lru-cache@^5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
@@ -5806,6 +6187,11 @@ mimic-fn@^4.0.0:
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-4.0.0.tgz#60a90550d5cb0b239cca65d893b1a53b29871ecc"
integrity sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==
+min-indent@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869"
+ integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==
+
minami@^1.1.1:
version "1.2.3"
resolved "https://registry.yarnpkg.com/minami/-/minami-1.2.3.tgz#99b6dcdfb2f0a54da1c9c8f7aa3a327787aaf9f8"
@@ -5835,7 +6221,7 @@ minimatch@9.0.3:
dependencies:
brace-expansion "^2.0.1"
-minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2:
+minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
@@ -5953,7 +6339,7 @@ negotiator@0.6.3:
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd"
integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==
-neo-async@^2.6.2:
+neo-async@^2.6.1, neo-async@^2.6.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==
@@ -5977,6 +6363,13 @@ no-case@^3.0.4:
lower-case "^2.0.2"
tslib "^2.0.3"
+node-dir@^0.1.10:
+ version "0.1.17"
+ resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5"
+ integrity sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg==
+ dependencies:
+ minimatch "^3.0.2"
+
node-emoji@^2.1.3:
version "2.1.3"
resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-2.1.3.tgz#93cfabb5cc7c3653aa52f29d6ffb7927d8047c06"
@@ -6123,7 +6516,7 @@ oauth-sign@~0.9.0:
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==
-object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0:
+object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
@@ -6585,6 +6978,11 @@ pretty-ms@^8.0.0:
dependencies:
parse-ms "^3.0.0"
+private@^0.1.8:
+ version "0.1.8"
+ resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
+ integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==
+
process-nextick-args@~2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
@@ -6602,11 +7000,32 @@ process@^0.11.10:
resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==
+promise@^7.0.1:
+ version "7.3.1"
+ resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf"
+ integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==
+ dependencies:
+ asap "~2.0.3"
+
+prop-types@^15.7.2:
+ version "15.8.1"
+ resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
+ integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
+ dependencies:
+ loose-envify "^1.4.0"
+ object-assign "^4.1.1"
+ react-is "^16.13.1"
+
proxy-from-env@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==
+pseudomap@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
+ integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==
+
psl@^1.1.28:
version "1.9.0"
resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7"
@@ -6624,6 +7043,111 @@ public-encrypt@^4.0.0:
randombytes "^2.0.1"
safe-buffer "^5.1.2"
+pug-attrs@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/pug-attrs/-/pug-attrs-2.0.4.tgz#b2f44c439e4eb4ad5d4ef25cac20d18ad28cc336"
+ integrity sha512-TaZ4Z2TWUPDJcV3wjU3RtUXMrd3kM4Wzjbe3EWnSsZPsJ3LDI0F3yCnf2/W7PPFF+edUFQ0HgDL1IoxSz5K8EQ==
+ dependencies:
+ constantinople "^3.0.1"
+ js-stringify "^1.0.1"
+ pug-runtime "^2.0.5"
+
+pug-code-gen@^2.0.2:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/pug-code-gen/-/pug-code-gen-2.0.3.tgz#122eb9ada9b5bf601705fe15aaa0a7d26bc134ab"
+ integrity sha512-r9sezXdDuZJfW9J91TN/2LFbiqDhmltTFmGpHTsGdrNGp3p4SxAjjXEfnuK2e4ywYsRIVP0NeLbSAMHUcaX1EA==
+ dependencies:
+ constantinople "^3.1.2"
+ doctypes "^1.1.0"
+ js-stringify "^1.0.1"
+ pug-attrs "^2.0.4"
+ pug-error "^1.3.3"
+ pug-runtime "^2.0.5"
+ void-elements "^2.0.1"
+ with "^5.0.0"
+
+pug-error@^1.3.3:
+ version "1.3.3"
+ resolved "https://registry.yarnpkg.com/pug-error/-/pug-error-1.3.3.tgz#f342fb008752d58034c185de03602dd9ffe15fa6"
+ integrity sha512-qE3YhESP2mRAWMFJgKdtT5D7ckThRScXRwkfo+Erqga7dyJdY3ZquspprMCj/9sJ2ijm5hXFWQE/A3l4poMWiQ==
+
+pug-filters@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/pug-filters/-/pug-filters-3.1.1.tgz#ab2cc82db9eeccf578bda89130e252a0db026aa7"
+ integrity sha512-lFfjNyGEyVWC4BwX0WyvkoWLapI5xHSM3xZJFUhx4JM4XyyRdO8Aucc6pCygnqV2uSgJFaJWW3Ft1wCWSoQkQg==
+ dependencies:
+ clean-css "^4.1.11"
+ constantinople "^3.0.1"
+ jstransformer "1.0.0"
+ pug-error "^1.3.3"
+ pug-walk "^1.1.8"
+ resolve "^1.1.6"
+ uglify-js "^2.6.1"
+
+pug-lexer@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/pug-lexer/-/pug-lexer-4.1.0.tgz#531cde48c7c0b1fcbbc2b85485c8665e31489cfd"
+ integrity sha512-i55yzEBtjm0mlplW4LoANq7k3S8gDdfC6+LThGEvsK4FuobcKfDAwt6V4jKPH9RtiE3a2Akfg5UpafZ1OksaPA==
+ dependencies:
+ character-parser "^2.1.1"
+ is-expression "^3.0.0"
+ pug-error "^1.3.3"
+
+pug-linker@^3.0.6:
+ version "3.0.6"
+ resolved "https://registry.yarnpkg.com/pug-linker/-/pug-linker-3.0.6.tgz#f5bf218b0efd65ce6670f7afc51658d0f82989fb"
+ integrity sha512-bagfuHttfQOpANGy1Y6NJ+0mNb7dD2MswFG2ZKj22s8g0wVsojpRlqveEQHmgXXcfROB2RT6oqbPYr9EN2ZWzg==
+ dependencies:
+ pug-error "^1.3.3"
+ pug-walk "^1.1.8"
+
+pug-load@^2.0.12:
+ version "2.0.12"
+ resolved "https://registry.yarnpkg.com/pug-load/-/pug-load-2.0.12.tgz#d38c85eb85f6e2f704dea14dcca94144d35d3e7b"
+ integrity sha512-UqpgGpyyXRYgJs/X60sE6SIf8UBsmcHYKNaOccyVLEuT6OPBIMo6xMPhoJnqtB3Q3BbO4Z3Bjz5qDsUWh4rXsg==
+ dependencies:
+ object-assign "^4.1.0"
+ pug-walk "^1.1.8"
+
+pug-parser@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/pug-parser/-/pug-parser-5.0.1.tgz#03e7ada48b6840bd3822f867d7d90f842d0ffdc9"
+ integrity sha512-nGHqK+w07p5/PsPIyzkTQfzlYfuqoiGjaoqHv1LjOv2ZLXmGX1O+4Vcvps+P4LhxZ3drYSljjq4b+Naid126wA==
+ dependencies:
+ pug-error "^1.3.3"
+ token-stream "0.0.1"
+
+pug-runtime@^2.0.5:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/pug-runtime/-/pug-runtime-2.0.5.tgz#6da7976c36bf22f68e733c359240d8ae7a32953a"
+ integrity sha512-P+rXKn9un4fQY77wtpcuFyvFaBww7/91f3jHa154qU26qFAnOe6SW1CbIDcxiG5lLK9HazYrMCCuDvNgDQNptw==
+
+pug-strip-comments@^1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/pug-strip-comments/-/pug-strip-comments-1.0.4.tgz#cc1b6de1f6e8f5931cf02ec66cdffd3f50eaf8a8"
+ integrity sha512-i5j/9CS4yFhSxHp5iKPHwigaig/VV9g+FgReLJWWHEHbvKsbqL0oP/K5ubuLco6Wu3Kan5p7u7qk8A4oLLh6vw==
+ dependencies:
+ pug-error "^1.3.3"
+
+pug-walk@^1.1.8:
+ version "1.1.8"
+ resolved "https://registry.yarnpkg.com/pug-walk/-/pug-walk-1.1.8.tgz#b408f67f27912f8c21da2f45b7230c4bd2a5ea7a"
+ integrity sha512-GMu3M5nUL3fju4/egXwZO0XLi6fW/K3T3VTgFQ14GxNi8btlxgT5qZL//JwZFm/2Fa64J/PNS8AZeys3wiMkVA==
+
+pug@^2.0.3:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/pug/-/pug-2.0.4.tgz#ee7682ec0a60494b38d48a88f05f3b0ac931377d"
+ integrity sha512-XhoaDlvi6NIzL49nu094R2NA6P37ijtgMDuWE+ofekDChvfKnzFal60bhSdiy8y2PBO6fmz3oMEIcfpBVRUdvw==
+ dependencies:
+ pug-code-gen "^2.0.2"
+ pug-filters "^3.1.1"
+ pug-lexer "^4.1.0"
+ pug-linker "^3.0.6"
+ pug-load "^2.0.12"
+ pug-parser "^5.0.1"
+ pug-runtime "^2.0.5"
+ pug-strip-comments "^1.0.4"
+
punycode.js@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/punycode.js/-/punycode.js-2.3.1.tgz#6b53e56ad75588234e79f4affa90972c7dd8cdb7"
@@ -6708,6 +7232,43 @@ raw-body@2.5.2:
iconv-lite "0.4.24"
unpipe "1.0.0"
+react-ace@^9.5.0:
+ version "9.5.0"
+ resolved "https://registry.yarnpkg.com/react-ace/-/react-ace-9.5.0.tgz#b6c32b70d404dd821a7e01accc2d76da667ff1f7"
+ integrity sha512-4l5FgwGh6K7A0yWVMQlPIXDItM4Q9zzXRqOae8KkCl6MkOob7sC1CzHxZdOGvV+QioKWbX2p5HcdOVUv6cAdSg==
+ dependencies:
+ ace-builds "^1.4.13"
+ diff-match-patch "^1.0.5"
+ lodash.get "^4.4.2"
+ lodash.isequal "^4.5.0"
+ prop-types "^15.7.2"
+
+react-docgen@^5.4.0:
+ version "5.4.3"
+ resolved "https://registry.yarnpkg.com/react-docgen/-/react-docgen-5.4.3.tgz#7d297f73b977d0c7611402e5fc2a168acf332b26"
+ integrity sha512-xlLJyOlnfr8lLEEeaDZ+X2J/KJoe6Nr9AzxnkdQWush5hz2ZSu66w6iLMOScMmxoSHWpWMn+k3v5ZiyCfcWsOA==
+ dependencies:
+ "@babel/core" "^7.7.5"
+ "@babel/generator" "^7.12.11"
+ "@babel/runtime" "^7.7.6"
+ ast-types "^0.14.2"
+ commander "^2.19.0"
+ doctrine "^3.0.0"
+ estree-to-babel "^3.1.0"
+ neo-async "^2.6.1"
+ node-dir "^0.1.10"
+ strip-indent "^3.0.0"
+
+react-frame-component@^5.2.1:
+ version "5.2.7"
+ resolved "https://registry.yarnpkg.com/react-frame-component/-/react-frame-component-5.2.7.tgz#e31c0943be95fdf667c59d6d7fcf18c1dda4d4b2"
+ integrity sha512-ROjHtSLoSVYUBfTieazj/nL8jIX9rZFmHC0yXEU+dx6Y82OcBEGgU9o7VyHMrBFUN9FuQ849MtIPNNLsb4krbg==
+
+react-is@^16.13.1:
+ version "16.13.1"
+ resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
+ integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
+
readable-stream@^2.0.6, readable-stream@^2.3.8:
version "2.3.8"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b"
@@ -6748,6 +7309,16 @@ readdirp@~3.6.0:
dependencies:
picomatch "^2.2.1"
+recast@^0.17.3:
+ version "0.17.6"
+ resolved "https://registry.yarnpkg.com/recast/-/recast-0.17.6.tgz#64ae98d0d2dfb10ff92ff5fb9ffb7371823b69fa"
+ integrity sha512-yoQRMRrK1lszNtbkGyM4kN45AwylV5hMiuEveUBlxytUViWevjvX6w+tzJt1LH4cfUhWt4NZvy3ThIhu6+m5wQ==
+ dependencies:
+ ast-types "0.12.4"
+ esprima "~4.0.0"
+ private "^0.1.8"
+ source-map "~0.6.1"
+
rechoir@^0.8.0:
version "0.8.0"
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.8.0.tgz#49f866e0d32146142da3ad8f0eff352b3215ff22"
@@ -6767,6 +7338,11 @@ regenerate@^1.4.2:
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a"
integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==
+regenerator-runtime@^0.11.0:
+ version "0.11.1"
+ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
+ integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==
+
regenerator-runtime@^0.14.0:
version "0.14.1"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f"
@@ -6825,6 +7401,11 @@ release-zalgo@^1.0.0:
dependencies:
es6-error "^4.0.1"
+repeat-string@^1.5.2:
+ version "1.6.1"
+ resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
+ integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==
+
request@^2.88.2:
version "2.88.2"
resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3"
@@ -6895,7 +7476,7 @@ resolve-from@^5.0.0:
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69"
integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==
-resolve@^1.10.1, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.4:
+resolve@^1.1.6, resolve@^1.10.1, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.22.4:
version "1.22.8"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d"
integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==
@@ -6927,6 +7508,13 @@ rfdc@^1.3.0, rfdc@^1.3.1:
resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.1.tgz#2b6d4df52dffe8bb346992a10ea9451f24373a8f"
integrity sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==
+right-align@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
+ integrity sha512-yqINtL/G7vs2v+dFIZmFUDbnVyFUJFKd6gK22Kgo6R4jfJGFtisKyncWDDULgjfqf4ASQuIQyjJ7XZ+3aWpsAg==
+ dependencies:
+ align-text "^0.1.1"
+
rimraf@^3.0.0, rimraf@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a"
@@ -7233,11 +7821,16 @@ source-map-support@^0.5.16, source-map-support@~0.5.20:
buffer-from "^1.0.0"
source-map "^0.6.0"
-source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0:
+source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
+source-map@~0.5.1:
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
+ integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==
+
spawn-command@0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2.tgz#9544e1a43ca045f8531aac1a48cb29bdae62338e"
@@ -7494,6 +8087,13 @@ strip-final-newline@^3.0.0:
resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-3.0.0.tgz#52894c313fbff318835280aed60ff71ebf12b8fd"
integrity sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==
+strip-indent@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-3.0.0.tgz#c32e1cee940b6b3432c771bc2c54bcce73cd3001"
+ integrity sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==
+ dependencies:
+ min-indent "^1.0.0"
+
strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006"
@@ -7669,6 +8269,11 @@ tmp@^0.2.1:
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.3.tgz#eb783cc22bc1e8bebd0671476d46ea4eb32a79ae"
integrity sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==
+to-fast-properties@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47"
+ integrity sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og==
+
to-fast-properties@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
@@ -7686,6 +8291,11 @@ toidentifier@1.0.1:
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35"
integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==
+token-stream@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/token-stream/-/token-stream-0.0.1.tgz#ceeefc717a76c4316f126d0b9dbaa55d7e7df01a"
+ integrity sha512-nfjOAu/zAWmX9tgwi5NRp7O7zTDUD1miHiB40klUnAh9qnL1iXdgzcz/i5dMaL5jahcBAaSfmNOBBJBLJW8TEg==
+
toml@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/toml/-/toml-3.0.0.tgz#342160f1af1904ec9d204d03a5d61222d762c5ee"
@@ -7709,6 +8319,11 @@ ts-expose-internals-conditionally@1.0.0-empty.0:
resolved "https://registry.yarnpkg.com/ts-expose-internals-conditionally/-/ts-expose-internals-conditionally-1.0.0-empty.0.tgz#fd9e5acb481466b0f5936f6e246eb37d0c3ceb28"
integrity sha512-F8m9NOF6ZhdOClDVdlM8gj3fDCav4ZIFSs/EI3ksQbAAXVSCN/Jh5OCJDDZWBuBy9psFc6jULGDlPwjMYMhJDw==
+ts-map@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/ts-map/-/ts-map-1.0.3.tgz#1c4d218dec813d2103b7e04e4bcf348e1471c1ff"
+ integrity sha512-vDWbsl26LIcPGmDpoVzjEP6+hvHZkBkLW7JpvwbCv/5IYPJlsbzCVXY3wsCeAxAUeTclNOUZxnLdGh3VBD/J6w==
+
ts-node@^10.9.2:
version "10.9.2"
resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f"
@@ -7738,6 +8353,11 @@ tsconfig-paths@^3.15.0:
minimist "^1.2.6"
strip-bom "^3.0.0"
+tslib@^2.0.1:
+ version "2.6.3"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0"
+ integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==
+
tslib@^2.0.3, tslib@^2.6.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"
@@ -7911,15 +8531,15 @@ typescript@5.3.3:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37"
integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==
-typescript@^5.4.3:
- version "5.4.5"
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.5.tgz#42ccef2c571fdbd0f6718b1d1f5e6e5ef006f611"
- integrity sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==
+typescript@^3.2.2:
+ version "3.9.10"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8"
+ integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==
-typescript@5.3.3:
- version "5.3.3"
- resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37"
- integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==
+typescript@^4.5.4:
+ version "4.9.5"
+ resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
+ integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==
typescript@^5.4.3:
version "5.4.5"
@@ -7936,6 +8556,21 @@ uc.micro@^2.0.0, uc.micro@^2.1.0:
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-2.1.0.tgz#f8d3f7d0ec4c3dea35a7e3c8efa4cb8b45c9e7ee"
integrity sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==
+uglify-js@^2.6.1:
+ version "2.8.29"
+ resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
+ integrity sha512-qLq/4y2pjcU3vhlhseXGGJ7VbFO4pBANu0kwl8VCa9KEI0V8VfZIx2Fy3w01iSTA/pGwKZSmu/+I4etLNDdt5w==
+ dependencies:
+ source-map "~0.5.1"
+ yargs "~3.10.0"
+ optionalDependencies:
+ uglify-to-browserify "~1.0.0"
+
+uglify-to-browserify@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
+ integrity sha512-vb2s1lYx2xBtUgy+ta+b2J/GLVUR+wmpINwHePmPRhOsIVCG2wDzKJ0n14GslH1BifsqVzSOwQhRaCAsZ/nI4Q==
+
unbox-primitive@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e"
@@ -7946,7 +8581,7 @@ unbox-primitive@^1.0.2:
has-symbols "^1.0.3"
which-boxed-primitive "^1.0.2"
-underscore@~1.13.2:
+underscore@^1.13.2, underscore@~1.13.2:
version "1.13.6"
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.6.tgz#04786a1f589dc6c09f761fc5f45b89e935136441"
integrity sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==
@@ -8063,6 +8698,15 @@ v8-compile-cache-lib@^3.0.1:
resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf"
integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==
+v8-to-istanbul@^9.0.0:
+ version "9.2.0"
+ resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz#2ed7644a245cddd83d4e087b9b33b3e62dfd10ad"
+ integrity sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==
+ dependencies:
+ "@jridgewell/trace-mapping" "^0.3.12"
+ "@types/istanbul-lib-coverage" "^2.0.1"
+ convert-source-map "^2.0.0"
+
validate-npm-package-license@^3.0.1:
version "3.0.4"
resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a"
@@ -8102,11 +8746,42 @@ vm-browserify@^1.1.2:
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0"
integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==
-void-elements@^2.0.0:
+void-elements@^2.0.0, void-elements@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec"
integrity sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==
+vue-docgen-api@^3.26.0:
+ version "3.26.0"
+ resolved "https://registry.yarnpkg.com/vue-docgen-api/-/vue-docgen-api-3.26.0.tgz#2afc6a39e72862fbbc60ceb8510c681749f05460"
+ integrity sha512-ujdg4i5ZI/wE46RZQMFzKnDGyhEuPCu+fMA86CAd9EIek/6+OqraSVBm5ZkLrbEd5f8xxdnqMU4yiSGHHeao/Q==
+ dependencies:
+ "@babel/parser" "^7.2.3"
+ "@babel/types" "^7.0.0"
+ ast-types "^0.12.2"
+ hash-sum "^1.0.2"
+ lru-cache "^4.1.5"
+ pug "^2.0.3"
+ recast "^0.17.3"
+ ts-map "^1.0.3"
+ typescript "^3.2.2"
+ vue-template-compiler "^2.0.0"
+
+vue-template-compiler@^2.0.0:
+ version "2.7.16"
+ resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.7.16.tgz#c81b2d47753264c77ac03b9966a46637482bb03b"
+ integrity sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==
+ dependencies:
+ de-indent "^1.0.2"
+ he "^1.2.0"
+
+vue2-ace-editor@^0.0.15:
+ version "0.0.15"
+ resolved "https://registry.yarnpkg.com/vue2-ace-editor/-/vue2-ace-editor-0.0.15.tgz#569b208e54ae771ae1edd3b8902ac42f0edc74e3"
+ integrity sha512-e3TR9OGXc71cGpvYcW068lNpRcFt3+OONCC81oxHL/0vwl/V3OgqnNMw2/RRolgQkO/CA5AjqVHWmANWKOtNnQ==
+ dependencies:
+ brace "^0.11.0"
+
watchpack@^2.4.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.1.tgz#29308f2cac150fa8e4c92f90e0ec954a9fed7fff"
@@ -8257,11 +8932,29 @@ wildcard@^2.0.0:
resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67"
integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==
+window-size@0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
+ integrity sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg==
+
+with@^5.0.0:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/with/-/with-5.1.1.tgz#fa4daa92daf32c4ea94ed453c81f04686b575dfe"
+ integrity sha512-uAnSsFGfSpF6DNhBXStvlZILfHJfJu4eUkfbRGk94kGO1Ta7bg6FwfvoOhhyHAJuFbCw+0xk4uJ3u57jLvlCJg==
+ dependencies:
+ acorn "^3.1.0"
+ acorn-globals "^3.0.0"
+
word-wrap@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34"
integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==
+wordwrap@0.0.2:
+ version "0.0.2"
+ resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
+ integrity sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q==
+
workerpool@6.2.1:
version "6.2.1"
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343"
@@ -8342,6 +9035,11 @@ y18n@^5.0.5:
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
+yallist@^2.1.2:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
+ integrity sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==
+
yallist@^3.0.2:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd"
@@ -8370,7 +9068,7 @@ yargs-parser@^18.1.2:
camelcase "^5.0.0"
decamelize "^1.2.0"
-yargs-parser@^20.2.2:
+yargs-parser@^20.2.2, yargs-parser@^20.2.9:
version "20.2.9"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
@@ -8390,7 +9088,7 @@ yargs-unparser@2.0.0:
flat "^5.0.2"
is-plain-obj "^2.1.0"
-yargs@16.2.0, yargs@^16.0.0, yargs@^16.1.1:
+yargs@16.2.0, yargs@^16.0.0, yargs@^16.1.1, yargs@^16.2.0:
version "16.2.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
@@ -8433,6 +9131,16 @@ yargs@^17.7.2:
y18n "^5.0.5"
yargs-parser "^21.1.1"
+yargs@~3.10.0:
+ version "3.10.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
+ integrity sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A==
+ dependencies:
+ camelcase "^1.0.2"
+ cliui "^2.1.0"
+ decamelize "^1.0.0"
+ window-size "0.1.0"
+
yn@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
From 4c164c4e07f8bc3c5f7cd7f6f61331a2da9e8cd5 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Tue, 18 Jun 2024 14:22:41 -0500
Subject: [PATCH 48/60] remove unused jsdoc theme package
---
package.json | 1 -
yarn.lock | 228 ++++++++++++++++++++-------------------------------
2 files changed, 90 insertions(+), 139 deletions(-)
diff --git a/package.json b/package.json
index 954dbed90..6789f8265 100644
--- a/package.json
+++ b/package.json
@@ -120,7 +120,6 @@
"chai": "^4.3.10",
"chai-as-promised": "^7.1.1",
"chai-http": "^4.3.0",
- "clean-jsdoc-theme": "^4.3.0",
"cross-env": "^7.0.3",
"dotenv": "^16.4.5",
"eslint": "^8.57.0",
diff --git a/yarn.lock b/yarn.lock
index a0d593c33..56c5ff578 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -97,7 +97,7 @@
dependencies:
eslint-rule-composer "^0.3.0"
-"@babel/generator@^7.24.7":
+"@babel/generator@^7.12.11", "@babel/generator@^7.24.7":
version "7.24.7"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.7.tgz#1654d01de20ad66b4b4d99c135471bc654c55e6d"
integrity sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==
@@ -313,7 +313,7 @@
js-tokens "^4.0.0"
picocolors "^1.0.0"
-"@babel/parser@^7.14.7", "@babel/parser@^7.20.15", "@babel/parser@^7.24.7":
+"@babel/parser@^7.14.7", "@babel/parser@^7.2.3", "@babel/parser@^7.20.15", "@babel/parser@^7.24.7":
version "7.24.7"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85"
integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==
@@ -1016,14 +1016,7 @@
resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310"
integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==
-"@babel/runtime@^7.7.6":
- version "7.24.7"
- resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.7.tgz#f4f0d5530e8dbdf59b3451b9b3e594b6ba082e12"
- integrity sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==
- dependencies:
- regenerator-runtime "^0.14.0"
-
-"@babel/runtime@^7.8.4":
+"@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4":
version "7.24.7"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.24.7.tgz#f4f0d5530e8dbdf59b3451b9b3e594b6ba082e12"
integrity sha512-UwgBRMjJP+xv857DCngvqXI3Iq6J4v0wXmwc6sapg+zyhbwmQX67LUEFrkK5tbyJ30jGuG3ZvWpBiB9LCy1kWw==
@@ -1039,7 +1032,7 @@
"@babel/parser" "^7.24.7"
"@babel/types" "^7.24.7"
-"@babel/traverse@^7.24.7":
+"@babel/traverse@^7.1.6", "@babel/traverse@^7.24.7":
version "7.24.7"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.24.7.tgz#de2b900163fa741721ba382163fe46a936c40cf5"
integrity sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==
@@ -1055,7 +1048,7 @@
debug "^4.3.1"
globals "^11.1.0"
-"@babel/types@^7.24.7", "@babel/types@^7.4.4":
+"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.24.7", "@babel/types@^7.4.4":
version "7.24.7"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.24.7.tgz#6027fe12bc1aa724cd32ab113fb7f1988f1f66f2"
integrity sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==
@@ -1302,7 +1295,7 @@
"@jridgewell/resolve-uri" "^3.1.0"
"@jridgewell/sourcemap-codec" "^1.4.14"
-"@jsdoc/salty@^0.2.1", "@jsdoc/salty@^0.2.4":
+"@jsdoc/salty@^0.2.1":
version "0.2.8"
resolved "https://registry.yarnpkg.com/@jsdoc/salty/-/salty-0.2.8.tgz#8d29923a9429694a437a50ab75004b576131d597"
integrity sha512-5e+SFVavj1ORKlKaKr2BmTOekmXbelU7dC0cDkQLqag7xfuTPuGMUFx7KWJuv4bYZrTsoL2Z18VVCOKYxzoHcg==
@@ -1936,6 +1929,18 @@ accepts@~1.3.4:
mime-types "~2.1.34"
negotiator "0.6.3"
+ace-builds@^1.4.13:
+ version "1.35.0"
+ resolved "https://registry.yarnpkg.com/ace-builds/-/ace-builds-1.35.0.tgz#141fd103016d1a1a7febab57a223af28c75a89bc"
+ integrity sha512-bwDKqjqNccC/MSujqnYTeAS5dIR8UmGLP0R90mvsJY0FRC8NUWBSTfj34+EIzo2NWc/gV8IZTqv4fXaiZJpCtA==
+
+acorn-globals@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf"
+ integrity sha512-uWttZCk96+7itPxK8xCzY86PnxKTMrReKDqrHzv42VQY0K30PUO8WY13WMOuI+cOdX4EIdzdvQ8k6jkuGRFMYw==
+ dependencies:
+ acorn "^4.0.4"
+
acorn-import-attributes@^1.9.5:
version "1.9.5"
resolved "https://registry.yarnpkg.com/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz#7eb1557b1ba05ef18b5ed0ec67591bfab04688ef"
@@ -1953,6 +1958,16 @@ acorn-walk@^8.1.1:
dependencies:
acorn "^8.11.0"
+acorn@^3.1.0:
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a"
+ integrity sha512-OLUyIIZ7mF5oaAUT1w0TFqQS81q3saT46x8t7ukpPjMNk+nbs4ZHhs7ToV8EWnLYLepjETXd4XaCE4uxkMeqUw==
+
+acorn@^4.0.4, acorn@~4.0.2:
+ version "4.0.13"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787"
+ integrity sha512-fu2ygVGuMmlzG8ZeRJ0bvR41nsAkxxhbyk8bZ1SS521Z7vmgJFTQQlfz/Mp/nJexGBz+v8sC9bM6+lNgskt4Ug==
+
acorn@^8.11.0, acorn@^8.4.1, acorn@^8.7.1, acorn@^8.8.2, acorn@^8.9.0:
version "8.12.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.0.tgz#1627bfa2e058148036133b8d9b51a700663c294c"
@@ -2189,7 +2204,7 @@ arraybuffer.prototype.slice@^1.0.3:
is-array-buffer "^3.0.4"
is-shared-array-buffer "^1.0.2"
-asap@^2.0.0:
+asap@^2.0.0, asap@~2.0.3:
version "2.0.6"
resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"
integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==
@@ -2638,6 +2653,11 @@ callsites@^3.0.0:
resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
+camelcase@^1.0.2:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
+ integrity sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==
+
camelcase@^5.0.0, camelcase@^5.3.1:
version "5.3.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320"
@@ -2665,6 +2685,14 @@ catharsis@^0.9.0:
dependencies:
lodash "^4.17.15"
+center-align@^0.1.1:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
+ integrity sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ==
+ dependencies:
+ align-text "^0.1.3"
+ lazy-cache "^1.0.3"
+
chai-as-promised@^7.1.1:
version "7.1.2"
resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.2.tgz#70cd73b74afd519754161386421fb71832c6d041"
@@ -2812,25 +2840,6 @@ clean-css@^4.1.11:
dependencies:
source-map "~0.6.0"
-clean-css@~5.3.2:
- version "5.3.3"
- resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.3.tgz#b330653cd3bd6b75009cc25c714cae7b93351ccd"
- integrity sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==
- dependencies:
- source-map "~0.6.0"
-
-clean-jsdoc-theme@^4.3.0:
- version "4.3.0"
- resolved "https://registry.yarnpkg.com/clean-jsdoc-theme/-/clean-jsdoc-theme-4.3.0.tgz#6cd55ff7b25ff6d1719ae0ff9f1cdb5ef07bf640"
- integrity sha512-QMrBdZ2KdPt6V2Ytg7dIt0/q32U4COpxvR0UDhPjRRKRL0o0MvRCR5YpY37/4rPF1SI1AYEKAWyof7ndCb/dzA==
- dependencies:
- "@jsdoc/salty" "^0.2.4"
- fs-extra "^10.1.0"
- html-minifier-terser "^7.2.0"
- klaw-sync "^6.0.0"
- lodash "^4.17.21"
- showdown "^2.1.0"
-
clean-stack@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
@@ -2961,7 +2970,7 @@ commander@2.9.0:
dependencies:
graceful-readlink ">= 1.0.0"
-commander@^10.0.0, commander@^10.0.1:
+commander@^10.0.1:
version "10.0.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.1.tgz#881ee46b4f77d1c1dccc5823433aa39b022cbe06"
integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==
@@ -2976,11 +2985,6 @@ commander@^6.2.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-6.2.1.tgz#0792eb682dfbc325999bb2b84fddddba110ac73c"
integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==
-commander@^9.0.0:
- version "9.5.0"
- resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30"
- integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==
-
commander@~12.1.0:
version "12.1.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-12.1.0.tgz#01423b36f501259fdaac4d0e4d60c96c991585d3"
@@ -3234,6 +3238,11 @@ date-format@^4.0.14:
resolved "https://registry.yarnpkg.com/date-format/-/date-format-4.0.14.tgz#7a8e584434fb169a521c8b7aa481f355810d9400"
integrity sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg==
+de-indent@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d"
+ integrity sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==
+
debug@2.6.9:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
@@ -3262,7 +3271,7 @@ debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@~4.3
dependencies:
ms "2.1.2"
-decamelize@^1.2.0:
+decamelize@^1.0.0, decamelize@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==
@@ -3420,14 +3429,6 @@ domain-browser@^4.22.0:
resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-4.23.0.tgz#427ebb91efcb070f05cffdfb8a4e9a6c25f8c94b"
integrity sha512-ArzcM/II1wCCujdCNyQjXrAFwS4mrLh4C7DZWlaI8mdh7h3BfKdNd3bKXITfl2PT9FtfQqaGvhi1vPRQPimjGA==
-dot-case@^3.0.4:
- version "3.0.4"
- resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-3.0.4.tgz#9b2b670d00a431667a8a75ba29cd1b98809ce751"
- integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==
- dependencies:
- no-case "^3.0.4"
- tslib "^2.0.3"
-
dotenv@^16.4.5:
version "16.4.5"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f"
@@ -3898,6 +3899,15 @@ estraverse@^5.1.0, estraverse@^5.2.0:
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123"
integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==
+estree-to-babel@^3.1.0:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/estree-to-babel/-/estree-to-babel-3.2.1.tgz#82e78315275c3ca74475fdc8ac1a5103c8a75bf5"
+ integrity sha512-YNF+mZ/Wu2FU/gvmzuWtYc8rloubL7wfXCTgouFrnjGVXPA/EeYYA7pupXWrb3Iv1cTBeSSxxJIbK23l4MRNqg==
+ dependencies:
+ "@babel/traverse" "^7.1.6"
+ "@babel/types" "^7.2.0"
+ c8 "^7.6.0"
+
esutils@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
@@ -4198,15 +4208,6 @@ fromentries@^1.2.0:
resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.3.2.tgz#e4bca6808816bf8f93b52750f1127f5a6fd86e3a"
integrity sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==
-fs-extra@^10.1.0:
- version "10.1.0"
- resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf"
- integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==
- dependencies:
- graceful-fs "^4.2.0"
- jsonfile "^6.0.1"
- universalify "^2.0.0"
-
fs-extra@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0"
@@ -4422,7 +4423,7 @@ gopd@^1.0.1:
dependencies:
get-intrinsic "^1.1.3"
-graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9:
+graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9:
version "4.2.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3"
integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==
@@ -4575,19 +4576,6 @@ html-escaper@^2.0.0:
resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453"
integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==
-html-minifier-terser@^7.2.0:
- version "7.2.0"
- resolved "https://registry.yarnpkg.com/html-minifier-terser/-/html-minifier-terser-7.2.0.tgz#18752e23a2f0ed4b0f550f217bb41693e975b942"
- integrity sha512-tXgn3QfqPIpGl9o+K5tpcj3/MN4SfLtsx2GWwBC3SSd0tXQGyF3gsSqad8loJgKZGM3ZxbYDd5yhiBIdWpmvLA==
- dependencies:
- camel-case "^4.1.2"
- clean-css "~5.3.2"
- commander "^10.0.0"
- entities "^4.4.0"
- param-case "^3.0.4"
- relateurl "^0.2.7"
- terser "^5.15.1"
-
http-errors@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3"
@@ -4786,6 +4774,14 @@ is-docker@^2.0.0:
resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa"
integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==
+is-expression@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-expression/-/is-expression-3.0.0.tgz#39acaa6be7fd1f3471dc42c7416e61c24317ac9f"
+ integrity sha512-vyMeQMq+AiH5uUnoBfMTwf18tO3bM6k1QXBE9D6ueAAquEfCZe3AJPtud9g6qS0+4X8xA7ndpZiDyeb2l2qOBw==
+ dependencies:
+ acorn "~4.0.2"
+ object-assign "^4.0.1"
+
is-extglob@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
@@ -4878,7 +4874,12 @@ is-plain-object@^2.0.4:
dependencies:
isobject "^3.0.1"
-is-regex@^1.1.4:
+is-promise@^2.0.0:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.2.2.tgz#39ab959ccbf9a774cf079f7b40c7a26f763135f1"
+ integrity sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==
+
+is-regex@^1.0.3, is-regex@^1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958"
integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==
@@ -5090,7 +5091,12 @@ jest-worker@^29.7.0:
merge-stream "^2.0.0"
supports-color "^8.0.0"
-js-tokens@^4.0.0:
+js-stringify@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/js-stringify/-/js-stringify-1.0.2.tgz#1736fddfd9724f28a3682adc6230ae7e4e9679db"
+ integrity sha512-rtS5ATOo2Q5k1G+DADISilDA6lv79zIiwFd6CcjuIxGKLFm5C+RLImRscVap9k55i+MOZwgliw+NejvkLuGD5g==
+
+"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
@@ -5229,15 +5235,6 @@ jsonfile@^4.0.0:
optionalDependencies:
graceful-fs "^4.1.6"
-jsonfile@^6.0.1:
- version "6.1.0"
- resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"
- integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==
- dependencies:
- universalify "^2.0.0"
- optionalDependencies:
- graceful-fs "^4.1.6"
-
jsonpath-plus@^7.2.0:
version "7.2.0"
resolved "https://registry.yarnpkg.com/jsonpath-plus/-/jsonpath-plus-7.2.0.tgz#7ad94e147b3ed42f7939c315d2b9ce490c5a3899"
@@ -5368,13 +5365,6 @@ kind-of@^6.0.2:
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd"
integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==
-klaw-sync@^6.0.0:
- version "6.0.0"
- resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c"
- integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ==
- dependencies:
- graceful-fs "^4.1.11"
-
klaw@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/klaw/-/klaw-3.0.0.tgz#b11bec9cf2492f06756d6e809ab73a2910259146"
@@ -5565,13 +5555,6 @@ loupe@^2.3.6:
dependencies:
get-func-name "^2.0.1"
-lower-case@^2.0.2:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-2.0.2.tgz#6fa237c63dbdc4a82ca0fd882e4722dc5e634e28"
- integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==
- dependencies:
- tslib "^2.0.3"
-
lru-cache@^4.1.5:
version "4.1.5"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd"
@@ -5910,14 +5893,6 @@ nise@^5.1.9:
just-extend "^6.2.0"
path-to-regexp "^6.2.1"
-no-case@^3.0.4:
- version "3.0.4"
- resolved "https://registry.yarnpkg.com/no-case/-/no-case-3.0.4.tgz#d361fd5c9800f558551a8369fc0dcd4662b6124d"
- integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==
- dependencies:
- lower-case "^2.0.2"
- tslib "^2.0.3"
-
node-dir@^0.1.10:
version "0.1.17"
resolved "https://registry.yarnpkg.com/node-dir/-/node-dir-0.1.17.tgz#5f5665d93351335caabef8f1c554516cf5f1e4e5"
@@ -6281,14 +6256,6 @@ pako@~1.0.5:
resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf"
integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==
-param-case@^3.0.4:
- version "3.0.4"
- resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5"
- integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==
- dependencies:
- dot-case "^3.0.4"
- tslib "^2.0.3"
-
parent-module@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2"
@@ -6330,14 +6297,6 @@ parseurl@~1.3.3:
resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
-pascal-case@^3.1.2:
- version "3.1.2"
- resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-3.1.2.tgz#b48e0ef2b98e205e7c1dae747d0b1508237660eb"
- integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==
- dependencies:
- no-case "^3.0.4"
- tslib "^2.0.3"
-
path-browserify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd"
@@ -6888,11 +6847,6 @@ regjsparser@^0.9.1:
dependencies:
jsesc "~0.5.0"
-relateurl@^0.2.7:
- version "0.2.7"
- resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9"
- integrity sha512-G08Dxvm4iDN3MLM0EsP62EDV9IuhXPR6blNz6Utcp7zyV3tr4HVNINt6MpaRWbxoOHT3Q7YN2P+jaHX8vUbgog==
-
release-zalgo@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/release-zalgo/-/release-zalgo-1.0.0.tgz#09700b7e5074329739330e535c5a90fb67851730"
@@ -7182,13 +7136,6 @@ shebang-regex@^3.0.0:
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172"
integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==
-showdown@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/showdown/-/showdown-2.1.0.tgz#1251f5ed8f773f0c0c7bfc8e6fd23581f9e545c5"
- integrity sha512-/6NVYu4U819R2pUIk79n67SYgJHWCce0a5xTP979WbNp0FL9MN1I1QK662IDU1b6JzKTvmhgI7T7JYIxBi3kMQ==
- dependencies:
- commander "^9.0.0"
-
side-channel@^1.0.4, side-channel@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.6.tgz#abd25fb7cd24baf45466406b1096b7831c9215f2"
@@ -7812,7 +7759,7 @@ tsconfig-paths@^3.15.0:
minimist "^1.2.6"
strip-bom "^3.0.0"
-tslib@^2.6.2:
+tslib@^2.0.1, tslib@^2.6.2:
version "2.6.3"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0"
integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==
@@ -8073,11 +8020,6 @@ universalify@^0.1.0:
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
-universalify@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.1.tgz#168efc2180964e6386d061e094df61afe239b18d"
- integrity sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==
-
unpipe@1.0.0, unpipe@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
@@ -8549,6 +8491,16 @@ yargs@^15.0.2:
y18n "^4.0.0"
yargs-parser "^18.1.2"
+yargs@~3.10.0:
+ version "3.10.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
+ integrity sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A==
+ dependencies:
+ camelcase "^1.0.2"
+ cliui "^2.1.0"
+ decamelize "^1.0.0"
+ window-size "0.1.0"
+
yn@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50"
From ceaf127cc0736dcb4275d60b5102d6ee4390a110 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Tue, 17 Sep 2024 11:37:14 -0500
Subject: [PATCH 49/60] move better-docs to dev deps, remove old jsdoc theme
minami
---
package.json | 3 +--
yarn.lock | 5 -----
2 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/package.json b/package.json
index 6789f8265..ae2cdae85 100644
--- a/package.json
+++ b/package.json
@@ -116,6 +116,7 @@
"axios-mock-adapter": "^1.22.0",
"babel-loader": "^9.1.3",
"babel-plugin-istanbul": "^6.1.1",
+ "better-docs": "^2.7.3",
"buffer": "^6.0.3",
"chai": "^4.3.10",
"chai-as-promised": "^7.1.1",
@@ -146,7 +147,6 @@
"karma-webpack": "^5.0.1",
"lint-staged": "^15.2.7",
"lodash": "^4.17.21",
- "minami": "^1.1.1",
"mocha": "^10.3.0",
"node-polyfill-webpack-plugin": "^3.0.0",
"nyc": "^15.1.0",
@@ -164,7 +164,6 @@
"dependencies": {
"@stellar/stellar-base": "^12.0.1",
"axios": "^1.7.2",
- "better-docs": "^2.7.3",
"bignumber.js": "^9.1.2",
"eventsource": "^2.0.2",
"randombytes": "^2.1.0",
diff --git a/yarn.lock b/yarn.lock
index 56c5ff578..0f86bb099 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5730,11 +5730,6 @@ min-indent@^1.0.0:
resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869"
integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==
-minami@^1.1.1:
- version "1.2.3"
- resolved "https://registry.yarnpkg.com/minami/-/minami-1.2.3.tgz#99b6dcdfb2f0a54da1c9c8f7aa3a327787aaf9f8"
- integrity sha512-3f2QqqbUC1usVux0FkQMFYB73yd9JIxmHSn1dWQacizL6hOUaNu6mA3KxZ9SfiCc4qgcgq+5XP59+hP7URa1Dw==
-
minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7"
From 38ef48aa315bc930e63305f9b0123532d64de722 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Wed, 18 Sep 2024 13:31:19 -0500
Subject: [PATCH 50/60] formatting and linting
---
src/config.ts | 2 +-
src/contract/client.ts | 2 +-
src/contract/sent_transaction.ts | 4 ++--
src/contract/spec.ts | 4 ++--
src/errors/bad_request.ts | 2 +-
src/errors/bad_response.ts | 2 +-
src/errors/network.ts | 2 +-
src/errors/not_found.ts | 2 +-
src/federation/api.ts | 4 ++--
src/federation/server.ts | 2 +-
src/friendbot/index.ts | 2 +-
src/horizon/account_call_builder.ts | 4 ++--
src/horizon/assets_call_builder.ts | 4 ++--
src/horizon/call_builder.ts | 2 +-
src/horizon/claimable_balances_call_builder.ts | 4 ++--
src/horizon/effect_call_builder.ts | 4 ++--
src/horizon/ledger_call_builder.ts | 4 ++--
src/horizon/liquidity_pool_call_builder.ts | 4 ++--
src/horizon/offer_call_builder.ts | 4 ++--
src/horizon/operation_call_builder.ts | 4 ++--
src/horizon/orderbook_call_builder.ts | 4 ++--
src/horizon/path_call_builder.ts | 4 ++--
src/horizon/payment_call_builder.ts | 4 ++--
src/horizon/server.ts | 2 +-
src/horizon/strict_receive_path_call_builder.ts | 4 ++--
src/horizon/strict_send_path_call_builder.ts | 4 ++--
src/horizon/trade_aggregation_call_builder.ts | 4 ++--
src/horizon/trades_call_builder.ts | 4 ++--
src/horizon/transaction_call_builder.ts | 4 ++--
src/rpc/server.ts | 8 ++++----
src/stellartoml/index.ts | 2 +-
src/webauth/utils.ts | 2 +-
32 files changed, 54 insertions(+), 54 deletions(-)
diff --git a/src/config.ts b/src/config.ts
index 3dbb2700b..214e0cf8d 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -1,5 +1,5 @@
/**
- * @typedef {Object} Configuration
+ * @typedef {object} Configuration
* @memberof Config
* @property {boolean} [allowHttp=false] Allow connecting to http servers, default: `false`. This must be set to false in production deployments!
* @property {number} [timeout=0] Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue. You can also use {@link Config} class to set this globally.
diff --git a/src/contract/client.ts b/src/contract/client.ts
index df2672d0b..436327f83 100644
--- a/src/contract/client.ts
+++ b/src/contract/client.ts
@@ -15,7 +15,7 @@ import { processSpecEntryStream } from './utils';
*
* @memberof module:contract
*
- * @constructor
+ * @class
* @param {module:contract.Spec} spec {@link Spec} to construct a Client for
* @param {ClientOptions} options see {@link ClientOptions}
*/
diff --git a/src/contract/sent_transaction.ts b/src/contract/sent_transaction.ts
index 95defb9f0..c9a71c80c 100644
--- a/src/contract/sent_transaction.ts
+++ b/src/contract/sent_transaction.ts
@@ -22,9 +22,9 @@ import type { AssembledTransaction } from "./assembled_transaction";
* `getTransactionResponse`.
*
* @memberof module:contract
- * @constructor
+ * @class
*
- * @param {function} signTransaction More info in {@link MethodOptions}
+ * @param {Function} signTransaction More info in {@link MethodOptions}
* @param {module:contract.AssembledTransaction} assembled {@link AssembledTransaction} from which this SentTransaction was initialized
*/
export class SentTransaction {
diff --git a/src/contract/spec.ts b/src/contract/spec.ts
index 416877051..fe6332876 100644
--- a/src/contract/spec.ts
+++ b/src/contract/spec.ts
@@ -441,7 +441,7 @@ function unionToJsonSchema(udt: xdr.ScSpecUdtUnionV0): any {
* This allows the class to be used to convert between native and raw `xdr.ScVal`s.
*
* @memberof module:contract
- * @constructor
+ * @class
* @param {xdr.ScSpecEntry[] | string[]} entries the XDR spec entries
* @throws {Error} if entries is invalid
*
@@ -517,7 +517,7 @@ export class Spec {
* Converts native JS arguments to ScVals for calling a contract function.
*
* @param {string} name the name of the function
- * @param {Object} args the arguments object
+ * @param {object} args the arguments object
* @returns {xdr.ScVal[]} the converted arguments
*
* @throws {Error} if argument is missing or incorrect type
diff --git a/src/errors/bad_request.ts b/src/errors/bad_request.ts
index c840f2284..4ecc8a337 100644
--- a/src/errors/bad_request.ts
+++ b/src/errors/bad_request.ts
@@ -3,7 +3,7 @@ import { NetworkError } from "./network";
/**
* BadRequestError is raised when a request made to Horizon is invalid in some
* way (incorrect timebounds for trade call builders, for example.)
- * @extends NetworkError
+ * @augments NetworkError
* @inheritdoc
* @category Errors
*
diff --git a/src/errors/bad_response.ts b/src/errors/bad_response.ts
index 302fba0ce..758698105 100644
--- a/src/errors/bad_response.ts
+++ b/src/errors/bad_response.ts
@@ -6,7 +6,7 @@ import { NetworkError } from "./network";
* server is invalid in some way. For example, a federation response may exceed
* the maximum allowed size, or a transaction submission may have failed with
* Horizon.
- * @extends NetworkError
+ * @augments NetworkError
* @inheritdoc
* @category Errors
*
diff --git a/src/errors/network.ts b/src/errors/network.ts
index 5a2c4487a..fca9e1dde 100644
--- a/src/errors/network.ts
+++ b/src/errors/network.ts
@@ -30,7 +30,7 @@ export class NetworkError extends Error {
this.constructor = NetworkError;
/**
* The response sent by the Horizon server.
- * @type {Object} Response details, received from the Horizon server
+ * @type {object} Response details, received from the Horizon server
* @property {HorizonApi.ErrorResponseData} [response.data] The data returned by Horizon as part of the error: {@link https://developers.stellar.org/network/horizon/api-reference/errors/response | Error Response}
* @property {number} [response.status] HTTP status code describing the basic issue with a submitted transaction {@link https://developers.stellar.org/network/horizon/api-reference/errors/http-status-codes/standard | Standard Status Codes}
* @property {string} [response.statusText] A human-readable description of what the status code means: {@link https://developers.stellar.org/network/horizon/api-reference/errors/http-status-codes/horizon-specific | Horizon-Specific Status Codes}
diff --git a/src/errors/not_found.ts b/src/errors/not_found.ts
index bdfd21d69..2e7279691 100644
--- a/src/errors/not_found.ts
+++ b/src/errors/not_found.ts
@@ -3,7 +3,7 @@ import { NetworkError } from "./network";
/**
* NotFoundError is raised when the resource requested from Horizon is
* unavailable.
- * @extends NetworkError
+ * @augments NetworkError
* @inheritdoc
* @category Errors
*
diff --git a/src/federation/api.ts b/src/federation/api.ts
index 8c3665c7a..ab9143af9 100644
--- a/src/federation/api.ts
+++ b/src/federation/api.ts
@@ -6,7 +6,7 @@
*/
/**
- * @typedef {Object} Record Record returned from a federation server.
+ * @typedef {object} Record Record returned from a federation server.
* @memberof module:Federation.Api
* @property {string} account_id The Stellar public key resolved from the federation lookup
* @property {string} [memo_type] The type of memo, if any, required to send payments to this user
@@ -14,7 +14,7 @@
*/
/**
- * @typedef {Object} Options Options for configuring connections to federation servers.
+ * @typedef {object} Options Options for configuring connections to federation servers.
* @memberof module:Federation.Api
* @property {boolean} [allowHttp=false] Allow connecting to http servers, default: `false`. This must be set to false in production deployments!
* @property {number} [timeout=0] Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue. You can also use {@link Config} class to set this globally.
diff --git a/src/federation/server.ts b/src/federation/server.ts
index 6e0b367bb..32f4b3030 100644
--- a/src/federation/server.ts
+++ b/src/federation/server.ts
@@ -22,7 +22,7 @@ export const FEDERATION_RESPONSE_MAX_SIZE = 100 * 1024;
* Federation.Server handles a network connection to a
* [federation server](https://developers.stellar.org/docs/learn/encyclopedia/federation)
* instance and exposes an interface for requests to that instance.
- * @constructor
+ * @class
* @memberof module:Federation
* @param {string} serverURL The federation server URL (ex. `https://acme.com/federation`).
* @param {string} domain Domain this server represents
diff --git a/src/friendbot/index.ts b/src/friendbot/index.ts
index 0ea081da6..4daa574b1 100644
--- a/src/friendbot/index.ts
+++ b/src/friendbot/index.ts
@@ -4,7 +4,7 @@
*/
/**
- * @typedef {Object} Response
+ * @typedef {object} Response
* @memberof module:Friendbot.Api
* @property {string} result_meta_xdr The base64-encoded XDR result meta of the transaction that Friendbot submitted to create the account.
*/
diff --git a/src/horizon/account_call_builder.ts b/src/horizon/account_call_builder.ts
index ec33c820e..9545f7ce7 100644
--- a/src/horizon/account_call_builder.ts
+++ b/src/horizon/account_call_builder.ts
@@ -9,9 +9,9 @@ import { ServerApi } from "./server_api";
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-accounts|All Accounts}
*
- * @extends CallBuilder
+ * @augments CallBuilder
* @private
- * @constructor
+ * @class
* @param {string} serverUrl Horizon server URL.
*/
export class AccountCallBuilder extends CallBuilder<
diff --git a/src/horizon/assets_call_builder.ts b/src/horizon/assets_call_builder.ts
index 3a3accc39..587fbb39d 100644
--- a/src/horizon/assets_call_builder.ts
+++ b/src/horizon/assets_call_builder.ts
@@ -6,8 +6,8 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Horizon.Server#assets}.
*
- * @constructor
- * @extends CallBuilder
+ * @class
+ * @augments CallBuilder
* @private
* @param {string} serverUrl Horizon server URL.
*/
diff --git a/src/horizon/call_builder.ts b/src/horizon/call_builder.ts
index 79811ba97..cbc479c83 100644
--- a/src/horizon/call_builder.ts
+++ b/src/horizon/call_builder.ts
@@ -32,7 +32,7 @@ const EventSource: Constructable = anyGlobal.EventSource ??
* This is an **abstract** class. Do not create this object directly, use {@link module:Horizon.Server | Horizon.Server} class.
*
* @private
- * @constructor
+ * @class
*
* @param {string} serverUrl URL of Horizon server
*/
diff --git a/src/horizon/claimable_balances_call_builder.ts b/src/horizon/claimable_balances_call_builder.ts
index f8b57c260..84fe975c0 100644
--- a/src/horizon/claimable_balances_call_builder.ts
+++ b/src/horizon/claimable_balances_call_builder.ts
@@ -9,9 +9,9 @@ import { ServerApi } from "./server_api";
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/claimablebalances|Claimable Balances}
*
- * @extends CallBuilder
+ * @augments CallBuilder
* @private
- * @constructor
+ * @class
* @param {string} serverUrl Horizon server URL.
*/
export class ClaimableBalanceCallBuilder extends CallBuilder<
diff --git a/src/horizon/effect_call_builder.ts b/src/horizon/effect_call_builder.ts
index d7278db03..7765d204b 100644
--- a/src/horizon/effect_call_builder.ts
+++ b/src/horizon/effect_call_builder.ts
@@ -7,9 +7,9 @@ import { ServerApi } from "./server_api";
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/effects|All Effects}
*
- * @extends CallBuilder
+ * @augments CallBuilder
* @private
- * @constructor
+ * @class
* @param {string} serverUrl Horizon server URL.
*/
export class EffectCallBuilder extends CallBuilder<
diff --git a/src/horizon/ledger_call_builder.ts b/src/horizon/ledger_call_builder.ts
index 03f8ee856..54f607a4f 100644
--- a/src/horizon/ledger_call_builder.ts
+++ b/src/horizon/ledger_call_builder.ts
@@ -8,9 +8,9 @@ import { ServerApi } from "./server_api";
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-ledgers|All Ledgers}
*
- * @extends CallBuilder
+ * @augments CallBuilder
* @private
- * @constructor
+ * @class
* @param {string} serverUrl Horizon server URL.
*/
export class LedgerCallBuilder extends CallBuilder<
diff --git a/src/horizon/liquidity_pool_call_builder.ts b/src/horizon/liquidity_pool_call_builder.ts
index aab443ac1..39e29c26f 100644
--- a/src/horizon/liquidity_pool_call_builder.ts
+++ b/src/horizon/liquidity_pool_call_builder.ts
@@ -8,9 +8,9 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Horizon.Server#liquidityPools}.
*
- * @extends CallBuilder
+ * @augments CallBuilder
* @private
- * @constructor
+ * @class
* @param {string} serverUrl Horizon server URL.
*/
export class LiquidityPoolCallBuilder extends CallBuilder<
diff --git a/src/horizon/offer_call_builder.ts b/src/horizon/offer_call_builder.ts
index 5d87d071d..b28319f49 100644
--- a/src/horizon/offer_call_builder.ts
+++ b/src/horizon/offer_call_builder.ts
@@ -9,9 +9,9 @@ import { ServerApi } from "./server_api";
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/offers/|Offers}
*
- * @extends CallBuilder
+ * @augments CallBuilder
* @private
- * @constructor
+ * @class
* @param {string} serverUrl Horizon server URL.
*/
export class OfferCallBuilder extends CallBuilder<
diff --git a/src/horizon/operation_call_builder.ts b/src/horizon/operation_call_builder.ts
index bbb8faefc..8cffe5dc2 100644
--- a/src/horizon/operation_call_builder.ts
+++ b/src/horizon/operation_call_builder.ts
@@ -8,9 +8,9 @@ import { ServerApi } from "./server_api";
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/operations|All Operations}
*
- * @extends CallBuilder
+ * @augments CallBuilder
* @private
- * @constructor
+ * @class
* @param {string} serverUrl Horizon server URL.
*/
export class OperationCallBuilder extends CallBuilder<
diff --git a/src/horizon/orderbook_call_builder.ts b/src/horizon/orderbook_call_builder.ts
index e07f46051..91e0d3bdd 100644
--- a/src/horizon/orderbook_call_builder.ts
+++ b/src/horizon/orderbook_call_builder.ts
@@ -9,9 +9,9 @@ import { ServerApi } from "./server_api";
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/order-books|Orderbook Details}
*
- * @extends CallBuilder
+ * @augments CallBuilder
* @private
- * @constructor
+ * @class
* @param {string} serverUrl serverUrl Horizon server URL.
* @param {Asset} selling Asset being sold
* @param {Asset} buying Asset being bought
diff --git a/src/horizon/path_call_builder.ts b/src/horizon/path_call_builder.ts
index a41058b1c..1d68d9fd6 100644
--- a/src/horizon/path_call_builder.ts
+++ b/src/horizon/path_call_builder.ts
@@ -21,9 +21,9 @@ import { ServerApi } from "./server_api";
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/paths|Find Payment Paths}
*
- * @extends CallBuilder
+ * @augments CallBuilder
* @private
- * @constructor
+ * @class
*
* @param {string} serverUrl Horizon server URL.
* @param {string} source The sender's account ID. Any returned path must use a source that the sender can hold.
diff --git a/src/horizon/payment_call_builder.ts b/src/horizon/payment_call_builder.ts
index 22912da0a..f0ce39346 100644
--- a/src/horizon/payment_call_builder.ts
+++ b/src/horizon/payment_call_builder.ts
@@ -8,9 +8,9 @@ import { ServerApi } from "./server_api";
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/horizon/resources/list-all-payments/|All Payments}
*
- * @extends CallBuilder
+ * @augments CallBuilder
* @private
- * @constructor
+ * @class
*
* @param {string} serverUrl Horizon server URL.
*/
diff --git a/src/horizon/server.ts b/src/horizon/server.ts
index e9d9fdb9f..6cfb32f80 100644
--- a/src/horizon/server.ts
+++ b/src/horizon/server.ts
@@ -879,7 +879,7 @@ export class Server {
/**
* Options for configuring connections to Horizon servers.
- * @typedef {Object} Options
+ * @typedef {object} Options
* @memberof module:Horizon.Server
* @property {boolean} [allowHttp] Allow connecting to http servers, default: `false`. This must be set to false in production deployments! You can also use {@link Config} class to set this globally.
* @property {string} [appName] Allow set custom header `X-App-Name`, default: `undefined`.
diff --git a/src/horizon/strict_receive_path_call_builder.ts b/src/horizon/strict_receive_path_call_builder.ts
index de4e28df1..25edc3093 100644
--- a/src/horizon/strict_receive_path_call_builder.ts
+++ b/src/horizon/strict_receive_path_call_builder.ts
@@ -25,9 +25,9 @@ import { ServerApi } from "./server_api";
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/paths|Find Payment Paths}
*
- * @extends CallBuilder
+ * @augments CallBuilder
* @private
- * @constructor
+ * @class
*
* @param {string} serverUrl Horizon server URL.
* @param {string|Asset[]} source The sender's account ID or a list of Assets. Any returned path must use a source that the sender can hold.
diff --git a/src/horizon/strict_send_path_call_builder.ts b/src/horizon/strict_send_path_call_builder.ts
index 81c808259..ea9f512e8 100644
--- a/src/horizon/strict_send_path_call_builder.ts
+++ b/src/horizon/strict_send_path_call_builder.ts
@@ -24,9 +24,9 @@ import { ServerApi } from "./server_api";
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/paths|Find Payment Paths}
*
- * @extends CallBuilder
+ * @augments CallBuilder
* @private
- * @constructor
+ * @class
*
* @param {string} serverUrl Horizon server URL.
* @param {Asset} sourceAsset The asset to be sent.
diff --git a/src/horizon/trade_aggregation_call_builder.ts b/src/horizon/trade_aggregation_call_builder.ts
index d0d7a435f..01c946f15 100644
--- a/src/horizon/trade_aggregation_call_builder.ts
+++ b/src/horizon/trade_aggregation_call_builder.ts
@@ -19,9 +19,9 @@ const allowedResolutions = [
*
* Do not create this object directly, use {@link Horizon.Server#tradeAggregation}.
*
- * @extends CallBuilder
+ * @augments CallBuilder
* @private
- * @constructor
+ * @class
*
* @param {string} serverUrl serverUrl Horizon server URL.
* @param {Asset} base base asset
diff --git a/src/horizon/trades_call_builder.ts b/src/horizon/trades_call_builder.ts
index bc6cb2612..f11612d4b 100644
--- a/src/horizon/trades_call_builder.ts
+++ b/src/horizon/trades_call_builder.ts
@@ -9,9 +9,9 @@ import { ServerApi } from "./server_api";
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/trades|Trades}
*
- * @extends CallBuilder
+ * @augments CallBuilder
* @private
- * @constructor
+ * @class
*
* @param {string} serverUrl serverUrl Horizon server URL.
*/
diff --git a/src/horizon/transaction_call_builder.ts b/src/horizon/transaction_call_builder.ts
index 3690f56a7..5ad165162 100644
--- a/src/horizon/transaction_call_builder.ts
+++ b/src/horizon/transaction_call_builder.ts
@@ -8,9 +8,9 @@ import { ServerApi } from "./server_api";
*
* @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-transactions|All Transactions}
*
- * @extends CallBuilder
+ * @augments CallBuilder
* @private
- * @constructor
+ * @class
*
* @param {string} serverUrl Horizon server URL.
*/
diff --git a/src/rpc/server.ts b/src/rpc/server.ts
index 6066a60d6..ba50bcbf2 100644
--- a/src/rpc/server.ts
+++ b/src/rpc/server.ts
@@ -49,7 +49,7 @@ export enum Durability {
}
/**
- * @typedef {Object} GetEventsRequest Describes the complex filter combinations available for event queries.
+ * @typedef {object} GetEventsRequest Describes the complex filter combinations available for event queries.
* @property {Array.} filters Filters to use when querying events from the RPC server.
* @property {number} [startLedger] Ledger number (inclusive) to begin querying events.
* @property {string} [cursor] Page cursor (exclusive) to begin querying events.
@@ -58,13 +58,13 @@ export enum Durability {
*/
/**
- * @typedef {Object} ResourceLeeway Describes additional resource leeways for transaction simulation.
+ * @typedef {object} ResourceLeeway Describes additional resource leeways for transaction simulation.
* @property {number} cpuInstructions Simulate the transaction with more CPU instructions available.
* @memberof module:rpc.Server
*/
/**
- * @typedef {Object} Options Options for configuring connections to RPC servers.
+ * @typedef {object} Options Options for configuring connections to RPC servers.
* @property {boolean} [allowHttp=false] Allow connecting to http servers, default: `false`. This must be set to false in production deployments!
* @property {number} [timeout=0] Allow a timeout, default: 0. Allows user to avoid nasty lag. You can also use {@link Config} class to set this globally.
* @property {Record} [headers] Additional headers that should be added to any requests to the RPC server.
@@ -127,7 +127,7 @@ function findCreatedAccountSequenceInTransactionMeta(
* Handles the network connection to a Soroban RPC instance, exposing an
* interface for requests to that instance.
*
- * @constructor
+ * @class
* @memberof module:rpc
*
* @param {string} serverURL Soroban-RPC Server URL (ex. `http://localhost:8000/soroban/rpc`).
diff --git a/src/stellartoml/index.ts b/src/stellartoml/index.ts
index d10372796..aa74fb3fd 100644
--- a/src/stellartoml/index.ts
+++ b/src/stellartoml/index.ts
@@ -27,7 +27,7 @@ export class Resolver {
* @see {@link https://developers.stellar.org/docs/issuing-assets/publishing-asset-info|Stellar.toml doc}
*
* @param {string} domain Domain to get stellar.toml file for
- * @param {Object} [opts] Options object
+ * @param {object} [opts] Options object
* @param {boolean} [opts.allowHttp] - Allow connecting to http servers, default: `false`. This must be set to false in production deployments!
* @param {number} [opts.timeout] - Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue.
* @returns {Promise} A `Promise` that resolves to the parsed stellar.toml object
diff --git a/src/webauth/utils.ts b/src/webauth/utils.ts
index 74630c0e1..689948db1 100644
--- a/src/webauth/utils.ts
+++ b/src/webauth/utils.ts
@@ -137,7 +137,7 @@ export function buildChallengeTx(
}
/**
- * @typedef {Object} ChallengeTxParts A parsed and validated challenge transaction, and some of its constituent details.
+ * @typedef {object} ChallengeTxParts A parsed and validated challenge transaction, and some of its constituent details.
* @property {Transaction} tx The challenge transaction.
* @property {string} clientAccountID The Stellar public key (master key) used to sign the Manage Data operation.
* @property {string} matchedHomeDomain The matched home domain.
From f5665b03bf1907ffa1f94941137dd939e5960e80 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Wed, 18 Sep 2024 14:33:26 -0500
Subject: [PATCH 51/60] ignore test output file from prettier
---
config/.prettierignore | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/config/.prettierignore b/config/.prettierignore
index 644fef8aa..7738b9729 100644
--- a/config/.prettierignore
+++ b/config/.prettierignore
@@ -2,4 +2,5 @@
../node_modules
../lib
../dist
-../docs
\ No newline at end of file
+../docs
+../test/unit/out/contract_spec.js
From dd3cee836cade7a10e3bf12ebfe869fd837c1c06 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Wed, 18 Sep 2024 16:18:27 -0500
Subject: [PATCH 52/60] use correct github link in docs site header
---
config/.jsdoc.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/.jsdoc.json b/config/.jsdoc.json
index 3b8e142a3..3f2ba98e7 100644
--- a/config/.jsdoc.json
+++ b/config/.jsdoc.json
@@ -35,7 +35,7 @@
"navLinks": [
{
"label": "GitHub",
- "href": "https://github.com/stellar/stellar-sdk"
+ "href": "https://github.com/stellar/js-stellar-sdk"
},
{
"label": "npm",
From c5a125c0bd367a0807bd3b9c5ef956444bc504a2 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Wed, 18 Sep 2024 16:20:34 -0500
Subject: [PATCH 53/60] correct old rpc and horizon docs urls
---
README.md | 6 ++---
src/errors/network.ts | 12 +++++-----
src/horizon/account_call_builder.ts | 10 ++++----
src/horizon/account_response.ts | 2 +-
src/horizon/call_builder.ts | 6 ++---
.../claimable_balances_call_builder.ts | 10 ++++----
src/horizon/effect_call_builder.ts | 10 ++++----
src/horizon/ledger_call_builder.ts | 2 +-
src/horizon/offer_call_builder.ts | 14 +++++------
src/horizon/operation_call_builder.ts | 12 +++++-----
src/horizon/orderbook_call_builder.ts | 2 +-
src/horizon/path_call_builder.ts | 2 +-
src/horizon/payment_call_builder.ts | 8 +++----
src/horizon/server.ts | 6 ++---
.../strict_receive_path_call_builder.ts | 2 +-
src/horizon/strict_send_path_call_builder.ts | 2 +-
src/horizon/trades_call_builder.ts | 6 ++---
src/horizon/transaction_call_builder.ts | 10 ++++----
src/rpc/server.ts | 24 +++++++++----------
19 files changed, 73 insertions(+), 73 deletions(-)
diff --git a/README.md b/README.md
index a8e97c711..1cac2d8a2 100644
--- a/README.md
+++ b/README.md
@@ -15,7 +15,7 @@
js-stellar-sdk is a JavaScript library for communicating with a
-[Stellar Horizon server](https://github.com/stellar/go/tree/master/services/horizon) and [Soroban RPC](https://developers.stellar.org/network/soroban-rpc).
+[Stellar Horizon server](https://github.com/stellar/go/tree/master/services/horizon) and [Soroban RPC](https://developers.stellar.org/docs/data/rpc).
It is used for building Stellar apps either on Node.js or in the browser, though it can be used in other environments with some tinkering.
It provides:
@@ -95,8 +95,8 @@ The usage documentation for this library lives in a handful of places:
You can also refer to:
- * the [documentation](https://developers.stellar.org/network/horizon) for the Horizon REST API (if using the `Horizon` module) and
- * the [documentation](https://developers.stellar.org/network/soroban-rpc) for Soroban RPC's API (if using the `rpc` module)
+ * the [documentation](https://developers.stellar.org/docs/data/horizon) for the Horizon REST API (if using the `Horizon` module) and
+ * the [documentation](https://developers.stellar.org/docs/data/rpc) for Soroban RPC's API (if using the `rpc` module)
### Usage with React-Native
diff --git a/src/errors/network.ts b/src/errors/network.ts
index fca9e1dde..81a10446b 100644
--- a/src/errors/network.ts
+++ b/src/errors/network.ts
@@ -9,9 +9,9 @@ import { HorizonApi } from "../horizon/horizon_api";
*
* @param {string} message Human-readable error message
* @param {any} response Response details, received from the Horizon server.
- * @param {HorizonApi.ErrorResponseData} [response.data] The data returned by Horizon as part of the error: {@link https://developers.stellar.org/network/horizon/api-reference/errors/response | Error Response}
- * @param {number} [response.status] HTTP status code describing the basic issue with a submitted transaction {@link https://developers.stellar.org/network/horizon/api-reference/errors/http-status-codes/standard | Standard Status Codes}
- * @param {string} [response.statusText] A human-readable description of what the status code means: {@link https://developers.stellar.org/network/horizon/api-reference/errors/http-status-codes/horizon-specific | Horizon-Specific Status Codes}
+ * @param {HorizonApi.ErrorResponseData} [response.data] The data returned by Horizon as part of the error: {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/response | Error Response}
+ * @param {number} [response.status] HTTP status code describing the basic issue with a submitted transaction {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/http-status-codes/standard | Standard Status Codes}
+ * @param {string} [response.statusText] A human-readable description of what the status code means: {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/http-status-codes/horizon-specific | Horizon-Specific Status Codes}
* @param {string} [response.url] URL which can provide more information about the problem that occurred.
*/
export class NetworkError extends Error {
@@ -31,9 +31,9 @@ export class NetworkError extends Error {
/**
* The response sent by the Horizon server.
* @type {object} Response details, received from the Horizon server
- * @property {HorizonApi.ErrorResponseData} [response.data] The data returned by Horizon as part of the error: {@link https://developers.stellar.org/network/horizon/api-reference/errors/response | Error Response}
- * @property {number} [response.status] HTTP status code describing the basic issue with a submitted transaction {@link https://developers.stellar.org/network/horizon/api-reference/errors/http-status-codes/standard | Standard Status Codes}
- * @property {string} [response.statusText] A human-readable description of what the status code means: {@link https://developers.stellar.org/network/horizon/api-reference/errors/http-status-codes/horizon-specific | Horizon-Specific Status Codes}
+ * @property {HorizonApi.ErrorResponseData} [response.data] The data returned by Horizon as part of the error: {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/response | Error Response}
+ * @property {number} [response.status] HTTP status code describing the basic issue with a submitted transaction {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/http-status-codes/standard | Standard Status Codes}
+ * @property {string} [response.statusText] A human-readable description of what the status code means: {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/http-status-codes/horizon-specific | Horizon-Specific Status Codes}
* @property {string} [response.url] URL which can provide more information about the problem that occurred.
*/
this.response = response;
diff --git a/src/horizon/account_call_builder.ts b/src/horizon/account_call_builder.ts
index 9545f7ce7..f012c9b34 100644
--- a/src/horizon/account_call_builder.ts
+++ b/src/horizon/account_call_builder.ts
@@ -7,7 +7,7 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Horizon.Server#accounts}.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-accounts|All Accounts}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-accounts|All Accounts}
*
* @augments CallBuilder
* @private
@@ -26,7 +26,7 @@ export class AccountCallBuilder extends CallBuilder<
* Returns information and links relating to a single account.
* The balances section in the returned JSON will also list all the trust lines this account has set up.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-an-account|Account Details}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-an-account|Account Details}
* @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {CallBuilder} a new CallBuilder instance for the /accounts/:id endpoint
*/
@@ -38,7 +38,7 @@ export class AccountCallBuilder extends CallBuilder<
/**
* This endpoint filters accounts by signer account.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-accounts|Accounts}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-accounts|Accounts}
* @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {AccountCallBuilder} current AccountCallBuilder instance
*/
@@ -49,7 +49,7 @@ export class AccountCallBuilder extends CallBuilder<
/**
* This endpoint filters all accounts who are trustees to an asset.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-accounts|Accounts}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-accounts|Accounts}
* @see Asset
* @param {Asset} asset For example: `new Asset('USD','GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD')`
* @returns {AccountCallBuilder} current AccountCallBuilder instance
@@ -61,7 +61,7 @@ export class AccountCallBuilder extends CallBuilder<
/**
* This endpoint filters accounts where the given account is sponsoring the account or any of its sub-entries..
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-accounts|Accounts}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-accounts|Accounts}
* @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {AccountCallBuilder} current AccountCallBuilder instance
*/
diff --git a/src/horizon/account_response.ts b/src/horizon/account_response.ts
index 406316ff4..d26ca788e 100644
--- a/src/horizon/account_response.ts
+++ b/src/horizon/account_response.ts
@@ -15,7 +15,7 @@ import { ServerApi } from "./server_api";
* @memberof module:Horizon
* @private
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/accounts/object|Account Details}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/accounts/object|Account Details}
* @param {string} response Response from horizon account endpoint.
* @returns {AccountResponse} AccountResponse instance
*/
diff --git a/src/horizon/call_builder.ts b/src/horizon/call_builder.ts
index cbc479c83..49bdec810 100644
--- a/src/horizon/call_builder.ts
+++ b/src/horizon/call_builder.ts
@@ -87,7 +87,7 @@ export class CallBuilder<
/**
* Creates an EventSource that listens for incoming messages from the server. To stop listening for new
* events call the function returned by this method.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/structure/response-format|Horizon Response Format}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/structure/response-format|Horizon Response Format}
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/EventSource|MDN EventSource}
* @param {object} [options] EventSource options.
* @param {Function} [options.onmessage] Callback function to handle incoming messages.
@@ -194,7 +194,7 @@ export class CallBuilder<
/**
* Sets `cursor` parameter for the current call. Returns the CallBuilder object on which this method has been called.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/structure/pagination|Paging}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/structure/pagination|Paging}
* @param {string} cursor A cursor is a value that points to a specific location in a collection of resources.
* @returns {object} current CallBuilder instance
*/
@@ -205,7 +205,7 @@ export class CallBuilder<
/**
* Sets `limit` parameter for the current call. Returns the CallBuilder object on which this method has been called.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/structure/pagination|Paging}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/structure/pagination|Paging}
* @param {number} recordsNumber Number of records the server should return.
* @returns {object} current CallBuilder instance
*/
diff --git a/src/horizon/claimable_balances_call_builder.ts b/src/horizon/claimable_balances_call_builder.ts
index 84fe975c0..480badb45 100644
--- a/src/horizon/claimable_balances_call_builder.ts
+++ b/src/horizon/claimable_balances_call_builder.ts
@@ -7,7 +7,7 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Horizon.Server#claimableBalances}.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/claimablebalances|Claimable Balances}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/claimablebalances|Claimable Balances}
*
* @augments CallBuilder
* @private
@@ -25,7 +25,7 @@ export class ClaimableBalanceCallBuilder extends CallBuilder<
/**
* The claimable balance details endpoint provides information on a single claimable balance.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-a-claimable-balance|Claimable Balance Details}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-claimable-balance|Claimable Balance Details}
* @param {string} claimableBalanceId Claimable balance ID
* @returns {CallBuilder} CallBuilder OperationCallBuilder instance
*/
@@ -42,7 +42,7 @@ export class ClaimableBalanceCallBuilder extends CallBuilder<
/**
* Returns all claimable balances which are sponsored by the given account ID.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-claimable-balances|Claimable Balances}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-claimable-balances|Claimable Balances}
* @param {string} sponsor For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {ClaimableBalanceCallBuilder} current ClaimableBalanceCallBuilder instance
*/
@@ -54,7 +54,7 @@ export class ClaimableBalanceCallBuilder extends CallBuilder<
/**
* Returns all claimable balances which can be claimed by the given account ID.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-claimable-balances|Claimable Balances}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-claimable-balances|Claimable Balances}
* @param {string} claimant For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {ClaimableBalanceCallBuilder} current ClaimableBalanceCallBuilder instance
*/
@@ -66,7 +66,7 @@ export class ClaimableBalanceCallBuilder extends CallBuilder<
/**
* Returns all claimable balances which provide a balance for the given asset.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-claimable-balances|Claimable Balances}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-claimable-balances|Claimable Balances}
* @param {Asset} asset The Asset held by the claimable balance
* @returns {ClaimableBalanceCallBuilder} current ClaimableBalanceCallBuilder instance
*/
diff --git a/src/horizon/effect_call_builder.ts b/src/horizon/effect_call_builder.ts
index 7765d204b..ebaf48afe 100644
--- a/src/horizon/effect_call_builder.ts
+++ b/src/horizon/effect_call_builder.ts
@@ -5,7 +5,7 @@ import { ServerApi } from "./server_api";
* Creates a new {@link EffectCallBuilder} pointed to server defined by serverUrl.
* Do not create this object directly, use {@link Horizon.Server#effects}.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/effects|All Effects}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/effects|All Effects}
*
* @augments CallBuilder
* @private
@@ -22,7 +22,7 @@ export class EffectCallBuilder extends CallBuilder<
/**
* This endpoint represents all effects that changed a given account. It will return relevant effects from the creation of the account to the current ledger.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/get-effects-by-account-id|Effects for Account}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-effects-by-account-id|Effects for Account}
* @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {EffectCallBuilder} this EffectCallBuilder instance
*/
@@ -34,7 +34,7 @@ export class EffectCallBuilder extends CallBuilder<
* Effects are the specific ways that the ledger was changed by any operation.
*
* This endpoint represents all effects that occurred in the given ledger.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-a-ledgers-effects|Effects for Ledger}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-ledgers-effects|Effects for Ledger}
* @param {number|string} sequence Ledger sequence
* @returns {EffectCallBuilder} this EffectCallBuilder instance
*/
@@ -44,7 +44,7 @@ export class EffectCallBuilder extends CallBuilder<
/**
* This endpoint represents all effects that occurred as a result of a given transaction.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-a-transactions-effects|Effects for Transaction}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-transactions-effects|Effects for Transaction}
* @param {string} transactionId Transaction ID
* @returns {EffectCallBuilder} this EffectCallBuilder instance
*/
@@ -54,7 +54,7 @@ export class EffectCallBuilder extends CallBuilder<
/**
* This endpoint represents all effects that occurred as a result of a given operation.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-an-operations-effects|Effects for Operation}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-an-operations-effects|Effects for Operation}
* @param {number} operationId Operation ID
* @returns {EffectCallBuilder} this EffectCallBuilder instance
*/
diff --git a/src/horizon/ledger_call_builder.ts b/src/horizon/ledger_call_builder.ts
index 54f607a4f..3422277a7 100644
--- a/src/horizon/ledger_call_builder.ts
+++ b/src/horizon/ledger_call_builder.ts
@@ -6,7 +6,7 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Horizon.Server#ledgers}.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-ledgers|All Ledgers}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-ledgers|All Ledgers}
*
* @augments CallBuilder
* @private
diff --git a/src/horizon/offer_call_builder.ts b/src/horizon/offer_call_builder.ts
index b28319f49..c5d5c907e 100644
--- a/src/horizon/offer_call_builder.ts
+++ b/src/horizon/offer_call_builder.ts
@@ -7,7 +7,7 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Horizon.Server#offers}.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/offers/|Offers}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/offers/|Offers}
*
* @augments CallBuilder
* @private
@@ -25,7 +25,7 @@ export class OfferCallBuilder extends CallBuilder<
/**
* The offer details endpoint provides information on a single offer. The offer ID provided in the id
* argument specifies which offer to load.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/offers/single/|Offer Details}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/offers/single/|Offer Details}
* @param {string} offerId Offer ID
* @returns {CallBuilder} CallBuilder OperationCallBuilder instance
*/
@@ -38,7 +38,7 @@ export class OfferCallBuilder extends CallBuilder<
/**
* Returns all offers where the given account is involved.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/accounts/offers/|Offers}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/accounts/offers/|Offers}
* @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {OfferCallBuilder} current OfferCallBuilder instance
*/
@@ -48,7 +48,7 @@ export class OfferCallBuilder extends CallBuilder<
/**
* Returns all offers buying an asset.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/offers/list/|Offers}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/offers/list/|Offers}
* @see Asset
* @param {Asset} asset For example: `new Asset('USD','GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD')`
* @returns {OfferCallBuilder} current OfferCallBuilder instance
@@ -66,7 +66,7 @@ export class OfferCallBuilder extends CallBuilder<
/**
* Returns all offers selling an asset.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/offers/list/|Offers}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/offers/list/|Offers}
* @see Asset
* @param {Asset} asset For example: `new Asset('EUR','GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD')`
* @returns {OfferCallBuilder} current OfferCallBuilder instance
@@ -84,7 +84,7 @@ export class OfferCallBuilder extends CallBuilder<
/**
* This endpoint filters offers where the given account is sponsoring the offer entry.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/get-all-offers|Offers}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-all-offers|Offers}
* @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {OfferCallBuilder} current OfferCallBuilder instance
*/
@@ -96,7 +96,7 @@ export class OfferCallBuilder extends CallBuilder<
/**
* This endpoint filters offers where the given account is the seller.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/get-all-offers|Offers}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-all-offers|Offers}
* @param {string} seller For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {OfferCallBuilder} current OfferCallBuilder instance
*/
diff --git a/src/horizon/operation_call_builder.ts b/src/horizon/operation_call_builder.ts
index 8cffe5dc2..6b57bc205 100644
--- a/src/horizon/operation_call_builder.ts
+++ b/src/horizon/operation_call_builder.ts
@@ -6,7 +6,7 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Horizon.Server#operations}.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/operations|All Operations}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/operations|All Operations}
*
* @augments CallBuilder
* @private
@@ -24,7 +24,7 @@ export class OperationCallBuilder extends CallBuilder<
/**
* The operation details endpoint provides information on a single operation. The operation ID provided in the id
* argument specifies which operation to load.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-an-operation|Operation Details}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-an-operation|Operation Details}
* @param {number} operationId Operation ID
* @returns {CallBuilder} this OperationCallBuilder instance
*/
@@ -40,7 +40,7 @@ export class OperationCallBuilder extends CallBuilder<
/**
* This endpoint represents all operations that were included in valid transactions that affected a particular account.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/get-operations-by-account-id|Operations for Account}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-operations-by-account-id|Operations for Account}
* @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {OperationCallBuilder} this OperationCallBuilder instance
*/
@@ -50,7 +50,7 @@ export class OperationCallBuilder extends CallBuilder<
/**
* This endpoint represents all operations that reference a given claimable_balance.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/cb-retrieve-related-operations|Operations for Claimable Balance}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/cb-retrieve-related-operations|Operations for Claimable Balance}
* @param {string} claimableBalanceId Claimable Balance ID
* @returns {OperationCallBuilder} this OperationCallBuilder instance
*/
@@ -61,7 +61,7 @@ export class OperationCallBuilder extends CallBuilder<
/**
* This endpoint returns all operations that occurred in a given ledger.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-a-ledgers-operations|Operations for Ledger}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-ledgers-operations|Operations for Ledger}
* @param {number|string} sequence Ledger sequence
* @returns {OperationCallBuilder} this OperationCallBuilder instance
*/
@@ -71,7 +71,7 @@ export class OperationCallBuilder extends CallBuilder<
/**
* This endpoint represents all operations that are part of a given transaction.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-a-transactions-operations|Operations for Transaction}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-transactions-operations|Operations for Transaction}
* @param {string} transactionId Transaction ID
* @returns {OperationCallBuilder} this OperationCallBuilder instance
*/
diff --git a/src/horizon/orderbook_call_builder.ts b/src/horizon/orderbook_call_builder.ts
index 91e0d3bdd..cf1f301aa 100644
--- a/src/horizon/orderbook_call_builder.ts
+++ b/src/horizon/orderbook_call_builder.ts
@@ -7,7 +7,7 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Horizon.Server#orderbook}.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/order-books|Orderbook Details}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/order-books|Orderbook Details}
*
* @augments CallBuilder
* @private
diff --git a/src/horizon/path_call_builder.ts b/src/horizon/path_call_builder.ts
index 1d68d9fd6..8675cda30 100644
--- a/src/horizon/path_call_builder.ts
+++ b/src/horizon/path_call_builder.ts
@@ -19,7 +19,7 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Horizon.Server#paths}.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/paths|Find Payment Paths}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/paths|Find Payment Paths}
*
* @augments CallBuilder
* @private
diff --git a/src/horizon/payment_call_builder.ts b/src/horizon/payment_call_builder.ts
index f0ce39346..0550b0736 100644
--- a/src/horizon/payment_call_builder.ts
+++ b/src/horizon/payment_call_builder.ts
@@ -6,7 +6,7 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Horizon.Server#payments}.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/horizon/resources/list-all-payments/|All Payments}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/horizon/resources/list-all-payments/|All Payments}
*
* @augments CallBuilder
* @private
@@ -31,7 +31,7 @@ export class PaymentCallBuilder extends CallBuilder<
/**
* This endpoint responds with a collection of Payment operations where the given account was either the sender or receiver.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/horizon/resources/get-payments-by-account-id|Payments for Account}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/horizon/resources/get-payments-by-account-id|Payments for Account}
* @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {PaymentCallBuilder} this PaymentCallBuilder instance
*/
@@ -41,7 +41,7 @@ export class PaymentCallBuilder extends CallBuilder<
/**
* This endpoint represents all payment operations that are part of a valid transactions in a given ledger.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/horizon/resources/retrieve-a-ledgers-payments|Payments for Ledger}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/horizon/resources/retrieve-a-ledgers-payments|Payments for Ledger}
* @param {number|string} sequence Ledger sequence
* @returns {PaymentCallBuilder} this PaymentCallBuilder instance
*/
@@ -51,7 +51,7 @@ export class PaymentCallBuilder extends CallBuilder<
/**
* This endpoint represents all payment operations that are part of a given transaction.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/transactions/payments/|Payments for Transaction}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/transactions/payments/|Payments for Transaction}
* @param {string} transactionId Transaction ID
* @returns {PaymentCallBuilder} this PaymentCallBuilder instance
*/
diff --git a/src/horizon/server.ts b/src/horizon/server.ts
index 6cfb32f80..1b7395e12 100644
--- a/src/horizon/server.ts
+++ b/src/horizon/server.ts
@@ -62,7 +62,7 @@ function getAmountInLumens(amt: BigNumber) {
}
/**
- * Server handles the network connection to a [Horizon](https://developers.stellar.org/network/horizon)
+ * Server handles the network connection to a [Horizon](https://developers.stellar.org/docs/data/horizon)
* instance and exposes an interface for requests to that instance.
* @memberof module:Horizon
*
@@ -186,7 +186,7 @@ export class Server {
/**
* Fetch the fee stats endpoint.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/fee-stats|Fee Stats}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/fee-stats|Fee Stats}
* @returns {Promise} Promise that resolves to the fee stats returned by Horizon.
*/
// eslint-disable-next-line require-await
@@ -292,7 +292,7 @@ export class Server {
* * If `wasPartiallyFilled` is true, you can tell the user that
* `amountBought` or `amountSold` have already been transferred.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/submit-a-transaction|Submit a Transaction}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/submit-a-transaction|Submit a Transaction}
* @param {Transaction|FeeBumpTransaction} transaction - The transaction to submit.
* @param {object} [opts] Options object
* @param {boolean} [opts.skipMemoRequiredCheck] - Allow skipping memo
diff --git a/src/horizon/strict_receive_path_call_builder.ts b/src/horizon/strict_receive_path_call_builder.ts
index 25edc3093..c520246d4 100644
--- a/src/horizon/strict_receive_path_call_builder.ts
+++ b/src/horizon/strict_receive_path_call_builder.ts
@@ -23,7 +23,7 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Horizon.Server#strictReceivePaths}.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/paths|Find Payment Paths}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/paths|Find Payment Paths}
*
* @augments CallBuilder
* @private
diff --git a/src/horizon/strict_send_path_call_builder.ts b/src/horizon/strict_send_path_call_builder.ts
index ea9f512e8..ba732d1cc 100644
--- a/src/horizon/strict_send_path_call_builder.ts
+++ b/src/horizon/strict_send_path_call_builder.ts
@@ -22,7 +22,7 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Horizon.Server#strictSendPaths}.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/aggregations/paths|Find Payment Paths}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/paths|Find Payment Paths}
*
* @augments CallBuilder
* @private
diff --git a/src/horizon/trades_call_builder.ts b/src/horizon/trades_call_builder.ts
index f11612d4b..ab30cb503 100644
--- a/src/horizon/trades_call_builder.ts
+++ b/src/horizon/trades_call_builder.ts
@@ -7,7 +7,7 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Horizon.Server#trades}.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/trades|Trades}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/trades|Trades}
*
* @augments CallBuilder
* @private
@@ -69,7 +69,7 @@ export class TradesCallBuilder extends CallBuilder<
/**
* Filter trades for a specific account
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/get-trades-by-account-id|Trades for Account}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-trades-by-account-id|Trades for Account}
* @param {string} accountId For example: `GBYTR4MC5JAX4ALGUBJD7EIKZVM7CUGWKXIUJMRSMK573XH2O7VAK3SR`
* @returns {TradesCallBuilder} current TradesCallBuilder instance
*/
@@ -79,7 +79,7 @@ export class TradesCallBuilder extends CallBuilder<
/**
* Filter trades for a specific liquidity pool
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-related-trades|Trades for Liquidity Pool}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-related-trades|Trades for Liquidity Pool}
* @param {string} liquidityPoolId For example: `3b476aff8a406a6ec3b61d5c038009cef85f2ddfaf616822dc4fec92845149b4`
* @returns {TradesCallBuilder} current TradesCallBuilder instance
*/
diff --git a/src/horizon/transaction_call_builder.ts b/src/horizon/transaction_call_builder.ts
index 5ad165162..3650c4d55 100644
--- a/src/horizon/transaction_call_builder.ts
+++ b/src/horizon/transaction_call_builder.ts
@@ -6,7 +6,7 @@ import { ServerApi } from "./server_api";
*
* Do not create this object directly, use {@link Horizon.Server#transactions}.
*
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/list-all-transactions|All Transactions}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-transactions|All Transactions}
*
* @augments CallBuilder
* @private
@@ -24,7 +24,7 @@ export class TransactionCallBuilder extends CallBuilder<
/**
* The transaction details endpoint provides information on a single transaction. The transaction hash provided in the hash argument specifies which transaction to load.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-a-transaction|Transaction Details}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-transaction|Transaction Details}
* @param {string} transactionId Transaction ID
* @returns {CallBuilder} a CallBuilder instance
*/
@@ -40,7 +40,7 @@ export class TransactionCallBuilder extends CallBuilder<
/**
* This endpoint represents all transactions that affected a given account.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/get-transactions-by-account-id|Transactions for Account}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-transactions-by-account-id|Transactions for Account}
* @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD`
* @returns {TransactionCallBuilder} current TransactionCallBuilder instance
*/
@@ -50,7 +50,7 @@ export class TransactionCallBuilder extends CallBuilder<
/**
* This endpoint represents all transactions that reference a given claimable_balance.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/cb-retrieve-related-transactions|Transactions for Claimable Balance}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/cb-retrieve-related-transactions|Transactions for Claimable Balance}
* @param {string} claimableBalanceId Claimable Balance ID
* @returns {TransactionCallBuilder} this TransactionCallBuilder instance
*/
@@ -60,7 +60,7 @@ export class TransactionCallBuilder extends CallBuilder<
/**
* This endpoint represents all transactions in a given ledger.
- * @see {@link https://developers.stellar.org/network/horizon/api-reference/resources/retrieve-a-ledgers-transactions|Transactions for Ledger}
+ * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-ledgers-transactions|Transactions for Ledger}
* @param {number|string} sequence Ledger sequence
* @returns {TransactionCallBuilder} current TransactionCallBuilder instance
*/
diff --git a/src/rpc/server.ts b/src/rpc/server.ts
index ba50bcbf2..f8e39909a 100644
--- a/src/rpc/server.ts
+++ b/src/rpc/server.ts
@@ -137,7 +137,7 @@ function findCreatedAccountSequenceInTransactionMeta(
* You can also use {@link Config} class to set this globally.
* @param {Record} [opts.headers] Allows setting custom headers
*
- * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods | API reference docs}
+ * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods | API reference docs}
*/
export class Server {
public readonly serverURL: URI;
@@ -174,7 +174,7 @@ export class Server {
* @returns {Promise} A promise which resolves to the {@link Account}
* object with a populated sequence number
*
- * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getLedgerEntries | getLedgerEntries docs}
+ * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgerEntries | getLedgerEntries docs}
*
* @example
* const accountId = "GBZC6Y2Y7Q3ZQ2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4";
@@ -209,7 +209,7 @@ export class Server {
* {@link Api.GetHealthResponse} object with the status of the
* server (e.g. "healthy").
*
- * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getHealth | getLedgerEntries docs}
+ * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getHealth | getLedgerEntries docs}
*
* @example
* server.getHealth().then((health) => {
@@ -243,7 +243,7 @@ export class Server {
* @warning If the data entry in question is a 'temporary' entry, it's
* entirely possible that it has expired out of existence.
*
- * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getLedgerEntries | getLedgerEntries docs}
+ * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgerEntries | getLedgerEntries docs}
*
* @example
* const contractId = "CCJZ5DGASBWQXR5MPFCJXMBI333XE5U3FSJTNQU7RIKE3P5GN2K2WYD5";
@@ -412,7 +412,7 @@ export class Server {
* @returns {Promise} The current on-chain
* values for the given ledger keys
*
- * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getLedgerEntries | getLedgerEntries docs}
+ * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgerEntries | getLedgerEntries docs}
* @see Server._getLedgerEntries
* @example
* const contractId = "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM";
@@ -458,7 +458,7 @@ export class Server {
* @returns {Promise} The status,
* result, and other details about the transaction
*
- * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getTransaction | getTransaction docs}
+ * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getTransaction | getTransaction docs}
*
* @example
* const transactionHash = "c4515e3bdc0897f21cc5dbec8c82cf0a936d4741cb74a8e158eb51b9fb00411a";
@@ -554,7 +554,7 @@ export class Server {
* @returns {Promise} A paginatable set of the events
* matching the given event filters
*
- * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getEvents | getEvents docs}
+ * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getEvents | getEvents docs}
*
* @example
* server.getEvents({
@@ -608,7 +608,7 @@ export class Server {
* @returns {Promise} Metadata about the current
* network this RPC server is connected to
*
- * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getNetwork | getNetwork docs}
+ * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getNetwork | getNetwork docs}
*
* @example
* server.getNetwork().then((network) => {
@@ -629,7 +629,7 @@ export class Server {
* @returns {Promise} metadata about the
* latest ledger on the network that this RPC server is connected to
*
- * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getLatestLedger | getLatestLedger docs}
+ * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLatestLedger | getLatestLedger docs}
*
* @example
* server.getLatestLedger().then((response) => {
@@ -657,7 +657,7 @@ export class Server {
* the transaction
*
* @see {@link https://developers.stellar.org/docs/learn/fundamentals/stellar-data-structures/operations-and-transactions | transaction docs}
- * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/simulateTransaction | simulateTransaction docs}
+ * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/simulateTransaction | simulateTransaction docs}
* @see module:rpc.Server#prepareTransaction
* @see module:rpc.assembleTransaction
*
@@ -749,7 +749,7 @@ export class Server {
* If simulation fails
*
* @see module:rpc.assembleTransaction
- * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/simulateTransaction | simulateTransaction docs}
+ * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/simulateTransaction | simulateTransaction docs}
*
* @example
* const contractId = 'CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE';
@@ -804,7 +804,7 @@ export class Server {
* transaction id, status, and any error if available
*
* @see {@link https://developers.stellar.org/docs/learn/fundamentals/stellar-data-structures/operations-and-transactions | transaction docs}
- * @see {@link https://developers.stellar.org/network/soroban-rpc/api-reference/methods/sendTransaction | sendTransaction docs}
+ * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/sendTransaction | sendTransaction docs}
*
* @example
* const contractId = 'CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE';
From d4db2c5cdf28a62f24e585a4d4bea2ff857ce2c1 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Thu, 19 Sep 2024 11:01:08 -0500
Subject: [PATCH 54/60] tweak docs for config class and interface
this commit also exports the `Configuration` interface
---
src/config.ts | 47 +++++++++++++++++++++++------------------------
1 file changed, 23 insertions(+), 24 deletions(-)
diff --git a/src/config.ts b/src/config.ts
index 214e0cf8d..5ce5ee70c 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -1,12 +1,16 @@
/**
- * @typedef {object} Configuration
- * @memberof Config
- * @property {boolean} [allowHttp=false] Allow connecting to http servers, default: `false`. This must be set to false in production deployments!
- * @property {number} [timeout=0] Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue. You can also use {@link Config} class to set this globally.
+ * Global config parameters.
*/
-
-interface Configuration {
+export interface Configuration {
+ /**
+ * Allow connecting to http servers. This must be set to false in production deployments!
+ * @default false
+ */
allowHttp: boolean;
+ /**
+ * Allow a timeout. Allows user to avoid nasty lag due network issues.
+ * @default 0
+ */
timeout: number;
}
@@ -21,48 +25,45 @@ let config = { ...defaultConfig};
* Global config class.
*
* @example Usage in node
- * import {Config} from 'stellar-sdk';
+ * import { Config } from '@stellar/stellar-sdk';
* Config.setAllowHttp(true);
* Config.setTimeout(5000);
+ *
* @example Usage in the browser
* StellarSdk.Config.setAllowHttp(true);
* StellarSdk.Config.setTimeout(5000);
- * @static
*/
class Config {
/**
- * Sets `allowHttp` flag globally. When set to `true`, connections to insecure http protocol servers will be allowed.
- * Must be set to `false` in production. Default: `false`.
- * @param {boolean} value new allowHttp value
- * @returns {void}
- * @static
+ * Sets `allowHttp` flag globally. When set to `true`, connections to insecure
+ * http protocol servers will be allowed. Must be set to `false` in
+ * production.
+ * @default false
*/
public static setAllowHttp(value: boolean): void {
config.allowHttp = value;
}
/**
- * Sets `timeout` flag globally. When set to anything besides 0, the request will timeout after specified time (ms).
- * Default: 0.
- * @param {number} value new timeout value
- * @returns {void}
- * @static
+ * Sets `timeout` flag globally. When set to anything besides 0, the request
+ * will timeout after specified time (ms).
+ * @default 0
*/
public static setTimeout(value: number): void {
config.timeout = value;
}
/**
- * @static
- * @returns {boolean} allowHttp flag
+ * Returns the configured `allowHttp` flag.
+ * @returns {boolean}
*/
public static isAllowHttp(): boolean {
return config.allowHttp;
}
/**
- * @static
- * @returns {number} timeout flag
+ * Returns the configured `timeout` flag.
+ * @returns {number}
*/
public static getTimeout(): number {
return config.timeout;
@@ -70,8 +71,6 @@ class Config {
/**
* Sets all global config flags to default values.
- * @static
- * @returns {void}
*/
public static setDefault(): void {
config = { ...defaultConfig};
From fa9f6c8de9ff174bf18ee6fa7c8e146932005d1b Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Thu, 19 Sep 2024 16:16:21 -0500
Subject: [PATCH 55/60] fix all Server.* modules being lumped together
---
src/config.ts | 7 ++++
src/contract/assembled_transaction.ts | 4 +-
src/contract/client.ts | 2 +-
src/contract/sent_transaction.ts | 2 +-
src/contract/spec.ts | 6 +++
src/contract/types.ts | 60 +++++++++++++++++++--------
src/contract/utils.ts | 2 +-
src/federation/api.ts | 55 ++++++++++++------------
src/federation/index.ts | 4 +-
src/federation/server.ts | 23 ++++------
src/friendbot/index.ts | 11 -----
src/horizon/index.ts | 2 +-
src/horizon/server.ts | 48 ++++++++++-----------
src/index.ts | 6 +--
src/rpc/index.ts | 2 +-
src/rpc/server.ts | 18 ++++----
src/rpc/transaction.ts | 4 +-
src/stellartoml/index.ts | 7 ++--
src/utils.ts | 17 +++++---
19 files changed, 154 insertions(+), 126 deletions(-)
diff --git a/src/config.ts b/src/config.ts
index 5ce5ee70c..8184da934 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -24,6 +24,8 @@ let config = { ...defaultConfig};
/**
* Global config class.
*
+ * @hideconstructor
+ *
* @example Usage in node
* import { Config } from '@stellar/stellar-sdk';
* Config.setAllowHttp(true);
@@ -39,6 +41,7 @@ class Config {
* http protocol servers will be allowed. Must be set to `false` in
* production.
* @default false
+ * @static
*/
public static setAllowHttp(value: boolean): void {
config.allowHttp = value;
@@ -48,6 +51,7 @@ class Config {
* Sets `timeout` flag globally. When set to anything besides 0, the request
* will timeout after specified time (ms).
* @default 0
+ * @static
*/
public static setTimeout(value: number): void {
config.timeout = value;
@@ -55,6 +59,7 @@ class Config {
/**
* Returns the configured `allowHttp` flag.
+ * @static
* @returns {boolean}
*/
public static isAllowHttp(): boolean {
@@ -63,6 +68,7 @@ class Config {
/**
* Returns the configured `timeout` flag.
+ * @static
* @returns {number}
*/
public static getTimeout(): number {
@@ -71,6 +77,7 @@ class Config {
/**
* Sets all global config flags to default values.
+ * @static
*/
public static setDefault(): void {
config = { ...defaultConfig};
diff --git a/src/contract/assembled_transaction.ts b/src/contract/assembled_transaction.ts
index a35237f8f..ffaa0f060 100644
--- a/src/contract/assembled_transaction.ts
+++ b/src/contract/assembled_transaction.ts
@@ -18,7 +18,7 @@ import type {
Tx,
XDR_BASE64,
} from "./types";
-import { Server } from "../rpc/server";
+import { Server } from "../rpc";
import { Api } from "../rpc/api";
import { assembleTransaction } from "../rpc/transaction";
import type { Client } from "./client";
@@ -32,6 +32,8 @@ import { DEFAULT_TIMEOUT } from "./types";
import { SentTransaction } from "./sent_transaction";
import { Spec } from "./spec";
+/** @module contract */
+
/**
* The main workhorse of {@link Client}. This class is used to wrap a
* transaction-under-construction and provide high-level interfaces to the most
diff --git a/src/contract/client.ts b/src/contract/client.ts
index 436327f83..2db5b4040 100644
--- a/src/contract/client.ts
+++ b/src/contract/client.ts
@@ -9,7 +9,7 @@ import { processSpecEntryStream } from './utils';
* Generate a class from the contract spec that where each contract method
* gets included with an identical name.
*
- * Each method returns a {@link module:contract.AssembledTransaction} that can
+ * Each method returns an {@link module:contract.AssembledTransaction | AssembledTransaction} that can
* be used to modify, simulate, decode results, and possibly sign, & submit the
* transaction.
*
diff --git a/src/contract/sent_transaction.ts b/src/contract/sent_transaction.ts
index c9a71c80c..f04d37ee5 100644
--- a/src/contract/sent_transaction.ts
+++ b/src/contract/sent_transaction.ts
@@ -1,7 +1,7 @@
/* disable max-classes rule, because extending error shouldn't count! */
/* eslint max-classes-per-file: 0 */
import type { MethodOptions } from "./types";
-import { Server } from "../rpc/server"
+import { Server } from "../rpc"
import { Api } from "../rpc/api"
import { withExponentialBackoff } from "./utils";
import { DEFAULT_TIMEOUT } from "./types";
diff --git a/src/contract/spec.ts b/src/contract/spec.ts
index fe6332876..f307ff31c 100644
--- a/src/contract/spec.ts
+++ b/src/contract/spec.ts
@@ -465,8 +465,14 @@ function unionToJsonSchema(udt: xdr.ScSpecUdtUnionV0): any {
* console.log(result); // {success: true}
*/
export class Spec {
+ /**
+ * The XDR spec entries.
+ */
public entries: xdr.ScSpecEntry[] = [];
+ /**
+ * Constructs a new ContractSpec from an array of XDR spec entries.
+ */
constructor(entries: xdr.ScSpecEntry[] | string[]) {
if (entries.length === 0) {
throw new Error("Contract spec must have at least one entry");
diff --git a/src/contract/types.ts b/src/contract/types.ts
index 4f44742aa..754046839 100644
--- a/src/contract/types.ts
+++ b/src/contract/types.ts
@@ -1,25 +1,48 @@
/* disable PascalCase naming convention, to avoid breaking change */
/* eslint-disable @typescript-eslint/naming-convention */
-import { BASE_FEE, Memo, MemoType, Operation, Transaction, xdr } from "@stellar/stellar-base";
+import { Memo, MemoType, Operation, Transaction, xdr } from "@stellar/stellar-base";
import type { Client } from "./client";
-import type { AssembledTransaction } from "./assembled_transaction";
export type XDR_BASE64 = string;
/**
* An unsigned 32-bit integer.
- * @type {number}
+ * @memberof module:contract
*/
export type u32 = number;
/**
* A signed 32-bit integer.
- * @type {number}
+ * @memberof module:contract
*/
export type i32 = number;
+/**
+ * An unsigned 64-bit integer.
+ * @memberof module:contract
+ */
export type u64 = bigint;
+/**
+ * A signed 64-bit integer.
+ * @memberof module:contract
+ */
export type i64 = bigint;
+/**
+ * An unsigned 128-bit integer.
+ * @memberof module:contract
+ */
export type u128 = bigint;
+/**
+ * A signed 128-bit integer.
+ * @memberof module:contract
+ */
export type i128 = bigint;
+/**
+ * An unsigned 256-bit integer.
+ * @memberof module:contract
+ */
export type u256 = bigint;
+/**
+ * A signed 256-bit integer.
+ * @memberof module:contract
+ */
export type i256 = bigint;
export type Option = T | undefined;
export type Typepoint = bigint;
@@ -28,6 +51,7 @@ export type Duration = bigint;
/**
* A "regular" transaction, as opposed to a FeeBumpTransaction.
* @memberof module:contract
+ * @type {Transaction, Operation[]>}
*/
export type Tx = Transaction, Operation[]>;
@@ -39,8 +63,8 @@ export type ClientOptions = {
/**
* The public key of the account that will send this transaction. You can
* override this for specific methods later, like
- * {@link contract.AssembledTransaction#signAndSend} and
- * {@link contract.AssembledTransaction#signAuthEntries}.
+ * [signAndSend]{@link module:contract.AssembledTransaction#signAndSend} and
+ * [signAuthEntries]{@link module:contract.AssembledTransaction#signAuthEntries}.
*/
publicKey?: string;
/**
@@ -49,7 +73,7 @@ export type ClientOptions = {
* calls, which only need to be simulated. If you do not need to sign and
* send, there is no need to provide this. If you do not provide it during
* initialization, you can provide it later when you call
- * {@link contract.AssembledTransaction~signAndSend}.
+ * {@link module:contract.AssembledTransaction#signAndSend signAndSend}.
*
* Matches signature of `signTransaction` from Freighter.
*/
@@ -66,7 +90,7 @@ export type ClientOptions = {
* private key corresponding to the provided `publicKey`. This is only needed
* for multi-auth transactions, in which one transaction is signed by
* multiple parties. If you do not provide it during initialization, you can
- * provide it later when you call {@link AssembledTransaction#signAuthEntries}.
+ * provide it later when you call {@link module:contract.AssembledTransaction#signAuthEntries signAuthEntries}.
*
* Matches signature of `signAuthEntry` from Freighter.
*/
@@ -103,11 +127,11 @@ export type ClientOptions = {
* on-chain XDR that also describes your contract's methods. Each error will
* have a specific number.
*
- * A Client makes method calls with an {@link AssembledTransaction}.
+ * A Client makes method calls with an {@link module:contract.AssembledTransaction AssembledTransaction}.
* When one of these method calls encounters an error, `AssembledTransaction`
* will first attempt to parse the error as an "official" `contracterror`
* error, by using this passed-in `errorTypes` object. See
- * {@link AssembledTransaction#parseError}. If `errorTypes` is blank or no
+ * {@link module:contract.AssembledTransaction#parseError parseError}. If `errorTypes` is blank or no
* matching error is found, then it will throw the raw error.
* @default {}
*/
@@ -120,27 +144,29 @@ export type ClientOptions = {
*/
export type MethodOptions = {
/**
- * The fee to pay for the transaction. Default: {@link BASE_FEE}
+ * The fee to pay for the transaction.
+ * @default 100
*/
fee?: string;
/**
* The timebounds which should be set for transactions generated by this
- * contract client.
- * @see {@link module:contract.Client#DEFAULT_TIMEOUT}
- * @default module:contract.Client#DEFAULT_TIMEOUT
+ * contract client. {@link module:contract#.DEFAULT_TIMEOUT}
+ * @default 300
*/
timeoutInSeconds?: number;
/**
* Whether to automatically simulate the transaction when constructing the
- * AssembledTransaction. Default: true
+ * AssembledTransaction.
+ * @default true
*/
simulate?: boolean;
/**
* If true, will automatically attempt to restore the transaction if there
- * are archived entries that need renewal. @default false
+ * are archived entries that need renewal.
+ * @default false
*/
restore?: boolean;
};
@@ -159,7 +185,7 @@ export type AssembledTransactionOptions = MethodOptions &
* _before_ transaction signing.
* @constant {number}
* @default 300
- * @memberof module:contract.Client
+ * @memberof module:contract
*/
export const DEFAULT_TIMEOUT = 5 * 60;
diff --git a/src/contract/utils.ts b/src/contract/utils.ts
index 010c9ec2b..44b79c280 100644
--- a/src/contract/utils.ts
+++ b/src/contract/utils.ts
@@ -1,5 +1,5 @@
import { xdr, cereal, Account } from "@stellar/stellar-base";
-import { Server } from "../rpc/server";
+import { Server } from "../rpc";
import { type AssembledTransaction } from "./assembled_transaction";
import { NULL_ACCOUNT , AssembledTransactionOptions } from "./types";
diff --git a/src/federation/api.ts b/src/federation/api.ts
index ab9143af9..9f43c7880 100644
--- a/src/federation/api.ts
+++ b/src/federation/api.ts
@@ -1,34 +1,33 @@
-/* tslint:disable-next-line:no-namespace */
-
-/**
- * @namespace Api
- * @memberof module:Federation
- */
-
+export namespace Api {
/**
- * @typedef {object} Record Record returned from a federation server.
- * @memberof module:Federation.Api
- * @property {string} account_id The Stellar public key resolved from the federation lookup
- * @property {string} [memo_type] The type of memo, if any, required to send payments to this user
- * @property {string} [memo] The memo value, if any, required to send payments to this user
+ * Record returned from a federation server.
*/
+export interface Record {
+ /**
+ * The Stellar public key resolved from the federation lookup
+ */
+ account_id: string;
+ /**
+ * The type of memo, if any, required to send payments to this user
+ */
+ memo_type?: string;
+ /**
+ * The memo value, if any, required to send payments to this user
+ */
+ memo?: string;
+}
/**
- * @typedef {object} Options Options for configuring connections to federation servers.
- * @memberof module:Federation.Api
- * @property {boolean} [allowHttp=false] Allow connecting to http servers, default: `false`. This must be set to false in production deployments!
- * @property {number} [timeout=0] Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue. You can also use {@link Config} class to set this globally.
+ * Options for configuring connections to federation servers. You can also use {@link Config} class to set this globally.
*/
-
-export namespace Api {
- export interface Record {
- account_id: string;
- memo_type?: string;
- memo?: string;
- }
-
- export interface Options {
- allowHttp?: boolean;
- timeout?: number;
- }
+export interface Options {
+ /**
+ * Allow connecting to http servers, default: `false`. This must be set to false in production deployments!
+ */
+ allowHttp?: boolean;
+ /**
+ * Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue.
+ */
+ timeout?: number;
+}
}
diff --git a/src/federation/index.ts b/src/federation/index.ts
index beead6bb8..4eaff4f80 100644
--- a/src/federation/index.ts
+++ b/src/federation/index.ts
@@ -1,2 +1,2 @@
-export { Server, FEDERATION_RESPONSE_MAX_SIZE } from './server';
-export * as Api from './api';
+export { FederationServer as Server, FEDERATION_RESPONSE_MAX_SIZE } from './server';
+export * from './api';
diff --git a/src/federation/server.ts b/src/federation/server.ts
index 32f4b3030..f1c3469f0 100644
--- a/src/federation/server.ts
+++ b/src/federation/server.ts
@@ -13,40 +13,35 @@ import { Api } from "./api";
/**
* The maximum size of response from a federation server
- * @constant {number}
* @default 102400
*/
-export const FEDERATION_RESPONSE_MAX_SIZE = 100 * 1024;
+export const FEDERATION_RESPONSE_MAX_SIZE: number = 100 * 1024;
/**
* Federation.Server handles a network connection to a
* [federation server](https://developers.stellar.org/docs/learn/encyclopedia/federation)
* instance and exposes an interface for requests to that instance.
- * @class
+ *
+ * @alias module:Federation.Server
* @memberof module:Federation
* @param {string} serverURL The federation server URL (ex. `https://acme.com/federation`).
* @param {string} domain Domain this server represents
- * @param {module:Federation.Api.Options} [opts] Options object
+ * @param {Api.Options} [opts] Options object
* @returns {void}
*/
-export class Server {
+export class FederationServer {
/**
* The federation server URL (ex. `https://acme.com/federation`).
- *
*/
private readonly serverURL: URI; // TODO: public or private? readonly?
/**
* Domain this server represents.
- *
- * @type {string}
*/
private readonly domain: string; // TODO: public or private? readonly?
/**
* Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue.
- *
- * @type {number}
*/
private readonly timeout: number; // TODO: public or private? readonly?
@@ -74,7 +69,7 @@ export class Server {
* @see Federation doc
* @see Stellar.toml doc
* @param {string} value Stellar Address (ex. `bob*stellar.org`)
- * @param {module:Federation.Api.Options} [opts] Options object
+ * @param {object} [opts] Options object
* @returns {Promise} A promise that resolves to the federation record
* @throws Will throw an error if the provided account ID is not a valid Ed25519 public key.
*/
@@ -96,7 +91,7 @@ export class Server {
if (addressParts.length !== 2 || !domain) {
return Promise.reject(new Error("Invalid Stellar address"));
}
- const federationServer = await Server.createForDomain(
+ const federationServer = await FederationServer.createForDomain(
domain,
opts,
);
@@ -129,14 +124,14 @@ export class Server {
public static async createForDomain(
domain: string,
opts: Api.Options = {},
- ): Promise {
+ ): Promise {
const tomlObject = await Resolver.resolve(domain, opts);
if (!tomlObject.FEDERATION_SERVER) {
return Promise.reject(
new Error("stellar.toml does not contain FEDERATION_SERVER field"),
);
}
- return new Server(tomlObject.FEDERATION_SERVER, domain, opts);
+ return new FederationServer(tomlObject.FEDERATION_SERVER, domain, opts);
}
public constructor(
diff --git a/src/friendbot/index.ts b/src/friendbot/index.ts
index 4daa574b1..f7e15a14e 100644
--- a/src/friendbot/index.ts
+++ b/src/friendbot/index.ts
@@ -1,14 +1,3 @@
-/**
- * @namespace Api
- * @memberof module:Friendbot
- */
-
-/**
- * @typedef {object} Response
- * @memberof module:Friendbot.Api
- * @property {string} result_meta_xdr The base64-encoded XDR result meta of the transaction that Friendbot submitted to create the account.
- */
-
export namespace Api {
// Just the fields we are interested in
export interface Response {
diff --git a/src/horizon/index.ts b/src/horizon/index.ts
index dd44af12d..6d425ace6 100644
--- a/src/horizon/index.ts
+++ b/src/horizon/index.ts
@@ -7,7 +7,7 @@ export * from "./server_api";
// stellar-sdk classes to expose
export * from "./account_response";
-export { Server } from "./server";
+export { HorizonServer as Server } from "./server";
export {
default as AxiosClient,
SERVER_TIME_MAP,
diff --git a/src/horizon/server.ts b/src/horizon/server.ts
index 1b7395e12..ff478bbf4 100644
--- a/src/horizon/server.ts
+++ b/src/horizon/server.ts
@@ -64,12 +64,14 @@ function getAmountInLumens(amt: BigNumber) {
/**
* Server handles the network connection to a [Horizon](https://developers.stellar.org/docs/data/horizon)
* instance and exposes an interface for requests to that instance.
+ *
+ * @alias module:Horizon.Server
* @memberof module:Horizon
*
* @param {string} serverURL Horizon Server URL (ex. `https://horizon-testnet.stellar.org`).
* @param {Options} [opts] Options object
*/
-export class Server {
+export class HorizonServer {
/**
* serverURL Horizon Server URL (ex. `https://horizon-testnet.stellar.org`).
*
@@ -77,7 +79,7 @@ export class Server {
*/
public readonly serverURL: URI;
- constructor(serverURL: string, opts: Server.Options = {}) {
+ constructor(serverURL: string, opts: HorizonServer.Options = {}) {
this.serverURL = URI(serverURL);
const allowHttp =
@@ -141,13 +143,13 @@ export class Server {
* @param {number} seconds Number of seconds past the current time to wait.
* @param {boolean} [_isRetry] True if this is a retry. Only set this internally!
* This is to avoid a scenario where Horizon is horking up the wrong date.
- * @returns {Promise} Promise that resolves a `timebounds` object
+ * @returns {Promise} Promise that resolves a `timebounds` object
* (with the shape `{ minTime: 0, maxTime: N }`) that you can set the `timebounds` option to.
*/
public async fetchTimebounds(
seconds: number,
_isRetry: boolean = false,
- ): Promise {
+ ): Promise {
// AxiosClient instead of this.ledgers so we can get at them headers
const currentTime = getCurrentServerTime(this.serverURL.hostname());
@@ -208,8 +210,20 @@ export class Server {
* attribute to the response that will help you analyze what happened with
* your offers.
*
- * Ex:
- * ```javascript
+ * For example, you'll want to examine `offerResults` to add affordances like
+ * these to your app:
+ * - If `wasImmediatelyFilled` is true, then no offer was created. So if you
+ * normally watch the `Server.offers` endpoint for offer updates, you
+ * instead need to check `Server.trades` to find the result of this filled
+ * offer.
+ * - If `wasImmediatelyDeleted` is true, then the offer you submitted was
+ * deleted without reaching the orderbook or being matched (possibly because
+ * your amounts were rounded down to zero). So treat the just-submitted
+ * offer request as if it never happened.
+ * - If `wasPartiallyFilled` is true, you can tell the user that
+ * `amountBought` or `amountSold` have already been transferred.
+ *
+ * @example
* const res = {
* ...response,
* offerResults: [
@@ -277,20 +291,6 @@ export class Server {
* }
* ]
* }
- * ```
- *
- * For example, you'll want to examine `offerResults` to add affordances like
- * these to your app:
- * * If `wasImmediatelyFilled` is true, then no offer was created. So if you
- * normally watch the `Server.offers` endpoint for offer updates, you
- * instead need to check `Server.trades` to find the result of this filled
- * offer.
- * * If `wasImmediatelyDeleted` is true, then the offer you submitted was
- * deleted without reaching the orderbook or being matched (possibly because
- * your amounts were rounded down to zero). So treat the just-submitted
- * offer request as if it never happened.
- * * If `wasPartiallyFilled` is true, you can tell the user that
- * `amountBought` or `amountSold` have already been transferred.
*
* @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/submit-a-transaction|Submit a Transaction}
* @param {Transaction|FeeBumpTransaction} transaction - The transaction to submit.
@@ -303,7 +303,7 @@ export class Server {
*/
public async submitTransaction(
transaction: Transaction | FeeBumpTransaction,
- opts: Server.SubmitTransactionOptions = { skipMemoRequiredCheck: false },
+ opts: HorizonServer.SubmitTransactionOptions = { skipMemoRequiredCheck: false },
): Promise {
// only check for memo required if skipMemoRequiredCheck is false and the transaction doesn't include a memo.
if (!opts.skipMemoRequiredCheck) {
@@ -515,7 +515,7 @@ export class Server {
* and waits for the transaction to be ingested in Horizon, this endpoint relays the response from
* core directly back to the user.
*
- * By default, this function calls {@link Server#checkMemoRequired}, you can
+ * By default, this function calls {@link HorizonServer#checkMemoRequired}, you can
* skip this check by setting the option `skipMemoRequiredCheck` to `true`.
*
* @see [Submit
@@ -530,7 +530,7 @@ export class Server {
*/
public async submitAsyncTransaction(
transaction: Transaction | FeeBumpTransaction,
- opts: Server.SubmitTransactionOptions = { skipMemoRequiredCheck: false }
+ opts: HorizonServer.SubmitTransactionOptions = { skipMemoRequiredCheck: false }
): Promise {
// only check for memo required if skipMemoRequiredCheck is false and the transaction doesn't include a memo.
if (!opts.skipMemoRequiredCheck) {
@@ -887,7 +887,7 @@ export class Server {
* @property {string} [authToken] Allow set custom header `X-Auth-Token`, default: `undefined`.
*/
-export namespace Server {
+export namespace HorizonServer {
export interface Options {
allowHttp?: boolean;
appName?: string;
diff --git a/src/index.ts b/src/index.ts
index 0d92c2263..4551fb8c9 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -22,9 +22,8 @@ export * as Horizon from './horizon';
* `/rpc` entrypoint, if your version of Node and your TypeScript configuration
* allow it:
*
- * ```ts
+ * @example
* import { Server } from '@stellar/stellar-sdk/rpc';
- * ```
*/
export * as rpc from './rpc';
@@ -39,9 +38,8 @@ export * as SorobanRpc from './rpc';
* entrypoint, if your version of Node and your TypeScript configuration allow
* it:
*
- * ```ts
+ * @example
* import { Client } from '@stellar/stellar-sdk/contract';
- * ```
* @private
*/
export * as contract from './contract'
diff --git a/src/rpc/index.ts b/src/rpc/index.ts
index a209f02d0..8564852bf 100644
--- a/src/rpc/index.ts
+++ b/src/rpc/index.ts
@@ -7,7 +7,7 @@
export * from "./api";
// soroban-client classes to expose
-export { Server, Durability } from "./server";
+export { RpcServer as Server, Durability } from "./server";
export { default as AxiosClient } from "./axios";
export { parseRawSimulation, parseRawEvents } from "./parsers";
export * from "./transaction";
diff --git a/src/rpc/server.ts b/src/rpc/server.ts
index f8e39909a..38648ff32 100644
--- a/src/rpc/server.ts
+++ b/src/rpc/server.ts
@@ -71,7 +71,7 @@ export enum Durability {
* @memberof module:rpc.Server
*/
-export namespace Server {
+export namespace RpcServer {
export interface GetEventsRequest {
filters: Api.EventFilter[];
startLedger?: number; // either this or cursor
@@ -127,7 +127,7 @@ function findCreatedAccountSequenceInTransactionMeta(
* Handles the network connection to a Soroban RPC instance, exposing an
* interface for requests to that instance.
*
- * @class
+ * @alias module:rpc.Server
* @memberof module:rpc
*
* @param {string} serverURL Soroban-RPC Server URL (ex. `http://localhost:8000/soroban/rpc`).
@@ -139,10 +139,10 @@ function findCreatedAccountSequenceInTransactionMeta(
*
* @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods | API reference docs}
*/
-export class Server {
+export class RpcServer {
public readonly serverURL: URI;
- constructor(serverURL: string, opts: Server.Options = {}) {
+ constructor(serverURL: string, opts: RpcServer.Options = {}) {
/**
* RPC Server URL (ex. `http://localhost:8000/soroban/rpc`).
* @member {URI}
@@ -413,7 +413,7 @@ export class Server {
* values for the given ledger keys
*
* @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgerEntries | getLedgerEntries docs}
- * @see Server._getLedgerEntries
+ * @see RpcServer._getLedgerEntries
* @example
* const contractId = "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM";
* const key = xdr.LedgerKey.contractData(new xdr.LedgerKeyContractData({
@@ -581,14 +581,14 @@ export class Server {
*/
// eslint-disable-next-line require-await
public async getEvents(
- request: Server.GetEventsRequest
+ request: RpcServer.GetEventsRequest
): Promise {
return this._getEvents(request).then(parseRawEvents);
}
// eslint-disable-next-line require-await
public async _getEvents(
- request: Server.GetEventsRequest
+ request: RpcServer.GetEventsRequest
): Promise {
return jsonrpc.postObject(this.serverURL.toString(), 'getEvents', {
filters: request.filters ?? [],
@@ -687,7 +687,7 @@ export class Server {
// eslint-disable-next-line require-await
public async simulateTransaction(
tx: Transaction | FeeBumpTransaction,
- addlResources?: Server.ResourceLeeway
+ addlResources?: RpcServer.ResourceLeeway
): Promise {
return this._simulateTransaction(tx, addlResources)
.then(parseRawSimulation);
@@ -696,7 +696,7 @@ export class Server {
// eslint-disable-next-line require-await
public async _simulateTransaction(
transaction: Transaction | FeeBumpTransaction,
- addlResources?: Server.ResourceLeeway
+ addlResources?: RpcServer.ResourceLeeway
): Promise {
return jsonrpc.postObject(
this.serverURL.toString(),
diff --git a/src/rpc/transaction.ts b/src/rpc/transaction.ts
index 8394312a1..6e7ec5250 100644
--- a/src/rpc/transaction.ts
+++ b/src/rpc/transaction.ts
@@ -28,8 +28,8 @@ function isSorobanTransaction(tx: Transaction): boolean {
/**
* Combines the given raw transaction alongside the simulation results.
* If the given transaction already has authorization entries in a host
- * function invocation (see {@link Operation.invokeHostFunction}), **the
- * simulation entries are ignored**.
+ * function invocation (see {@link Operation.invokeHostFunction}), **the
+ * simulation entries are ignored**.
*
* If the given transaction already has authorization entries in a host function
* invocation (see {@link Operation.invokeHostFunction}), **the simulation
diff --git a/src/stellartoml/index.ts b/src/stellartoml/index.ts
index aa74fb3fd..b259aaecd 100644
--- a/src/stellartoml/index.ts
+++ b/src/stellartoml/index.ts
@@ -20,16 +20,17 @@ const CancelToken = axios.CancelToken;
/**
* Resolver allows resolving `stellar.toml` files.
* @memberof module:StellarToml
+ * @hideconstructor
*/
export class Resolver {
/**
* Returns a parsed `stellar.toml` file for a given domain.
- * @see {@link https://developers.stellar.org/docs/issuing-assets/publishing-asset-info|Stellar.toml doc}
+ * @see {@link https://developers.stellar.org/docs/tokens/publishing-asset-info | Stellar.toml doc}
*
* @param {string} domain Domain to get stellar.toml file for
* @param {object} [opts] Options object
- * @param {boolean} [opts.allowHttp] - Allow connecting to http servers, default: `false`. This must be set to false in production deployments!
- * @param {number} [opts.timeout] - Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue.
+ * @param {boolean} [opts.allowHttp=false] - Allow connecting to http servers. This must be set to false in production deployments!
+ * @param {number} [opts.timeout=0] - Allow a timeout. Allows user to avoid nasty lag due to TOML resolve issue.
* @returns {Promise} A `Promise` that resolves to the parsed stellar.toml object
*
* @example
diff --git a/src/utils.ts b/src/utils.ts
index 7cecfb888..9a2a46b3d 100644
--- a/src/utils.ts
+++ b/src/utils.ts
@@ -1,15 +1,20 @@
import { Transaction } from "@stellar/stellar-base";
-/** @class Utils */
+/**
+ * Miscellaneous utilities.
+ *
+ * @hideconstructor
+ */
export class Utils {
/**
- * Verifies if the current date is within the transaction's timebonds
+ * Verifies if the current date is within the transaction's timebounds
+ *
+ * @param {Transaction} transaction The transaction whose timebounds will be validated.
+ * @param {number} [gracePeriod=0] An additional window of time that should be considered valid on either end of the transaction's time range.
+ *
+ * @returns {boolean} Returns true if the current time is within the transaction's [minTime, maxTime] range.
*
* @static
- * @function
- * @param {Transaction} transaction the transaction whose timebonds will be validated.
- * @param {number} [gracePeriod=0] an additional window of time that should be considered valid on either end of the transaction's time range.
- * @returns {boolean} returns true if the current time is within the transaction's [minTime, maxTime] range.
*/
static validateTimebounds(
transaction: Transaction,
From a18da01f6207bd3dee9321e5a8edf649f16bccc6 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Thu, 19 Sep 2024 16:20:50 -0500
Subject: [PATCH 56/60] add exceptions for unknown jsdoc tags from base repo
---
config/.jsdoc.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config/.jsdoc.json b/config/.jsdoc.json
index 3f2ba98e7..e25576920 100644
--- a/config/.jsdoc.json
+++ b/config/.jsdoc.json
@@ -1,6 +1,6 @@
{
"tags": {
- "allowUnknownTags": ["optional", "category", "warning"]
+ "allowUnknownTags": ["optional", "category", "warning", "note", "link"]
},
"plugins": [
"plugins/markdown",
From f5652ed97f805f20eef5855f458812d716b0023e Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 20 Sep 2024 11:09:38 -0500
Subject: [PATCH 57/60] some fine-tuning and tweaks
---
src/contract/spec.ts | 6 ++----
src/horizon/server.ts | 44 +++++++++++++++++++++----------------------
src/webauth/utils.ts | 29 +++++++++++++++++++---------
3 files changed, 43 insertions(+), 36 deletions(-)
diff --git a/src/contract/spec.ts b/src/contract/spec.ts
index f307ff31c..d3a17b1a7 100644
--- a/src/contract/spec.ts
+++ b/src/contract/spec.ts
@@ -440,8 +440,9 @@ function unionToJsonSchema(udt: xdr.ScSpecUdtUnionV0): any {
* Provides a ContractSpec class which can contains the XDR types defined by the contract.
* This allows the class to be used to convert between native and raw `xdr.ScVal`s.
*
+ * Constructs a new ContractSpec from an array of XDR spec entries.
+ *
* @memberof module:contract
- * @class
* @param {xdr.ScSpecEntry[] | string[]} entries the XDR spec entries
* @throws {Error} if entries is invalid
*
@@ -470,9 +471,6 @@ export class Spec {
*/
public entries: xdr.ScSpecEntry[] = [];
- /**
- * Constructs a new ContractSpec from an array of XDR spec entries.
- */
constructor(entries: xdr.ScSpecEntry[] | string[]) {
if (entries.length === 0) {
throw new Error("Contract spec must have at least one entry");
diff --git a/src/horizon/server.ts b/src/horizon/server.ts
index ff478bbf4..7515d15d6 100644
--- a/src/horizon/server.ts
+++ b/src/horizon/server.ts
@@ -49,7 +49,7 @@ import AxiosClient, {
* @default 60000
* @memberof module:Horizon.Server
*/
-export const SUBMIT_TRANSACTION_TIMEOUT = 60 * 1000;
+export const SUBMIT_TRANSACTION_TIMEOUT: number = 60 * 1000;
const STROOPS_IN_LUMEN = 10000000;
@@ -64,18 +64,18 @@ function getAmountInLumens(amt: BigNumber) {
/**
* Server handles the network connection to a [Horizon](https://developers.stellar.org/docs/data/horizon)
* instance and exposes an interface for requests to that instance.
- *
+ * @class
* @alias module:Horizon.Server
* @memberof module:Horizon
*
* @param {string} serverURL Horizon Server URL (ex. `https://horizon-testnet.stellar.org`).
- * @param {Options} [opts] Options object
+ * @param {module:Horizon.Server.Options} [opts] Options object
*/
export class HorizonServer {
/**
- * serverURL Horizon Server URL (ex. `https://horizon-testnet.stellar.org`).
+ * Horizon Server URL (ex. `https://horizon-testnet.stellar.org`)
*
- * TODO: Solve `URI(this.serverURL as any)`.
+ * @todo Solve `URI(this.serverURL as any)`.
*/
public readonly serverURL: URI;
@@ -128,22 +128,20 @@ export class HorizonServer {
* not when you build or submit the transaction! So give yourself enough time to get
* the transaction built and signed before submitting.
*
- * Example:
- *
- * ```javascript
+ * @example
* const transaction = new StellarSdk.TransactionBuilder(accountId, {
- * fee: await StellarSdk.Server.fetchBaseFee(),
- * timebounds: await StellarSdk.Server.fetchTimebounds(100)
+ * fee: await StellarSdk.Server.fetchBaseFee(),
+ * timebounds: await StellarSdk.Server.fetchTimebounds(100)
* })
- * .addOperation(operation)
- * // normally we would need to call setTimeout here, but setting timebounds
- * // earlier does the trick!
- * .build();
- * ```
+ * .addOperation(operation)
+ * // normally we would need to call setTimeout here, but setting timebounds
+ * // earlier does the trick!
+ * .build();
+ *
* @param {number} seconds Number of seconds past the current time to wait.
* @param {boolean} [_isRetry] True if this is a retry. Only set this internally!
* This is to avoid a scenario where Horizon is horking up the wrong date.
- * @returns {Promise} Promise that resolves a `timebounds` object
+ * @returns {Promise} Promise that resolves a `timebounds` object
* (with the shape `{ minTime: 0, maxTime: N }`) that you can set the `timebounds` option to.
*/
public async fetchTimebounds(
@@ -594,15 +592,15 @@ export class HorizonServer {
/**
* People on the Stellar network can make offers to buy or sell assets. This endpoint represents all the offers on the DEX.
*
- * You can query all offers for account using the function `.accountId`:
+ * You can query all offers for account using the function `.accountId`.
*
- * ```
+ * @example
* server.offers()
- * .forAccount(accountId).call()
- * .then(function(offers) {
- * console.log(offers);
- * });
- * ```
+ * .forAccount(accountId).call()
+ * .then(function(offers) {
+ * console.log(offers);
+ * });
+ *
* @returns {OfferCallBuilder} New {@link OfferCallBuilder} object
*/
public offers(): OfferCallBuilder {
diff --git a/src/webauth/utils.ts b/src/webauth/utils.ts
index 689948db1..01c289471 100644
--- a/src/webauth/utils.ts
+++ b/src/webauth/utils.ts
@@ -1,3 +1,9 @@
+/**
+ * Stellar Web Authentication
+ * @module WebAuth
+ * @see {@link https://stellar.org/protocol-10 | SEP-10 Specification}
+ */
+
import randomBytes from "randombytes";
import {
Account,
@@ -17,8 +23,6 @@ import { Utils } from "../utils";
import { InvalidChallengeError } from "./errors";
import { ServerApi } from "../horizon/server_api";
-/** @module WebAuth */
-
/**
* Returns a valid {@link https://stellar.org/protocol/sep-10 | SEP-10}
* challenge transaction which you can use for Stellar Web Authentication.
@@ -137,12 +141,19 @@ export function buildChallengeTx(
}
/**
- * @typedef {object} ChallengeTxParts A parsed and validated challenge transaction, and some of its constituent details.
- * @property {Transaction} tx The challenge transaction.
- * @property {string} clientAccountID The Stellar public key (master key) used to sign the Manage Data operation.
- * @property {string} matchedHomeDomain The matched home domain.
- * @property {string | null} [memo=null] The memo attached to the transaction, which will be null if not present
+ * A parsed and validated challenge transaction, and some of its constituent details.
+ * @memberof module:WebAuth
*/
+export type ChallengeTxDetails = {
+ /** The challenge transaction. */
+ tx: Transaction;
+ /** The Stellar public key (master key) used to sign the Manage Data operation. */
+ clientAccountId: string;
+ /** The matched home domain. */
+ matchedHomeDomain: string;
+ /** The memo attached to the transaction, which will be null if not present */
+ memo?: string;
+}
/**
* Reads a SEP-10 challenge transaction and returns the decoded transaction and
@@ -167,7 +178,7 @@ export function buildChallengeTx(
* @param {string} webAuthDomain The home domain that is expected to be included
* as the value of the Manage Data operation with the 'web_auth_domain' key.
* If no such operation is included, this parameter is not used.
- * @returns {module:WebAuth~ChallengeTxParts} The actual transaction and the
+ * @returns {module:WebAuth.ChallengeTxDetails} The actual transaction and the
* Stellar public key (master key) used to sign the Manage Data operation,
* the matched home domain, and the memo attached to the transaction, which
* will be null if not present.
@@ -579,7 +590,7 @@ export function verifyChallengeTxSigners(
serverKP = Keypair.fromPublicKey(serverAccountID); // can throw 'Invalid Stellar public key'
} catch (err: any) {
throw new Error(
- `Couldn't infer keypair from the provided 'serverAccountID': ${
+ `Couldn't infer keypair from the provided 'serverAccountID': ${
err.message}`,
);
}
From 09802052271e0b513b7c70855517a6bce3b1cdf0 Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 20 Sep 2024 12:48:13 -0500
Subject: [PATCH 58/60] fold rust result interfaces into the contract module
---
src/contract/rust_result.ts | 32 ++++++++++++++++++++------------
1 file changed, 20 insertions(+), 12 deletions(-)
diff --git a/src/contract/rust_result.ts b/src/contract/rust_result.ts
index 37deca84c..1a9e736b8 100644
--- a/src/contract/rust_result.ts
+++ b/src/contract/rust_result.ts
@@ -6,10 +6,11 @@
* methods that return Results, to maintain their distinction from methods
* that simply either return a value or throw.
*
- * **Why is this needed?**
+ * #### Why is this needed?
*
- * This is used by `ContractSpec` and `AssembledTransaction` when parsing
- * values return by contracts.
+ * This is used by {@link module:contract.Spec | `ContractSpec`} and
+ * {@link module:contract.AssembledTransaction | `AssembledTransaction`} when
+ * parsing values return by contracts.
*
* Contract methods can be implemented to return simple values, in which case
* they can also throw errors. This matches JavaScript's most idiomatic
@@ -30,6 +31,8 @@
* In the future, if this feels too un-idiomatic for JavaScript, we can always
* remove this and flatten all JS calls to `try...catch`. Easier to remove this
* logic later than it would be to add it.
+ *
+ * @memberof module:contract
*/
export interface Result {
unwrap(): T;
@@ -40,18 +43,22 @@ export interface Result {
/**
* Error interface containing the error message. Matches Rust's implementation.
- * Part of implementing {@link Result}, a minimal implementation of Rust's
- * `Result` type. Used for contract methods that return Results, to maintain
- * their distinction from methods that simply either return a value or throw.
+ * Part of implementing {@link module:contract.Result | Result}, a minimal
+ * implementation of Rust's `Result` type. Used for contract methods that return
+ * Results, to maintain their distinction from methods that simply either return
+ * a value or throw.
+ *
+ * @memberof module:contract
*/
export interface ErrorMessage {
message: string;
}
/**
- * Part of implementing {@link Result}, a minimal implementation of Rust's
- * `Result` type. Used for contract methods that return Results, to maintain
- * their distinction from methods that simply either return a value or throw.
+ * Part of implementing {@link module:contract.Result | Result}, a minimal
+ * implementation of Rust's `Result` type. Used for contract methods that return
+ * Results, to maintain their distinction from methods that simply either return
+ * a value or throw.
* @private
*/
export class Ok implements Result {
@@ -75,9 +82,10 @@ export class Ok implements Result {
}
/**
- * Part of implementing {@link Result}, a minimal implementation of Rust's
- * `Result` type. Used for contract methods that return Results, to maintain
- * their distinction from methods that simply either return a value or throw.
+ * Part of implementing {@link module:contract.Result | Result}, a minimal
+ * implementation of Rust's `Result` type. Used for contract methods that return
+ * Results, to maintain their distinction from methods that simply either return
+ * a value or throw.
* @private
*/
export class Err implements Result {
From 841f7c9f38d0c87b35526eae5ff8a7c57b6c91cb Mon Sep 17 00:00:00 2001
From: Elliot Voris
Date: Fri, 20 Sep 2024 17:49:47 -0500
Subject: [PATCH 59/60] use prettier in src directory
---
src/config.ts | 4 +-
src/contract/assembled_transaction.ts | 173 ++++-----
src/contract/client.ts | 25 +-
src/contract/index.ts | 2 +-
src/contract/sent_transaction.ts | 35 +-
src/contract/spec.ts | 18 +-
src/contract/types.ts | 11 +-
src/contract/utils.ts | 14 +-
src/errors/network.ts | 1 -
src/federation/api.ts | 52 +--
src/federation/index.ts | 7 +-
src/federation/server.ts | 8 +-
src/horizon/account_response.ts | 20 +-
src/horizon/call_builder.ts | 34 +-
src/horizon/horizon_api.ts | 23 +-
src/horizon/horizon_axios_client.ts | 28 +-
src/horizon/index.ts | 2 +-
src/horizon/path_call_builder.ts | 6 +-
src/horizon/server.ts | 77 ++--
src/horizon/server_api.ts | 74 ++--
.../strict_receive_path_call_builder.ts | 6 +-
src/horizon/strict_send_path_call_builder.ts | 2 +-
src/horizon/trade_aggregation_call_builder.ts | 7 +-
src/horizon/types/effects.ts | 6 +-
src/index.ts | 24 +-
src/rpc/api.ts | 65 ++--
src/rpc/axios.ts | 10 +-
src/rpc/browser.ts | 6 +-
src/rpc/parsers.ts | 124 +++----
src/rpc/server.ts | 328 ++++++++++--------
src/rpc/transaction.ts | 38 +-
src/webauth/index.ts | 4 +-
src/webauth/utils.ts | 21 +-
33 files changed, 633 insertions(+), 622 deletions(-)
diff --git a/src/config.ts b/src/config.ts
index 8184da934..b0b06c47f 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -19,7 +19,7 @@ const defaultConfig: Configuration = {
timeout: 0,
};
-let config = { ...defaultConfig};
+let config = { ...defaultConfig };
/**
* Global config class.
@@ -80,7 +80,7 @@ class Config {
* @static
*/
public static setDefault(): void {
- config = { ...defaultConfig};
+ config = { ...defaultConfig };
}
}
diff --git a/src/contract/assembled_transaction.ts b/src/contract/assembled_transaction.ts
index ffaa0f060..100527dbf 100644
--- a/src/contract/assembled_transaction.ts
+++ b/src/contract/assembled_transaction.ts
@@ -23,11 +23,7 @@ import { Api } from "../rpc/api";
import { assembleTransaction } from "../rpc/transaction";
import type { Client } from "./client";
import { Err } from "./rust_result";
-import {
- contractErrorPattern,
- implementsToString,
- getAccount
-} from "./utils";
+import { contractErrorPattern, implementsToString, getAccount } from "./utils";
import { DEFAULT_TIMEOUT } from "./types";
import { SentTransaction } from "./sent_transaction";
import { Spec } from "./spec";
@@ -315,14 +311,14 @@ export class AssembledTransaction {
* logic.
*/
static Errors = {
- ExpiredState: class ExpiredStateError extends Error { },
- RestorationFailure: class RestoreFailureError extends Error { },
- NeedsMoreSignatures: class NeedsMoreSignaturesError extends Error { },
- NoSignatureNeeded: class NoSignatureNeededError extends Error { },
- NoUnsignedNonInvokerAuthEntries: class NoUnsignedNonInvokerAuthEntriesError extends Error { },
- NoSigner: class NoSignerError extends Error { },
- NotYetSimulated: class NotYetSimulatedError extends Error { },
- FakeAccount: class FakeAccountError extends Error { },
+ ExpiredState: class ExpiredStateError extends Error {},
+ RestorationFailure: class RestoreFailureError extends Error {},
+ NeedsMoreSignatures: class NeedsMoreSignaturesError extends Error {},
+ NoSignatureNeeded: class NoSignatureNeededError extends Error {},
+ NoUnsignedNonInvokerAuthEntries: class NoUnsignedNonInvokerAuthEntriesError extends Error {},
+ NoSigner: class NoSignerError extends Error {},
+ NotYetSimulated: class NotYetSimulatedError extends Error {},
+ FakeAccount: class FakeAccountError extends Error {},
};
/**
@@ -378,39 +374,49 @@ export class AssembledTransaction {
* Serialize the AssembledTransaction to a base64-encoded XDR string.
*/
toXDR(): string {
- if(!this.built) throw new Error(
+ if (!this.built)
+ throw new Error(
"Transaction has not yet been simulated; " +
- "call `AssembledTransaction.simulate` first.",
+ "call `AssembledTransaction.simulate` first.",
);
- return this.built?.toEnvelope().toXDR('base64');
+ return this.built?.toEnvelope().toXDR("base64");
}
/**
* Deserialize the AssembledTransaction from a base64-encoded XDR string.
*/
static fromXDR(
- options: Omit, "args" | "method" | "parseResultXdr">,
+ options: Omit<
+ AssembledTransactionOptions,
+ "args" | "method" | "parseResultXdr"
+ >,
encodedXDR: string,
- spec: Spec
+ spec: Spec,
): AssembledTransaction {
const envelope = xdr.TransactionEnvelope.fromXDR(encodedXDR, "base64");
- const built = TransactionBuilder.fromXDR(envelope, options.networkPassphrase) as Tx;
+ const built = TransactionBuilder.fromXDR(
+ envelope,
+ options.networkPassphrase,
+ ) as Tx;
const operation = built.operations[0] as Operation.InvokeHostFunction;
- if (!operation?.func?.value || typeof operation.func.value !== 'function') {
- throw new Error("Could not extract the method from the transaction envelope.");
+ if (!operation?.func?.value || typeof operation.func.value !== "function") {
+ throw new Error(
+ "Could not extract the method from the transaction envelope.",
+ );
}
const invokeContractArgs = operation.func.value() as xdr.InvokeContractArgs;
if (!invokeContractArgs?.functionName) {
- throw new Error("Could not extract the method name from the transaction envelope.");
+ throw new Error(
+ "Could not extract the method name from the transaction envelope.",
+ );
}
- const method = invokeContractArgs.functionName().toString('utf-8');
- const txn = new AssembledTransaction(
- { ...options,
- method,
- parseResultXdr: (result: xdr.ScVal) =>
- spec.funcResToNative(method, result),
- }
- );
+ const method = invokeContractArgs.functionName().toString("utf-8");
+ const txn = new AssembledTransaction({
+ ...options,
+ method,
+ parseResultXdr: (result: xdr.ScVal) =>
+ spec.funcResToNative(method, result),
+ });
txn.built = built;
return txn;
}
@@ -447,10 +453,7 @@ export class AssembledTransaction {
const tx = new AssembledTransaction(options);
const contract = new Contract(options.contractId);
- const account = await getAccount(
- options,
- tx.server
- );
+ const account = await getAccount(options, tx.server);
tx.raw = new TransactionBuilder(account, {
fee: options.fee ?? BASE_FEE,
@@ -468,26 +471,30 @@ export class AssembledTransaction {
options: AssembledTransactionOptions,
sorobanData: SorobanDataBuilder | xdr.SorobanTransactionData,
account: Account,
- fee: string
+ fee: string,
): Promise> {
const tx = new AssembledTransaction(options);
tx.raw = new TransactionBuilder(account, {
fee,
networkPassphrase: options.networkPassphrase,
})
- .setSorobanData(sorobanData instanceof SorobanDataBuilder ? sorobanData.build() : sorobanData)
+ .setSorobanData(
+ sorobanData instanceof SorobanDataBuilder
+ ? sorobanData.build()
+ : sorobanData,
+ )
.addOperation(Operation.restoreFootprint({}))
.setTimeout(options.timeoutInSeconds ?? DEFAULT_TIMEOUT);
await tx.simulate({ restore: false });
return tx;
}
- simulate = async ({ restore }: {restore?: boolean} = {}): Promise => {
- if (!this.built){
- if(!this.raw) {
+ simulate = async ({ restore }: { restore?: boolean } = {}): Promise => {
+ if (!this.built) {
+ if (!this.raw) {
throw new Error(
"Transaction has not yet been assembled; " +
- "call `AssembledTransaction.build` first."
+ "call `AssembledTransaction.build` first.",
);
}
this.built = this.raw.build();
@@ -503,7 +510,7 @@ export class AssembledTransaction {
const account = await getAccount(this.options, this.server);
const result = await this.restoreFootprint(
this.simulation.restorePreamble,
- account
+ account,
);
if (result.status === Api.GetTransactionStatus.SUCCESS) {
// need to rebuild the transaction with bumped account sequence number
@@ -513,27 +520,19 @@ export class AssembledTransaction {
networkPassphrase: this.options.networkPassphrase,
})
.addOperation(
- contract.call(
- this.options.method,
- ...(this.options.args ?? [])
- )
+ contract.call(this.options.method, ...(this.options.args ?? [])),
)
- .setTimeout(
- this.options.timeoutInSeconds ?? DEFAULT_TIMEOUT
- );
+ .setTimeout(this.options.timeoutInSeconds ?? DEFAULT_TIMEOUT);
await this.simulate();
return this;
}
throw new AssembledTransaction.Errors.RestorationFailure(
- `Automatic restore failed! You set 'restore: true' but the attempted restore did not work. Result:\n${JSON.stringify(result)}`
+ `Automatic restore failed! You set 'restore: true' but the attempted restore did not work. Result:\n${JSON.stringify(result)}`,
);
}
if (Api.isSimulationSuccess(this.simulation)) {
- this.built = assembleTransaction(
- this.built,
- this.simulation
- ).build();
+ this.built = assembleTransaction(this.built, this.simulation).build();
}
return this;
@@ -562,13 +561,16 @@ export class AssembledTransaction {
if (Api.isSimulationRestore(simulation)) {
throw new AssembledTransaction.Errors.ExpiredState(
`You need to restore some contract state before you can invoke this method.\n` +
- 'You can set `restore` to true in the method options in order to ' +
- 'automatically restore the contract state when needed.'
+ "You can set `restore` to true in the method options in order to " +
+ "automatically restore the contract state when needed.",
);
}
// add to object for serialization & deserialization
- this.simulationResult = simulation.result ?? { auth: [], retval: xdr.ScVal.scvVoid() };
+ this.simulationResult = simulation.result ?? {
+ auth: [],
+ retval: xdr.ScVal.scvVoid(),
+ };
this.simulationTransactionData = simulation.transactionData.build();
return {
@@ -625,26 +627,25 @@ export class AssembledTransaction {
if (!force && this.isReadCall) {
throw new AssembledTransaction.Errors.NoSignatureNeeded(
"This is a read call. It requires no signature or sending. " +
- "Use `force: true` to sign and send anyway."
+ "Use `force: true` to sign and send anyway.",
);
}
if (!signTransaction) {
throw new AssembledTransaction.Errors.NoSigner(
"You must provide a signTransaction function, either when calling " +
- "`signAndSend` or when initializing your Client"
+ "`signAndSend` or when initializing your Client",
);
}
if (this.needsNonInvokerSigningBy().length) {
throw new AssembledTransaction.Errors.NeedsMoreSignatures(
"Transaction requires more signatures. " +
- "See `needsNonInvokerSigningBy` for details.",
+ "See `needsNonInvokerSigningBy` for details.",
);
}
- const timeoutInSeconds =
- this.options.timeoutInSeconds ?? DEFAULT_TIMEOUT;
+ const timeoutInSeconds = this.options.timeoutInSeconds ?? DEFAULT_TIMEOUT;
this.built = TransactionBuilder.cloneFrom(this.built!, {
fee: this.built!.fee,
timebounds: undefined,
@@ -653,12 +654,9 @@ export class AssembledTransaction {
.setTimeout(timeoutInSeconds)
.build();
- const signature = await signTransaction(
- this.built.toXDR(),
- {
- networkPassphrase: this.options.networkPassphrase,
- },
- );
+ const signature = await signTransaction(this.built.toXDR(), {
+ networkPassphrase: this.options.networkPassphrase,
+ });
this.signed = TransactionBuilder.fromXDR(
signature,
@@ -670,9 +668,11 @@ export class AssembledTransaction {
* Sends the transaction to the network to return a `SentTransaction` that
* keeps track of all the attempts to fetch the transaction.
*/
- async send(){
- if(!this.signed){
- throw new Error("The transaction has not yet been signed. Run `sign` first, or use `signAndSend` instead.");
+ async send() {
+ if (!this.signed) {
+ throw new Error(
+ "The transaction has not yet been signed. Run `sign` first, or use `signAndSend` instead.",
+ );
}
const sent = await SentTransaction.init(undefined, this);
return sent;
@@ -697,7 +697,7 @@ export class AssembledTransaction {
*/
signTransaction?: ClientOptions["signTransaction"];
} = {}): Promise> => {
- if(!this.signed){
+ if (!this.signed) {
await this.sign({ force, signTransaction });
}
return this.send();
@@ -754,10 +754,10 @@ export class AssembledTransaction {
.filter(
(entry) =>
entry.credentials().switch() ===
- xdr.SorobanCredentialsType.sorobanCredentialsAddress() &&
+ xdr.SorobanCredentialsType.sorobanCredentialsAddress() &&
(includeAlreadySigned ||
entry.credentials().address().signature().switch().name ===
- "scvVoid"),
+ "scvVoid"),
)
.map((entry) =>
StrKey.encodeEd25519PublicKey(
@@ -825,7 +825,7 @@ export class AssembledTransaction {
if (!signAuthEntry) {
throw new AssembledTransaction.Errors.NoSigner(
"You must provide `signAuthEntry` when calling `signAuthEntries`, " +
- "or when constructing the `Client` or `AssembledTransaction`",
+ "or when constructing the `Client` or `AssembledTransaction`",
);
}
@@ -909,27 +909,28 @@ export class AssembledTransaction {
transactionData: SorobanDataBuilder;
},
/** The account that is executing the footprint restore operation. If omitted, will use the account from the AssembledTransaction. */
- account?: Account
+ account?: Account,
): Promise {
if (!this.options.signTransaction) {
- throw new Error("For automatic restore to work you must provide a signTransaction function when initializing your Client");
+ throw new Error(
+ "For automatic restore to work you must provide a signTransaction function when initializing your Client",
+ );
}
- account = account ?? await getAccount(this.options, this.server);
+ account = account ?? (await getAccount(this.options, this.server));
// first try restoring the contract
- const restoreTx = await AssembledTransaction.buildFootprintRestoreTransaction(
- { ...this.options },
- restorePreamble.transactionData,
- account,
- restorePreamble.minResourceFee
- );
+ const restoreTx =
+ await AssembledTransaction.buildFootprintRestoreTransaction(
+ { ...this.options },
+ restorePreamble.transactionData,
+ account,
+ restorePreamble.minResourceFee,
+ );
const sentTransaction = await restoreTx.signAndSend();
if (!sentTransaction.getTransactionResponse) {
throw new AssembledTransaction.Errors.RestorationFailure(
- `The attempt at automatic restore failed. \n${JSON.stringify(sentTransaction)}`
+ `The attempt at automatic restore failed. \n${JSON.stringify(sentTransaction)}`,
);
}
return sentTransaction.getTransactionResponse;
}
-
-
}
diff --git a/src/contract/client.ts b/src/contract/client.ts
index 2db5b4040..7a874ef74 100644
--- a/src/contract/client.ts
+++ b/src/contract/client.ts
@@ -1,9 +1,9 @@
import { xdr } from "@stellar/stellar-base";
import { Spec } from "./spec";
-import { Server } from '../rpc';
+import { Server } from "../rpc";
import { AssembledTransaction } from "./assembled_transaction";
import type { ClientOptions, MethodOptions } from "./types";
-import { processSpecEntryStream } from './utils';
+import { processSpecEntryStream } from "./utils";
/**
* Generate a class from the contract spec that where each contract method
@@ -64,12 +64,13 @@ export class Client {
* @returns {Promise} A Promise that resolves to a Client instance.
* @throws {TypeError} If the provided options object does not contain an rpcUrl.
*/
- static async fromWasmHash(wasmHash: Buffer | string,
+ static async fromWasmHash(
+ wasmHash: Buffer | string,
options: ClientOptions,
- format: "hex" | "base64" = "hex"
+ format: "hex" | "base64" = "hex",
): Promise {
if (!options || !options.rpcUrl) {
- throw new TypeError('options must contain rpcUrl');
+ throw new TypeError("options must contain rpcUrl");
}
const { rpcUrl, allowHttp } = options;
const serverOpts: Server.Options = { allowHttp };
@@ -88,9 +89,12 @@ export class Client {
*/
static async fromWasm(wasm: Buffer, options: ClientOptions): Promise {
const wasmModule = await WebAssembly.compile(wasm);
- const xdrSections = WebAssembly.Module.customSections(wasmModule, "contractspecv0");
+ const xdrSections = WebAssembly.Module.customSections(
+ wasmModule,
+ "contractspecv0",
+ );
if (xdrSections.length === 0) {
- throw new Error('Could not obtain contract spec from wasm');
+ throw new Error("Could not obtain contract spec from wasm");
}
const bufferSection = Buffer.from(xdrSections[0]);
const specEntryArray = processSpecEntryStream(bufferSection);
@@ -107,7 +111,7 @@ export class Client {
*/
static async from(options: ClientOptions): Promise {
if (!options || !options.rpcUrl || !options.contractId) {
- throw new TypeError('options must contain rpcUrl and contractId');
+ throw new TypeError("options must contain rpcUrl and contractId");
}
const { rpcUrl, contractId, allowHttp } = options;
const serverOpts: Server.Options = { allowHttp };
@@ -129,7 +133,6 @@ export class Client {
);
};
- txFromXDR = (xdrBase64: string): AssembledTransaction => AssembledTransaction.fromXDR(this.options, xdrBase64, this.spec);
-
+ txFromXDR = (xdrBase64: string): AssembledTransaction