diff --git a/README.md b/README.md index 3366cb23a..e36973a38 100644 --- a/README.md +++ b/README.md @@ -187,11 +187,12 @@ There is also a [sample](https://github.com/fnando/rn-stellar-sdk-sample) that y ## Usage -For information on how to use js-stellar-sdk, take a look at the -[Developers site](https://www.stellar.org/developers/js-stellar-sdk/reference/). +For information on how to use js-stellar-sdk, take a look at [the +documentation](https://stellar.github.io/js-stellar-sdk/), or [the +examples](https://github.com/stellar/js-stellar-sdk/tree/master/docs/reference). -There is also API Documentation -[here](https://www.stellar.org/developers/horizon/reference/index.html). +There is also Horizon REST API Documentation +[here](https://developers.stellar.org/api/introduction/). ## Testing @@ -226,7 +227,7 @@ cd jsdoc && serve . ## Documentation Documentation for this repo lives in -[Developers site](https://www.stellar.org/developers/js-stellar-sdk/reference/). +[Developers site](https://github.com/stellar/js-stellar-sdk/blob/master/docs/reference/readme.md). ## Contributing diff --git a/docs/reference/examples.md b/docs/reference/examples.md index 371e3d8ac..697ed4a89 100644 --- a/docs/reference/examples.md +++ b/docs/reference/examples.md @@ -8,7 +8,7 @@ title: Basic Examples ## Creating a payment transaction -The `js-stellar-sdk` exposes the [`TransactionBuilder`](https://stellar.github.io/js-stellar-base/TransactionBuilder.html) class from `js-stellar-base`. There are more examples of [building transactions here](https://www.stellar.org/developers/js-stellar-base/reference/base-examples.html). All those examples can be signed and submitted to Stellar in a similar manner as is done below. +The `js-stellar-sdk` exposes the [`TransactionBuilder`](https://stellar.github.io/js-stellar-base/TransactionBuilder.html) class from `js-stellar-base`. There are more examples of [building transactions here](https://github.com/stellar/js-stellar-base/blob/master/docs/reference/base-examples.md). All those examples can be signed and submitted to Stellar in a similar manner as is done below. In this example, the destination account must exist. The example is written using modern Javascript, but `await` calls can also be rendered with promises. @@ -74,7 +74,7 @@ const server = new StellarSdk.Server('https://horizon-testnet.stellar.org'); })) // Make this transaction valid for the next 30 seconds only .setTimeout(30) - // Uncomment to add a memo (https://www.stellar.org/developers/guides/concepts/transactions.html) + // Uncomment to add a memo (https://developers.stellar.org/docs/glossary/transactions/) // .addMemo(StellarSdk.Memo.text('Hello world!')) .build(); @@ -148,4 +148,4 @@ const es = server.payments() }) ``` -For more on streaming events, please check out [the Horizon documentation](https://www.stellar.org/developers/horizon/reference/streaming.html) and this [guide to server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events). +For more on streaming events, please check out [the Horizon documentation](https://developers.stellar.org/api/introduction/streaming/) and this [guide to server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events). diff --git a/docs/reference/readme.md b/docs/reference/readme.md index b072be8de..a8ec7fc5e 100644 --- a/docs/reference/readme.md +++ b/docs/reference/readme.md @@ -12,7 +12,7 @@ js-stellar-sdk gives you access to all the endpoints exposed by Horizon. ## Building requests js-stellar-sdk uses the [Builder pattern](https://en.wikipedia.org/wiki/Builder_pattern) to create the requests to send to Horizon. Starting with a [server](https://stellar.github.io/js-stellar-sdk/Server.html) object, you can chain methods together to generate a query. -(See the [Horizon reference](https://www.stellar.org/developers/reference/) documentation for what methods are possible.) +(See the [Horizon reference](https://developers.stellar.org/api/) documentation for what methods are possible.) ```js var StellarSdk = require('stellar-sdk'); var server = new StellarSdk.Server('https://horizon-testnet.stellar.org'); @@ -33,7 +33,7 @@ Once the request is built, it can be invoked with `.call()` or with `.stream()`. ## Streaming requests Many requests can be invoked with `stream()`. Instead of returning a promise like `call()` does, `.stream()` will return an `EventSource`. Horizon will start sending responses from either the beginning of time or from the point specified with `.cursor()`. -(See the [Horizon reference](https://www.stellar.org/developers/horizon/reference/streaming.html) documentation to learn which endpoints support streaming.) +(See the [Horizon reference](https://developers.stellar.org/api/introduction/streaming/) documentation to learn which endpoints support streaming.) For example, to log instances of transactions from a particular account: @@ -57,7 +57,7 @@ var es = server.transactions() ## Handling responses ### XDR -The transaction endpoints will return some fields in raw [XDR](https://www.stellar.org/developers/guides/concepts/xdr.html) +The transaction endpoints will return some fields in raw [XDR](https://developers.stellar.org/api/introduction/xdr/) form. You can convert this XDR to JSON using the `.fromXDR()` method. An example of re-writing the txHandler from above to print the XDR fields as JSON: @@ -73,7 +73,7 @@ var txHandler = function (txResponse) { ### Following links -The [HAL format](https://www.stellar.org/developers/horizon/reference/responses.html) links returned with the Horizon response are converted into functions you can call on the returned object. +The [HAL format](https://developers.stellar.org/api/introduction/response-format/) links returned with the Horizon response are converted into functions you can call on the returned object. This allows you to simply use `.next()` to page through results. It also makes fetching additional info, as in the following example, easy: ```js @@ -93,7 +93,7 @@ server.payments() ## Building transactions -See the [Building Transactions](https://www.stellar.org/developers/js-stellar-base/reference/building-transactions.html) guide for information about assembling a transaction. +See the [Building Transactions](https://github.com/stellar/js-stellar-base/blob/master/docs/reference/building-transactions.md) guide for information about assembling a transaction. ## Submitting transactions Once you have built your transaction, you can submit it to the Stellar network with `Server.submitTransaction()`. diff --git a/src/account_call_builder.ts b/src/account_call_builder.ts index b471838de..ba840cf18 100644 --- a/src/account_call_builder.ts +++ b/src/account_call_builder.ts @@ -6,7 +6,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}. * - * @see [All Accounts](https://www.stellar.org/developers/horizon/reference/resources/account.html) + * @see [All Accounts](https://developers.stellar.org/api/resources/accounts/) * @class AccountCallBuilder * @extends CallBuilder * @constructor @@ -24,7 +24,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://www.stellar.org/developers/horizon/reference/endpoints/accounts-single.html) + * @see [Account Details](https://developers.stellar.org/api/resources/accounts/single/) * @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {CallBuilder} a new CallBuilder instance for the /accounts/:id endpoint */ @@ -36,7 +36,7 @@ export class AccountCallBuilder extends CallBuilder< /** * This endpoint filters accounts by signer account. - * @see [Accounts](https://www.stellar.org/developers/horizon/reference/endpoints/accounts.html) + * @see [Accounts](https://developers.stellar.org/api/resources/accounts/list/) * @param {string} value For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {AccountCallBuilder} current AccountCallBuilder instance */ @@ -47,7 +47,7 @@ export class AccountCallBuilder extends CallBuilder< /** * This endpoint filters all accounts who are trustees to an asset. - * @see [Accounts](https://www.stellar.org/developers/horizon/reference/endpoints/accounts.html) + * @see [Accounts](https://developers.stellar.org/api/resources/accounts/list/) * @see Asset * @param {Asset} value For example: `new Asset('USD','GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD')` * @returns {AccountCallBuilder} current AccountCallBuilder instance @@ -59,7 +59,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://www.stellar.org/developers/horizon/reference/endpoints/accounts.html) + * @see [Accounts](https://developers.stellar.org/api/resources/accounts/list/) * @param {string} value For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {AccountCallBuilder} current AccountCallBuilder instance */ diff --git a/src/account_response.ts b/src/account_response.ts index d3aaaec73..8cfb06ec4 100644 --- a/src/account_response.ts +++ b/src/account_response.ts @@ -12,7 +12,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://www.stellar.org/developers/horizon/reference/endpoints/accounts-single.html) + * @see [Account Details](https://developers.stellar.org/api/resources/accounts/object/) * @param {string} response Response from horizon account endpoint. * @returns {AccountResponse} AccountResponse instance */ diff --git a/src/call_builder.ts b/src/call_builder.ts index c658f5f1f..bad687681 100644 --- a/src/call_builder.ts +++ b/src/call_builder.ts @@ -89,7 +89,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 [Horizon Response Format](https://www.stellar.org/developers/horizon/reference/responses.html) + * @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) * @param {object} [options] EventSource options. * @param {function} [options.onmessage] Callback function to handle incoming messages. @@ -198,7 +198,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://www.stellar.org/developers/horizon/reference/paging.html) + * @see [Paging](https://developers.stellar.org/api/introduction/pagination/) * @param {string} cursor A cursor is a value that points to a specific location in a collection of resources. * @returns {object} current CallBuilder instance */ @@ -209,7 +209,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://www.stellar.org/developers/horizon/reference/paging.html) + * @see [Paging](https://developers.stellar.org/api/introduction/pagination/) * @param {number} number Number of records the server should return. * @returns {object} current CallBuilder instance */ diff --git a/src/effect_call_builder.ts b/src/effect_call_builder.ts index aa8cec9ea..d6db8cc28 100644 --- a/src/effect_call_builder.ts +++ b/src/effect_call_builder.ts @@ -7,7 +7,7 @@ import { ServerApi } from "./server_api"; * * @class EffectCallBuilder * @extends CallBuilder - * @see [All Effects](https://www.stellar.org/developers/horizon/reference/endpoints/effects-all.html) + * @see [All Effects](https://developers.stellar.org/api/resources/effects/) * @constructor * @param {string} serverUrl Horizon server URL. */ @@ -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://www.stellar.org/developers/horizon/reference/endpoints/effects-for-account.html) + * @see [Effects for Account](https://developers.stellar.org/api/resources/accounts/effects/) * @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://www.stellar.org/developers/horizon/reference/endpoints/effects-for-ledger.html) + * @see [Effects for Ledger](https://developers.stellar.org/api/resources/ledgers/effects/) * @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://www.stellar.org/developers/horizon/reference/endpoints/effects-for-transaction.html) + * @see [Effects for Transaction](https://developers.stellar.org/api/resources/transactions/effects/) * @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://www.stellar.org/developers/horizon/reference/endpoints/effects-for-operation.html) + * @see [Effects for Operation](https://developers.stellar.org/api/resources/operations/effects/) * @param {number} operationId Operation ID * @returns {EffectCallBuilder} this EffectCallBuilder instance */ diff --git a/src/federation_server.ts b/src/federation_server.ts index df76e69eb..70eda449e 100644 --- a/src/federation_server.ts +++ b/src/federation_server.ts @@ -11,7 +11,7 @@ export const FEDERATION_RESPONSE_MAX_SIZE = 100 * 1024; /** * FederationServer handles a network connection to a - * [federation server](https://www.stellar.org/developers/guides/concepts/federation.html) + * [federation server](https://developers.stellar.org/docs/glossary/federation/) * instance and exposes an interface for requests to that instance. * @constructor * @param {string} serverURL The federation server URL (ex. `https://acme.com/federation`). @@ -66,8 +66,8 @@ export class FederationServer { * }); * ``` * - * @see Federation doc - * @see Stellar.toml doc + * @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! @@ -104,7 +104,7 @@ export class FederationServer { /** * Creates a `FederationServer` instance based on information from - * [stellar.toml](https://www.stellar.org/developers/guides/concepts/stellar-toml.html) + * [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 @@ -118,7 +118,7 @@ export class FederationServer { * // 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 {object} [opts] Options object * @param {boolean} [opts.allowHttp] - Allow connecting to http servers, default: `false`. This must be set to false in production deployments! @@ -162,7 +162,7 @@ export class FederationServer { /** * 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} Promise that resolves to the federation record */ @@ -186,7 +186,7 @@ export class FederationServer { /** * 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 */ @@ -199,7 +199,7 @@ export class FederationServer { /** * Given a transactionId, get the federation record if the sender of the transaction was found - * @see Federation doc + * @see Federation doc * @param {string} transactionId Transaction ID (ex. `3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889`) * @returns {Promise} A promise that resolves to the federation record */ diff --git a/src/ledger_call_builder.ts b/src/ledger_call_builder.ts index 7effd4d72..5e74a85b5 100644 --- a/src/ledger_call_builder.ts +++ b/src/ledger_call_builder.ts @@ -5,7 +5,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}. * - * @see [All Ledgers](https://www.stellar.org/developers/horizon/reference/endpoints/ledgers-all.html) + * @see [All Ledgers](https://developers.stellar.org/api/resources/ledgers/list/) * @constructor * @class LedgerCallBuilder * @extends CallBuilder diff --git a/src/offer_call_builder.ts b/src/offer_call_builder.ts index 0a132a328..18bd57afc 100644 --- a/src/offer_call_builder.ts +++ b/src/offer_call_builder.ts @@ -6,7 +6,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}. * - * @see [Offers](https://www.stellar.org/developers/horizon/reference/endpoints/offers.html) + * @see [Offers](https://developers.stellar.org/api/resources/offers/) * @class OfferCallBuilder * @constructor * @extends CallBuilder @@ -23,7 +23,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://www.stellar.org/developers/horizon/reference/endpoints/offer-details.html) + * @see [Offer Details](https://developers.stellar.org/api/resources/offers/single/) * @param {string} offerId Offer ID * @returns {CallBuilder} CallBuilder OperationCallBuilder instance */ @@ -36,7 +36,7 @@ export class OfferCallBuilder extends CallBuilder< /** * Returns all offers where the given account is the seller. * - * @see [Offers](https://www.stellar.org/developers/horizon/reference/endpoints/offers.html) + * @see [Offers](https://developers.stellar.org/api/resources/accounts/offers/) * @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {OfferCallBuilder} current OfferCallBuilder instance */ @@ -46,7 +46,7 @@ export class OfferCallBuilder extends CallBuilder< /** * Returns all offers buying an asset. - * @see [Offers](https://www.stellar.org/developers/horizon/reference/endpoints/offers-for-account.html) + * @see [Offers](https://developers.stellar.org/api/resources/offers/list/) * @see Asset * @param {Asset} value For example: `new Asset('USD','GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD')` * @returns {OfferCallBuilder} current OfferCallBuilder instance @@ -64,7 +64,7 @@ export class OfferCallBuilder extends CallBuilder< /** * Returns all offers selling an asset. - * @see [Offers](https://www.stellar.org/developers/horizon/reference/endpoints/offers.html) + * @see [Offers](https://developers.stellar.org/api/resources/offers/list/) * @see Asset * @param {Asset} value For example: `new Asset('EUR','GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD')` * @returns {OfferCallBuilder} current OfferCallBuilder instance @@ -82,7 +82,7 @@ export class OfferCallBuilder extends CallBuilder< /** * This endpoint filters offers where the given account is sponsoring the offer entry. - * @see [Offers](https://www.stellar.org/developers/horizon/reference/endpoints/offers.html) + * @see [Offers](https://developers.stellar.org/api/resources/offers/list/) * @param {string} value For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {OfferCallBuilder} current OfferCallBuilder instance */ diff --git a/src/operation_call_builder.ts b/src/operation_call_builder.ts index 03b282e07..e7573e7ba 100644 --- a/src/operation_call_builder.ts +++ b/src/operation_call_builder.ts @@ -5,7 +5,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}. * - * @see [All Operations](https://www.stellar.org/developers/horizon/reference/endpoints/operations-all.html) + * @see [All Operations](https://developers.stellar.org/api/resources/operations/) * @class OperationCallBuilder * @constructor * @extends CallBuilder @@ -22,7 +22,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://www.stellar.org/developers/horizon/reference/endpoints/operations-single.html) + * @see [Operation Details](https://developers.stellar.org/api/resources/operations/single/) * @param {number} operationId Operation ID * @returns {CallBuilder} this OperationCallBuilder instance */ @@ -38,7 +38,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://www.stellar.org/developers/horizon/reference/endpoints/operations-for-account.html) + * @see [Operations for Account](https://developers.stellar.org/api/resources/accounts/operations/) * @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {OperationCallBuilder} this OperationCallBuilder instance */ @@ -48,7 +48,7 @@ export class OperationCallBuilder extends CallBuilder< /** * This endpoint represents all operations that reference a given claimable_balance. - * @see [Operations for Claimable Balance](https://www.stellar.org/developers/horizon/reference/endpoints/operations-for-claimable-balance.html) + * @see [Operations for Claimable Balance](https://developers.stellar.org/api/resources/claimablebalances/operations/) * @param {string} claimableBalanceId Claimable Balance ID * @returns {OperationCallBuilder} this OperationCallBuilder instance */ @@ -59,7 +59,7 @@ export class OperationCallBuilder extends CallBuilder< /** * This endpoint returns all operations that occurred in a given ledger. * - * @see [Operations for Ledger](https://www.stellar.org/developers/horizon/reference/endpoints/operations-for-ledger.html) + * @see [Operations for Ledger](https://developers.stellar.org/api/resources/ledgers/operations/) * @param {number|string} sequence Ledger sequence * @returns {OperationCallBuilder} this OperationCallBuilder instance */ @@ -69,7 +69,7 @@ export class OperationCallBuilder extends CallBuilder< /** * This endpoint represents all operations that are part of a given transaction. - * @see [Operations for Transaction](https://www.stellar.org/developers/horizon/reference/endpoints/operations-for-transaction.html) + * @see [Operations for Transaction](https://developers.stellar.org/api/resources/transactions/operations/) * @param {string} transactionId Transaction ID * @returns {OperationCallBuilder} this OperationCallBuilder instance */ diff --git a/src/orderbook_call_builder.ts b/src/orderbook_call_builder.ts index 36a618b53..6e958179d 100644 --- a/src/orderbook_call_builder.ts +++ b/src/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://www.stellar.org/developers/horizon/reference/endpoints/orderbook-details.html) + * @see [Orderbook Details](https://developers.stellar.org/api/aggregations/order-books/) * @param {string} serverUrl serverUrl Horizon server URL. * @param {Asset} selling Asset being sold * @param {Asset} buying Asset being bought diff --git a/src/path_call_builder.ts b/src/path_call_builder.ts index c9b946b26..775eb41cc 100644 --- a/src/path_call_builder.ts +++ b/src/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://www.stellar.org/developers/horizon/reference/endpoints/path-finding.html) + * @see [Find Payment Paths](https://developers.stellar.org/api/aggregations/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/payment_call_builder.ts b/src/payment_call_builder.ts index 6d898f025..f50748e7b 100644 --- a/src/payment_call_builder.ts +++ b/src/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://www.stellar.org/developers/horizon/reference/endpoints/payments-all.html) + * @see [All Payments](https://developers.stellar.org/api/resources/payments/) * @constructor * @extends CallBuilder * @param {string} serverUrl Horizon server URL. @@ -20,7 +20,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://www.stellar.org/developers/horizon/reference/endpoints/payments-for-account.html) + * @see [Payments for Account](https://developers.stellar.org/api/resources/accounts/payments/) * @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {PaymentCallBuilder} this PaymentCallBuilder instance */ @@ -30,7 +30,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://www.stellar.org/developers/horizon/reference/endpoints/payments-for-ledger.html) + * @see [Payments for Ledger](https://developers.stellar.org/api/resources/ledgers/payments/) * @param {number|string} sequence Ledger sequence * @returns {PaymentCallBuilder} this PaymentCallBuilder instance */ @@ -40,7 +40,7 @@ export class PaymentCallBuilder extends CallBuilder< /** * This endpoint represents all payment operations that are part of a given transaction. - * @see [Payments for Transaction](https://www.stellar.org/developers/horizon/reference/endpoints/payments-for-transaction.html) + * @see [Payments for Transaction](https://developers.stellar.org/api/resources/transactions/payments/) * @param {string} transactionId Transaction ID * @returns {PaymentCallBuilder} this PaymentCallBuilder instance */ diff --git a/src/server.ts b/src/server.ts index cafce4db1..3c32b4180 100644 --- a/src/server.ts +++ b/src/server.ts @@ -57,7 +57,7 @@ function _getAmountInLumens(amt: BigNumber) { } /** - * Server handles the network connection to a [Horizon](https://www.stellar.org/developers/horizon/reference/) + * 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 * @param {string} serverURL Horizon Server URL (ex. `https://horizon-testnet.stellar.org`). @@ -176,7 +176,7 @@ export class Server { /** * Fetch the fee stats endpoint. - * @see [Fee Stats](https://www.stellar.org/developers/horizon/reference/endpoints/fee-stats.html) + * @see [Fee Stats](https://developers.stellar.org/api/aggregations/fee-stats/) * @returns {Promise} Promise that resolves to the fee stats returned by Horizon. */ public async feeStats(): Promise { @@ -282,7 +282,7 @@ export class Server { * `amountBought` or `amountSold` have already been transferred. * * @see [Post - * Transaction](https://www.stellar.org/developers/horizon/reference/endpoints/transactions-create.html) + * Transaction](https://developers.stellar.org/api/resources/transactions/post/) * @param {Transaction|FeeBumpTransaction} transaction - The transaction to submit. * @param {object} [opts] Options object * @param {boolean} [opts.skipMemoRequiredCheck] - Allow skipping memo diff --git a/src/stellar_toml_resolver.ts b/src/stellar_toml_resolver.ts index f383c1590..ef7872a03 100644 --- a/src/stellar_toml_resolver.ts +++ b/src/stellar_toml_resolver.ts @@ -24,7 +24,7 @@ export class StellarTomlResolver { * // stellar.toml does not exist or is invalid * }); * ``` - * @see Stellar.toml doc + * @see 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! diff --git a/src/strict_receive_path_call_builder.ts b/src/strict_receive_path_call_builder.ts index 3a1531323..beeab39cf 100644 --- a/src/strict_receive_path_call_builder.ts +++ b/src/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://www.stellar.org/developers/horizon/reference/endpoints/path-finding.html) + * @see [Find Payment Paths](https://developers.stellar.org/api/aggregations/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/strict_send_path_call_builder.ts b/src/strict_send_path_call_builder.ts index 414596e20..b141f9552 100644 --- a/src/strict_send_path_call_builder.ts +++ b/src/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://www.stellar.org/developers/horizon/reference/endpoints/path-finding.html) + * @see [Find Payment Paths](https://developers.stellar.org/api/aggregations/paths/) * @extends CallBuilder * @param {string} serverUrl Horizon server URL. * @param {Asset} sourceAsset The asset to be sent. diff --git a/src/trades_call_builder.ts b/src/trades_call_builder.ts index 0c306495c..b1bd8e218 100644 --- a/src/trades_call_builder.ts +++ b/src/trades_call_builder.ts @@ -9,7 +9,7 @@ import { ServerApi } from "./server_api"; * @class TradesCallBuilder * @extends CallBuilder * @constructor - * @see [Trades](https://www.stellar.org/developers/horizon/reference/endpoints/trades.html) + * @see [Trades](https://developers.stellar.org/api/resources/trades/) * @param {string} serverUrl serverUrl Horizon server URL. */ export class TradesCallBuilder extends CallBuilder< @@ -66,7 +66,7 @@ export class TradesCallBuilder extends CallBuilder< /** * Filter trades for a specific account - * @see [Trades for Account](https://www.stellar.org/developers/horizon/reference/endpoints/trades-for-account.html) + * @see [Trades for Account](https://developers.stellar.org/api/resources/accounts/trades/) * @param {string} accountId For example: `GBYTR4MC5JAX4ALGUBJD7EIKZVM7CUGWKXIUJMRSMK573XH2O7VAK3SR` * @returns {TradesCallBuilder} current TradesCallBuilder instance */ @@ -76,7 +76,7 @@ export class TradesCallBuilder extends CallBuilder< /** * Filter trades for a specific liquidity pool - * @see [Trades for Liquidity Pool](https://www.stellar.org/developers/horizon/reference/endpoints/trades-for-liquidity-pool.html) + * @see [Trades for Liquidity Pool](https://developers.stellar.org/api/resources/liquiditypools/trades/) * @param {string} liquidityPoolId For example: `3b476aff8a406a6ec3b61d5c038009cef85f2ddfaf616822dc4fec92845149b4` * @returns {TradesCallBuilder} current TradesCallBuilder instance */ diff --git a/src/transaction_call_builder.ts b/src/transaction_call_builder.ts index 7a9cdbda4..831c4ee6f 100644 --- a/src/transaction_call_builder.ts +++ b/src/transaction_call_builder.ts @@ -7,7 +7,7 @@ import { ServerApi } from "./server_api"; * * @class TransactionCallBuilder * @extends CallBuilder - * @see [All Transactions](https://www.stellar.org/developers/horizon/reference/endpoints/transactions-all.html) + * @see [All Transactions](https://developers.stellar.org/api/resources/transactions/) * @constructor * @param {string} serverUrl Horizon server URL. */ @@ -21,7 +21,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://www.stellar.org/developers/horizon/reference/endpoints/transactions-single.html) + * @see [Transaction Details](https://developers.stellar.org/api/resources/transactions/single/) * @param {string} transactionId Transaction ID * @returns {CallBuilder} a CallBuilder instance */ @@ -37,7 +37,7 @@ export class TransactionCallBuilder extends CallBuilder< /** * This endpoint represents all transactions that affected a given account. - * @see [Transactions for Account](https://www.stellar.org/developers/horizon/reference/endpoints/transactions-for-account.html) + * @see [Transactions for Account](https://developers.stellar.org/api/resources/accounts/transactions/) * @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {TransactionCallBuilder} current TransactionCallBuilder instance */ @@ -47,7 +47,7 @@ export class TransactionCallBuilder extends CallBuilder< /** * This endpoint represents all transactions that reference a given claimable_balance. - * @see [Operations for Claimable Balance](https://www.stellar.org/developers/horizon/reference/endpoints/transactions-for-claimable-balance.html) + * @see [Operations for Claimable Balance](https://developers.stellar.org/api/resources/claimablebalances/transactions/) * @param {string} claimableBalanceId Claimable Balance ID * @returns {TransactionCallBuilder} this TransactionCallBuilder instance */ @@ -57,7 +57,7 @@ export class TransactionCallBuilder extends CallBuilder< /** * This endpoint represents all transactions in a given ledger. - * @see [Transactions for Ledger](https://www.stellar.org/developers/horizon/reference/endpoints/transactions-for-ledger.html) + * @see [Transactions for Ledger](https://developers.stellar.org/api/resources/ledgers/transactions/) * @param {number|string} sequence Ledger sequence * @returns {TransactionCallBuilder} current TransactionCallBuilder instance */