Skip to content

Commit

Permalink
update some federation links
Browse files Browse the repository at this point in the history
  • Loading branch information
ElliotFriend committed Jun 4, 2024
1 parent 6f74f95 commit a42c08e
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/federation/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -68,8 +68,8 @@ export class Server {
* // }
* });
*
* @see <a href="https://developers.stellar.org/docs/glossary/federation/" target="_blank">Federation doc</a>
* @see <a href="https://developers.stellar.org/docs/issuing-assets/publishing-asset-info/" target="_blank">Stellar.toml doc</a>
* @see <a href="https://developers.stellar.org/docs/learn/encyclopedia/federation" target="_blank">Federation doc</a>
* @see <a href="https://developers.stellar.org/docs/issuing-assets/publishing-asset-info" target="_blank">Stellar.toml doc</a>
* @param {string} value Stellar Address (ex. `bob*stellar.org`)
* @param {module:Federation.Api.Options} [opts] Options object
* @returns {Promise<module:Federation.Api.Record>} A promise that resolves to the federation record
Expand Down Expand Up @@ -102,21 +102,22 @@ 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(...)
* })
* .catch(error => {
* // stellar.toml does not exist or it does not contain information about federation server.
* });
* ```
* @see <a href="https://developers.stellar.org/docs/issuing-assets/publishing-asset-info/" target="_blank">Stellar.toml doc</a>
*
* @see <a href="https://developers.stellar.org/docs/issuing-assets/publishing-asset-info" target="_blank">Stellar.toml doc</a>
* @param {string} domain Domain to get federation server for
* @param {module:Federation.Api.Options} [opts] Options object
* @returns {Promise<module:Federation.Api.Record>} A promise that resolves to the federation record
Expand Down Expand Up @@ -159,7 +160,7 @@ export class Server {

/**
* Get the federation record if the user was found for a given Stellar address
* @see <a href="https://developers.stellar.org/docs/glossary/federation/" target="_blank">Federation doc</a>
* @see <a href="https://developers.stellar.org/docs/encyclopedia/federation" target="_blank">Federation doc</a>
* @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<module:Federation.Api.Record>} 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
Expand All @@ -184,7 +185,7 @@ export class Server {

/**
* Given an account ID, get their federation record if the user was found
* @see <a href="https://developers.stellar.org/docs/glossary/federation/" target="_blank">Federation doc</a>
* @see <a href="https://developers.stellar.org/docs/encyclopedia/federation" target="_blank">Federation doc</a>
* @param {string} accountId Account ID (ex. `GBYNR2QJXLBCBTRN44MRORCMI4YO7FZPFBCNOKTOBCAAFC7KC3LNPRYS`)
* @returns {Promise<module:Federation.Api.Record>} A promise that resolves to the federation record
* @throws Will throw an error if the federation server returns an invalid memo value.
Expand Down

0 comments on commit a42c08e

Please sign in to comment.