UNPKG

valor-sdk

Version:

valor-sdk is a library for working with the Valor Horizon server.

31 lines (28 loc) 1.11 kB
import {CallBuilder} from "./call_builder"; export class AccountCallBuilder extends CallBuilder { /** * 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/accounts-all.html) * @constructor * @extends CallBuilder * @param {string} serverUrl Horizon server URL. */ constructor(serverUrl) { super(serverUrl); this.url.segment('accounts'); } /** * 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/accounts-single.html) * @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` * @returns {AccountCallBuilder} */ accountId(id) { this.filter.push(['accounts', id]); return this; } }