# Source: docs/index.md # Stellar JS SDK (js-stellar-sdk)

npm version Weekly Downloads Test Status Ask DeepWiki

`js-stellar-sdk` is a JavaScript library for communicating with a [Stellar Horizon server](https://developers.stellar.org/docs/data/apis/horizon) and [Stellar RPC](https://developers.stellar.org/docs/data/apis/rpc). While primarily intended for applications built on Node.js or in the browser, it can be adapted for use in other environments with some tinkering. The library provides: - a networking layer API for Horizon endpoints (REST-based), - a networking layer for Soroban RPC (JSONRPC-based). - facilities for building and signing transactions, for communicating with a Stellar Horizon instance, and for submitting transactions or querying network history. **Jump to:** * [Installation](#installation): details on hitting the ground running * [Usage](#usage): links to documentation and a variety of workarounds for non-traditional JavaScript environments - [...with React Native](#usage-with-react-native) - [...with Expo](#usage-with-expo-managed-workflows) - [...with CloudFlare Workers](#usage-with-cloudflare-workers) * [CLI](#cli): generate TypeScript bindings for Stellar smart contracts * [Developing](#developing): contribute to the project! * [Understanding `stellar-sdk` vs. `stellar-base`](#stellar-sdk-vs-stellar-base) * [License](#license) ## Installation Using npm, pnpm, or yarn to include `stellar-sdk` in your own project: ```shell npm install --save @stellar/stellar-sdk # or pnpm add @stellar/stellar-sdk # or yarn add @stellar/stellar-sdk ``` Then, require or import it in your JavaScript code: ```js var StellarSdk = require('@stellar/stellar-sdk'); // or import * as StellarSdk from '@stellar/stellar-sdk'; ``` (Preferably, you would only import the pieces you need to enable tree-shaking and lower your final bundle sizes.) ### Browsers You can use a CDN: ```html ``` Note that this method relies on using a third party to host the JS library. This may not be entirely secure. You can self-host it via [Bower](http://bower.io): ```shell bower install @stellar/stellar-sdk ``` and include it in the browser: ```html ``` If you don't want to use or install Bower, you can copy the packaged JS files from the [Bower repo](https://github.com/stellar/bower-js-stellar-sdk), or just build the package yourself locally (see [Developing :arrow_right: Building](#building)) and copy the bundle. | Always make sure that you are using the latest version number. They can be found on the [releases page](https://github.com/stellar/js-stellar-sdk/releases) in GitHub. | |----| ### Custom Installation The default bundle uses a native-fetch HTTP client with no axios dependency. If you need the axios transport (for example, to match the behavior of older SDK versions), set the `USE_AXIOS` environment variable to `true` when building. #### Build with Axios ``` npm run build:browser:axios ``` This will create `stellar-sdk-axios.js` in `dist/`. Consumers can also import the axios-backed entry from Node via `@stellar/stellar-sdk/axios`. ## Usage The usage documentation for this library lives in a handful of places: * 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/) — which also publishes [agent-friendly bundles, raw markdown siblings, and a crawler policy](https://stellar.github.io/js-stellar-sdk/agents/) for AI tools. The site's URL, base path, and AI policy values live in [`config/site.ts`](config/site.ts). You can also refer to: * 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 1. Install `yarn add --dev rn-nodeify` 2. Add the following postinstall script: ``` yarn rn-nodeify --install url,events,https,http,util,stream,crypto,vm,buffer --hack --yarn ``` 3. Uncomment `require('crypto')` on shim.js 4. `react-native link react-native-randombytes` 5. Create file `rn-cli.config.js` ``` module.exports = { resolver: { extraNodeModules: require("node-libs-react-native"), }, }; ``` 6. Add `import "./shim";` to the top of `index.js` 7. `yarn add @stellar/stellar-sdk` There is also a [sample](https://github.com/fnando/rn-stellar-sdk-sample) that you can follow. **Note**: Only the V8 compiler (on Android) and JSC (on iOS) have proper support for `Buffer` and `Uint8Array` as is needed by this library. Otherwise, you may see bizarre errors when doing XDR encoding/decoding such as `source not specified`. #### Usage with Expo managed workflows 1. Install `yarn add --dev rn-nodeify` 2. Add the following postinstall script: ``` yarn rn-nodeify --install process,url,events,https,http,util,stream,crypto,vm,buffer --hack --yarn ``` 3. Add `import "./shim";` to your app's entry point (by default `./App.js`) 4. `yarn add @stellar/stellar-sdk` 5. `expo install expo-random` At this point, the Stellar SDK will work, except that `StellarSdk.Keypair.random()` will throw an error. To work around this, you can create your own method to generate a random keypair like this: ```javascript import * as Random from 'expo-random'; import { Keypair } from '@stellar/stellar-sdk'; const generateRandomKeypair = () => { const randomBytes = Random.getRandomBytes(32); return Keypair.fromRawEd25519Seed(Buffer.from(randomBytes)); }; ``` #### Usage with CloudFlare Workers Both `eventsource` (needed for streaming) and `axios` (needed for making HTTP requests) are problematic dependencies in the CFW environment. The experimental branch [`make-eventsource-optional`](https://github.com/stellar/js-stellar-sdk/pull/901) is an attempt to resolve these issues. It requires the following additional tweaks to your project: * the `axios-fetch-adapter` lets you use `axios` with `fetch` as a backend, which is available to CF workers * it only works with `axios@"<= 1.0.0"` versions, so we need to force an override into the underlying dependency * and this can be problematic with newer `yarn` versions, so we need to force the environment to use Yarn 1 In summary, the `package.json` tweaks look something like this: ```jsonc "dependencies": { // ... "@stellar/stellar-sdk": "git+https://github.com/stellar/js-stellar-sdk#make-eventsource-optional", "@vespaiach/axios-fetch-adapter": "^0.3.1", "axios": "^0.26.1" }, "overrides": { "@stellar/stellar-sdk": { "axios": "$axios" } }, "packageManager": "yarn@1.22.19" ``` Then, you need to override the adapter in your codebase: ```typescript import { Horizon } from '@stellar/stellar-sdk'; import fetchAdapter from '@vespaiach/axios-fetch-adapter'; Horizon.AxiosClient.defaults.adapter = fetchAdapter as any; // then, the rest of your code... ``` All HTTP calls will use `fetch`, now, meaning it should work in the CloudFlare Worker environment. ## CLI The SDK includes a command-line tool for generating TypeScript bindings from Stellar smart contracts. These bindings provide fully-typed client code with IDE autocompletion and compile-time type checking. ### Running the CLI ```shell # Using npx (no installation required) npx @stellar/stellar-sdk generate [options] # Or if installed globally stellar-js generate [options] ``` ### Generating Bindings You can generate bindings from three different sources: #### From a local WASM file ```shell npx @stellar/stellar-sdk generate \ --wasm ./path/to/wasm_file/my_contract.wasm \ --output-dir ./my-contract-client \ --contract-name my-contract ``` #### From a WASM hash on the network ```shell # testnet, futurenet, and localnet have default RPC URLs npx @stellar/stellar-sdk generate \ --wasm-hash \ --network testnet \ --output-dir ./my-contract-client \ --contract-name my-contract ``` #### From a deployed contract ID ```shell npx @stellar/stellar-sdk generate \ --contract-id CABC...XYZ \ --network testnet \ --output-dir ./my-contract-client ``` #### With custom RPC server options For mainnet or when connecting to RPC servers that require authentication: ```shell # Mainnet requires --rpc-url (no default) npx @stellar/stellar-sdk generate \ --contract-id CABC...XYZ \ --rpc-url https://my-rpc-provider.com \ --network mainnet \ --output-dir ./my-contract-client # With custom timeout and headers for authenticated RPC servers npx @stellar/stellar-sdk generate \ --contract-id CABC...XYZ \ --rpc-url https://my-rpc-server.com \ --network mainnet \ --output-dir ./my-contract-client \ --timeout 30000 \ --headers '{"Authorization": "Bearer my-token"}' # localnet with default RPC URL auto-enables --allow-http npx @stellar/stellar-sdk generate \ --contract-id CABC...XYZ \ --network localnet \ --output-dir ./my-contract-client # When overriding the default URL, you must specify --allow-http if using HTTP npx @stellar/stellar-sdk generate \ --contract-id CABC...XYZ \ --rpc-url http://my-local-server:8000/rpc \ --network localnet \ --output-dir ./my-contract-client \ --allow-http ``` ### CLI Options | Option | Description | |--------|-------------| | `--wasm ` | Path to a local WASM file | | `--wasm-hash ` | Hex-encoded hash of WASM blob on the network | | `--contract-id ` | Contract ID of a deployed contract | | `--rpc-url ` | Stellar RPC server URL (has defaults for testnet/futurenet/localnet, required for mainnet) | | `--network ` | Network to use: `testnet`, `mainnet`, `futurenet`, or `localnet` (required for network sources) | | `--output-dir ` | Output directory for generated bindings (required) | | `--contract-name ` | Name for the generated package (derived from filename if not provided) | | `--overwrite` | Overwrite existing files in the output directory | | `--allow-http` | Allow insecure HTTP connections to RPC server (default: false) | | `--timeout ` | RPC request timeout in milliseconds | | `--headers ` | Custom headers as JSON object (e.g., `'{"Authorization": "Bearer token"}'`) | #### Default RPC URLs When using `--network`, the CLI provides default RPC URLs for most networks: | Network | Default RPC URL | |---------|-----------------| | `testnet` | `https://soroban-testnet.stellar.org` | | `futurenet` | `https://rpc-futurenet.stellar.org` | | `localnet` | `http://localhost:8000/rpc` (auto-enables `--allow-http` only when using default URL) | | `mainnet` | None - you must provide `--rpc-url` ([find providers](https://developers.stellar.org/docs/data/rpc/rpc-providers)) | ### Generated Output The CLI generates a complete npm package structure: ``` my-contract-client/ ├── src/ │ ├── index.ts # Barrel exports │ ├── client.ts # Typed Client class with contract methods │ └── types.ts # TypeScript interfaces for contract types ├── package.json ├── tsconfig.json ├── README.md └── .gitignore ``` ### Using Generated Bindings After generating, you can use the bindings in your project: ```typescript import { Client } from './my-contract-client'; const client = new Client({ contractId: 'CABC...XYZ', networkPassphrase: Networks.TESTNET, rpcUrl: 'https://soroban-testnet.stellar.org', publicKey: keypair.publicKey(), ...basicNodeSigner(keypair, Networks.TESTNET), }); // Fully typed method calls with IDE autocompletion const result = await client.transfer({ from: 'GABC...', to: 'GDEF...', amount: 1000n, }); ``` ## Developing So you want to contribute to the library: welcome! Whether you're working on a fork or want to make an upstream request, the dev-test loop is pretty straightforward. 1. Clone the repo: ```shell git clone https://github.com/stellar/js-stellar-sdk.git ``` 2. Install Node Because we support the oldest maintenance version of Node, please install and develop on the version pinned in [`.nvmrc`](.nvmrc) (currently Node 22) so you don't get surprised when your code works locally but breaks in CI. Here's how to install `nvm` if you haven't: https://github.com/creationix/nvm ```shell nvm install ``` If you work on several projects that use different Node versions, you might it helpful to install this automatic version manager: https://github.com/wbyoung/avn 3. Enable Corepack ```shell corepack enable ``` 4. Install dependencies inside js-stellar-sdk folder: ```shell cd js-stellar-sdk pnpm install ``` 5. Observe the project's code style While you're making changes, make sure to run the linter to catch any linting errors (in addition to making sure your text editor supports ESLint) and conform to the project's code style. ```shell pnpm run fmt ``` ### Building You can build the developer version (unoptimized, commented, with source maps, etc.) or the production bundles: ```shell pnpm run build # or pnpm run build:prod ``` ### Testing To run all tests: ```shell pnpm run test ``` To run a specific set of tests: ```shell pnpm run test:node pnpm run test:browser pnpm run test:integration ``` In order to have a faster test loop, these suite-specific commands **do not** build the bundles first (unlike `pnpm run test`). If you make code changes, you will need to run `pnpm run build` before running the tests again to see your changes. To generate and check the documentation site: ```shell # install the `serve` command if you don't have it already npm i -g serve # clone the base library for complete docs git clone https://github.com/stellar/js-stellar-base # generate the docs files pnpm run docs # get these files working in a browser cd jsdoc && serve . # you'll be able to browse the docs at http://localhost:5000 ``` ### Publishing For information on how to contribute or publish new versions of this software to `npm`, please refer to our [contribution guide](https://github.com/stellar/js-stellar-sdk/blob/master/CONTRIBUTING.md). ## Miscellaneous ### `stellar-sdk` vs `stellar-base` `stellar-sdk` is a high-level library that serves as client-side API for Horizon and Soroban RPC, while [`stellar-base](https://github.com/stellar/js-stellar-base) is lower-level library for creating Stellar primitive constructs via XDR helpers and wrappers. **Most people will want stellar-sdk instead of stellar-base.** You should only use stellar-base if you know what you're doing! If you add `stellar-sdk` to a project, **do not add `stellar-base`!** Mismatching versions could cause weird, hard-to-find bugs. `stellar-sdk` automatically installs `stellar-base` and exposes all of its exports in case you need them. ### License js-stellar-sdk is licensed under an Apache-2.0 license. See the [LICENSE](https://github.com/stellar/js-stellar-sdk/blob/master/LICENSE) file for details. # Source: docs/guides/00-versioning.md # Versioning & Compatibility ## SDK ↔ Protocol mapping Each major version of `@stellar/stellar-sdk` is built against a specific Stellar protocol version. From v27 onwards the SDK major matches the protocol major (v27 → Protocol 27, v28 → Protocol 28, …). For majors before v27, the protocol target is documented in the [release notes](https://github.com/stellar/js-stellar-sdk/releases) of the relevant tag. | SDK major | Protocol | Status | | --- | --- | --- | | 15.x | (see release notes) | Current | > The mapping table is intentionally minimal pre-v27. After v27 the > table becomes 1:1 and self-explanatory. ## Why older majors aren't network-compatible The Stellar network upgrades its protocol periodically. Once an upgrade ships, transactions built with an SDK major that targets an older protocol may use deprecated XDR shapes or fail validation. A keypair or strkey doesn't depend on the protocol version, so basic key manipulation remains usable across majors — but anything that constructs, signs, or submits a transaction is protocol-bound. Always use the SDK major that matches the protocol of the network you're targeting (mainnet, testnet, or futurenet — each may run a different protocol during a rollout window). ## Single-version docs policy This site documents only the **current major** of `@stellar/stellar-sdk`. We do not maintain a documentation archive for older majors. The maintenance cost — keeping multiple parallel reference trees in sync, ensuring cross-version links don't rot, running multiple builds — outweighs the benefit, given that older majors are rarely the right choice for new development (per the network-compatibility note above). ## Finding docs for older versions To browse documentation for a specific older SDK version: 1. Find the matching Git tag in the [stellar/js-stellar-sdk releases](https://github.com/stellar/js-stellar-sdk/releases) page. 2. Browse the `docs/` directory at that ref on GitHub. The reference pages under `docs/reference/` are committed at each release and their inline source links point to the source files at that release's commit SHA, so the link targets resolve correctly even when the docs site itself only shows the current major. # Source: docs/guides/01-getting-started.md # Getting Started This guide will walk through installing `@stellar/stellar-sdk`, picking a network and build variant, generating or loading a keypair, and running a first script that loads an account from Horizon and inspects its balance. Topics this guide will cover: - **Installation.** `npm install @stellar/stellar-sdk` (or the equivalent `pnpm`/`yarn`/`bun` command). The default build is fetch-based; opt-in `/axios` builds and subpath imports (`/contract`, `/rpc`) are documented in the [Build variants & HTTP client](./13-build-variants-and-http-client.md) guide. - **Picking a network.** Mainnet, testnet, and futurenet have different passphrases and Horizon endpoints; choosing the wrong one is the most common source of "transaction failed" reports during early development. - **Generating or loading a keypair.** `Keypair.random()` for testnet experiments; `Keypair.fromSecret(...)` for keys you already hold. Funded testnet accounts can be created via Friendbot. - **Connecting to Horizon and loading an account.** `new Horizon.Server(...)` plus `.loadAccount(publicKey)` returns a full account record including balances and signers. - **Submitting a first transaction.** The full payment-transaction walkthrough is in the [Building & Signing Transactions](./04-building-and-signing-transactions.md) guide. > Real content lands as part of the P21 substantive-content workstream > before the v27 public release. This page is currently a placeholder > for pipeline verification. # Source: docs/guides/04-building-and-signing-transactions.md # Building & Signing Transactions This guide will cover assembling Stellar transactions with `TransactionBuilder`, attaching one or more operations, signing with a keypair, and inspecting the resulting envelope before submission to Horizon (or to Soroban RPC, for contract invocations). A canonical example — building, signing, and submitting a single testnet payment transaction: ```ts import { Asset, Horizon, Keypair, Networks, Operation, TransactionBuilder, } from "@stellar/stellar-sdk"; const sourceKeypair = Keypair.fromSecret("S..."); const server = new Horizon.Server("https://horizon-testnet.stellar.org"); const account = await server.loadAccount(sourceKeypair.publicKey()); const fee = await server.fetchBaseFee(); const tx = new TransactionBuilder(account, { fee: fee.toString(), networkPassphrase: Networks.TESTNET, }) .addOperation( Operation.payment({ destination: "G...", asset: Asset.native(), amount: "10", }), ) .setTimeout(30) .build(); tx.sign(sourceKeypair); const result = await server.submitTransaction(tx); console.log(result.hash); ``` Topics this guide will cover in full: - Choosing fee strategy (base fee vs custom). - Multi-operation transactions and ordering. - Memo types and when each is appropriate. - Time bounds and the `setTimeout` semantics. - Multi-signature flows. - Fee-bump transactions. - Soroban-specific extensions (resource fees, footprints, auth entries) — covered in the [Soroban: invoking contracts](./08-soroban-invoking-contracts.md) guide. > Real content lands as part of the P21 substantive-content workstream > before the v27 public release. This page is currently a placeholder > for pipeline verification. # Source: docs/reference/core-keys.md # Core / Keys ## Keypair `Keypair` represents public (and secret) keys of the account. Currently `Keypair` only supports ed25519 but in a future this class can be abstraction layer for other public-key signature systems. Use more convenient methods to create `Keypair` object: * [`Keypair.fromPublicKey`](#keypairfrompublickeypublickey) * [`Keypair.fromSecret`](#keypairfromsecretsecret) * [`Keypair.random`](#keypairrandom) ```ts class Keypair { constructor(keys: { publicKey?: string | Buffer; secretKey: string | Buffer; type: "ed25519" } | { publicKey: string | Buffer; type: "ed25519" }); static fromPublicKey(publicKey: string): Keypair; static fromRawEd25519Seed(rawSeed: Buffer): Keypair; static fromSecret(secret: string): Keypair; static master(networkPassphrase: string): Keypair; static random(): Keypair; readonly type: "ed25519"; canSign(): boolean; publicKey(): string; rawPublicKey(): Buffer; rawSecretKey(): Buffer; secret(): string; sign(data: Buffer): Buffer; signatureHint(): Buffer; signDecorated(data: Buffer): DecoratedSignature; signPayloadDecorated(data: Buffer): DecoratedSignature; verify(data: Buffer, signature: Buffer): boolean; xdrAccountId(): PublicKey; xdrMuxedAccount(id?: string): MuxedAccount; xdrPublicKey(): PublicKey; } ``` **Source:** [src/base/keypair.ts:21](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L21) ### `new Keypair(keys)` ```ts constructor(keys: { publicKey?: string | Buffer; secretKey: string | Buffer; type: "ed25519" } | { publicKey: string | Buffer; type: "ed25519" }); ``` **Parameters** - **`keys`** — `{ publicKey?: string | Buffer; secretKey: string | Buffer; type: "ed25519" } | { publicKey: string | Buffer; type: "ed25519" }` (required) — at least one of keys must be provided. - `type`: public-key signature system name (currently only `ed25519` keys are supported) - `publicKey`: raw public key - `secretKey`: raw secret key (32-byte secret seed in ed25519) **Source:** [src/base/keypair.ts:33](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L33) ### `Keypair.fromPublicKey(publicKey)` Creates a new `Keypair` object from public key. ```ts static fromPublicKey(publicKey: string): Keypair; ``` **Parameters** - **`publicKey`** — `string` (required) — public key (ex. `GB3KJPLFUYN5VL6R3GU3EGCGVCKFDSD7BEDX42HWG5BWFKB3KQGJJRMA`) **Source:** [src/base/keypair.ts:115](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L115) ### `Keypair.fromRawEd25519Seed(rawSeed)` Creates a new `Keypair` object from ed25519 secret key seed raw bytes. ```ts static fromRawEd25519Seed(rawSeed: Buffer): Keypair; ``` **Parameters** - **`rawSeed`** — `Buffer` (required) — raw 32-byte ed25519 secret key seed **Source:** [src/base/keypair.ts:93](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L93) ### `Keypair.fromSecret(secret)` Creates a new `Keypair` instance from secret. This can either be secret key or secret seed depending on underlying public-key signature system. Currently `Keypair` only supports ed25519. ```ts static fromSecret(secret: string): Keypair; ``` **Parameters** - **`secret`** — `string` (required) — secret key (ex. `SDAK....`) **Source:** [src/base/keypair.ts:83](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L83) ### `Keypair.master(networkPassphrase)` Returns `Keypair` object representing network master key. ```ts static master(networkPassphrase: string): Keypair; ``` **Parameters** - **`networkPassphrase`** — `string` (required) — passphrase of the target stellar network (e.g. "Public Global Stellar Network ; September 2015") **Source:** [src/base/keypair.ts:101](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L101) ### `Keypair.random()` Create a random `Keypair` object. ```ts static random(): Keypair; ``` **Source:** [src/base/keypair.ts:127](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L127) ### `keypair.type` ```ts readonly type: "ed25519"; ``` **Source:** [src/base/keypair.ts:22](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L22) ### `keypair.canSign()` Returns `true` if this `Keypair` object contains secret key and can sign. ```ts canSign(): boolean; ``` **Source:** [src/base/keypair.ts:226](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L226) ### `keypair.publicKey()` Returns public key associated with this `Keypair` object. ```ts publicKey(): string; ``` **Source:** [src/base/keypair.ts:188](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L188) ### `keypair.rawPublicKey()` Returns raw public key bytes ```ts rawPublicKey(): Buffer; ``` **Source:** [src/base/keypair.ts:171](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L171) ### `keypair.rawSecretKey()` Returns raw secret key bytes. ```ts rawSecretKey(): Buffer; ``` **Throws** - if no secret seed is available **Source:** [src/base/keypair.ts:216](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L216) ### `keypair.secret()` Returns secret key associated with this `Keypair` object. The secret key is encoded in Stellar format (e.g., `SDAK....`). ```ts secret(): string; ``` **Throws** - if no secret key is available **Source:** [src/base/keypair.ts:199](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L199) ### `keypair.sign(data)` Signs data. ```ts sign(data: Buffer): Buffer; ``` **Parameters** - **`data`** — `Buffer` (required) — data to sign **Throws** - if no secret key is available **Source:** [src/base/keypair.ts:236](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L236) ### `keypair.signatureHint()` Returns the signature hint for this keypair. The hint is the last 4 bytes of the account ID XDR representation. ```ts signatureHint(): Buffer; ``` **Source:** [src/base/keypair.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L179) ### `keypair.signDecorated(data)` Returns the decorated signature (hint+sig) for arbitrary data. The returned structure can be added directly to a transaction envelope. ```ts signDecorated(data: Buffer): DecoratedSignature; ``` **Parameters** - **`data`** — `Buffer` (required) — arbitrary data to sign **See also** - TransactionBase.addDecoratedSignature **Source:** [src/base/keypair.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L267) ### `keypair.signPayloadDecorated(data)` Returns the raw decorated signature (hint+sig) for a signed payload signer. The hint is defined as the last 4 bytes of the signer key XORed with last 4 bytes of the payload (zero-left-padded if necessary). ```ts signPayloadDecorated(data: Buffer): DecoratedSignature; ``` **Parameters** - **`data`** — `Buffer` (required) — data to both sign and treat as the payload **See also** - - https://github.com/stellar/stellar-protocol/blob/master/core/cap-0040.md#signature-hint - TransactionBase.addDecoratedSignature **Source:** [src/base/keypair.ts:285](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L285) ### `keypair.verify(data, signature)` Verifies if `signature` for `data` is valid. ```ts verify(data: Buffer, signature: Buffer): boolean; ``` **Parameters** - **`data`** — `Buffer` (required) — signed data - **`signature`** — `Buffer` (required) — signature to verify **Source:** [src/base/keypair.ts:250](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L250) ### `keypair.xdrAccountId()` Returns this public key as an xdr.AccountId. ```ts xdrAccountId(): PublicKey; ``` **Source:** [src/base/keypair.ts:133](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L133) ### `keypair.xdrMuxedAccount(id)` Creates a `xdr.MuxedAccount` object from the public key. You will get a different type of muxed account depending on whether or not you pass an ID. ```ts xdrMuxedAccount(id?: string): MuxedAccount; ``` **Parameters** - **`id`** — `string` (optional) — (optional) stringified integer indicating the underlying muxed ID of the new account object **Source:** [src/base/keypair.ts:151](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L151) ### `keypair.xdrPublicKey()` Returns this public key as an xdr.PublicKey. ```ts xdrPublicKey(): PublicKey; ``` **Source:** [src/base/keypair.ts:138](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/keypair.ts#L138) ## SignerKey A container class with helpers to convert between signer keys (`xdr.SignerKey`) and `StrKey`s. It's primarily used for manipulating the `extraSigners` precondition on a `Transaction`. ```ts class SignerKey { constructor(); static decodeAddress(address: string): SignerKey; static encodeSignerKey(signerKey: SignerKey): string; } ``` **See also** - `TransactionBuilder.setExtraSigners` **Source:** [src/base/signerkey.ts:19](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/signerkey.ts#L19) ### `new SignerKey()` ```ts constructor(); ``` ### `SignerKey.decodeAddress(address)` Decodes a StrKey address into an xdr.SignerKey instance. Only ED25519 public keys (G...), pre-auth transactions (T...), hashes (H...), and signed payloads (P...) can be signer keys. ```ts static decodeAddress(address: string): SignerKey; ``` **Parameters** - **`address`** — `string` (required) — a StrKey-encoded signer address **Source:** [src/base/signerkey.ts:28](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/signerkey.ts#L28) ### `SignerKey.encodeSignerKey(signerKey)` Encodes a signer key into its StrKey equivalent. ```ts static encodeSignerKey(signerKey: SignerKey): string; ``` **Parameters** - **`signerKey`** — `SignerKey` (required) — the signer **Source:** [src/base/signerkey.ts:63](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/signerkey.ts#L63) ## StrKey StrKey is a helper class that allows encoding and decoding Stellar keys to/from strings, i.e. between their binary (Buffer, xdr.PublicKey, etc.) and string (i.e. "GABCD...", etc.) representations. ```ts class StrKey { constructor(); static types: Record; static decodeClaimableBalance(address: string): Buffer; static decodeContract(address: string): Buffer; static decodeEd25519PublicKey(data: string): Buffer; static decodeEd25519SecretSeed(address: string): Buffer; static decodeLiquidityPool(address: string): Buffer; static decodeMed25519PublicKey(address: string): Buffer; static decodePreAuthTx(address: string): Buffer; static decodeSha256Hash(address: string): Buffer; static decodeSignedPayload(address: string): Buffer; static encodeClaimableBalance(data: Buffer): string; static encodeContract(data: Buffer): string; static encodeEd25519PublicKey(data: Buffer): string; static encodeEd25519SecretSeed(data: Buffer): string; static encodeLiquidityPool(data: Buffer): string; static encodeMed25519PublicKey(data: Buffer): string; static encodePreAuthTx(data: Buffer): string; static encodeSha256Hash(data: Buffer): string; static encodeSignedPayload(data: Buffer): string; static getVersionByteForPrefix(address: string): VersionByteName | undefined; static isValidClaimableBalance(address: string): boolean; static isValidContract(address: string): boolean; static isValidEd25519PublicKey(publicKey: string): boolean; static isValidEd25519SecretSeed(seed: string): boolean; static isValidLiquidityPool(address: string): boolean; static isValidMed25519PublicKey(publicKey: string): boolean; static isValidSignedPayload(address: string): boolean; } ``` **Source:** [src/base/strkey.ts:54](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L54) ### `new StrKey()` ```ts constructor(); ``` ### `StrKey.types` ```ts static types: Record; ``` **Source:** [src/base/strkey.ts:55](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L55) ### `StrKey.decodeClaimableBalance(address)` Decodes strkey claimable balance (B...) to raw data. ```ts static decodeClaimableBalance(address: string): Buffer; ``` **Parameters** - **`address`** — `string` (required) — balance to decode **Source:** [src/base/strkey.ts:245](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L245) ### `StrKey.decodeContract(address)` Decodes strkey contract (C...) to raw data. ```ts static decodeContract(address: string): Buffer; ``` **Parameters** - **`address`** — `string` (required) — address to decode **Source:** [src/base/strkey.ts:218](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L218) ### `StrKey.decodeEd25519PublicKey(data)` Decodes strkey ed25519 public key to raw data. If the parameter is a muxed account key ("M..."), this will only encode it as a basic Ed25519 key (as if in "G..." format). ```ts static decodeEd25519PublicKey(data: string): Buffer; ``` **Parameters** - **`data`** — `string` (required) — "G..." (or "M...") key representation to decode **Source:** [src/base/strkey.ts:74](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L74) ### `StrKey.decodeEd25519SecretSeed(address)` Decodes strkey ed25519 seed to raw data. ```ts static decodeEd25519SecretSeed(address: string): Buffer; ``` **Parameters** - **`address`** — `string` (required) — data to decode **Source:** [src/base/strkey.ts:101](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L101) ### `StrKey.decodeLiquidityPool(address)` Decodes strkey liquidity pool (L...) to raw data. ```ts static decodeLiquidityPool(address: string): Buffer; ``` **Parameters** - **`address`** — `string` (required) — address to decode **Source:** [src/base/strkey.ts:272](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L272) ### `StrKey.decodeMed25519PublicKey(address)` Decodes strkey med25519 public key to raw data. ```ts static decodeMed25519PublicKey(address: string): Buffer; ``` **Parameters** - **`address`** — `string` (required) — data to decode **Source:** [src/base/strkey.ts:128](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L128) ### `StrKey.decodePreAuthTx(address)` Decodes strkey PreAuthTx to raw data. ```ts static decodePreAuthTx(address: string): Buffer; ``` **Parameters** - **`address`** — `string` (required) — data to decode **Source:** [src/base/strkey.ts:155](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L155) ### `StrKey.decodeSha256Hash(address)` Decodes strkey sha256 hash to raw data. ```ts static decodeSha256Hash(address: string): Buffer; ``` **Parameters** - **`address`** — `string` (required) — data to decode **Source:** [src/base/strkey.ts:173](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L173) ### `StrKey.decodeSignedPayload(address)` Decodes strkey signed payload (P...) to raw data. ```ts static decodeSignedPayload(address: string): Buffer; ``` **Parameters** - **`address`** — `string` (required) — address to decode **Source:** [src/base/strkey.ts:191](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L191) ### `StrKey.encodeClaimableBalance(data)` Encodes raw data to strkey claimable balance (B...). ```ts static encodeClaimableBalance(data: Buffer): string; ``` **Parameters** - **`data`** — `Buffer` (required) — data to encode **Source:** [src/base/strkey.ts:236](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L236) ### `StrKey.encodeContract(data)` Encodes raw data to strkey contract (C...). ```ts static encodeContract(data: Buffer): string; ``` **Parameters** - **`data`** — `Buffer` (required) — data to encode **Source:** [src/base/strkey.ts:209](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L209) ### `StrKey.encodeEd25519PublicKey(data)` Encodes `data` to strkey ed25519 public key. ```ts static encodeEd25519PublicKey(data: Buffer): string; ``` **Parameters** - **`data`** — `Buffer` (required) — raw data to encode **Source:** [src/base/strkey.ts:62](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L62) ### `StrKey.encodeEd25519SecretSeed(data)` Encodes data to strkey ed25519 seed. ```ts static encodeEd25519SecretSeed(data: Buffer): string; ``` **Parameters** - **`data`** — `Buffer` (required) — data to encode **Source:** [src/base/strkey.ts:92](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L92) ### `StrKey.encodeLiquidityPool(data)` Encodes raw data to strkey liquidity pool (L...). ```ts static encodeLiquidityPool(data: Buffer): string; ``` **Parameters** - **`data`** — `Buffer` (required) — data to encode **Source:** [src/base/strkey.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L263) ### `StrKey.encodeMed25519PublicKey(data)` Encodes data to strkey med25519 public key. ```ts static encodeMed25519PublicKey(data: Buffer): string; ``` **Parameters** - **`data`** — `Buffer` (required) — data to encode **Source:** [src/base/strkey.ts:119](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L119) ### `StrKey.encodePreAuthTx(data)` Encodes data to strkey preAuthTx. ```ts static encodePreAuthTx(data: Buffer): string; ``` **Parameters** - **`data`** — `Buffer` (required) — data to encode **Source:** [src/base/strkey.ts:146](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L146) ### `StrKey.encodeSha256Hash(data)` Encodes data to strkey sha256 hash. ```ts static encodeSha256Hash(data: Buffer): string; ``` **Parameters** - **`data`** — `Buffer` (required) — data to encode **Source:** [src/base/strkey.ts:164](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L164) ### `StrKey.encodeSignedPayload(data)` Encodes raw data to strkey signed payload (P...). ```ts static encodeSignedPayload(data: Buffer): string; ``` **Parameters** - **`data`** — `Buffer` (required) — data to encode **Source:** [src/base/strkey.ts:182](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L182) ### `StrKey.getVersionByteForPrefix(address)` Returns the strkey type based on the prefix of the given strkey address, or undefined if the prefix is invalid. ```ts static getVersionByteForPrefix(address: string): VersionByteName | undefined; ``` **Parameters** - **`address`** — `string` (required) — the strkey address to check **Source:** [src/base/strkey.ts:291](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L291) ### `StrKey.isValidClaimableBalance(address)` Checks validity of alleged claimable balance (B...) strkey address. ```ts static isValidClaimableBalance(address: string): boolean; ``` **Parameters** - **`address`** — `string` (required) — balance to check **Source:** [src/base/strkey.ts:254](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L254) ### `StrKey.isValidContract(address)` Checks validity of alleged contract (C...) strkey address. ```ts static isValidContract(address: string): boolean; ``` **Parameters** - **`address`** — `string` (required) — signer key to check **Source:** [src/base/strkey.ts:227](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L227) ### `StrKey.isValidEd25519PublicKey(publicKey)` Returns true if the given Stellar public key is a valid ed25519 public key. ```ts static isValidEd25519PublicKey(publicKey: string): boolean; ``` **Parameters** - **`publicKey`** — `string` (required) — public key to check **Source:** [src/base/strkey.ts:83](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L83) ### `StrKey.isValidEd25519SecretSeed(seed)` Returns true if the given Stellar secret key is a valid ed25519 secret seed. ```ts static isValidEd25519SecretSeed(seed: string): boolean; ``` **Parameters** - **`seed`** — `string` (required) — seed to check **Source:** [src/base/strkey.ts:110](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L110) ### `StrKey.isValidLiquidityPool(address)` Checks validity of alleged liquidity pool (L...) strkey address. ```ts static isValidLiquidityPool(address: string): boolean; ``` **Parameters** - **`address`** — `string` (required) — pool to check **Source:** [src/base/strkey.ts:281](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L281) ### `StrKey.isValidMed25519PublicKey(publicKey)` Returns true if the given Stellar public key is a valid med25519 public key. ```ts static isValidMed25519PublicKey(publicKey: string): boolean; ``` **Parameters** - **`publicKey`** — `string` (required) — public key to check **Source:** [src/base/strkey.ts:137](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L137) ### `StrKey.isValidSignedPayload(address)` Checks validity of alleged signed payload (P...) strkey address. ```ts static isValidSignedPayload(address: string): boolean; ``` **Parameters** - **`address`** — `string` (required) — signer key to check **Source:** [src/base/strkey.ts:200](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/strkey.ts#L200) ## sign Signs data using an Ed25519 secret key. ```ts sign(data: Buffer, rawSecret: Uint8Array | Buffer): Buffer ``` **Parameters** - **`data`** — `Buffer` (required) — the data to sign - **`rawSecret`** — `Uint8Array | Buffer` (required) — the raw Ed25519 secret key **Source:** [src/base/signing.ts:20](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/signing.ts#L20) ## verify Verifies an Ed25519 signature against the given data and public key. ```ts verify(data: Buffer, signature: Buffer, rawPublicKey: Uint8Array | Buffer): boolean ``` **Parameters** - **`data`** — `Buffer` (required) — the original signed data - **`signature`** — `Buffer` (required) — the signature to verify - **`rawPublicKey`** — `Uint8Array | Buffer` (required) — the raw Ed25519 public key **Source:** [src/base/signing.ts:31](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/signing.ts#L31) # Source: docs/reference/core-assets.md # Core / Assets ## Asset Asset class represents an asset, either the native asset (`XLM`) or an asset code / issuer account ID pair. An asset describes an asset code and issuer pair. In the case of the native asset XLM, the issuer will be undefined. ```ts class Asset { constructor(code: string, issuer?: string); static compare(assetA: Asset, assetB: Asset): -1 | 0 | 1; static fromOperation(assetXdr: Asset): Asset; static native(): Asset; readonly code: string; readonly issuer: string | undefined; contractId(networkPassphrase: string): string; equals(asset: Asset): boolean; getAssetType(): AssetType; getCode(): string; getIssuer(): string | undefined; getRawAssetType(): AssetType; isNative(): boolean; toChangeTrustXDRObject(): ChangeTrustAsset; toString(): string; toTrustLineXDRObject(): TrustLineAsset; toXDRObject(): Asset; } ``` **Source:** [src/base/asset.ts:46](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L46) ### `new Asset(code, issuer)` ```ts constructor(code: string, issuer?: string); ``` **Parameters** - **`code`** — `string` (required) — The asset code. - **`issuer`** — `string` (optional) — The account ID of the issuer. **Source:** [src/base/asset.ts:56](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L56) ### `Asset.compare(assetA, assetB)` Compares two assets according to the criteria: 1. First compare the type (`native < alphanum4 < alphanum12`). 2. If the types are equal, compare the assets codes. 3. If the asset codes are equal, compare the issuers. ```ts static compare(assetA: Asset, assetB: Asset): -1 | 0 | 1; ``` **Parameters** - **`assetA`** — `Asset` (required) — the first asset - **`assetB`** — `Asset` (required) — the second asset **Source:** [src/base/asset.ts:288](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L288) ### `Asset.fromOperation(assetXdr)` Returns an asset object from its XDR object representation. ```ts static fromOperation(assetXdr: Asset): Asset; ``` **Parameters** - **`assetXdr`** — `Asset` (required) — The asset xdr object. **Source:** [src/base/asset.ts:90](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L90) ### `Asset.native()` Returns an asset object for the native asset. ```ts static native(): Asset; ``` **Source:** [src/base/asset.ts:82](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L82) ### `asset.code` The asset code. ```ts readonly code: string; ``` **Source:** [src/base/asset.ts:48](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L48) ### `asset.issuer` The account ID of the issuer. Undefined for the native asset. ```ts readonly issuer: string | undefined; ``` **Source:** [src/base/asset.ts:50](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L50) ### `asset.contractId(networkPassphrase)` Returns the would-be contract ID (`C...` format) for this asset on a given network. ```ts contractId(networkPassphrase: string): string; ``` **Parameters** - **`networkPassphrase`** — `string` (required) — indicates which network the contract ID should refer to, since every network will have a unique ID for the same contract (see `Networks` for options) **Warning:** This makes no guarantee that this contract actually *exists*. **Source:** [src/base/asset.ts:143](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L143) ### `asset.equals(asset)` Returns true if this asset equals the given asset. ```ts equals(asset: Asset): boolean; ``` **Parameters** - **`asset`** — `Asset` (required) — Asset to compare **Source:** [src/base/asset.ts:261](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L261) ### `asset.getAssetType()` ```ts getAssetType(): AssetType; ``` **Throws** - Throws `Error` if asset type is unsupported. **See also** - [Assets concept](https://developers.stellar.org/docs/glossary/assets/) Returns the asset type. Can be one of following types: - `native`, - `credit_alphanum4`, - `credit_alphanum12` **Source:** [src/base/asset.ts:219](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L219) ### `asset.getCode()` Returns the asset code ```ts getCode(): string; ``` **Source:** [src/base/asset.ts:196](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L196) ### `asset.getIssuer()` Returns the asset issuer ```ts getIssuer(): string | undefined; ``` **Source:** [src/base/asset.ts:203](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L203) ### `asset.getRawAssetType()` Returns the raw XDR representation of the asset type ```ts getRawAssetType(): AssetType; ``` **Source:** [src/base/asset.ts:237](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L237) ### `asset.isNative()` Returns true if this asset object is the native asset. ```ts isNative(): boolean; ``` **Source:** [src/base/asset.ts:252](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L252) ### `asset.toChangeTrustXDRObject()` Returns the xdr.ChangeTrustAsset object for this asset. ```ts toChangeTrustXDRObject(): ChangeTrustAsset; ``` **Source:** [src/base/asset.ts:122](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L122) ### `asset.toString()` Returns a string representation of this asset. Native assets return `"native"`. Non-native assets return `"code:issuer"`. ```ts toString(): string; ``` **Source:** [src/base/asset.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L270) ### `asset.toTrustLineXDRObject()` Returns the xdr.TrustLineAsset object for this asset. ```ts toTrustLineXDRObject(): TrustLineAsset; ``` **Source:** [src/base/asset.ts:129](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L129) ### `asset.toXDRObject()` Returns the xdr.Asset object for this asset. ```ts toXDRObject(): Asset; ``` **Source:** [src/base/asset.ts:115](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L115) ## AssetType ```ts type AssetType = typeof AssetType[keyof typeof AssetType] ``` **Source:** [src/base/asset.ts:7](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L7) ## AssetType ```ts const AssetType: { readonly credit12: "credit_alphanum12"; readonly credit4: "credit_alphanum4"; readonly liquidityPoolShares: "liquidity_pool_shares"; readonly native: "native" } ``` **Source:** [src/base/asset.ts:7](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L7) ## AssetType.credit12 ```ts type credit12 = "credit_alphanum12" ``` **Source:** [src/base/asset.ts:20](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L20) ## AssetType.credit4 ```ts type credit4 = "credit_alphanum4" ``` **Source:** [src/base/asset.ts:19](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L19) ## AssetType.liquidityPoolShares ```ts type liquidityPoolShares = "liquidity_pool_shares" ``` **Source:** [src/base/asset.ts:21](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L21) ## AssetType.native ```ts type native = "native" ``` **Source:** [src/base/asset.ts:18](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/asset.ts#L18) ## Claimant Claimant class represents an xdr.Claimant The claim predicate is optional, it defaults to unconditional if none is specified. ```ts class Claimant { constructor(destination: string, predicate?: ClaimPredicate); static fromXDR(claimantXdr: Claimant): Claimant; static predicateAnd(left: ClaimPredicate, right: ClaimPredicate): ClaimPredicate; static predicateBeforeAbsoluteTime(absBefore: string): ClaimPredicate; static predicateBeforeRelativeTime(seconds: string): ClaimPredicate; static predicateNot(predicate: ClaimPredicate): ClaimPredicate; static predicateOr(left: ClaimPredicate, right: ClaimPredicate): ClaimPredicate; static predicateUnconditional(): ClaimPredicate; destination: string; predicate: ClaimPredicate; toXDRObject(): Claimant; } ``` **Source:** [src/base/claimant.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/claimant.ts#L10) ### `new Claimant(destination, predicate)` ```ts constructor(destination: string, predicate?: ClaimPredicate); ``` **Parameters** - **`destination`** — `string` (required) — The destination account ID. - **`predicate`** — `ClaimPredicate` (optional) — The claim predicate. **Source:** [src/base/claimant.ts:18](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/claimant.ts#L18) ### `Claimant.fromXDR(claimantXdr)` Returns a claimant object from its XDR object representation. ```ts static fromXDR(claimantXdr: Claimant): Claimant; ``` **Parameters** - **`claimantXdr`** — `Claimant` (required) — The claimant xdr object. **Source:** [src/base/claimant.ts:124](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/claimant.ts#L124) ### `Claimant.predicateAnd(left, right)` Returns an `and` claim predicate ```ts static predicateAnd(left: ClaimPredicate, right: ClaimPredicate): ClaimPredicate; ``` **Parameters** - **`left`** — `ClaimPredicate` (required) — an xdr.ClaimPredicate - **`right`** — `ClaimPredicate` (required) — an xdr.ClaimPredicate **Source:** [src/base/claimant.ts:45](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/claimant.ts#L45) ### `Claimant.predicateBeforeAbsoluteTime(absBefore)` Returns a `BeforeAbsoluteTime` claim predicate This predicate will be fulfilled if the closing time of the ledger that includes the CreateClaimableBalance operation is less than this (absolute) Unix timestamp (expressed in seconds). ```ts static predicateBeforeAbsoluteTime(absBefore: string): ClaimPredicate; ``` **Parameters** - **`absBefore`** — `string` (required) — Unix epoch (in seconds) as a string **Source:** [src/base/claimant.ts:99](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/claimant.ts#L99) ### `Claimant.predicateBeforeRelativeTime(seconds)` Returns a `BeforeRelativeTime` claim predicate This predicate will be fulfilled if the closing time of the ledger that includes the CreateClaimableBalance operation plus this relative time delta (in seconds) is less than the current time. ```ts static predicateBeforeRelativeTime(seconds: string): ClaimPredicate; ``` **Parameters** - **`seconds`** — `string` (required) — seconds since closeTime of the ledger in which the ClaimableBalanceEntry was created (as string) **Source:** [src/base/claimant.ts:114](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/claimant.ts#L114) ### `Claimant.predicateNot(predicate)` Returns a `not` claim predicate ```ts static predicateNot(predicate: ClaimPredicate): ClaimPredicate; ``` **Parameters** - **`predicate`** — `ClaimPredicate` (required) — an xdr.ClaimPredicate **Source:** [src/base/claimant.ts:82](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/claimant.ts#L82) ### `Claimant.predicateOr(left, right)` Returns an `or` claim predicate ```ts static predicateOr(left: ClaimPredicate, right: ClaimPredicate): ClaimPredicate; ``` **Parameters** - **`left`** — `ClaimPredicate` (required) — an xdr.ClaimPredicate - **`right`** — `ClaimPredicate` (required) — an xdr.ClaimPredicate **Source:** [src/base/claimant.ts:64](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/claimant.ts#L64) ### `Claimant.predicateUnconditional()` Returns an unconditional claim predicate ```ts static predicateUnconditional(): ClaimPredicate; ``` **Source:** [src/base/claimant.ts:36](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/claimant.ts#L36) ### `claimant.destination` The destination account ID. ```ts destination: string; ``` **Source:** [src/base/claimant.ts:153](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/claimant.ts#L153) ### `claimant.predicate` The claim predicate. ```ts predicate: ClaimPredicate; ``` **Source:** [src/base/claimant.ts:164](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/claimant.ts#L164) ### `claimant.toXDRObject()` Returns the xdr object for this claimant. ```ts toXDRObject(): Claimant; ``` **Source:** [src/base/claimant.ts:141](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/claimant.ts#L141) ## LiquidityPoolAsset LiquidityPoolAsset class represents a liquidity pool trustline change. ```ts class LiquidityPoolAsset { constructor(assetA: Asset, assetB: Asset, fee: number); static fromOperation(ctAssetXdr: ChangeTrustAsset): LiquidityPoolAsset; assetA: Asset; assetB: Asset; fee: number; equals(other: LiquidityPoolAsset): boolean; getAssetType(): "liquidity_pool_shares"; getLiquidityPoolParameters(): ConstantProduct; toString(): string; toXDRObject(): ChangeTrustAsset; } ``` **Source:** [src/base/liquidity_pool_asset.ts:12](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_asset.ts#L12) ### `new LiquidityPoolAsset(assetA, assetB, fee)` ```ts constructor(assetA: Asset, assetB: Asset, fee: number); ``` **Parameters** - **`assetA`** — `Asset` (required) — The first asset in the Pool, it must respect the rule `assetA < assetB`. See `Asset.compare` for more details on how assets are sorted. - **`assetB`** — `Asset` (required) — The second asset in the Pool, it must respect the rule `assetA < assetB`. See `Asset.compare` for more details on how assets are sorted. - **`fee`** — `number` (required) — The liquidity pool fee. For now the only fee supported is `30`. **Source:** [src/base/liquidity_pool_asset.ts:22](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_asset.ts#L22) ### `LiquidityPoolAsset.fromOperation(ctAssetXdr)` Returns a liquidity pool asset object from its XDR ChangeTrustAsset object representation. ```ts static fromOperation(ctAssetXdr: ChangeTrustAsset): LiquidityPoolAsset; ``` **Parameters** - **`ctAssetXdr`** — `ChangeTrustAsset` (required) — The asset XDR object. **Source:** [src/base/liquidity_pool_asset.ts:50](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_asset.ts#L50) ### `liquidityPoolAsset.assetA` ```ts assetA: Asset; ``` **Source:** [src/base/liquidity_pool_asset.ts:13](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_asset.ts#L13) ### `liquidityPoolAsset.assetB` ```ts assetB: Asset; ``` **Source:** [src/base/liquidity_pool_asset.ts:14](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_asset.ts#L14) ### `liquidityPoolAsset.fee` ```ts fee: number; ``` **Source:** [src/base/liquidity_pool_asset.ts:15](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_asset.ts#L15) ### `liquidityPoolAsset.equals(other)` Returns true if this liquidity pool asset equals the given one. ```ts equals(other: LiquidityPoolAsset): boolean; ``` **Parameters** - **`other`** — `LiquidityPoolAsset` (required) — the LiquidityPoolAsset to compare **Source:** [src/base/liquidity_pool_asset.ts:116](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_asset.ts#L116) ### `liquidityPoolAsset.getAssetType()` Returns the asset type, always `"liquidity_pool_shares"`. ```ts getAssetType(): "liquidity_pool_shares"; ``` **See also** - [Assets concept](https://developers.stellar.org/docs/glossary/assets/) **Source:** [src/base/liquidity_pool_asset.ts:107](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_asset.ts#L107) ### `liquidityPoolAsset.getLiquidityPoolParameters()` Returns liquidity pool parameters. ```ts getLiquidityPoolParameters(): ConstantProduct; ``` **Source:** [src/base/liquidity_pool_asset.ts:93](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_asset.ts#L93) ### `liquidityPoolAsset.toString()` Returns a string representation in `liquidity_pool:` format. ```ts toString(): string; ``` **Source:** [src/base/liquidity_pool_asset.ts:125](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_asset.ts#L125) ### `liquidityPoolAsset.toXDRObject()` Returns the `xdr.ChangeTrustAsset` object for this liquidity pool asset. Note: To convert from an ``Asset`` to `xdr.ChangeTrustAsset` please refer to the ``Asset.toChangeTrustXDRObject`` method. ```ts toXDRObject(): ChangeTrustAsset; ``` **Source:** [src/base/liquidity_pool_asset.ts:75](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_asset.ts#L75) ## LiquidityPoolFeeV18 ```ts const LiquidityPoolFeeV18: 30 ``` **Source:** [src/base/get_liquidity_pool_id.ts:22](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/get_liquidity_pool_id.ts#L22) ## LiquidityPoolId LiquidityPoolId class represents the asset referenced by a trustline to a liquidity pool. ```ts class LiquidityPoolId { constructor(liquidityPoolId: string); static fromOperation(tlAssetXdr: TrustLineAsset): LiquidityPoolId; liquidityPoolId: string; equals(asset: LiquidityPoolId): boolean; getAssetType(): "liquidity_pool_shares"; getLiquidityPoolId(): string; toString(): string; toXDRObject(): TrustLineAsset; } ``` **Source:** [src/base/liquidity_pool_id.ts:7](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_id.ts#L7) ### `new LiquidityPoolId(liquidityPoolId)` ```ts constructor(liquidityPoolId: string); ``` **Parameters** - **`liquidityPoolId`** — `string` (required) — The ID of the liquidity pool in string 'hex'. **Source:** [src/base/liquidity_pool_id.ts:13](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_id.ts#L13) ### `LiquidityPoolId.fromOperation(tlAssetXdr)` Returns a liquidity pool ID object from its xdr.TrustLineAsset representation. ```ts static fromOperation(tlAssetXdr: TrustLineAsset): LiquidityPoolId; ``` **Parameters** - **`tlAssetXdr`** — `TrustLineAsset` (required) — The asset XDR object. **Source:** [src/base/liquidity_pool_id.ts:28](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_id.ts#L28) ### `liquidityPoolId.liquidityPoolId` ```ts liquidityPoolId: string; ``` **Source:** [src/base/liquidity_pool_id.ts:8](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_id.ts#L8) ### `liquidityPoolId.equals(asset)` Returns true if this liquidity pool ID equals the given one. ```ts equals(asset: LiquidityPoolId): boolean; ``` **Parameters** - **`asset`** — `LiquidityPoolId` (required) — LiquidityPoolId to compare. **Source:** [src/base/liquidity_pool_id.ts:77](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_id.ts#L77) ### `liquidityPoolId.getAssetType()` Returns the asset type, always `"liquidity_pool_shares"`. ```ts getAssetType(): "liquidity_pool_shares"; ``` **See also** - [Assets concept](https://developers.stellar.org/docs/glossary/assets/) **Source:** [src/base/liquidity_pool_id.ts:68](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_id.ts#L68) ### `liquidityPoolId.getLiquidityPoolId()` Returns the liquidity pool ID as a hex string. ```ts getLiquidityPoolId(): string; ``` **Source:** [src/base/liquidity_pool_id.ts:59](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_id.ts#L59) ### `liquidityPoolId.toString()` Returns a string representation of this liquidity pool ID. ```ts toString(): string; ``` **Source:** [src/base/liquidity_pool_id.ts:84](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_id.ts#L84) ### `liquidityPoolId.toXDRObject()` Returns the `xdr.TrustLineAsset` object for this liquidity pool ID. Note: To convert from ``Asset`` to `xdr.TrustLineAsset` please refer to the ``Asset.toTrustLineXDRObject`` method. ```ts toXDRObject(): TrustLineAsset; ``` **Source:** [src/base/liquidity_pool_id.ts:48](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/liquidity_pool_id.ts#L48) ## LiquidityPoolParameters ```ts type LiquidityPoolParameters = LiquidityPoolParameters.ConstantProduct ``` **Source:** [src/base/get_liquidity_pool_id.ts:12](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/get_liquidity_pool_id.ts#L12) ## LiquidityPoolParameters.ConstantProduct ```ts interface ConstantProduct { assetA: Asset; assetB: Asset; fee: number; } ``` **Source:** [src/base/get_liquidity_pool_id.ts:13](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/get_liquidity_pool_id.ts#L13) ### `constantProduct.assetA` ```ts assetA: Asset; ``` **Source:** [src/base/get_liquidity_pool_id.ts:14](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/get_liquidity_pool_id.ts#L14) ### `constantProduct.assetB` ```ts assetB: Asset; ``` **Source:** [src/base/get_liquidity_pool_id.ts:15](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/get_liquidity_pool_id.ts#L15) ### `constantProduct.fee` ```ts fee: number; ``` **Source:** [src/base/get_liquidity_pool_id.ts:16](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/get_liquidity_pool_id.ts#L16) ## LiquidityPoolType ```ts type LiquidityPoolType = LiquidityPoolType.constantProduct ``` **Source:** [src/base/get_liquidity_pool_id.ts:7](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/get_liquidity_pool_id.ts#L7) ## LiquidityPoolType.constantProduct ```ts type constantProduct = "constant_product" ``` **Source:** [src/base/get_liquidity_pool_id.ts:8](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/get_liquidity_pool_id.ts#L8) ## getLiquidityPoolId Computes the Pool ID for the given assets, fee and pool type. Returns the raw Pool ID buffer, which can be stringified with `toString('hex')`. ```ts getLiquidityPoolId(liquidityPoolType: "constant_product", liquidityPoolParameters: ConstantProduct): Buffer ``` **Parameters** - **`liquidityPoolType`** — `"constant_product"` (required) — A string representing the liquidity pool type. - **`liquidityPoolParameters`** — `ConstantProduct` (required) — The liquidity pool parameters. - `assetA`: The first asset in the Pool, it must respect the rule `assetA < assetB`. - `assetB`: The second asset in the Pool, it must respect the rule `assetA < assetB`. - `fee`: The liquidity pool fee. For now the only fee supported is `30`. **See also** - [stellar-core getPoolID](https://github.com/stellar/stellar-core/blob/9f3a48c6a8f1aa77b6043a055d0638661f718080/src/ledger/test/LedgerTxnTests.cpp#L3746-L3751) **Source:** [src/base/get_liquidity_pool_id.ts:38](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/get_liquidity_pool_id.ts#L38) # Source: docs/reference/core-transactions.md # Core / Transactions ## Account Create a new Account object. `Account` represents a single account in the Stellar network and its sequence number. Account tracks the sequence number as it is used by `TransactionBuilder`. See [Accounts](https://developers.stellar.org/docs/glossary/accounts/) for more information about how accounts work in Stellar. ```ts class Account { constructor(accountId: string, sequence: string); accountId(): string; incrementSequenceNumber(): void; sequenceNumber(): string; } ``` **Source:** [src/base/account.ts:15](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/account.ts#L15) ### `new Account(accountId, sequence)` ```ts constructor(accountId: string, sequence: string); ``` **Parameters** - **`accountId`** — `string` (required) — ID of the account (ex. `GB3KJPLFUYN5VL6R3GU3EGCGVCKFDSD7BEDX42HWG5BWFKB3KQGJJRMA`). If you provide a muxed account address, this will throw; use `MuxedAccount` instead. - **`sequence`** — `string` (required) — current sequence number of the account **Source:** [src/base/account.ts:26](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/account.ts#L26) ### `account.accountId()` Returns Stellar account ID, ex. `GB3KJPLFUYN5VL6R3GU3EGCGVCKFDSD7BEDX42HWG5BWFKB3KQGJJRMA`. ```ts accountId(): string; ``` **Source:** [src/base/account.ts:57](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/account.ts#L57) ### `account.incrementSequenceNumber()` Increments sequence number in this object by one. ```ts incrementSequenceNumber(): void; ``` **Source:** [src/base/account.ts:71](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/account.ts#L71) ### `account.sequenceNumber()` Returns sequence number for the account as a string ```ts sequenceNumber(): string; ``` **Source:** [src/base/account.ts:64](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/account.ts#L64) ## AuthClawbackEnabledFlag When set using [`Operation.setOptions`](#operationsetoptions) option, then any trustlines created by this account can have a ClawbackOp operation submitted for the corresponding asset. ```ts const AuthClawbackEnabledFlag: number ``` **See also** - [Account flags](https://developers.stellar.org/docs/glossary/accounts/#flags) **Source:** [src/base/operation.ts:83](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L83) ## AuthFlag ```ts type AuthFlag = unknown ``` **Source:** [src/base/operations/types.ts:431](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L431) ## AuthFlag ```ts type AuthFlag = typeof AuthFlag[keyof typeof AuthFlag] ``` **Source:** [src/base/operations/types.ts:431](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L431) ## AuthImmutableFlag When set using [`Operation.setOptions`](#operationsetoptions) option, then none of the authorization flags can be set and the account can never be deleted. ```ts const AuthImmutableFlag: number ``` **See also** - [Account flags](https://developers.stellar.org/docs/glossary/accounts/#flags) **Source:** [src/base/operation.ts:74](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L74) ## AuthRequiredFlag When set using [`Operation.setOptions`](#operationsetoptions) option, requires the issuing account to give other accounts permission before they can hold the issuing account’s credit. ```ts const AuthRequiredFlag: number ``` **See also** - [Account flags](https://developers.stellar.org/docs/glossary/accounts/#flags) **Source:** [src/base/operation.ts:60](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L60) ## AuthRevocableFlag When set using [`Operation.setOptions`](#operationsetoptions) option, allows the issuing account to revoke its credit held by other accounts. ```ts const AuthRevocableFlag: number ``` **See also** - [Account flags](https://developers.stellar.org/docs/glossary/accounts/#flags) **Source:** [src/base/operation.ts:67](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L67) ## BASE_FEE Minimum base fee for transactions. If this fee is below the network minimum, the transaction will fail. The more operations in the transaction, the greater the required fee. Use `Horizon.Server.fetchBaseFee` to get an accurate value of minimum transaction fee on the network. ```ts const BASE_FEE: "100" ``` **See also** - [Fees](https://developers.stellar.org/docs/glossary/fees/) **Source:** [src/base/transaction_builder.ts:38](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L38) ## FeeBumpTransaction Use `TransactionBuilder.buildFeeBumpTransaction` to build a FeeBumpTransaction object. If you have an object or base64-encoded string of the transaction envelope XDR use `TransactionBuilder.fromXDR`. Once a `FeeBumpTransaction` has been created, its attributes and operations should not be changed. You should only add signatures (using `FeeBumpTransaction.sign`) before submitting to the network or forwarding on to additional signers. ```ts class FeeBumpTransaction { constructor(envelope: string | TransactionEnvelope, networkPassphrase: string); fee: string; readonly feeSource: string; readonly innerTransaction: Transaction; networkPassphrase: string; readonly operations: OperationRecord[]; signatures: DecoratedSignature[]; tx: TTx; addDecoratedSignature(signature: DecoratedSignature): void; addSignature(publicKey: string = "", signature: string = ""): void; getKeypairSignature(keypair: Keypair): string; hash(): Buffer; sign(...keypairs: Keypair[]): void; signatureBase(): Buffer; signHashX(preimage: string | Buffer): void; toEnvelope(): TransactionEnvelope; toXDR(): string; } ``` **Source:** [src/base/fee_bump_transaction.ts:17](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/fee_bump_transaction.ts#L17) ### `new FeeBumpTransaction(envelope, networkPassphrase)` ```ts constructor(envelope: string | TransactionEnvelope, networkPassphrase: string); ``` **Parameters** - **`envelope`** — `string | TransactionEnvelope` (required) — transaction envelope object or base64 encoded string. - **`networkPassphrase`** — `string` (required) — passphrase of the target Stellar network (e.g. "Public Global Stellar Network ; September 2015"). **Source:** [src/base/fee_bump_transaction.ts:26](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/fee_bump_transaction.ts#L26) ### `feeBumpTransaction.fee` The total fee for this transaction, in stroops. ```ts fee: string; ``` **Source:** [src/base/transaction_base.ts:76](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L76) ### `feeBumpTransaction.feeSource` The account paying the fee for this transaction. ```ts readonly feeSource: string; ``` **Source:** [src/base/fee_bump_transaction.ts:78](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/fee_bump_transaction.ts#L78) ### `feeBumpTransaction.innerTransaction` The inner transaction that this fee bump wraps. ```ts readonly innerTransaction: Transaction; ``` **Source:** [src/base/fee_bump_transaction.ts:64](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/fee_bump_transaction.ts#L64) ### `feeBumpTransaction.networkPassphrase` The network passphrase for this transaction. ```ts networkPassphrase: string; ``` **Source:** [src/base/transaction_base.ts:85](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L85) ### `feeBumpTransaction.operations` The operations from the inner transaction. ```ts readonly operations: OperationRecord[]; ``` **Source:** [src/base/fee_bump_transaction.ts:71](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/fee_bump_transaction.ts#L71) ### `feeBumpTransaction.signatures` The list of signatures for this transaction. ```ts signatures: DecoratedSignature[]; ``` **Source:** [src/base/transaction_base.ts:35](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L35) ### `feeBumpTransaction.tx` The underlying XDR transaction object. Returns a defensive copy so that external mutations cannot alter the transaction that will be signed or serialized. ```ts tx: TTx; ``` **Throws** - if the internal transaction is not a recognized XDR type **Source:** [src/base/transaction_base.ts:51](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L51) ### `feeBumpTransaction.addDecoratedSignature(signature)` Add a decorated signature directly to the transaction envelope. ```ts addDecoratedSignature(signature: DecoratedSignature): void; ``` **Parameters** - **`signature`** — `DecoratedSignature` (required) — raw signature to add **See also** - - Keypair.signDecorated - Keypair.signPayloadDecorated **Source:** [src/base/transaction_base.ts:196](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L196) ### `feeBumpTransaction.addSignature(publicKey, signature)` Add a signature to the transaction. Useful when a party wants to pre-sign a transaction but doesn't want to give access to their secret keys. This will also verify whether the signature is valid. Here's how you would use this feature to solicit multiple signatures. - Use `TransactionBuilder` to build a new transaction. - Make sure to set a long enough timeout on that transaction to give your signers enough time to sign! - Once you build the transaction, use `transaction.toXDR()` to get the base64-encoded XDR string. - _Warning!_ Once you've built this transaction, don't submit any other transactions onto your account! Doing so will invalidate this pre-compiled transaction! - Send this XDR string to your other parties. They can use the instructions for [getKeypairSignature](#getKeypairSignature) to sign the transaction. - They should send you back their `publicKey` and the `signature` string from [getKeypairSignature](#getKeypairSignature), both of which you pass to this function. ```ts addSignature(publicKey: string = "", signature: string = ""): void; ``` **Parameters** - **`publicKey`** — `string` (optional) (default: `""`) — the public key of the signer - **`signature`** — `string` (optional) (default: `""`) — the base64 value of the signature XDR **Source:** [src/base/transaction_base.ts:156](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L156) ### `feeBumpTransaction.getKeypairSignature(keypair)` Signs a transaction with the given `Keypair`. Useful if someone sends you a transaction XDR for you to sign and return (see [addSignature](#addSignature) for more information). When you get a transaction XDR to sign.... - Instantiate a `Transaction` object with the XDR - Use `Keypair` to generate a keypair object for your Stellar seed. - Run `getKeypairSignature` with that keypair - Send back the signature along with your publicKey (not your secret seed!) Example: ```javascript // `transactionXDR` is a string from the person generating the transaction const transaction = new Transaction(transactionXDR, networkPassphrase); const keypair = Keypair.fromSecret(myStellarSeed); return transaction.getKeypairSignature(keypair); ``` Returns the base64-encoded signature string for the given keypair. ```ts getKeypairSignature(keypair: Keypair): string; ``` **Parameters** - **`keypair`** — `Keypair` (required) — Keypair of signer **Source:** [src/base/transaction_base.ts:129](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L129) ### `feeBumpTransaction.hash()` Returns a hash for this transaction, suitable for signing. ```ts hash(): Buffer; ``` **Source:** [src/base/transaction_base.ts:222](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L222) ### `feeBumpTransaction.sign(keypairs)` Signs the transaction with the given `Keypair`. ```ts sign(...keypairs: Keypair[]): void; ``` **Parameters** - **`...keypairs`** — `Keypair[]` (required) — Keypairs of signers **Source:** [src/base/transaction_base.ts:97](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L97) ### `feeBumpTransaction.signatureBase()` Returns the "signature base" of this transaction, which is the value that, when hashed, should be signed to create a signature that validators on the Stellar Network will accept. It is composed of a 4 prefix bytes followed by the xdr-encoded form of this transaction. ```ts signatureBase(): Buffer; ``` **Source:** [src/base/fee_bump_transaction.ts:90](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/fee_bump_transaction.ts#L90) ### `feeBumpTransaction.signHashX(preimage)` Add `hashX` signer preimage as signature. ```ts signHashX(preimage: string | Buffer): void; ``` **Parameters** - **`preimage`** — `string | Buffer` (required) — preimage of hash used as signer **Source:** [src/base/transaction_base.ts:204](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L204) ### `feeBumpTransaction.toEnvelope()` To envelope returns a xdr.TransactionEnvelope which can be submitted to the network. ```ts toEnvelope(): TransactionEnvelope; ``` **Source:** [src/base/fee_bump_transaction.ts:107](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/fee_bump_transaction.ts#L107) ### `feeBumpTransaction.toXDR()` Returns the transaction envelope as a base64-encoded XDR string. ```ts toXDR(): string; ``` **Source:** [src/base/transaction_base.ts:239](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L239) ## Int128 ```ts class Int128 extends LargeInt { constructor(...args: (string | number | bigint)[]); static MAX_VALUE: LargeInt; static MIN_VALUE: LargeInt; static defineIntBoundaries(): void; static fromString(value: string): LargeInt; static isValid(value: unknown): boolean; readonly size: number; readonly unsigned: boolean; slice(chunkSize: number): bigint[]; toBigInt(): bigint; toString(): string; } ``` **Source:** [src/base/numbers/int128.ts:3](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/int128.ts#L3) ### `new Int128(args)` Construct a signed 128-bit integer that can be XDR-encoded. ```ts constructor(...args: (string | number | bigint)[]); ``` **Parameters** - **`...args`** — `(string | number | bigint)[]` (required) — one or more slices to encode in big-endian format (i.e. earlier elements are higher bits) **Source:** [src/base/numbers/int128.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/int128.ts#L10) ### `Int128.MAX_VALUE` ```ts static MAX_VALUE: LargeInt; ``` **Source:** [types/stellar__js-xdr/index.d.ts:14](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L14) ### `Int128.MIN_VALUE` ```ts static MIN_VALUE: LargeInt; ``` **Source:** [types/stellar__js-xdr/index.d.ts:13](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L13) ### `Int128.defineIntBoundaries()` ```ts static defineIntBoundaries(): void; ``` **Source:** [types/stellar__js-xdr/index.d.ts:12](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L12) ### `Int128.fromString(value)` ```ts static fromString(value: string): LargeInt; ``` **Parameters** - **`value`** — `string` (required) **Source:** [types/stellar__js-xdr/index.d.ts:16](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L16) ### `Int128.isValid(value)` ```ts static isValid(value: unknown): boolean; ``` **Parameters** - **`value`** — `unknown` (required) **Source:** [types/stellar__js-xdr/index.d.ts:15](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L15) ### `int128.size` ```ts readonly size: number; ``` **Source:** [src/base/numbers/int128.ts:18](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/int128.ts#L18) ### `int128.unsigned` ```ts readonly unsigned: boolean; ``` **Source:** [src/base/numbers/int128.ts:14](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/int128.ts#L14) ### `int128.slice(chunkSize)` ```ts slice(chunkSize: number): bigint[]; ``` **Parameters** - **`chunkSize`** — `number` (required) **Source:** [types/stellar__js-xdr/index.d.ts:21](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L21) ### `int128.toBigInt()` ```ts toBigInt(): bigint; ``` **Source:** [types/stellar__js-xdr/index.d.ts:19](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L19) ### `int128.toString()` ```ts toString(): string; ``` **Source:** [types/stellar__js-xdr/index.d.ts:20](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L20) ## Int256 ```ts class Int256 extends LargeInt { constructor(...args: (string | number | bigint)[]); static MAX_VALUE: LargeInt; static MIN_VALUE: LargeInt; static defineIntBoundaries(): void; static fromString(value: string): LargeInt; static isValid(value: unknown): boolean; readonly size: number; readonly unsigned: boolean; slice(chunkSize: number): bigint[]; toBigInt(): bigint; toString(): string; } ``` **Source:** [src/base/numbers/int256.ts:3](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/int256.ts#L3) ### `new Int256(args)` Construct a signed 256-bit integer that can be XDR-encoded. ```ts constructor(...args: (string | number | bigint)[]); ``` **Parameters** - **`...args`** — `(string | number | bigint)[]` (required) — one or more slices to encode in big-endian format (i.e. earlier elements are higher bits) **Source:** [src/base/numbers/int256.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/int256.ts#L10) ### `Int256.MAX_VALUE` ```ts static MAX_VALUE: LargeInt; ``` **Source:** [types/stellar__js-xdr/index.d.ts:14](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L14) ### `Int256.MIN_VALUE` ```ts static MIN_VALUE: LargeInt; ``` **Source:** [types/stellar__js-xdr/index.d.ts:13](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L13) ### `Int256.defineIntBoundaries()` ```ts static defineIntBoundaries(): void; ``` **Source:** [types/stellar__js-xdr/index.d.ts:12](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L12) ### `Int256.fromString(value)` ```ts static fromString(value: string): LargeInt; ``` **Parameters** - **`value`** — `string` (required) **Source:** [types/stellar__js-xdr/index.d.ts:16](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L16) ### `Int256.isValid(value)` ```ts static isValid(value: unknown): boolean; ``` **Parameters** - **`value`** — `unknown` (required) **Source:** [types/stellar__js-xdr/index.d.ts:15](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L15) ### `int256.size` ```ts readonly size: number; ``` **Source:** [src/base/numbers/int256.ts:18](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/int256.ts#L18) ### `int256.unsigned` ```ts readonly unsigned: boolean; ``` **Source:** [src/base/numbers/int256.ts:14](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/int256.ts#L14) ### `int256.slice(chunkSize)` ```ts slice(chunkSize: number): bigint[]; ``` **Parameters** - **`chunkSize`** — `number` (required) **Source:** [types/stellar__js-xdr/index.d.ts:21](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L21) ### `int256.toBigInt()` ```ts toBigInt(): bigint; ``` **Source:** [types/stellar__js-xdr/index.d.ts:19](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L19) ### `int256.toString()` ```ts toString(): string; ``` **Source:** [types/stellar__js-xdr/index.d.ts:20](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L20) ## Memo `Memo` represents memos attached to transactions. ```ts class Memo { constructor(type: "none", value?: null); static fromXDRObject(object: Memo): Memo; static hash(hash: string | Buffer): Memo<"hash">; static id(id: string): Memo<"id">; static none(): Memo<"none">; static return(hash: string | Buffer): Memo<"return">; static text(text: string): Memo<"text">; type: T; value: MemoTypeToValue; toXDRObject(): Memo; } ``` **See also** - [Transactions concept](https://developers.stellar.org/docs/glossary/transactions/) **Source:** [src/base/memo.ts:63](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L63) ### `new Memo(type, value)` ```ts constructor(type: "none", value?: null); ``` **Parameters** - **`type`** — `"none"` (required) - **`value`** — `null` (optional) **Source:** [src/base/memo.ts:67](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L67) ### `Memo.fromXDRObject(object)` Returns `Memo` from XDR memo object. ```ts static fromXDRObject(object: Memo): Memo; ``` **Parameters** - **`object`** — `Memo` (required) — XDR memo object **Source:** [src/base/memo.ts:302](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L302) ### `Memo.hash(hash)` Creates and returns a `MemoHash` memo. ```ts static hash(hash: string | Buffer): Memo<"hash">; ``` **Parameters** - **`hash`** — `string | Buffer` (required) — 32 byte hash or hex encoded string **Source:** [src/base/memo.ts:260](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L260) ### `Memo.id(id)` Creates and returns a `MemoID` memo. ```ts static id(id: string): Memo<"id">; ``` **Parameters** - **`id`** — `string` (required) — 64-bit number represented as a string **Source:** [src/base/memo.ts:251](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L251) ### `Memo.none()` Returns an empty memo (`MemoNone`). ```ts static none(): Memo<"none">; ``` **Source:** [src/base/memo.ts:233](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L233) ### `Memo.return(hash)` Creates and returns a `MemoReturn` memo. ```ts static return(hash: string | Buffer): Memo<"return">; ``` **Parameters** - **`hash`** — `string | Buffer` (required) — 32 byte hash or hex encoded string **Source:** [src/base/memo.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L269) ### `Memo.text(text)` Creates and returns a `MemoText` memo. ```ts static text(text: string): Memo<"text">; ``` **Parameters** - **`text`** — `string` (required) — memo text **Source:** [src/base/memo.ts:242](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L242) ### `memo.type` Contains memo type: `MemoNone`, `MemoID`, `MemoText`, `MemoHash` or `MemoReturn` ```ts type: T; ``` **Source:** [src/base/memo.ts:107](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L107) ### `memo.value` Contains memo value: * `null` for `MemoNone`, * `string` for `MemoID`, * `Buffer` for `MemoText` after decoding using `fromXDRObject`, original value otherwise, * `Buffer` for `MemoHash`, `MemoReturn`. ```ts value: MemoTypeToValue; ``` **Source:** [src/base/memo.ts:122](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L122) ### `memo.toXDRObject()` Returns XDR memo object. ```ts toXDRObject(): Memo; ``` **Source:** [src/base/memo.ts:276](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L276) ## MemoHash Type of `Memo`. ```ts const MemoHash: "hash" ``` **Source:** [src/base/memo.ts:21](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L21) ## MemoID Type of `Memo`. ```ts const MemoID: "id" ``` **Source:** [src/base/memo.ts:13](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L13) ## MemoNone Type of `Memo`. ```ts const MemoNone: "none" ``` **Source:** [src/base/memo.ts:9](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L9) ## MemoReturn Type of `Memo`. ```ts const MemoReturn: "return" ``` **Source:** [src/base/memo.ts:25](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L25) ## MemoText Type of `Memo`. ```ts const MemoText: "text" ``` **Source:** [src/base/memo.ts:17](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L17) ## MemoType ```ts type MemoType = MemoTypeHash | MemoTypeID | MemoTypeNone | MemoTypeReturn | MemoTypeText ``` **Source:** [src/base/memo.ts:33](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L33) ## MemoType.Hash ```ts type Hash = MemoTypeHash ``` **Source:** [src/base/memo.ts:37](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L37) ## MemoType.ID ```ts type ID = MemoTypeID ``` **Source:** [src/base/memo.ts:35](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L35) ## MemoType.None ```ts type None = MemoTypeNone ``` **Source:** [src/base/memo.ts:34](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L34) ## MemoType.Return ```ts type Return = MemoTypeReturn ``` **Source:** [src/base/memo.ts:38](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L38) ## MemoType.Text ```ts type Text = MemoTypeText ``` **Source:** [src/base/memo.ts:36](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L36) ## MemoTypeHash ```ts type MemoTypeHash = typeof MemoHash ``` **Source:** [src/base/memo.ts:30](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L30) ## MemoTypeID ```ts type MemoTypeID = typeof MemoID ``` **Source:** [src/base/memo.ts:28](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L28) ## MemoTypeNone ```ts type MemoTypeNone = typeof MemoNone ``` **Source:** [src/base/memo.ts:27](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L27) ## MemoTypeReturn ```ts type MemoTypeReturn = typeof MemoReturn ``` **Source:** [src/base/memo.ts:31](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L31) ## MemoTypeText ```ts type MemoTypeText = typeof MemoText ``` **Source:** [src/base/memo.ts:29](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L29) ## MemoValue ```ts type MemoValue = Buffer | string | null ``` **Source:** [src/base/memo.ts:47](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/memo.ts#L47) ## MuxedAccount Represents a muxed account for transactions and operations. A muxed (or *multiplexed*) account (defined rigorously in [CAP-27](https://stellar.org/protocol/cap-27) and briefly in [SEP-23](https://stellar.org/protocol/sep-23)) is one that resolves a single Stellar `G...` account to many different underlying IDs. For example, you may have a single Stellar address for accounting purposes: GA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJVSGZ Yet would like to use it for 4 different family members: 1: MA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJUAAAAAAAAAAAAGZFQ 2: MA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJUAAAAAAAAAAAALIWQ 3: MA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJUAAAAAAAAAAAAPYHQ 4: MA7QYNF7SOWQ3GLR2BGMZEHXAVIRZA4KVWLTJJFC7MGXUA74P7UJUAAAAAAAAAAAAQLQQ This object makes it easy to create muxed accounts from regular accounts, duplicate them, get/set the underlying IDs, etc. without mucking around with the raw XDR. Because muxed accounts are purely an off-chain convention, they all share the sequence number tied to their underlying G... account. Thus, this object *requires* an `Account` instance to be passed in, so that muxed instances of an account can collectively modify the sequence number whenever a muxed account is used as the source of a `Transaction` with `TransactionBuilder`. ```ts class MuxedAccount { constructor(baseAccount: Account, id: string); static fromAddress(mAddress: string, sequenceNum: string): MuxedAccount; accountId(): string; baseAccount(): Account; equals(otherMuxedAccount: MuxedAccount): boolean; id(): string; incrementSequenceNumber(): void; sequenceNumber(): string; setId(id: string): MuxedAccount; toXDRObject(): MuxedAccount; } ``` **See also** - https://developers.stellar.org/docs/glossary/muxed-accounts/ **Source:** [src/base/muxed_account.ts:59](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/muxed_account.ts#L59) ### `new MuxedAccount(baseAccount, id)` ```ts constructor(baseAccount: Account, id: string); ``` **Parameters** - **`baseAccount`** — `Account` (required) — the `Account` instance representing the underlying G... address - **`id`** — `string` (required) — a stringified uint64 value that represents the ID of the muxed account **Source:** [src/base/muxed_account.ts:71](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/muxed_account.ts#L71) ### `MuxedAccount.fromAddress(mAddress, sequenceNum)` Parses an M-address into a MuxedAccount object. ```ts static fromAddress(mAddress: string, sequenceNum: string): MuxedAccount; ``` **Parameters** - **`mAddress`** — `string` (required) — an M-address to transform - **`sequenceNum`** — `string` (required) — the sequence number of the underlying `Account`, to use for the underlying base account `MuxedAccount.baseAccount`. If you're using the SDK, you can use `server.loadAccount` to fetch this if you don't know it. **Source:** [src/base/muxed_account.ts:95](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/muxed_account.ts#L95) ### `muxedAccount.accountId()` Returns the M-address representing this account's (G-address, ID). ```ts accountId(): string; ``` **Source:** [src/base/muxed_account.ts:114](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/muxed_account.ts#L114) ### `muxedAccount.baseAccount()` Returns the underlying account object shared among all muxed accounts with this Stellar address. ```ts baseAccount(): Account; ``` **Source:** [src/base/muxed_account.ts:107](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/muxed_account.ts#L107) ### `muxedAccount.equals(otherMuxedAccount)` Checks whether two muxed accounts are equal by comparing their M-addresses. ```ts equals(otherMuxedAccount: MuxedAccount): boolean; ``` **Parameters** - **`otherMuxedAccount`** — `MuxedAccount` (required) — the MuxedAccount to compare against **Source:** [src/base/muxed_account.ts:170](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/muxed_account.ts#L170) ### `muxedAccount.id()` Returns the uint64 ID of this muxed account as a string. ```ts id(): string; ``` **Source:** [src/base/muxed_account.ts:121](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/muxed_account.ts#L121) ### `muxedAccount.incrementSequenceNumber()` Increments the underlying account's sequence number by one. ```ts incrementSequenceNumber(): void; ``` **Source:** [src/base/muxed_account.ts:153](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/muxed_account.ts#L153) ### `muxedAccount.sequenceNumber()` Returns the stringified sequence number for the underlying account. ```ts sequenceNumber(): string; ``` **Source:** [src/base/muxed_account.ts:146](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/muxed_account.ts#L146) ### `muxedAccount.setId(id)` Updates the muxed account's ID, regenerating the M-address accordingly. ```ts setId(id: string): MuxedAccount; ``` **Parameters** - **`id`** — `string` (required) — a stringified uint64 value to set as the new muxed account ID **Source:** [src/base/muxed_account.ts:130](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/muxed_account.ts#L130) ### `muxedAccount.toXDRObject()` Returns the XDR object representing this muxed account's G-address and uint64 ID. ```ts toXDRObject(): MuxedAccount; ``` **Source:** [src/base/muxed_account.ts:161](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/muxed_account.ts#L161) ## Networks Contains passphrases for common networks: * `Networks.PUBLIC`: `Public Global Stellar Network ; September 2015` * `Networks.TESTNET`: `Test SDF Network ; September 2015` * `Networks.FUTURENET`: `Test SDF Future Network ; October 2022` * `Networks.SANDBOX`: `Local Sandbox Stellar Network ; September 2022` * `Networks.STANDALONE`: `Standalone Network ; February 2017` ```ts enum Networks ``` **Source:** [src/base/network.ts:9](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/network.ts#L9) ## Operation `Operation` class represents [operations](https://developers.stellar.org/docs/glossary/operations/) in Stellar network. Use one of static methods to create operations: * [`Operation.createAccount`](#operationcreateaccount) * [`Operation.payment`](#operationpayment) * [`Operation.pathPaymentStrictReceive`](#operationpathpaymentstrictreceive) * [`Operation.pathPaymentStrictSend`](#operationpathpaymentstrictsend) * [`Operation.manageSellOffer`](#operationmanageselloffer) * [`Operation.manageBuyOffer`](#operationmanagebuyoffer) * [`Operation.createPassiveSellOffer`](#operationcreatepassiveselloffer) * [`Operation.setOptions`](#operationsetoptions) * [`Operation.changeTrust`](#operationchangetrust) * [`Operation.allowTrust`](#operationallowtrust) * [`Operation.accountMerge`](#operationaccountmerge) * [`Operation.inflation`](#operationinflation) * [`Operation.manageData`](#operationmanagedata) * [`Operation.bumpSequence`](#operationbumpsequence) * [`Operation.createClaimableBalance`](#operationcreateclaimablebalance) * [`Operation.claimClaimableBalance`](#operationclaimclaimablebalance) * [`Operation.beginSponsoringFutureReserves`](#operationbeginsponsoringfuturereserves) * [`Operation.endSponsoringFutureReserves`](#operationendsponsoringfuturereserves) * [`Operation.revokeAccountSponsorship`](#operationrevokeaccountsponsorship) * [`Operation.revokeTrustlineSponsorship`](#operationrevoketrustlinesponsorship) * [`Operation.revokeOfferSponsorship`](#operationrevokeoffersponsorship) * [`Operation.revokeDataSponsorship`](#operationrevokedatasponsorship) * [`Operation.revokeClaimableBalanceSponsorship`](#operationrevokeclaimablebalancesponsorship) * [`Operation.revokeLiquidityPoolSponsorship`](#operationrevokeliquiditypoolsponsorship) * [`Operation.revokeSignerSponsorship`](#operationrevokesignersponsorship) * [`Operation.clawback`](#operationclawback) * [`Operation.clawbackClaimableBalance`](#operationclawbackclaimablebalance) * [`Operation.setTrustLineFlags`](#operationsettrustlineflags) * [`Operation.liquidityPoolDeposit`](#operationliquiditypooldeposit) * [`Operation.liquidityPoolWithdraw`](#operationliquiditypoolwithdraw) * [`Operation.invokeHostFunction`](#operationinvokehostfunction), which has the following additional "pseudo-operations" that make building host functions easier: - [`Operation.createStellarAssetContract`](#operationcreatestellarassetcontract) - [`Operation.invokeContractFunction`](#operationinvokecontractfunction) - [`Operation.createCustomContract`](#operationcreatecustomcontract) - [`Operation.uploadContractWasm`](#operationuploadcontractwasm) * `Operation.extendFootprintTtlOp` * [`Operation.restoreFootprint`](#operationrestorefootprint) ```ts class Operation { constructor(); static accountMerge: (opts: AccountMergeOpts) => Operation2; static allowTrust: (opts: AllowTrustOpts) => Operation2; static beginSponsoringFutureReserves: (opts: BeginSponsoringFutureReservesOpts) => Operation2; static bumpSequence: (opts: BumpSequenceOpts) => Operation2; static changeTrust: (opts: ChangeTrustOpts) => Operation2; static claimClaimableBalance: (opts: ClaimClaimableBalanceOpts = ...) => Operation2; static clawback: (opts: ClawbackOpts) => Operation2; static clawbackClaimableBalance: (opts: ClawbackClaimableBalanceOpts = ...) => Operation2; static createAccount: (opts: CreateAccountOpts) => Operation2; static createClaimableBalance: (opts: CreateClaimableBalanceOpts) => Operation2; static createCustomContract: (opts: CreateCustomContractOpts) => Operation2; static createPassiveSellOffer: (opts: CreatePassiveSellOfferOpts) => Operation2; static createStellarAssetContract: (opts: CreateStellarAssetContractOpts) => Operation2; static endSponsoringFutureReserves: (opts: EndSponsoringFutureReservesOpts = {}) => Operation2; static extendFootprintTtl: (opts: ExtendFootprintTtlOpts) => Operation2; static inflation: (opts: InflationOpts = {}) => Operation2; static invokeContractFunction: (opts: InvokeContractFunctionOpts) => Operation2; static invokeHostFunction: (opts: InvokeHostFunctionOpts) => Operation2; static liquidityPoolDeposit: (opts: LiquidityPoolDepositOpts = ...) => Operation2; static liquidityPoolWithdraw: (opts: LiquidityPoolWithdrawOpts = ...) => Operation2; static manageBuyOffer: (opts: ManageBuyOfferOpts) => Operation2; static manageData: (opts: ManageDataOpts) => Operation2; static manageSellOffer: (opts: ManageSellOfferOpts) => Operation2; static pathPaymentStrictReceive: (opts: PathPaymentStrictReceiveOpts) => Operation2; static pathPaymentStrictSend: (opts: PathPaymentStrictSendOpts) => Operation2; static payment: (opts: PaymentOpts) => Operation2; static restoreFootprint: (opts: RestoreFootprintOpts = {}) => Operation2; static revokeAccountSponsorship: (opts: RevokeAccountSponsorshipOpts = ...) => Operation2; static revokeClaimableBalanceSponsorship: (opts: RevokeClaimableBalanceSponsorshipOpts = ...) => Operation2; static revokeDataSponsorship: (opts: RevokeDataSponsorshipOpts = ...) => Operation2; static revokeLiquidityPoolSponsorship: (opts: RevokeLiquidityPoolSponsorshipOpts = ...) => Operation2; static revokeOfferSponsorship: (opts: RevokeOfferSponsorshipOpts = ...) => Operation2; static revokeSignerSponsorship: (opts: RevokeSignerSponsorshipOpts = ...) => Operation2; static revokeTrustlineSponsorship: (opts: RevokeTrustlineSponsorshipOpts = ...) => Operation2; static setOptions: (opts: SetOptionsOpts) => Operation2>; static setTrustLineFlags: (opts: SetTrustLineFlagsOpts) => Operation2; static uploadContractWasm: (opts: UploadContractWasmOpts) => Operation2; static fromXDRObject(operation: Operation2): T; } ``` **Source:** [src/base/operation.ts:131](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L131) ### `new Operation()` ```ts constructor(); ``` ### `Operation.accountMerge` ```ts static accountMerge: (opts: AccountMergeOpts) => Operation2; ``` **Source:** [src/base/operation.ts:436](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L436) ### `Operation.allowTrust` ```ts static allowTrust: (opts: AllowTrustOpts) => Operation2; ``` **Source:** [src/base/operation.ts:437](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L437) ### `Operation.beginSponsoringFutureReserves` ```ts static beginSponsoringFutureReserves: (opts: BeginSponsoringFutureReservesOpts) => Operation2; ``` **Source:** [src/base/operation.ts:453](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L453) ### `Operation.bumpSequence` ```ts static bumpSequence: (opts: BumpSequenceOpts) => Operation2; ``` **Source:** [src/base/operation.ts:438](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L438) ### `Operation.changeTrust` ```ts static changeTrust: (opts: ChangeTrustOpts) => Operation2; ``` **Source:** [src/base/operation.ts:439](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L439) ### `Operation.claimClaimableBalance` ```ts static claimClaimableBalance: (opts: ClaimClaimableBalanceOpts = ...) => Operation2; ``` **Source:** [src/base/operation.ts:442](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L442) ### `Operation.clawback` ```ts static clawback: (opts: ClawbackOpts) => Operation2; ``` **Source:** [src/base/operation.ts:463](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L463) ### `Operation.clawbackClaimableBalance` ```ts static clawbackClaimableBalance: (opts: ClawbackClaimableBalanceOpts = ...) => Operation2; ``` **Source:** [src/base/operation.ts:443](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L443) ### `Operation.createAccount` ```ts static createAccount: (opts: CreateAccountOpts) => Operation2; ``` **Source:** [src/base/operation.ts:440](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L440) ### `Operation.createClaimableBalance` ```ts static createClaimableBalance: (opts: CreateClaimableBalanceOpts) => Operation2; ``` **Source:** [src/base/operation.ts:441](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L441) ### `Operation.createCustomContract` ```ts static createCustomContract: (opts: CreateCustomContractOpts) => Operation2; ``` **Source:** [src/base/operation.ts:475](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L475) ### `Operation.createPassiveSellOffer` ```ts static createPassiveSellOffer: (opts: CreatePassiveSellOfferOpts) => Operation2; ``` **Source:** [src/base/operation.ts:444](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L444) ### `Operation.createStellarAssetContract` ```ts static createStellarAssetContract: (opts: CreateStellarAssetContractOpts) => Operation2; ``` **Source:** [src/base/operation.ts:473](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L473) ### `Operation.endSponsoringFutureReserves` ```ts static endSponsoringFutureReserves: (opts: EndSponsoringFutureReservesOpts = {}) => Operation2; ``` **Source:** [src/base/operation.ts:454](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L454) ### `Operation.extendFootprintTtl` ```ts static extendFootprintTtl: (opts: ExtendFootprintTtlOpts) => Operation2; ``` **Source:** [src/base/operation.ts:468](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L468) ### `Operation.inflation` ```ts static inflation: (opts: InflationOpts = {}) => Operation2; ``` **Source:** [src/base/operation.ts:445](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L445) ### `Operation.invokeContractFunction` ```ts static invokeContractFunction: (opts: InvokeContractFunctionOpts) => Operation2; ``` **Source:** [src/base/operation.ts:474](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L474) ### `Operation.invokeHostFunction` ```ts static invokeHostFunction: (opts: InvokeHostFunctionOpts) => Operation2; ``` **Source:** [src/base/operation.ts:467](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L467) ### `Operation.liquidityPoolDeposit` ```ts static liquidityPoolDeposit: (opts: LiquidityPoolDepositOpts = ...) => Operation2; ``` **Source:** [src/base/operation.ts:465](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L465) ### `Operation.liquidityPoolWithdraw` ```ts static liquidityPoolWithdraw: (opts: LiquidityPoolWithdrawOpts = ...) => Operation2; ``` **Source:** [src/base/operation.ts:466](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L466) ### `Operation.manageBuyOffer` ```ts static manageBuyOffer: (opts: ManageBuyOfferOpts) => Operation2; ``` **Source:** [src/base/operation.ts:448](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L448) ### `Operation.manageData` ```ts static manageData: (opts: ManageDataOpts) => Operation2; ``` **Source:** [src/base/operation.ts:446](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L446) ### `Operation.manageSellOffer` ```ts static manageSellOffer: (opts: ManageSellOfferOpts) => Operation2; ``` **Source:** [src/base/operation.ts:447](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L447) ### `Operation.pathPaymentStrictReceive` ```ts static pathPaymentStrictReceive: (opts: PathPaymentStrictReceiveOpts) => Operation2; ``` **Source:** [src/base/operation.ts:449](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L449) ### `Operation.pathPaymentStrictSend` ```ts static pathPaymentStrictSend: (opts: PathPaymentStrictSendOpts) => Operation2; ``` **Source:** [src/base/operation.ts:450](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L450) ### `Operation.payment` ```ts static payment: (opts: PaymentOpts) => Operation2; ``` **Source:** [src/base/operation.ts:451](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L451) ### `Operation.restoreFootprint` ```ts static restoreFootprint: (opts: RestoreFootprintOpts = {}) => Operation2; ``` **Source:** [src/base/operation.ts:469](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L469) ### `Operation.revokeAccountSponsorship` ```ts static revokeAccountSponsorship: (opts: RevokeAccountSponsorshipOpts = ...) => Operation2; ``` **Source:** [src/base/operation.ts:455](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L455) ### `Operation.revokeClaimableBalanceSponsorship` ```ts static revokeClaimableBalanceSponsorship: (opts: RevokeClaimableBalanceSponsorshipOpts = ...) => Operation2; ``` **Source:** [src/base/operation.ts:459](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L459) ### `Operation.revokeDataSponsorship` ```ts static revokeDataSponsorship: (opts: RevokeDataSponsorshipOpts = ...) => Operation2; ``` **Source:** [src/base/operation.ts:458](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L458) ### `Operation.revokeLiquidityPoolSponsorship` ```ts static revokeLiquidityPoolSponsorship: (opts: RevokeLiquidityPoolSponsorshipOpts = ...) => Operation2; ``` **Source:** [src/base/operation.ts:461](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L461) ### `Operation.revokeOfferSponsorship` ```ts static revokeOfferSponsorship: (opts: RevokeOfferSponsorshipOpts = ...) => Operation2; ``` **Source:** [src/base/operation.ts:457](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L457) ### `Operation.revokeSignerSponsorship` ```ts static revokeSignerSponsorship: (opts: RevokeSignerSponsorshipOpts = ...) => Operation2; ``` **Source:** [src/base/operation.ts:462](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L462) ### `Operation.revokeTrustlineSponsorship` ```ts static revokeTrustlineSponsorship: (opts: RevokeTrustlineSponsorshipOpts = ...) => Operation2; ``` **Source:** [src/base/operation.ts:456](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L456) ### `Operation.setOptions` ```ts static setOptions: (opts: SetOptionsOpts) => Operation2>; ``` **Source:** [src/base/operation.ts:452](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L452) ### `Operation.setTrustLineFlags` ```ts static setTrustLineFlags: (opts: SetTrustLineFlagsOpts) => Operation2; ``` **Source:** [src/base/operation.ts:464](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L464) ### `Operation.uploadContractWasm` ```ts static uploadContractWasm: (opts: UploadContractWasmOpts) => Operation2; ``` **Source:** [src/base/operation.ts:476](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L476) ### `Operation.fromXDRObject(operation)` Deconstructs the raw XDR operation object into the structured object that was used to create the operation (i.e. the `opts` parameter to most ops). ```ts static fromXDRObject(operation: Operation2): T; ``` **Parameters** - **`operation`** — `Operation2` (required) — An XDR Operation. **Source:** [src/base/operation.ts:139](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L139) ## Operation.AccountMerge ```ts type AccountMerge = AccountMergeResult ``` **Source:** [src/base/operation.ts:613](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L613) ## Operation.AllowTrust ```ts type AllowTrust = AllowTrustResult ``` **Source:** [src/base/operation.ts:612](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L612) ## Operation.BaseOperation ```ts type BaseOperation = _BaseOperation ``` **Source:** [src/base/operation.ts:601](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L601) ## Operation.BeginSponsoringFutureReserves ```ts type BeginSponsoringFutureReserves = BeginSponsoringFutureReservesResult ``` **Source:** [src/base/operation.ts:619](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L619) ## Operation.BumpSequence ```ts type BumpSequence = BumpSequenceResult ``` **Source:** [src/base/operation.ts:616](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L616) ## Operation.ChangeTrust ```ts type ChangeTrust = ChangeTrustResult ``` **Source:** [src/base/operation.ts:611](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L611) ## Operation.ClaimClaimableBalance ```ts type ClaimClaimableBalance = ClaimClaimableBalanceResult ``` **Source:** [src/base/operation.ts:618](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L618) ## Operation.Clawback ```ts type Clawback = ClawbackResult ``` **Source:** [src/base/operation.ts:631](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L631) ## Operation.ClawbackClaimableBalance ```ts type ClawbackClaimableBalance = ClawbackClaimableBalanceResult ``` **Source:** [src/base/operation.ts:632](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L632) ## Operation.CreateAccount ```ts type CreateAccount = CreateAccountResult ``` **Source:** [src/base/operation.ts:603](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L603) ## Operation.CreateClaimableBalance ```ts type CreateClaimableBalance = CreateClaimableBalanceResult ``` **Source:** [src/base/operation.ts:617](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L617) ## Operation.CreatePassiveSellOffer ```ts type CreatePassiveSellOffer = CreatePassiveSellOfferResult ``` **Source:** [src/base/operation.ts:607](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L607) ## Operation.EndSponsoringFutureReserves ```ts type EndSponsoringFutureReserves = EndSponsoringFutureReservesResult ``` **Source:** [src/base/operation.ts:621](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L621) ## Operation.ExtendFootprintTTL ```ts type ExtendFootprintTTL = ExtendFootprintTTLResult ``` **Source:** [src/base/operation.ts:637](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L637) ## Operation.Inflation ```ts type Inflation = InflationResult ``` **Source:** [src/base/operation.ts:614](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L614) ## Operation.InvokeHostFunction ```ts type InvokeHostFunction = InvokeHostFunctionResult ``` **Source:** [src/base/operation.ts:636](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L636) ## Operation.LiquidityPoolDeposit ```ts type LiquidityPoolDeposit = LiquidityPoolDepositResult ``` **Source:** [src/base/operation.ts:634](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L634) ## Operation.LiquidityPoolWithdraw ```ts type LiquidityPoolWithdraw = LiquidityPoolWithdrawResult ``` **Source:** [src/base/operation.ts:635](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L635) ## Operation.ManageBuyOffer ```ts type ManageBuyOffer = ManageBuyOfferResult ``` **Source:** [src/base/operation.ts:609](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L609) ## Operation.ManageData ```ts type ManageData = ManageDataResult ``` **Source:** [src/base/operation.ts:615](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L615) ## Operation.ManageSellOffer ```ts type ManageSellOffer = ManageSellOfferResult ``` **Source:** [src/base/operation.ts:608](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L608) ## Operation.PathPaymentStrictReceive ```ts type PathPaymentStrictReceive = PathPaymentStrictReceiveResult ``` **Source:** [src/base/operation.ts:605](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L605) ## Operation.PathPaymentStrictSend ```ts type PathPaymentStrictSend = PathPaymentStrictSendResult ``` **Source:** [src/base/operation.ts:606](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L606) ## Operation.Payment ```ts type Payment = PaymentResult ``` **Source:** [src/base/operation.ts:604](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L604) ## Operation.RestoreFootprint ```ts type RestoreFootprint = RestoreFootprintResult ``` **Source:** [src/base/operation.ts:638](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L638) ## Operation.RevokeAccountSponsorship ```ts type RevokeAccountSponsorship = RevokeAccountSponsorshipResult ``` **Source:** [src/base/operation.ts:622](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L622) ## Operation.RevokeClaimableBalanceSponsorship ```ts type RevokeClaimableBalanceSponsorship = RevokeClaimableBalanceSponsorshipResult ``` **Source:** [src/base/operation.ts:626](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L626) ## Operation.RevokeDataSponsorship ```ts type RevokeDataSponsorship = RevokeDataSponsorshipResult ``` **Source:** [src/base/operation.ts:625](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L625) ## Operation.RevokeLiquidityPoolSponsorship ```ts type RevokeLiquidityPoolSponsorship = RevokeLiquidityPoolSponsorshipResult ``` **Source:** [src/base/operation.ts:628](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L628) ## Operation.RevokeOfferSponsorship ```ts type RevokeOfferSponsorship = RevokeOfferSponsorshipResult ``` **Source:** [src/base/operation.ts:624](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L624) ## Operation.RevokeSignerSponsorship ```ts type RevokeSignerSponsorship = RevokeSignerSponsorshipResult ``` **Source:** [src/base/operation.ts:630](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L630) ## Operation.RevokeTrustlineSponsorship ```ts type RevokeTrustlineSponsorship = RevokeTrustlineSponsorshipResult ``` **Source:** [src/base/operation.ts:623](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L623) ## Operation.SetOptions ```ts type SetOptions = SetOptionsResult ``` **Source:** [src/base/operation.ts:610](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L610) ## Operation.SetTrustLineFlags ```ts type SetTrustLineFlags = SetTrustLineFlagsResult ``` **Source:** [src/base/operation.ts:633](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operation.ts#L633) ## OperationOptions ```ts type OperationOptions = AccountMergeOpts | AllowTrustOpts | BeginSponsoringFutureReservesOpts | BumpSequenceOpts | ChangeTrustOpts | ClaimClaimableBalanceOpts | ClawbackClaimableBalanceOpts | ClawbackOpts | CreateAccountOpts | CreateClaimableBalanceOpts | CreateCustomContractOpts | CreatePassiveSellOfferOpts | CreateStellarAssetContractOpts | EndSponsoringFutureReservesOpts | ExtendFootprintTtlOpts | InflationOpts | InvokeContractFunctionOpts | InvokeHostFunctionOpts | LiquidityPoolDepositOpts | LiquidityPoolWithdrawOpts | ManageBuyOfferOpts | ManageDataOpts | ManageSellOfferOpts | PathPaymentStrictReceiveOpts | PathPaymentStrictSendOpts | PaymentOpts | RestoreFootprintOpts | RevokeAccountSponsorshipOpts | RevokeClaimableBalanceSponsorshipOpts | RevokeDataSponsorshipOpts | RevokeLiquidityPoolSponsorshipOpts | RevokeOfferSponsorshipOpts | RevokeSignerSponsorshipOpts | RevokeTrustlineSponsorshipOpts | SetOptionsOpts | SetTrustLineFlagsOpts | UploadContractWasmOpts ``` **Source:** [src/base/operations/types.ts:311](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L311) ## OperationRecord Union of all possible operation objects returned by Operation.fromXDRObject. ```ts type OperationRecord = AccountMergeResult | AllowTrustResult | BeginSponsoringFutureReservesResult | BumpSequenceResult | ChangeTrustResult | ClaimClaimableBalanceResult | ClawbackClaimableBalanceResult | ClawbackResult | CreateAccountResult | CreateClaimableBalanceResult | CreatePassiveSellOfferResult | EndSponsoringFutureReservesResult | ExtendFootprintTTLResult | InflationResult | InvokeHostFunctionResult | LiquidityPoolDepositResult | LiquidityPoolWithdrawResult | ManageBuyOfferResult | ManageDataResult | ManageSellOfferResult | PathPaymentStrictReceiveResult | PathPaymentStrictSendResult | PaymentResult | RestoreFootprintResult | RevokeAccountSponsorshipResult | RevokeClaimableBalanceSponsorshipResult | RevokeDataSponsorshipResult | RevokeLiquidityPoolSponsorshipResult | RevokeOfferSponsorshipResult | RevokeSignerSponsorshipResult | RevokeTrustlineSponsorshipResult | SetOptionsResult | SetTrustLineFlagsResult ``` **Source:** [src/base/operations/types.ts:677](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L677) ## OperationType ```ts type OperationType = OperationType.AccountMerge | OperationType.AllowTrust | OperationType.BeginSponsoringFutureReserves | OperationType.BumpSequence | OperationType.ChangeTrust | OperationType.ClaimClaimableBalance | OperationType.Clawback | OperationType.ClawbackClaimableBalance | OperationType.CreateAccount | OperationType.CreateClaimableBalance | OperationType.CreatePassiveSellOffer | OperationType.EndSponsoringFutureReserves | OperationType.ExtendFootprintTTL | OperationType.Inflation | OperationType.InvokeHostFunction | OperationType.LiquidityPoolDeposit | OperationType.LiquidityPoolWithdraw | OperationType.ManageBuyOffer | OperationType.ManageData | OperationType.ManageSellOffer | OperationType.PathPaymentStrictReceive | OperationType.PathPaymentStrictSend | OperationType.Payment | OperationType.RestoreFootprint | OperationType.RevokeAccountSponsorship | OperationType.RevokeClaimableBalanceSponsorship | OperationType.RevokeDataSponsorship | OperationType.RevokeLiquidityPoolSponsorship | OperationType.RevokeOfferSponsorship | OperationType.RevokeSignerSponsorship | OperationType.RevokeTrustlineSponsorship | OperationType.SetOptions | OperationType.SetTrustLineFlags ``` **Source:** [src/base/operations/types.ts:354](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L354) ## OperationType.AccountMerge ```ts type AccountMerge = "accountMerge" ``` **Source:** [src/base/operations/types.ts:365](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L365) ## OperationType.AllowTrust ```ts type AllowTrust = "allowTrust" ``` **Source:** [src/base/operations/types.ts:364](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L364) ## OperationType.BeginSponsoringFutureReserves ```ts type BeginSponsoringFutureReserves = "beginSponsoringFutureReserves" ``` **Source:** [src/base/operations/types.ts:371](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L371) ## OperationType.BumpSequence ```ts type BumpSequence = "bumpSequence" ``` **Source:** [src/base/operations/types.ts:368](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L368) ## OperationType.ChangeTrust ```ts type ChangeTrust = "changeTrust" ``` **Source:** [src/base/operations/types.ts:363](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L363) ## OperationType.ClaimClaimableBalance ```ts type ClaimClaimableBalance = "claimClaimableBalance" ``` **Source:** [src/base/operations/types.ts:370](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L370) ## OperationType.Clawback ```ts type Clawback = "clawback" ``` **Source:** [src/base/operations/types.ts:383](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L383) ## OperationType.ClawbackClaimableBalance ```ts type ClawbackClaimableBalance = "clawbackClaimableBalance" ``` **Source:** [src/base/operations/types.ts:384](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L384) ## OperationType.CreateAccount ```ts type CreateAccount = "createAccount" ``` **Source:** [src/base/operations/types.ts:355](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L355) ## OperationType.CreateClaimableBalance ```ts type CreateClaimableBalance = "createClaimableBalance" ``` **Source:** [src/base/operations/types.ts:369](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L369) ## OperationType.CreatePassiveSellOffer ```ts type CreatePassiveSellOffer = "createPassiveSellOffer" ``` **Source:** [src/base/operations/types.ts:359](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L359) ## OperationType.EndSponsoringFutureReserves ```ts type EndSponsoringFutureReserves = "endSponsoringFutureReserves" ``` **Source:** [src/base/operations/types.ts:372](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L372) ## OperationType.ExtendFootprintTTL ```ts type ExtendFootprintTTL = "extendFootprintTtl" ``` **Source:** [src/base/operations/types.ts:389](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L389) ## OperationType.Inflation ```ts type Inflation = "inflation" ``` **Source:** [src/base/operations/types.ts:366](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L366) ## OperationType.InvokeHostFunction ```ts type InvokeHostFunction = "invokeHostFunction" ``` **Source:** [src/base/operations/types.ts:388](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L388) ## OperationType.LiquidityPoolDeposit ```ts type LiquidityPoolDeposit = "liquidityPoolDeposit" ``` **Source:** [src/base/operations/types.ts:386](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L386) ## OperationType.LiquidityPoolWithdraw ```ts type LiquidityPoolWithdraw = "liquidityPoolWithdraw" ``` **Source:** [src/base/operations/types.ts:387](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L387) ## OperationType.ManageBuyOffer ```ts type ManageBuyOffer = "manageBuyOffer" ``` **Source:** [src/base/operations/types.ts:361](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L361) ## OperationType.ManageData ```ts type ManageData = "manageData" ``` **Source:** [src/base/operations/types.ts:367](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L367) ## OperationType.ManageSellOffer ```ts type ManageSellOffer = "manageSellOffer" ``` **Source:** [src/base/operations/types.ts:360](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L360) ## OperationType.PathPaymentStrictReceive ```ts type PathPaymentStrictReceive = "pathPaymentStrictReceive" ``` **Source:** [src/base/operations/types.ts:357](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L357) ## OperationType.PathPaymentStrictSend ```ts type PathPaymentStrictSend = "pathPaymentStrictSend" ``` **Source:** [src/base/operations/types.ts:358](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L358) ## OperationType.Payment ```ts type Payment = "payment" ``` **Source:** [src/base/operations/types.ts:356](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L356) ## OperationType.RestoreFootprint ```ts type RestoreFootprint = "restoreFootprint" ``` **Source:** [src/base/operations/types.ts:390](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L390) ## OperationType.RevokeAccountSponsorship ```ts type RevokeAccountSponsorship = "revokeAccountSponsorship" ``` **Source:** [src/base/operations/types.ts:375](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L375) ## OperationType.RevokeClaimableBalanceSponsorship ```ts type RevokeClaimableBalanceSponsorship = "revokeClaimableBalanceSponsorship" ``` **Source:** [src/base/operations/types.ts:379](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L379) ## OperationType.RevokeDataSponsorship ```ts type RevokeDataSponsorship = "revokeDataSponsorship" ``` **Source:** [src/base/operations/types.ts:378](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L378) ## OperationType.RevokeLiquidityPoolSponsorship ```ts type RevokeLiquidityPoolSponsorship = "revokeLiquidityPoolSponsorship" ``` **Source:** [src/base/operations/types.ts:381](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L381) ## OperationType.RevokeOfferSponsorship ```ts type RevokeOfferSponsorship = "revokeOfferSponsorship" ``` **Source:** [src/base/operations/types.ts:377](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L377) ## OperationType.RevokeSignerSponsorship ```ts type RevokeSignerSponsorship = "revokeSignerSponsorship" ``` **Source:** [src/base/operations/types.ts:382](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L382) ## OperationType.RevokeSponsorship **Deprecated.** Never emitted by fromXDRObject — use the specific Revoke* types instead. ```ts type RevokeSponsorship = "revokeSponsorship" ``` **Source:** [src/base/operations/types.ts:374](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L374) ## OperationType.RevokeTrustlineSponsorship ```ts type RevokeTrustlineSponsorship = "revokeTrustlineSponsorship" ``` **Source:** [src/base/operations/types.ts:376](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L376) ## OperationType.SetOptions ```ts type SetOptions = "setOptions" ``` **Source:** [src/base/operations/types.ts:362](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L362) ## OperationType.SetTrustLineFlags ```ts type SetTrustLineFlags = "setTrustLineFlags" ``` **Source:** [src/base/operations/types.ts:385](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L385) ## ScInt Provides an easier way to manipulate large numbers for Stellar operations. You can instantiate this "**s**mart **c**ontract integer" value either from bigints, strings, or numbers (whole numbers, or this will throw). If you need to create a native BigInt from a list of integer "parts" (for example, you have a series of encoded 32-bit integers that represent a larger value), you can use the lower level abstraction `XdrLargeInt`. For example, you could do `new XdrLargeInt('u128', bytes...).toBigInt()`. ```ts class ScInt extends XdrLargeInt { constructor(value: string | number | bigint, opts?: { type?: ScIntType; [key: string]: unknown }); static getType(scvType: string): ScIntType | undefined; static isType(type: string): type is ScIntType; int: LargeInt; type: ScIntType; toBigInt(): bigint; toDuration(): ScVal; toI128(): ScVal; toI256(): ScVal; toI64(): ScVal; toJSON(): { type: string; value: string }; toNumber(): number; toScVal(): ScVal; toString(): string; toTimepoint(): ScVal; toU128(): ScVal; toU256(): ScVal; toU64(): ScVal; valueOf(): unknown; } ``` **Example** ```ts import { xdr, ScInt, scValToBigInt } from "@stellar/stellar-base"; // You have an ScVal from a contract and want to parse it into JS native. const value = xdr.ScVal.fromXDR(someXdr, "base64"); const bigi = scValToBigInt(value); // grab it as a BigInt let sci = new ScInt(bigi); sci.toNumber(); // gives native JS type (w/ size check) sci.toBigInt(); // gives the native BigInt value sci.toU64(); // gives ScValType-specific XDR constructs (with size checks) // You have a number and want to shove it into a contract. sci = new ScInt(0xdeadcafebabe); sci.toBigInt() // returns 244838016400062n sci.toNumber() // throws: too large // Pass any to e.g. a Contract.call(), conversion happens automatically // regardless of the initial type. const scValU128 = sci.toU128(); const scValI256 = sci.toI256(); const scValU64 = sci.toU64(); // Lots of ways to initialize: new ScInt("123456789123456789") new ScInt(123456789123456789n); new ScInt(1n << 140n); new ScInt(-42); new ScInt(scValToBigInt(scValU128)); // from above // If you know the type ahead of time (accessing `.raw` is faster than // conversions), you can specify the type directly (otherwise, it's // interpreted from the numbers you pass in): const i = new ScInt(123456789n, { type: "u256" }); // For example, you can use the underlying `sdk.U256` and convert it to an // `xdr.ScVal` directly like so: const scv = new xdr.ScVal.scvU256(i.raw); // Or reinterpret it as a different type (size permitting): const scv = i.toI64(); ``` **Source:** [src/base/numbers/sc_int.ts:63](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/sc_int.ts#L63) ### `new ScInt(value, opts)` ```ts constructor(value: string | number | bigint, opts?: { type?: ScIntType; [key: string]: unknown }); ``` **Parameters** - **`value`** — `string | number | bigint` (required) — a single, integer-like value which will be interpreted in the smallest appropriate XDR type supported by Stellar (64, 128, or 256 bit integer values). signed values are supported, though they are sanity-checked against `opts.type`. if you need 32-bit values, you can construct them directly without needing this wrapper, e.g. `xdr.ScVal.scvU32(1234)`. - **`opts`** — `{ type?: ScIntType; [key: string]: unknown }` (optional) — an optional object controlling optional parameters - `type`: specify a type ('i64', 'u64', 'i128', 'u128', 'i256', or 'u256') to override the default type selection. If not specified, the smallest type that fits the value is used. **Source:** [src/base/numbers/sc_int.ts:76](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/sc_int.ts#L76) ### `ScInt.getType(scvType)` Convert the raw `ScValType` string (e.g. 'scvI128', generated by the XDR) to a type description for `XdrLargeInt` construction (e.g. 'i128') ```ts static getType(scvType: string): ScIntType | undefined; ``` **Parameters** - **`scvType`** — `string` (required) — the `xdr.ScValType` as a string **Returns** the corresponding `ScIntType` if it's an integer type, or `undefined` if it's not an integer type **Source:** [src/base/numbers/xdr_large_int.ts:322](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L322) ### `ScInt.isType(type)` Returns true if the given string is a valid XDR large integer type name. ```ts static isType(type: string): type is ScIntType; ``` **Parameters** - **`type`** — `string` (required) **Source:** [src/base/numbers/xdr_large_int.ts:298](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L298) ### `scInt.int` ```ts int: LargeInt; ``` **Source:** [src/base/numbers/xdr_large_int.ts:36](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L36) ### `scInt.type` ```ts type: ScIntType; ``` **Source:** [src/base/numbers/xdr_large_int.ts:37](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L37) ### `scInt.toBigInt()` Converts to a native BigInt. ```ts toBigInt(): bigint; ``` **Source:** [src/base/numbers/xdr_large_int.ts:116](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L116) ### `scInt.toDuration()` The integer encoded with `ScValType = Duration` ```ts toDuration(): ScVal; ``` **Source:** [src/base/numbers/xdr_large_int.ts:152](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L152) ### `scInt.toI128()` The integer encoded with `ScValType = I128`. ```ts toI128(): ScVal; ``` **Throws** - if the value cannot fit in 128 bits **Source:** [src/base/numbers/xdr_large_int.ts:164](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L164) ### `scInt.toI256()` The integer encoded with `ScValType = I256` ```ts toI256(): ScVal; ``` **Throws** - if the value cannot fit in a signed 256-bit integer **Source:** [src/base/numbers/xdr_large_int.ts:204](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L204) ### `scInt.toI64()` The integer encoded with `ScValType = I64`. ```ts toI64(): ScVal; ``` **Throws** - if the value cannot fit in 64 bits **Source:** [src/base/numbers/xdr_large_int.ts:125](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L125) ### `scInt.toJSON()` Returns a JSON-friendly representation with `value` and `type` fields. ```ts toJSON(): { type: string; value: string }; ``` **Source:** [src/base/numbers/xdr_large_int.ts:284](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L284) ### `scInt.toNumber()` Converts to a native JS number. ```ts toNumber(): number; ``` **Throws** - if the value can't fit into a Number **Source:** [src/base/numbers/xdr_large_int.ts:103](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L103) ### `scInt.toScVal()` The smallest interpretation of the stored value ```ts toScVal(): ScVal; ``` **Source:** [src/base/numbers/xdr_large_int.ts:247](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L247) ### `scInt.toString()` Returns the string representation of this integer. ```ts toString(): string; ``` **Source:** [src/base/numbers/xdr_large_int.ts:279](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L279) ### `scInt.toTimepoint()` The integer encoded with `ScValType = Timepoint` ```ts toTimepoint(): ScVal; ``` **Source:** [src/base/numbers/xdr_large_int.ts:144](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L144) ### `scInt.toU128()` The integer encoded with `ScValType = U128`. ```ts toU128(): ScVal; ``` **Throws** - if the value cannot fit in 128 bits **Source:** [src/base/numbers/xdr_large_int.ts:187](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L187) ### `scInt.toU256()` The integer encoded with `ScValType = U256` Note: No size check needed - U256 is the largest unsigned type. ```ts toU256(): ScVal; ``` **Source:** [src/base/numbers/xdr_large_int.ts:229](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L229) ### `scInt.toU64()` The integer encoded with `ScValType = U64` ```ts toU64(): ScVal; ``` **Source:** [src/base/numbers/xdr_large_int.ts:136](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L136) ### `scInt.valueOf()` Returns the primitive value of this integer. ```ts valueOf(): unknown; ``` **Source:** [src/base/numbers/xdr_large_int.ts:274](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L274) ## ScIntType ```ts type ScIntType = "duration" | "i64" | "i128" | "i256" | "timepoint" | "u64" | "u128" | "u256" ``` **Source:** [src/base/numbers/xdr_large_int.ts:18](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L18) ## Signer ```ts type Signer = Signer.Ed25519PublicKey | Signer.Ed25519SignedPayload | Signer.PreAuthTx | Signer.Sha256Hash ``` **Source:** [src/base/operations/types.ts:453](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L453) ## Signer.Ed25519PublicKey ```ts interface Ed25519PublicKey { ed25519PublicKey: string; weight?: number; } ``` **Source:** [src/base/operations/types.ts:454](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L454) ### `ed25519PublicKey.ed25519PublicKey` ```ts ed25519PublicKey: string; ``` **Source:** [src/base/operations/types.ts:455](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L455) ### `ed25519PublicKey.weight` ```ts weight?: number; ``` **Source:** [src/base/operations/types.ts:456](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L456) ## Signer.Ed25519SignedPayload ```ts interface Ed25519SignedPayload { ed25519SignedPayload: string; weight?: number; } ``` **Source:** [src/base/operations/types.ts:466](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L466) ### `ed25519SignedPayload.ed25519SignedPayload` ```ts ed25519SignedPayload: string; ``` **Source:** [src/base/operations/types.ts:467](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L467) ### `ed25519SignedPayload.weight` ```ts weight?: number; ``` **Source:** [src/base/operations/types.ts:468](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L468) ## Signer.PreAuthTx ```ts interface PreAuthTx { preAuthTx: Buffer; weight?: number; } ``` **Source:** [src/base/operations/types.ts:462](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L462) ### `preAuthTx.preAuthTx` ```ts preAuthTx: Buffer; ``` **Source:** [src/base/operations/types.ts:463](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L463) ### `preAuthTx.weight` ```ts weight?: number; ``` **Source:** [src/base/operations/types.ts:464](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L464) ## Signer.Sha256Hash ```ts interface Sha256Hash { sha256Hash: Buffer; weight?: number; } ``` **Source:** [src/base/operations/types.ts:458](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L458) ### `sha256Hash.sha256Hash` ```ts sha256Hash: Buffer; ``` **Source:** [src/base/operations/types.ts:459](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L459) ### `sha256Hash.weight` ```ts weight?: number; ``` **Source:** [src/base/operations/types.ts:460](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L460) ## SorobanFees Soroban fee parameters for resource-limited transactions. ```ts interface SorobanFees { instructions: number; readBytes: number; resourceFee: bigint; writeBytes: number; } ``` **Source:** [src/base/transaction_builder.ts:49](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L49) ### `sorobanFees.instructions` The number of instructions executed by the transaction. ```ts instructions: number; ``` **Source:** [src/base/transaction_builder.ts:51](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L51) ### `sorobanFees.readBytes` The number of bytes read from the ledger by the transaction. ```ts readBytes: number; ``` **Source:** [src/base/transaction_builder.ts:53](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L53) ### `sorobanFees.resourceFee` The fee to be paid for the transaction, in stroops. ```ts resourceFee: bigint; ``` **Source:** [src/base/transaction_builder.ts:57](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L57) ### `sorobanFees.writeBytes` The number of bytes written to the ledger by the transaction. ```ts writeBytes: number; ``` **Source:** [src/base/transaction_builder.ts:55](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L55) ## TimeoutInfinite ```ts const TimeoutInfinite: 0 ``` **See also** - - `TransactionBuilder.setTimeout` - [Timeout](https://developers.stellar.org/api/resources/transactions/post/) **Source:** [src/base/transaction_builder.ts:44](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L44) ## Transaction Use `TransactionBuilder` to build a transaction object. If you have an object or base64-encoded string of the transaction envelope XDR, use `TransactionBuilder.fromXDR`. Once a Transaction has been created, its attributes and operations should not be changed. You should only add signatures (using `Transaction.sign`) to a Transaction object before submitting to the network or forwarding on to additional signers. ```ts class Transaction { constructor(envelope: string | TransactionEnvelope, networkPassphrase: string); extraSigners: SignerKey[] | undefined; fee: string; ledgerBounds: { maxLedger: number; minLedger: number } | undefined; memo: Memo; minAccountSequence: string | undefined; minAccountSequenceAge: bigint | undefined; minAccountSequenceLedgerGap: number | undefined; networkPassphrase: string; operations: OperationRecord[]; sequence: string; signatures: DecoratedSignature[]; source: string; timeBounds: { maxTime: string; minTime: string } | undefined; tx: TTx; addDecoratedSignature(signature: DecoratedSignature): void; addSignature(publicKey: string = "", signature: string = ""): void; getClaimableBalanceId(opIndex: number): string; getKeypairSignature(keypair: Keypair): string; hash(): Buffer; sign(...keypairs: Keypair[]): void; signatureBase(): Buffer; signHashX(preimage: string | Buffer): void; toEnvelope(): TransactionEnvelope; toXDR(): string; } ``` **Source:** [src/base/transaction.ts:25](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction.ts#L25) ### `new Transaction(envelope, networkPassphrase)` ```ts constructor(envelope: string | TransactionEnvelope, networkPassphrase: string); ``` **Parameters** - **`envelope`** — `string | TransactionEnvelope` (required) — transaction envelope object or base64 encoded string - **`networkPassphrase`** — `string` (required) — passphrase of the target stellar network (e.g. "Public Global Stellar Network ; September 2015") **Source:** [src/base/transaction.ts:45](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction.ts#L45) ### `transaction.extraSigners` Array of extra signers as XDR objects; use `SignerKey.encodeSignerKey` to convert to StrKey strings. ```ts extraSigners: SignerKey[] | undefined; ``` **Source:** [src/base/transaction.ts:199](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction.ts#L199) ### `transaction.fee` The total fee for this transaction, in stroops. ```ts fee: string; ``` **Source:** [src/base/transaction_base.ts:76](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L76) ### `transaction.ledgerBounds` The ledger bounds for this transaction, with `minLedger` (uint32) and `maxLedger` (uint32, or 0 for no upper bound). ```ts ledgerBounds: { maxLedger: number; minLedger: number } | undefined; ``` **Source:** [src/base/transaction.ts:164](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction.ts#L164) ### `transaction.memo` The memo attached to this transaction. ```ts memo: Memo; ``` **Source:** [src/base/transaction.ts:231](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction.ts#L231) ### `transaction.minAccountSequence` The minimum account sequence (64-bit, as a string). ```ts minAccountSequence: string | undefined; ``` **Source:** [src/base/transaction.ts:172](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction.ts#L172) ### `transaction.minAccountSequenceAge` The minimum account sequence age (64-bit number of seconds). ```ts minAccountSequenceAge: bigint | undefined; ``` **Source:** [src/base/transaction.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction.ts#L180) ### `transaction.minAccountSequenceLedgerGap` The minimum account sequence ledger gap (32-bit number of ledgers). ```ts minAccountSequenceLedgerGap: number | undefined; ``` **Source:** [src/base/transaction.ts:188](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction.ts#L188) ### `transaction.networkPassphrase` The network passphrase for this transaction. ```ts networkPassphrase: string; ``` **Source:** [src/base/transaction_base.ts:85](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L85) ### `transaction.operations` The list of operations in this transaction. ```ts operations: OperationRecord[]; ``` **Source:** [src/base/transaction.ts:223](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction.ts#L223) ### `transaction.sequence` The sequence number for this transaction. ```ts sequence: string; ``` **Source:** [src/base/transaction.ts:207](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction.ts#L207) ### `transaction.signatures` The list of signatures for this transaction. ```ts signatures: DecoratedSignature[]; ``` **Source:** [src/base/transaction_base.ts:35](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L35) ### `transaction.source` The source account for this transaction. ```ts source: string; ``` **Source:** [src/base/transaction.ts:215](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction.ts#L215) ### `transaction.timeBounds` The time bounds for this transaction, with `minTime` and `maxTime` as 64-bit unix timestamps (strings). ```ts timeBounds: { maxTime: string; minTime: string } | undefined; ``` **Source:** [src/base/transaction.ts:153](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction.ts#L153) ### `transaction.tx` The underlying XDR transaction object. Returns a defensive copy so that external mutations cannot alter the transaction that will be signed or serialized. ```ts tx: TTx; ``` **Throws** - if the internal transaction is not a recognized XDR type **Source:** [src/base/transaction_base.ts:51](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L51) ### `transaction.addDecoratedSignature(signature)` Add a decorated signature directly to the transaction envelope. ```ts addDecoratedSignature(signature: DecoratedSignature): void; ``` **Parameters** - **`signature`** — `DecoratedSignature` (required) — raw signature to add **See also** - - Keypair.signDecorated - Keypair.signPayloadDecorated **Source:** [src/base/transaction_base.ts:196](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L196) ### `transaction.addSignature(publicKey, signature)` Add a signature to the transaction. Useful when a party wants to pre-sign a transaction but doesn't want to give access to their secret keys. This will also verify whether the signature is valid. Here's how you would use this feature to solicit multiple signatures. - Use `TransactionBuilder` to build a new transaction. - Make sure to set a long enough timeout on that transaction to give your signers enough time to sign! - Once you build the transaction, use `transaction.toXDR()` to get the base64-encoded XDR string. - _Warning!_ Once you've built this transaction, don't submit any other transactions onto your account! Doing so will invalidate this pre-compiled transaction! - Send this XDR string to your other parties. They can use the instructions for [getKeypairSignature](#getKeypairSignature) to sign the transaction. - They should send you back their `publicKey` and the `signature` string from [getKeypairSignature](#getKeypairSignature), both of which you pass to this function. ```ts addSignature(publicKey: string = "", signature: string = ""): void; ``` **Parameters** - **`publicKey`** — `string` (optional) (default: `""`) — the public key of the signer - **`signature`** — `string` (optional) (default: `""`) — the base64 value of the signature XDR **Source:** [src/base/transaction_base.ts:156](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L156) ### `transaction.getClaimableBalanceId(opIndex)` Calculate the claimable balance ID for an operation within the transaction. ```ts getClaimableBalanceId(opIndex: number): string; ``` **Parameters** - **`opIndex`** — `number` (required) — the index of the CreateClaimableBalance op **Throws** - for invalid `opIndex` value, if op at `opIndex` is not `CreateClaimableBalance`, or for general XDR un/marshalling failures **See also** - https://github.com/stellar/go/blob/d712346e61e288d450b0c08038c158f8848cc3e4/txnbuild/transaction.go#L392-L435 **Source:** [src/base/transaction.ts:321](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction.ts#L321) ### `transaction.getKeypairSignature(keypair)` Signs a transaction with the given `Keypair`. Useful if someone sends you a transaction XDR for you to sign and return (see [addSignature](#addSignature) for more information). When you get a transaction XDR to sign.... - Instantiate a `Transaction` object with the XDR - Use `Keypair` to generate a keypair object for your Stellar seed. - Run `getKeypairSignature` with that keypair - Send back the signature along with your publicKey (not your secret seed!) Example: ```javascript // `transactionXDR` is a string from the person generating the transaction const transaction = new Transaction(transactionXDR, networkPassphrase); const keypair = Keypair.fromSecret(myStellarSeed); return transaction.getKeypairSignature(keypair); ``` Returns the base64-encoded signature string for the given keypair. ```ts getKeypairSignature(keypair: Keypair): string; ``` **Parameters** - **`keypair`** — `Keypair` (required) — Keypair of signer **Source:** [src/base/transaction_base.ts:129](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L129) ### `transaction.hash()` Returns a hash for this transaction, suitable for signing. ```ts hash(): Buffer; ``` **Source:** [src/base/transaction_base.ts:222](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L222) ### `transaction.sign(keypairs)` Signs the transaction with the given `Keypair`. ```ts sign(...keypairs: Keypair[]): void; ``` **Parameters** - **`...keypairs`** — `Keypair[]` (required) — Keypairs of signers **Source:** [src/base/transaction_base.ts:97](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L97) ### `transaction.signatureBase()` Returns the "signature base" of this transaction, which is the value that, when hashed, should be signed to create a signature that validators on the Stellar Network will accept. It is composed of a 4 prefix bytes followed by the xdr-encoded form of this transaction. ```ts signatureBase(): Buffer; ``` **Source:** [src/base/transaction.ts:246](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction.ts#L246) ### `transaction.signHashX(preimage)` Add `hashX` signer preimage as signature. ```ts signHashX(preimage: string | Buffer): void; ``` **Parameters** - **`preimage`** — `string | Buffer` (required) — preimage of hash used as signer **Source:** [src/base/transaction_base.ts:204](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L204) ### `transaction.toEnvelope()` To envelope returns a xdr.TransactionEnvelope which can be submitted to the network. ```ts toEnvelope(): TransactionEnvelope; ``` **Source:** [src/base/transaction.ts:279](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction.ts#L279) ### `transaction.toXDR()` Returns the transaction envelope as a base64-encoded XDR string. ```ts toXDR(): string; ``` **Source:** [src/base/transaction_base.ts:239](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_base.ts#L239) ## TransactionBuilder

Transaction builder helps constructs a new [`Transaction`](#transaction) using the given `Account` as the transaction's "source account". The transaction will use the current sequence number of the given account as its sequence number and increment the given account's sequence number by one. The given source account must include a private key for signing the transaction or an error will be thrown.

Operations can be added to the transaction via their corresponding builder methods, and each returns the TransactionBuilder object so they can be chained together. After adding the desired operations, call the `build()` method on the `TransactionBuilder` to return a fully constructed `Transaction` that can be signed. The returned transaction will contain the sequence number of the source account and include the signature from the source account.

Be careful about unsubmitted transactions! When you build a transaction, `stellar-sdk` automatically increments the source account's sequence number. If you end up not submitting this transaction and submitting another one instead, it'll fail due to the sequence number being wrong. So if you decide not to use a built transaction, make sure to update the source account's sequence number with [Server.loadAccount](https://stellar.github.io/js-stellar-sdk/Server.html#loadAccount) before creating another transaction.

The following code example creates a new transaction with `Operation.createAccount` and `Operation.payment` operations. The Transaction's source account first funds `destinationA`, then sends a payment to `destinationB`. The built transaction is then signed by `sourceKeypair`.

``` var transaction = new TransactionBuilder(source, { fee, networkPassphrase: Networks.TESTNET }) .addOperation(Operation.createAccount({ destination: destinationA, startingBalance: "20" })) // <- funds and creates destinationA .addOperation(Operation.payment({ destination: destinationB, amount: "100", asset: Asset.native() })) // <- sends 100 XLM to destinationB .setTimeout(30) .build(); transaction.sign(sourceKeypair); ``` ```ts class TransactionBuilder { constructor(sourceAccount: Account | MuxedAccount, opts: TransactionBuilderOptions = ...); static buildFeeBumpTransaction(feeSource: string | Keypair, baseFee: string, innerTx: Transaction, networkPassphrase: string): FeeBumpTransaction; static cloneFrom(tx: Transaction, opts: Partial = {}): TransactionBuilder; static fromXDR(envelope: string | TransactionEnvelope, networkPassphrase: string): Transaction | FeeBumpTransaction; baseFee: string; extraSigners: string[] | null; ledgerbounds: { maxLedger?: number; minLedger?: number } | null; memo: Memo; minAccountSequence: string | null; minAccountSequenceAge: bigint | null; minAccountSequenceLedgerGap: number | null; networkPassphrase: string | null; operations: Operation2[]; sorobanData: SorobanTransactionData | null; source: Account | MuxedAccount; timebounds: { maxTime?: string | number | Date; minTime?: string | number | Date } | null; addMemo(memo: Memo): TransactionBuilder; addOperation(operation: Operation2): TransactionBuilder; addOperationAt(operation: Operation2, index: number): TransactionBuilder; addSacTransferOperation(destination: string, asset: Asset, amount: string | bigint, sorobanFees?: SorobanFees): TransactionBuilder; build(): Transaction; clearOperationAt(index: number): TransactionBuilder; clearOperations(): TransactionBuilder; hasV2Preconditions(): boolean; setExtraSigners(extraSigners: string[]): TransactionBuilder; setLedgerbounds(minLedger: number, maxLedger: number): TransactionBuilder; setMinAccountSequence(minAccountSequence: string): TransactionBuilder; setMinAccountSequenceAge(durationInSeconds: bigint): TransactionBuilder; setMinAccountSequenceLedgerGap(gap: number): TransactionBuilder; setNetworkPassphrase(networkPassphrase: string): TransactionBuilder; setSorobanData(sorobanData: string | SorobanTransactionData): TransactionBuilder; setTimebounds(minEpochOrDate: number | Date, maxEpochOrDate: number | Date): TransactionBuilder; setTimeout(timeoutSeconds: number): TransactionBuilder; } ``` **Source:** [src/base/transaction_builder.ts:152](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L152) ### `new TransactionBuilder(sourceAccount, opts)` ```ts constructor(sourceAccount: Account | MuxedAccount, opts: TransactionBuilderOptions = ...); ``` **Parameters** - **`sourceAccount`** — `Account | MuxedAccount` (required) — source account for this transaction - **`opts`** — `TransactionBuilderOptions` (optional) (default: `...`) — options object (see `TransactionBuilderOptions`) **Source:** [src/base/transaction_builder.ts:173](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L173) ### `TransactionBuilder.buildFeeBumpTransaction(feeSource, baseFee, innerTx, networkPassphrase)` Builds a `FeeBumpTransaction`, enabling you to resubmit an existing transaction with a higher fee. ```ts static buildFeeBumpTransaction(feeSource: string | Keypair, baseFee: string, innerTx: Transaction, networkPassphrase: string): FeeBumpTransaction; ``` **Parameters** - **`feeSource`** — `string | Keypair` (required) — account paying for the transaction, in the form of either a Keypair (only the public key is used) or an account ID (in G... or M... form, but refer to `withMuxing`) - **`baseFee`** — `string` (required) — max fee willing to pay per operation in inner transaction (**in stroops**) - **`innerTx`** — `Transaction` (required) — `Transaction` to be bumped by the fee bump transaction - **`networkPassphrase`** — `string` (required) — passphrase of the target Stellar network (e.g. "Public Global Stellar Network ; September 2015", see `Networks`) TODO: Alongside the next major version bump, this type signature can be changed to be less awkward: accept a MuxedAccount as the `feeSource` rather than a keypair or string. Your fee-bump amount should be `>= 10x` the original fee. **See also** - https://developers.stellar.org/docs/glossary/fee-bumps/#replace-by-fee **Source:** [src/base/transaction_builder.ts:1091](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L1091) ### `TransactionBuilder.cloneFrom(tx, opts)` Creates a builder instance using an existing `Transaction` as a template, ignoring any existing envelope signatures. Note that the sequence number WILL be cloned, so EITHER this transaction or the one it was cloned from will be valid. This is useful in situations where you are constructing a transaction in pieces and need to make adjustments as you go (for example, when filling out Soroban resource information). ```ts static cloneFrom(tx: Transaction, opts: Partial = {}): TransactionBuilder; ``` **Parameters** - **`tx`** — `Transaction` (required) — a "template" transaction to clone exactly - **`opts`** — `Partial` (optional) (default: `{}`) — additional options to override the clone, e.g. `{fee: '1000'}` will override the existing base fee derived from `tx` (see the `TransactionBuilder` constructor for detailed options) **Warning:** This does not clone the transaction's `xdr.SorobanTransactionData` (if applicable), use `SorobanDataBuilder` and `TransactionBuilder.setSorobanData` as needed, instead. TODO: This cannot clone `FeeBumpTransaction`s, yet. **Source:** [src/base/transaction_builder.ts:280](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L280) ### `TransactionBuilder.fromXDR(envelope, networkPassphrase)` Build a `Transaction` or `FeeBumpTransaction` from an xdr.TransactionEnvelope. ```ts static fromXDR(envelope: string | TransactionEnvelope, networkPassphrase: string): Transaction | FeeBumpTransaction; ``` **Parameters** - **`envelope`** — `string | TransactionEnvelope` (required) — The transaction envelope object or base64 encoded string. - **`networkPassphrase`** — `string` (required) — The network passphrase of the target Stellar network (e.g. "Public Global Stellar Network ; September 2015"), see `Networks`. **Source:** [src/base/transaction_builder.ts:1202](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L1202) ### `transactionBuilder.baseFee` ```ts baseFee: string; ``` **Source:** [src/base/transaction_builder.ts:155](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L155) ### `transactionBuilder.extraSigners` ```ts extraSigners: string[] | null; ``` **Source:** [src/base/transaction_builder.ts:164](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L164) ### `transactionBuilder.ledgerbounds` ```ts ledgerbounds: { maxLedger?: number; minLedger?: number } | null; ``` **Source:** [src/base/transaction_builder.ts:160](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L160) ### `transactionBuilder.memo` ```ts memo: Memo; ``` **Source:** [src/base/transaction_builder.ts:165](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L165) ### `transactionBuilder.minAccountSequence` ```ts minAccountSequence: string | null; ``` **Source:** [src/base/transaction_builder.ts:161](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L161) ### `transactionBuilder.minAccountSequenceAge` ```ts minAccountSequenceAge: bigint | null; ``` **Source:** [src/base/transaction_builder.ts:162](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L162) ### `transactionBuilder.minAccountSequenceLedgerGap` ```ts minAccountSequenceLedgerGap: number | null; ``` **Source:** [src/base/transaction_builder.ts:163](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L163) ### `transactionBuilder.networkPassphrase` ```ts networkPassphrase: string | null; ``` **Source:** [src/base/transaction_builder.ts:166](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L166) ### `transactionBuilder.operations` ```ts operations: Operation2[]; ``` **Source:** [src/base/transaction_builder.ts:154](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L154) ### `transactionBuilder.sorobanData` ```ts sorobanData: SorobanTransactionData | null; ``` **Source:** [src/base/transaction_builder.ts:167](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L167) ### `transactionBuilder.source` ```ts source: Account | MuxedAccount; ``` **Source:** [src/base/transaction_builder.ts:153](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L153) ### `transactionBuilder.timebounds` ```ts timebounds: { maxTime?: string | number | Date; minTime?: string | number | Date } | null; ``` **Source:** [src/base/transaction_builder.ts:156](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L156) ### `transactionBuilder.addMemo(memo)` Adds a memo to the transaction. ```ts addMemo(memo: Memo): TransactionBuilder; ``` **Parameters** - **`memo`** — `Memo` (required) — `Memo` object **Source:** [src/base/transaction_builder.ts:393](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L393) ### `transactionBuilder.addOperation(operation)` Adds an operation to the transaction. ```ts addOperation(operation: Operation2): TransactionBuilder; ``` **Parameters** - **`operation`** — `Operation2` (required) — The xdr operation object, use `Operation` static methods. **Source:** [src/base/transaction_builder.ts:355](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L355) ### `transactionBuilder.addOperationAt(operation, index)` Adds an operation to the transaction at a specific index. ```ts addOperationAt(operation: Operation2, index: number): TransactionBuilder; ``` **Parameters** - **`operation`** — `Operation2` (required) — The xdr operation object to add, use `Operation` static methods. - **`index`** — `number` (required) — The index at which to insert the operation. **Source:** [src/base/transaction_builder.ts:366](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L366) ### `transactionBuilder.addSacTransferOperation(destination, asset, amount, sorobanFees)` Creates and adds an invoke host function operation for transferring SAC tokens. This method removes the need for simulation by handling the creation of the appropriate authorization entries and ledger footprint for the transfer operation. ```ts addSacTransferOperation(destination: string, asset: Asset, amount: string | bigint, sorobanFees?: SorobanFees): TransactionBuilder; ``` **Parameters** - **`destination`** — `string` (required) — the address of the recipient of the SAC transfer (should be a valid Stellar address or contract ID) - **`asset`** — `Asset` (required) — the SAC asset to be transferred - **`amount`** — `string | bigint` (required) — the amount of tokens to be transferred in 7 decimals. IE 1 token with 7 decimals of precision would be represented as "1_0000000" - **`sorobanFees`** — `SorobanFees` (optional) — optional Soroban fees for the transaction to override the default fees used **Source:** [src/base/transaction_builder.ts:700](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L700) ### `transactionBuilder.build()` Builds the transaction and increments the source account's sequence number by 1. ```ts build(): Transaction; ``` **Source:** [src/base/transaction_builder.ts:920](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L920) ### `transactionBuilder.clearOperationAt(index)` Removes the operation at the specified index from the transaction. ```ts clearOperationAt(index: number): TransactionBuilder; ``` **Parameters** - **`index`** — `number` (required) — The index of the operation to remove. **Source:** [src/base/transaction_builder.ts:384](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L384) ### `transactionBuilder.clearOperations()` Removes the operations from the builder (useful when cloning). ```ts clearOperations(): TransactionBuilder; ``` **Source:** [src/base/transaction_builder.ts:374](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L374) ### `transactionBuilder.hasV2Preconditions()` Checks whether any v2 preconditions have been set on this builder. ```ts hasV2Preconditions(): boolean; ``` **Source:** [src/base/transaction_builder.ts:1059](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L1059) ### `transactionBuilder.setExtraSigners(extraSigners)` For the transaction to be valid, there must be a signature corresponding to every Signer in this array, even if the signature is not otherwise required by the sourceAccount or operations. Internally this will set the `extraSigners` precondition. ```ts setExtraSigners(extraSigners: string[]): TransactionBuilder; ``` **Parameters** - **`extraSigners`** — `string[]` (required) — required extra signers (as `StrKey`s) **Source:** [src/base/transaction_builder.ts:635](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L635) ### `transactionBuilder.setLedgerbounds(minLedger, maxLedger)` If you want to prepare a transaction which will only be valid within some range of ledgers, you can set a ledgerbounds precondition. Internally this will set the `minLedger` and `maxLedger` preconditions. ```ts setLedgerbounds(minLedger: number, maxLedger: number): TransactionBuilder; ``` **Parameters** - **`minLedger`** — `number` (required) — The minimum ledger this transaction is valid at or after. Cannot be negative. If the value is `0` (the default), the transaction is valid immediately. - **`maxLedger`** — `number` (required) — The maximum ledger this transaction is valid before. Cannot be negative. If the value is `0`, the transaction is valid indefinitely. **Source:** [src/base/transaction_builder.ts:523](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L523) ### `transactionBuilder.setMinAccountSequence(minAccountSequence)` If you want to prepare a transaction which will be valid only while the account sequence number is `minAccountSequence <= sourceAccountSequence < tx.seqNum` Note that after execution the account's sequence number is always raised to `tx.seqNum`. Internally this will set the `minAccountSequence` precondition. ```ts setMinAccountSequence(minAccountSequence: string): TransactionBuilder; ``` **Parameters** - **`minAccountSequence`** — `string` (required) — The minimum source account sequence number this transaction is valid for. If the value is `0` (the default), the transaction is valid when `sourceAccount`'s sequence number `== tx.seqNum - 1`. **Source:** [src/base/transaction_builder.ts:560](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L560) ### `transactionBuilder.setMinAccountSequenceAge(durationInSeconds)` For the transaction to be valid, the current ledger time must be at least `minAccountSequenceAge` greater than sourceAccount's `sequenceTime`. Internally this will set the `minAccountSequenceAge` precondition. ```ts setMinAccountSequenceAge(durationInSeconds: bigint): TransactionBuilder; ``` **Parameters** - **`durationInSeconds`** — `bigint` (required) — The minimum amount of time between source account sequence time and the ledger time when this transaction will become valid. If the value is `0`, the transaction is unrestricted by the account sequence age. Cannot be negative. **Source:** [src/base/transaction_builder.ts:582](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L582) ### `transactionBuilder.setMinAccountSequenceLedgerGap(gap)` For the transaction to be valid, the current ledger number must be at least `minAccountSequenceLedgerGap` greater than sourceAccount's ledger sequence. Internally this will set the `minAccountSequenceLedgerGap` precondition. ```ts setMinAccountSequenceLedgerGap(gap: number): TransactionBuilder; ``` **Parameters** - **`gap`** — `number` (required) — The minimum number of ledgers between source account sequence and the ledger number when this transaction will become valid. If the value is `0`, the transaction is unrestricted by the account sequence ledger. Cannot be negative. **Source:** [src/base/transaction_builder.ts:611](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L611) ### `transactionBuilder.setNetworkPassphrase(networkPassphrase)` Set network passphrase for the Transaction that will be built. ```ts setNetworkPassphrase(networkPassphrase: string): TransactionBuilder; ``` **Parameters** - **`networkPassphrase`** — `string` (required) — passphrase of the target Stellar network (e.g. "Public Global Stellar Network ; September 2015"). **Source:** [src/base/transaction_builder.ts:661](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L661) ### `transactionBuilder.setSorobanData(sorobanData)` Sets the transaction's internal Soroban transaction data (resources, footprint, etc.). For non-contract(non-Soroban) transactions, this setting has no effect. In the case of Soroban transactions, this is either an instance of `xdr.SorobanTransactionData` or a base64-encoded string of said structure. This is usually obtained from the simulation response based on a transaction with a Soroban operation (e.g. `Operation.invokeHostFunction`, providing necessary resource and storage footprint estimations for contract invocation. ```ts setSorobanData(sorobanData: string | SorobanTransactionData): TransactionBuilder; ``` **Parameters** - **`sorobanData`** — `string | SorobanTransactionData` (required) — the `xdr.SorobanTransactionData` as a raw xdr object or a base64 string to be decoded **See also** - `SorobanDataBuilder` **Source:** [src/base/transaction_builder.ts:683](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L683) ### `transactionBuilder.setTimebounds(minEpochOrDate, maxEpochOrDate)` If you want to prepare a transaction which will become valid at some point in the future, or be invalid after some time, you can set a timebounds precondition. Internally this will set the `minTime`, and `maxTime` preconditions. Conflicts with `setTimeout`, so use one or the other. ```ts setTimebounds(minEpochOrDate: number | Date, maxEpochOrDate: number | Date): TransactionBuilder; ``` **Parameters** - **`minEpochOrDate`** — `number | Date` (required) — Either a JS Date object, or a number of UNIX epoch seconds. The transaction is valid after this timestamp. Can't be negative. If the value is `0`, the transaction is valid immediately. - **`maxEpochOrDate`** — `number | Date` (required) — Either a JS Date object, or a number of UNIX epoch seconds. The transaction is valid until this timestamp. Can't be negative. If the value is `0`, the transaction is valid indefinitely. **Source:** [src/base/transaction_builder.ts:474](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L474) ### `transactionBuilder.setTimeout(timeoutSeconds)` Sets a timeout precondition on the transaction. Because of the distributed nature of the Stellar network it is possible that the status of your transaction will be determined after a long time if the network is highly congested. If you want to be sure to receive the status of the transaction within a given period you should set the time bounds with `maxTime` on the transaction (this is what `setTimeout` does internally; if there's `minTime` set but no `maxTime` it will be added). A call to `TransactionBuilder.setTimeout` is **required** if Transaction does not have `max_time` set. If you don't want to set timeout, use `TimeoutInfinite`. In general you should set `TimeoutInfinite` only in smart contracts. Please note that Horizon may still return 504 Gateway Timeout error, even for short timeouts. In such case you need to resubmit the same transaction again without making any changes to receive a status. This method is using the machine system time (UTC), make sure it is set correctly. ```ts setTimeout(timeoutSeconds: number): TransactionBuilder; ``` **Parameters** - **`timeoutSeconds`** — `number` (required) — Number of seconds the transaction is good. Can't be negative. If the value is `TimeoutInfinite`, the transaction is good indefinitely. **See also** - - `TimeoutInfinite` - https://developers.stellar.org/docs/tutorials/handling-errors/ **Source:** [src/base/transaction_builder.ts:427](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/transaction_builder.ts#L427) ## TrustLineFlag ```ts type TrustLineFlag = TrustLineFlag.authorize | TrustLineFlag.authorizeToMaintainLiabilities | TrustLineFlag.deauthorize ``` **Source:** [src/base/operations/types.ts:442](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L442) ## TrustLineFlag.authorize ```ts type authorize = 1 ``` **Source:** [src/base/operations/types.ts:444](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L444) ## TrustLineFlag.authorizeToMaintainLiabilities ```ts type authorizeToMaintainLiabilities = 2 ``` **Source:** [src/base/operations/types.ts:445](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L445) ## TrustLineFlag.deauthorize ```ts type deauthorize = 0 ``` **Source:** [src/base/operations/types.ts:443](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/operations/types.ts#L443) ## Uint128 ```ts class Uint128 extends LargeInt { constructor(...args: (string | number | bigint)[]); static MAX_VALUE: LargeInt; static MIN_VALUE: LargeInt; static defineIntBoundaries(): void; static fromString(value: string): LargeInt; static isValid(value: unknown): boolean; readonly size: number; readonly unsigned: boolean; slice(chunkSize: number): bigint[]; toBigInt(): bigint; toString(): string; } ``` **Source:** [src/base/numbers/uint128.ts:3](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/uint128.ts#L3) ### `new Uint128(args)` Construct an unsigned 128-bit integer that can be XDR-encoded. ```ts constructor(...args: (string | number | bigint)[]); ``` **Parameters** - **`...args`** — `(string | number | bigint)[]` (required) — one or more slices to encode in big-endian format (i.e. earlier elements are higher bits) **Source:** [src/base/numbers/uint128.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/uint128.ts#L10) ### `Uint128.MAX_VALUE` ```ts static MAX_VALUE: LargeInt; ``` **Source:** [types/stellar__js-xdr/index.d.ts:14](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L14) ### `Uint128.MIN_VALUE` ```ts static MIN_VALUE: LargeInt; ``` **Source:** [types/stellar__js-xdr/index.d.ts:13](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L13) ### `Uint128.defineIntBoundaries()` ```ts static defineIntBoundaries(): void; ``` **Source:** [types/stellar__js-xdr/index.d.ts:12](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L12) ### `Uint128.fromString(value)` ```ts static fromString(value: string): LargeInt; ``` **Parameters** - **`value`** — `string` (required) **Source:** [types/stellar__js-xdr/index.d.ts:16](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L16) ### `Uint128.isValid(value)` ```ts static isValid(value: unknown): boolean; ``` **Parameters** - **`value`** — `unknown` (required) **Source:** [types/stellar__js-xdr/index.d.ts:15](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L15) ### `uint128.size` ```ts readonly size: number; ``` **Source:** [src/base/numbers/uint128.ts:18](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/uint128.ts#L18) ### `uint128.unsigned` ```ts readonly unsigned: boolean; ``` **Source:** [src/base/numbers/uint128.ts:14](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/uint128.ts#L14) ### `uint128.slice(chunkSize)` ```ts slice(chunkSize: number): bigint[]; ``` **Parameters** - **`chunkSize`** — `number` (required) **Source:** [types/stellar__js-xdr/index.d.ts:21](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L21) ### `uint128.toBigInt()` ```ts toBigInt(): bigint; ``` **Source:** [types/stellar__js-xdr/index.d.ts:19](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L19) ### `uint128.toString()` ```ts toString(): string; ``` **Source:** [types/stellar__js-xdr/index.d.ts:20](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L20) ## Uint256 ```ts class Uint256 extends LargeInt { constructor(...args: (string | number | bigint)[]); static MAX_VALUE: LargeInt; static MIN_VALUE: LargeInt; static defineIntBoundaries(): void; static fromString(value: string): LargeInt; static isValid(value: unknown): boolean; readonly size: number; readonly unsigned: boolean; slice(chunkSize: number): bigint[]; toBigInt(): bigint; toString(): string; } ``` **Source:** [src/base/numbers/uint256.ts:3](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/uint256.ts#L3) ### `new Uint256(args)` Construct an unsigned 256-bit integer that can be XDR-encoded. ```ts constructor(...args: (string | number | bigint)[]); ``` **Parameters** - **`...args`** — `(string | number | bigint)[]` (required) — one or more slices to encode in big-endian format (i.e. earlier elements are higher bits) **Source:** [src/base/numbers/uint256.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/uint256.ts#L10) ### `Uint256.MAX_VALUE` ```ts static MAX_VALUE: LargeInt; ``` **Source:** [types/stellar__js-xdr/index.d.ts:14](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L14) ### `Uint256.MIN_VALUE` ```ts static MIN_VALUE: LargeInt; ``` **Source:** [types/stellar__js-xdr/index.d.ts:13](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L13) ### `Uint256.defineIntBoundaries()` ```ts static defineIntBoundaries(): void; ``` **Source:** [types/stellar__js-xdr/index.d.ts:12](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L12) ### `Uint256.fromString(value)` ```ts static fromString(value: string): LargeInt; ``` **Parameters** - **`value`** — `string` (required) **Source:** [types/stellar__js-xdr/index.d.ts:16](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L16) ### `Uint256.isValid(value)` ```ts static isValid(value: unknown): boolean; ``` **Parameters** - **`value`** — `unknown` (required) **Source:** [types/stellar__js-xdr/index.d.ts:15](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L15) ### `uint256.size` ```ts readonly size: number; ``` **Source:** [src/base/numbers/uint256.ts:18](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/uint256.ts#L18) ### `uint256.unsigned` ```ts readonly unsigned: boolean; ``` **Source:** [src/base/numbers/uint256.ts:14](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/uint256.ts#L14) ### `uint256.slice(chunkSize)` ```ts slice(chunkSize: number): bigint[]; ``` **Parameters** - **`chunkSize`** — `number` (required) **Source:** [types/stellar__js-xdr/index.d.ts:21](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L21) ### `uint256.toBigInt()` ```ts toBigInt(): bigint; ``` **Source:** [types/stellar__js-xdr/index.d.ts:19](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L19) ### `uint256.toString()` ```ts toString(): string; ``` **Source:** [types/stellar__js-xdr/index.d.ts:20](https://github.com/stellar/js-stellar-sdk/blob/master/types/stellar__js-xdr/index.d.ts#L20) ## XdrLargeInt A wrapper class to represent large XDR-encodable integers. This operates at a lower level than `ScInt` by forcing you to specify the type / width / size in bits of the integer you're targeting, regardless of the input value(s) you provide. ```ts class XdrLargeInt { constructor(type: ScIntType, values: XdrLargeIntValues); static getType(scvType: string): ScIntType | undefined; static isType(type: string): type is ScIntType; int: LargeInt; type: ScIntType; toBigInt(): bigint; toDuration(): ScVal; toI128(): ScVal; toI256(): ScVal; toI64(): ScVal; toJSON(): { type: string; value: string }; toNumber(): number; toScVal(): ScVal; toString(): string; toTimepoint(): ScVal; toU128(): ScVal; toU256(): ScVal; toU64(): ScVal; valueOf(): unknown; } ``` **Source:** [src/base/numbers/xdr_large_int.ts:35](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L35) ### `new XdrLargeInt(type, values)` ```ts constructor(type: ScIntType, values: XdrLargeIntValues); ``` **Parameters** - **`type`** — `ScIntType` (required) — specifies a data type to use to represent the integer, one of: 'i64', 'u64', 'i128', 'u128', 'i256', 'u256', 'timepoint', and 'duration' (see `XdrLargeInt.isType`) - **`values`** — `XdrLargeIntValues` (required) — a list of integer-like values interpreted in big-endian order **Source:** [src/base/numbers/xdr_large_int.ts:45](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L45) ### `XdrLargeInt.getType(scvType)` Convert the raw `ScValType` string (e.g. 'scvI128', generated by the XDR) to a type description for `XdrLargeInt` construction (e.g. 'i128') ```ts static getType(scvType: string): ScIntType | undefined; ``` **Parameters** - **`scvType`** — `string` (required) — the `xdr.ScValType` as a string **Returns** the corresponding `ScIntType` if it's an integer type, or `undefined` if it's not an integer type **Source:** [src/base/numbers/xdr_large_int.ts:322](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L322) ### `XdrLargeInt.isType(type)` Returns true if the given string is a valid XDR large integer type name. ```ts static isType(type: string): type is ScIntType; ``` **Parameters** - **`type`** — `string` (required) **Source:** [src/base/numbers/xdr_large_int.ts:298](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L298) ### `xdrLargeInt.int` ```ts int: LargeInt; ``` **Source:** [src/base/numbers/xdr_large_int.ts:36](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L36) ### `xdrLargeInt.type` ```ts type: ScIntType; ``` **Source:** [src/base/numbers/xdr_large_int.ts:37](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L37) ### `xdrLargeInt.toBigInt()` Converts to a native BigInt. ```ts toBigInt(): bigint; ``` **Source:** [src/base/numbers/xdr_large_int.ts:116](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L116) ### `xdrLargeInt.toDuration()` The integer encoded with `ScValType = Duration` ```ts toDuration(): ScVal; ``` **Source:** [src/base/numbers/xdr_large_int.ts:152](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L152) ### `xdrLargeInt.toI128()` The integer encoded with `ScValType = I128`. ```ts toI128(): ScVal; ``` **Throws** - if the value cannot fit in 128 bits **Source:** [src/base/numbers/xdr_large_int.ts:164](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L164) ### `xdrLargeInt.toI256()` The integer encoded with `ScValType = I256` ```ts toI256(): ScVal; ``` **Throws** - if the value cannot fit in a signed 256-bit integer **Source:** [src/base/numbers/xdr_large_int.ts:204](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L204) ### `xdrLargeInt.toI64()` The integer encoded with `ScValType = I64`. ```ts toI64(): ScVal; ``` **Throws** - if the value cannot fit in 64 bits **Source:** [src/base/numbers/xdr_large_int.ts:125](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L125) ### `xdrLargeInt.toJSON()` Returns a JSON-friendly representation with `value` and `type` fields. ```ts toJSON(): { type: string; value: string }; ``` **Source:** [src/base/numbers/xdr_large_int.ts:284](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L284) ### `xdrLargeInt.toNumber()` Converts to a native JS number. ```ts toNumber(): number; ``` **Throws** - if the value can't fit into a Number **Source:** [src/base/numbers/xdr_large_int.ts:103](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L103) ### `xdrLargeInt.toScVal()` The smallest interpretation of the stored value ```ts toScVal(): ScVal; ``` **Source:** [src/base/numbers/xdr_large_int.ts:247](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L247) ### `xdrLargeInt.toString()` Returns the string representation of this integer. ```ts toString(): string; ``` **Source:** [src/base/numbers/xdr_large_int.ts:279](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L279) ### `xdrLargeInt.toTimepoint()` The integer encoded with `ScValType = Timepoint` ```ts toTimepoint(): ScVal; ``` **Source:** [src/base/numbers/xdr_large_int.ts:144](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L144) ### `xdrLargeInt.toU128()` The integer encoded with `ScValType = U128`. ```ts toU128(): ScVal; ``` **Throws** - if the value cannot fit in 128 bits **Source:** [src/base/numbers/xdr_large_int.ts:187](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L187) ### `xdrLargeInt.toU256()` The integer encoded with `ScValType = U256` Note: No size check needed - U256 is the largest unsigned type. ```ts toU256(): ScVal; ``` **Source:** [src/base/numbers/xdr_large_int.ts:229](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L229) ### `xdrLargeInt.toU64()` The integer encoded with `ScValType = U64` ```ts toU64(): ScVal; ``` **Source:** [src/base/numbers/xdr_large_int.ts:136](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L136) ### `xdrLargeInt.valueOf()` Returns the primitive value of this integer. ```ts valueOf(): unknown; ``` **Source:** [src/base/numbers/xdr_large_int.ts:274](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/xdr_large_int.ts#L274) ## cereal ```ts const cereal: { XdrReader: typeof XdrReader; XdrWriter: typeof XdrWriter } ``` **Source:** [src/base/jsxdr.ts:7](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/jsxdr.ts#L7) ## decodeAddressToMuxedAccount Converts a Stellar address (in G... or M... form) to an `xdr.MuxedAccount` structure, using the ed25519 representation when possible. This supports full muxed accounts, where an `M...` address will resolve to both its underlying `G...` address and an integer ID. ```ts decodeAddressToMuxedAccount(address: string): MuxedAccount ``` **Parameters** - **`address`** — `string` (required) — G... or M... address to encode into XDR **Source:** [src/base/util/decode_encode_muxed_account.ts:13](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/util/decode_encode_muxed_account.ts#L13) ## encodeMuxedAccount Transform a Stellar address (G...) and an ID into its XDR representation. ```ts encodeMuxedAccount(address: string, id: string): MuxedAccount ``` **Parameters** - **`address`** — `string` (required) — a Stellar G... address - **`id`** — `string` (required) — a Uint64 ID represented as a string **Source:** [src/base/util/decode_encode_muxed_account.ts:52](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/util/decode_encode_muxed_account.ts#L52) ## encodeMuxedAccountToAddress Converts an xdr.MuxedAccount to its StrKey representation. Returns the "M..." string representation if there is a muxing ID within the object, or the "G..." representation otherwise. ```ts encodeMuxedAccountToAddress(muxedAccount: MuxedAccount): string ``` **Parameters** - **`muxedAccount`** — `MuxedAccount` (required) — raw account to stringify **See also** - https://stellar.org/protocol/sep-23 **Source:** [src/base/util/decode_encode_muxed_account.ts:33](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/util/decode_encode_muxed_account.ts#L33) ## extractBaseAddress Extracts the underlying base (G...) address from an M-address. ```ts extractBaseAddress(address: string): string ``` **Parameters** - **`address`** — `string` (required) — an account address (either M... or G...) **Source:** [src/base/util/decode_encode_muxed_account.ts:74](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/util/decode_encode_muxed_account.ts#L74) ## scValToBigInt Transforms an opaque `xdr.ScVal` into a native bigint, if possible. If you then want to use this in the abstractions provided by this module, you can pass it to the constructor of `XdrLargeInt`. ```ts scValToBigInt(scv: ScVal): bigint ``` **Parameters** - **`scv`** — `ScVal` (required) — the XDR smart contract value to convert **Throws** - if the `scv` input value doesn't represent an integer **Example** ```ts let scv = contract.call("add", x, y); // assume it returns an xdr.ScVal let bigi = scValToBigInt(scv); new ScInt(bigi); // if you don't care about types, and new XdrLargeInt('i128', bigi); // if you do ``` **Source:** [src/base/numbers/index.ts:31](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/numbers/index.ts#L31) # Source: docs/reference/core-xdr.md # Core / XDR ## hash Computes the SHA-256 hash of the given data. ```ts hash(data: string | Buffer): Buffer ``` **Parameters** - **`data`** — `string | Buffer` (required) — the data to hash **Source:** [src/base/hashing.ts:8](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/hashing.ts#L8) # Source: docs/reference/core-soroban-primitives.md # Core / Soroban Primitives ## Address ```ts class Address { constructor(address: string); static account(buffer: Buffer): Address; static claimableBalance(buffer: Buffer): Address; static contract(buffer: Buffer): Address; static fromScAddress(scAddress: ScAddress): Address; static fromScVal(scVal: ScVal): Address; static fromString(address: string): Address; static liquidityPool(buffer: Buffer): Address; static muxedAccount(buffer: Buffer): Address; readonly type: AddressType; toBuffer(): Buffer; toScAddress(): ScAddress; toScVal(): ScVal; toString(): string; } ``` **Source:** [src/base/address.ts:20](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/address.ts#L20) ### `new Address(address)` ```ts constructor(address: string); ``` **Parameters** - **`address`** — `string` (required) — a `StrKey` of the address value **Source:** [src/base/address.ts:27](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/address.ts#L27) ### `Address.account(buffer)` Creates a new account Address object from a buffer of raw bytes. ```ts static account(buffer: Buffer): Address; ``` **Parameters** - **`buffer`** — `Buffer` (required) — The bytes of an address to parse. **Source:** [src/base/address.ts:62](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/address.ts#L62) ### `Address.claimableBalance(buffer)` Creates a new claimable balance Address object from a buffer of raw bytes. ```ts static claimableBalance(buffer: Buffer): Address; ``` **Parameters** - **`buffer`** — `Buffer` (required) — The bytes of a claimable balance ID to parse. **Source:** [src/base/address.ts:80](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/address.ts#L80) ### `Address.contract(buffer)` Creates a new contract Address object from a buffer of raw bytes. ```ts static contract(buffer: Buffer): Address; ``` **Parameters** - **`buffer`** — `Buffer` (required) — The bytes of an address to parse. **Source:** [src/base/address.ts:71](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/address.ts#L71) ### `Address.fromScAddress(scAddress)` Convert this from an xdr.ScAddress type ```ts static fromScAddress(scAddress: ScAddress): Address; ``` **Parameters** - **`scAddress`** — `ScAddress` (required) — The xdr.ScAddress type to parse **Source:** [src/base/address.ts:116](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/address.ts#L116) ### `Address.fromScVal(scVal)` Convert this from an xdr.ScVal type. ```ts static fromScVal(scVal: ScVal): Address; ``` **Parameters** - **`scVal`** — `ScVal` (required) — The xdr.ScVal type to parse **Source:** [src/base/address.ts:107](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/address.ts#L107) ### `Address.fromString(address)` Parses a string and returns an Address object. ```ts static fromString(address: string): Address; ``` **Parameters** - **`address`** — `string` (required) — The address to parse. ex. `GB3KJPLFUYN5VL6R3GU3EGCGVCKFDSD7BEDX42HWG5BWFKB3KQGJJRMA` **Source:** [src/base/address.ts:53](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/address.ts#L53) ### `Address.liquidityPool(buffer)` Creates a new liquidity pool Address object from a buffer of raw bytes. ```ts static liquidityPool(buffer: Buffer): Address; ``` **Parameters** - **`buffer`** — `Buffer` (required) — The bytes of an LP ID to parse. **Source:** [src/base/address.ts:89](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/address.ts#L89) ### `Address.muxedAccount(buffer)` Creates a new muxed account Address object from a buffer of raw bytes. ```ts static muxedAccount(buffer: Buffer): Address; ``` **Parameters** - **`buffer`** — `Buffer` (required) — The bytes of an address to parse. **Source:** [src/base/address.ts:98](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/address.ts#L98) ### `address.type` Return the type of this address. ```ts readonly type: AddressType; ``` **Source:** [src/base/address.ts:219](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/address.ts#L219) ### `address.toBuffer()` Return the raw public key bytes for this address. ```ts toBuffer(): Buffer; ``` **Source:** [src/base/address.ts:212](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/address.ts#L212) ### `address.toScAddress()` Convert this Address to an xdr.ScAddress type. ```ts toScAddress(): ScAddress; ``` **Source:** [src/base/address.ts:174](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/address.ts#L174) ### `address.toScVal()` Convert this Address to an xdr.ScVal type. ```ts toScVal(): ScVal; ``` **Source:** [src/base/address.ts:167](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/address.ts#L167) ### `address.toString()` Serialize an address to string. ```ts toString(): string; ``` **Source:** [src/base/address.ts:147](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/address.ts#L147) ## AuthorizeInvocationParams This builds an entry from scratch, allowing you to express authorization as a function of: - a particular identity (i.e. signing `Keypair` or other signer) - approving the execution of an invocation tree (i.e. a simulation-acquired `xdr.SorobanAuthorizedInvocation` or otherwise built) - on a particular network (uniquely identified by its passphrase, see `Networks`) - until a particular ledger sequence is reached. This is in contrast to `authorizeEntry`, which signs an existing entry. ```ts interface AuthorizeInvocationParams { invocation: SorobanAuthorizedInvocation; networkPassphrase: string; publicKey?: string; signer: Keypair | SigningCallback; validUntilLedgerSeq: number; } ``` **See also** - authorizeEntry **Source:** [src/base/auth.ts:231](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/auth.ts#L231) ### `authorizeInvocationParams.invocation` ```ts invocation: SorobanAuthorizedInvocation; ``` **Source:** [src/base/auth.ts:234](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/auth.ts#L234) ### `authorizeInvocationParams.networkPassphrase` ```ts networkPassphrase: string; ``` **Source:** [src/base/auth.ts:235](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/auth.ts#L235) ### `authorizeInvocationParams.publicKey` ```ts publicKey?: string; ``` **Source:** [src/base/auth.ts:236](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/auth.ts#L236) ### `authorizeInvocationParams.signer` ```ts signer: Keypair | SigningCallback; ``` **Source:** [src/base/auth.ts:232](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/auth.ts#L232) ### `authorizeInvocationParams.validUntilLedgerSeq` ```ts validUntilLedgerSeq: number; ``` **Source:** [src/base/auth.ts:233](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/auth.ts#L233) ## Contract Create a new Contract object. `Contract` represents a single contract in the Stellar network, embodying the interface of the contract. See [Contracts](https://soroban.stellar.org/docs/learn/interacting-with-contracts) for more information about how contracts work in Stellar. ```ts class Contract { constructor(contractId: string); address(): Address; call(method: string, ...params: ScVal[]): Operation2; contractId(): string; getFootprint(): LedgerKey; toString(): string; } ``` **Source:** [src/base/contract.ts:14](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/contract.ts#L14) ### `new Contract(contractId)` ```ts constructor(contractId: string); ``` **Parameters** - **`contractId`** — `string` (required) — ID of the contract (ex. `CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE`). **Source:** [src/base/contract.ts:21](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/contract.ts#L21) ### `contract.address()` Returns the wrapped address of this contract. ```ts address(): Address; ``` **Source:** [src/base/contract.ts:44](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/contract.ts#L44) ### `contract.call(method, params)` Returns an operation that will invoke this contract call. ```ts call(method: string, ...params: ScVal[]): Operation2; ``` **Parameters** - **`method`** — `string` (required) — name of the method to call - **`...params`** — `ScVal[]` (required) — arguments to pass to the method, as an array of xdr.ScVal **See also** - - Operation.invokeHostFunction - Operation.invokeContractFunction - Operation.createCustomContract - Operation.createStellarAssetContract - Operation.uploadContractWasm **Source:** [src/base/contract.ts:60](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/contract.ts#L60) ### `contract.contractId()` Returns Stellar contract ID as a strkey, ex. `CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE`. ```ts contractId(): string; ``` **Source:** [src/base/contract.ts:34](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/contract.ts#L34) ### `contract.getFootprint()` Returns the read-only footprint entries necessary for any invocations to this contract, for convenience when manually adding it to your transaction's overall footprint or doing bump/restore operations. ```ts getFootprint(): LedgerKey; ``` **Source:** [src/base/contract.ts:76](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/contract.ts#L76) ### `contract.toString()` Returns the ID as a strkey (C...). ```ts toString(): string; ``` **Source:** [src/base/contract.ts:39](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/contract.ts#L39) ## CreateInvocation Details about a contract creation invocation. - `type` indicates if this creation was a custom contract (`'wasm'`) or a wrapping of an existing Stellar asset (`'sac'`) - `asset` is set when `type=='sac'`, containing the canonical `Asset` being wrapped by this Stellar Asset Contract - `wasm` is set when `type=='wasm'`, containing additional creation parameters ```ts interface CreateInvocation { asset?: string; type: "sac" | "wasm"; wasm?: WasmCreateDetails; } ``` **Source:** [src/base/invocation.ts:23](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L23) ### `createInvocation.asset` ```ts asset?: string; ``` **Source:** [src/base/invocation.ts:25](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L25) ### `createInvocation.type` ```ts type: "sac" | "wasm"; ``` **Source:** [src/base/invocation.ts:24](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L24) ### `createInvocation.wasm` ```ts wasm?: WasmCreateDetails; ``` **Source:** [src/base/invocation.ts:26](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L26) ## ExecuteInvocation Details about a contract function execution invocation. - `source` is the strkey of the contract (`C...`) being invoked - `function` is the name of the function being invoked - `args` are the natively-represented parameters to the function invocation (see `scValToNative` for rules on how they're represented as JS types) ```ts interface ExecuteInvocation { args: any[]; function: string; source: string; } ``` **Source:** [src/base/invocation.ts:37](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L37) ### `executeInvocation.args` ```ts args: any[]; ``` **Source:** [src/base/invocation.ts:41](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L41) ### `executeInvocation.function` ```ts function: string; ``` **Source:** [src/base/invocation.ts:39](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L39) ### `executeInvocation.source` ```ts source: string; ``` **Source:** [src/base/invocation.ts:38](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L38) ## IntLike ```ts type IntLike = bigint | number | string ``` **Source:** [src/base/sorobandata_builder.ts:3](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/sorobandata_builder.ts#L3) ## InvocationTree A node in the invocation tree. - `type` is the type of invocation occurring, either contract creation or host function execution - `args` are the parameters to the invocation, depending on the type - `invocations` are any sub-invocations that may occur as a result of this invocation (i.e. a tree of call stacks) ```ts interface InvocationTree { args: CreateInvocation | ExecuteInvocation; invocations: InvocationTree[]; type: "create" | "execute"; } ``` **Source:** [src/base/invocation.ts:53](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L53) ### `invocationTree.args` ```ts args: CreateInvocation | ExecuteInvocation; ``` **Source:** [src/base/invocation.ts:55](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L55) ### `invocationTree.invocations` ```ts invocations: InvocationTree[]; ``` **Source:** [src/base/invocation.ts:56](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L56) ### `invocationTree.type` ```ts type: "create" | "execute"; ``` **Source:** [src/base/invocation.ts:54](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L54) ## InvocationWalker A callback used when walking an invocation tree. Returning exactly `false` is a hint to stop exploring deeper from this node; other return values are ignored. ```ts type InvocationWalker = (node: xdr.SorobanAuthorizedInvocation, depth: number, parent?: xdr.SorobanAuthorizedInvocation) => boolean | null | void ``` **Source:** [src/base/invocation.ts:71](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L71) ## NativeToScValOpts ```ts interface NativeToScValOpts { type?: ScValType | ScValMapTypeSpec | ScValType | null[]; } ``` **Source:** [src/base/scval.ts:18](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/scval.ts#L18) ### `nativeToScValOpts.type` ```ts type?: ScValType | ScValMapTypeSpec | ScValType | null[]; ``` **Source:** [src/base/scval.ts:19](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/scval.ts#L19) ## SigningCallback A callback for signing an XDR structure representing all of the details necessary to authorize an invocation tree. ```ts type SigningCallback = (preimage: xdr.HashIdPreimage) => Promise ``` **Source:** [src/base/auth.ts:35](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/auth.ts#L35) ## Soroban Helper class to assist with formatting and parsing token amounts. ```ts class Soroban { constructor(); static formatTokenAmount(amount: string, decimals: number): string; static parseTokenAmount(value: string, decimals: number): string; } ``` **Source:** [src/base/soroban.ts:2](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/soroban.ts#L2) ### `new Soroban()` ```ts constructor(); ``` ### `Soroban.formatTokenAmount(amount, decimals)` Given a whole number smart contract amount of a token and an amount of decimal places (if the token has any), it returns a "display" value. All arithmetic inside the contract is performed on integers to avoid potential precision and consistency issues of floating-point. ```ts static formatTokenAmount(amount: string, decimals: number): string; ``` **Parameters** - **`amount`** — `string` (required) — the token amount you want to display - **`decimals`** — `number` (required) — specify how many decimal places a token has **Throws** - if the given amount has a decimal point already **Example** ```ts formatTokenAmount("123000", 4) === "12.3"; formatTokenAmount("123000", 3) === "123.0"; formatTokenAmount("123", 3) === "0.123"; ``` **Source:** [src/base/soroban.ts:21](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/soroban.ts#L21) ### `Soroban.parseTokenAmount(value, decimals)` Parse a token amount to use it on smart contract This function takes the display value and its decimals (if the token has any) and returns a string that'll be used within the smart contract. Returns the whole number token amount represented by the display value with the decimal places shifted over. ```ts static parseTokenAmount(value: string, decimals: number): string; ``` **Parameters** - **`value`** — `string` (required) — the token amount you want to use on a smart contract which you've been displaying in a UI - **`decimals`** — `number` (required) — the number of decimal places expected in the display value (different than the "actual" number, because suffix zeroes might not be present) **Example** ```ts const displayValueAmount = "123.4560" const parsedAmtForSmartContract = parseTokenAmount(displayValueAmount, 5); parsedAmtForSmartContract === "12345600" ``` **Source:** [src/base/soroban.ts:72](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/soroban.ts#L72) ## SorobanDataBuilder Supports building `xdr.SorobanTransactionData` structures with various items set to specific values. This is recommended for when you are building `Operation.extendFootprintTtl` / `Operation.restoreFootprint` operations and need to `TransactionBuilder.setSorobanData` to avoid (re)building the entire data structure from scratch. ```ts class SorobanDataBuilder { constructor(sorobanData?: string | Uint8Array | Buffer | SorobanTransactionData); static fromXDR(data: string | Uint8Array | Buffer): SorobanTransactionData; appendFootprint(readOnly: LedgerKey[], readWrite: LedgerKey[]): SorobanDataBuilder; build(): SorobanTransactionData; getFootprint(): LedgerFootprint; getReadOnly(): LedgerKey[]; getReadWrite(): LedgerKey[]; setFootprint(readOnly?: LedgerKey[] | null, readWrite?: LedgerKey[] | null): SorobanDataBuilder; setReadOnly(readOnly?: LedgerKey[]): SorobanDataBuilder; setReadWrite(readWrite?: LedgerKey[]): SorobanDataBuilder; setResourceFee(fee: IntLike): SorobanDataBuilder; setResources(cpuInstrs: number, diskReadBytes: number, writeBytes: number): SorobanDataBuilder; } ``` **Example** ```ts // You want to use an existing data blob but override specific parts. const newData = new SorobanDataBuilder(existing) .setReadOnly(someLedgerKeys) .setResourceFee("1000") .build(); // You want an instance from scratch const newData = new SorobanDataBuilder() .setFootprint([someLedgerKey], []) .setResourceFee("1000") .build(); ``` **Source:** [src/base/sorobandata_builder.ts:29](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/sorobandata_builder.ts#L29) ### `new SorobanDataBuilder(sorobanData)` ```ts constructor(sorobanData?: string | Uint8Array | Buffer | SorobanTransactionData); ``` **Parameters** - **`sorobanData`** — `string | Uint8Array | Buffer | SorobanTransactionData` (optional) — either a base64-encoded string that represents an `xdr.SorobanTransactionData` instance or an XDR instance itself (it will be copied); if omitted or "falsy" (e.g. an empty string), it starts with an empty instance **Source:** [src/base/sorobandata_builder.ts:38](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/sorobandata_builder.ts#L38) ### `SorobanDataBuilder.fromXDR(data)` Decodes and builds a `xdr.SorobanTransactionData` instance. ```ts static fromXDR(data: string | Uint8Array | Buffer): SorobanTransactionData; ``` **Parameters** - **`data`** — `string | Uint8Array | Buffer` (required) — raw input to decode **Source:** [src/base/sorobandata_builder.ts:71](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/sorobandata_builder.ts#L71) ### `sorobanDataBuilder.appendFootprint(readOnly, readWrite)` Appends the given ledger keys to the existing storage access footprint. ```ts appendFootprint(readOnly: LedgerKey[], readWrite: LedgerKey[]): SorobanDataBuilder; ``` **Parameters** - **`readOnly`** — `LedgerKey[]` (required) — read-only keys to add - **`readWrite`** — `LedgerKey[]` (required) — read-write keys to add **Source:** [src/base/sorobandata_builder.ts:119](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/sorobandata_builder.ts#L119) ### `sorobanDataBuilder.build()` Returns a copy of the final data structure. ```ts build(): SorobanTransactionData; ``` **Source:** [src/base/sorobandata_builder.ts:186](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/sorobandata_builder.ts#L186) ### `sorobanDataBuilder.getFootprint()` Returns the storage access pattern. ```ts getFootprint(): LedgerFootprint; ``` **Source:** [src/base/sorobandata_builder.ts:205](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/sorobandata_builder.ts#L205) ### `sorobanDataBuilder.getReadOnly()` Returns the read-only storage access pattern. ```ts getReadOnly(): LedgerKey[]; ``` **Source:** [src/base/sorobandata_builder.ts:195](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/sorobandata_builder.ts#L195) ### `sorobanDataBuilder.getReadWrite()` Returns the read-write storage access pattern. ```ts getReadWrite(): LedgerKey[]; ``` **Source:** [src/base/sorobandata_builder.ts:200](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/sorobandata_builder.ts#L200) ### `sorobanDataBuilder.setFootprint(readOnly, readWrite)` Sets the storage access footprint to be a certain set of ledger keys. You can also set each field explicitly via `SorobanDataBuilder.setReadOnly` and `SorobanDataBuilder.setReadWrite` or add to the existing footprint via `SorobanDataBuilder.appendFootprint`. Passing `null|undefined` to either parameter will IGNORE the existing values. If you want to clear them, pass `[]`, instead. ```ts setFootprint(readOnly?: LedgerKey[] | null, readWrite?: LedgerKey[] | null): SorobanDataBuilder; ``` **Parameters** - **`readOnly`** — `LedgerKey[] | null` (optional) — the set of ledger keys to set in the read-only portion of the transaction's `sorobanData`, or `null | undefined` to keep the existing keys - **`readWrite`** — `LedgerKey[] | null` (optional) — the set of ledger keys to set in the read-write portion of the transaction's `sorobanData`, or `null | undefined` to keep the existing keys **Source:** [src/base/sorobandata_builder.ts:143](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/sorobandata_builder.ts#L143) ### `sorobanDataBuilder.setReadOnly(readOnly)` Sets the read-only keys in the access footprint. ```ts setReadOnly(readOnly?: LedgerKey[]): SorobanDataBuilder; ``` **Parameters** - **`readOnly`** — `LedgerKey[]` (optional) — read-only keys in the access footprint **Source:** [src/base/sorobandata_builder.ts:162](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/sorobandata_builder.ts#L162) ### `sorobanDataBuilder.setReadWrite(readWrite)` Sets the read-write keys in the access footprint. ```ts setReadWrite(readWrite?: LedgerKey[]): SorobanDataBuilder; ``` **Parameters** - **`readWrite`** — `LedgerKey[]` (optional) — read-write keys in the access footprint **Source:** [src/base/sorobandata_builder.ts:175](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/sorobandata_builder.ts#L175) ### `sorobanDataBuilder.setResourceFee(fee)` Sets the resource fee portion of the Soroban data. ```ts setResourceFee(fee: IntLike): SorobanDataBuilder; ``` **Parameters** - **`fee`** — `IntLike` (required) — the resource fee to set (int64) **Source:** [src/base/sorobandata_builder.ts:86](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/sorobandata_builder.ts#L86) ### `sorobanDataBuilder.setResources(cpuInstrs, diskReadBytes, writeBytes)` Sets up the resource metrics. You should almost NEVER need this, as its often generated / provided to you by transaction simulation/preflight from a Soroban RPC server. ```ts setResources(cpuInstrs: number, diskReadBytes: number, writeBytes: number): SorobanDataBuilder; ``` **Parameters** - **`cpuInstrs`** — `number` (required) — number of CPU instructions - **`diskReadBytes`** — `number` (required) — number of bytes being read from disk - **`writeBytes`** — `number` (required) — number of bytes being written to disk/memory **Source:** [src/base/sorobandata_builder.ts:101](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/sorobandata_builder.ts#L101) ## WasmCreateDetails ```ts interface WasmCreateDetails { address: string; constructorArgs?: any[]; hash: string; salt: string; } ``` **Source:** [src/base/invocation.ts:6](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L6) ### `wasmCreateDetails.address` ```ts address: string; ``` **Source:** [src/base/invocation.ts:8](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L8) ### `wasmCreateDetails.constructorArgs` ```ts constructorArgs?: any[]; ``` **Source:** [src/base/invocation.ts:11](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L11) ### `wasmCreateDetails.hash` ```ts hash: string; ``` **Source:** [src/base/invocation.ts:7](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L7) ### `wasmCreateDetails.salt` ```ts salt: string; ``` **Source:** [src/base/invocation.ts:9](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L9) ## authorizeEntry Actually authorizes an existing authorization entry using the given credentials and expiration details, returning a signed copy. This "fills out" the authorization entry with a signature, indicating to the `Operation.invokeHostFunction` its attached to that: - a particular identity (i.e. signing `Keypair` or other signer) - approving the execution of an invocation tree (i.e. a simulation-acquired `xdr.SorobanAuthorizedInvocation` or otherwise built) - on a particular network (uniquely identified by its passphrase, see `Networks`) - until a particular ledger sequence is reached. This one lets you pass either a `Keypair` (or, more accurately, anything with a `sign(Buffer): Buffer` method) or a callback function (see `SigningCallback`) to handle signing the envelope hash. ```ts authorizeEntry(entry: SorobanAuthorizationEntry, signer: Keypair | SigningCallback, validUntilLedgerSeq: number, networkPassphrase: string): Promise ``` **Parameters** - **`entry`** — `SorobanAuthorizationEntry` (required) — an unsigned authorization entry - **`signer`** — `Keypair | SigningCallback` (required) — either a `Keypair` instance or a function which takes a `xdr.HashIdPreimageSorobanAuthorization` input payload and returns EITHER (a) an object containing a `signature` of the hash of the raw payload bytes as a Buffer-like and a `publicKey` string representing who just created this signature, or (b) just the naked signature of the hash of the raw payload bytes (where the signing key is implied to be the address in the `entry`). The latter option (b) is JUST for backwards compatibility and will be removed in the future. - **`validUntilLedgerSeq`** — `number` (required) — the (exclusive) future ledger sequence number until which this authorization entry should be valid (if `currentLedgerSeq==validUntil`, this is expired) - **`networkPassphrase`** — `string` (required) — the network passphrase is incorporated into the signature (see `Networks` for options) If using the `SigningCallback` variation, the signer is assumed to be the entry's credential address unless you use the variant that returns the object. **Example** ```ts import { SorobanRpc, Transaction, Networks, authorizeEntry } from '@stellar/stellar-sdk'; // Assume signPayloadCallback is a well-formed signing callback. // // It might, for example, pop up a modal from a browser extension, send the // transaction to a third-party service for signing, or just do simple // signing via Keypair like it does here: function signPayloadCallback(payload) { return signer.sign(hash(payload.toXDR())); } function multiPartyAuth( server: SorobanRpc.Server, // assume this involves multi-party auth tx: Transaction, ) { return server .simulateTransaction(tx) .then((simResult) => { tx.operations[0].auth.map(entry => authorizeEntry( entry, signPayloadCallback, currentLedger + 1000, Networks.TESTNET) ); return server.prepareTransaction(tx, simResult); }) .then((preppedTx) => { preppedTx.sign(source); return server.sendTransaction(preppedTx); }); } ``` **See also** - authorizeInvocation **Source:** [src/base/auth.ts:123](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/auth.ts#L123) ## authorizeInvocation ```ts authorizeInvocation(params: AuthorizeInvocationParams): Promise ``` **Parameters** - **`params`** — `AuthorizeInvocationParams` (required) **Source:** [src/base/auth.ts:239](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/auth.ts#L239) ## buildInvocationTree Turns a raw invocation tree into a human-readable format. This is designed to make the invocation tree easier to understand in order to inform users about the side-effects of their contract calls. This will help make informed decisions about whether or not a particular invocation will result in what you expect it to. ```ts buildInvocationTree(root: SorobanAuthorizedInvocation): InvocationTree ``` **Parameters** - **`root`** — `SorobanAuthorizedInvocation` (required) — the raw XDR of the invocation, likely acquired from transaction simulation. this is either from the `Operation.invokeHostFunction` itself (the `func` field), or from the authorization entries (`xdr.SorobanAuthorizationEntry`, the `rootInvocation` field) **Example** Here, we show a browser modal after simulating an arbitrary transaction, `tx`, which we assume has an `Operation.invokeHostFunction` inside of it: ```ts import { Server, buildInvocationTree } from '@stellar/stellar-sdk'; const s = new Server("fill in accordingly"); s.simulateTransaction(tx).then( (resp: SorobanRpc.SimulateTransactionResponse) => { if (SorobanRpc.isSuccessfulSim(resp) && resp.result) { // bold assumption: there's a valid result with an auth entry const auth = resp.result.auth; if (auth && auth.length > 0) { alert( "You are authorizing the following invocation:\n" + JSON.stringify( buildInvocationTree(auth[0].rootInvocation()), null, 2 ) ); } } } ); ``` **Source:** [src/base/invocation.ts:120](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L120) ## humanizeEvents Converts raw diagnostic or contract events into something with a flatter, human-readable, and understandable structure. Each element in the returned list has the following properties: - `type`: one of `'system'`, `'contract'`, `'diagnostic'` - `contractId`: optionally, a `C...` encoded strkey - `topics`: a list of `scValToNative` invocations on the topics - `data`: a `scValToNative` invocation on the raw event data ```ts humanizeEvents(events: ContractEvent[] | DiagnosticEvent[]): SorobanEvent[] ``` **Parameters** - **`events`** — `ContractEvent[] | DiagnosticEvent[]` (required) — either contract events or diagnostic events to parse into a friendly format **Source:** [src/base/events.ts:48](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/events.ts#L48) ## nativeToScVal Attempts to convert native types into smart contract values (`xdr.ScVal`). Provides conversions from smart contract XDR values (`xdr.ScVal`) to native JavaScript types. The conversions are as follows: - `xdr.ScVal` → passthrough - `null` / `undefined` → `scvVoid` - `string` → `scvString` (a copy is made) - `UintArray8` → `scvBytes` (a copy is made) - `boolean` → `scvBool` - `number` / `bigint` → the smallest possible XDR integer type that will fit the input value (if you want a specific type, use `ScInt`) - `Address` or `Contract` → `scvAddress` (for contracts and public keys) - `Array` → `scvVec` after attempting to convert each item of type `T` to an `xdr.ScVal` (recursively). note that all values must be the same type! - `object` → `scvMap` after attempting to convert each key and value to an `xdr.ScVal` (recursively). note that there is no restriction on types matching anywhere (unlike arrays) When passing an integer-like native value, you can also optionally specify a type which will force a particular interpretation of that value. Note that not all type specifications are compatible with all `ScVal`s, e.g. `toScVal("a string", {type: "i256"})` will throw. ```ts nativeToScVal(val: unknown, opts: NativeToScValOpts = {}): ScVal ``` **Parameters** - **`val`** — `unknown` (required) — a native (or convertible) input value to wrap - **`opts`** — `NativeToScValOpts` (optional) (default: `{}`) — an optional set of hints around the type of conversion you'd like to see - `type`: there is different behavior for different input types for `val`: - when `val` is an integer-like type (i.e. number|bigint), this will be forwarded to `ScInt` or forced to be u32/i32. - when `val` is an array type, this is forwarded to the recursion - when `val` is an object type (key-value entries), this should be an object in which each key has a pair of types (to represent forced types for the key and the value), where `null` (or a missing entry) indicates the default interpretation(s) (refer to the examples, below) - when `val` is a string type, this can be 'string' or 'symbol' to force a particular interpretation of `val`. - when `val` is a bytes-like type, this can be 'string', 'symbol', or 'bytes' to force a particular interpretation As a simple example, `nativeToScVal("hello", {type: 'symbol'})` will return an `scvSymbol`, whereas without the type it would have been an `scvString`. **Throws** - if... - there are arrays with more than one type in them - there are values that do not have a sensible conversion (e.g. random XDR types, custom classes) - the type of the input object (or some inner value of said object) cannot be determined (via `typeof`) - the type you specified (via `opts.type`) is incompatible with the value you passed in (`val`), e.g. `nativeToScVal("a string", { type: 'i128' })`, though this does not apply for types that ignore `opts` (e.g. addresses). **Example** ```ts nativeToScVal(1000); // gives ScValType === scvU64 nativeToScVal(1000n); // gives ScValType === scvU64 nativeToScVal(1n << 100n); // gives ScValType === scvU128 nativeToScVal(1000, { type: 'u32' }); // gives ScValType === scvU32 nativeToScVal(1000, { type: 'i125' }); // gives ScValType === scvI256 nativeToScVal("a string"); // gives ScValType === scvString nativeToScVal("a string", { type: 'symbol' }); // gives scvSymbol nativeToScVal(new Uint8Array(5)); // scvBytes nativeToScVal(new Uint8Array(5), { type: 'symbol' }); // scvSymbol nativeToScVal(null); // scvVoid nativeToScVal(true); // scvBool nativeToScVal([1, 2, 3]); // gives scvVec with each element as scvU64 nativeToScVal([1, 2, 3], { type: 'i128' }); // scvVec nativeToScVal([1, '2'], { type: ['i128', 'symbol'] }); // scvVec with diff types nativeToScVal([1, '2', 3], { type: ['i128', 'symbol'] }); // scvVec with diff types, using the default when omitted nativeToScVal({ 'hello': 1, 'world': [ true, false ] }, { type: { 'hello': [ 'symbol', 'i128' ], } }) // gives scvMap with entries: [ // [ scvSymbol, scvI128 ], // [ scvString, scvArray ] // ] ``` **Example** ```ts import { nativeToScVal, scValToNative, ScInt, xdr } from '@stellar/stellar-base'; let gigaMap = { bool: true, void: null, u32: xdr.ScVal.scvU32(1), i32: xdr.ScVal.scvI32(1), u64: 1n, i64: -1n, u128: new ScInt(1).toU128(), i128: new ScInt(1).toI128(), u256: new ScInt(1).toU256(), i256: new ScInt(1).toI256(), map: { arbitrary: 1n, nested: 'values', etc: false }, vec: ['same', 'type', 'list'], vec: ['diff', 1, 'type', 2, 'list'], }; // then, simply: let scv = nativeToScVal(gigaMap); // scv.switch() == xdr.ScValType.scvMap() // then... someContract.call("method", scv); // Similarly, the inverse should work: scValToNative(scv) == gigaMap; // true ``` **See also** - scValToNative **Source:** [src/base/scval.ts:161](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/scval.ts#L161) ## scValToNative Given a smart contract value, attempt to convert it to a native type. Possible conversions include: - `void` → `null` - `u32`, `i32` → `number` - `u64`, `i64`, `u128`, `i128`, `u256`, `i256`, `timepoint`, `duration` → `bigint` - `vec` → `Array` of any of the above (via recursion) - `map` → key-value object of any of the above (via recursion) - `bool` → `boolean` - `bytes` → `Uint8Array` - `symbol` → `string` - `string` → `string` IF the underlying buffer can be decoded as ascii/utf8, `Uint8Array` of the raw contents in any error case If no viable conversion can be determined, this just "unwraps" the smart value to return its underlying XDR value. ```ts scValToNative(scv: ScVal): any ``` **Parameters** - **`scv`** — `ScVal` (required) — the input smart contract value **See also** - nativeToScVal **Source:** [src/base/scval.ts:375](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/scval.ts#L375) ## scvSortedMap Build a sorted ScVal map from unsorted entries, sorted by key. ```ts scvSortedMap(items: ScMapEntry[]): ScVal ``` **Parameters** - **`items`** — `ScMapEntry[]` (required) — the unsorted map entries **Source:** [src/base/scval.ts:487](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/scval.ts#L487) ## walkInvocationTree Executes a callback function on each node in the tree until stopped. Nodes are walked in a depth-first order. Returning `false` from the callback stops further depth exploration at that node, but it does not stop the walk in a "global" view. ```ts walkInvocationTree(root: SorobanAuthorizedInvocation, callback: InvocationWalker): void ``` **Parameters** - **`root`** — `SorobanAuthorizedInvocation` (required) — the tree to explore - **`callback`** — `InvocationWalker` (required) — the callback to execute for each node **Source:** [src/base/invocation.ts:229](https://github.com/stellar/js-stellar-sdk/blob/master/src/base/invocation.ts#L229) # Source: docs/reference/network-horizon.md # Network / Horizon ## Horizon.HorizonApi.AccountMergeOperationResponse ```ts interface AccountMergeOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; created_at: string; id: string; into: string; paging_token: string; source_account: string; transaction_hash: string; transaction_successful: boolean; type: accountMerge; type_i: accountMerge; } ``` **Source:** [src/horizon/horizon_api.ts:416](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L416) ### `accountMergeOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `accountMergeOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `accountMergeOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `accountMergeOperationResponse.into` ```ts into: string; ``` **Source:** [src/horizon/horizon_api.ts:420](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L420) ### `accountMergeOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `accountMergeOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `accountMergeOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `accountMergeOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `accountMergeOperationResponse.type` ```ts type: accountMerge; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `accountMergeOperationResponse.type_i` ```ts type_i: accountMerge; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.AccountResponse ```ts interface AccountResponse extends BaseResponse<"transactions" | "operations" | "payments" | "effects" | "offers" | "trades" | "data"> { _links: { data: ResponseLink; effects: ResponseLink; offers: ResponseLink; operations: ResponseLink; payments: ResponseLink; self: ResponseLink; trades: ResponseLink; transactions: ResponseLink }; account_id: string; balances: (BalanceLineNative | BalanceLineLiquidityPool | BalanceLineAsset<"credit_alphanum4"> | BalanceLineAsset<"credit_alphanum12">)[]; data: { [key: string]: string }; flags: Flags; id: string; last_modified_ledger: number; last_modified_time: string; num_sponsored: number; num_sponsoring: number; paging_token: string; sequence: string; sequence_ledger?: number; sequence_time?: string; signers: AccountSigner[]; sponsor?: string; subentry_count: number; thresholds: AccountThresholds; } ``` **Source:** [src/horizon/horizon_api.ts:167](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L167) ### `accountResponse._links` ```ts _links: { data: ResponseLink; effects: ResponseLink; offers: ResponseLink; operations: ResponseLink; payments: ResponseLink; self: ResponseLink; trades: ResponseLink; transactions: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `accountResponse.account_id` ```ts account_id: string; ``` **Source:** [src/horizon/horizon_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L178) ### `accountResponse.balances` ```ts balances: (BalanceLineNative | BalanceLineLiquidityPool | BalanceLineAsset<"credit_alphanum4"> | BalanceLineAsset<"credit_alphanum12">)[]; ``` **Source:** [src/horizon/horizon_api.ts:187](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L187) ### `accountResponse.data` ```ts data: { [key: string]: string }; ``` **Source:** [src/horizon/horizon_api.ts:189](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L189) ### `accountResponse.flags` ```ts flags: Flags; ``` **Source:** [src/horizon/horizon_api.ts:186](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L186) ### `accountResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:176](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L176) ### `accountResponse.last_modified_ledger` ```ts last_modified_ledger: number; ``` **Source:** [src/horizon/horizon_api.ts:184](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L184) ### `accountResponse.last_modified_time` ```ts last_modified_time: string; ``` **Source:** [src/horizon/horizon_api.ts:185](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L185) ### `accountResponse.num_sponsored` ```ts num_sponsored: number; ``` **Source:** [src/horizon/horizon_api.ts:194](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L194) ### `accountResponse.num_sponsoring` ```ts num_sponsoring: number; ``` **Source:** [src/horizon/horizon_api.ts:193](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L193) ### `accountResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L177) ### `accountResponse.sequence` ```ts sequence: string; ``` **Source:** [src/horizon/horizon_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L179) ### `accountResponse.sequence_ledger` ```ts sequence_ledger?: number; ``` **Source:** [src/horizon/horizon_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L180) ### `accountResponse.sequence_time` ```ts sequence_time?: string; ``` **Source:** [src/horizon/horizon_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L181) ### `accountResponse.signers` ```ts signers: AccountSigner[]; ``` **Source:** [src/horizon/horizon_api.ts:188](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L188) ### `accountResponse.sponsor` ```ts sponsor?: string; ``` **Source:** [src/horizon/horizon_api.ts:192](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L192) ### `accountResponse.subentry_count` ```ts subentry_count: number; ``` **Source:** [src/horizon/horizon_api.ts:182](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L182) ### `accountResponse.thresholds` ```ts thresholds: AccountThresholds; ``` **Source:** [src/horizon/horizon_api.ts:183](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L183) ## Horizon.HorizonApi.AccountSigner ```ts interface AccountSigner { key: string; sponsor?: string; type: string; weight: number; } ``` **Source:** [src/horizon/horizon_api.ts:161](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L161) ### `accountSigner.key` ```ts key: string; ``` **Source:** [src/horizon/horizon_api.ts:162](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L162) ### `accountSigner.sponsor` ```ts sponsor?: string; ``` **Source:** [src/horizon/horizon_api.ts:165](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L165) ### `accountSigner.type` ```ts type: string; ``` **Source:** [src/horizon/horizon_api.ts:164](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L164) ### `accountSigner.weight` ```ts weight: number; ``` **Source:** [src/horizon/horizon_api.ts:163](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L163) ## Horizon.HorizonApi.AccountThresholds ```ts interface AccountThresholds { high_threshold: number; low_threshold: number; med_threshold: number; } ``` **Source:** [src/horizon/horizon_api.ts:150](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L150) ### `accountThresholds.high_threshold` ```ts high_threshold: number; ``` **Source:** [src/horizon/horizon_api.ts:153](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L153) ### `accountThresholds.low_threshold` ```ts low_threshold: number; ``` **Source:** [src/horizon/horizon_api.ts:151](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L151) ### `accountThresholds.med_threshold` ```ts med_threshold: number; ``` **Source:** [src/horizon/horizon_api.ts:152](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L152) ## Horizon.HorizonApi.AllowTrustOperationResponse ```ts interface AllowTrustOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; asset_code: string; asset_issuer: string; asset_type: AssetType; authorize: boolean; authorize_to_maintain_liabilities: boolean; created_at: string; id: string; paging_token: string; source_account: string; transaction_hash: string; transaction_successful: boolean; trustee: string; trustor: string; type: allowTrust; type_i: allowTrust; } ``` **Source:** [src/horizon/horizon_api.ts:404](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L404) ### `allowTrustOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `allowTrustOperationResponse.asset_code` ```ts asset_code: string; ``` **Source:** [src/horizon/horizon_api.ts:409](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L409) ### `allowTrustOperationResponse.asset_issuer` ```ts asset_issuer: string; ``` **Source:** [src/horizon/horizon_api.ts:410](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L410) ### `allowTrustOperationResponse.asset_type` ```ts asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:408](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L408) ### `allowTrustOperationResponse.authorize` ```ts authorize: boolean; ``` **Source:** [src/horizon/horizon_api.ts:411](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L411) ### `allowTrustOperationResponse.authorize_to_maintain_liabilities` ```ts authorize_to_maintain_liabilities: boolean; ``` **Source:** [src/horizon/horizon_api.ts:412](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L412) ### `allowTrustOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `allowTrustOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `allowTrustOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `allowTrustOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `allowTrustOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `allowTrustOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `allowTrustOperationResponse.trustee` ```ts trustee: string; ``` **Source:** [src/horizon/horizon_api.ts:413](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L413) ### `allowTrustOperationResponse.trustor` ```ts trustor: string; ``` **Source:** [src/horizon/horizon_api.ts:414](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L414) ### `allowTrustOperationResponse.type` ```ts type: allowTrust; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `allowTrustOperationResponse.type_i` ```ts type_i: allowTrust; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.AssetAccounts ```ts interface AssetAccounts { authorized: number; authorized_to_maintain_liabilities: number; unauthorized: number; } ``` **Source:** [src/horizon/horizon_api.ts:129](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L129) ### `assetAccounts.authorized` ```ts authorized: number; ``` **Source:** [src/horizon/horizon_api.ts:130](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L130) ### `assetAccounts.authorized_to_maintain_liabilities` ```ts authorized_to_maintain_liabilities: number; ``` **Source:** [src/horizon/horizon_api.ts:131](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L131) ### `assetAccounts.unauthorized` ```ts unauthorized: number; ``` **Source:** [src/horizon/horizon_api.ts:132](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L132) ## Horizon.HorizonApi.AssetBalances ```ts interface AssetBalances { authorized: string; authorized_to_maintain_liabilities: string; unauthorized: string; } ``` **Source:** [src/horizon/horizon_api.ts:134](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L134) ### `assetBalances.authorized` ```ts authorized: string; ``` **Source:** [src/horizon/horizon_api.ts:135](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L135) ### `assetBalances.authorized_to_maintain_liabilities` ```ts authorized_to_maintain_liabilities: string; ``` **Source:** [src/horizon/horizon_api.ts:136](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L136) ### `assetBalances.unauthorized` ```ts unauthorized: string; ``` **Source:** [src/horizon/horizon_api.ts:137](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L137) ## Horizon.HorizonApi.BalanceChange ```ts interface BalanceChange { amount: string; asset_code?: string; asset_issuer?: string; asset_type: string; destination_muxed_id?: string; from: string; to: string; type: string; } ``` **Source:** [src/horizon/horizon_api.ts:556](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L556) ### `balanceChange.amount` ```ts amount: string; ``` **Source:** [src/horizon/horizon_api.ts:564](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L564) ### `balanceChange.asset_code` ```ts asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:558](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L558) ### `balanceChange.asset_issuer` ```ts asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:559](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L559) ### `balanceChange.asset_type` ```ts asset_type: string; ``` **Source:** [src/horizon/horizon_api.ts:557](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L557) ### `balanceChange.destination_muxed_id` ```ts destination_muxed_id?: string; ``` **Source:** [src/horizon/horizon_api.ts:565](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L565) ### `balanceChange.from` ```ts from: string; ``` **Source:** [src/horizon/horizon_api.ts:562](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L562) ### `balanceChange.to` ```ts to: string; ``` **Source:** [src/horizon/horizon_api.ts:563](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L563) ### `balanceChange.type` ```ts type: string; ``` **Source:** [src/horizon/horizon_api.ts:561](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L561) ## Horizon.HorizonApi.BalanceLine ```ts type BalanceLine = T extends AssetType.native ? BalanceLineNative : T extends (AssetType.credit4 | AssetType.credit12) ? BalanceLineAsset : T extends AssetType.liquidityPoolShares ? BalanceLineLiquidityPool : BalanceLineNative | BalanceLineAsset | BalanceLineLiquidityPool ``` **Source:** [src/horizon/horizon_api.ts:120](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L120) ## Horizon.HorizonApi.BalanceLineAsset ```ts interface BalanceLineAsset { asset_code: string; asset_issuer: string; asset_type: T; balance: string; buying_liabilities: string; is_authorized: boolean; is_authorized_to_maintain_liabilities: boolean; is_clawback_enabled: boolean; last_modified_ledger: number; limit: string; selling_liabilities: string; sponsor?: string; } ``` **Source:** [src/horizon/horizon_api.ts:102](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L102) ### `balanceLineAsset.asset_code` ```ts asset_code: string; ``` **Source:** [src/horizon/horizon_api.ts:110](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L110) ### `balanceLineAsset.asset_issuer` ```ts asset_issuer: string; ``` **Source:** [src/horizon/horizon_api.ts:111](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L111) ### `balanceLineAsset.asset_type` ```ts asset_type: T; ``` **Source:** [src/horizon/horizon_api.ts:109](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L109) ### `balanceLineAsset.balance` ```ts balance: string; ``` **Source:** [src/horizon/horizon_api.ts:107](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L107) ### `balanceLineAsset.buying_liabilities` ```ts buying_liabilities: string; ``` **Source:** [src/horizon/horizon_api.ts:112](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L112) ### `balanceLineAsset.is_authorized` ```ts is_authorized: boolean; ``` **Source:** [src/horizon/horizon_api.ts:115](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L115) ### `balanceLineAsset.is_authorized_to_maintain_liabilities` ```ts is_authorized_to_maintain_liabilities: boolean; ``` **Source:** [src/horizon/horizon_api.ts:116](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L116) ### `balanceLineAsset.is_clawback_enabled` ```ts is_clawback_enabled: boolean; ``` **Source:** [src/horizon/horizon_api.ts:117](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L117) ### `balanceLineAsset.last_modified_ledger` ```ts last_modified_ledger: number; ``` **Source:** [src/horizon/horizon_api.ts:114](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L114) ### `balanceLineAsset.limit` ```ts limit: string; ``` **Source:** [src/horizon/horizon_api.ts:108](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L108) ### `balanceLineAsset.selling_liabilities` ```ts selling_liabilities: string; ``` **Source:** [src/horizon/horizon_api.ts:113](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L113) ### `balanceLineAsset.sponsor` ```ts sponsor?: string; ``` **Source:** [src/horizon/horizon_api.ts:118](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L118) ## Horizon.HorizonApi.BalanceLineLiquidityPool ```ts interface BalanceLineLiquidityPool { asset_type: "liquidity_pool_shares"; balance: string; is_authorized: boolean; is_authorized_to_maintain_liabilities: boolean; is_clawback_enabled: boolean; last_modified_ledger: number; limit: string; liquidity_pool_id: string; sponsor?: string; } ``` **Source:** [src/horizon/horizon_api.ts:91](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L91) ### `balanceLineLiquidityPool.asset_type` ```ts asset_type: "liquidity_pool_shares"; ``` **Source:** [src/horizon/horizon_api.ts:93](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L93) ### `balanceLineLiquidityPool.balance` ```ts balance: string; ``` **Source:** [src/horizon/horizon_api.ts:94](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L94) ### `balanceLineLiquidityPool.is_authorized` ```ts is_authorized: boolean; ``` **Source:** [src/horizon/horizon_api.ts:97](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L97) ### `balanceLineLiquidityPool.is_authorized_to_maintain_liabilities` ```ts is_authorized_to_maintain_liabilities: boolean; ``` **Source:** [src/horizon/horizon_api.ts:98](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L98) ### `balanceLineLiquidityPool.is_clawback_enabled` ```ts is_clawback_enabled: boolean; ``` **Source:** [src/horizon/horizon_api.ts:99](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L99) ### `balanceLineLiquidityPool.last_modified_ledger` ```ts last_modified_ledger: number; ``` **Source:** [src/horizon/horizon_api.ts:96](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L96) ### `balanceLineLiquidityPool.limit` ```ts limit: string; ``` **Source:** [src/horizon/horizon_api.ts:95](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L95) ### `balanceLineLiquidityPool.liquidity_pool_id` ```ts liquidity_pool_id: string; ``` **Source:** [src/horizon/horizon_api.ts:92](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L92) ### `balanceLineLiquidityPool.sponsor` ```ts sponsor?: string; ``` **Source:** [src/horizon/horizon_api.ts:100](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L100) ## Horizon.HorizonApi.BalanceLineNative ```ts interface BalanceLineNative { asset_type: "native"; balance: string; buying_liabilities: string; selling_liabilities: string; } ``` **Source:** [src/horizon/horizon_api.ts:85](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L85) ### `balanceLineNative.asset_type` ```ts asset_type: "native"; ``` **Source:** [src/horizon/horizon_api.ts:87](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L87) ### `balanceLineNative.balance` ```ts balance: string; ``` **Source:** [src/horizon/horizon_api.ts:86](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L86) ### `balanceLineNative.buying_liabilities` ```ts buying_liabilities: string; ``` **Source:** [src/horizon/horizon_api.ts:88](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L88) ### `balanceLineNative.selling_liabilities` ```ts selling_liabilities: string; ``` **Source:** [src/horizon/horizon_api.ts:89](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L89) ## Horizon.HorizonApi.BaseOperationResponse ```ts interface BaseOperationResponse extends BaseResponse<"succeeds" | "precedes" | "effects" | "transaction"> { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; created_at: string; id: string; paging_token: string; source_account: string; transaction_hash: string; transaction_successful: boolean; type: T; type_i: TI; } ``` **Source:** [src/horizon/horizon_api.ts:259](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L259) ### `baseOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `baseOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `baseOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `baseOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `baseOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `baseOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `baseOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `baseOperationResponse.type` ```ts type: T; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `baseOperationResponse.type_i` ```ts type_i: TI; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.BaseResponse ```ts interface BaseResponse { _links: { [key in string]: ResponseLink }; } ``` **Source:** [src/horizon/horizon_api.ts:9](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L9) ### `baseResponse._links` ```ts _links: { [key in string]: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ## Horizon.HorizonApi.BeginSponsoringFutureReservesOperationResponse ```ts interface BeginSponsoringFutureReservesOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; created_at: string; id: string; paging_token: string; source_account: string; sponsored_id: string; transaction_hash: string; transaction_successful: boolean; type: beginSponsoringFutureReserves; type_i: beginSponsoringFutureReserves; } ``` **Source:** [src/horizon/horizon_api.ts:470](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L470) ### `beginSponsoringFutureReservesOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `beginSponsoringFutureReservesOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `beginSponsoringFutureReservesOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `beginSponsoringFutureReservesOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `beginSponsoringFutureReservesOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `beginSponsoringFutureReservesOperationResponse.sponsored_id` ```ts sponsored_id: string; ``` **Source:** [src/horizon/horizon_api.ts:474](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L474) ### `beginSponsoringFutureReservesOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `beginSponsoringFutureReservesOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `beginSponsoringFutureReservesOperationResponse.type` ```ts type: beginSponsoringFutureReserves; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `beginSponsoringFutureReservesOperationResponse.type_i` ```ts type_i: beginSponsoringFutureReserves; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.BumpFootprintExpirationOperationResponse ```ts interface BumpFootprintExpirationOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; created_at: string; id: string; ledgers_to_expire: number; paging_token: string; source_account: string; transaction_hash: string; transaction_successful: boolean; type: bumpFootprintExpiration; type_i: bumpFootprintExpiration; } ``` **Source:** [src/horizon/horizon_api.ts:582](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L582) ### `bumpFootprintExpirationOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `bumpFootprintExpirationOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `bumpFootprintExpirationOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `bumpFootprintExpirationOperationResponse.ledgers_to_expire` ```ts ledgers_to_expire: number; ``` **Source:** [src/horizon/horizon_api.ts:586](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L586) ### `bumpFootprintExpirationOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `bumpFootprintExpirationOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `bumpFootprintExpirationOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `bumpFootprintExpirationOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `bumpFootprintExpirationOperationResponse.type` ```ts type: bumpFootprintExpiration; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `bumpFootprintExpirationOperationResponse.type_i` ```ts type_i: bumpFootprintExpiration; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.BumpSequenceOperationResponse ```ts interface BumpSequenceOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; bump_to: string; created_at: string; id: string; paging_token: string; source_account: string; transaction_hash: string; transaction_successful: boolean; type: bumpSequence; type_i: bumpSequence; } ``` **Source:** [src/horizon/horizon_api.ts:433](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L433) ### `bumpSequenceOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `bumpSequenceOperationResponse.bump_to` ```ts bump_to: string; ``` **Source:** [src/horizon/horizon_api.ts:437](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L437) ### `bumpSequenceOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `bumpSequenceOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `bumpSequenceOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `bumpSequenceOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `bumpSequenceOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `bumpSequenceOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `bumpSequenceOperationResponse.type` ```ts type: bumpSequence; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `bumpSequenceOperationResponse.type_i` ```ts type_i: bumpSequence; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.ChangeTrustOperationResponse ```ts interface ChangeTrustOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; asset_code?: string; asset_issuer?: string; asset_type: "credit_alphanum4" | "credit_alphanum12" | "liquidity_pool_shares"; created_at: string; id: string; limit: string; liquidity_pool_id?: string; paging_token: string; source_account: string; transaction_hash: string; transaction_successful: boolean; trustee?: string; trustor: string; type: changeTrust; type_i: changeTrust; } ``` **Source:** [src/horizon/horizon_api.ts:389](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L389) ### `changeTrustOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `changeTrustOperationResponse.asset_code` ```ts asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:397](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L397) ### `changeTrustOperationResponse.asset_issuer` ```ts asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:398](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L398) ### `changeTrustOperationResponse.asset_type` ```ts asset_type: "credit_alphanum4" | "credit_alphanum12" | "liquidity_pool_shares"; ``` **Source:** [src/horizon/horizon_api.ts:393](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L393) ### `changeTrustOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `changeTrustOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `changeTrustOperationResponse.limit` ```ts limit: string; ``` **Source:** [src/horizon/horizon_api.ts:402](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L402) ### `changeTrustOperationResponse.liquidity_pool_id` ```ts liquidity_pool_id?: string; ``` **Source:** [src/horizon/horizon_api.ts:399](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L399) ### `changeTrustOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `changeTrustOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `changeTrustOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `changeTrustOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `changeTrustOperationResponse.trustee` ```ts trustee?: string; ``` **Source:** [src/horizon/horizon_api.ts:400](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L400) ### `changeTrustOperationResponse.trustor` ```ts trustor: string; ``` **Source:** [src/horizon/horizon_api.ts:401](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L401) ### `changeTrustOperationResponse.type` ```ts type: changeTrust; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `changeTrustOperationResponse.type_i` ```ts type_i: changeTrust; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.ClaimClaimableBalanceOperationResponse ```ts interface ClaimClaimableBalanceOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; balance_id: string; claimant: string; created_at: string; id: string; paging_token: string; source_account: string; transaction_hash: string; transaction_successful: boolean; type: claimClaimableBalance; type_i: claimClaimableBalance; } ``` **Source:** [src/horizon/horizon_api.ts:462](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L462) ### `claimClaimableBalanceOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `claimClaimableBalanceOperationResponse.balance_id` ```ts balance_id: string; ``` **Source:** [src/horizon/horizon_api.ts:466](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L466) ### `claimClaimableBalanceOperationResponse.claimant` ```ts claimant: string; ``` **Source:** [src/horizon/horizon_api.ts:467](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L467) ### `claimClaimableBalanceOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `claimClaimableBalanceOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `claimClaimableBalanceOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `claimClaimableBalanceOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `claimClaimableBalanceOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `claimClaimableBalanceOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `claimClaimableBalanceOperationResponse.type` ```ts type: claimClaimableBalance; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `claimClaimableBalanceOperationResponse.type_i` ```ts type_i: claimClaimableBalance; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.Claimant ```ts interface Claimant { destination: string; predicate: Predicate; } ``` **Source:** [src/horizon/horizon_api.ts:447](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L447) ### `claimant.destination` ```ts destination: string; ``` **Source:** [src/horizon/horizon_api.ts:448](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L448) ### `claimant.predicate` ```ts predicate: Predicate; ``` **Source:** [src/horizon/horizon_api.ts:449](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L449) ## Horizon.HorizonApi.ClawbackClaimableBalanceOperationResponse ```ts interface ClawbackClaimableBalanceOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; balance_id: string; created_at: string; id: string; paging_token: string; source_account: string; transaction_hash: string; transaction_successful: boolean; type: clawbackClaimableBalance; type_i: clawbackClaimableBalance; } ``` **Source:** [src/horizon/horizon_api.ts:511](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L511) ### `clawbackClaimableBalanceOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `clawbackClaimableBalanceOperationResponse.balance_id` ```ts balance_id: string; ``` **Source:** [src/horizon/horizon_api.ts:515](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L515) ### `clawbackClaimableBalanceOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `clawbackClaimableBalanceOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `clawbackClaimableBalanceOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `clawbackClaimableBalanceOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `clawbackClaimableBalanceOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `clawbackClaimableBalanceOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `clawbackClaimableBalanceOperationResponse.type` ```ts type: clawbackClaimableBalance; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `clawbackClaimableBalanceOperationResponse.type_i` ```ts type_i: clawbackClaimableBalance; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.ClawbackOperationResponse ```ts interface ClawbackOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; amount: string; asset_code: string; asset_issuer: string; asset_type: AssetType; created_at: string; from: string; id: string; paging_token: string; source_account: string; transaction_hash: string; transaction_successful: boolean; type: clawback; type_i: clawback; } ``` **Source:** [src/horizon/horizon_api.ts:500](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L500) ### `clawbackOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `clawbackOperationResponse.amount` ```ts amount: string; ``` **Source:** [src/horizon/horizon_api.ts:508](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L508) ### `clawbackOperationResponse.asset_code` ```ts asset_code: string; ``` **Source:** [src/horizon/horizon_api.ts:505](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L505) ### `clawbackOperationResponse.asset_issuer` ```ts asset_issuer: string; ``` **Source:** [src/horizon/horizon_api.ts:506](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L506) ### `clawbackOperationResponse.asset_type` ```ts asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:504](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L504) ### `clawbackOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `clawbackOperationResponse.from` ```ts from: string; ``` **Source:** [src/horizon/horizon_api.ts:507](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L507) ### `clawbackOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `clawbackOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `clawbackOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `clawbackOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `clawbackOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `clawbackOperationResponse.type` ```ts type: clawback; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `clawbackOperationResponse.type_i` ```ts type_i: clawback; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.CreateAccountOperationResponse ```ts interface CreateAccountOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; account: string; created_at: string; funder: string; id: string; paging_token: string; source_account: string; starting_balance: string; transaction_hash: string; transaction_successful: boolean; type: createAccount; type_i: createAccount; } ``` **Source:** [src/horizon/horizon_api.ts:272](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L272) ### `createAccountOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `createAccountOperationResponse.account` ```ts account: string; ``` **Source:** [src/horizon/horizon_api.ts:276](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L276) ### `createAccountOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `createAccountOperationResponse.funder` ```ts funder: string; ``` **Source:** [src/horizon/horizon_api.ts:277](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L277) ### `createAccountOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `createAccountOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `createAccountOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `createAccountOperationResponse.starting_balance` ```ts starting_balance: string; ``` **Source:** [src/horizon/horizon_api.ts:278](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L278) ### `createAccountOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `createAccountOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `createAccountOperationResponse.type` ```ts type: createAccount; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `createAccountOperationResponse.type_i` ```ts type_i: createAccount; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.CreateClaimableBalanceOperationResponse ```ts interface CreateClaimableBalanceOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; amount: string; asset: string; claimants: Claimant[]; created_at: string; id: string; paging_token: string; source_account: string; sponsor: string; transaction_hash: string; transaction_successful: boolean; type: createClaimableBalance; type_i: createClaimableBalance; } ``` **Source:** [src/horizon/horizon_api.ts:452](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L452) ### `createClaimableBalanceOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `createClaimableBalanceOperationResponse.amount` ```ts amount: string; ``` **Source:** [src/horizon/horizon_api.ts:457](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L457) ### `createClaimableBalanceOperationResponse.asset` ```ts asset: string; ``` **Source:** [src/horizon/horizon_api.ts:456](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L456) ### `createClaimableBalanceOperationResponse.claimants` ```ts claimants: Claimant[]; ``` **Source:** [src/horizon/horizon_api.ts:459](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L459) ### `createClaimableBalanceOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `createClaimableBalanceOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `createClaimableBalanceOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `createClaimableBalanceOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `createClaimableBalanceOperationResponse.sponsor` ```ts sponsor: string; ``` **Source:** [src/horizon/horizon_api.ts:458](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L458) ### `createClaimableBalanceOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `createClaimableBalanceOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `createClaimableBalanceOperationResponse.type` ```ts type: createClaimableBalance; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `createClaimableBalanceOperationResponse.type_i` ```ts type_i: createClaimableBalance; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.DepositLiquidityOperationResponse ```ts interface DepositLiquidityOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; created_at: string; id: string; liquidity_pool_id: string; max_price: string; max_price_r: PriceRShorthand; min_price: string; min_price_r: PriceRShorthand; paging_token: string; reserves_deposited: Reserve[]; reserves_max: Reserve[]; shares_received: string; source_account: string; transaction_hash: string; transaction_successful: boolean; type: liquidityPoolDeposit; type_i: liquidityPoolDeposit; } ``` **Source:** [src/horizon/horizon_api.ts:533](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L533) ### `depositLiquidityOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `depositLiquidityOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `depositLiquidityOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `depositLiquidityOperationResponse.liquidity_pool_id` ```ts liquidity_pool_id: string; ``` **Source:** [src/horizon/horizon_api.ts:537](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L537) ### `depositLiquidityOperationResponse.max_price` ```ts max_price: string; ``` **Source:** [src/horizon/horizon_api.ts:541](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L541) ### `depositLiquidityOperationResponse.max_price_r` ```ts max_price_r: PriceRShorthand; ``` **Source:** [src/horizon/horizon_api.ts:542](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L542) ### `depositLiquidityOperationResponse.min_price` ```ts min_price: string; ``` **Source:** [src/horizon/horizon_api.ts:539](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L539) ### `depositLiquidityOperationResponse.min_price_r` ```ts min_price_r: PriceRShorthand; ``` **Source:** [src/horizon/horizon_api.ts:540](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L540) ### `depositLiquidityOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `depositLiquidityOperationResponse.reserves_deposited` ```ts reserves_deposited: Reserve[]; ``` **Source:** [src/horizon/horizon_api.ts:543](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L543) ### `depositLiquidityOperationResponse.reserves_max` ```ts reserves_max: Reserve[]; ``` **Source:** [src/horizon/horizon_api.ts:538](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L538) ### `depositLiquidityOperationResponse.shares_received` ```ts shares_received: string; ``` **Source:** [src/horizon/horizon_api.ts:544](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L544) ### `depositLiquidityOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `depositLiquidityOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `depositLiquidityOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `depositLiquidityOperationResponse.type` ```ts type: liquidityPoolDeposit; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `depositLiquidityOperationResponse.type_i` ```ts type_i: liquidityPoolDeposit; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.EndSponsoringFutureReservesOperationResponse ```ts interface EndSponsoringFutureReservesOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; begin_sponsor: string; created_at: string; id: string; paging_token: string; source_account: string; transaction_hash: string; transaction_successful: boolean; type: endSponsoringFutureReserves; type_i: endSponsoringFutureReserves; } ``` **Source:** [src/horizon/horizon_api.ts:477](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L477) ### `endSponsoringFutureReservesOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `endSponsoringFutureReservesOperationResponse.begin_sponsor` ```ts begin_sponsor: string; ``` **Source:** [src/horizon/horizon_api.ts:481](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L481) ### `endSponsoringFutureReservesOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `endSponsoringFutureReservesOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `endSponsoringFutureReservesOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `endSponsoringFutureReservesOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `endSponsoringFutureReservesOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `endSponsoringFutureReservesOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `endSponsoringFutureReservesOperationResponse.type` ```ts type: endSponsoringFutureReserves; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `endSponsoringFutureReservesOperationResponse.type_i` ```ts type_i: endSponsoringFutureReserves; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.ErrorResponseData ```ts type ErrorResponseData = ErrorResponseData.RateLimitExceeded | ErrorResponseData.InternalServerError | ErrorResponseData.TransactionFailed ``` **Source:** [src/horizon/horizon_api.ts:630](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L630) ## Horizon.HorizonApi.ErrorResponseData.Base ```ts interface Base { details: string; instance: string; status: number; title: string; type: string; } ``` **Source:** [src/horizon/horizon_api.ts:636](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L636) ### `base.details` ```ts details: string; ``` **Source:** [src/horizon/horizon_api.ts:640](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L640) ### `base.instance` ```ts instance: string; ``` **Source:** [src/horizon/horizon_api.ts:641](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L641) ### `base.status` ```ts status: number; ``` **Source:** [src/horizon/horizon_api.ts:637](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L637) ### `base.title` ```ts title: string; ``` **Source:** [src/horizon/horizon_api.ts:638](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L638) ### `base.type` ```ts type: string; ``` **Source:** [src/horizon/horizon_api.ts:639](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L639) ## Horizon.HorizonApi.ErrorResponseData.InternalServerError ```ts interface InternalServerError extends Base { details: string; instance: string; status: 500; title: "Internal Server Error"; type: string; } ``` **Source:** [src/horizon/horizon_api.ts:648](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L648) ### `internalServerError.details` ```ts details: string; ``` **Source:** [src/horizon/horizon_api.ts:640](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L640) ### `internalServerError.instance` ```ts instance: string; ``` **Source:** [src/horizon/horizon_api.ts:641](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L641) ### `internalServerError.status` ```ts status: 500; ``` **Source:** [src/horizon/horizon_api.ts:649](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L649) ### `internalServerError.title` ```ts title: "Internal Server Error"; ``` **Source:** [src/horizon/horizon_api.ts:650](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L650) ### `internalServerError.type` ```ts type: string; ``` **Source:** [src/horizon/horizon_api.ts:639](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L639) ## Horizon.HorizonApi.ErrorResponseData.RateLimitExceeded ```ts interface RateLimitExceeded extends Base { details: string; instance: string; status: 429; title: "Rate Limit Exceeded"; type: string; } ``` **Source:** [src/horizon/horizon_api.ts:644](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L644) ### `rateLimitExceeded.details` ```ts details: string; ``` **Source:** [src/horizon/horizon_api.ts:640](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L640) ### `rateLimitExceeded.instance` ```ts instance: string; ``` **Source:** [src/horizon/horizon_api.ts:641](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L641) ### `rateLimitExceeded.status` ```ts status: 429; ``` **Source:** [src/horizon/horizon_api.ts:645](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L645) ### `rateLimitExceeded.title` ```ts title: "Rate Limit Exceeded"; ``` **Source:** [src/horizon/horizon_api.ts:646](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L646) ### `rateLimitExceeded.type` ```ts type: string; ``` **Source:** [src/horizon/horizon_api.ts:639](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L639) ## Horizon.HorizonApi.ErrorResponseData.TransactionFailed ```ts interface TransactionFailed extends Base { details: string; extras: TransactionFailedExtras; instance: string; status: 400; title: "Transaction Failed"; type: string; } ``` **Source:** [src/horizon/horizon_api.ts:652](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L652) ### `transactionFailed.details` ```ts details: string; ``` **Source:** [src/horizon/horizon_api.ts:640](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L640) ### `transactionFailed.extras` ```ts extras: TransactionFailedExtras; ``` **Source:** [src/horizon/horizon_api.ts:655](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L655) ### `transactionFailed.instance` ```ts instance: string; ``` **Source:** [src/horizon/horizon_api.ts:641](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L641) ### `transactionFailed.status` ```ts status: 400; ``` **Source:** [src/horizon/horizon_api.ts:653](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L653) ### `transactionFailed.title` ```ts title: "Transaction Failed"; ``` **Source:** [src/horizon/horizon_api.ts:654](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L654) ### `transactionFailed.type` ```ts type: string; ``` **Source:** [src/horizon/horizon_api.ts:639](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L639) ## Horizon.HorizonApi.FeeBumpTransactionResponse ```ts interface FeeBumpTransactionResponse { hash: string; signatures: string[]; } ``` **Source:** [src/horizon/horizon_api.ts:29](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L29) ### `feeBumpTransactionResponse.hash` ```ts hash: string; ``` **Source:** [src/horizon/horizon_api.ts:30](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L30) ### `feeBumpTransactionResponse.signatures` ```ts signatures: string[]; ``` **Source:** [src/horizon/horizon_api.ts:31](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L31) ## Horizon.HorizonApi.FeeDistribution ```ts interface FeeDistribution { max: string; min: string; mode: string; p10: string; p20: string; p30: string; p40: string; p50: string; p60: string; p70: string; p80: string; p90: string; p95: string; p99: string; } ``` **Source:** [src/horizon/horizon_api.ts:606](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L606) ### `feeDistribution.max` ```ts max: string; ``` **Source:** [src/horizon/horizon_api.ts:607](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L607) ### `feeDistribution.min` ```ts min: string; ``` **Source:** [src/horizon/horizon_api.ts:608](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L608) ### `feeDistribution.mode` ```ts mode: string; ``` **Source:** [src/horizon/horizon_api.ts:609](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L609) ### `feeDistribution.p10` ```ts p10: string; ``` **Source:** [src/horizon/horizon_api.ts:610](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L610) ### `feeDistribution.p20` ```ts p20: string; ``` **Source:** [src/horizon/horizon_api.ts:611](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L611) ### `feeDistribution.p30` ```ts p30: string; ``` **Source:** [src/horizon/horizon_api.ts:612](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L612) ### `feeDistribution.p40` ```ts p40: string; ``` **Source:** [src/horizon/horizon_api.ts:613](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L613) ### `feeDistribution.p50` ```ts p50: string; ``` **Source:** [src/horizon/horizon_api.ts:614](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L614) ### `feeDistribution.p60` ```ts p60: string; ``` **Source:** [src/horizon/horizon_api.ts:615](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L615) ### `feeDistribution.p70` ```ts p70: string; ``` **Source:** [src/horizon/horizon_api.ts:616](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L616) ### `feeDistribution.p80` ```ts p80: string; ``` **Source:** [src/horizon/horizon_api.ts:617](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L617) ### `feeDistribution.p90` ```ts p90: string; ``` **Source:** [src/horizon/horizon_api.ts:618](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L618) ### `feeDistribution.p95` ```ts p95: string; ``` **Source:** [src/horizon/horizon_api.ts:619](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L619) ### `feeDistribution.p99` ```ts p99: string; ``` **Source:** [src/horizon/horizon_api.ts:620](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L620) ## Horizon.HorizonApi.FeeStatsResponse ```ts interface FeeStatsResponse { fee_charged: FeeDistribution; last_ledger: string; last_ledger_base_fee: string; ledger_capacity_usage: string; max_fee: FeeDistribution; } ``` **Source:** [src/horizon/horizon_api.ts:622](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L622) ### `feeStatsResponse.fee_charged` ```ts fee_charged: FeeDistribution; ``` **Source:** [src/horizon/horizon_api.ts:626](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L626) ### `feeStatsResponse.last_ledger` ```ts last_ledger: string; ``` **Source:** [src/horizon/horizon_api.ts:623](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L623) ### `feeStatsResponse.last_ledger_base_fee` ```ts last_ledger_base_fee: string; ``` **Source:** [src/horizon/horizon_api.ts:624](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L624) ### `feeStatsResponse.ledger_capacity_usage` ```ts ledger_capacity_usage: string; ``` **Source:** [src/horizon/horizon_api.ts:625](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L625) ### `feeStatsResponse.max_fee` ```ts max_fee: FeeDistribution; ``` **Source:** [src/horizon/horizon_api.ts:627](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L627) ## Horizon.HorizonApi.Flags ```ts interface Flags { auth_clawback_enabled: boolean; auth_immutable: boolean; auth_required: boolean; auth_revocable: boolean; } ``` **Source:** [src/horizon/horizon_api.ts:155](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L155) ### `flags.auth_clawback_enabled` ```ts auth_clawback_enabled: boolean; ``` **Source:** [src/horizon/horizon_api.ts:159](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L159) ### `flags.auth_immutable` ```ts auth_immutable: boolean; ``` **Source:** [src/horizon/horizon_api.ts:156](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L156) ### `flags.auth_required` ```ts auth_required: boolean; ``` **Source:** [src/horizon/horizon_api.ts:157](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L157) ### `flags.auth_revocable` ```ts auth_revocable: boolean; ``` **Source:** [src/horizon/horizon_api.ts:158](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L158) ## Horizon.HorizonApi.InflationOperationResponse ```ts interface InflationOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; created_at: string; id: string; paging_token: string; source_account: string; transaction_hash: string; transaction_successful: boolean; type: inflation; type_i: inflation; } ``` **Source:** [src/horizon/horizon_api.ts:422](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L422) ### `inflationOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `inflationOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `inflationOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `inflationOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `inflationOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `inflationOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `inflationOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `inflationOperationResponse.type` ```ts type: inflation; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `inflationOperationResponse.type_i` ```ts type_i: inflation; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.InnerTransactionResponse ```ts interface InnerTransactionResponse { hash: string; max_fee: string; signatures: string[]; } ``` **Source:** [src/horizon/horizon_api.ts:34](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L34) ### `innerTransactionResponse.hash` ```ts hash: string; ``` **Source:** [src/horizon/horizon_api.ts:35](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L35) ### `innerTransactionResponse.max_fee` ```ts max_fee: string; ``` **Source:** [src/horizon/horizon_api.ts:37](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L37) ### `innerTransactionResponse.signatures` ```ts signatures: string[]; ``` **Source:** [src/horizon/horizon_api.ts:36](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L36) ## Horizon.HorizonApi.InvokeHostFunctionOperationResponse ```ts interface InvokeHostFunctionOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; address: string; asset_balance_changes: BalanceChange[]; created_at: string; function: string; id: string; paging_token: string; parameters: { type: string; value: string }[]; salt: string; source_account: string; transaction_hash: string; transaction_successful: boolean; type: invokeHostFunction; type_i: invokeHostFunction; } ``` **Source:** [src/horizon/horizon_api.ts:568](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L568) ### `invokeHostFunctionOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `invokeHostFunctionOperationResponse.address` ```ts address: string; ``` **Source:** [src/horizon/horizon_api.ts:577](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L577) ### `invokeHostFunctionOperationResponse.asset_balance_changes` ```ts asset_balance_changes: BalanceChange[]; ``` **Source:** [src/horizon/horizon_api.ts:579](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L579) ### `invokeHostFunctionOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `invokeHostFunctionOperationResponse.function` ```ts function: string; ``` **Source:** [src/horizon/horizon_api.ts:572](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L572) ### `invokeHostFunctionOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `invokeHostFunctionOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `invokeHostFunctionOperationResponse.parameters` ```ts parameters: { type: string; value: string }[]; ``` **Source:** [src/horizon/horizon_api.ts:573](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L573) ### `invokeHostFunctionOperationResponse.salt` ```ts salt: string; ``` **Source:** [src/horizon/horizon_api.ts:578](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L578) ### `invokeHostFunctionOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `invokeHostFunctionOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `invokeHostFunctionOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `invokeHostFunctionOperationResponse.type` ```ts type: invokeHostFunction; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `invokeHostFunctionOperationResponse.type_i` ```ts type_i: invokeHostFunction; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.LiquidityPoolType ```ts enum LiquidityPoolType ``` **Source:** [src/horizon/horizon_api.ts:197](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L197) ## Horizon.HorizonApi.ManageDataOperationResponse ```ts interface ManageDataOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; created_at: string; id: string; name: string; paging_token: string; source_account: string; transaction_hash: string; transaction_successful: boolean; type: manageData; type_i: manageData; value: Buffer; } ``` **Source:** [src/horizon/horizon_api.ts:426](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L426) ### `manageDataOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `manageDataOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `manageDataOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `manageDataOperationResponse.name` ```ts name: string; ``` **Source:** [src/horizon/horizon_api.ts:430](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L430) ### `manageDataOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `manageDataOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `manageDataOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `manageDataOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `manageDataOperationResponse.type` ```ts type: manageData; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `manageDataOperationResponse.type_i` ```ts type_i: manageData; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ### `manageDataOperationResponse.value` ```ts value: Buffer; ``` **Source:** [src/horizon/horizon_api.ts:431](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L431) ## Horizon.HorizonApi.ManageOfferOperationResponse ```ts interface ManageOfferOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; amount: string; buying_asset_code?: string; buying_asset_issuer?: string; buying_asset_type: AssetType; created_at: string; id: string; offer_id: string | number; paging_token: string; price: string; price_r: PriceR; selling_asset_code?: string; selling_asset_issuer?: string; selling_asset_type: AssetType; source_account: string; transaction_hash: string; transaction_successful: boolean; type: manageOffer; type_i: manageOffer; } ``` **Source:** [src/horizon/horizon_api.ts:335](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L335) ### `manageOfferOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `manageOfferOperationResponse.amount` ```ts amount: string; ``` **Source:** [src/horizon/horizon_api.ts:340](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L340) ### `manageOfferOperationResponse.buying_asset_code` ```ts buying_asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:342](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L342) ### `manageOfferOperationResponse.buying_asset_issuer` ```ts buying_asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:343](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L343) ### `manageOfferOperationResponse.buying_asset_type` ```ts buying_asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:341](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L341) ### `manageOfferOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `manageOfferOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `manageOfferOperationResponse.offer_id` ```ts offer_id: string | number; ``` **Source:** [src/horizon/horizon_api.ts:339](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L339) ### `manageOfferOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `manageOfferOperationResponse.price` ```ts price: string; ``` **Source:** [src/horizon/horizon_api.ts:344](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L344) ### `manageOfferOperationResponse.price_r` ```ts price_r: PriceR; ``` **Source:** [src/horizon/horizon_api.ts:345](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L345) ### `manageOfferOperationResponse.selling_asset_code` ```ts selling_asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:347](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L347) ### `manageOfferOperationResponse.selling_asset_issuer` ```ts selling_asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:348](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L348) ### `manageOfferOperationResponse.selling_asset_type` ```ts selling_asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:346](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L346) ### `manageOfferOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `manageOfferOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `manageOfferOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `manageOfferOperationResponse.type` ```ts type: manageOffer; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `manageOfferOperationResponse.type_i` ```ts type_i: manageOffer; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.OperationResponseType ```ts enum OperationResponseType ``` **Source:** [src/horizon/horizon_api.ts:201](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L201) ## Horizon.HorizonApi.OperationResponseTypeI ```ts enum OperationResponseTypeI ``` **Source:** [src/horizon/horizon_api.ts:230](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L230) ## Horizon.HorizonApi.PassiveOfferOperationResponse ```ts interface PassiveOfferOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; amount: string; buying_asset_code?: string; buying_asset_issuer?: string; buying_asset_type: AssetType; created_at: string; id: string; offer_id: string | number; paging_token: string; price: string; price_r: PriceR; selling_asset_code?: string; selling_asset_issuer?: string; selling_asset_type: AssetType; source_account: string; transaction_hash: string; transaction_successful: boolean; type: createPassiveOffer; type_i: createPassiveOffer; } ``` **Source:** [src/horizon/horizon_api.ts:350](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L350) ### `passiveOfferOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `passiveOfferOperationResponse.amount` ```ts amount: string; ``` **Source:** [src/horizon/horizon_api.ts:355](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L355) ### `passiveOfferOperationResponse.buying_asset_code` ```ts buying_asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:357](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L357) ### `passiveOfferOperationResponse.buying_asset_issuer` ```ts buying_asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:358](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L358) ### `passiveOfferOperationResponse.buying_asset_type` ```ts buying_asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:356](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L356) ### `passiveOfferOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `passiveOfferOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `passiveOfferOperationResponse.offer_id` ```ts offer_id: string | number; ``` **Source:** [src/horizon/horizon_api.ts:354](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L354) ### `passiveOfferOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `passiveOfferOperationResponse.price` ```ts price: string; ``` **Source:** [src/horizon/horizon_api.ts:359](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L359) ### `passiveOfferOperationResponse.price_r` ```ts price_r: PriceR; ``` **Source:** [src/horizon/horizon_api.ts:360](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L360) ### `passiveOfferOperationResponse.selling_asset_code` ```ts selling_asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:362](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L362) ### `passiveOfferOperationResponse.selling_asset_issuer` ```ts selling_asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:363](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L363) ### `passiveOfferOperationResponse.selling_asset_type` ```ts selling_asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:361](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L361) ### `passiveOfferOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `passiveOfferOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `passiveOfferOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `passiveOfferOperationResponse.type` ```ts type: createPassiveOffer; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `passiveOfferOperationResponse.type_i` ```ts type_i: createPassiveOffer; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.PathPaymentOperationResponse ```ts interface PathPaymentOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; amount: string; asset_code?: string; asset_issuer?: string; asset_type: AssetType; created_at: string; from: string; id: string; paging_token: string; path: { asset_code: string; asset_issuer: string; asset_type: AssetType }[]; source_account: string; source_amount: string; source_asset_code?: string; source_asset_issuer?: string; source_asset_type: AssetType; source_max: string; to: string; transaction_hash: string; transaction_successful: boolean; type: pathPayment; type_i: pathPayment; } ``` **Source:** [src/horizon/horizon_api.ts:293](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L293) ### `pathPaymentOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `pathPaymentOperationResponse.amount` ```ts amount: string; ``` **Source:** [src/horizon/horizon_api.ts:297](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L297) ### `pathPaymentOperationResponse.asset_code` ```ts asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:298](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L298) ### `pathPaymentOperationResponse.asset_issuer` ```ts asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:299](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L299) ### `pathPaymentOperationResponse.asset_type` ```ts asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:300](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L300) ### `pathPaymentOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `pathPaymentOperationResponse.from` ```ts from: string; ``` **Source:** [src/horizon/horizon_api.ts:301](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L301) ### `pathPaymentOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `pathPaymentOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `pathPaymentOperationResponse.path` ```ts path: { asset_code: string; asset_issuer: string; asset_type: AssetType }[]; ``` **Source:** [src/horizon/horizon_api.ts:302](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L302) ### `pathPaymentOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `pathPaymentOperationResponse.source_amount` ```ts source_amount: string; ``` **Source:** [src/horizon/horizon_api.ts:307](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L307) ### `pathPaymentOperationResponse.source_asset_code` ```ts source_asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:308](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L308) ### `pathPaymentOperationResponse.source_asset_issuer` ```ts source_asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:309](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L309) ### `pathPaymentOperationResponse.source_asset_type` ```ts source_asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:310](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L310) ### `pathPaymentOperationResponse.source_max` ```ts source_max: string; ``` **Source:** [src/horizon/horizon_api.ts:311](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L311) ### `pathPaymentOperationResponse.to` ```ts to: string; ``` **Source:** [src/horizon/horizon_api.ts:312](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L312) ### `pathPaymentOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `pathPaymentOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `pathPaymentOperationResponse.type` ```ts type: pathPayment; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `pathPaymentOperationResponse.type_i` ```ts type_i: pathPayment; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.PathPaymentStrictSendOperationResponse ```ts interface PathPaymentStrictSendOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; amount: string; asset_code?: string; asset_issuer?: string; asset_type: AssetType; created_at: string; destination_min: string; from: string; id: string; paging_token: string; path: { asset_code: string; asset_issuer: string; asset_type: AssetType }[]; source_account: string; source_amount: string; source_asset_code?: string; source_asset_issuer?: string; source_asset_type: AssetType; to: string; transaction_hash: string; transaction_successful: boolean; type: pathPaymentStrictSend; type_i: pathPaymentStrictSend; } ``` **Source:** [src/horizon/horizon_api.ts:314](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L314) ### `pathPaymentStrictSendOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `pathPaymentStrictSendOperationResponse.amount` ```ts amount: string; ``` **Source:** [src/horizon/horizon_api.ts:318](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L318) ### `pathPaymentStrictSendOperationResponse.asset_code` ```ts asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:319](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L319) ### `pathPaymentStrictSendOperationResponse.asset_issuer` ```ts asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:320](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L320) ### `pathPaymentStrictSendOperationResponse.asset_type` ```ts asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:321](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L321) ### `pathPaymentStrictSendOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `pathPaymentStrictSendOperationResponse.destination_min` ```ts destination_min: string; ``` **Source:** [src/horizon/horizon_api.ts:322](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L322) ### `pathPaymentStrictSendOperationResponse.from` ```ts from: string; ``` **Source:** [src/horizon/horizon_api.ts:323](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L323) ### `pathPaymentStrictSendOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `pathPaymentStrictSendOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `pathPaymentStrictSendOperationResponse.path` ```ts path: { asset_code: string; asset_issuer: string; asset_type: AssetType }[]; ``` **Source:** [src/horizon/horizon_api.ts:324](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L324) ### `pathPaymentStrictSendOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `pathPaymentStrictSendOperationResponse.source_amount` ```ts source_amount: string; ``` **Source:** [src/horizon/horizon_api.ts:329](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L329) ### `pathPaymentStrictSendOperationResponse.source_asset_code` ```ts source_asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:330](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L330) ### `pathPaymentStrictSendOperationResponse.source_asset_issuer` ```ts source_asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:331](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L331) ### `pathPaymentStrictSendOperationResponse.source_asset_type` ```ts source_asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:332](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L332) ### `pathPaymentStrictSendOperationResponse.to` ```ts to: string; ``` **Source:** [src/horizon/horizon_api.ts:333](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L333) ### `pathPaymentStrictSendOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `pathPaymentStrictSendOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `pathPaymentStrictSendOperationResponse.type` ```ts type: pathPaymentStrictSend; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `pathPaymentStrictSendOperationResponse.type_i` ```ts type_i: pathPaymentStrictSend; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.PaymentOperationResponse ```ts interface PaymentOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; amount: string; asset_code?: string; asset_issuer?: string; asset_type: AssetType; created_at: string; from: string; id: string; paging_token: string; source_account: string; to: string; to_muxed?: string; to_muxed_id?: string; transaction_hash: string; transaction_successful: boolean; type: payment; type_i: payment; } ``` **Source:** [src/horizon/horizon_api.ts:280](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L280) ### `paymentOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `paymentOperationResponse.amount` ```ts amount: string; ``` **Source:** [src/horizon/horizon_api.ts:289](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L289) ### `paymentOperationResponse.asset_code` ```ts asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:287](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L287) ### `paymentOperationResponse.asset_issuer` ```ts asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:288](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L288) ### `paymentOperationResponse.asset_type` ```ts asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:286](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L286) ### `paymentOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `paymentOperationResponse.from` ```ts from: string; ``` **Source:** [src/horizon/horizon_api.ts:284](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L284) ### `paymentOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `paymentOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `paymentOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `paymentOperationResponse.to` ```ts to: string; ``` **Source:** [src/horizon/horizon_api.ts:285](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L285) ### `paymentOperationResponse.to_muxed` ```ts to_muxed?: string; ``` **Source:** [src/horizon/horizon_api.ts:290](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L290) ### `paymentOperationResponse.to_muxed_id` ```ts to_muxed_id?: string; ``` **Source:** [src/horizon/horizon_api.ts:291](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L291) ### `paymentOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `paymentOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `paymentOperationResponse.type` ```ts type: payment; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `paymentOperationResponse.type_i` ```ts type_i: payment; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.Predicate ```ts interface Predicate { abs_before?: string; and?: Predicate[]; not?: Predicate; or?: Predicate[]; rel_before?: string; } ``` **Source:** [src/horizon/horizon_api.ts:439](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L439) ### `predicate.abs_before` ```ts abs_before?: string; ``` **Source:** [src/horizon/horizon_api.ts:443](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L443) ### `predicate.and` ```ts and?: Predicate[]; ``` **Source:** [src/horizon/horizon_api.ts:440](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L440) ### `predicate.not` ```ts not?: Predicate; ``` **Source:** [src/horizon/horizon_api.ts:442](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L442) ### `predicate.or` ```ts or?: Predicate[]; ``` **Source:** [src/horizon/horizon_api.ts:441](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L441) ### `predicate.rel_before` ```ts rel_before?: string; ``` **Source:** [src/horizon/horizon_api.ts:444](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L444) ## Horizon.HorizonApi.PriceR ```ts interface PriceR { denominator: number; numerator: number; } ``` **Source:** [src/horizon/horizon_api.ts:140](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L140) ### `priceR.denominator` ```ts denominator: number; ``` **Source:** [src/horizon/horizon_api.ts:142](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L142) ### `priceR.numerator` ```ts numerator: number; ``` **Source:** [src/horizon/horizon_api.ts:141](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L141) ## Horizon.HorizonApi.PriceRShorthand ```ts interface PriceRShorthand { d: number; n: number; } ``` **Source:** [src/horizon/horizon_api.ts:145](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L145) ### `priceRShorthand.d` ```ts d: number; ``` **Source:** [src/horizon/horizon_api.ts:147](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L147) ### `priceRShorthand.n` ```ts n: number; ``` **Source:** [src/horizon/horizon_api.ts:146](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L146) ## Horizon.HorizonApi.Reserve ```ts interface Reserve { amount: string; asset: string; } ``` **Source:** [src/horizon/horizon_api.ts:529](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L529) ### `reserve.amount` ```ts amount: string; ``` **Source:** [src/horizon/horizon_api.ts:531](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L531) ### `reserve.asset` ```ts asset: string; ``` **Source:** [src/horizon/horizon_api.ts:530](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L530) ## Horizon.HorizonApi.ResponseCollection ```ts interface ResponseCollection { _embedded: { records: T[] }; _links: { next: ResponseLink; prev: ResponseLink; self: ResponseLink }; } ``` **Source:** [src/horizon/horizon_api.ts:594](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L594) ### `responseCollection._embedded` ```ts _embedded: { records: T[] }; ``` **Source:** [src/horizon/horizon_api.ts:600](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L600) ### `responseCollection._links` ```ts _links: { next: ResponseLink; prev: ResponseLink; self: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:595](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L595) ## Horizon.HorizonApi.ResponseLink ```ts interface ResponseLink { href: string; templated?: boolean; } ``` **Source:** [src/horizon/horizon_api.ts:5](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L5) ### `responseLink.href` ```ts href: string; ``` **Source:** [src/horizon/horizon_api.ts:6](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L6) ### `responseLink.templated` ```ts templated?: boolean; ``` **Source:** [src/horizon/horizon_api.ts:7](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L7) ## Horizon.HorizonApi.RestoreFootprintOperationResponse ```ts interface RestoreFootprintOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; created_at: string; id: string; paging_token: string; source_account: string; transaction_hash: string; transaction_successful: boolean; type: restoreFootprint; type_i: restoreFootprint; } ``` **Source:** [src/horizon/horizon_api.ts:589](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L589) ### `restoreFootprintOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `restoreFootprintOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `restoreFootprintOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `restoreFootprintOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `restoreFootprintOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `restoreFootprintOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `restoreFootprintOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `restoreFootprintOperationResponse.type` ```ts type: restoreFootprint; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `restoreFootprintOperationResponse.type_i` ```ts type_i: restoreFootprint; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.RevokeSponsorshipOperationResponse ```ts interface RevokeSponsorshipOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; account_id?: string; claimable_balance_id?: string; created_at: string; data_account_id?: string; data_name?: string; id: string; offer_id?: string; paging_token: string; signer_account_id?: string; signer_key?: string; source_account: string; transaction_hash: string; transaction_successful: boolean; trustline_account_id?: string; trustline_asset?: string; trustline_liquidity_pool_id?: string; type: revokeSponsorship; type_i: revokeSponsorship; } ``` **Source:** [src/horizon/horizon_api.ts:484](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L484) ### `revokeSponsorshipOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `revokeSponsorshipOperationResponse.account_id` ```ts account_id?: string; ``` **Source:** [src/horizon/horizon_api.ts:488](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L488) ### `revokeSponsorshipOperationResponse.claimable_balance_id` ```ts claimable_balance_id?: string; ``` **Source:** [src/horizon/horizon_api.ts:489](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L489) ### `revokeSponsorshipOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `revokeSponsorshipOperationResponse.data_account_id` ```ts data_account_id?: string; ``` **Source:** [src/horizon/horizon_api.ts:490](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L490) ### `revokeSponsorshipOperationResponse.data_name` ```ts data_name?: string; ``` **Source:** [src/horizon/horizon_api.ts:491](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L491) ### `revokeSponsorshipOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `revokeSponsorshipOperationResponse.offer_id` ```ts offer_id?: string; ``` **Source:** [src/horizon/horizon_api.ts:492](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L492) ### `revokeSponsorshipOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `revokeSponsorshipOperationResponse.signer_account_id` ```ts signer_account_id?: string; ``` **Source:** [src/horizon/horizon_api.ts:496](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L496) ### `revokeSponsorshipOperationResponse.signer_key` ```ts signer_key?: string; ``` **Source:** [src/horizon/horizon_api.ts:497](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L497) ### `revokeSponsorshipOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `revokeSponsorshipOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `revokeSponsorshipOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `revokeSponsorshipOperationResponse.trustline_account_id` ```ts trustline_account_id?: string; ``` **Source:** [src/horizon/horizon_api.ts:493](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L493) ### `revokeSponsorshipOperationResponse.trustline_asset` ```ts trustline_asset?: string; ``` **Source:** [src/horizon/horizon_api.ts:494](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L494) ### `revokeSponsorshipOperationResponse.trustline_liquidity_pool_id` ```ts trustline_liquidity_pool_id?: string; ``` **Source:** [src/horizon/horizon_api.ts:495](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L495) ### `revokeSponsorshipOperationResponse.type` ```ts type: revokeSponsorship; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `revokeSponsorshipOperationResponse.type_i` ```ts type_i: revokeSponsorship; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.RootResponse ```ts interface RootResponse { core_latest_ledger: number; core_supported_protocol_version: number; core_version: string; current_protocol_version: number; history_elder_ledger: number; history_latest_ledger: number; history_latest_ledger_closed_at: string; horizon_version: string; ingest_latest_ledger: number; network_passphrase: string; supported_protocol_version: number; } ``` **Source:** [src/horizon/horizon_api.ts:686](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L686) ### `rootResponse.core_latest_ledger` ```ts core_latest_ledger: number; ``` **Source:** [src/horizon/horizon_api.ts:693](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L693) ### `rootResponse.core_supported_protocol_version` ```ts core_supported_protocol_version: number; ``` **Source:** [src/horizon/horizon_api.ts:697](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L697) ### `rootResponse.core_version` ```ts core_version: string; ``` **Source:** [src/horizon/horizon_api.ts:688](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L688) ### `rootResponse.current_protocol_version` ```ts current_protocol_version: number; ``` **Source:** [src/horizon/horizon_api.ts:695](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L695) ### `rootResponse.history_elder_ledger` ```ts history_elder_ledger: number; ``` **Source:** [src/horizon/horizon_api.ts:692](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L692) ### `rootResponse.history_latest_ledger` ```ts history_latest_ledger: number; ``` **Source:** [src/horizon/horizon_api.ts:690](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L690) ### `rootResponse.history_latest_ledger_closed_at` ```ts history_latest_ledger_closed_at: string; ``` **Source:** [src/horizon/horizon_api.ts:691](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L691) ### `rootResponse.horizon_version` ```ts horizon_version: string; ``` **Source:** [src/horizon/horizon_api.ts:687](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L687) ### `rootResponse.ingest_latest_ledger` ```ts ingest_latest_ledger: number; ``` **Source:** [src/horizon/horizon_api.ts:689](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L689) ### `rootResponse.network_passphrase` ```ts network_passphrase: string; ``` **Source:** [src/horizon/horizon_api.ts:694](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L694) ### `rootResponse.supported_protocol_version` ```ts supported_protocol_version: number; ``` **Source:** [src/horizon/horizon_api.ts:696](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L696) ## Horizon.HorizonApi.SetOptionsOperationResponse ```ts interface SetOptionsOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; clear_flags: (1 | 2 | 4)[]; clear_flags_s: ("auth_required_flag" | "auth_revocable_flag" | "auth_clawback_enabled_flag")[]; created_at: string; high_threshold?: number; home_domain?: string; id: string; low_threshold?: number; master_key_weight?: number; med_threshold?: number; paging_token: string; set_flags: (1 | 2 | 4)[]; set_flags_s: ("auth_required_flag" | "auth_revocable_flag" | "auth_clawback_enabled_flag")[]; signer_key?: string; signer_weight?: number; source_account: string; transaction_hash: string; transaction_successful: boolean; type: setOptions; type_i: setOptions; } ``` **Source:** [src/horizon/horizon_api.ts:365](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L365) ### `setOptionsOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `setOptionsOperationResponse.clear_flags` ```ts clear_flags: (1 | 2 | 4)[]; ``` **Source:** [src/horizon/horizon_api.ts:382](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L382) ### `setOptionsOperationResponse.clear_flags_s` ```ts clear_flags_s: ("auth_required_flag" | "auth_revocable_flag" | "auth_clawback_enabled_flag")[]; ``` **Source:** [src/horizon/horizon_api.ts:383](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L383) ### `setOptionsOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `setOptionsOperationResponse.high_threshold` ```ts high_threshold?: number; ``` **Source:** [src/horizon/horizon_api.ts:374](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L374) ### `setOptionsOperationResponse.home_domain` ```ts home_domain?: string; ``` **Source:** [src/horizon/horizon_api.ts:375](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L375) ### `setOptionsOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `setOptionsOperationResponse.low_threshold` ```ts low_threshold?: number; ``` **Source:** [src/horizon/horizon_api.ts:372](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L372) ### `setOptionsOperationResponse.master_key_weight` ```ts master_key_weight?: number; ``` **Source:** [src/horizon/horizon_api.ts:371](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L371) ### `setOptionsOperationResponse.med_threshold` ```ts med_threshold?: number; ``` **Source:** [src/horizon/horizon_api.ts:373](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L373) ### `setOptionsOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `setOptionsOperationResponse.set_flags` ```ts set_flags: (1 | 2 | 4)[]; ``` **Source:** [src/horizon/horizon_api.ts:376](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L376) ### `setOptionsOperationResponse.set_flags_s` ```ts set_flags_s: ("auth_required_flag" | "auth_revocable_flag" | "auth_clawback_enabled_flag")[]; ``` **Source:** [src/horizon/horizon_api.ts:377](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L377) ### `setOptionsOperationResponse.signer_key` ```ts signer_key?: string; ``` **Source:** [src/horizon/horizon_api.ts:369](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L369) ### `setOptionsOperationResponse.signer_weight` ```ts signer_weight?: number; ``` **Source:** [src/horizon/horizon_api.ts:370](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L370) ### `setOptionsOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `setOptionsOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `setOptionsOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `setOptionsOperationResponse.type` ```ts type: setOptions; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `setOptionsOperationResponse.type_i` ```ts type_i: setOptions; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.SetTrustLineFlagsOperationResponse ```ts interface SetTrustLineFlagsOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; asset_code: string; asset_issuer: string; asset_type: AssetType; clear_flags: (1 | 2 | 4)[]; created_at: string; id: string; paging_token: string; set_flags: (1 | 2 | 4)[]; source_account: string; transaction_hash: string; transaction_successful: boolean; trustor: string; type: setTrustLineFlags; type_i: setTrustLineFlags; } ``` **Source:** [src/horizon/horizon_api.ts:518](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L518) ### `setTrustLineFlagsOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `setTrustLineFlagsOperationResponse.asset_code` ```ts asset_code: string; ``` **Source:** [src/horizon/horizon_api.ts:523](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L523) ### `setTrustLineFlagsOperationResponse.asset_issuer` ```ts asset_issuer: string; ``` **Source:** [src/horizon/horizon_api.ts:524](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L524) ### `setTrustLineFlagsOperationResponse.asset_type` ```ts asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:522](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L522) ### `setTrustLineFlagsOperationResponse.clear_flags` ```ts clear_flags: (1 | 2 | 4)[]; ``` **Source:** [src/horizon/horizon_api.ts:527](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L527) ### `setTrustLineFlagsOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `setTrustLineFlagsOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `setTrustLineFlagsOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `setTrustLineFlagsOperationResponse.set_flags` ```ts set_flags: (1 | 2 | 4)[]; ``` **Source:** [src/horizon/horizon_api.ts:526](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L526) ### `setTrustLineFlagsOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `setTrustLineFlagsOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `setTrustLineFlagsOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `setTrustLineFlagsOperationResponse.trustor` ```ts trustor: string; ``` **Source:** [src/horizon/horizon_api.ts:525](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L525) ### `setTrustLineFlagsOperationResponse.type` ```ts type: setTrustLineFlags; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `setTrustLineFlagsOperationResponse.type_i` ```ts type_i: setTrustLineFlags; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.HorizonApi.SubmitAsyncTransactionResponse ```ts interface SubmitAsyncTransactionResponse { error_result_xdr: string; hash: string; tx_status: string; } ``` **Source:** [src/horizon/horizon_api.ts:23](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L23) ### `submitAsyncTransactionResponse.error_result_xdr` ```ts error_result_xdr: string; ``` **Source:** [src/horizon/horizon_api.ts:26](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L26) ### `submitAsyncTransactionResponse.hash` ```ts hash: string; ``` **Source:** [src/horizon/horizon_api.ts:24](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L24) ### `submitAsyncTransactionResponse.tx_status` ```ts tx_status: string; ``` **Source:** [src/horizon/horizon_api.ts:25](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L25) ## Horizon.HorizonApi.SubmitTransactionResponse ```ts interface SubmitTransactionResponse { envelope_xdr: string; hash: string; ledger: number; paging_token: string; result_meta_xdr: string; result_xdr: string; successful: boolean; } ``` **Source:** [src/horizon/horizon_api.ts:13](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L13) ### `submitTransactionResponse.envelope_xdr` ```ts envelope_xdr: string; ``` **Source:** [src/horizon/horizon_api.ts:17](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L17) ### `submitTransactionResponse.hash` ```ts hash: string; ``` **Source:** [src/horizon/horizon_api.ts:14](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L14) ### `submitTransactionResponse.ledger` ```ts ledger: number; ``` **Source:** [src/horizon/horizon_api.ts:15](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L15) ### `submitTransactionResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:20](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L20) ### `submitTransactionResponse.result_meta_xdr` ```ts result_meta_xdr: string; ``` **Source:** [src/horizon/horizon_api.ts:19](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L19) ### `submitTransactionResponse.result_xdr` ```ts result_xdr: string; ``` **Source:** [src/horizon/horizon_api.ts:18](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L18) ### `submitTransactionResponse.successful` ```ts successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:16](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L16) ## Horizon.HorizonApi.TransactionFailedExtras ```ts interface TransactionFailedExtras { envelope_xdr: string; result_codes: { operations: string[]; transaction: TransactionFailedResultCodes }; result_xdr: string; } ``` **Source:** [src/horizon/horizon_api.ts:677](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L677) ### `transactionFailedExtras.envelope_xdr` ```ts envelope_xdr: string; ``` **Source:** [src/horizon/horizon_api.ts:678](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L678) ### `transactionFailedExtras.result_codes` ```ts result_codes: { operations: string[]; transaction: TransactionFailedResultCodes }; ``` **Source:** [src/horizon/horizon_api.ts:679](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L679) ### `transactionFailedExtras.result_xdr` ```ts result_xdr: string; ``` **Source:** [src/horizon/horizon_api.ts:683](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L683) ## Horizon.HorizonApi.TransactionFailedResultCodes ```ts enum TransactionFailedResultCodes ``` **Source:** [src/horizon/horizon_api.ts:659](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L659) ## Horizon.HorizonApi.TransactionPreconditions ```ts interface TransactionPreconditions { extra_signers?: string[]; ledgerbounds?: { max_ledger: number; min_ledger: number }; min_account_sequence?: string; min_account_sequence_age?: string; min_account_sequence_ledger_gap?: number; timebounds?: { max_time: string; min_time: string }; } ``` **Source:** [src/horizon/horizon_api.ts:40](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L40) ### `transactionPreconditions.extra_signers` ```ts extra_signers?: string[]; ``` **Source:** [src/horizon/horizon_api.ts:52](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L52) ### `transactionPreconditions.ledgerbounds` ```ts ledgerbounds?: { max_ledger: number; min_ledger: number }; ``` **Source:** [src/horizon/horizon_api.ts:45](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L45) ### `transactionPreconditions.min_account_sequence` ```ts min_account_sequence?: string; ``` **Source:** [src/horizon/horizon_api.ts:49](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L49) ### `transactionPreconditions.min_account_sequence_age` ```ts min_account_sequence_age?: string; ``` **Source:** [src/horizon/horizon_api.ts:50](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L50) ### `transactionPreconditions.min_account_sequence_ledger_gap` ```ts min_account_sequence_ledger_gap?: number; ``` **Source:** [src/horizon/horizon_api.ts:51](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L51) ### `transactionPreconditions.timebounds` ```ts timebounds?: { max_time: string; min_time: string }; ``` **Source:** [src/horizon/horizon_api.ts:41](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L41) ## Horizon.HorizonApi.TransactionResponse ```ts interface TransactionResponse extends SubmitTransactionResponse, BaseResponse<"account" | "ledger" | "operations" | "effects" | "succeeds" | "precedes"> { _links: { account: ResponseLink; effects: ResponseLink; ledger: ResponseLink; operations: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink }; created_at: string; envelope_xdr: string; fee_account: string; fee_bump_transaction?: FeeBumpTransactionResponse; fee_charged: string | number; fee_meta_xdr: string; hash: string; id: string; inner_transaction?: InnerTransactionResponse; ledger: number; max_fee: string | number; memo?: string; memo_bytes?: string; memo_type: MemoType; operation_count: number; paging_token: string; preconditions?: TransactionPreconditions; result_meta_xdr: string; result_xdr: string; signatures: string[]; source_account: string; source_account_sequence: string; successful: boolean; } ``` **Source:** [src/horizon/horizon_api.ts:55](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L55) ### `transactionResponse._links` ```ts _links: { account: ResponseLink; effects: ResponseLink; ledger: ResponseLink; operations: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `transactionResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:66](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L66) ### `transactionResponse.envelope_xdr` ```ts envelope_xdr: string; ``` **Source:** [src/horizon/horizon_api.ts:17](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L17) ### `transactionResponse.fee_account` ```ts fee_account: string; ``` **Source:** [src/horizon/horizon_api.ts:79](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L79) ### `transactionResponse.fee_bump_transaction` ```ts fee_bump_transaction?: FeeBumpTransactionResponse; ``` **Source:** [src/horizon/horizon_api.ts:81](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L81) ### `transactionResponse.fee_charged` ```ts fee_charged: string | number; ``` **Source:** [src/horizon/horizon_api.ts:68](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L68) ### `transactionResponse.fee_meta_xdr` ```ts fee_meta_xdr: string; ``` **Source:** [src/horizon/horizon_api.ts:67](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L67) ### `transactionResponse.hash` ```ts hash: string; ``` **Source:** [src/horizon/horizon_api.ts:14](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L14) ### `transactionResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:70](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L70) ### `transactionResponse.inner_transaction` ```ts inner_transaction?: InnerTransactionResponse; ``` **Source:** [src/horizon/horizon_api.ts:80](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L80) ### `transactionResponse.ledger` ```ts ledger: number; ``` **Source:** [src/horizon/horizon_api.ts:15](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L15) ### `transactionResponse.max_fee` ```ts max_fee: string | number; ``` **Source:** [src/horizon/horizon_api.ts:69](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L69) ### `transactionResponse.memo` ```ts memo?: string; ``` **Source:** [src/horizon/horizon_api.ts:72](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L72) ### `transactionResponse.memo_bytes` ```ts memo_bytes?: string; ``` **Source:** [src/horizon/horizon_api.ts:73](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L73) ### `transactionResponse.memo_type` ```ts memo_type: MemoType; ``` **Source:** [src/horizon/horizon_api.ts:71](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L71) ### `transactionResponse.operation_count` ```ts operation_count: number; ``` **Source:** [src/horizon/horizon_api.ts:74](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L74) ### `transactionResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:75](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L75) ### `transactionResponse.preconditions` ```ts preconditions?: TransactionPreconditions; ``` **Source:** [src/horizon/horizon_api.ts:82](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L82) ### `transactionResponse.result_meta_xdr` ```ts result_meta_xdr: string; ``` **Source:** [src/horizon/horizon_api.ts:19](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L19) ### `transactionResponse.result_xdr` ```ts result_xdr: string; ``` **Source:** [src/horizon/horizon_api.ts:18](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L18) ### `transactionResponse.signatures` ```ts signatures: string[]; ``` **Source:** [src/horizon/horizon_api.ts:76](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L76) ### `transactionResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:77](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L77) ### `transactionResponse.source_account_sequence` ```ts source_account_sequence: string; ``` **Source:** [src/horizon/horizon_api.ts:78](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L78) ### `transactionResponse.successful` ```ts successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:16](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L16) ## Horizon.HorizonApi.TransactionResponseCollection ```ts interface TransactionResponseCollection extends ResponseCollection { _embedded: { records: TransactionResponse[] }; _links: { next: ResponseLink; prev: ResponseLink; self: ResponseLink }; } ``` **Source:** [src/horizon/horizon_api.ts:604](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L604) ### `transactionResponseCollection._embedded` ```ts _embedded: { records: TransactionResponse[] }; ``` **Source:** [src/horizon/horizon_api.ts:600](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L600) ### `transactionResponseCollection._links` ```ts _links: { next: ResponseLink; prev: ResponseLink; self: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:595](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L595) ## Horizon.HorizonApi.WithdrawLiquidityOperationResponse ```ts interface WithdrawLiquidityOperationResponse extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; created_at: string; id: string; liquidity_pool_id: string; paging_token: string; reserves_min: Reserve[]; reserves_received: Reserve[]; shares: string; source_account: string; transaction_hash: string; transaction_successful: boolean; type: liquidityPoolWithdraw; type_i: liquidityPoolWithdraw; } ``` **Source:** [src/horizon/horizon_api.ts:546](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L546) ### `withdrawLiquidityOperationResponse._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `withdrawLiquidityOperationResponse.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `withdrawLiquidityOperationResponse.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `withdrawLiquidityOperationResponse.liquidity_pool_id` ```ts liquidity_pool_id: string; ``` **Source:** [src/horizon/horizon_api.ts:550](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L550) ### `withdrawLiquidityOperationResponse.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `withdrawLiquidityOperationResponse.reserves_min` ```ts reserves_min: Reserve[]; ``` **Source:** [src/horizon/horizon_api.ts:551](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L551) ### `withdrawLiquidityOperationResponse.reserves_received` ```ts reserves_received: Reserve[]; ``` **Source:** [src/horizon/horizon_api.ts:553](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L553) ### `withdrawLiquidityOperationResponse.shares` ```ts shares: string; ``` **Source:** [src/horizon/horizon_api.ts:552](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L552) ### `withdrawLiquidityOperationResponse.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `withdrawLiquidityOperationResponse.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `withdrawLiquidityOperationResponse.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `withdrawLiquidityOperationResponse.type` ```ts type: liquidityPoolWithdraw; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `withdrawLiquidityOperationResponse.type_i` ```ts type_i: liquidityPoolWithdraw; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.SERVER_TIME_MAP keep a local map of server times (export this purely for testing purposes) each entry will map the server domain to the last-known time and the local time it was recorded, ex: ```ts const SERVER_TIME_MAP: Record ``` **Example** ```ts "horizon-testnet.stellar.org": { serverTime: 1552513039, localTimeRecorded: 1552513052 } ``` **Source:** [src/horizon/horizon_axios_client.ts:33](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_axios_client.ts#L33) ## Horizon.Server 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. ```ts class Server { constructor(serverURL: string, opts: Options = {}); readonly httpClient: HttpClient; readonly serverURL: URL; accounts(): AccountCallBuilder; assets(): AssetsCallBuilder; checkMemoRequired(transaction: Transaction | FeeBumpTransaction): Promise; claimableBalances(): ClaimableBalanceCallBuilder; effects(): EffectCallBuilder; feeStats(): Promise; fetchBaseFee(): Promise; fetchTimebounds(seconds: number, _isRetry: boolean = false): Promise; ledgers(): LedgerCallBuilder; liquidityPools(): LiquidityPoolCallBuilder; loadAccount(accountId: string): Promise; offers(): OfferCallBuilder; operations(): OperationCallBuilder; orderbook(selling: Asset, buying: Asset): OrderbookCallBuilder; payments(): PaymentCallBuilder; root(): Promise; strictReceivePaths(source: string | Asset[], destinationAsset: Asset, destinationAmount: string): PathCallBuilder; strictSendPaths(sourceAsset: Asset, sourceAmount: string, destination: string | Asset[]): PathCallBuilder; submitAsyncTransaction(transaction: Transaction | FeeBumpTransaction, opts: SubmitTransactionOptions = ...): Promise; submitTransaction(transaction: Transaction | FeeBumpTransaction, opts: SubmitTransactionOptions = ...): Promise; tradeAggregation(base: Asset, counter: Asset, start_time: number, end_time: number, resolution: number, offset: number): TradeAggregationCallBuilder; trades(): TradesCallBuilder; transactions(): TransactionCallBuilder; } ``` **Source:** [src/horizon/server.ts:70](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L70) ### `new Server(serverURL, opts)` ```ts constructor(serverURL: string, opts: Options = {}); ``` **Parameters** - **`serverURL`** — `string` (required) - **`opts`** — `Options` (optional) (default: `{}`) **Source:** [src/horizon/server.ts:95](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L95) ### `server.httpClient` HTTP client instance for making requests to Horizon. Exposes interceptors, defaults, and other configuration options. ```ts readonly httpClient: HttpClient; ``` **Example** ```ts // Add authentication header server.httpClient.defaults.headers['Authorization'] = 'Bearer token'; // Add request interceptor server.httpClient.interceptors.request.use((config) => { console.log('Request:', config.url); return config; }); ``` **Source:** [src/horizon/server.ts:94](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L94) ### `server.serverURL` Horizon Server URL (ex. `https://horizon-testnet.stellar.org`) TODO: Solve `this.serverURL`. ```ts readonly serverURL: URL; ``` **Source:** [src/horizon/server.ts:76](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L76) ### `server.accounts()` ```ts accounts(): AccountCallBuilder; ``` **Returns** New `AccountCallBuilder` object configured by a current Horizon server configuration. **Source:** [src/horizon/server.ts:601](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L601) ### `server.assets()` Get a new `AssetsCallBuilder` instance configured with the current Horizon server configuration. ```ts assets(): AssetsCallBuilder; ``` **Returns** New AssetsCallBuilder instance **Source:** [src/horizon/server.ts:784](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L784) ### `server.checkMemoRequired(transaction)` Check if any of the destination accounts requires a memo. This function implements a memo required check as defined in [SEP-29](https://stellar.org/protocol/sep-29). It will load each account which is the destination and check if it has the data field `config.memo_required` set to `"MQ=="`. Each account is checked sequentially instead of loading multiple accounts at the same time from Horizon. ```ts checkMemoRequired(transaction: Transaction | FeeBumpTransaction): Promise; ``` **Parameters** - **`transaction`** — `Transaction | FeeBumpTransaction` (required) — The transaction to check. **Returns** - If any of the destination account requires a memo, the promise will throw `AccountRequiresMemoError`. **See also** - `SEP-29: Account Memo Requirements` **Source:** [src/horizon/server.ts:850](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L850) ### `server.claimableBalances()` ```ts claimableBalances(): ClaimableBalanceCallBuilder; ``` **Returns** New `ClaimableBalanceCallBuilder` object configured by a current Horizon server configuration. **Source:** [src/horizon/server.ts:608](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L608) ### `server.effects()` ```ts effects(): EffectCallBuilder; ``` **Returns** New `EffectCallBuilder` instance configured with the current Horizon server configuration **Source:** [src/horizon/server.ts:765](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L765) ### `server.feeStats()` Fetch the fee stats endpoint. ```ts feeStats(): Promise; ``` **Returns** Promise that resolves to the fee stats returned by Horizon. **See also** - `Fee Stats` **Source:** [src/horizon/server.ts:204](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L204) ### `server.fetchBaseFee()` Fetch the base fee. Since this hits the server, if the server call fails, you might get an error. You should be prepared to use a default value if that happens! ```ts fetchBaseFee(): Promise; ``` **Returns** Promise that resolves to the base fee. **Source:** [src/horizon/server.ts:193](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L193) ### `server.fetchTimebounds(seconds, _isRetry)` Get timebounds for N seconds from now, when you're creating a transaction with `TransactionBuilder`. By default, `TransactionBuilder` uses the current local time, but your machine's local time could be different from Horizon's. This gives you more assurance that your timebounds will reflect what you want. Note that this will generate your timebounds when you **init the transaction**, not when you build or submit the transaction! So give yourself enough time to get the transaction built and signed before submitting. ```ts fetchTimebounds(seconds: number, _isRetry: boolean = false): Promise; ``` **Parameters** - **`seconds`** — `number` (required) — Number of seconds past the current time to wait. - **`_isRetry`** — `boolean` (optional) (default: `false`) — (optional) 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 that resolves a `Timebounds` object (with the shape `{ minTime: 0, maxTime: N }`) that you can set the `timebounds` option to. **Example** ```ts const transaction = new StellarSdk.TransactionBuilder(accountId, { 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(); ``` **Source:** [src/horizon/server.ts:155](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L155) ### `server.ledgers()` ```ts ledgers(): LedgerCallBuilder; ``` **Returns** New `LedgerCallBuilder` object configured by a current Horizon server configuration. **Source:** [src/horizon/server.ts:615](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L615) ### `server.liquidityPools()` ```ts liquidityPools(): LiquidityPoolCallBuilder; ``` **Returns** New `LiquidityPoolCallBuilder` object configured to the current Horizon server settings. **Source:** [src/horizon/server.ts:680](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L680) ### `server.loadAccount(accountId)` Fetches an account's most current state in the ledger, then creates and returns an `AccountResponse` object. ```ts loadAccount(accountId: string): Promise; ``` **Parameters** - **`accountId`** — `string` (required) — The account to load. **Returns** Returns a promise to the `AccountResponse` object with populated sequence number. **Source:** [src/horizon/server.ts:797](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L797) ### `server.offers()` 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`. ```ts offers(): OfferCallBuilder; ``` **Returns** New `OfferCallBuilder` object **Example** ```ts server.offers() .forAccount(accountId).call() .then(function(offers) { console.log(offers); }); ``` **Source:** [src/horizon/server.ts:642](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L642) ### `server.operations()` ```ts operations(): OperationCallBuilder; ``` **Returns** New `OperationCallBuilder` object configured by a current Horizon server configuration. **Source:** [src/horizon/server.ts:672](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L672) ### `server.orderbook(selling, buying)` ```ts orderbook(selling: Asset, buying: Asset): OrderbookCallBuilder; ``` **Parameters** - **`selling`** — `Asset` (required) — Asset being sold - **`buying`** — `Asset` (required) — Asset being bought **Returns** New `OrderbookCallBuilder` object configured by a current Horizon server configuration. **Source:** [src/horizon/server.ts:651](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L651) ### `server.payments()` ```ts payments(): PaymentCallBuilder; ``` **Returns** New `PaymentCallBuilder` instance configured with the current Horizon server configuration. **Source:** [src/horizon/server.ts:757](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L757) ### `server.root()` Fetch the Horizon server's root endpoint. ```ts root(): Promise; ``` **Returns** Promise that resolves to the root endpoint returned by Horizon. **Source:** [src/horizon/server.ts:217](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L217) ### `server.strictReceivePaths(source, destinationAsset, destinationAmount)` The Stellar Network allows payments to be made between assets through path payments. A strict receive path payment specifies a series of assets to route a payment through, from source asset (the asset debited from the payer) to destination asset (the asset credited to the payee). A strict receive path search is specified using: * The destination address. * The source address or source assets. * The asset and amount that the destination account should receive. As part of the search, horizon will load a list of assets available to the source address and will find any 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. 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. ```ts strictReceivePaths(source: string | Asset[], destinationAsset: Asset, destinationAmount: string): PathCallBuilder; ``` **Parameters** - **`source`** — `string | Asset[]` (required) — The sender's account ID or a list of assets. Any returned path will use a source that the sender can hold. - **`destinationAsset`** — `Asset` (required) — The destination asset. - **`destinationAmount`** — `string` (required) — The amount, denominated in the destination asset, that any returned path should be able to satisfy. **Returns** New `StrictReceivePathCallBuilder` object configured with the current Horizon server configuration. **Source:** [src/horizon/server.ts:710](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L710) ### `server.strictSendPaths(sourceAsset, sourceAmount, destination)` The Stellar Network allows payments to be made between assets through path payments. A strict send path payment specifies a series of assets to route a payment through, from source asset (the asset debited from the payer) to destination asset (the asset credited to the payee). A strict send path search is specified using: The asset and amount that is being sent. The destination account or the destination assets. ```ts strictSendPaths(sourceAsset: Asset, sourceAmount: string, destination: string | Asset[]): PathCallBuilder; ``` **Parameters** - **`sourceAsset`** — `Asset` (required) — The asset to be sent. - **`sourceAmount`** — `string` (required) — The amount, denominated in the source asset, that any returned path should be able to satisfy. - **`destination`** — `string | Asset[]` (required) — The destination account or the destination assets. **Returns** New `StrictSendPathCallBuilder` object configured with the current Horizon server configuration. **Source:** [src/horizon/server.ts:739](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L739) ### `server.submitAsyncTransaction(transaction, opts)` Submits an asynchronous transaction to the network. Unlike the synchronous version, which blocks 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 `HorizonServer.checkMemoRequired`, you can skip this check by setting the option `skipMemoRequiredCheck` to `true`. ```ts submitAsyncTransaction(transaction: Transaction | FeeBumpTransaction, opts: SubmitTransactionOptions = ...): Promise; ``` **Parameters** - **`transaction`** — `Transaction | FeeBumpTransaction` (required) — The transaction to submit. - **`opts`** — `SubmitTransactionOptions` (optional) (default: `...`) — (optional) Options object - `skipMemoRequiredCheck` (optional): Allow skipping memo required check, default: `false`. See [SEP0029](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0029.md). **Returns** Promise that resolves or rejects with response from horizon. **See also** - [Submit-Async-Transaction](https://developers.stellar.org/docs/data/horizon/api-reference/resources/submit-async-transaction) **Source:** [src/horizon/server.ts:559](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L559) ### `server.submitTransaction(transaction, opts)` Submits a transaction to the network. By default this function calls `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 attribute to the response that will help you analyze what happened with your offers. 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. ```ts submitTransaction(transaction: Transaction | FeeBumpTransaction, opts: SubmitTransactionOptions = ...): Promise; ``` **Parameters** - **`transaction`** — `Transaction | FeeBumpTransaction` (required) — The transaction to submit. - **`opts`** — `SubmitTransactionOptions` (optional) (default: `...`) — (optional) Options object - `skipMemoRequiredCheck` (optional): Allow skipping memo required check, default: `false`. See [SEP0029](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0029.md). **Returns** Promise that resolves or rejects with response from horizon. **Example** ```ts const res = { ...response, offerResults: [ { // Exact ordered list of offers that executed, with the exception // that the last one may not have executed entirely. offersClaimed: [ sellerId: String, offerId: String, assetSold: { type: 'native|credit_alphanum4|credit_alphanum12', // these are only present if the asset is not native assetCode: String, issuer: String, }, // same shape as assetSold assetBought: {} ], // What effect your manageOffer op had effect: "manageOfferCreated|manageOfferUpdated|manageOfferDeleted", // Whether your offer immediately got matched and filled wasImmediatelyFilled: Boolean, // Whether your offer immediately got deleted, if for example the order was too small wasImmediatelyDeleted: Boolean, // Whether the offer was partially, but not completely, filled wasPartiallyFilled: Boolean, // The full requested amount of the offer is open for matching isFullyOpen: Boolean, // The total amount of tokens bought / sold during transaction execution amountBought: Number, amountSold: Number, // if the offer was created, updated, or partially filled, this is // the outstanding offer currentOffer: { offerId: String, amount: String, price: { n: String, d: String, }, selling: { type: 'native|credit_alphanum4|credit_alphanum12', // these are only present if the asset is not native assetCode: String, issuer: String, }, // same as `selling` buying: {}, }, // the index of this particular operation in the op stack operationIndex: Number } ] } ``` **See also** - `Submit a Transaction` **Source:** [src/horizon/server.ts:328](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L328) ### `server.tradeAggregation(base, counter, start_time, end_time, resolution, offset)` ```ts tradeAggregation(base: Asset, counter: Asset, start_time: number, end_time: number, resolution: number, offset: number): TradeAggregationCallBuilder; ``` **Parameters** - **`base`** — `Asset` (required) — base asset - **`counter`** — `Asset` (required) — counter asset - **`start_time`** — `number` (required) — lower time boundary represented as millis since epoch - **`end_time`** — `number` (required) — upper time boundary represented as millis since epoch - **`resolution`** — `number` (required) — segment duration as millis since epoch. *Supported values are 5 minutes (300000), 15 minutes (900000), 1 hour (3600000), 1 day (86400000) and 1 week (604800000). - **`offset`** — `number` (required) — segments can be offset using this parameter. Expressed in milliseconds. *Can only be used if the resolution is greater than 1 hour. Value must be in whole hours, less than the provided resolution, and less than 24 hours. Returns new `TradeAggregationCallBuilder` object configured with the current Horizon server configuration. **Returns** New TradeAggregationCallBuilder instance **Source:** [src/horizon/server.ts:814](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L814) ### `server.trades()` Returns ```ts trades(): TradesCallBuilder; ``` **Returns** New `TradesCallBuilder` object configured by a current Horizon server configuration. **Source:** [src/horizon/server.ts:665](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L665) ### `server.transactions()` ```ts transactions(): TransactionCallBuilder; ``` **Returns** New `TransactionCallBuilder` object configured by a current Horizon server configuration. **Source:** [src/horizon/server.ts:622](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L622) ## Horizon.Server.Options Options for configuring connections to Horizon servers. ```ts interface Options { allowHttp?: boolean; appName?: string; appVersion?: string; authToken?: string; headers?: Record; } ``` **Source:** [src/horizon/server.ts:917](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L917) ### `options.allowHttp` Allow connecting to http servers, default: `false`. This must be set to false in production deployments! You can also use `Config` class to set this globally. ```ts allowHttp?: boolean; ``` **Source:** [src/horizon/server.ts:919](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L919) ### `options.appName` Allow set custom header `X-App-Name`, default: `undefined`. ```ts appName?: string; ``` **Source:** [src/horizon/server.ts:921](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L921) ### `options.appVersion` Allow set custom header `X-App-Version`, default: `undefined`. ```ts appVersion?: string; ``` **Source:** [src/horizon/server.ts:923](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L923) ### `options.authToken` Allow set custom header `X-Auth-Token`, default: `undefined`. ```ts authToken?: string; ``` **Source:** [src/horizon/server.ts:925](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L925) ### `options.headers` ```ts headers?: Record; ``` **Source:** [src/horizon/server.ts:926](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L926) ## Horizon.Server.SubmitTransactionOptions ```ts interface SubmitTransactionOptions { skipMemoRequiredCheck?: boolean; } ``` **Source:** [src/horizon/server.ts:934](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L934) ### `submitTransactionOptions.skipMemoRequiredCheck` ```ts skipMemoRequiredCheck?: boolean; ``` **Source:** [src/horizon/server.ts:935](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L935) ## Horizon.Server.Timebounds ```ts interface Timebounds { maxTime: number; minTime: number; } ``` **Source:** [src/horizon/server.ts:929](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L929) ### `timebounds.maxTime` ```ts maxTime: number; ``` **Source:** [src/horizon/server.ts:931](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L931) ### `timebounds.minTime` ```ts minTime: number; ``` **Source:** [src/horizon/server.ts:930](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server.ts#L930) ## Horizon.ServerApi.AccountMergeOperationRecord ```ts interface AccountMergeOperationRecord extends BaseOperationRecord, AccountMergeOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; created_at: string; effects: CallCollectionFunction; id: string; into: string; paging_token: string; precedes: CallFunction; self: CallFunction; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: accountMerge; type_i: accountMerge; } ``` **Source:** [src/horizon/server_api.ts:249](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L249) ### `accountMergeOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `accountMergeOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `accountMergeOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `accountMergeOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `accountMergeOperationRecord.into` ```ts into: string; ``` **Source:** [src/horizon/horizon_api.ts:420](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L420) ### `accountMergeOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `accountMergeOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `accountMergeOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `accountMergeOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `accountMergeOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `accountMergeOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `accountMergeOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `accountMergeOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `accountMergeOperationRecord.type` ```ts type: accountMerge; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `accountMergeOperationRecord.type_i` ```ts type_i: accountMerge; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.AccountRecord ```ts interface AccountRecord extends BaseResponse { _links: { self: ResponseLink }; account_id: string; balances: (BalanceLineNative | BalanceLineLiquidityPool | BalanceLineAsset<"credit_alphanum4"> | BalanceLineAsset<"credit_alphanum12">)[]; data: (options: { value: string }) => Promise<{ value: string }>; data_attr: { [key: string]: string }; effects: CallCollectionFunction; flags: Flags; home_domain?: string; id: string; inflation_destination?: string; last_modified_ledger: number; last_modified_time: string; num_sponsored: number; num_sponsoring: number; offers: CallCollectionFunction; operations: CallCollectionFunction; paging_token: string; payments: CallCollectionFunction; sequence: string; sequence_ledger?: number; sequence_time?: string; signers: AccountRecordSigners[]; sponsor?: string; subentry_count: number; thresholds: AccountThresholds; trades: CallCollectionFunction; transactions: CallCollectionFunction; } ``` **Source:** [src/horizon/server_api.ts:96](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L96) ### `accountRecord._links` ```ts _links: { self: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `accountRecord.account_id` ```ts account_id: string; ``` **Source:** [src/horizon/server_api.ts:99](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L99) ### `accountRecord.balances` ```ts balances: (BalanceLineNative | BalanceLineLiquidityPool | BalanceLineAsset<"credit_alphanum4"> | BalanceLineAsset<"credit_alphanum12">)[]; ``` **Source:** [src/horizon/server_api.ts:110](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L110) ### `accountRecord.data` ```ts data: (options: { value: string }) => Promise<{ value: string }>; ``` **Source:** [src/horizon/server_api.ts:112](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L112) ### `accountRecord.data_attr` ```ts data_attr: { [key: string]: string }; ``` **Source:** [src/horizon/server_api.ts:113](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L113) ### `accountRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:120](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L120) ### `accountRecord.flags` ```ts flags: Flags; ``` **Source:** [src/horizon/server_api.ts:109](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L109) ### `accountRecord.home_domain` ```ts home_domain?: string; ``` **Source:** [src/horizon/server_api.ts:104](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L104) ### `accountRecord.id` ```ts id: string; ``` **Source:** [src/horizon/server_api.ts:97](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L97) ### `accountRecord.inflation_destination` ```ts inflation_destination?: string; ``` **Source:** [src/horizon/server_api.ts:105](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L105) ### `accountRecord.last_modified_ledger` ```ts last_modified_ledger: number; ``` **Source:** [src/horizon/server_api.ts:106](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L106) ### `accountRecord.last_modified_time` ```ts last_modified_time: string; ``` **Source:** [src/horizon/server_api.ts:107](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L107) ### `accountRecord.num_sponsored` ```ts num_sponsored: number; ``` **Source:** [src/horizon/server_api.ts:118](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L118) ### `accountRecord.num_sponsoring` ```ts num_sponsoring: number; ``` **Source:** [src/horizon/server_api.ts:117](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L117) ### `accountRecord.offers` ```ts offers: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:121](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L121) ### `accountRecord.operations` ```ts operations: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:122](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L122) ### `accountRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/server_api.ts:98](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L98) ### `accountRecord.payments` ```ts payments: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:123](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L123) ### `accountRecord.sequence` ```ts sequence: string; ``` **Source:** [src/horizon/server_api.ts:100](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L100) ### `accountRecord.sequence_ledger` ```ts sequence_ledger?: number; ``` **Source:** [src/horizon/server_api.ts:101](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L101) ### `accountRecord.sequence_time` ```ts sequence_time?: string; ``` **Source:** [src/horizon/server_api.ts:102](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L102) ### `accountRecord.signers` ```ts signers: AccountRecordSigners[]; ``` **Source:** [src/horizon/server_api.ts:111](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L111) ### `accountRecord.sponsor` ```ts sponsor?: string; ``` **Source:** [src/horizon/server_api.ts:116](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L116) ### `accountRecord.subentry_count` ```ts subentry_count: number; ``` **Source:** [src/horizon/server_api.ts:103](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L103) ### `accountRecord.thresholds` ```ts thresholds: AccountThresholds; ``` **Source:** [src/horizon/server_api.ts:108](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L108) ### `accountRecord.trades` ```ts trades: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:124](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L124) ### `accountRecord.transactions` ```ts transactions: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:119](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L119) ## Horizon.ServerApi.AccountRecordSigners ```ts type AccountRecordSigners = AccountRecordSignersType ``` **Source:** [src/horizon/server_api.ts:14](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L14) ## Horizon.ServerApi.AllowTrustOperationRecord ```ts interface AllowTrustOperationRecord extends BaseOperationRecord, AllowTrustOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; asset_code: string; asset_issuer: string; asset_type: AssetType; authorize: boolean; authorize_to_maintain_liabilities: boolean; created_at: string; effects: CallCollectionFunction; id: string; paging_token: string; precedes: CallFunction; self: CallFunction; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; trustee: string; trustor: string; type: allowTrust; type_i: allowTrust; } ``` **Source:** [src/horizon/server_api.ts:242](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L242) ### `allowTrustOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `allowTrustOperationRecord.asset_code` ```ts asset_code: string; ``` **Source:** [src/horizon/horizon_api.ts:409](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L409) ### `allowTrustOperationRecord.asset_issuer` ```ts asset_issuer: string; ``` **Source:** [src/horizon/horizon_api.ts:410](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L410) ### `allowTrustOperationRecord.asset_type` ```ts asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:408](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L408) ### `allowTrustOperationRecord.authorize` ```ts authorize: boolean; ``` **Source:** [src/horizon/horizon_api.ts:411](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L411) ### `allowTrustOperationRecord.authorize_to_maintain_liabilities` ```ts authorize_to_maintain_liabilities: boolean; ``` **Source:** [src/horizon/horizon_api.ts:412](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L412) ### `allowTrustOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `allowTrustOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `allowTrustOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `allowTrustOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `allowTrustOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `allowTrustOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `allowTrustOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `allowTrustOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `allowTrustOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `allowTrustOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `allowTrustOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `allowTrustOperationRecord.trustee` ```ts trustee: string; ``` **Source:** [src/horizon/horizon_api.ts:413](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L413) ### `allowTrustOperationRecord.trustor` ```ts trustor: string; ``` **Source:** [src/horizon/horizon_api.ts:414](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L414) ### `allowTrustOperationRecord.type` ```ts type: allowTrust; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `allowTrustOperationRecord.type_i` ```ts type_i: allowTrust; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.AssetRecord ```ts type AssetRecord = AssetRecordType ``` **Source:** [src/horizon/server_api.ts:15](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L15) ## Horizon.ServerApi.BaseOperationRecord ```ts interface BaseOperationRecord extends BaseOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; created_at: string; effects: CallCollectionFunction; id: string; paging_token: string; precedes: CallFunction; self: CallFunction; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: T; type_i: TI; } ``` **Source:** [src/horizon/server_api.ts:173](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L173) ### `baseOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `baseOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `baseOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `baseOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `baseOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `baseOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `baseOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `baseOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `baseOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `baseOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `baseOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `baseOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `baseOperationRecord.type` ```ts type: T; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `baseOperationRecord.type_i` ```ts type_i: TI; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.BeginSponsoringFutureReservesOperationRecord ```ts interface BeginSponsoringFutureReservesOperationRecord extends BaseOperationRecord, BeginSponsoringFutureReservesOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; created_at: string; effects: CallCollectionFunction; id: string; paging_token: string; precedes: CallFunction; self: CallFunction; source_account: string; sponsored_id: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: beginSponsoringFutureReserves; type_i: beginSponsoringFutureReserves; } ``` **Source:** [src/horizon/server_api.ts:291](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L291) ### `beginSponsoringFutureReservesOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `beginSponsoringFutureReservesOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `beginSponsoringFutureReservesOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `beginSponsoringFutureReservesOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `beginSponsoringFutureReservesOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `beginSponsoringFutureReservesOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `beginSponsoringFutureReservesOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `beginSponsoringFutureReservesOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `beginSponsoringFutureReservesOperationRecord.sponsored_id` ```ts sponsored_id: string; ``` **Source:** [src/horizon/horizon_api.ts:474](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L474) ### `beginSponsoringFutureReservesOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `beginSponsoringFutureReservesOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `beginSponsoringFutureReservesOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `beginSponsoringFutureReservesOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `beginSponsoringFutureReservesOperationRecord.type` ```ts type: beginSponsoringFutureReserves; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `beginSponsoringFutureReservesOperationRecord.type_i` ```ts type_i: beginSponsoringFutureReserves; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.BumpFootprintExpirationOperationRecord ```ts interface BumpFootprintExpirationOperationRecord extends BaseOperationRecord, BumpFootprintExpirationOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; created_at: string; effects: CallCollectionFunction; id: string; ledgers_to_expire: number; paging_token: string; precedes: CallFunction; self: CallFunction; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: bumpFootprintExpiration; type_i: bumpFootprintExpiration; } ``` **Source:** [src/horizon/server_api.ts:354](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L354) ### `bumpFootprintExpirationOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `bumpFootprintExpirationOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `bumpFootprintExpirationOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `bumpFootprintExpirationOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `bumpFootprintExpirationOperationRecord.ledgers_to_expire` ```ts ledgers_to_expire: number; ``` **Source:** [src/horizon/horizon_api.ts:586](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L586) ### `bumpFootprintExpirationOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `bumpFootprintExpirationOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `bumpFootprintExpirationOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `bumpFootprintExpirationOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `bumpFootprintExpirationOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `bumpFootprintExpirationOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `bumpFootprintExpirationOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `bumpFootprintExpirationOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `bumpFootprintExpirationOperationRecord.type` ```ts type: bumpFootprintExpiration; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `bumpFootprintExpirationOperationRecord.type_i` ```ts type_i: bumpFootprintExpiration; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.BumpSequenceOperationRecord ```ts interface BumpSequenceOperationRecord extends BaseOperationRecord, BumpSequenceOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; bump_to: string; created_at: string; effects: CallCollectionFunction; id: string; paging_token: string; precedes: CallFunction; self: CallFunction; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: bumpSequence; type_i: bumpSequence; } ``` **Source:** [src/horizon/server_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L270) ### `bumpSequenceOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `bumpSequenceOperationRecord.bump_to` ```ts bump_to: string; ``` **Source:** [src/horizon/horizon_api.ts:437](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L437) ### `bumpSequenceOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `bumpSequenceOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `bumpSequenceOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `bumpSequenceOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `bumpSequenceOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `bumpSequenceOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `bumpSequenceOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `bumpSequenceOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `bumpSequenceOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `bumpSequenceOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `bumpSequenceOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `bumpSequenceOperationRecord.type` ```ts type: bumpSequence; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `bumpSequenceOperationRecord.type_i` ```ts type_i: bumpSequence; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.CallCollectionFunction ```ts type CallCollectionFunction = (options?: CallFunctionTemplateOptions) => Promise> ``` **Source:** [src/horizon/server_api.ts:33](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L33) ## Horizon.ServerApi.CallFunction ```ts type CallFunction = () => Promise ``` **Source:** [src/horizon/server_api.ts:30](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L30) ## Horizon.ServerApi.CallFunctionTemplateOptions ```ts interface CallFunctionTemplateOptions { cursor?: string | number; limit?: number; order?: "desc" | "asc"; } ``` **Source:** [src/horizon/server_api.ts:24](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L24) ### `callFunctionTemplateOptions.cursor` ```ts cursor?: string | number; ``` **Source:** [src/horizon/server_api.ts:25](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L25) ### `callFunctionTemplateOptions.limit` ```ts limit?: number; ``` **Source:** [src/horizon/server_api.ts:26](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L26) ### `callFunctionTemplateOptions.order` ```ts order?: "desc" | "asc"; ``` **Source:** [src/horizon/server_api.ts:27](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L27) ## Horizon.ServerApi.ChangeTrustOperationRecord ```ts interface ChangeTrustOperationRecord extends BaseOperationRecord, ChangeTrustOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; asset_code?: string; asset_issuer?: string; asset_type: "credit_alphanum4" | "credit_alphanum12" | "liquidity_pool_shares"; created_at: string; effects: CallCollectionFunction; id: string; limit: string; liquidity_pool_id?: string; paging_token: string; precedes: CallFunction; self: CallFunction; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; trustee?: string; trustor: string; type: changeTrust; type_i: changeTrust; } ``` **Source:** [src/horizon/server_api.ts:235](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L235) ### `changeTrustOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `changeTrustOperationRecord.asset_code` ```ts asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:397](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L397) ### `changeTrustOperationRecord.asset_issuer` ```ts asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:398](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L398) ### `changeTrustOperationRecord.asset_type` ```ts asset_type: "credit_alphanum4" | "credit_alphanum12" | "liquidity_pool_shares"; ``` **Source:** [src/horizon/horizon_api.ts:393](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L393) ### `changeTrustOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `changeTrustOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `changeTrustOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `changeTrustOperationRecord.limit` ```ts limit: string; ``` **Source:** [src/horizon/horizon_api.ts:402](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L402) ### `changeTrustOperationRecord.liquidity_pool_id` ```ts liquidity_pool_id?: string; ``` **Source:** [src/horizon/horizon_api.ts:399](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L399) ### `changeTrustOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `changeTrustOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `changeTrustOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `changeTrustOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `changeTrustOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `changeTrustOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `changeTrustOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `changeTrustOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `changeTrustOperationRecord.trustee` ```ts trustee?: string; ``` **Source:** [src/horizon/horizon_api.ts:400](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L400) ### `changeTrustOperationRecord.trustor` ```ts trustor: string; ``` **Source:** [src/horizon/horizon_api.ts:401](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L401) ### `changeTrustOperationRecord.type` ```ts type: changeTrust; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `changeTrustOperationRecord.type_i` ```ts type_i: changeTrust; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.ClaimClaimableBalanceOperationRecord ```ts interface ClaimClaimableBalanceOperationRecord extends BaseOperationRecord, ClaimClaimableBalanceOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; balance_id: string; claimant: string; created_at: string; effects: CallCollectionFunction; id: string; paging_token: string; precedes: CallFunction; self: CallFunction; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: claimClaimableBalance; type_i: claimClaimableBalance; } ``` **Source:** [src/horizon/server_api.ts:284](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L284) ### `claimClaimableBalanceOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `claimClaimableBalanceOperationRecord.balance_id` ```ts balance_id: string; ``` **Source:** [src/horizon/horizon_api.ts:466](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L466) ### `claimClaimableBalanceOperationRecord.claimant` ```ts claimant: string; ``` **Source:** [src/horizon/horizon_api.ts:467](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L467) ### `claimClaimableBalanceOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `claimClaimableBalanceOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `claimClaimableBalanceOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `claimClaimableBalanceOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `claimClaimableBalanceOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `claimClaimableBalanceOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `claimClaimableBalanceOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `claimClaimableBalanceOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `claimClaimableBalanceOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `claimClaimableBalanceOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `claimClaimableBalanceOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `claimClaimableBalanceOperationRecord.type` ```ts type: claimClaimableBalance; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `claimClaimableBalanceOperationRecord.type_i` ```ts type_i: claimClaimableBalance; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.ClaimableBalanceRecord ```ts interface ClaimableBalanceRecord extends BaseResponse { _links: { self: ResponseLink }; amount: string; asset: string; claimants: Claimant[]; id: string; last_modified_ledger: number; paging_token: string; sponsor?: string; } ``` **Source:** [src/horizon/server_api.ts:87](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L87) ### `claimableBalanceRecord._links` ```ts _links: { self: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `claimableBalanceRecord.amount` ```ts amount: string; ``` **Source:** [src/horizon/server_api.ts:91](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L91) ### `claimableBalanceRecord.asset` ```ts asset: string; ``` **Source:** [src/horizon/server_api.ts:90](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L90) ### `claimableBalanceRecord.claimants` ```ts claimants: Claimant[]; ``` **Source:** [src/horizon/server_api.ts:94](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L94) ### `claimableBalanceRecord.id` ```ts id: string; ``` **Source:** [src/horizon/server_api.ts:88](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L88) ### `claimableBalanceRecord.last_modified_ledger` ```ts last_modified_ledger: number; ``` **Source:** [src/horizon/server_api.ts:93](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L93) ### `claimableBalanceRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/server_api.ts:89](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L89) ### `claimableBalanceRecord.sponsor` ```ts sponsor?: string; ``` **Source:** [src/horizon/server_api.ts:92](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L92) ## Horizon.ServerApi.ClawbackClaimableBalanceOperationRecord ```ts interface ClawbackClaimableBalanceOperationRecord extends BaseOperationRecord, ClawbackClaimableBalanceOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; balance_id: string; created_at: string; effects: CallCollectionFunction; id: string; paging_token: string; precedes: CallFunction; self: CallFunction; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: clawbackClaimableBalance; type_i: clawbackClaimableBalance; } ``` **Source:** [src/horizon/server_api.ts:319](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L319) ### `clawbackClaimableBalanceOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `clawbackClaimableBalanceOperationRecord.balance_id` ```ts balance_id: string; ``` **Source:** [src/horizon/horizon_api.ts:515](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L515) ### `clawbackClaimableBalanceOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `clawbackClaimableBalanceOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `clawbackClaimableBalanceOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `clawbackClaimableBalanceOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `clawbackClaimableBalanceOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `clawbackClaimableBalanceOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `clawbackClaimableBalanceOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `clawbackClaimableBalanceOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `clawbackClaimableBalanceOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `clawbackClaimableBalanceOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `clawbackClaimableBalanceOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `clawbackClaimableBalanceOperationRecord.type` ```ts type: clawbackClaimableBalance; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `clawbackClaimableBalanceOperationRecord.type_i` ```ts type_i: clawbackClaimableBalance; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.ClawbackOperationRecord ```ts interface ClawbackOperationRecord extends BaseOperationRecord, ClawbackOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; amount: string; asset_code: string; asset_issuer: string; asset_type: AssetType; created_at: string; effects: CallCollectionFunction; from: string; id: string; paging_token: string; precedes: CallFunction; self: CallFunction; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: clawback; type_i: clawback; } ``` **Source:** [src/horizon/server_api.ts:312](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L312) ### `clawbackOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `clawbackOperationRecord.amount` ```ts amount: string; ``` **Source:** [src/horizon/horizon_api.ts:508](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L508) ### `clawbackOperationRecord.asset_code` ```ts asset_code: string; ``` **Source:** [src/horizon/horizon_api.ts:505](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L505) ### `clawbackOperationRecord.asset_issuer` ```ts asset_issuer: string; ``` **Source:** [src/horizon/horizon_api.ts:506](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L506) ### `clawbackOperationRecord.asset_type` ```ts asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:504](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L504) ### `clawbackOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `clawbackOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `clawbackOperationRecord.from` ```ts from: string; ``` **Source:** [src/horizon/horizon_api.ts:507](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L507) ### `clawbackOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `clawbackOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `clawbackOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `clawbackOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `clawbackOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `clawbackOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `clawbackOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `clawbackOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `clawbackOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `clawbackOperationRecord.type` ```ts type: clawback; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `clawbackOperationRecord.type_i` ```ts type_i: clawback; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.CollectionPage ```ts interface CollectionPage { next: () => Promise>; prev: () => Promise>; records: T[]; } ``` **Source:** [src/horizon/server_api.ts:16](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L16) ### `collectionPage.next` ```ts next: () => Promise>; ``` **Source:** [src/horizon/server_api.ts:20](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L20) ### `collectionPage.prev` ```ts prev: () => Promise>; ``` **Source:** [src/horizon/server_api.ts:21](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L21) ### `collectionPage.records` ```ts records: T[]; ``` **Source:** [src/horizon/server_api.ts:19](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L19) ## Horizon.ServerApi.CreateAccountOperationRecord ```ts interface CreateAccountOperationRecord extends BaseOperationRecord, CreateAccountOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; account: string; created_at: string; effects: CallCollectionFunction; funder: string; id: string; paging_token: string; precedes: CallFunction; self: CallFunction; source_account: string; starting_balance: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: createAccount; type_i: createAccount; } ``` **Source:** [src/horizon/server_api.ts:183](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L183) ### `createAccountOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `createAccountOperationRecord.account` ```ts account: string; ``` **Source:** [src/horizon/horizon_api.ts:276](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L276) ### `createAccountOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `createAccountOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `createAccountOperationRecord.funder` ```ts funder: string; ``` **Source:** [src/horizon/horizon_api.ts:277](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L277) ### `createAccountOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `createAccountOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `createAccountOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `createAccountOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `createAccountOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `createAccountOperationRecord.starting_balance` ```ts starting_balance: string; ``` **Source:** [src/horizon/horizon_api.ts:278](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L278) ### `createAccountOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `createAccountOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `createAccountOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `createAccountOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `createAccountOperationRecord.type` ```ts type: createAccount; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `createAccountOperationRecord.type_i` ```ts type_i: createAccount; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.CreateClaimableBalanceOperationRecord ```ts interface CreateClaimableBalanceOperationRecord extends BaseOperationRecord, CreateClaimableBalanceOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; amount: string; asset: string; claimants: Claimant[]; created_at: string; effects: CallCollectionFunction; id: string; paging_token: string; precedes: CallFunction; self: CallFunction; source_account: string; sponsor: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: createClaimableBalance; type_i: createClaimableBalance; } ``` **Source:** [src/horizon/server_api.ts:277](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L277) ### `createClaimableBalanceOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `createClaimableBalanceOperationRecord.amount` ```ts amount: string; ``` **Source:** [src/horizon/horizon_api.ts:457](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L457) ### `createClaimableBalanceOperationRecord.asset` ```ts asset: string; ``` **Source:** [src/horizon/horizon_api.ts:456](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L456) ### `createClaimableBalanceOperationRecord.claimants` ```ts claimants: Claimant[]; ``` **Source:** [src/horizon/horizon_api.ts:459](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L459) ### `createClaimableBalanceOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `createClaimableBalanceOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `createClaimableBalanceOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `createClaimableBalanceOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `createClaimableBalanceOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `createClaimableBalanceOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `createClaimableBalanceOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `createClaimableBalanceOperationRecord.sponsor` ```ts sponsor: string; ``` **Source:** [src/horizon/horizon_api.ts:458](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L458) ### `createClaimableBalanceOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `createClaimableBalanceOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `createClaimableBalanceOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `createClaimableBalanceOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `createClaimableBalanceOperationRecord.type` ```ts type: createClaimableBalance; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `createClaimableBalanceOperationRecord.type_i` ```ts type_i: createClaimableBalance; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.DepositLiquidityOperationRecord ```ts interface DepositLiquidityOperationRecord extends BaseOperationRecord, DepositLiquidityOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; created_at: string; effects: CallCollectionFunction; id: string; liquidity_pool_id: string; max_price: string; max_price_r: PriceRShorthand; min_price: string; min_price_r: PriceRShorthand; paging_token: string; precedes: CallFunction; reserves_deposited: Reserve[]; reserves_max: Reserve[]; self: CallFunction; shares_received: string; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: liquidityPoolDeposit; type_i: liquidityPoolDeposit; } ``` **Source:** [src/horizon/server_api.ts:333](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L333) ### `depositLiquidityOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `depositLiquidityOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `depositLiquidityOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `depositLiquidityOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `depositLiquidityOperationRecord.liquidity_pool_id` ```ts liquidity_pool_id: string; ``` **Source:** [src/horizon/horizon_api.ts:537](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L537) ### `depositLiquidityOperationRecord.max_price` ```ts max_price: string; ``` **Source:** [src/horizon/horizon_api.ts:541](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L541) ### `depositLiquidityOperationRecord.max_price_r` ```ts max_price_r: PriceRShorthand; ``` **Source:** [src/horizon/horizon_api.ts:542](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L542) ### `depositLiquidityOperationRecord.min_price` ```ts min_price: string; ``` **Source:** [src/horizon/horizon_api.ts:539](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L539) ### `depositLiquidityOperationRecord.min_price_r` ```ts min_price_r: PriceRShorthand; ``` **Source:** [src/horizon/horizon_api.ts:540](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L540) ### `depositLiquidityOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `depositLiquidityOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `depositLiquidityOperationRecord.reserves_deposited` ```ts reserves_deposited: Reserve[]; ``` **Source:** [src/horizon/horizon_api.ts:543](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L543) ### `depositLiquidityOperationRecord.reserves_max` ```ts reserves_max: Reserve[]; ``` **Source:** [src/horizon/horizon_api.ts:538](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L538) ### `depositLiquidityOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `depositLiquidityOperationRecord.shares_received` ```ts shares_received: string; ``` **Source:** [src/horizon/horizon_api.ts:544](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L544) ### `depositLiquidityOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `depositLiquidityOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `depositLiquidityOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `depositLiquidityOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `depositLiquidityOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `depositLiquidityOperationRecord.type` ```ts type: liquidityPoolDeposit; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `depositLiquidityOperationRecord.type_i` ```ts type_i: liquidityPoolDeposit; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.EffectRecord ```ts type EffectRecord = BaseEffectRecordFromTypes & EffectRecordMethods ``` **Source:** [src/horizon/server_api.ts:85](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L85) ## Horizon.ServerApi.EffectType ```ts const EffectType: typeof EffectType ``` **Source:** [src/horizon/server_api.ts:86](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L86) ## Horizon.ServerApi.EndSponsoringFutureReservesOperationRecord ```ts interface EndSponsoringFutureReservesOperationRecord extends BaseOperationRecord, EndSponsoringFutureReservesOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; begin_sponsor: string; created_at: string; effects: CallCollectionFunction; id: string; paging_token: string; precedes: CallFunction; self: CallFunction; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: endSponsoringFutureReserves; type_i: endSponsoringFutureReserves; } ``` **Source:** [src/horizon/server_api.ts:298](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L298) ### `endSponsoringFutureReservesOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `endSponsoringFutureReservesOperationRecord.begin_sponsor` ```ts begin_sponsor: string; ``` **Source:** [src/horizon/horizon_api.ts:481](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L481) ### `endSponsoringFutureReservesOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `endSponsoringFutureReservesOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `endSponsoringFutureReservesOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `endSponsoringFutureReservesOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `endSponsoringFutureReservesOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `endSponsoringFutureReservesOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `endSponsoringFutureReservesOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `endSponsoringFutureReservesOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `endSponsoringFutureReservesOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `endSponsoringFutureReservesOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `endSponsoringFutureReservesOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `endSponsoringFutureReservesOperationRecord.type` ```ts type: endSponsoringFutureReserves; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `endSponsoringFutureReservesOperationRecord.type_i` ```ts type_i: endSponsoringFutureReserves; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.InflationOperationRecord ```ts interface InflationOperationRecord extends BaseOperationRecord, InflationOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; created_at: string; effects: CallCollectionFunction; id: string; paging_token: string; precedes: CallFunction; self: CallFunction; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: inflation; type_i: inflation; } ``` **Source:** [src/horizon/server_api.ts:256](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L256) ### `inflationOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `inflationOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `inflationOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `inflationOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `inflationOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `inflationOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `inflationOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `inflationOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `inflationOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `inflationOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `inflationOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `inflationOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `inflationOperationRecord.type` ```ts type: inflation; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `inflationOperationRecord.type_i` ```ts type_i: inflation; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.InvokeHostFunctionOperationRecord ```ts interface InvokeHostFunctionOperationRecord extends BaseOperationRecord, InvokeHostFunctionOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; address: string; asset_balance_changes: BalanceChange[]; created_at: string; effects: CallCollectionFunction; function: string; id: string; paging_token: string; parameters: { type: string; value: string }[]; precedes: CallFunction; salt: string; self: CallFunction; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: invokeHostFunction; type_i: invokeHostFunction; } ``` **Source:** [src/horizon/server_api.ts:347](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L347) ### `invokeHostFunctionOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `invokeHostFunctionOperationRecord.address` ```ts address: string; ``` **Source:** [src/horizon/horizon_api.ts:577](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L577) ### `invokeHostFunctionOperationRecord.asset_balance_changes` ```ts asset_balance_changes: BalanceChange[]; ``` **Source:** [src/horizon/horizon_api.ts:579](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L579) ### `invokeHostFunctionOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `invokeHostFunctionOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `invokeHostFunctionOperationRecord.function` ```ts function: string; ``` **Source:** [src/horizon/horizon_api.ts:572](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L572) ### `invokeHostFunctionOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `invokeHostFunctionOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `invokeHostFunctionOperationRecord.parameters` ```ts parameters: { type: string; value: string }[]; ``` **Source:** [src/horizon/horizon_api.ts:573](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L573) ### `invokeHostFunctionOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `invokeHostFunctionOperationRecord.salt` ```ts salt: string; ``` **Source:** [src/horizon/horizon_api.ts:578](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L578) ### `invokeHostFunctionOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `invokeHostFunctionOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `invokeHostFunctionOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `invokeHostFunctionOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `invokeHostFunctionOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `invokeHostFunctionOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `invokeHostFunctionOperationRecord.type` ```ts type: invokeHostFunction; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `invokeHostFunctionOperationRecord.type_i` ```ts type_i: invokeHostFunction; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.LedgerRecord ```ts interface LedgerRecord extends BaseResponse { _links: { self: ResponseLink }; base_fee_in_stroops: number; base_reserve_in_stroops: number; closed_at: string; effects: CallCollectionFunction; failed_transaction_count: number; fee_pool: string; hash: string; header_xdr: string; id: string; max_tx_set_size: number; operation_count: number; operations: CallCollectionFunction; paging_token: string; prev_hash: string; protocol_version: number; self: CallFunction; sequence: number; successful_transaction_count: number; total_coins: string; transactions: CallCollectionFunction; tx_set_operation_count: number | null; } ``` **Source:** [src/horizon/server_api.ts:145](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L145) ### `ledgerRecord._links` ```ts _links: { self: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `ledgerRecord.base_fee_in_stroops` ```ts base_fee_in_stroops: number; ``` **Source:** [src/horizon/server_api.ts:161](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L161) ### `ledgerRecord.base_reserve_in_stroops` ```ts base_reserve_in_stroops: number; ``` **Source:** [src/horizon/server_api.ts:162](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L162) ### `ledgerRecord.closed_at` ```ts closed_at: string; ``` **Source:** [src/horizon/server_api.ts:155](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L155) ### `ledgerRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:164](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L164) ### `ledgerRecord.failed_transaction_count` ```ts failed_transaction_count: number; ``` **Source:** [src/horizon/server_api.ts:152](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L152) ### `ledgerRecord.fee_pool` ```ts fee_pool: string; ``` **Source:** [src/horizon/server_api.ts:157](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L157) ### `ledgerRecord.hash` ```ts hash: string; ``` **Source:** [src/horizon/server_api.ts:148](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L148) ### `ledgerRecord.header_xdr` ```ts header_xdr: string; ``` **Source:** [src/horizon/server_api.ts:160](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L160) ### `ledgerRecord.id` ```ts id: string; ``` **Source:** [src/horizon/server_api.ts:146](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L146) ### `ledgerRecord.max_tx_set_size` ```ts max_tx_set_size: number; ``` **Source:** [src/horizon/server_api.ts:158](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L158) ### `ledgerRecord.operation_count` ```ts operation_count: number; ``` **Source:** [src/horizon/server_api.ts:153](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L153) ### `ledgerRecord.operations` ```ts operations: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:165](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L165) ### `ledgerRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/server_api.ts:147](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L147) ### `ledgerRecord.prev_hash` ```ts prev_hash: string; ``` **Source:** [src/horizon/server_api.ts:149](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L149) ### `ledgerRecord.protocol_version` ```ts protocol_version: number; ``` **Source:** [src/horizon/server_api.ts:159](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L159) ### `ledgerRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:166](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L166) ### `ledgerRecord.sequence` ```ts sequence: number; ``` **Source:** [src/horizon/server_api.ts:150](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L150) ### `ledgerRecord.successful_transaction_count` ```ts successful_transaction_count: number; ``` **Source:** [src/horizon/server_api.ts:151](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L151) ### `ledgerRecord.total_coins` ```ts total_coins: string; ``` **Source:** [src/horizon/server_api.ts:156](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L156) ### `ledgerRecord.transactions` ```ts transactions: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:167](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L167) ### `ledgerRecord.tx_set_operation_count` ```ts tx_set_operation_count: number | null; ``` **Source:** [src/horizon/server_api.ts:154](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L154) ## Horizon.ServerApi.LiquidityPoolRecord ```ts interface LiquidityPoolRecord extends BaseResponse { _links: { self: ResponseLink }; fee_bp: number; id: string; paging_token: string; reserves: Reserve[]; total_shares: string; total_trustlines: string; type: LiquidityPoolType; } ``` **Source:** [src/horizon/server_api.ts:126](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L126) ### `liquidityPoolRecord._links` ```ts _links: { self: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `liquidityPoolRecord.fee_bp` ```ts fee_bp: number; ``` **Source:** [src/horizon/server_api.ts:129](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L129) ### `liquidityPoolRecord.id` ```ts id: string; ``` **Source:** [src/horizon/server_api.ts:127](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L127) ### `liquidityPoolRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/server_api.ts:128](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L128) ### `liquidityPoolRecord.reserves` ```ts reserves: Reserve[]; ``` **Source:** [src/horizon/server_api.ts:133](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L133) ### `liquidityPoolRecord.total_shares` ```ts total_shares: string; ``` **Source:** [src/horizon/server_api.ts:132](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L132) ### `liquidityPoolRecord.total_trustlines` ```ts total_trustlines: string; ``` **Source:** [src/horizon/server_api.ts:131](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L131) ### `liquidityPoolRecord.type` ```ts type: LiquidityPoolType; ``` **Source:** [src/horizon/server_api.ts:130](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L130) ## Horizon.ServerApi.ManageDataOperationRecord ```ts interface ManageDataOperationRecord extends BaseOperationRecord, ManageDataOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; created_at: string; effects: CallCollectionFunction; id: string; name: string; paging_token: string; precedes: CallFunction; self: CallFunction; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: manageData; type_i: manageData; value: Buffer; } ``` **Source:** [src/horizon/server_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L263) ### `manageDataOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `manageDataOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `manageDataOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `manageDataOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `manageDataOperationRecord.name` ```ts name: string; ``` **Source:** [src/horizon/horizon_api.ts:430](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L430) ### `manageDataOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `manageDataOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `manageDataOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `manageDataOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `manageDataOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `manageDataOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `manageDataOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `manageDataOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `manageDataOperationRecord.type` ```ts type: manageData; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `manageDataOperationRecord.type_i` ```ts type_i: manageData; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ### `manageDataOperationRecord.value` ```ts value: Buffer; ``` **Source:** [src/horizon/horizon_api.ts:431](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L431) ## Horizon.ServerApi.ManageOfferOperationRecord ```ts interface ManageOfferOperationRecord extends BaseOperationRecord, ManageOfferOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; amount: string; buying_asset_code?: string; buying_asset_issuer?: string; buying_asset_type: AssetType; created_at: string; effects: CallCollectionFunction; id: string; offer_id: string | number; paging_token: string; precedes: CallFunction; price: string; price_r: PriceR; self: CallFunction; selling_asset_code?: string; selling_asset_issuer?: string; selling_asset_type: AssetType; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: manageOffer; type_i: manageOffer; } ``` **Source:** [src/horizon/server_api.ts:214](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L214) ### `manageOfferOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `manageOfferOperationRecord.amount` ```ts amount: string; ``` **Source:** [src/horizon/horizon_api.ts:340](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L340) ### `manageOfferOperationRecord.buying_asset_code` ```ts buying_asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:342](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L342) ### `manageOfferOperationRecord.buying_asset_issuer` ```ts buying_asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:343](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L343) ### `manageOfferOperationRecord.buying_asset_type` ```ts buying_asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:341](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L341) ### `manageOfferOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `manageOfferOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `manageOfferOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `manageOfferOperationRecord.offer_id` ```ts offer_id: string | number; ``` **Source:** [src/horizon/horizon_api.ts:339](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L339) ### `manageOfferOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `manageOfferOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `manageOfferOperationRecord.price` ```ts price: string; ``` **Source:** [src/horizon/horizon_api.ts:344](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L344) ### `manageOfferOperationRecord.price_r` ```ts price_r: PriceR; ``` **Source:** [src/horizon/horizon_api.ts:345](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L345) ### `manageOfferOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `manageOfferOperationRecord.selling_asset_code` ```ts selling_asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:347](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L347) ### `manageOfferOperationRecord.selling_asset_issuer` ```ts selling_asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:348](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L348) ### `manageOfferOperationRecord.selling_asset_type` ```ts selling_asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:346](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L346) ### `manageOfferOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `manageOfferOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `manageOfferOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `manageOfferOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `manageOfferOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `manageOfferOperationRecord.type` ```ts type: manageOffer; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `manageOfferOperationRecord.type_i` ```ts type_i: manageOffer; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.OfferRecord ```ts type OfferRecord = OfferRecordType ``` **Source:** [src/horizon/server_api.ts:13](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L13) ## Horizon.ServerApi.OperationRecord ```ts type OperationRecord = CreateAccountOperationRecord | PaymentOperationRecord | PathPaymentOperationRecord | ManageOfferOperationRecord | PassiveOfferOperationRecord | SetOptionsOperationRecord | ChangeTrustOperationRecord | AllowTrustOperationRecord | AccountMergeOperationRecord | InflationOperationRecord | ManageDataOperationRecord | BumpSequenceOperationRecord | PathPaymentStrictSendOperationRecord | CreateClaimableBalanceOperationRecord | ClaimClaimableBalanceOperationRecord | BeginSponsoringFutureReservesOperationRecord | EndSponsoringFutureReservesOperationRecord | RevokeSponsorshipOperationRecord | ClawbackClaimableBalanceOperationRecord | ClawbackOperationRecord | SetTrustLineFlagsOperationRecord | DepositLiquidityOperationRecord | WithdrawLiquidityOperationRecord | InvokeHostFunctionOperationRecord | BumpFootprintExpirationOperationRecord | RestoreFootprintOperationRecord ``` **Source:** [src/horizon/server_api.ts:369](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L369) ## Horizon.ServerApi.OrderbookRecord ```ts interface OrderbookRecord extends BaseResponse { _links: { self: ResponseLink }; asks: { amount: string; price: string; price_r: { d: number; n: number } }[]; base: Asset; bids: { amount: string; price: string; price_r: { d: number; n: number } }[]; counter: Asset; } ``` **Source:** [src/horizon/server_api.ts:456](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L456) ### `orderbookRecord._links` ```ts _links: { self: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `orderbookRecord.asks` ```ts asks: { amount: string; price: string; price_r: { d: number; n: number } }[]; ``` **Source:** [src/horizon/server_api.ts:465](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L465) ### `orderbookRecord.base` ```ts base: Asset; ``` **Source:** [src/horizon/server_api.ts:473](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L473) ### `orderbookRecord.bids` ```ts bids: { amount: string; price: string; price_r: { d: number; n: number } }[]; ``` **Source:** [src/horizon/server_api.ts:457](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L457) ### `orderbookRecord.counter` ```ts counter: Asset; ``` **Source:** [src/horizon/server_api.ts:474](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L474) ## Horizon.ServerApi.PassiveOfferOperationRecord ```ts interface PassiveOfferOperationRecord extends BaseOperationRecord, PassiveOfferOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; amount: string; buying_asset_code?: string; buying_asset_issuer?: string; buying_asset_type: AssetType; created_at: string; effects: CallCollectionFunction; id: string; offer_id: string | number; paging_token: string; precedes: CallFunction; price: string; price_r: PriceR; self: CallFunction; selling_asset_code?: string; selling_asset_issuer?: string; selling_asset_type: AssetType; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: createPassiveOffer; type_i: createPassiveOffer; } ``` **Source:** [src/horizon/server_api.ts:221](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L221) ### `passiveOfferOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `passiveOfferOperationRecord.amount` ```ts amount: string; ``` **Source:** [src/horizon/horizon_api.ts:355](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L355) ### `passiveOfferOperationRecord.buying_asset_code` ```ts buying_asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:357](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L357) ### `passiveOfferOperationRecord.buying_asset_issuer` ```ts buying_asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:358](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L358) ### `passiveOfferOperationRecord.buying_asset_type` ```ts buying_asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:356](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L356) ### `passiveOfferOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `passiveOfferOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `passiveOfferOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `passiveOfferOperationRecord.offer_id` ```ts offer_id: string | number; ``` **Source:** [src/horizon/horizon_api.ts:354](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L354) ### `passiveOfferOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `passiveOfferOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `passiveOfferOperationRecord.price` ```ts price: string; ``` **Source:** [src/horizon/horizon_api.ts:359](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L359) ### `passiveOfferOperationRecord.price_r` ```ts price_r: PriceR; ``` **Source:** [src/horizon/horizon_api.ts:360](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L360) ### `passiveOfferOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `passiveOfferOperationRecord.selling_asset_code` ```ts selling_asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:362](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L362) ### `passiveOfferOperationRecord.selling_asset_issuer` ```ts selling_asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:363](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L363) ### `passiveOfferOperationRecord.selling_asset_type` ```ts selling_asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:361](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L361) ### `passiveOfferOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `passiveOfferOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `passiveOfferOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `passiveOfferOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `passiveOfferOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `passiveOfferOperationRecord.type` ```ts type: createPassiveOffer; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `passiveOfferOperationRecord.type_i` ```ts type_i: createPassiveOffer; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.PathPaymentOperationRecord ```ts interface PathPaymentOperationRecord extends BaseOperationRecord, PathPaymentOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; amount: string; asset_code?: string; asset_issuer?: string; asset_type: AssetType; created_at: string; effects: CallCollectionFunction; from: string; id: string; paging_token: string; path: { asset_code: string; asset_issuer: string; asset_type: AssetType }[]; precedes: CallFunction; self: CallFunction; source_account: string; source_amount: string; source_asset_code?: string; source_asset_issuer?: string; source_asset_type: AssetType; source_max: string; succeeds: CallFunction; to: string; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: pathPayment; type_i: pathPayment; } ``` **Source:** [src/horizon/server_api.ts:200](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L200) ### `pathPaymentOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `pathPaymentOperationRecord.amount` ```ts amount: string; ``` **Source:** [src/horizon/horizon_api.ts:297](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L297) ### `pathPaymentOperationRecord.asset_code` ```ts asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:298](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L298) ### `pathPaymentOperationRecord.asset_issuer` ```ts asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:299](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L299) ### `pathPaymentOperationRecord.asset_type` ```ts asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:300](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L300) ### `pathPaymentOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `pathPaymentOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `pathPaymentOperationRecord.from` ```ts from: string; ``` **Source:** [src/horizon/horizon_api.ts:301](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L301) ### `pathPaymentOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `pathPaymentOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `pathPaymentOperationRecord.path` ```ts path: { asset_code: string; asset_issuer: string; asset_type: AssetType }[]; ``` **Source:** [src/horizon/horizon_api.ts:302](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L302) ### `pathPaymentOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `pathPaymentOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `pathPaymentOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `pathPaymentOperationRecord.source_amount` ```ts source_amount: string; ``` **Source:** [src/horizon/horizon_api.ts:307](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L307) ### `pathPaymentOperationRecord.source_asset_code` ```ts source_asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:308](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L308) ### `pathPaymentOperationRecord.source_asset_issuer` ```ts source_asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:309](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L309) ### `pathPaymentOperationRecord.source_asset_type` ```ts source_asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:310](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L310) ### `pathPaymentOperationRecord.source_max` ```ts source_max: string; ``` **Source:** [src/horizon/horizon_api.ts:311](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L311) ### `pathPaymentOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `pathPaymentOperationRecord.to` ```ts to: string; ``` **Source:** [src/horizon/horizon_api.ts:312](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L312) ### `pathPaymentOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `pathPaymentOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `pathPaymentOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `pathPaymentOperationRecord.type` ```ts type: pathPayment; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `pathPaymentOperationRecord.type_i` ```ts type_i: pathPayment; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.PathPaymentStrictSendOperationRecord ```ts interface PathPaymentStrictSendOperationRecord extends BaseOperationRecord, PathPaymentStrictSendOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; amount: string; asset_code?: string; asset_issuer?: string; asset_type: AssetType; created_at: string; destination_min: string; effects: CallCollectionFunction; from: string; id: string; paging_token: string; path: { asset_code: string; asset_issuer: string; asset_type: AssetType }[]; precedes: CallFunction; self: CallFunction; source_account: string; source_amount: string; source_asset_code?: string; source_asset_issuer?: string; source_asset_type: AssetType; succeeds: CallFunction; to: string; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: pathPaymentStrictSend; type_i: pathPaymentStrictSend; } ``` **Source:** [src/horizon/server_api.ts:207](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L207) ### `pathPaymentStrictSendOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `pathPaymentStrictSendOperationRecord.amount` ```ts amount: string; ``` **Source:** [src/horizon/horizon_api.ts:318](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L318) ### `pathPaymentStrictSendOperationRecord.asset_code` ```ts asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:319](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L319) ### `pathPaymentStrictSendOperationRecord.asset_issuer` ```ts asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:320](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L320) ### `pathPaymentStrictSendOperationRecord.asset_type` ```ts asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:321](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L321) ### `pathPaymentStrictSendOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `pathPaymentStrictSendOperationRecord.destination_min` ```ts destination_min: string; ``` **Source:** [src/horizon/horizon_api.ts:322](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L322) ### `pathPaymentStrictSendOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `pathPaymentStrictSendOperationRecord.from` ```ts from: string; ``` **Source:** [src/horizon/horizon_api.ts:323](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L323) ### `pathPaymentStrictSendOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `pathPaymentStrictSendOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `pathPaymentStrictSendOperationRecord.path` ```ts path: { asset_code: string; asset_issuer: string; asset_type: AssetType }[]; ``` **Source:** [src/horizon/horizon_api.ts:324](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L324) ### `pathPaymentStrictSendOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `pathPaymentStrictSendOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `pathPaymentStrictSendOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `pathPaymentStrictSendOperationRecord.source_amount` ```ts source_amount: string; ``` **Source:** [src/horizon/horizon_api.ts:329](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L329) ### `pathPaymentStrictSendOperationRecord.source_asset_code` ```ts source_asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:330](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L330) ### `pathPaymentStrictSendOperationRecord.source_asset_issuer` ```ts source_asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:331](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L331) ### `pathPaymentStrictSendOperationRecord.source_asset_type` ```ts source_asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:332](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L332) ### `pathPaymentStrictSendOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `pathPaymentStrictSendOperationRecord.to` ```ts to: string; ``` **Source:** [src/horizon/horizon_api.ts:333](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L333) ### `pathPaymentStrictSendOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `pathPaymentStrictSendOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `pathPaymentStrictSendOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `pathPaymentStrictSendOperationRecord.type` ```ts type: pathPaymentStrictSend; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `pathPaymentStrictSendOperationRecord.type_i` ```ts type_i: pathPaymentStrictSend; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.PaymentOperationRecord ```ts interface PaymentOperationRecord extends BaseOperationRecord, PaymentOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; amount: string; asset_code?: string; asset_issuer?: string; asset_type: AssetType; created_at: string; effects: CallCollectionFunction; from: string; id: string; paging_token: string; precedes: CallFunction; receiver: CallFunction; self: CallFunction; sender: CallFunction; source_account: string; succeeds: CallFunction; to: string; to_muxed?: string; to_muxed_id?: string; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: payment; type_i: payment; } ``` **Source:** [src/horizon/server_api.ts:190](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L190) ### `paymentOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `paymentOperationRecord.amount` ```ts amount: string; ``` **Source:** [src/horizon/horizon_api.ts:289](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L289) ### `paymentOperationRecord.asset_code` ```ts asset_code?: string; ``` **Source:** [src/horizon/horizon_api.ts:287](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L287) ### `paymentOperationRecord.asset_issuer` ```ts asset_issuer?: string; ``` **Source:** [src/horizon/horizon_api.ts:288](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L288) ### `paymentOperationRecord.asset_type` ```ts asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:286](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L286) ### `paymentOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `paymentOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `paymentOperationRecord.from` ```ts from: string; ``` **Source:** [src/horizon/horizon_api.ts:284](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L284) ### `paymentOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `paymentOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `paymentOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `paymentOperationRecord.receiver` ```ts receiver: CallFunction; ``` **Source:** [src/horizon/server_api.ts:198](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L198) ### `paymentOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `paymentOperationRecord.sender` ```ts sender: CallFunction; ``` **Source:** [src/horizon/server_api.ts:197](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L197) ### `paymentOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `paymentOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `paymentOperationRecord.to` ```ts to: string; ``` **Source:** [src/horizon/horizon_api.ts:285](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L285) ### `paymentOperationRecord.to_muxed` ```ts to_muxed?: string; ``` **Source:** [src/horizon/horizon_api.ts:290](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L290) ### `paymentOperationRecord.to_muxed_id` ```ts to_muxed_id?: string; ``` **Source:** [src/horizon/horizon_api.ts:291](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L291) ### `paymentOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `paymentOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `paymentOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `paymentOperationRecord.type` ```ts type: payment; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `paymentOperationRecord.type_i` ```ts type_i: payment; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.PaymentPathRecord ```ts interface PaymentPathRecord extends BaseResponse { _links: { self: ResponseLink }; destination_amount: string; destination_asset_code: string; destination_asset_issuer: string; destination_asset_type: string; path: { asset_code: string; asset_issuer: string; asset_type: string }[]; source_amount: string; source_asset_code: string; source_asset_issuer: string; source_asset_type: string; } ``` **Source:** [src/horizon/server_api.ts:476](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L476) ### `paymentPathRecord._links` ```ts _links: { self: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `paymentPathRecord.destination_amount` ```ts destination_amount: string; ``` **Source:** [src/horizon/server_api.ts:486](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L486) ### `paymentPathRecord.destination_asset_code` ```ts destination_asset_code: string; ``` **Source:** [src/horizon/server_api.ts:488](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L488) ### `paymentPathRecord.destination_asset_issuer` ```ts destination_asset_issuer: string; ``` **Source:** [src/horizon/server_api.ts:489](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L489) ### `paymentPathRecord.destination_asset_type` ```ts destination_asset_type: string; ``` **Source:** [src/horizon/server_api.ts:487](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L487) ### `paymentPathRecord.path` ```ts path: { asset_code: string; asset_issuer: string; asset_type: string }[]; ``` **Source:** [src/horizon/server_api.ts:477](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L477) ### `paymentPathRecord.source_amount` ```ts source_amount: string; ``` **Source:** [src/horizon/server_api.ts:482](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L482) ### `paymentPathRecord.source_asset_code` ```ts source_asset_code: string; ``` **Source:** [src/horizon/server_api.ts:484](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L484) ### `paymentPathRecord.source_asset_issuer` ```ts source_asset_issuer: string; ``` **Source:** [src/horizon/server_api.ts:485](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L485) ### `paymentPathRecord.source_asset_type` ```ts source_asset_type: string; ``` **Source:** [src/horizon/server_api.ts:483](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L483) ## Horizon.ServerApi.RestoreFootprintOperationRecord ```ts interface RestoreFootprintOperationRecord extends BaseOperationRecord, RestoreFootprintOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; created_at: string; effects: CallCollectionFunction; id: string; paging_token: string; precedes: CallFunction; self: CallFunction; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: restoreFootprint; type_i: restoreFootprint; } ``` **Source:** [src/horizon/server_api.ts:361](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L361) ### `restoreFootprintOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `restoreFootprintOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `restoreFootprintOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `restoreFootprintOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `restoreFootprintOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `restoreFootprintOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `restoreFootprintOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `restoreFootprintOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `restoreFootprintOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `restoreFootprintOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `restoreFootprintOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `restoreFootprintOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `restoreFootprintOperationRecord.type` ```ts type: restoreFootprint; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `restoreFootprintOperationRecord.type_i` ```ts type_i: restoreFootprint; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.RevokeSponsorshipOperationRecord ```ts interface RevokeSponsorshipOperationRecord extends BaseOperationRecord, RevokeSponsorshipOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; account_id?: string; claimable_balance_id?: string; created_at: string; data_account_id?: string; data_name?: string; effects: CallCollectionFunction; id: string; offer_id?: string; paging_token: string; precedes: CallFunction; self: CallFunction; signer_account_id?: string; signer_key?: string; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; trustline_account_id?: string; trustline_asset?: string; trustline_liquidity_pool_id?: string; type: revokeSponsorship; type_i: revokeSponsorship; } ``` **Source:** [src/horizon/server_api.ts:305](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L305) ### `revokeSponsorshipOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `revokeSponsorshipOperationRecord.account_id` ```ts account_id?: string; ``` **Source:** [src/horizon/horizon_api.ts:488](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L488) ### `revokeSponsorshipOperationRecord.claimable_balance_id` ```ts claimable_balance_id?: string; ``` **Source:** [src/horizon/horizon_api.ts:489](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L489) ### `revokeSponsorshipOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `revokeSponsorshipOperationRecord.data_account_id` ```ts data_account_id?: string; ``` **Source:** [src/horizon/horizon_api.ts:490](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L490) ### `revokeSponsorshipOperationRecord.data_name` ```ts data_name?: string; ``` **Source:** [src/horizon/horizon_api.ts:491](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L491) ### `revokeSponsorshipOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `revokeSponsorshipOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `revokeSponsorshipOperationRecord.offer_id` ```ts offer_id?: string; ``` **Source:** [src/horizon/horizon_api.ts:492](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L492) ### `revokeSponsorshipOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `revokeSponsorshipOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `revokeSponsorshipOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `revokeSponsorshipOperationRecord.signer_account_id` ```ts signer_account_id?: string; ``` **Source:** [src/horizon/horizon_api.ts:496](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L496) ### `revokeSponsorshipOperationRecord.signer_key` ```ts signer_key?: string; ``` **Source:** [src/horizon/horizon_api.ts:497](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L497) ### `revokeSponsorshipOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `revokeSponsorshipOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `revokeSponsorshipOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `revokeSponsorshipOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `revokeSponsorshipOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `revokeSponsorshipOperationRecord.trustline_account_id` ```ts trustline_account_id?: string; ``` **Source:** [src/horizon/horizon_api.ts:493](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L493) ### `revokeSponsorshipOperationRecord.trustline_asset` ```ts trustline_asset?: string; ``` **Source:** [src/horizon/horizon_api.ts:494](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L494) ### `revokeSponsorshipOperationRecord.trustline_liquidity_pool_id` ```ts trustline_liquidity_pool_id?: string; ``` **Source:** [src/horizon/horizon_api.ts:495](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L495) ### `revokeSponsorshipOperationRecord.type` ```ts type: revokeSponsorship; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `revokeSponsorshipOperationRecord.type_i` ```ts type_i: revokeSponsorship; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.SetOptionsOperationRecord ```ts interface SetOptionsOperationRecord extends BaseOperationRecord, SetOptionsOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; clear_flags: (1 | 2 | 4)[]; clear_flags_s: ("auth_required_flag" | "auth_revocable_flag" | "auth_clawback_enabled_flag")[]; created_at: string; effects: CallCollectionFunction; high_threshold?: number; home_domain?: string; id: string; low_threshold?: number; master_key_weight?: number; med_threshold?: number; paging_token: string; precedes: CallFunction; self: CallFunction; set_flags: (1 | 2 | 4)[]; set_flags_s: ("auth_required_flag" | "auth_revocable_flag" | "auth_clawback_enabled_flag")[]; signer_key?: string; signer_weight?: number; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: setOptions; type_i: setOptions; } ``` **Source:** [src/horizon/server_api.ts:228](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L228) ### `setOptionsOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `setOptionsOperationRecord.clear_flags` ```ts clear_flags: (1 | 2 | 4)[]; ``` **Source:** [src/horizon/horizon_api.ts:382](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L382) ### `setOptionsOperationRecord.clear_flags_s` ```ts clear_flags_s: ("auth_required_flag" | "auth_revocable_flag" | "auth_clawback_enabled_flag")[]; ``` **Source:** [src/horizon/horizon_api.ts:383](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L383) ### `setOptionsOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `setOptionsOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `setOptionsOperationRecord.high_threshold` ```ts high_threshold?: number; ``` **Source:** [src/horizon/horizon_api.ts:374](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L374) ### `setOptionsOperationRecord.home_domain` ```ts home_domain?: string; ``` **Source:** [src/horizon/horizon_api.ts:375](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L375) ### `setOptionsOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `setOptionsOperationRecord.low_threshold` ```ts low_threshold?: number; ``` **Source:** [src/horizon/horizon_api.ts:372](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L372) ### `setOptionsOperationRecord.master_key_weight` ```ts master_key_weight?: number; ``` **Source:** [src/horizon/horizon_api.ts:371](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L371) ### `setOptionsOperationRecord.med_threshold` ```ts med_threshold?: number; ``` **Source:** [src/horizon/horizon_api.ts:373](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L373) ### `setOptionsOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `setOptionsOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `setOptionsOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `setOptionsOperationRecord.set_flags` ```ts set_flags: (1 | 2 | 4)[]; ``` **Source:** [src/horizon/horizon_api.ts:376](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L376) ### `setOptionsOperationRecord.set_flags_s` ```ts set_flags_s: ("auth_required_flag" | "auth_revocable_flag" | "auth_clawback_enabled_flag")[]; ``` **Source:** [src/horizon/horizon_api.ts:377](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L377) ### `setOptionsOperationRecord.signer_key` ```ts signer_key?: string; ``` **Source:** [src/horizon/horizon_api.ts:369](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L369) ### `setOptionsOperationRecord.signer_weight` ```ts signer_weight?: number; ``` **Source:** [src/horizon/horizon_api.ts:370](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L370) ### `setOptionsOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `setOptionsOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `setOptionsOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `setOptionsOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `setOptionsOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `setOptionsOperationRecord.type` ```ts type: setOptions; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `setOptionsOperationRecord.type_i` ```ts type_i: setOptions; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.SetTrustLineFlagsOperationRecord ```ts interface SetTrustLineFlagsOperationRecord extends BaseOperationRecord, SetTrustLineFlagsOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; asset_code: string; asset_issuer: string; asset_type: AssetType; clear_flags: (1 | 2 | 4)[]; created_at: string; effects: CallCollectionFunction; id: string; paging_token: string; precedes: CallFunction; self: CallFunction; set_flags: (1 | 2 | 4)[]; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; trustor: string; type: setTrustLineFlags; type_i: setTrustLineFlags; } ``` **Source:** [src/horizon/server_api.ts:326](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L326) ### `setTrustLineFlagsOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `setTrustLineFlagsOperationRecord.asset_code` ```ts asset_code: string; ``` **Source:** [src/horizon/horizon_api.ts:523](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L523) ### `setTrustLineFlagsOperationRecord.asset_issuer` ```ts asset_issuer: string; ``` **Source:** [src/horizon/horizon_api.ts:524](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L524) ### `setTrustLineFlagsOperationRecord.asset_type` ```ts asset_type: AssetType; ``` **Source:** [src/horizon/horizon_api.ts:522](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L522) ### `setTrustLineFlagsOperationRecord.clear_flags` ```ts clear_flags: (1 | 2 | 4)[]; ``` **Source:** [src/horizon/horizon_api.ts:527](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L527) ### `setTrustLineFlagsOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `setTrustLineFlagsOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `setTrustLineFlagsOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `setTrustLineFlagsOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `setTrustLineFlagsOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `setTrustLineFlagsOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `setTrustLineFlagsOperationRecord.set_flags` ```ts set_flags: (1 | 2 | 4)[]; ``` **Source:** [src/horizon/horizon_api.ts:526](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L526) ### `setTrustLineFlagsOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `setTrustLineFlagsOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `setTrustLineFlagsOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `setTrustLineFlagsOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `setTrustLineFlagsOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `setTrustLineFlagsOperationRecord.trustor` ```ts trustor: string; ``` **Source:** [src/horizon/horizon_api.ts:525](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L525) ### `setTrustLineFlagsOperationRecord.type` ```ts type: setTrustLineFlags; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `setTrustLineFlagsOperationRecord.type_i` ```ts type_i: setTrustLineFlags; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.ServerApi.TradeRecord ```ts type TradeRecord = TradeRecord.Orderbook | TradeRecord.LiquidityPool ``` **Source:** [src/horizon/server_api.ts:397](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L397) ## Horizon.ServerApi.TradeRecord.LiquidityPool ```ts interface LiquidityPool extends Base { _links: { self: ResponseLink }; base: CallFunction; base_account?: string; base_amount: string; base_asset_code?: string; base_asset_issuer?: string; base_asset_type: string; base_is_seller: boolean; base_liquidity_pool_id?: string; counter: CallFunction; counter_account?: string; counter_amount: string; counter_asset_code?: string; counter_asset_issuer?: string; counter_asset_type: string; counter_liquidity_pool_id?: string; id: string; ledger_close_time: string; liquidity_pool_fee_bp: number; operation: CallFunction; paging_token: string; price?: { d: string; n: string }; trade_type: liquidityPools; } ``` **Source:** [src/horizon/server_api.ts:431](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L431) ### `liquidityPool._links` ```ts _links: { self: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `liquidityPool.base` ```ts base: CallFunction; ``` **Source:** [src/horizon/server_api.ts:437](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L437) ### `liquidityPool.base_account` ```ts base_account?: string; ``` **Source:** [src/horizon/server_api.ts:403](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L403) ### `liquidityPool.base_amount` ```ts base_amount: string; ``` **Source:** [src/horizon/server_api.ts:404](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L404) ### `liquidityPool.base_asset_code` ```ts base_asset_code?: string; ``` **Source:** [src/horizon/server_api.ts:406](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L406) ### `liquidityPool.base_asset_issuer` ```ts base_asset_issuer?: string; ``` **Source:** [src/horizon/server_api.ts:407](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L407) ### `liquidityPool.base_asset_type` ```ts base_asset_type: string; ``` **Source:** [src/horizon/server_api.ts:405](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L405) ### `liquidityPool.base_is_seller` ```ts base_is_seller: boolean; ``` **Source:** [src/horizon/server_api.ts:413](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L413) ### `liquidityPool.base_liquidity_pool_id` ```ts base_liquidity_pool_id?: string; ``` **Source:** [src/horizon/server_api.ts:433](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L433) ### `liquidityPool.counter` ```ts counter: CallFunction; ``` **Source:** [src/horizon/server_api.ts:438](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L438) ### `liquidityPool.counter_account` ```ts counter_account?: string; ``` **Source:** [src/horizon/server_api.ts:408](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L408) ### `liquidityPool.counter_amount` ```ts counter_amount: string; ``` **Source:** [src/horizon/server_api.ts:409](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L409) ### `liquidityPool.counter_asset_code` ```ts counter_asset_code?: string; ``` **Source:** [src/horizon/server_api.ts:411](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L411) ### `liquidityPool.counter_asset_issuer` ```ts counter_asset_issuer?: string; ``` **Source:** [src/horizon/server_api.ts:412](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L412) ### `liquidityPool.counter_asset_type` ```ts counter_asset_type: string; ``` **Source:** [src/horizon/server_api.ts:410](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L410) ### `liquidityPool.counter_liquidity_pool_id` ```ts counter_liquidity_pool_id?: string; ``` **Source:** [src/horizon/server_api.ts:434](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L434) ### `liquidityPool.id` ```ts id: string; ``` **Source:** [src/horizon/server_api.ts:399](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L399) ### `liquidityPool.ledger_close_time` ```ts ledger_close_time: string; ``` **Source:** [src/horizon/server_api.ts:401](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L401) ### `liquidityPool.liquidity_pool_fee_bp` ```ts liquidity_pool_fee_bp: number; ``` **Source:** [src/horizon/server_api.ts:435](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L435) ### `liquidityPool.operation` ```ts operation: CallFunction; ``` **Source:** [src/horizon/server_api.ts:419](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L419) ### `liquidityPool.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/server_api.ts:400](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L400) ### `liquidityPool.price` ```ts price?: { d: string; n: string }; ``` **Source:** [src/horizon/server_api.ts:414](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L414) ### `liquidityPool.trade_type` ```ts trade_type: liquidityPools; ``` **Source:** [src/horizon/server_api.ts:432](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L432) ## Horizon.ServerApi.TradeRecord.Orderbook ```ts interface Orderbook extends Base { _links: { self: ResponseLink }; base: CallFunction; base_account: string; base_amount: string; base_asset_code?: string; base_asset_issuer?: string; base_asset_type: string; base_is_seller: boolean; base_offer_id: string; counter: CallFunction; counter_account: string; counter_amount: string; counter_asset_code?: string; counter_asset_issuer?: string; counter_asset_type: string; counter_offer_id: string; id: string; ledger_close_time: string; operation: CallFunction; paging_token: string; price?: { d: string; n: string }; trade_type: orderbook; } ``` **Source:** [src/horizon/server_api.ts:421](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L421) ### `orderbook._links` ```ts _links: { self: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `orderbook.base` ```ts base: CallFunction; ``` **Source:** [src/horizon/server_api.ts:428](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L428) ### `orderbook.base_account` ```ts base_account: string; ``` **Source:** [src/horizon/server_api.ts:424](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L424) ### `orderbook.base_amount` ```ts base_amount: string; ``` **Source:** [src/horizon/server_api.ts:404](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L404) ### `orderbook.base_asset_code` ```ts base_asset_code?: string; ``` **Source:** [src/horizon/server_api.ts:406](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L406) ### `orderbook.base_asset_issuer` ```ts base_asset_issuer?: string; ``` **Source:** [src/horizon/server_api.ts:407](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L407) ### `orderbook.base_asset_type` ```ts base_asset_type: string; ``` **Source:** [src/horizon/server_api.ts:405](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L405) ### `orderbook.base_is_seller` ```ts base_is_seller: boolean; ``` **Source:** [src/horizon/server_api.ts:413](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L413) ### `orderbook.base_offer_id` ```ts base_offer_id: string; ``` **Source:** [src/horizon/server_api.ts:423](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L423) ### `orderbook.counter` ```ts counter: CallFunction; ``` **Source:** [src/horizon/server_api.ts:429](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L429) ### `orderbook.counter_account` ```ts counter_account: string; ``` **Source:** [src/horizon/server_api.ts:426](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L426) ### `orderbook.counter_amount` ```ts counter_amount: string; ``` **Source:** [src/horizon/server_api.ts:409](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L409) ### `orderbook.counter_asset_code` ```ts counter_asset_code?: string; ``` **Source:** [src/horizon/server_api.ts:411](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L411) ### `orderbook.counter_asset_issuer` ```ts counter_asset_issuer?: string; ``` **Source:** [src/horizon/server_api.ts:412](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L412) ### `orderbook.counter_asset_type` ```ts counter_asset_type: string; ``` **Source:** [src/horizon/server_api.ts:410](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L410) ### `orderbook.counter_offer_id` ```ts counter_offer_id: string; ``` **Source:** [src/horizon/server_api.ts:425](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L425) ### `orderbook.id` ```ts id: string; ``` **Source:** [src/horizon/server_api.ts:399](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L399) ### `orderbook.ledger_close_time` ```ts ledger_close_time: string; ``` **Source:** [src/horizon/server_api.ts:401](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L401) ### `orderbook.operation` ```ts operation: CallFunction; ``` **Source:** [src/horizon/server_api.ts:419](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L419) ### `orderbook.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/server_api.ts:400](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L400) ### `orderbook.price` ```ts price?: { d: string; n: string }; ``` **Source:** [src/horizon/server_api.ts:414](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L414) ### `orderbook.trade_type` ```ts trade_type: orderbook; ``` **Source:** [src/horizon/server_api.ts:422](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L422) ## Horizon.ServerApi.TradeType ```ts enum TradeType ``` **Source:** [src/horizon/server_api.ts:135](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L135) ## Horizon.ServerApi.TransactionRecord ```ts interface TransactionRecord extends Omit { _links: { account: ResponseLink; effects: ResponseLink; ledger: ResponseLink; operations: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink }; account: CallFunction; created_at: string; effects: CallCollectionFunction; envelope_xdr: string; fee_account: string; fee_bump_transaction?: FeeBumpTransactionResponse; fee_charged: string | number; fee_meta_xdr: string; hash: string; id: string; inner_transaction?: InnerTransactionResponse; ledger: CallFunction; ledger_attr: number; max_fee: string | number; memo?: string; memo_bytes?: string; memo_type: MemoType; operation_count: number; operations: CallCollectionFunction; paging_token: string; precedes: CallFunction; preconditions?: TransactionPreconditions; result_meta_xdr: string; result_xdr: string; self: CallFunction; signatures: string[]; source_account: string; source_account_sequence: string; succeeds: CallFunction; successful: boolean; } ``` **Source:** [src/horizon/server_api.ts:442](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L442) ### `transactionRecord._links` ```ts _links: { account: ResponseLink; effects: ResponseLink; ledger: ResponseLink; operations: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `transactionRecord.account` ```ts account: CallFunction; ``` **Source:** [src/horizon/server_api.ts:448](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L448) ### `transactionRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:66](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L66) ### `transactionRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:449](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L449) ### `transactionRecord.envelope_xdr` ```ts envelope_xdr: string; ``` **Source:** [src/horizon/horizon_api.ts:17](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L17) ### `transactionRecord.fee_account` ```ts fee_account: string; ``` **Source:** [src/horizon/horizon_api.ts:79](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L79) ### `transactionRecord.fee_bump_transaction` ```ts fee_bump_transaction?: FeeBumpTransactionResponse; ``` **Source:** [src/horizon/horizon_api.ts:81](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L81) ### `transactionRecord.fee_charged` ```ts fee_charged: string | number; ``` **Source:** [src/horizon/horizon_api.ts:68](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L68) ### `transactionRecord.fee_meta_xdr` ```ts fee_meta_xdr: string; ``` **Source:** [src/horizon/horizon_api.ts:67](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L67) ### `transactionRecord.hash` ```ts hash: string; ``` **Source:** [src/horizon/horizon_api.ts:14](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L14) ### `transactionRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:70](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L70) ### `transactionRecord.inner_transaction` ```ts inner_transaction?: InnerTransactionResponse; ``` **Source:** [src/horizon/horizon_api.ts:80](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L80) ### `transactionRecord.ledger` ```ts ledger: CallFunction; ``` **Source:** [src/horizon/server_api.ts:450](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L450) ### `transactionRecord.ledger_attr` ```ts ledger_attr: number; ``` **Source:** [src/horizon/server_api.ts:446](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L446) ### `transactionRecord.max_fee` ```ts max_fee: string | number; ``` **Source:** [src/horizon/horizon_api.ts:69](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L69) ### `transactionRecord.memo` ```ts memo?: string; ``` **Source:** [src/horizon/horizon_api.ts:72](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L72) ### `transactionRecord.memo_bytes` ```ts memo_bytes?: string; ``` **Source:** [src/horizon/horizon_api.ts:73](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L73) ### `transactionRecord.memo_type` ```ts memo_type: MemoType; ``` **Source:** [src/horizon/horizon_api.ts:71](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L71) ### `transactionRecord.operation_count` ```ts operation_count: number; ``` **Source:** [src/horizon/horizon_api.ts:74](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L74) ### `transactionRecord.operations` ```ts operations: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:451](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L451) ### `transactionRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:75](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L75) ### `transactionRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:452](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L452) ### `transactionRecord.preconditions` ```ts preconditions?: TransactionPreconditions; ``` **Source:** [src/horizon/horizon_api.ts:82](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L82) ### `transactionRecord.result_meta_xdr` ```ts result_meta_xdr: string; ``` **Source:** [src/horizon/horizon_api.ts:19](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L19) ### `transactionRecord.result_xdr` ```ts result_xdr: string; ``` **Source:** [src/horizon/horizon_api.ts:18](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L18) ### `transactionRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:453](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L453) ### `transactionRecord.signatures` ```ts signatures: string[]; ``` **Source:** [src/horizon/horizon_api.ts:76](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L76) ### `transactionRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:77](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L77) ### `transactionRecord.source_account_sequence` ```ts source_account_sequence: string; ``` **Source:** [src/horizon/horizon_api.ts:78](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L78) ### `transactionRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:454](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L454) ### `transactionRecord.successful` ```ts successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:16](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L16) ## Horizon.ServerApi.WithdrawLiquidityOperationRecord ```ts interface WithdrawLiquidityOperationRecord extends BaseOperationRecord, WithdrawLiquidityOperationResponse { _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; created_at: string; effects: CallCollectionFunction; id: string; liquidity_pool_id: string; paging_token: string; precedes: CallFunction; reserves_min: Reserve[]; reserves_received: Reserve[]; self: CallFunction; shares: string; source_account: string; succeeds: CallFunction; transaction: CallFunction; transaction_hash: string; transaction_successful: boolean; type: liquidityPoolWithdraw; type_i: liquidityPoolWithdraw; } ``` **Source:** [src/horizon/server_api.ts:340](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L340) ### `withdrawLiquidityOperationRecord._links` ```ts _links: { effects: ResponseLink; precedes: ResponseLink; self: ResponseLink; succeeds: ResponseLink; transaction: ResponseLink }; ``` **Source:** [src/horizon/horizon_api.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L10) ### `withdrawLiquidityOperationRecord.created_at` ```ts created_at: string; ``` **Source:** [src/horizon/horizon_api.ts:268](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L268) ### `withdrawLiquidityOperationRecord.effects` ```ts effects: CallCollectionFunction; ``` **Source:** [src/horizon/server_api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L180) ### `withdrawLiquidityOperationRecord.id` ```ts id: string; ``` **Source:** [src/horizon/horizon_api.ts:263](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L263) ### `withdrawLiquidityOperationRecord.liquidity_pool_id` ```ts liquidity_pool_id: string; ``` **Source:** [src/horizon/horizon_api.ts:550](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L550) ### `withdrawLiquidityOperationRecord.paging_token` ```ts paging_token: string; ``` **Source:** [src/horizon/horizon_api.ts:264](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L264) ### `withdrawLiquidityOperationRecord.precedes` ```ts precedes: CallFunction; ``` **Source:** [src/horizon/server_api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L179) ### `withdrawLiquidityOperationRecord.reserves_min` ```ts reserves_min: Reserve[]; ``` **Source:** [src/horizon/horizon_api.ts:551](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L551) ### `withdrawLiquidityOperationRecord.reserves_received` ```ts reserves_received: Reserve[]; ``` **Source:** [src/horizon/horizon_api.ts:553](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L553) ### `withdrawLiquidityOperationRecord.self` ```ts self: CallFunction; ``` **Source:** [src/horizon/server_api.ts:177](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L177) ### `withdrawLiquidityOperationRecord.shares` ```ts shares: string; ``` **Source:** [src/horizon/horizon_api.ts:552](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L552) ### `withdrawLiquidityOperationRecord.source_account` ```ts source_account: string; ``` **Source:** [src/horizon/horizon_api.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L265) ### `withdrawLiquidityOperationRecord.succeeds` ```ts succeeds: CallFunction; ``` **Source:** [src/horizon/server_api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L178) ### `withdrawLiquidityOperationRecord.transaction` ```ts transaction: CallFunction; ``` **Source:** [src/horizon/server_api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/server_api.ts#L181) ### `withdrawLiquidityOperationRecord.transaction_hash` ```ts transaction_hash: string; ``` **Source:** [src/horizon/horizon_api.ts:269](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L269) ### `withdrawLiquidityOperationRecord.transaction_successful` ```ts transaction_successful: boolean; ``` **Source:** [src/horizon/horizon_api.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L270) ### `withdrawLiquidityOperationRecord.type` ```ts type: liquidityPoolWithdraw; ``` **Source:** [src/horizon/horizon_api.ts:266](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L266) ### `withdrawLiquidityOperationRecord.type_i` ```ts type_i: liquidityPoolWithdraw; ``` **Source:** [src/horizon/horizon_api.ts:267](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_api.ts#L267) ## Horizon.getCurrentServerTime 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. ```ts getCurrentServerTime(hostname: string): number | null ``` **Parameters** - **`hostname`** — `string` (required) — Hostname of a Horizon server. **Returns** The UNIX timestamp (in seconds, not milliseconds) representing the current time on that server, or `null` if we don't have a record of that time. **Source:** [src/horizon/horizon_axios_client.ts:96](https://github.com/stellar/js-stellar-sdk/blob/master/src/horizon/horizon_axios_client.ts#L96) # Source: docs/reference/network-rpc.md # Network / RPC ## rpc.Api.BalanceResponse ```ts interface BalanceResponse { balanceEntry?: { amount: string; authorized: boolean; authorizedToMaintainLiabilities?: boolean; clawback: boolean; lastModifiedLedgerSeq?: number; liveUntilLedgerSeq?: number; revocable?: boolean }; latestLedger: number; } ``` **Source:** [src/rpc/api.ts:586](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L586) ### `balanceResponse.balanceEntry` present only on success, otherwise request malformed or no balance ```ts balanceEntry?: { amount: string; authorized: boolean; authorizedToMaintainLiabilities?: boolean; clawback: boolean; lastModifiedLedgerSeq?: number; liveUntilLedgerSeq?: number; revocable?: boolean }; ``` **Source:** [src/rpc/api.ts:589](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L589) ### `balanceResponse.latestLedger` ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:587](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L587) ## rpc.Api.BaseSendTransactionResponse ```ts interface BaseSendTransactionResponse { hash: string; latestLedger: number; latestLedgerCloseTime: number; status: SendTransactionStatus; } ``` **Source:** [src/rpc/api.ts:376](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L376) ### `baseSendTransactionResponse.hash` ```ts hash: string; ``` **Source:** [src/rpc/api.ts:378](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L378) ### `baseSendTransactionResponse.latestLedger` ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:379](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L379) ### `baseSendTransactionResponse.latestLedgerCloseTime` ```ts latestLedgerCloseTime: number; ``` **Source:** [src/rpc/api.ts:380](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L380) ### `baseSendTransactionResponse.status` ```ts status: SendTransactionStatus; ``` **Source:** [src/rpc/api.ts:377](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L377) ## rpc.Api.BaseSimulateTransactionResponse ```ts interface BaseSimulateTransactionResponse { _parsed: boolean; events: DiagnosticEvent[]; id: string; latestLedger: number; } ``` **Source:** [src/rpc/api.ts:410](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L410) ### `baseSimulateTransactionResponse._parsed` a private field to mark the schema as parsed ```ts _parsed: boolean; ``` **Source:** [src/rpc/api.ts:425](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L425) ### `baseSimulateTransactionResponse.events` The field is always present, but may be empty in cases where: - you didn't simulate an invocation or - there were no events ```ts events: DiagnosticEvent[]; ``` **Source:** [src/rpc/api.ts:422](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L422) ### `baseSimulateTransactionResponse.id` always present: the JSON-RPC request ID ```ts id: string; ``` **Source:** [src/rpc/api.ts:412](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L412) ### `baseSimulateTransactionResponse.latestLedger` always present: the LCL known to the server when responding ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:415](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L415) ## rpc.Api.EventFilter ```ts interface EventFilter { contractIds?: string[]; topics?: string[][]; type?: EventType; } ``` **Source:** [src/rpc/api.ts:228](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L228) ### `eventFilter.contractIds` ```ts contractIds?: string[]; ``` **Source:** [src/rpc/api.ts:230](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L230) ### `eventFilter.topics` ```ts topics?: string[][]; ``` **Source:** [src/rpc/api.ts:231](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L231) ### `eventFilter.type` ```ts type?: EventType; ``` **Source:** [src/rpc/api.ts:229](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L229) ## rpc.Api.EventResponse ```ts interface EventResponse extends BaseEventResponse { contractId?: Contract; id: string; inSuccessfulContractCall: boolean; ledger: number; ledgerClosedAt: string; operationIndex: number; topic: ScVal[]; transactionIndex: number; txHash: string; type: EventType; value: ScVal; } ``` **Source:** [src/rpc/api.ts:304](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L304) ### `eventResponse.contractId` ```ts contractId?: Contract; ``` **Source:** [src/rpc/api.ts:305](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L305) ### `eventResponse.id` ```ts id: string; ``` **Source:** [src/rpc/api.ts:316](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L316) ### `eventResponse.inSuccessfulContractCall` ```ts inSuccessfulContractCall: boolean; ``` **Source:** [src/rpc/api.ts:322](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L322) ### `eventResponse.ledger` ```ts ledger: number; ``` **Source:** [src/rpc/api.ts:318](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L318) ### `eventResponse.ledgerClosedAt` ```ts ledgerClosedAt: string; ``` **Source:** [src/rpc/api.ts:319](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L319) ### `eventResponse.operationIndex` ```ts operationIndex: number; ``` **Source:** [src/rpc/api.ts:321](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L321) ### `eventResponse.topic` ```ts topic: ScVal[]; ``` **Source:** [src/rpc/api.ts:306](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L306) ### `eventResponse.transactionIndex` ```ts transactionIndex: number; ``` **Source:** [src/rpc/api.ts:320](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L320) ### `eventResponse.txHash` ```ts txHash: string; ``` **Source:** [src/rpc/api.ts:323](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L323) ### `eventResponse.type` ```ts type: EventType; ``` **Source:** [src/rpc/api.ts:317](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L317) ### `eventResponse.value` ```ts value: ScVal; ``` **Source:** [src/rpc/api.ts:307](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L307) ## rpc.Api.EventType ```ts type EventType = "contract" | "system" ``` **Source:** [src/rpc/api.ts:226](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L226) ## rpc.Api.GetEventsRequest Request parameters for fetching events from the Stellar network. **Important**: This type enforces mutually exclusive pagination modes: - **Ledger range mode**: Use `startLedger` and `endLedger` (cursor must be omitted) - **Cursor pagination mode**: Use `cursor` (startLedger and endLedger must be omitted) ```ts type GetEventsRequest = { cursor?: never; endLedger?: number; filters: Api.EventFilter[]; limit?: number; startLedger: number } | { cursor: string; endLedger?: never; filters: Api.EventFilter[]; limit?: number; startLedger?: never } ``` **Example** ```ts // ✅ Correct: Ledger range mode const rangeRequest: GetEventsRequest = { filters: [], startLedger: 1000, endLedger: 2000, limit: 100 }; ``` **Example** ```ts // ✅ Correct: Cursor pagination mode const cursorRequest: GetEventsRequest = { filters: [], cursor: "some-cursor-value", limit: 100 }; ``` **Example** ```ts // ❌ Invalid: Cannot mix cursor with ledger range const invalidRequest = { filters: [], startLedger: 1000, // ❌ Cannot use with cursor endLedger: 2000, // ❌ Cannot use with cursor cursor: "cursor", // ❌ Cannot use with ledger range limit: 100 }; ``` **See also** - `getEvents API reference` **Source:** [src/rpc/api.ts:283](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L283) ## rpc.Api.GetEventsResponse ```ts interface GetEventsResponse extends RetentionState { cursor: string; events: EventResponse[]; latestLedger: number; latestLedgerCloseTime: string; oldestLedger: number; oldestLedgerCloseTime: string; } ``` **Source:** [src/rpc/api.ts:299](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L299) ### `getEventsResponse.cursor` ```ts cursor: string; ``` **Source:** [src/rpc/api.ts:301](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L301) ### `getEventsResponse.events` ```ts events: EventResponse[]; ``` **Source:** [src/rpc/api.ts:300](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L300) ### `getEventsResponse.latestLedger` ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:235](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L235) ### `getEventsResponse.latestLedgerCloseTime` ```ts latestLedgerCloseTime: string; ``` **Source:** [src/rpc/api.ts:237](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L237) ### `getEventsResponse.oldestLedger` ```ts oldestLedger: number; ``` **Source:** [src/rpc/api.ts:236](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L236) ### `getEventsResponse.oldestLedgerCloseTime` ```ts oldestLedgerCloseTime: string; ``` **Source:** [src/rpc/api.ts:238](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L238) ## rpc.Api.GetFailedTransactionResponse ```ts interface GetFailedTransactionResponse extends GetAnyTransactionResponse { applicationOrder: number; createdAt: number; diagnosticEventsXdr?: DiagnosticEvent[]; envelopeXdr: TransactionEnvelope; events: TransactionEvents; feeBump: boolean; latestLedger: number; latestLedgerCloseTime: number; ledger: number; oldestLedger: number; oldestLedgerCloseTime: number; resultMetaXdr: TransactionMeta; resultXdr: TransactionResult; status: FAILED; txHash: string; } ``` **Source:** [src/rpc/api.ts:97](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L97) ### `getFailedTransactionResponse.applicationOrder` ```ts applicationOrder: number; ``` **Source:** [src/rpc/api.ts:102](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L102) ### `getFailedTransactionResponse.createdAt` ```ts createdAt: number; ``` **Source:** [src/rpc/api.ts:101](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L101) ### `getFailedTransactionResponse.diagnosticEventsXdr` ```ts diagnosticEventsXdr?: DiagnosticEvent[]; ``` **Source:** [src/rpc/api.ts:107](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L107) ### `getFailedTransactionResponse.envelopeXdr` ```ts envelopeXdr: TransactionEnvelope; ``` **Source:** [src/rpc/api.ts:104](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L104) ### `getFailedTransactionResponse.events` ```ts events: TransactionEvents; ``` **Source:** [src/rpc/api.ts:108](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L108) ### `getFailedTransactionResponse.feeBump` ```ts feeBump: boolean; ``` **Source:** [src/rpc/api.ts:103](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L103) ### `getFailedTransactionResponse.latestLedger` ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:87](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L87) ### `getFailedTransactionResponse.latestLedgerCloseTime` ```ts latestLedgerCloseTime: number; ``` **Source:** [src/rpc/api.ts:88](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L88) ### `getFailedTransactionResponse.ledger` ```ts ledger: number; ``` **Source:** [src/rpc/api.ts:100](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L100) ### `getFailedTransactionResponse.oldestLedger` ```ts oldestLedger: number; ``` **Source:** [src/rpc/api.ts:89](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L89) ### `getFailedTransactionResponse.oldestLedgerCloseTime` ```ts oldestLedgerCloseTime: number; ``` **Source:** [src/rpc/api.ts:90](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L90) ### `getFailedTransactionResponse.resultMetaXdr` ```ts resultMetaXdr: TransactionMeta; ``` **Source:** [src/rpc/api.ts:106](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L106) ### `getFailedTransactionResponse.resultXdr` ```ts resultXdr: TransactionResult; ``` **Source:** [src/rpc/api.ts:105](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L105) ### `getFailedTransactionResponse.status` ```ts status: FAILED; ``` **Source:** [src/rpc/api.ts:98](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L98) ### `getFailedTransactionResponse.txHash` ```ts txHash: string; ``` **Source:** [src/rpc/api.ts:86](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L86) ## rpc.Api.GetFeeStatsResponse ```ts interface GetFeeStatsResponse { inclusionFee: FeeDistribution; latestLedger: number; sorobanInclusionFee: FeeDistribution; } ``` **Source:** [src/rpc/api.ts:560](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L560) ### `getFeeStatsResponse.inclusionFee` ```ts inclusionFee: FeeDistribution; ``` **Source:** [src/rpc/api.ts:562](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L562) ### `getFeeStatsResponse.latestLedger` ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:563](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L563) ### `getFeeStatsResponse.sorobanInclusionFee` ```ts sorobanInclusionFee: FeeDistribution; ``` **Source:** [src/rpc/api.ts:561](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L561) ## rpc.Api.GetHealthResponse ```ts interface GetHealthResponse { latestLedger: number; ledgerRetentionWindow: number; oldestLedger: number; status: "healthy"; } ``` **Source:** [src/rpc/api.ts:5](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L5) ### `getHealthResponse.latestLedger` ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:6](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L6) ### `getHealthResponse.ledgerRetentionWindow` ```ts ledgerRetentionWindow: number; ``` **Source:** [src/rpc/api.ts:7](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L7) ### `getHealthResponse.oldestLedger` ```ts oldestLedger: number; ``` **Source:** [src/rpc/api.ts:8](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L8) ### `getHealthResponse.status` ```ts status: "healthy"; ``` **Source:** [src/rpc/api.ts:9](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L9) ## rpc.Api.GetLatestLedgerResponse ```ts interface GetLatestLedgerResponse { closeTime: string; headerXdr: LedgerHeader; id: string; metadataXdr: LedgerCloseMeta; protocolVersion: string; sequence: number; } ``` **See also** - https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLatestLedger **Source:** [src/rpc/api.ts:52](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L52) ### `getLatestLedgerResponse.closeTime` ```ts closeTime: string; ``` **Source:** [src/rpc/api.ts:56](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L56) ### `getLatestLedgerResponse.headerXdr` ```ts headerXdr: LedgerHeader; ``` **Source:** [src/rpc/api.ts:57](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L57) ### `getLatestLedgerResponse.id` ```ts id: string; ``` **Source:** [src/rpc/api.ts:53](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L53) ### `getLatestLedgerResponse.metadataXdr` ```ts metadataXdr: LedgerCloseMeta; ``` **Source:** [src/rpc/api.ts:58](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L58) ### `getLatestLedgerResponse.protocolVersion` ```ts protocolVersion: string; ``` **Source:** [src/rpc/api.ts:55](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L55) ### `getLatestLedgerResponse.sequence` ```ts sequence: number; ``` **Source:** [src/rpc/api.ts:54](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L54) ## rpc.Api.GetLedgerEntriesResponse An XDR-parsed version of `RawLedgerEntryResult` ```ts interface GetLedgerEntriesResponse { entries: LedgerEntryResult[]; latestLedger: number; } ``` **Source:** [src/rpc/api.ts:33](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L33) ### `getLedgerEntriesResponse.entries` ```ts entries: LedgerEntryResult[]; ``` **Source:** [src/rpc/api.ts:34](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L34) ### `getLedgerEntriesResponse.latestLedger` ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:35](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L35) ## rpc.Api.GetLedgersRequest Request parameters for fetching a sequential list of ledgers. This type supports two distinct pagination modes that are mutually exclusive: - **Ledger-based pagination**: Use `startLedger` to begin fetching from a specific ledger sequence - **Cursor-based pagination**: Use `cursor` to continue from a previous response's pagination token ```ts type GetLedgersRequest = { pagination?: { cursor?: never; limit?: number }; startLedger: number } | { pagination: { cursor: string; limit?: number }; startLedger?: never } ``` **Example** ```ts // Ledger-based pagination - start from specific ledger const ledgerRequest: GetLedgersRequest = { startLedger: 36233, pagination: { limit: 10 } }; ``` **Example** ```ts // Cursor-based pagination - continue from previous response const cursorRequest: GetLedgersRequest = { pagination: { cursor: "36234", limit: 5 } }; ``` **See also** - `getLedgers API reference` **Source:** [src/rpc/api.ts:633](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L633) ## rpc.Api.GetLedgersResponse ```ts interface GetLedgersResponse { cursor: string; latestLedger: number; latestLedgerCloseTime: number; ledgers: LedgerResponse[]; oldestLedger: number; oldestLedgerCloseTime: number; } ``` **See also** - https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgers **Source:** [src/rpc/api.ts:669](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L669) ### `getLedgersResponse.cursor` ```ts cursor: string; ``` **Source:** [src/rpc/api.ts:675](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L675) ### `getLedgersResponse.latestLedger` ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:671](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L671) ### `getLedgersResponse.latestLedgerCloseTime` ```ts latestLedgerCloseTime: number; ``` **Source:** [src/rpc/api.ts:672](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L672) ### `getLedgersResponse.ledgers` ```ts ledgers: LedgerResponse[]; ``` **Source:** [src/rpc/api.ts:670](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L670) ### `getLedgersResponse.oldestLedger` ```ts oldestLedger: number; ``` **Source:** [src/rpc/api.ts:673](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L673) ### `getLedgersResponse.oldestLedgerCloseTime` ```ts oldestLedgerCloseTime: number; ``` **Source:** [src/rpc/api.ts:674](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L674) ## rpc.Api.GetMissingTransactionResponse ```ts interface GetMissingTransactionResponse extends GetAnyTransactionResponse { latestLedger: number; latestLedgerCloseTime: number; oldestLedger: number; oldestLedgerCloseTime: number; status: NOT_FOUND; txHash: string; } ``` **Source:** [src/rpc/api.ts:93](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L93) ### `getMissingTransactionResponse.latestLedger` ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:87](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L87) ### `getMissingTransactionResponse.latestLedgerCloseTime` ```ts latestLedgerCloseTime: number; ``` **Source:** [src/rpc/api.ts:88](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L88) ### `getMissingTransactionResponse.oldestLedger` ```ts oldestLedger: number; ``` **Source:** [src/rpc/api.ts:89](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L89) ### `getMissingTransactionResponse.oldestLedgerCloseTime` ```ts oldestLedgerCloseTime: number; ``` **Source:** [src/rpc/api.ts:90](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L90) ### `getMissingTransactionResponse.status` ```ts status: NOT_FOUND; ``` **Source:** [src/rpc/api.ts:94](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L94) ### `getMissingTransactionResponse.txHash` ```ts txHash: string; ``` **Source:** [src/rpc/api.ts:86](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L86) ## rpc.Api.GetNetworkResponse ```ts interface GetNetworkResponse { friendbotUrl?: string; passphrase: string; protocolVersion: string; } ``` **See also** - https://developers.stellar.org/docs/data/rpc/api-reference/methods/getNetwork **Source:** [src/rpc/api.ts:45](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L45) ### `getNetworkResponse.friendbotUrl` ```ts friendbotUrl?: string; ``` **Source:** [src/rpc/api.ts:46](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L46) ### `getNetworkResponse.passphrase` ```ts passphrase: string; ``` **Source:** [src/rpc/api.ts:47](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L47) ### `getNetworkResponse.protocolVersion` ```ts protocolVersion: string; ``` **Source:** [src/rpc/api.ts:48](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L48) ## rpc.Api.GetSuccessfulTransactionResponse ```ts interface GetSuccessfulTransactionResponse extends GetAnyTransactionResponse { applicationOrder: number; createdAt: number; diagnosticEventsXdr?: DiagnosticEvent[]; envelopeXdr: TransactionEnvelope; events: TransactionEvents; feeBump: boolean; latestLedger: number; latestLedgerCloseTime: number; ledger: number; oldestLedger: number; oldestLedgerCloseTime: number; resultMetaXdr: TransactionMeta; resultXdr: TransactionResult; returnValue?: ScVal; status: SUCCESS; txHash: string; } ``` **Source:** [src/rpc/api.ts:111](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L111) ### `getSuccessfulTransactionResponse.applicationOrder` ```ts applicationOrder: number; ``` **Source:** [src/rpc/api.ts:116](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L116) ### `getSuccessfulTransactionResponse.createdAt` ```ts createdAt: number; ``` **Source:** [src/rpc/api.ts:115](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L115) ### `getSuccessfulTransactionResponse.diagnosticEventsXdr` ```ts diagnosticEventsXdr?: DiagnosticEvent[]; ``` **Source:** [src/rpc/api.ts:121](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L121) ### `getSuccessfulTransactionResponse.envelopeXdr` ```ts envelopeXdr: TransactionEnvelope; ``` **Source:** [src/rpc/api.ts:118](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L118) ### `getSuccessfulTransactionResponse.events` ```ts events: TransactionEvents; ``` **Source:** [src/rpc/api.ts:124](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L124) ### `getSuccessfulTransactionResponse.feeBump` ```ts feeBump: boolean; ``` **Source:** [src/rpc/api.ts:117](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L117) ### `getSuccessfulTransactionResponse.latestLedger` ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:87](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L87) ### `getSuccessfulTransactionResponse.latestLedgerCloseTime` ```ts latestLedgerCloseTime: number; ``` **Source:** [src/rpc/api.ts:88](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L88) ### `getSuccessfulTransactionResponse.ledger` ```ts ledger: number; ``` **Source:** [src/rpc/api.ts:114](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L114) ### `getSuccessfulTransactionResponse.oldestLedger` ```ts oldestLedger: number; ``` **Source:** [src/rpc/api.ts:89](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L89) ### `getSuccessfulTransactionResponse.oldestLedgerCloseTime` ```ts oldestLedgerCloseTime: number; ``` **Source:** [src/rpc/api.ts:90](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L90) ### `getSuccessfulTransactionResponse.resultMetaXdr` ```ts resultMetaXdr: TransactionMeta; ``` **Source:** [src/rpc/api.ts:120](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L120) ### `getSuccessfulTransactionResponse.resultXdr` ```ts resultXdr: TransactionResult; ``` **Source:** [src/rpc/api.ts:119](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L119) ### `getSuccessfulTransactionResponse.returnValue` ```ts returnValue?: ScVal; ``` **Source:** [src/rpc/api.ts:123](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L123) ### `getSuccessfulTransactionResponse.status` ```ts status: SUCCESS; ``` **Source:** [src/rpc/api.ts:112](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L112) ### `getSuccessfulTransactionResponse.txHash` ```ts txHash: string; ``` **Source:** [src/rpc/api.ts:86](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L86) ## rpc.Api.GetTransactionResponse ```ts type GetTransactionResponse = GetSuccessfulTransactionResponse | GetFailedTransactionResponse | GetMissingTransactionResponse ``` **See also** - https://developers.stellar.org/docs/data/rpc/api-reference/methods/getTransaction **Source:** [src/rpc/api.ts:79](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L79) ## rpc.Api.GetTransactionStatus ```ts enum GetTransactionStatus ``` **Source:** [src/rpc/api.ts:72](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L72) ## rpc.Api.GetTransactionsRequest ```ts type GetTransactionsRequest = { pagination?: { cursor?: never; limit?: number }; startLedger: number } | { pagination: { cursor: string; limit?: number }; startLedger?: never } ``` **Source:** [src/rpc/api.ts:149](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L149) ## rpc.Api.GetTransactionsResponse ```ts interface GetTransactionsResponse { cursor: string; latestLedger: number; latestLedgerCloseTimestamp: number; oldestLedger: number; oldestLedgerCloseTimestamp: number; transactions: TransactionInfo[]; } ``` **Source:** [src/rpc/api.ts:208](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L208) ### `getTransactionsResponse.cursor` ```ts cursor: string; ``` **Source:** [src/rpc/api.ts:214](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L214) ### `getTransactionsResponse.latestLedger` ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:210](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L210) ### `getTransactionsResponse.latestLedgerCloseTimestamp` ```ts latestLedgerCloseTimestamp: number; ``` **Source:** [src/rpc/api.ts:211](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L211) ### `getTransactionsResponse.oldestLedger` ```ts oldestLedger: number; ``` **Source:** [src/rpc/api.ts:212](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L212) ### `getTransactionsResponse.oldestLedgerCloseTimestamp` ```ts oldestLedgerCloseTimestamp: number; ``` **Source:** [src/rpc/api.ts:213](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L213) ### `getTransactionsResponse.transactions` ```ts transactions: TransactionInfo[]; ``` **Source:** [src/rpc/api.ts:209](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L209) ## rpc.Api.GetVersionInfoResponse ```ts interface GetVersionInfoResponse { build_timestamp: string; buildTimestamp: string; captive_core_version: string; captiveCoreVersion: string; commit_hash: string; commitHash: string; protocol_version: number; protocolVersion: number; version: string; } ``` **Source:** [src/rpc/api.ts:543](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L543) ### `getVersionInfoResponse.build_timestamp` ```ts build_timestamp: string; ``` **Source:** [src/rpc/api.ts:553](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L553) ### `getVersionInfoResponse.buildTimestamp` ```ts buildTimestamp: string; ``` **Source:** [src/rpc/api.ts:546](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L546) ### `getVersionInfoResponse.captive_core_version` ```ts captive_core_version: string; ``` **Source:** [src/rpc/api.ts:555](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L555) ### `getVersionInfoResponse.captiveCoreVersion` ```ts captiveCoreVersion: string; ``` **Source:** [src/rpc/api.ts:547](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L547) ### `getVersionInfoResponse.commit_hash` ```ts commit_hash: string; ``` **Source:** [src/rpc/api.ts:551](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L551) ### `getVersionInfoResponse.commitHash` ```ts commitHash: string; ``` **Source:** [src/rpc/api.ts:545](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L545) ### `getVersionInfoResponse.protocol_version` ```ts protocol_version: number; ``` **Source:** [src/rpc/api.ts:557](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L557) ### `getVersionInfoResponse.protocolVersion` ```ts protocolVersion: number; ``` **Source:** [src/rpc/api.ts:548](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L548) ### `getVersionInfoResponse.version` ```ts version: string; ``` **Source:** [src/rpc/api.ts:544](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L544) ## rpc.Api.LedgerEntryChange ```ts interface LedgerEntryChange { after: LedgerEntry | null; before: LedgerEntry | null; key: LedgerKey; type: number; } ``` **Source:** [src/rpc/api.ts:342](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L342) ### `ledgerEntryChange.after` ```ts after: LedgerEntry | null; ``` **Source:** [src/rpc/api.ts:346](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L346) ### `ledgerEntryChange.before` ```ts before: LedgerEntry | null; ``` **Source:** [src/rpc/api.ts:345](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L345) ### `ledgerEntryChange.key` ```ts key: LedgerKey; ``` **Source:** [src/rpc/api.ts:344](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L344) ### `ledgerEntryChange.type` ```ts type: number; ``` **Source:** [src/rpc/api.ts:343](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L343) ## rpc.Api.LedgerEntryResult ```ts interface LedgerEntryResult { key: LedgerKey; lastModifiedLedgerSeq?: number; liveUntilLedgerSeq?: number; val: LedgerEntryData; } ``` **Source:** [src/rpc/api.ts:12](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L12) ### `ledgerEntryResult.key` ```ts key: LedgerKey; ``` **Source:** [src/rpc/api.ts:14](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L14) ### `ledgerEntryResult.lastModifiedLedgerSeq` ```ts lastModifiedLedgerSeq?: number; ``` **Source:** [src/rpc/api.ts:13](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L13) ### `ledgerEntryResult.liveUntilLedgerSeq` ```ts liveUntilLedgerSeq?: number; ``` **Source:** [src/rpc/api.ts:16](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L16) ### `ledgerEntryResult.val` ```ts val: LedgerEntryData; ``` **Source:** [src/rpc/api.ts:15](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L15) ## rpc.Api.LedgerResponse ```ts interface LedgerResponse { hash: string; headerXdr: LedgerHeaderHistoryEntry; ledgerCloseTime: string; metadataXdr: LedgerCloseMeta; sequence: number; } ``` **Source:** [src/rpc/api.ts:687](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L687) ### `ledgerResponse.hash` ```ts hash: string; ``` **Source:** [src/rpc/api.ts:688](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L688) ### `ledgerResponse.headerXdr` ```ts headerXdr: LedgerHeaderHistoryEntry; ``` **Source:** [src/rpc/api.ts:691](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L691) ### `ledgerResponse.ledgerCloseTime` ```ts ledgerCloseTime: string; ``` **Source:** [src/rpc/api.ts:690](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L690) ### `ledgerResponse.metadataXdr` ```ts metadataXdr: LedgerCloseMeta; ``` **Source:** [src/rpc/api.ts:692](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L692) ### `ledgerResponse.sequence` ```ts sequence: number; ``` **Source:** [src/rpc/api.ts:689](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L689) ## rpc.Api.RawEventResponse ```ts interface RawEventResponse extends BaseEventResponse { contractId: string; id: string; inSuccessfulContractCall: boolean; ledger: number; ledgerClosedAt: string; operationIndex: number; topic?: string[]; transactionIndex: number; txHash: string; type: EventType; value: string; } ``` **Source:** [src/rpc/api.ts:326](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L326) ### `rawEventResponse.contractId` ```ts contractId: string; ``` **Source:** [src/rpc/api.ts:327](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L327) ### `rawEventResponse.id` ```ts id: string; ``` **Source:** [src/rpc/api.ts:316](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L316) ### `rawEventResponse.inSuccessfulContractCall` ```ts inSuccessfulContractCall: boolean; ``` **Source:** [src/rpc/api.ts:322](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L322) ### `rawEventResponse.ledger` ```ts ledger: number; ``` **Source:** [src/rpc/api.ts:318](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L318) ### `rawEventResponse.ledgerClosedAt` ```ts ledgerClosedAt: string; ``` **Source:** [src/rpc/api.ts:319](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L319) ### `rawEventResponse.operationIndex` ```ts operationIndex: number; ``` **Source:** [src/rpc/api.ts:321](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L321) ### `rawEventResponse.topic` ```ts topic?: string[]; ``` **Source:** [src/rpc/api.ts:328](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L328) ### `rawEventResponse.transactionIndex` ```ts transactionIndex: number; ``` **Source:** [src/rpc/api.ts:320](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L320) ### `rawEventResponse.txHash` ```ts txHash: string; ``` **Source:** [src/rpc/api.ts:323](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L323) ### `rawEventResponse.type` ```ts type: EventType; ``` **Source:** [src/rpc/api.ts:317](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L317) ### `rawEventResponse.value` ```ts value: string; ``` **Source:** [src/rpc/api.ts:329](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L329) ## rpc.Api.RawGetEventsResponse ```ts interface RawGetEventsResponse extends RetentionState { cursor: string; events: RawEventResponse[]; latestLedger: number; latestLedgerCloseTime: string; oldestLedger: number; oldestLedgerCloseTime: string; } ``` **Source:** [src/rpc/api.ts:310](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L310) ### `rawGetEventsResponse.cursor` ```ts cursor: string; ``` **Source:** [src/rpc/api.ts:312](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L312) ### `rawGetEventsResponse.events` ```ts events: RawEventResponse[]; ``` **Source:** [src/rpc/api.ts:311](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L311) ### `rawGetEventsResponse.latestLedger` ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:235](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L235) ### `rawGetEventsResponse.latestLedgerCloseTime` ```ts latestLedgerCloseTime: string; ``` **Source:** [src/rpc/api.ts:237](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L237) ### `rawGetEventsResponse.oldestLedger` ```ts oldestLedger: number; ``` **Source:** [src/rpc/api.ts:236](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L236) ### `rawGetEventsResponse.oldestLedgerCloseTime` ```ts oldestLedgerCloseTime: string; ``` **Source:** [src/rpc/api.ts:238](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L238) ## rpc.Api.RawGetLatestLedgerResponse ```ts interface RawGetLatestLedgerResponse { closeTime: string; headerXdr: string; id: string; metadataXdr: string; protocolVersion: string; sequence: number; } ``` **Source:** [src/rpc/api.ts:61](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L61) ### `rawGetLatestLedgerResponse.closeTime` ```ts closeTime: string; ``` **Source:** [src/rpc/api.ts:65](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L65) ### `rawGetLatestLedgerResponse.headerXdr` a base-64 encoded `xdr.LedgerHeader` instance ```ts headerXdr: string; ``` **Source:** [src/rpc/api.ts:67](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L67) ### `rawGetLatestLedgerResponse.id` ```ts id: string; ``` **Source:** [src/rpc/api.ts:62](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L62) ### `rawGetLatestLedgerResponse.metadataXdr` a base-64 encoded `xdr.LedgerCloseMeta` instance ```ts metadataXdr: string; ``` **Source:** [src/rpc/api.ts:69](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L69) ### `rawGetLatestLedgerResponse.protocolVersion` ```ts protocolVersion: string; ``` **Source:** [src/rpc/api.ts:64](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L64) ### `rawGetLatestLedgerResponse.sequence` ```ts sequence: number; ``` **Source:** [src/rpc/api.ts:63](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L63) ## rpc.Api.RawGetLedgerEntriesResponse ```ts interface RawGetLedgerEntriesResponse { entries?: RawLedgerEntryResult[]; latestLedger: number; } ``` **See also** - https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgerEntries **Source:** [src/rpc/api.ts:39](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L39) ### `rawGetLedgerEntriesResponse.entries` ```ts entries?: RawLedgerEntryResult[]; ``` **Source:** [src/rpc/api.ts:40](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L40) ### `rawGetLedgerEntriesResponse.latestLedger` ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:41](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L41) ## rpc.Api.RawGetLedgersResponse ```ts interface RawGetLedgersResponse { cursor: string; latestLedger: number; latestLedgerCloseTime: number; ledgers: RawLedgerResponse[]; oldestLedger: number; oldestLedgerCloseTime: number; } ``` **Source:** [src/rpc/api.ts:678](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L678) ### `rawGetLedgersResponse.cursor` ```ts cursor: string; ``` **Source:** [src/rpc/api.ts:684](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L684) ### `rawGetLedgersResponse.latestLedger` ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:680](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L680) ### `rawGetLedgersResponse.latestLedgerCloseTime` ```ts latestLedgerCloseTime: number; ``` **Source:** [src/rpc/api.ts:681](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L681) ### `rawGetLedgersResponse.ledgers` ```ts ledgers: RawLedgerResponse[]; ``` **Source:** [src/rpc/api.ts:679](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L679) ### `rawGetLedgersResponse.oldestLedger` ```ts oldestLedger: number; ``` **Source:** [src/rpc/api.ts:682](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L682) ### `rawGetLedgersResponse.oldestLedgerCloseTime` ```ts oldestLedgerCloseTime: number; ``` **Source:** [src/rpc/api.ts:683](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L683) ## rpc.Api.RawGetTransactionResponse ```ts interface RawGetTransactionResponse { applicationOrder?: number; createdAt?: number; diagnosticEventsXdr?: string[]; envelopeXdr?: string; events?: RawTransactionEvents; feeBump?: boolean; latestLedger: number; latestLedgerCloseTime: number; ledger?: number; oldestLedger: number; oldestLedgerCloseTime: number; resultMetaXdr?: string; resultXdr?: string; status: GetTransactionStatus; txHash: string; } ``` **Source:** [src/rpc/api.ts:127](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L127) ### `rawGetTransactionResponse.applicationOrder` ```ts applicationOrder?: number; ``` **Source:** [src/rpc/api.ts:136](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L136) ### `rawGetTransactionResponse.createdAt` ```ts createdAt?: number; ``` **Source:** [src/rpc/api.ts:139](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L139) ### `rawGetTransactionResponse.diagnosticEventsXdr` ```ts diagnosticEventsXdr?: string[]; ``` **Source:** [src/rpc/api.ts:144](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L144) ### `rawGetTransactionResponse.envelopeXdr` ```ts envelopeXdr?: string; ``` **Source:** [src/rpc/api.ts:141](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L141) ### `rawGetTransactionResponse.events` ```ts events?: RawTransactionEvents; ``` **Source:** [src/rpc/api.ts:146](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L146) ### `rawGetTransactionResponse.feeBump` ```ts feeBump?: boolean; ``` **Source:** [src/rpc/api.ts:137](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L137) ### `rawGetTransactionResponse.latestLedger` ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:129](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L129) ### `rawGetTransactionResponse.latestLedgerCloseTime` ```ts latestLedgerCloseTime: number; ``` **Source:** [src/rpc/api.ts:130](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L130) ### `rawGetTransactionResponse.ledger` ```ts ledger?: number; ``` **Source:** [src/rpc/api.ts:138](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L138) ### `rawGetTransactionResponse.oldestLedger` ```ts oldestLedger: number; ``` **Source:** [src/rpc/api.ts:131](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L131) ### `rawGetTransactionResponse.oldestLedgerCloseTime` ```ts oldestLedgerCloseTime: number; ``` **Source:** [src/rpc/api.ts:132](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L132) ### `rawGetTransactionResponse.resultMetaXdr` ```ts resultMetaXdr?: string; ``` **Source:** [src/rpc/api.ts:143](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L143) ### `rawGetTransactionResponse.resultXdr` ```ts resultXdr?: string; ``` **Source:** [src/rpc/api.ts:142](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L142) ### `rawGetTransactionResponse.status` ```ts status: GetTransactionStatus; ``` **Source:** [src/rpc/api.ts:128](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L128) ### `rawGetTransactionResponse.txHash` ```ts txHash: string; ``` **Source:** [src/rpc/api.ts:133](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L133) ## rpc.Api.RawGetTransactionsResponse ```ts interface RawGetTransactionsResponse { cursor: string; latestLedger: number; latestLedgerCloseTimestamp: number; oldestLedger: number; oldestLedgerCloseTimestamp: number; transactions: RawTransactionInfo[] | null; } ``` **Source:** [src/rpc/api.ts:217](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L217) ### `rawGetTransactionsResponse.cursor` ```ts cursor: string; ``` **Source:** [src/rpc/api.ts:223](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L223) ### `rawGetTransactionsResponse.latestLedger` ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:219](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L219) ### `rawGetTransactionsResponse.latestLedgerCloseTimestamp` ```ts latestLedgerCloseTimestamp: number; ``` **Source:** [src/rpc/api.ts:220](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L220) ### `rawGetTransactionsResponse.oldestLedger` ```ts oldestLedger: number; ``` **Source:** [src/rpc/api.ts:221](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L221) ### `rawGetTransactionsResponse.oldestLedgerCloseTimestamp` ```ts oldestLedgerCloseTimestamp: number; ``` **Source:** [src/rpc/api.ts:222](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L222) ### `rawGetTransactionsResponse.transactions` ```ts transactions: RawTransactionInfo[] | null; ``` **Source:** [src/rpc/api.ts:218](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L218) ## rpc.Api.RawLedgerEntryResult ```ts interface RawLedgerEntryResult { key: string; lastModifiedLedgerSeq?: number; liveUntilLedgerSeq?: number; xdr: string; } ``` **Source:** [src/rpc/api.ts:19](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L19) ### `rawLedgerEntryResult.key` a base-64 encoded `xdr.LedgerKey` instance ```ts key: string; ``` **Source:** [src/rpc/api.ts:22](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L22) ### `rawLedgerEntryResult.lastModifiedLedgerSeq` ```ts lastModifiedLedgerSeq?: number; ``` **Source:** [src/rpc/api.ts:20](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L20) ### `rawLedgerEntryResult.liveUntilLedgerSeq` optional, a future ledger number upon which this entry will expire based on https://github.com/stellar/soroban-tools/issues/1010 ```ts liveUntilLedgerSeq?: number; ``` **Source:** [src/rpc/api.ts:29](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L29) ### `rawLedgerEntryResult.xdr` a base-64 encoded `xdr.LedgerEntryData` instance ```ts xdr: string; ``` **Source:** [src/rpc/api.ts:24](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L24) ## rpc.Api.RawLedgerResponse ```ts interface RawLedgerResponse { hash: string; headerXdr: string; ledgerCloseTime: string; metadataXdr: string; sequence: number; } ``` **Source:** [src/rpc/api.ts:695](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L695) ### `rawLedgerResponse.hash` ```ts hash: string; ``` **Source:** [src/rpc/api.ts:696](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L696) ### `rawLedgerResponse.headerXdr` a base-64 encoded `xdr.LedgerHeaderHistoryEntry` instance ```ts headerXdr: string; ``` **Source:** [src/rpc/api.ts:700](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L700) ### `rawLedgerResponse.ledgerCloseTime` ```ts ledgerCloseTime: string; ``` **Source:** [src/rpc/api.ts:698](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L698) ### `rawLedgerResponse.metadataXdr` a base-64 encoded `xdr.LedgerCloseMeta` instance ```ts metadataXdr: string; ``` **Source:** [src/rpc/api.ts:702](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L702) ### `rawLedgerResponse.sequence` ```ts sequence: number; ``` **Source:** [src/rpc/api.ts:697](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L697) ## rpc.Api.RawSendTransactionResponse ```ts interface RawSendTransactionResponse extends BaseSendTransactionResponse { diagnosticEventsXdr?: string[]; errorResultXdr?: string; hash: string; latestLedger: number; latestLedgerCloseTime: number; status: SendTransactionStatus; } ``` **Source:** [src/rpc/api.ts:360](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L360) ### `rawSendTransactionResponse.diagnosticEventsXdr` This is a base64-encoded instance of an array of `xdr.DiagnosticEvent`s, set only when `status` is `"ERROR"` and diagnostic events are enabled on the server. ```ts diagnosticEventsXdr?: string[]; ``` **Source:** [src/rpc/api.ts:373](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L373) ### `rawSendTransactionResponse.errorResultXdr` This is a base64-encoded instance of `xdr.TransactionResult`, set only when `status` is `"ERROR"`. It contains details on why the network rejected the transaction. ```ts errorResultXdr?: string; ``` **Source:** [src/rpc/api.ts:367](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L367) ### `rawSendTransactionResponse.hash` ```ts hash: string; ``` **Source:** [src/rpc/api.ts:378](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L378) ### `rawSendTransactionResponse.latestLedger` ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:379](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L379) ### `rawSendTransactionResponse.latestLedgerCloseTime` ```ts latestLedgerCloseTime: number; ``` **Source:** [src/rpc/api.ts:380](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L380) ### `rawSendTransactionResponse.status` ```ts status: SendTransactionStatus; ``` **Source:** [src/rpc/api.ts:377](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L377) ## rpc.Api.RawSimulateTransactionResponse ```ts interface RawSimulateTransactionResponse { error?: string; events?: string[]; id: string; latestLedger: number; minResourceFee?: string; restorePreamble?: { minResourceFee: string; transactionData: string }; results?: RawSimulateHostFunctionResult[]; stateChanges?: RawLedgerEntryChange[]; transactionData?: string; } ``` **See also** - https://developers.stellar.org/docs/data/rpc/api-reference/methods/simulateTransaction **Source:** [src/rpc/api.ts:519](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L519) ### `rawSimulateTransactionResponse.error` ```ts error?: string; ``` **Source:** [src/rpc/api.ts:522](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L522) ### `rawSimulateTransactionResponse.events` These are xdr.DiagnosticEvents in base64 ```ts events?: string[]; ``` **Source:** [src/rpc/api.ts:526](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L526) ### `rawSimulateTransactionResponse.id` ```ts id: string; ``` **Source:** [src/rpc/api.ts:520](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L520) ### `rawSimulateTransactionResponse.latestLedger` ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:521](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L521) ### `rawSimulateTransactionResponse.minResourceFee` ```ts minResourceFee?: string; ``` **Source:** [src/rpc/api.ts:527](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L527) ### `rawSimulateTransactionResponse.restorePreamble` Present if succeeded but has expired ledger entries ```ts restorePreamble?: { minResourceFee: string; transactionData: string }; ``` **Source:** [src/rpc/api.ts:534](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L534) ### `rawSimulateTransactionResponse.results` This will only contain a single element if present, because only a single invokeHostFunctionOperation is supported per transaction. ```ts results?: RawSimulateHostFunctionResult[]; ``` **Source:** [src/rpc/api.ts:532](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L532) ### `rawSimulateTransactionResponse.stateChanges` State difference information ```ts stateChanges?: RawLedgerEntryChange[]; ``` **Source:** [src/rpc/api.ts:540](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L540) ### `rawSimulateTransactionResponse.transactionData` This is an xdr.SorobanTransactionData in base64 ```ts transactionData?: string; ``` **Source:** [src/rpc/api.ts:524](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L524) ## rpc.Api.RawTransactionEvents ```ts interface RawTransactionEvents { contractEventsXdr?: string[][]; transactionEventsXdr?: string[]; } ``` **Source:** [src/rpc/api.ts:165](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L165) ### `rawTransactionEvents.contractEventsXdr` ```ts contractEventsXdr?: string[][]; ``` **Source:** [src/rpc/api.ts:167](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L167) ### `rawTransactionEvents.transactionEventsXdr` ```ts transactionEventsXdr?: string[]; ``` **Source:** [src/rpc/api.ts:166](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L166) ## rpc.Api.RawTransactionInfo ```ts interface RawTransactionInfo { applicationOrder: number; createdAt: number; diagnosticEventsXdr?: string[]; envelopeXdr?: string; events?: RawTransactionEvents; feeBump: boolean; ledger: number; resultMetaXdr?: string; resultXdr?: string; status: GetTransactionStatus; txHash: string; } ``` **Source:** [src/rpc/api.ts:170](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L170) ### `rawTransactionInfo.applicationOrder` ```ts applicationOrder: number; ``` **Source:** [src/rpc/api.ts:174](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L174) ### `rawTransactionInfo.createdAt` ```ts createdAt: number; ``` **Source:** [src/rpc/api.ts:173](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L173) ### `rawTransactionInfo.diagnosticEventsXdr` ```ts diagnosticEventsXdr?: string[]; ``` **Source:** [src/rpc/api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L181) ### `rawTransactionInfo.envelopeXdr` ```ts envelopeXdr?: string; ``` **Source:** [src/rpc/api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L178) ### `rawTransactionInfo.events` ```ts events?: RawTransactionEvents; ``` **Source:** [src/rpc/api.ts:183](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L183) ### `rawTransactionInfo.feeBump` ```ts feeBump: boolean; ``` **Source:** [src/rpc/api.ts:175](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L175) ### `rawTransactionInfo.ledger` ```ts ledger: number; ``` **Source:** [src/rpc/api.ts:172](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L172) ### `rawTransactionInfo.resultMetaXdr` ```ts resultMetaXdr?: string; ``` **Source:** [src/rpc/api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L180) ### `rawTransactionInfo.resultXdr` ```ts resultXdr?: string; ``` **Source:** [src/rpc/api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L179) ### `rawTransactionInfo.status` ```ts status: GetTransactionStatus; ``` **Source:** [src/rpc/api.ts:171](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L171) ### `rawTransactionInfo.txHash` ```ts txHash: string; ``` **Source:** [src/rpc/api.ts:176](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L176) ## rpc.Api.SendTransactionResponse ```ts interface SendTransactionResponse extends BaseSendTransactionResponse { diagnosticEvents?: DiagnosticEvent[]; errorResult?: TransactionResult; hash: string; latestLedger: number; latestLedgerCloseTime: number; status: SendTransactionStatus; } ``` **Source:** [src/rpc/api.ts:355](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L355) ### `sendTransactionResponse.diagnosticEvents` ```ts diagnosticEvents?: DiagnosticEvent[]; ``` **Source:** [src/rpc/api.ts:357](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L357) ### `sendTransactionResponse.errorResult` ```ts errorResult?: TransactionResult; ``` **Source:** [src/rpc/api.ts:356](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L356) ### `sendTransactionResponse.hash` ```ts hash: string; ``` **Source:** [src/rpc/api.ts:378](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L378) ### `sendTransactionResponse.latestLedger` ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:379](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L379) ### `sendTransactionResponse.latestLedgerCloseTime` ```ts latestLedgerCloseTime: number; ``` **Source:** [src/rpc/api.ts:380](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L380) ### `sendTransactionResponse.status` ```ts status: SendTransactionStatus; ``` **Source:** [src/rpc/api.ts:377](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L377) ## rpc.Api.SendTransactionStatus ```ts type SendTransactionStatus = "PENDING" | "DUPLICATE" | "TRY_AGAIN_LATER" | "ERROR" ``` **Source:** [src/rpc/api.ts:349](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L349) ## rpc.Api.SimulateHostFunctionResult ```ts interface SimulateHostFunctionResult { auth: SorobanAuthorizationEntry[]; retval: ScVal; } ``` **Source:** [src/rpc/api.ts:383](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L383) ### `simulateHostFunctionResult.auth` ```ts auth: SorobanAuthorizationEntry[]; ``` **Source:** [src/rpc/api.ts:384](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L384) ### `simulateHostFunctionResult.retval` ```ts retval: ScVal; ``` **Source:** [src/rpc/api.ts:385](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L385) ## rpc.Api.SimulateTransactionErrorResponse Includes details about why the simulation failed ```ts interface SimulateTransactionErrorResponse extends BaseSimulateTransactionResponse { _parsed: boolean; error: string; events: DiagnosticEvent[]; id: string; latestLedger: number; } ``` **Source:** [src/rpc/api.ts:441](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L441) ### `simulateTransactionErrorResponse._parsed` a private field to mark the schema as parsed ```ts _parsed: boolean; ``` **Source:** [src/rpc/api.ts:425](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L425) ### `simulateTransactionErrorResponse.error` ```ts error: string; ``` **Source:** [src/rpc/api.ts:442](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L442) ### `simulateTransactionErrorResponse.events` The field is always present, but may be empty in cases where: - you didn't simulate an invocation or - there were no events ```ts events: DiagnosticEvent[]; ``` **Source:** [src/rpc/api.ts:443](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L443) ### `simulateTransactionErrorResponse.id` always present: the JSON-RPC request ID ```ts id: string; ``` **Source:** [src/rpc/api.ts:412](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L412) ### `simulateTransactionErrorResponse.latestLedger` always present: the LCL known to the server when responding ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:415](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L415) ## rpc.Api.SimulateTransactionResponse Simplifies `RawSimulateTransactionResponse` into separate interfaces based on status: - on success, this includes all fields, though `result` is only present if an invocation was simulated (since otherwise there's nothing to "resultify") - if there was an expiration error, this includes error and restoration fields - for all other errors, this only includes error fields ```ts type SimulateTransactionResponse = SimulateTransactionSuccessResponse | SimulateTransactionRestoreResponse | SimulateTransactionErrorResponse ``` **See also** - https://developers.stellar.org/docs/data/rpc/api-reference/methods/simulateTransaction **Source:** [src/rpc/api.ts:405](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L405) ## rpc.Api.SimulateTransactionRestoreResponse Includes simplified fields only present on success. ```ts interface SimulateTransactionRestoreResponse extends SimulateTransactionSuccessResponse { _parsed: boolean; events: DiagnosticEvent[]; id: string; latestLedger: number; minResourceFee: string; restorePreamble: { minResourceFee: string; transactionData: SorobanDataBuilder }; result: SimulateHostFunctionResult; stateChanges?: LedgerEntryChange[]; transactionData: SorobanDataBuilder; } ``` **Source:** [src/rpc/api.ts:446](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L446) ### `simulateTransactionRestoreResponse._parsed` a private field to mark the schema as parsed ```ts _parsed: boolean; ``` **Source:** [src/rpc/api.ts:425](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L425) ### `simulateTransactionRestoreResponse.events` The field is always present, but may be empty in cases where: - you didn't simulate an invocation or - there were no events ```ts events: DiagnosticEvent[]; ``` **Source:** [src/rpc/api.ts:422](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L422) ### `simulateTransactionRestoreResponse.id` always present: the JSON-RPC request ID ```ts id: string; ``` **Source:** [src/rpc/api.ts:412](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L412) ### `simulateTransactionRestoreResponse.latestLedger` always present: the LCL known to the server when responding ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:415](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L415) ### `simulateTransactionRestoreResponse.minResourceFee` ```ts minResourceFee: string; ``` **Source:** [src/rpc/api.ts:431](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L431) ### `simulateTransactionRestoreResponse.restorePreamble` Indicates that a restoration is necessary prior to submission. In other words, seeing a restoration preamble means that your invocation was executed AS IF the required ledger entries were present, and this field includes information about what you need to restore for the simulation to succeed. ```ts restorePreamble: { minResourceFee: string; transactionData: SorobanDataBuilder }; ``` **Source:** [src/rpc/api.ts:457](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L457) ### `simulateTransactionRestoreResponse.result` present only for invocation simulation ```ts result: SimulateHostFunctionResult; ``` **Source:** [src/rpc/api.ts:447](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L447) ### `simulateTransactionRestoreResponse.stateChanges` State Difference information ```ts stateChanges?: LedgerEntryChange[]; ``` **Source:** [src/rpc/api.ts:437](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L437) ### `simulateTransactionRestoreResponse.transactionData` ```ts transactionData: SorobanDataBuilder; ``` **Source:** [src/rpc/api.ts:430](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L430) ## rpc.Api.SimulateTransactionSuccessResponse Includes simplified fields only present on success. ```ts interface SimulateTransactionSuccessResponse extends BaseSimulateTransactionResponse { _parsed: boolean; events: DiagnosticEvent[]; id: string; latestLedger: number; minResourceFee: string; result?: SimulateHostFunctionResult; stateChanges?: LedgerEntryChange[]; transactionData: SorobanDataBuilder; } ``` **Source:** [src/rpc/api.ts:429](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L429) ### `simulateTransactionSuccessResponse._parsed` a private field to mark the schema as parsed ```ts _parsed: boolean; ``` **Source:** [src/rpc/api.ts:425](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L425) ### `simulateTransactionSuccessResponse.events` The field is always present, but may be empty in cases where: - you didn't simulate an invocation or - there were no events ```ts events: DiagnosticEvent[]; ``` **Source:** [src/rpc/api.ts:422](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L422) ### `simulateTransactionSuccessResponse.id` always present: the JSON-RPC request ID ```ts id: string; ``` **Source:** [src/rpc/api.ts:412](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L412) ### `simulateTransactionSuccessResponse.latestLedger` always present: the LCL known to the server when responding ```ts latestLedger: number; ``` **Source:** [src/rpc/api.ts:415](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L415) ### `simulateTransactionSuccessResponse.minResourceFee` ```ts minResourceFee: string; ``` **Source:** [src/rpc/api.ts:431](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L431) ### `simulateTransactionSuccessResponse.result` present only for invocation simulation ```ts result?: SimulateHostFunctionResult; ``` **Source:** [src/rpc/api.ts:434](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L434) ### `simulateTransactionSuccessResponse.stateChanges` State Difference information ```ts stateChanges?: LedgerEntryChange[]; ``` **Source:** [src/rpc/api.ts:437](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L437) ### `simulateTransactionSuccessResponse.transactionData` ```ts transactionData: SorobanDataBuilder; ``` **Source:** [src/rpc/api.ts:430](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L430) ## rpc.Api.SimulationAuthMode ```ts type SimulationAuthMode = "enforce" | "record" | "record_allow_nonroot" ``` **Source:** [src/rpc/api.ts:388](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L388) ## rpc.Api.TransactionEvents ```ts interface TransactionEvents { contractEventsXdr: ContractEvent[][]; transactionEventsXdr: TransactionEvent[]; } ``` **Source:** [src/rpc/api.ts:186](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L186) ### `transactionEvents.contractEventsXdr` ```ts contractEventsXdr: ContractEvent[][]; ``` **Source:** [src/rpc/api.ts:188](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L188) ### `transactionEvents.transactionEventsXdr` ```ts transactionEventsXdr: TransactionEvent[]; ``` **Source:** [src/rpc/api.ts:187](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L187) ## rpc.Api.TransactionInfo ```ts interface TransactionInfo { applicationOrder: number; createdAt: number; diagnosticEventsXdr?: DiagnosticEvent[]; envelopeXdr: TransactionEnvelope; events: TransactionEvents; feeBump: boolean; ledger: number; resultMetaXdr: TransactionMeta; resultXdr: TransactionResult; returnValue?: ScVal; status: GetTransactionStatus; txHash: string; } ``` **Source:** [src/rpc/api.ts:191](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L191) ### `transactionInfo.applicationOrder` ```ts applicationOrder: number; ``` **Source:** [src/rpc/api.ts:195](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L195) ### `transactionInfo.createdAt` ```ts createdAt: number; ``` **Source:** [src/rpc/api.ts:194](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L194) ### `transactionInfo.diagnosticEventsXdr` ```ts diagnosticEventsXdr?: DiagnosticEvent[]; ``` **Source:** [src/rpc/api.ts:203](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L203) ### `transactionInfo.envelopeXdr` ```ts envelopeXdr: TransactionEnvelope; ``` **Source:** [src/rpc/api.ts:199](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L199) ### `transactionInfo.events` ```ts events: TransactionEvents; ``` **Source:** [src/rpc/api.ts:205](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L205) ### `transactionInfo.feeBump` ```ts feeBump: boolean; ``` **Source:** [src/rpc/api.ts:196](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L196) ### `transactionInfo.ledger` ```ts ledger: number; ``` **Source:** [src/rpc/api.ts:193](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L193) ### `transactionInfo.resultMetaXdr` ```ts resultMetaXdr: TransactionMeta; ``` **Source:** [src/rpc/api.ts:201](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L201) ### `transactionInfo.resultXdr` ```ts resultXdr: TransactionResult; ``` **Source:** [src/rpc/api.ts:200](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L200) ### `transactionInfo.returnValue` ```ts returnValue?: ScVal; ``` **Source:** [src/rpc/api.ts:202](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L202) ### `transactionInfo.status` ```ts status: GetTransactionStatus; ``` **Source:** [src/rpc/api.ts:192](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L192) ### `transactionInfo.txHash` ```ts txHash: string; ``` **Source:** [src/rpc/api.ts:197](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L197) ## rpc.Api.isSimulationError Checks if a simulation response indicates an error. ```ts isSimulationError(sim: SimulateTransactionResponse): sim is SimulateTransactionErrorResponse ``` **Parameters** - **`sim`** — `SimulateTransactionResponse` (required) — The simulation response to check. **Returns** True if the response indicates an error, false otherwise. **Source:** [src/rpc/api.ts:468](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L468) ## rpc.Api.isSimulationRaw Checks if a simulation response is in raw (unparsed) form. ```ts isSimulationRaw(sim: SimulateTransactionResponse | RawSimulateTransactionResponse): sim is RawSimulateTransactionResponse ``` **Parameters** - **`sim`** — `SimulateTransactionResponse | RawSimulateTransactionResponse` (required) — The simulation response to check. **Returns** True if the response is raw, false otherwise. **Source:** [src/rpc/api.ts:505](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L505) ## rpc.Api.isSimulationRestore Checks if a simulation response indicates that a restoration is needed. ```ts isSimulationRestore(sim: SimulateTransactionResponse): sim is SimulateTransactionRestoreResponse ``` **Parameters** - **`sim`** — `SimulateTransactionResponse` (required) — The simulation response to check. **Returns** True if the response indicates a restoration is needed, false otherwise. **Source:** [src/rpc/api.ts:490](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L490) ## rpc.Api.isSimulationSuccess Checks if a simulation response indicates success. ```ts isSimulationSuccess(sim: SimulateTransactionResponse): sim is SimulateTransactionSuccessResponse ``` **Parameters** - **`sim`** — `SimulateTransactionResponse` (required) — The simulation response to check. **Returns** True if the response indicates success, false otherwise. **Source:** [src/rpc/api.ts:479](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/api.ts#L479) ## rpc.BasicSleepStrategy ```ts const BasicSleepStrategy: SleepStrategy ``` **Source:** [src/rpc/server.ts:90](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L90) ## rpc.Durability Specifies the durability namespace of contract-related ledger entries. ```ts enum Durability ``` **See also** - - `State Archival docs` - `Rust SDK Storage docs` **Source:** [src/rpc/server.ts:48](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L48) ## rpc.LinearSleepStrategy ```ts const LinearSleepStrategy: SleepStrategy ``` **Source:** [src/rpc/server.ts:93](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L93) ## rpc.Server Handles the network connection to a Soroban RPC instance, exposing an interface for requests to that instance. ```ts class Server { constructor(serverURL: string, opts: Options = {}); readonly httpClient: HttpClient; readonly serverURL: URL; _getEvents(request: GetEventsRequest): Promise; _getLatestLedger(): Promise; _getLedgerEntries(...keys: LedgerKey[]): Promise; _getLedgers(request: GetLedgersRequest): Promise; _getTransaction(hash: string): Promise; _getTransactions(request: GetTransactionsRequest): Promise; _sendTransaction(transaction: Transaction | FeeBumpTransaction): Promise; _simulateTransaction(transaction: Transaction | FeeBumpTransaction, addlResources?: ResourceLeeway, authMode?: SimulationAuthMode): Promise; fundAddress(address: string, friendbotUrl?: string): Promise; getAccount(address: string): Promise; getAccountEntry(address: string): Promise; getAssetBalance(address: string | Address | Contract, asset: Asset, networkPassphrase?: string): Promise; getClaimableBalance(id: string): Promise; getContractData(contract: string | Address | Contract, key: ScVal, durability: Durability = Durability.Persistent): Promise; getContractWasmByContractId(contractId: string): Promise>; getContractWasmByHash(wasmHash: string | Buffer, format: "base64" | "hex" | undefined = undefined): Promise>; getEvents(request: GetEventsRequest): Promise; getFeeStats(): Promise; getHealth(): Promise; getLatestLedger(): Promise; getLedgerEntries(...keys: LedgerKey[]): Promise; getLedgerEntry(key: LedgerKey): Promise; getLedgers(request: GetLedgersRequest): Promise; getNetwork(): Promise; getSACBalance(address: string | Address, sac: Asset, networkPassphrase?: string): Promise; getTransaction(hash: string): Promise; getTransactions(request: GetTransactionsRequest): Promise; getTrustline(account: string, asset: Asset): Promise; getVersionInfo(): Promise; pollTransaction(hash: string, opts?: PollingOptions): Promise; prepareTransaction(tx: Transaction | FeeBumpTransaction): Promise; requestAirdrop(address: string | Pick, friendbotUrl?: string): Promise; sendTransaction(transaction: Transaction | FeeBumpTransaction): Promise; simulateTransaction(tx: Transaction | FeeBumpTransaction, addlResources?: ResourceLeeway, authMode?: SimulationAuthMode): Promise; } ``` **See also** - `API reference docs` **Source:** [src/rpc/server.ts:53](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L53) ### `new Server(serverURL, opts)` ```ts constructor(serverURL: string, opts: Options = {}); ``` **Parameters** - **`serverURL`** — `string` (required) - **`opts`** — `Options` (optional) (default: `{}`) **Source:** [src/rpc/server.ts:170](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L170) ### `server.httpClient` HTTP client instance for making requests to Horizon. Exposes interceptors, defaults, and other configuration options. ```ts readonly httpClient: HttpClient; ``` **Example** ```ts // Add authentication header server.httpClient.defaults.headers['Authorization'] = 'Bearer token'; // Add request interceptor server.httpClient.interceptors.request.use((config) => { console.log('Request:', config.url); return config; }); ``` **Source:** [src/rpc/server.ts:169](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L169) ### `server.serverURL` ```ts readonly serverURL: URL; ``` **Source:** [src/rpc/server.ts:152](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L152) ### `server._getEvents(request)` ```ts _getEvents(request: GetEventsRequest): Promise; ``` **Parameters** - **`request`** — `GetEventsRequest` (required) **Source:** [src/rpc/server.ts:896](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L896) ### `server._getLatestLedger()` ```ts _getLatestLedger(): Promise; ``` **Source:** [src/rpc/server.ts:967](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L967) ### `server._getLedgerEntries(keys)` ```ts _getLedgerEntries(...keys: LedgerKey[]): Promise; ``` **Parameters** - **`...keys`** — `LedgerKey[]` (required) **Source:** [src/rpc/server.ts:661](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L661) ### `server._getLedgers(request)` ```ts _getLedgers(request: GetLedgersRequest): Promise; ``` **Parameters** - **`request`** — `GetLedgersRequest` (required) **Source:** [src/rpc/server.ts:1558](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L1558) ### `server._getTransaction(hash)` ```ts _getTransaction(hash: string): Promise; ``` **Parameters** - **`hash`** — `string` (required) **Source:** [src/rpc/server.ts:784](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L784) ### `server._getTransactions(request)` ```ts _getTransactions(request: GetTransactionsRequest): Promise; ``` **Parameters** - **`request`** — `GetTransactionsRequest` (required) **Source:** [src/rpc/server.ts:835](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L835) ### `server._sendTransaction(transaction)` ```ts _sendTransaction(transaction: Transaction | FeeBumpTransaction): Promise; ``` **Parameters** - **`transaction`** — `Transaction | FeeBumpTransaction` (required) **Source:** [src/rpc/server.ts:1194](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L1194) ### `server._simulateTransaction(transaction, addlResources, authMode)` ```ts _simulateTransaction(transaction: Transaction | FeeBumpTransaction, addlResources?: ResourceLeeway, authMode?: SimulationAuthMode): Promise; ``` **Parameters** - **`transaction`** — `Transaction | FeeBumpTransaction` (required) - **`addlResources`** — `ResourceLeeway` (optional) - **`authMode`** — `SimulationAuthMode` (optional) **Source:** [src/rpc/server.ts:1041](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L1041) ### `server.fundAddress(address, friendbotUrl)` Fund an address using the network's Friendbot faucet, if any. This method supports both account (G...) and contract (C...) addresses. ```ts fundAddress(address: string, friendbotUrl?: string): Promise; ``` **Parameters** - **`address`** — `string` (required) — The address to fund. Can be either a Stellar account (G...) or contract (C...) address. - **`friendbotUrl`** — `string` (optional) — (optional) Optionally, an explicit Friendbot URL (by default: this calls the Stellar RPC `getNetwork` method to try to discover this network's Friendbot url). **Returns** The transaction response from the Friendbot funding transaction. **Throws** - If Friendbot is not configured on this network or the funding transaction fails. **Example** ```ts // Funding an account (G... address) const tx = await server.fundAddress("GBZC6Y2Y7..."); console.log("Funded! Hash:", tx.txHash); // If you need the Account object: const account = await server.getAccount("GBZC6Y2Y7..."); ``` **Example** ```ts // Funding a contract (C... address) const tx = await server.fundAddress("CBZC6Y2Y7..."); console.log("Contract funded! Hash:", tx.txHash); ``` **See also** - `Friendbot docs` **Source:** [src/rpc/server.ts:1317](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L1317) ### `server.getAccount(address)` Fetch a minimal set of current info about a Stellar account. Needed to get the current sequence number for the account so you can build a successful transaction with `TransactionBuilder`. ```ts getAccount(address: string): Promise; ``` **Parameters** - **`address`** — `string` (required) — The public address of the account to load. **Returns** A promise which resolves to the `Account` object with a populated sequence number **Example** ```ts const accountId = "GBZC6Y2Y7Q3ZQ2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4"; server.getAccount(accountId).then((account) => { console.log("sequence:", account.sequence); }); ``` **See also** - `getLedgerEntries docs` **Source:** [src/rpc/server.ts:203](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L203) ### `server.getAccountEntry(address)` Fetch the full account entry for a Stellar account. ```ts getAccountEntry(address: string): Promise; ``` **Parameters** - **`address`** — `string` (required) — The public address of the account to load. **Returns** Resolves to the full on-chain account entry **Example** ```ts const accountId = "GBZC6Y2Y7Q3ZQ2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4"; server.getAccountEntry(accountId).then((account) => { console.log("sequence:", account.balance().toString()); }); ``` **See also** - `getLedgerEntries docs` **Source:** [src/rpc/server.ts:226](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L226) ### `server.getAssetBalance(address, asset, networkPassphrase)` Fetch the balance of an asset held by an account or contract. The `address` argument may be provided as a string (as a `StrKey`), `Address`, or `Contract`. ```ts getAssetBalance(address: string | Address | Contract, asset: Asset, networkPassphrase?: string): Promise; ``` **Parameters** - **`address`** — `string | Address | Contract` (required) — The account or contract whose balance should be fetched. - **`asset`** — `Asset` (required) — The asset whose balance you want to inspect. - **`networkPassphrase`** — `string` (optional) — (optional) optionally, when requesting the balance of a contract, the network passphrase to which this token applies. If omitted and necessary, a request about network information will be made (see `getNetwork`), since contract IDs for assets are specific to a network. You can refer to `Networks` for a list of built-in passphrases, e.g., `Networks.TESTNET`. **Returns** Resolves with balance entry details when available. **Throws** - If the supplied `address` is not a valid account or contract strkey. **Example** ```ts const usdc = new Asset( "USDC", "GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5" ); const balance = await server.getAssetBalance("GD...", usdc); console.log(balance.balanceEntry?.amount); ``` **Source:** [src/rpc/server.ts:376](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L376) ### `server.getClaimableBalance(id)` Fetch the full claimable balance entry for a Stellar account. ```ts getClaimableBalance(id: string): Promise; ``` **Parameters** - **`id`** — `string` (required) — The strkey (`B...`) or hex (`00000000abcde...`) (both IDs with and without the 000... version prefix are accepted) of the claimable balance to load **Returns** Resolves to the full on-chain claimable balance entry **Example** ```ts const id = "00000000178826fbfe339e1f5c53417c6fedfe2c05e8bec14303143ec46b38981b09c3f9"; server.getClaimableBalance(id).then((entry) => { console.log(`Claimable balance {id.substr(0, 12)} has:`); console.log(` asset: ${Asset.fromXDRObject(entry.asset()).toString()}`; console.log(` amount: ${entry.amount().toString()}`; }); ``` **See also** - `getLedgerEntries docs` **Source:** [src/rpc/server.ts:308](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L308) ### `server.getContractData(contract, key, durability)` Reads the current value of contract data ledger entries directly. 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 `rpc.Server.simulateTransaction`. ```ts getContractData(contract: string | Address | Contract, key: ScVal, durability: Durability = Durability.Persistent): Promise; ``` **Parameters** - **`contract`** — `string | Address | Contract` (required) — The contract ID containing the data to load as a strkey (`C...` form), a `Contract`, or an `Address` instance - **`key`** — `ScVal` (required) — The key of the contract data to load - **`durability`** — `Durability` (optional) (default: `Durability.Persistent`) — (optional) The "durability keyspace" that this ledger key belongs to, which is either 'temporary' or 'persistent' (the default), see `rpc.Durability`. **Returns** 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. **Example** ```ts const contractId = "CCJZ5DGASBWQXR5MPFCJXMBI333XE5U3FSJTNQU7RIKE3P5GN2K2WYD5"; const key = xdr.ScVal.scvSymbol("counter"); server.getContractData(contractId, key, Durability.Temporary).then(data => { console.log("value:", data.val); console.log("liveUntilLedgerSeq:", data.liveUntilLedgerSeq); console.log("lastModified:", data.lastModifiedLedgerSeq); console.log("latestLedger:", data.latestLedger); }); ``` **See also** - `getLedgerEntries docs` **Source:** [src/rpc/server.ts:477](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L477) ### `server.getContractWasmByContractId(contractId)` Retrieves the WASM bytecode for a given contract. This method allows you to fetch the WASM bytecode associated with a contract deployed on the Soroban network. The WASM bytecode represents the executable code of the contract. ```ts getContractWasmByContractId(contractId: string): Promise>; ``` **Parameters** - **`contractId`** — `string` (required) — The contract ID containing the WASM bytecode to retrieve **Returns** A Buffer containing the WASM bytecode **Throws** - If the contract or its associated WASM bytecode cannot be found on the network. **Example** ```ts const contractId = "CCJZ5DGASBWQXR5MPFCJXMBI333XE5U3FSJTNQU7RIKE3P5GN2K2WYD5"; server.getContractWasmByContractId(contractId).then(wasmBuffer => { console.log("WASM bytecode length:", wasmBuffer.length); // ... do something with the WASM bytecode ... }).catch(err => { console.error("Error fetching WASM bytecode:", err); }); ``` **Source:** [src/rpc/server.ts:551](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L551) ### `server.getContractWasmByHash(wasmHash, format)` Retrieves the WASM bytecode for a given contract hash. This method allows you to fetch the WASM bytecode associated with a contract deployed on the Soroban network using the contract's WASM hash. The WASM bytecode represents the executable code of the contract. ```ts getContractWasmByHash(wasmHash: string | Buffer, format: "base64" | "hex" | undefined = undefined): Promise>; ``` **Parameters** - **`wasmHash`** — `string | Buffer` (required) — The WASM hash of the contract - **`format`** — `"base64" | "hex" | undefined` (optional) (default: `undefined`) **Returns** A Buffer containing the WASM bytecode **Throws** - If the contract or its associated WASM bytecode cannot be found on the network. **Example** ```ts const wasmHash = Buffer.from("..."); server.getContractWasmByHash(wasmHash).then(wasmBuffer => { console.log("WASM bytecode length:", wasmBuffer.length); // ... do something with the WASM bytecode ... }).catch(err => { console.error("Error fetching WASM bytecode:", err); }); ``` **Source:** [src/rpc/server.ts:596](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L596) ### `server.getEvents(request)` Fetch all events that match a given set of filters. The given filters (see `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 `Api.EventResponse` object to set the `cursor` parameter. ```ts getEvents(request: GetEventsRequest): Promise; ``` **Parameters** - **`request`** — `GetEventsRequest` (required) — Event filters `Api.GetEventsRequest`, **Returns** A paginatable set of the events matching the given event filters **Example** ```ts server.getEvents({ startLedger: 1000, endLedger: 2000, filters: [ { type: "contract", contractIds: [ "deadb33f..." ], topics: [[ "AAAABQAAAAh0cmFuc2Zlcg==", "AAAAAQB6Mcc=", "*" ]] }, { type: "system", contractIds: [ "...c4f3b4b3..." ], topics: [[ "*" ], [ "*", "AAAAAQB6Mcc=" ]] }, { contractIds: [ "...c4f3b4b3..." ], topics: [[ "AAAABQAAAAh0cmFuc2Zlcg==" ]] }, { type: "diagnostic", topics: [[ "AAAAAQB6Mcc=" ]] } ], limit: 10, }); ``` **See also** - `getEvents docs` **Source:** [src/rpc/server.ts:890](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L890) ### `server.getFeeStats()` Provides an analysis of the recent fee stats for regular and smart contract operations. ```ts getFeeStats(): Promise; ``` **Returns** the fee stats **See also** - https://developers.stellar.org/docs/data/rpc/api-reference/methods/getFeeStats **Source:** [src/rpc/server.ts:1363](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L1363) ### `server.getHealth()` General node health check. ```ts getHealth(): Promise; ``` **Returns** A promise which resolves to the `Api.GetHealthResponse` object with the status of the server (e.g. "healthy"). **Example** ```ts server.getHealth().then((health) => { console.log("status:", health.status); }); ``` **See also** - `getLedgerEntries docs` **Source:** [src/rpc/server.ts:435](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L435) ### `server.getLatestLedger()` Fetch the latest ledger meta info from network which this Soroban RPC server is connected to. ```ts getLatestLedger(): Promise; ``` **Returns** metadata about the latest ledger on the network that this RPC server is connected to **Example** ```ts server.getLatestLedger().then((response) => { console.log("hash:", response.id); console.log("sequence:", response.sequence); console.log("protocolVersion:", response.protocolVersion); }); ``` **See also** - `getLatestLedger docs` **Source:** [src/rpc/server.ts:963](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L963) ### `server.getLedgerEntries(keys)` Reads the current value of arbitrary ledger entries directly. Allows you to directly inspect the current state of contracts, contract's code, accounts, or any other ledger entries. To fetch a contract's WASM byte-code, built the appropriate `xdr.LedgerKeyContractCode` ledger entry key (or see `Contract.getFootprint`). ```ts getLedgerEntries(...keys: LedgerKey[]): Promise; ``` **Parameters** - **`...keys`** — `LedgerKey[]` (required) — One or more ledger entry keys to load **Returns** The current on-chain values for the given ledger keys **Example** ```ts const contractId = "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM"; const key = xdr.LedgerKey.contractData(new xdr.LedgerKeyContractData({ contractId: StrKey.decodeContract(contractId), key: xdr.ScVal.scvSymbol("counter"), })); server.getLedgerEntries([key]).then(response => { const ledgerData = response.entries[0]; console.log("key:", ledgerData.key); console.log("value:", ledgerData.val); console.log("liveUntilLedgerSeq:", ledgerData.liveUntilLedgerSeq); console.log("lastModified:", ledgerData.lastModifiedLedgerSeq); console.log("latestLedger:", response.latestLedger); }); ``` **See also** - - `getLedgerEntries docs` - RpcServer._getLedgerEntries **Source:** [src/rpc/server.ts:657](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L657) ### `server.getLedgerEntry(key)` ```ts getLedgerEntry(key: LedgerKey): Promise; ``` **Parameters** - **`key`** — `LedgerKey` (required) **Source:** [src/rpc/server.ts:672](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L672) ### `server.getLedgers(request)` Fetch a detailed list of ledgers starting from a specified point. Returns ledger data with support for pagination as long as the requested pages fall within the history retention of the RPC provider. ```ts getLedgers(request: GetLedgersRequest): Promise; ``` **Parameters** - **`request`** — `GetLedgersRequest` (required) — The request parameters for fetching ledgers. `Api.GetLedgersRequest` **Returns** A promise that resolves to the ledgers response containing an array of ledger data and pagination info. `Api.GetLedgersResponse` **Throws** - If startLedger is less than the oldest ledger stored in this node, or greater than the latest ledger seen by this node. **Example** ```ts // Fetch ledgers starting from a specific sequence number server.getLedgers({ startLedger: 36233, pagination: { limit: 10 } }).then((response) => { console.log("Ledgers:", response.ledgers); console.log("Latest Ledger:", response.latestLedger); console.log("Cursor:", response.cursor); }); ``` **Example** ```ts // Paginate through ledgers using cursor const firstPage = await server.getLedgers({ startLedger: 36233, pagination: { limit: 5 } }); const nextPage = await server.getLedgers({ pagination: { cursor: firstPage.cursor, limit: 5 } }); ``` **See also** - `getLedgers docs` **Source:** [src/rpc/server.ts:1542](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L1542) ### `server.getNetwork()` Fetch metadata about the network this Soroban RPC server is connected to. ```ts getNetwork(): Promise; ``` **Returns** Metadata about the current network this RPC server is connected to **Example** ```ts server.getNetwork().then((network) => { console.log("friendbotUrl:", network.friendbotUrl); console.log("passphrase:", network.passphrase); console.log("protocolVersion:", network.protocolVersion); }); ``` **See also** - `getNetwork docs` **Source:** [src/rpc/server.ts:937](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L937) ### `server.getSACBalance(address, sac, networkPassphrase)` **Deprecated.** Use `getAssetBalance`, instead Returns a contract's balance of a particular SAC asset, if any. This is a convenience wrapper around `Server.getLedgerEntries`. ```ts getSACBalance(address: string | Address, sac: Asset, networkPassphrase?: string): Promise; ``` **Parameters** - **`address`** — `string | Address` (required) — the contract (string `C...`) whose balance of `sac` you want to know - **`sac`** — `Asset` (required) — the built-in SAC token (e.g. `USDC:GABC...`) that you are querying from the given `contract`. - **`networkPassphrase`** — `string` (optional) — (optional) optionally, the network passphrase to which this token applies. If omitted, a request about network information will be made (see `getNetwork`), since contract IDs for assets are specific to a network. You can refer to `Networks` for a list of built-in passphrases, e.g., `Networks.TESTNET`. **Returns** , which will contain the balance entry details if and only if the request returned a valid balance ledger entry. If it doesn't, the `balanceEntry` field will not exist. **Throws** - If `address` is not a valid contract ID (C...). **Example** ```ts // assume `address` is some contract or account with an XLM balance // assume server is an instantiated `Server` instance. const entry = (await server.getSACBalance( new Address(address), Asset.native(), Networks.PUBLIC )); // assumes BigInt support: console.log( entry.balanceEntry ? BigInt(entry.balanceEntry.amount) : "Address has no XLM"); ``` **See also** - - getLedgerEntries - https://developers.stellar.org/docs/tokens/stellar-asset-contract **Source:** [src/rpc/server.ts:1427](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L1427) ### `server.getTransaction(hash)` Fetch the details of a submitted transaction. After submitting a transaction, clients should poll this to tell when the transaction has completed. ```ts getTransaction(hash: string): Promise; ``` **Parameters** - **`hash`** — `string` (required) — Hex-encoded hash of the transaction to check **Returns** The status, result, and other details about the transaction **Example** ```ts const transactionHash = "c4515e3bdc0897f21cc5dbec8c82cf0a936d4741cb74a8e158eb51b9fb00411a"; server.getTransaction(transactionHash).then((tx) => { console.log("status:", tx.status); console.log("envelopeXdr:", tx.envelopeXdr); console.log("resultMetaXdr:", tx.resultMetaXdr); console.log("resultXdr:", tx.resultXdr); }); ``` **See also** - `getTransaction docs` **Source:** [src/rpc/server.ts:757](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L757) ### `server.getTransactions(request)` Fetch transactions starting from a given start ledger or a cursor. The end ledger is the latest ledger in that RPC instance. ```ts getTransactions(request: GetTransactionsRequest): Promise; ``` **Parameters** - **`request`** — `GetTransactionsRequest` (required) — The request parameters. **Returns** - A promise that resolves to the transactions response. **Example** ```ts server.getTransactions({ startLedger: 10000, limit: 10, }).then((response) => { console.log("Transactions:", response.transactions); console.log("Latest Ledger:", response.latestLedger); console.log("Cursor:", response.cursor); }); ``` **See also** - https://developers.stellar.org/docs/data/rpc/api-reference/methods/getTransactions **Source:** [src/rpc/server.ts:817](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L817) ### `server.getTrustline(account, asset)` **Deprecated.** Use `getAssetBalance`, instead Fetch the full trustline entry for a Stellar account. ```ts getTrustline(account: string, asset: Asset): Promise; ``` **Parameters** - **`account`** — `string` (required) — The public address of the account whose trustline it is - **`asset`** — `Asset` (required) — The trustline's asset **Returns** Resolves to the full on-chain trustline entry **Example** ```ts const accountId = "GBZC6Y2Y7Q3ZQ2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4"; const asset = new Asset( "USDC", "GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5" ); server.getTrustline(accountId, asset).then((entry) => { console.log(`{asset.toString()} balance for ${accountId}:", entry.balance().toString()); }); ``` **See also** - `getLedgerEntries docs` **Source:** [src/rpc/server.ts:265](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L265) ### `server.getVersionInfo()` Provides information about the current version details of the Soroban RPC and captive-core ```ts getVersionInfo(): Promise; ``` **Returns** the version info **See also** - https://developers.stellar.org/docs/data/rpc/api-reference/methods/getVersionInfo **Source:** [src/rpc/server.ts:1377](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L1377) ### `server.pollTransaction(hash, opts)` Poll for a particular transaction with certain parameters. After submitting a transaction, clients can use this to poll for transaction completion and return a definitive state of success or failure. ```ts pollTransaction(hash: string, opts?: PollingOptions): Promise; ``` **Parameters** - **`hash`** — `string` (required) — the transaction you're polling for - **`opts`** — `PollingOptions` (optional) — (optional) polling options - `attempts` (optional): (optional) the number of attempts to make before returning the last-seen status. By default or on invalid inputs, try 5 times. - `sleepStrategy` (optional): (optional) the amount of time to wait for between each attempt. By default, sleep for 1 second between each attempt. **Returns** the response after a "found" response (which may be success or failure) or the last response obtained after polling the maximum number of specified attempts. **Example** ```ts const h = "c4515e3bdc0897f21cc5dbec8c82cf0a936d4741cb74a8e158eb51b9fb00411a"; const txStatus = await server.pollTransaction(h, { attempts: 100, // I'm a maniac sleepStrategy: rpc.LinearSleepStrategy }); // this will take 5,050 seconds to complete ``` **Source:** [src/rpc/server.ts:710](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L710) ### `server.prepareTransaction(tx)` Submit a trial contract invocation, first run a simulation of the contract invocation as defined on the incoming transaction, and apply the results to a new copy of the transaction which is then returned. Setting the ledger footprint and authorization, so the resulting transaction is ready for signing & sending. 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 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 `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 `rpc.assembleTransaction`. ```ts prepareTransaction(tx: Transaction | FeeBumpTransaction): Promise; ``` **Parameters** - **`tx`** — `Transaction | FeeBumpTransaction` (required) — the transaction to prepare. It should include exactly one operation, which must be one of `xdr.InvokeHostFunctionOp`, `xdr.ExtendFootprintTtlOp`, or `xdr.RestoreFootprintOp`. Any provided footprint will be overwritten. However, if your operation has existing auth entries, they will be preferred over ALL auth entries 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** 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. **Throws** - * If simulation fails **Example** ```ts const contractId = 'CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE'; const contract = new StellarSdk.Contract(contractId); // Right now, this is just the default fee for this example. const fee = StellarSdk.BASE_FEE; const transaction = new StellarSdk.TransactionBuilder(account, { fee }) // Uncomment the following line to build transactions for the live network. Be // sure to also change the horizon hostname. //.setNetworkPassphrase(StellarSdk.Networks.PUBLIC) .setNetworkPassphrase(StellarSdk.Networks.FUTURENET) .setTimeout(30) // valid for the next 30s // Add an operation to call increment() on the contract .addOperation(contract.call("increment")) .build(); const preparedTransaction = await server.prepareTransaction(transaction); // Sign this transaction with the secret key // NOTE: signing is transaction is network specific. Test network transactions // won't work in the public network. To switch networks, use the Network object // as explained above (look for StellarSdk.Network). const sourceKeypair = StellarSdk.Keypair.fromSecret(sourceSecretKey); preparedTransaction.sign(sourceKeypair); server.sendTransaction(transaction).then(result => { console.log("hash:", result.hash); console.log("status:", result.status); console.log("errorResultXdr:", result.errorResultXdr); }); ``` **See also** - - module:rpc.assembleTransaction - `simulateTransaction docs` **Source:** [src/rpc/server.ts:1133](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L1133) ### `server.requestAirdrop(address, friendbotUrl)` **Deprecated.** Use `Server.fundAddress` instead, which supports both account (G...) and contract (C...) addresses. Fund a new account using the network's Friendbot faucet, if any. ```ts requestAirdrop(address: string | Pick, friendbotUrl?: string): Promise; ``` **Parameters** - **`address`** — `string | Pick` (required) — The address or account instance that we want to create and fund with Friendbot - **`friendbotUrl`** — `string` (optional) — (optional) Optionally, an explicit address for friendbot (by default: this calls the Soroban RPC `getNetwork` method to try to discover this network's Friendbot url). **Returns** An `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 **Example** ```ts server .requestAirdrop("GBZC6Y2Y7Q3ZQ2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4") .then((accountCreated) => { console.log("accountCreated:", accountCreated); }).catch((error) => { console.error("error:", error); }); ``` **See also** - - `Friendbot docs` - `Friendbot.Api.Response` **Source:** [src/rpc/server.ts:1239](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L1239) ### `server.sendTransaction(transaction)` Submit a real transaction to the Stellar network. Unlike Horizon, RPC does not wait for transaction completion. It simply validates the transaction and enqueues it. Clients should call `rpc.Server.getTransaction` to learn about transaction success/failure. ```ts sendTransaction(transaction: Transaction | FeeBumpTransaction): Promise; ``` **Parameters** - **`transaction`** — `Transaction | FeeBumpTransaction` (required) — to submit **Returns** the transaction id, status, and any error if available **Example** ```ts const contractId = 'CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE'; const contract = new StellarSdk.Contract(contractId); // Right now, this is just the default fee for this example. const fee = StellarSdk.BASE_FEE; const transaction = new StellarSdk.TransactionBuilder(account, { fee }) // Uncomment the following line to build transactions for the live network. Be // sure to also change the horizon hostname. //.setNetworkPassphrase(StellarSdk.Networks.PUBLIC) .setNetworkPassphrase(StellarSdk.Networks.FUTURENET) .setTimeout(30) // valid for the next 30s // Add an operation to call increment() on the contract .addOperation(contract.call("increment")) .build(); // Sign this transaction with the secret key // NOTE: signing is transaction is network specific. Test network transactions // won't work in the public network. To switch networks, use the Network object // as explained above (look for StellarSdk.Network). const sourceKeypair = StellarSdk.Keypair.fromSecret(sourceSecretKey); transaction.sign(sourceKeypair); server.sendTransaction(transaction).then((result) => { console.log("hash:", result.hash); console.log("status:", result.status); console.log("errorResultXdr:", result.errorResultXdr); }); ``` **See also** - - `transaction docs` - `sendTransaction docs` **Source:** [src/rpc/server.ts:1188](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L1188) ### `server.simulateTransaction(tx, addlResources, authMode)` Submit a trial contract invocation to get back return values, expected ledger footprint, expected authorizations, and expected costs. ```ts simulateTransaction(tx: Transaction | FeeBumpTransaction, addlResources?: ResourceLeeway, authMode?: SimulationAuthMode): Promise; ``` **Parameters** - **`tx`** — `Transaction | FeeBumpTransaction` (required) — the transaction to simulate, which should include exactly one operation (one of `xdr.InvokeHostFunctionOp`, `xdr.ExtendFootprintTtlOp`, or `xdr.RestoreFootprintOp`). Any provided footprint or auth information will be ignored. - **`addlResources`** — `ResourceLeeway` (optional) — (optional) any additional resources to add to the simulation-provided ones, for example if you know you will need extra CPU instructions - **`authMode`** — `SimulationAuthMode` (optional) — (optional) optionally, specify the type of auth mode to use for simulation: `enforce` for enforcement mode, `record` for recording mode, or `record_allow_nonroot` for recording mode that allows non-root authorization **Returns** An object with the cost, footprint, result/auth requirements (if applicable), and error of the transaction **Example** ```ts const contractId = 'CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE'; const contract = new StellarSdk.Contract(contractId); // Right now, this is just the default fee for this example. const fee = StellarSdk.BASE_FEE; const transaction = new StellarSdk.TransactionBuilder(account, { fee }) // Uncomment the following line to build transactions for the live network. Be // sure to also change the horizon hostname. //.setNetworkPassphrase(StellarSdk.Networks.PUBLIC) .setNetworkPassphrase(StellarSdk.Networks.FUTURENET) .setTimeout(30) // valid for the next 30s // Add an operation to call increment() on the contract .addOperation(contract.call("increment")) .build(); server.simulateTransaction(transaction).then((sim) => { console.log("cost:", sim.cost); console.log("result:", sim.result); console.log("error:", sim.error); console.log("latestLedger:", sim.latestLedger); }); ``` **See also** - - `transaction docs` - `simulateTransaction docs` - `authorization modes` - module:rpc.Server#prepareTransaction - module:rpc.assembleTransaction **Source:** [src/rpc/server.ts:1031](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L1031) ## rpc.Server.GetEventsRequest **Deprecated.** Use `Api.GetEventsRequest` instead. ```ts type GetEventsRequest = Api.GetEventsRequest ``` **See also** - `Api.GetEventsRequest` **Source:** [src/rpc/server.ts:58](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L58) ## rpc.Server.Options Options for configuring connections to RPC servers. ```ts interface Options { allowHttp?: boolean; headers?: Record; timeout?: number; } ``` **Source:** [src/rpc/server.ts:76](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L76) ### `options.allowHttp` Allow connecting to http servers, default: `false`. This must be set to false in production deployments! ```ts allowHttp?: boolean; ``` **Source:** [src/rpc/server.ts:78](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L78) ### `options.headers` Additional headers that should be added to any requests to the RPC server. ```ts headers?: Record; ``` **Source:** [src/rpc/server.ts:82](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L82) ### `options.timeout` Allow a timeout, default: 0. Allows user to avoid nasty lag. ```ts timeout?: number; ``` **Source:** [src/rpc/server.ts:80](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L80) ## rpc.Server.PollingOptions ```ts interface PollingOptions { attempts?: number; sleepStrategy?: SleepStrategy; } ``` **Source:** [src/rpc/server.ts:60](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L60) ### `pollingOptions.attempts` ```ts attempts?: number; ``` **Source:** [src/rpc/server.ts:61](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L61) ### `pollingOptions.sleepStrategy` ```ts sleepStrategy?: SleepStrategy; ``` **Source:** [src/rpc/server.ts:62](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L62) ## rpc.Server.ResourceLeeway Describes additional resource leeways for transaction simulation. ```ts interface ResourceLeeway { cpuInstructions: number; } ``` **Source:** [src/rpc/server.ts:68](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L68) ### `resourceLeeway.cpuInstructions` Simulate the transaction with more CPU instructions available. ```ts cpuInstructions: number; ``` **Source:** [src/rpc/server.ts:70](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/server.ts#L70) ## rpc.assembleTransaction Combines the given raw transaction alongside the simulation results. If the given transaction already has authorization entries in a host function invocation (see `Operation.invokeHostFunction`), **the simulation entries are ignored**. If the given transaction already has authorization entries in a host function invocation (see `Operation.invokeHostFunction`), **the simulation entries are ignored**. ```ts assembleTransaction(raw: Transaction | FeeBumpTransaction, simulation: SimulateTransactionResponse | RawSimulateTransactionResponse): TransactionBuilder ``` **Parameters** - **`raw`** — `Transaction | FeeBumpTransaction` (required) — the initial transaction, w/o simulation applied - **`simulation`** — `SimulateTransactionResponse | RawSimulateTransactionResponse` (required) — the Soroban RPC simulation result (see `rpc.Server.simulateTransaction`) **Returns** a new, cloned transaction with the proper auth and resource (fee, footprint) simulation data applied **See also** - - `rpc.Server.simulateTransaction` - `rpc.Server.prepareTransaction` **Source:** [src/rpc/transaction.ts:44](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/transaction.ts#L44) ## rpc.parseRawEvents Parse and return the retrieved events, if any, from a raw response from a RPC server. ```ts parseRawEvents(raw: RawGetEventsResponse): GetEventsResponse ``` **Parameters** - **`raw`** — `RawGetEventsResponse` (required) — the raw `getEvents` response from the RPC server to parse **Returns** events parsed from the RPC server's response **Source:** [src/rpc/parsers.ts:96](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/parsers.ts#L96) ## rpc.parseRawSimulation 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". ```ts parseRawSimulation(sim: SimulateTransactionResponse | RawSimulateTransactionResponse): SimulateTransactionResponse ``` **Parameters** - **`sim`** — `SimulateTransactionResponse | RawSimulateTransactionResponse` (required) — the raw response schema (parsed ones are allowed, best-effort detected, and returned untouched) **Returns** the original parameter (if already parsed), parsed otherwise **Source:** [src/rpc/parsers.ts:236](https://github.com/stellar/js-stellar-sdk/blob/master/src/rpc/parsers.ts#L236) # Source: docs/reference/network-friendbot.md # Network / Friendbot ## Friendbot.Api.Response ```ts interface Response { hash: string; result_meta_xdr: string; } ``` **Source:** [src/friendbot/index.ts:3](https://github.com/stellar/js-stellar-sdk/blob/master/src/friendbot/index.ts#L3) ### `response.hash` ```ts hash: string; ``` **Source:** [src/friendbot/index.ts:4](https://github.com/stellar/js-stellar-sdk/blob/master/src/friendbot/index.ts#L4) ### `response.result_meta_xdr` ```ts result_meta_xdr: string; ``` **Source:** [src/friendbot/index.ts:5](https://github.com/stellar/js-stellar-sdk/blob/master/src/friendbot/index.ts#L5) # Source: docs/reference/network-http.md # Network / HTTP # Source: docs/reference/contracts-client.md # Contracts / Client ## contract.AssembledTransaction The main workhorse of `Client`. This class is used to wrap a transaction-under-construction and provide high-level interfaces to the most common workflows, while still providing access to low-level stellar-sdk transaction manipulation. Most of the time, you will not construct an `AssembledTransaction` directly, but instead receive one as the return value of a `Client` method. If you're familiar with the libraries generated by soroban-cli's `contract bindings typescript` command, these also wraps `Client` and return `AssembledTransaction` instances. Let's look at examples of how to use `AssembledTransaction` for a variety of use-cases: #### 1. Simple read call Since these only require simulation, you can get the `result` of the call right after constructing your `AssembledTransaction`: ```ts const { result } = await AssembledTransaction.build({ method: 'myReadMethod', args: spec.funcArgsToScVals('myReadMethod', { args: 'for', my: 'method', ... }), contractId: 'C123…', networkPassphrase: '…', rpcUrl: 'https://…', publicKey: undefined, // irrelevant, for simulation-only read calls parseResultXdr: (result: xdr.ScVal) => spec.funcResToNative('myReadMethod', result), }) ``` While that looks pretty complicated, most of the time you will use this in conjunction with `Client`, which simplifies it to: ```ts const { result } = await client.myReadMethod({ args: 'for', my: 'method', ... }) ``` #### 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: ```ts const assembledTx = await client.myWriteMethod({ args: 'for', my: 'method', ... }) const sentTx = await assembledTx.signAndSend() ``` Here we're assuming that you're using a `Client`, rather than constructing `AssembledTransaction`'s directly. Note that `sentTx`, the return value of `signAndSend`, is a `SentTransaction`. `SentTransaction` is similar to `AssembledTransaction`, but is missing many of the methods and fields that are only relevant while assembling a transaction. It also has a few extra methods and fields that are only relevant after the transaction has been sent to the network. Like `AssembledTransaction`, `SentTransaction` also has a `result` getter, which contains the parsed final return value of the contract call. Most of the time, you may only be interested in this, so rather than getting the whole `sentTx` you may just want to: ```ts const tx = await client.myWriteMethod({ args: 'for', my: 'method', ... }) const { result } = await tx.signAndSend() ``` #### 3. More fine-grained control over transaction construction If you need more control over the transaction before simulating it, you can set various `MethodOptions` when constructing your `AssembledTransaction`. With a `Client`, this is passed as a second object after the arguments (or the only object, if the method takes no arguments): ```ts const tx = await client.myWriteMethod( { args: 'for', my: 'method', ... }, { fee: '10000', // default: {@link BASE_FEE} simulate: false, timeoutInSeconds: 20, // default: {@link DEFAULT_TIMEOUT} } ) ``` Since we've skipped simulation, we can now edit the `raw` transaction and then manually call `simulate`: ```ts tx.raw.addMemo(Memo.text('Nice memo, friend!')) await tx.simulate() ``` If you need to inspect the simulation later, you can access it with `tx.simulation`. #### 4. Multi-auth workflows Soroban, and Stellar in general, allows multiple parties to sign a transaction. Let's consider an Atomic Swap contract. Alice wants to give 10 of her Token A tokens to Bob for 5 of his Token B tokens. ```ts const ALICE = 'G123...' const BOB = 'G456...' const TOKEN_A = 'C123…' const TOKEN_B = 'C456…' const AMOUNT_A = 10n const AMOUNT_B = 5n ``` Let's say Alice is also going to be the one signing the final transaction envelope, meaning she is the invoker. So your app, from Alice's browser, simulates the `swap` call: ```ts const tx = await swapClient.swap({ a: ALICE, b: BOB, token_a: TOKEN_A, token_b: TOKEN_B, amount_a: AMOUNT_A, amount_b: AMOUNT_B, }) ``` But your app can't `signAndSend` this right away, because Bob needs to sign it first. You can check this: ```ts const whoElseNeedsToSign = tx.needsNonInvokerSigningBy() ``` You can verify that `whoElseNeedsToSign` is an array of length `1`, containing only Bob's public key. Then, still on Alice's machine, you can serialize the transaction-under-assembly: ```ts const json = tx.toJSON() ``` And now you need to send it to Bob's browser. How you do this depends on your app. Maybe you send it to a server first, maybe you use WebSockets, or maybe you have Alice text the JSON blob to Bob and have him paste it into your app in his browser (note: this option might be error-prone 😄). Once you get the JSON blob into your app on Bob's machine, you can deserialize it: ```ts const tx = swapClient.txFromJSON(json) ``` Or, if you're using a client generated with `soroban contract bindings typescript`, this deserialization will look like: ```ts const tx = swapClient.fromJSON.swap(json) ``` Then you can have Bob sign it. What Bob will actually need to sign is some _auth entries_ within the transaction, not the transaction itself or the transaction envelope. Your app can verify that Bob has the correct wallet selected, then: ```ts await tx.signAuthEntries() ``` Under the hood, this uses `signAuthEntry`, which you either need to inject during initial construction of the `Client`/`AssembledTransaction`, or which you can pass directly to `signAuthEntries`. Now Bob can again serialize the transaction and send back to Alice, where she can finally call `signAndSend()`. 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](https://github.com/stellar/js-stellar-sdk/blob/master/test/e2e/src/test-swap.js). ```ts class AssembledTransaction { static Errors: { ExpiredState: typeof ExpiredStateError; ExternalServiceError: typeof ExternalServiceError; FakeAccount: typeof FakeAccountError; InternalWalletError: typeof InternalWalletError; InvalidClientRequest: typeof InvalidClientRequestError; NeedsMoreSignatures: typeof NeedsMoreSignaturesError; NoSignatureNeeded: typeof NoSignatureNeededError; NoSigner: typeof NoSignerError; NotYetSimulated: typeof NotYetSimulatedError; NoUnsignedNonInvokerAuthEntries: typeof NoUnsignedNonInvokerAuthEntriesError; RestorationFailure: typeof RestoreFailureError; SimulationFailed: typeof SimulationFailedError; UserRejected: typeof UserRejectedError }; static build(options: AssembledTransactionOptions): Promise>; static buildWithOp(operation: Operation2, options: AssembledTransactionOptions): Promise>; static fromJSON(options: Omit, "args">, __namedParameters: { simulationResult: { auth: string[]; retval: string }; simulationTransactionData: string; tx: string }): AssembledTransaction; static fromXDR(options: Omit, "args" | "method" | "parseResultXdr">, encodedXDR: string, spec: Spec): AssembledTransaction; built?: Transaction; options: AssembledTransactionOptions; raw?: TransactionBuilder; signed?: Transaction; simulation?: SimulateTransactionResponse; readonly isReadCall: boolean; readonly result: T; readonly simulationData: { result: SimulateHostFunctionResult; transactionData: SorobanTransactionData }; needsNonInvokerSigningBy(__namedParameters: { includeAlreadySigned?: boolean } = {}): string[]; restoreFootprint(restorePreamble: { minResourceFee: string; transactionData: SorobanDataBuilder }, account?: Account): Promise; send(watcher?: Watcher): Promise>; sign(__namedParameters: { force?: boolean; signTransaction?: SignTransaction } = {}): Promise; signAndSend(__namedParameters: { force?: boolean; signTransaction?: SignTransaction; watcher?: Watcher } = {}): Promise>; signAuthEntries(__namedParameters: { address?: string; authorizeEntry?: (entry: SorobanAuthorizationEntry, signer: Keypair | SigningCallback, validUntilLedgerSeq: number, networkPassphrase: string) => Promise; expiration?: number | Promise; signAuthEntry?: SignAuthEntry } = {}): Promise; simulate(__namedParameters: { restore?: boolean } = {}): Promise>; toJSON(): string; toXDR(): string; } ``` **Source:** [src/contract/assembled_transaction.ts:255](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L255) ### `AssembledTransaction.Errors` A list of the most important errors that various AssembledTransaction methods can throw. Feel free to catch specific errors in your application logic. ```ts static Errors: { ExpiredState: typeof ExpiredStateError; ExternalServiceError: typeof ExternalServiceError; FakeAccount: typeof FakeAccountError; InternalWalletError: typeof InternalWalletError; InvalidClientRequest: typeof InvalidClientRequestError; NeedsMoreSignatures: typeof NeedsMoreSignaturesError; NoSignatureNeeded: typeof NoSignatureNeededError; NoSigner: typeof NoSignerError; NotYetSimulated: typeof NotYetSimulatedError; NoUnsignedNonInvokerAuthEntries: typeof NoUnsignedNonInvokerAuthEntriesError; RestorationFailure: typeof RestoreFailureError; SimulationFailed: typeof SimulationFailedError; UserRejected: typeof UserRejectedError }; ``` **Source:** [src/contract/assembled_transaction.ts:336](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L336) ### `AssembledTransaction.build(options)` Construct a new AssembledTransaction. This is the main way to create a new AssembledTransaction; the constructor is private. This is an asynchronous constructor for two reasons: 1. It needs to fetch the account from the network to get the current sequence number. 2. It needs to simulate the transaction to get the expected fee. If you don't want to simulate the transaction, you can set `simulate` to `false` in the options. If you need to create an operation other than `invokeHostFunction`, you can use `AssembledTransaction.buildWithOp` instead. ```ts static build(options: AssembledTransactionOptions): Promise>; ``` **Parameters** - **`options`** — `AssembledTransactionOptions` (required) **Example** ```ts const tx = await AssembledTransaction.build({ ..., simulate: false, }) ``` **Source:** [src/contract/assembled_transaction.ts:570](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L570) ### `AssembledTransaction.buildWithOp(operation, options)` Construct a new AssembledTransaction, specifying an Operation other than `invokeHostFunction` (the default used by `AssembledTransaction.build`). Note: `AssembledTransaction` currently assumes these operations can be simulated. This is not true for classic operations; only for those used by Soroban Smart Contracts like `invokeHostFunction` and `createCustomContract`. ```ts static buildWithOp(operation: Operation2, options: AssembledTransactionOptions): Promise>; ``` **Parameters** - **`operation`** — `Operation2` (required) - **`options`** — `AssembledTransactionOptions` (required) **Example** ```ts const tx = await AssembledTransaction.buildWithOp( Operation.createCustomContract({ ... }); { ..., simulate: false, } ) ``` **Source:** [src/contract/assembled_transaction.ts:599](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L599) ### `AssembledTransaction.fromJSON(options, __namedParameters)` ```ts static fromJSON(options: Omit, "args">, __namedParameters: { simulationResult: { auth: string[]; retval: string }; simulationTransactionData: string; tx: string }): AssembledTransaction; ``` **Parameters** - **`options`** — `Omit, "args">` (required) - **`__namedParameters`** — `{ simulationResult: { auth: string[]; retval: string }; simulationTransactionData: string; tx: string }` (required) **Source:** [src/contract/assembled_transaction.ts:431](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L431) ### `AssembledTransaction.fromXDR(options, encodedXDR, spec)` Deserialize the AssembledTransaction from a base64-encoded XDR string. ```ts static fromXDR(options: Omit, "args" | "method" | "parseResultXdr">, encodedXDR: string, spec: Spec): AssembledTransaction; ``` **Parameters** - **`options`** — `Omit, "args" | "method" | "parseResultXdr">` (required) - **`encodedXDR`** — `string` (required) - **`spec`** — `Spec` (required) **Source:** [src/contract/assembled_transaction.ts:490](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L490) ### `assembledTransaction.built` The Transaction as it was built with `raw.build()` right before simulation. Once this is set, modifying `raw` will have no effect unless you call `tx.simulate()` again. ```ts built?: Transaction; ``` **Source:** [src/contract/assembled_transaction.ts:283](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L283) ### `assembledTransaction.options` ```ts options: AssembledTransactionOptions; ``` **Source:** [src/contract/assembled_transaction.ts:540](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L540) ### `assembledTransaction.raw` The TransactionBuilder as constructed in `AssembledTransaction`.build. Feel free set `simulate: false` to modify this object before calling `tx.simulate()` manually. Example: ```ts const tx = await myContract.myMethod( { args: 'for', my: 'method', ... }, { simulate: false } ); tx.raw.addMemo(Memo.text('Nice memo, friend!')) await tx.simulate(); ``` ```ts raw?: TransactionBuilder; ``` **Source:** [src/contract/assembled_transaction.ts:270](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L270) ### `assembledTransaction.signed` The signed transaction. ```ts signed?: Transaction; ``` **Source:** [src/contract/assembled_transaction.ts:329](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L329) ### `assembledTransaction.simulation` The result of the transaction simulation. This is set after the first call to `simulate`. It is difficult to serialize and deserialize, so it is not included in the `toJSON` and `fromJSON` methods. See `simulationData` cached, serializable access to the data needed by AssembledTransaction logic. ```ts simulation?: SimulateTransactionResponse; ``` **Source:** [src/contract/assembled_transaction.ts:292](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L292) ### `assembledTransaction.isReadCall` Whether this transaction is a read call. This is determined by the simulation result and the transaction data. If the transaction is a read call, it will not need to be signed and sent to the network. If this returns `false`, then you need to call `signAndSend` on this transaction. ```ts readonly isReadCall: boolean; ``` **Source:** [src/contract/assembled_transaction.ts:1090](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L1090) ### `assembledTransaction.result` ```ts readonly result: T; ``` **Source:** [src/contract/assembled_transaction.ts:736](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L736) ### `assembledTransaction.simulationData` ```ts readonly simulationData: { result: SimulateHostFunctionResult; transactionData: SorobanTransactionData }; ``` **Source:** [src/contract/assembled_transaction.ts:693](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L693) ### `assembledTransaction.needsNonInvokerSigningBy(__namedParameters)` Get a list of accounts, other than the invoker of the simulation, that need to sign auth entries in this transaction. Soroban allows multiple people to sign a transaction. Someone needs to sign the final transaction envelope; this person/account is called the _invoker_, or _source_. Other accounts might need to sign individual auth entries in the transaction, if they're not also the invoker. This function returns a list of accounts that need to sign auth entries, assuming that the same invoker/source account will sign the final transaction envelope as signed the initial simulation. One at a time, for each public key in this array, you will need to serialize this transaction with `toJSON`, send to the owner of that key, deserialize the transaction with `txFromJson`, and call `AssembledTransaction.signAuthEntries`. Then re-serialize and send to the next account in this list. ```ts needsNonInvokerSigningBy(__namedParameters: { includeAlreadySigned?: boolean } = {}): string[]; ``` **Parameters** - **`__namedParameters`** — `{ includeAlreadySigned?: boolean }` (optional) (default: `{}`) **Source:** [src/contract/assembled_transaction.ts:922](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L922) ### `assembledTransaction.restoreFootprint(restorePreamble, account)` Restores the footprint (resource ledger entries that can be read or written) of an expired transaction. The method will: 1. Build a new transaction aimed at restoring the necessary resources. 2. Sign this new transaction if a `signTransaction` handler is provided. 3. Send the signed transaction to the network. 4. Await and return the response from the network. Preconditions: - A `signTransaction` function must be provided during the Client initialization. - The provided `restorePreamble` should include a minimum resource fee and valid transaction data. ```ts restoreFootprint(restorePreamble: { minResourceFee: string; transactionData: SorobanDataBuilder }, account?: Account): Promise; ``` **Parameters** - **`restorePreamble`** — `{ minResourceFee: string; transactionData: SorobanDataBuilder }` (required) — The preamble object containing data required to build the restore transaction. - **`account`** — `Account` (optional) — The account that is executing the footprint restore operation. If omitted, will use the account from the AssembledTransaction. **Throws** - - Throws an error if no `signTransaction` function is provided during Client initialization. - - Throws a custom error if the restore transaction fails, providing the details of the failure. **Source:** [src/contract/assembled_transaction.ts:1119](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L1119) ### `assembledTransaction.send(watcher)` Sends the transaction to the network to return a `SentTransaction` that keeps track of all the attempts to fetch the transaction. Optionally pass a `Watcher` that allows you to keep track of the progress as the transaction is sent and processed. ```ts send(watcher?: Watcher): Promise>; ``` **Parameters** - **`watcher`** — `Watcher` (optional) **Source:** [src/contract/assembled_transaction.ts:851](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L851) ### `assembledTransaction.sign(__namedParameters)` Sign the transaction with the signTransaction function included previously. If you did not previously include one, you need to include one now. ```ts sign(__namedParameters: { force?: boolean; signTransaction?: SignTransaction } = {}): Promise; ``` **Parameters** - **`__namedParameters`** — `{ force?: boolean; signTransaction?: SignTransaction }` (optional) (default: `{}`) **Source:** [src/contract/assembled_transaction.ts:764](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L764) ### `assembledTransaction.signAndSend(__namedParameters)` Sign the transaction with the `signTransaction` function included previously. If you did not previously include one, you need to include one now. After signing, this method will send the transaction to the network and return a `SentTransaction` that keeps track of all the attempts to fetch the transaction. You may pass a `Watcher` to keep track of this progress. ```ts signAndSend(__namedParameters: { force?: boolean; signTransaction?: SignTransaction; watcher?: Watcher } = {}): Promise>; ``` **Parameters** - **`__namedParameters`** — `{ force?: boolean; signTransaction?: SignTransaction; watcher?: Watcher }` (optional) (default: `{}`) **Source:** [src/contract/assembled_transaction.ts:869](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L869) ### `assembledTransaction.signAuthEntries(__namedParameters)` If `AssembledTransaction.needsNonInvokerSigningBy` returns a non-empty list, you can serialize the transaction with `toJSON`, send it to the owner of one of the public keys in the map, deserialize with `txFromJSON`, and call this method on their machine. Internally, this will use `signAuthEntry` function from connected `wallet` for each. Then, re-serialize the transaction and either send to the next `needsNonInvokerSigningBy` owner, or send it back to the original account who simulated the transaction so they can `AssembledTransaction.sign` the transaction envelope and `AssembledTransaction.send` it to the network. Sending to all `needsNonInvokerSigningBy` owners in parallel is not currently supported! ```ts signAuthEntries(__namedParameters: { address?: string; authorizeEntry?: (entry: SorobanAuthorizationEntry, signer: Keypair | SigningCallback, validUntilLedgerSeq: number, networkPassphrase: string) => Promise; expiration?: number | Promise; signAuthEntry?: SignAuthEntry } = {}): Promise; ``` **Parameters** - **`__namedParameters`** — `{ address?: string; authorizeEntry?: (entry: SorobanAuthorizationEntry, signer: Keypair | SigningCallback, validUntilLedgerSeq: number, networkPassphrase: string) => Promise; expiration?: number | Promise; signAuthEntry?: SignAuthEntry }` (optional) (default: `{}`) **Source:** [src/contract/assembled_transaction.ts:984](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L984) ### `assembledTransaction.simulate(__namedParameters)` ```ts simulate(__namedParameters: { restore?: boolean } = {}): Promise>; ``` **Parameters** - **`__namedParameters`** — `{ restore?: boolean }` (optional) (default: `{}`) **Source:** [src/contract/assembled_transaction.ts:640](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L640) ### `assembledTransaction.toJSON()` Serialize the AssembledTransaction to a JSON string. This is useful for saving the transaction to a database or sending it over the wire for multi-auth workflows. `fromJSON` can be used to deserialize the transaction. This only works with transactions that have been simulated. ```ts toJSON(): string; ``` **Source:** [src/contract/assembled_transaction.ts:358](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L358) ### `assembledTransaction.toXDR()` Serialize the AssembledTransaction to a base64-encoded XDR string. ```ts toXDR(): string; ``` **Source:** [src/contract/assembled_transaction.ts:478](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/assembled_transaction.ts#L478) ## contract.AssembledTransactionOptions ```ts type AssembledTransactionOptions = MethodOptions & ClientOptions & { address?: string; args?: any[]; method: string; parseResultXdr: (xdr: xdr.ScVal) => T; submit?: boolean; submitUrl?: string } ``` **Source:** [src/contract/types.ts:260](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L260) ## contract.Client Generate a class from the contract spec that where each contract method gets included with an identical name. Each method returns an `AssembledTransaction` that can be used to modify, simulate, decode results, and possibly sign, & submit the transaction. ```ts class Client { constructor(spec: Spec, options: ClientOptions); static deploy(args: Record | null, options: MethodOptions & Omit & { address?: string; format?: "base64" | "hex"; salt?: Uint8Array | Buffer; wasmHash: string | Buffer }): Promise>; static from(options: ClientOptions): Promise; static fromWasm(wasm: Buffer, options: ClientOptions): Promise; static fromWasmHash(wasmHash: string | Buffer, options: ClientOptions, format: "base64" | "hex" = "hex"): Promise; readonly options: ClientOptions; readonly spec: Spec; txFromJSON(json: string): AssembledTransaction; txFromXDR(xdrBase64: string): AssembledTransaction; } ``` **Source:** [src/contract/client.ts:37](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/client.ts#L37) ### `new Client(spec, options)` ```ts constructor(spec: Spec, options: ClientOptions); ``` **Parameters** - **`spec`** — `Spec` (required) - **`options`** — `ClientOptions` (required) **Source:** [src/contract/client.ts:92](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/client.ts#L92) ### `Client.deploy(args, options)` ```ts static deploy(args: Record | null, options: MethodOptions & Omit & { address?: string; format?: "base64" | "hex"; salt?: Uint8Array | Buffer; wasmHash: string | Buffer }): Promise>; ``` **Parameters** - **`args`** — `Record | null` (required) — Constructor/Initialization Args for the contract's `__constructor` method - **`options`** — `MethodOptions & Omit & { address?: string; format?: "base64" | "hex"; salt?: Uint8Array | Buffer; wasmHash: string | Buffer }` (required) — Options for initializing a Client as well as for calling a method, with extras specific to deploying. **Source:** [src/contract/client.ts:38](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/client.ts#L38) ### `Client.from(options)` Generates a Client instance from the provided ClientOptions, which must include the contractId and rpcUrl. ```ts static from(options: ClientOptions): Promise; ``` **Parameters** - **`options`** — `ClientOptions` (required) — The ClientOptions object containing the necessary configuration, including the contractId and rpcUrl. **Returns** A Promise that resolves to a Client instance. **Throws** - If the provided options object does not contain both rpcUrl and contractId. **Source:** [src/contract/client.ts:188](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/client.ts#L188) ### `Client.fromWasm(wasm, options)` Generates a Client instance from the provided ClientOptions and the contract's wasm binary. ```ts static fromWasm(wasm: Buffer, options: ClientOptions): Promise; ``` **Parameters** - **`wasm`** — `Buffer` (required) — The contract's wasm binary as a Buffer. - **`options`** — `ClientOptions` (required) — The ClientOptions object containing the necessary configuration. **Returns** A Promise that resolves to a Client instance. **Throws** - If the contract spec cannot be obtained from the provided wasm binary. **Source:** [src/contract/client.ts:176](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/client.ts#L176) ### `Client.fromWasmHash(wasmHash, options, format)` 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. ```ts static fromWasmHash(wasmHash: string | Buffer, options: ClientOptions, format: "base64" | "hex" = "hex"): Promise; ``` **Parameters** - **`wasmHash`** — `string | Buffer` (required) — The hash of the contract's wasm binary, in either hex or base64 format. - **`options`** — `ClientOptions` (required) — The ClientOptions object containing the necessary configuration, including the rpcUrl. - **`format`** — `"base64" | "hex"` (optional) (default: `"hex"`) — (optional) The format of the provided wasmHash, either "hex" or "base64". Defaults to "hex". **Returns** A Promise that resolves to a Client instance. **Throws** - If the provided options object does not contain an rpcUrl. **Source:** [src/contract/client.ts:148](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/client.ts#L148) ### `client.options` ```ts readonly options: ClientOptions; ``` **Source:** [src/contract/client.ts:94](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/client.ts#L94) ### `client.spec` ```ts readonly spec: Spec; ``` **Source:** [src/contract/client.ts:93](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/client.ts#L93) ### `client.txFromJSON(json)` ```ts txFromJSON(json: string): AssembledTransaction; ``` **Parameters** - **`json`** — `string` (required) **Source:** [src/contract/client.ts:201](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/client.ts#L201) ### `client.txFromXDR(xdrBase64)` ```ts txFromXDR(xdrBase64: string): AssembledTransaction; ``` **Parameters** - **`xdrBase64`** — `string` (required) **Source:** [src/contract/client.ts:214](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/client.ts#L214) ## contract.ClientOptions Options for a smart contract client. ```ts type ClientOptions = unknown ``` **Source:** [src/contract/types.ts:127](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L127) ## contract.DEFAULT_TIMEOUT The default timebounds, in seconds, during which a transaction will be valid. 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. ```ts const DEFAULT_TIMEOUT: number ``` **Source:** [src/contract/types.ts:292](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L292) ## contract.Duration An unsigned 64-bit integer. ```ts type Duration = bigint ``` **Source:** [src/contract/types.ts:53](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L53) ## contract.ErrorMessage Error interface containing the error message. Matches Rust's implementation. Part of implementing `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. ```ts interface ErrorMessage { message: string; } ``` **Source:** [src/contract/rust_result.ts:51](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/rust_result.ts#L51) ### `errorMessage.message` ```ts message: string; ``` **Source:** [src/contract/rust_result.ts:52](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/rust_result.ts#L52) ## contract.MethodOptions Options for a smart contract method invocation. ```ts type MethodOptions = unknown ``` **Source:** [src/contract/types.ts:203](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L203) ## contract.NULL_ACCOUNT An impossible account on the Stellar network ```ts const NULL_ACCOUNT: "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF" ``` **Source:** [src/contract/types.ts:298](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L298) ## contract.Option ```ts type Option = T | undefined ``` **Source:** [src/contract/types.ts:41](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L41) ## contract.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. #### Why is this needed? This is used by ``ContractSpec`` and ``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 workflow, using `try...catch` blocks. But Rust also gives the flexibility of returning `Result` types. And Soroban contracts further support this with the `#[contracterror]` macro. Should JavaScript calls to such methods ignore all of that, and just flatten this extra info down to the same `try...catch` flow as other methods? We're not sure. For now, we've added this minimal implementation of Rust's `Result` logic, which exports the `Result` interface and its associated implementations, `Ok` and `Err`. This allows `ContractSpec` and `AssembledTransaction` to work together to duplicate the contract's Rust logic, always returning `Result` types for contract methods that are implemented to do so. 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. ```ts interface Result { isErr(): boolean; isOk(): boolean; unwrap(): T; unwrapErr(): E; } ``` **Source:** [src/contract/rust_result.ts:36](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/rust_result.ts#L36) ### `result.isErr()` ```ts isErr(): boolean; ``` **Source:** [src/contract/rust_result.ts:40](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/rust_result.ts#L40) ### `result.isOk()` ```ts isOk(): boolean; ``` **Source:** [src/contract/rust_result.ts:39](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/rust_result.ts#L39) ### `result.unwrap()` ```ts unwrap(): T; ``` **Source:** [src/contract/rust_result.ts:37](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/rust_result.ts#L37) ### `result.unwrapErr()` ```ts unwrapErr(): E; ``` **Source:** [src/contract/rust_result.ts:38](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/rust_result.ts#L38) ## contract.SentTransaction A transaction that has been sent to the Soroban network. This happens in two steps: 1. `sendTransaction`: initial submission of the transaction to the network. If this step runs into problems, the attempt to sign and send will be aborted. You can see the result of this call in the `sendTransactionResponse` getter. 2. `getTransaction`: once the transaction has been submitted to the network successfully, you need to wait for it to finalize to get the result of the transaction. This will be retried with exponential backoff for `MethodOptions.timeoutInSeconds` seconds. See all attempts in `getTransactionResponseAll` and the most recent attempt in `getTransactionResponse`. ```ts class SentTransaction { constructor(assembled: AssembledTransaction); static Errors: { SendFailed: typeof SendFailedError; SendResultOnly: typeof SendResultOnlyError; TransactionStillPending: typeof TransactionStillPendingError }; static init(assembled: AssembledTransaction, watcher?: Watcher): Promise>; assembled: AssembledTransaction; getTransactionResponse?: GetTransactionResponse; getTransactionResponseAll?: GetTransactionResponse[]; sendTransactionResponse?: SendTransactionResponse; server: RpcServer; readonly result: T; } ``` **Source:** [src/contract/sent_transaction.ts:28](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/sent_transaction.ts#L28) ### `new SentTransaction(assembled)` ```ts constructor(assembled: AssembledTransaction); ``` **Parameters** - **`assembled`** — `AssembledTransaction` (required) **Source:** [src/contract/sent_transaction.ts:57](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/sent_transaction.ts#L57) ### `SentTransaction.Errors` ```ts static Errors: { SendFailed: typeof SendFailedError; SendResultOnly: typeof SendResultOnlyError; TransactionStillPending: typeof TransactionStillPendingError }; ``` **Source:** [src/contract/sent_transaction.ts:51](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/sent_transaction.ts#L51) ### `SentTransaction.init(assembled, watcher)` Initialize a `SentTransaction` from `AssembledTransaction` `assembled`, passing an optional `Watcher` `watcher`. This will also send the transaction to the network. ```ts static init(assembled: AssembledTransaction, watcher?: Watcher): Promise>; ``` **Parameters** - **`assembled`** — `AssembledTransaction` (required) — `AssembledTransaction` from which this SentTransaction was initialized - **`watcher`** — `Watcher` (optional) **Source:** [src/contract/sent_transaction.ts:67](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/sent_transaction.ts#L67) ### `sentTransaction.assembled` ```ts assembled: AssembledTransaction; ``` **Source:** [src/contract/sent_transaction.ts:57](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/sent_transaction.ts#L57) ### `sentTransaction.getTransactionResponse` The most recent result of calling `getTransaction`, from the `getTransactionResponseAll` array. ```ts getTransactionResponse?: GetTransactionResponse; ``` **Source:** [src/contract/sent_transaction.ts:49](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/sent_transaction.ts#L49) ### `sentTransaction.getTransactionResponseAll` If `sendTransaction` completes successfully (which means it has `status: 'PENDING'`), then `getTransaction` will be called in a loop for `MethodOptions.timeoutInSeconds` seconds. This array contains all the results of those calls. ```ts getTransactionResponseAll?: GetTransactionResponse[]; ``` **Source:** [src/contract/sent_transaction.ts:43](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/sent_transaction.ts#L43) ### `sentTransaction.sendTransactionResponse` The result of calling `sendTransaction` to broadcast the transaction to the network. ```ts sendTransactionResponse?: SendTransactionResponse; ``` **Source:** [src/contract/sent_transaction.ts:35](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/sent_transaction.ts#L35) ### `sentTransaction.server` ```ts server: RpcServer; ``` **Source:** [src/contract/sent_transaction.ts:29](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/sent_transaction.ts#L29) ### `sentTransaction.result` ```ts readonly result: T; ``` **Source:** [src/contract/sent_transaction.ts:132](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/sent_transaction.ts#L132) ## contract.SignAuthEntry A function to request a wallet to sign an authorization entry preimage. Similar to signing a transaction, this function takes an authorization entry preimage provided by the requester and applies a signature to it. It returns a signed hash of the same authorization entry and the signer address back to the requester. ```ts type SignAuthEntry = (authEntry: string, opts?: { address?: string; networkPassphrase?: string }) => Promise<{ signedAuthEntry: string; signerAddress?: string } & { error?: WalletError }> ``` **Source:** [src/contract/types.ts:111](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L111) ## contract.SignTransaction A function to request a wallet to sign a built transaction This function takes an XDR provided by the requester and applies a signature to it. It returns a base64-encoded string XDR-encoded Transaction Envelope with Decorated Signatures and the signer address back to the requester. ```ts type SignTransaction = (xdr: string, opts?: { address?: string; networkPassphrase?: string; submit?: boolean; submitUrl?: string }) => Promise<{ signedTxXdr: string; signerAddress?: string } & { error?: WalletError }> ``` **Source:** [src/contract/types.ts:82](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L82) ## contract.Spec 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. ```ts class Spec { constructor(entries: string | string[] | Buffer | ScSpecEntry[]); static fromWasm(wasm: Buffer): Spec; entries: ScSpecEntry[]; errorCases(): ScSpecUdtErrorEnumCaseV0[]; findEntry(name: string): ScSpecEntry; funcArgsToScVals(name: string, args: object): ScVal[]; funcResToNative(name: string, val_or_base64: string | ScVal): any; funcs(): ScSpecFunctionV0[]; getFunc(name: string): ScSpecFunctionV0; jsonSchema(funcName?: string): JSONSchema7; nativeToScVal(val: any, ty: ScSpecTypeDef): ScVal; scValStrToNative(scv: string, typeDef: ScSpecTypeDef): T; scValToNative(scv: ScVal, typeDef: ScSpecTypeDef): T; } ``` **Example** ```ts const specEntries = [...]; // XDR spec entries of a smart contract const contractSpec = new ContractSpec(specEntries); // Convert native value to ScVal const args = { arg1: 'value1', arg2: 1234 }; const scArgs = contractSpec.funcArgsToScVals('funcName', args); // Call contract const resultScv = await callContract(contractId, 'funcName', scArgs); // Convert result ScVal back to native value const result = contractSpec.funcResToNative('funcName', resultScv); console.log(result); // {success: true} ``` **Source:** [src/contract/spec.ts:491](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/spec.ts#L491) ### `new Spec(entries)` Generates a Spec instance from contract specs in any of the following forms: - An XDR encoded stream of xdr.ScSpecEntry entries, the format of the spec stored inside Wasm files. - A base64 XDR encoded stream of xdr.ScSpecEntry entries. - An array of xdr.ScSpecEntry. - An array of base64 XDR encoded xdr.ScSpecEntry. ```ts constructor(entries: string | string[] | Buffer | ScSpecEntry[]); ``` **Parameters** - **`entries`** — `string | string[] | Buffer | ScSpecEntry[]` (required) **Returns** A Promise that resolves to a Client instance. **Throws** - If the contract spec cannot be obtained from the provided wasm binary. **Source:** [src/contract/spec.ts:520](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/spec.ts#L520) ### `Spec.fromWasm(wasm)` Generates a Spec instance from the contract's wasm binary. ```ts static fromWasm(wasm: Buffer): Spec; ``` **Parameters** - **`wasm`** — `Buffer` (required) — The contract's wasm binary as a Buffer. **Returns** A Promise that resolves to a Spec instance. **Throws** - If the contract spec cannot be obtained from the provided wasm binary. **Source:** [src/contract/spec.ts:504](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/spec.ts#L504) ### `spec.entries` The XDR spec entries. ```ts entries: ScSpecEntry[]; ``` **Source:** [src/contract/spec.ts:495](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/spec.ts#L495) ### `spec.errorCases()` Gets the XDR error cases from the spec. ```ts errorCases(): ScSpecUdtErrorEnumCaseV0[]; ``` **Returns** all contract functions **Source:** [src/contract/spec.ts:1180](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/spec.ts#L1180) ### `spec.findEntry(name)` Finds the XDR spec entry for the given name. ```ts findEntry(name: string): ScSpecEntry; ``` **Parameters** - **`name`** — `string` (required) — the name to find **Returns** the entry **Throws** - if no entry with the given name exists **Source:** [src/contract/spec.ts:647](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/spec.ts#L647) ### `spec.funcArgsToScVals(name, args)` Converts native JS arguments to ScVals for calling a contract function. ```ts funcArgsToScVals(name: string, args: object): ScVal[]; ``` **Parameters** - **`name`** — `string` (required) — the name of the function - **`args`** — `object` (required) — the arguments object **Returns** the converted arguments **Throws** - if argument is missing or incorrect type **Example** ```ts const args = { arg1: 'value1', arg2: 1234 }; const scArgs = contractSpec.funcArgsToScVals('funcName', args); ``` **Source:** [src/contract/spec.ts:590](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/spec.ts#L590) ### `spec.funcResToNative(name, val_or_base64)` Converts the result ScVal of a function call to a native JS value. ```ts funcResToNative(name: string, val_or_base64: string | ScVal): any; ``` **Parameters** - **`name`** — `string` (required) — the name of the function - **`val_or_base64`** — `string | ScVal` (required) — the result ScVal or base64 encoded string **Returns** the converted native value **Throws** - if return type mismatch or invalid input **Example** ```ts const resultScv = 'AAA=='; // Base64 encoded ScVal const result = contractSpec.funcResToNative('funcName', resultScv); ``` **Source:** [src/contract/spec.ts:612](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/spec.ts#L612) ### `spec.funcs()` Gets the XDR functions from the spec. ```ts funcs(): ScSpecFunctionV0[]; ``` **Returns** all contract functions **Source:** [src/contract/spec.ts:544](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/spec.ts#L544) ### `spec.getFunc(name)` Gets the XDR function spec for the given function name. ```ts getFunc(name: string): ScSpecFunctionV0; ``` **Parameters** - **`name`** — `string` (required) — the name of the function **Returns** the function spec **Throws** - if no function with the given name exists **Source:** [src/contract/spec.ts:562](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/spec.ts#L562) ### `spec.jsonSchema(funcName)` Converts the contract spec to a JSON schema. If `funcName` is provided, the schema will be a reference to the function schema. ```ts jsonSchema(funcName?: string): JSONSchema7; ``` **Parameters** - **`funcName`** — `string` (optional) — (optional) the name of the function to convert **Returns** the converted JSON schema **Throws** - if the contract spec is invalid **Source:** [src/contract/spec.ts:1200](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/spec.ts#L1200) ### `spec.nativeToScVal(val, ty)` Converts a native JS value to an ScVal based on the given type. ```ts nativeToScVal(val: any, ty: ScSpecTypeDef): ScVal; ``` **Parameters** - **`val`** — `any` (required) — the native JS value - **`ty`** — `ScSpecTypeDef` (required) — (optional) the expected type **Returns** the converted ScVal **Throws** - if value cannot be converted to the given type **Source:** [src/contract/spec.ts:666](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/spec.ts#L666) ### `spec.scValStrToNative(scv, typeDef)` Converts an base64 encoded ScVal back to a native JS value based on the given type. ```ts scValStrToNative(scv: string, typeDef: ScSpecTypeDef): T; ``` **Parameters** - **`scv`** — `string` (required) — the base64 encoded ScVal - **`typeDef`** — `ScSpecTypeDef` (required) — the expected type **Returns** the converted native JS value **Throws** - if ScVal cannot be converted to the given type **Source:** [src/contract/spec.ts:972](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/spec.ts#L972) ### `spec.scValToNative(scv, typeDef)` Converts an ScVal back to a native JS value based on the given type. ```ts scValToNative(scv: ScVal, typeDef: ScSpecTypeDef): T; ``` **Parameters** - **`scv`** — `ScVal` (required) — the ScVal - **`typeDef`** — `ScSpecTypeDef` (required) — the expected type **Returns** the converted native JS value **Throws** - if ScVal cannot be converted to the given type **Source:** [src/contract/spec.ts:985](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/spec.ts#L985) ## contract.Timepoint An unsigned 64-bit integer. ```ts type Timepoint = bigint ``` **Source:** [src/contract/types.ts:49](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L49) ## contract.Tx A "regular" transaction, as opposed to a FeeBumpTransaction. ```ts type Tx = Transaction ``` **Source:** [src/contract/types.ts:58](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L58) ## contract.Typepoint **Deprecated.** Use `Timepoint` instead. ```ts type Typepoint = bigint ``` **Source:** [src/contract/types.ts:45](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L45) ## contract.Union ```ts interface Union { tag: string; values?: T; } ``` **Source:** [src/contract/spec.ts:14](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/spec.ts#L14) ### `union.tag` ```ts tag: string; ``` **Source:** [src/contract/spec.ts:15](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/spec.ts#L15) ### `union.values` ```ts values?: T; ``` **Source:** [src/contract/spec.ts:16](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/spec.ts#L16) ## contract.WalletError ```ts interface WalletError { code: number; ext?: string[]; message: string; } ``` **Source:** [src/contract/types.ts:60](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L60) ### `walletError.code` ```ts code: number; ``` **Source:** [src/contract/types.ts:62](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L62) ### `walletError.ext` ```ts ext?: string[]; ``` **Source:** [src/contract/types.ts:63](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L63) ### `walletError.message` ```ts message: string; ``` **Source:** [src/contract/types.ts:61](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L61) ## contract.Watcher ```ts class Watcher { constructor(); onProgress(response?: GetTransactionResponse): void; onSubmitted(response?: SendTransactionResponse): void; } ``` **Source:** [src/contract/sent_transaction.ts:167](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/sent_transaction.ts#L167) ### `new Watcher()` ```ts constructor(); ``` ### `watcher.onProgress(response)` Function to call every time the submitted transaction's status is checked while awaiting its full inclusion in the ledger ```ts onProgress(response?: GetTransactionResponse): void; ``` **Parameters** - **`response`** — `GetTransactionResponse` (optional) **Source:** [src/contract/sent_transaction.ts:178](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/sent_transaction.ts#L178) ### `watcher.onSubmitted(response)` Function to call after transaction has been submitted successfully to the network for processing ```ts onSubmitted(response?: SendTransactionResponse): void; ``` **Parameters** - **`response`** — `SendTransactionResponse` (optional) **Source:** [src/contract/sent_transaction.ts:172](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/sent_transaction.ts#L172) ## contract.XDR_BASE64 ```ts type XDR_BASE64 = string ``` **Source:** [src/contract/types.ts:8](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L8) ## contract.basicNodeSigner For use with `Client` and `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. ```ts basicNodeSigner(keypair: Keypair, networkPassphrase: string): { signAuthEntry: SignAuthEntry; signTransaction: SignTransaction } ``` **Parameters** - **`keypair`** — `Keypair` (required) — `Keypair` to use to sign the transaction or auth entry - **`networkPassphrase`** — `string` (required) — passphrase of network to sign for **Source:** [src/contract/basic_node_signer.ts:16](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/basic_node_signer.ts#L16) ## contract.i128 A signed 128-bit integer. ```ts type i128 = bigint ``` **Source:** [src/contract/types.ts:32](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L32) ## contract.i256 A signed 256-bit integer. ```ts type i256 = bigint ``` **Source:** [src/contract/types.ts:40](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L40) ## contract.i32 A signed 32-bit integer. ```ts type i32 = number ``` **Source:** [src/contract/types.ts:16](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L16) ## contract.i64 A signed 64-bit integer. ```ts type i64 = bigint ``` **Source:** [src/contract/types.ts:24](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L24) ## contract.u128 An unsigned 128-bit integer. ```ts type u128 = bigint ``` **Source:** [src/contract/types.ts:28](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L28) ## contract.u256 An unsigned 256-bit integer. ```ts type u256 = bigint ``` **Source:** [src/contract/types.ts:36](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L36) ## contract.u32 An unsigned 32-bit integer. ```ts type u32 = number ``` **Source:** [src/contract/types.ts:12](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L12) ## contract.u64 An unsigned 64-bit integer. ```ts type u64 = bigint ``` **Source:** [src/contract/types.ts:20](https://github.com/stellar/js-stellar-sdk/blob/master/src/contract/types.ts#L20) # Source: docs/reference/contracts-bindings.md # Contracts / Bindings ## BindingGenerator Generates TypeScript bindings for Stellar smart contracts. This class creates fully-typed TypeScript client code from a contract's specification, allowing developers to interact with Stellar smart contracts with full IDE support and compile-time type checking. ```ts class BindingGenerator { static fromContractId(contractId: string, rpcServer: RpcServer): Promise; static fromSpec(spec: Spec): BindingGenerator; static fromWasm(wasmBuffer: Buffer): BindingGenerator; static fromWasmHash(wasmHash: string, rpcServer: RpcServer): Promise; generate(options: GenerateOptions): GeneratedBindings; } ``` **Example** ```ts // Create from a local WASM file const wasmBuffer = fs.readFileSync("./my_contract.wasm"); const generator = await BindingGenerator.fromWasm(wasmBuffer); const bindings = generator.generate({ contractName: "my-contract" }); ``` **Example** ```ts // Create from a contract deployed on the network const generator = await BindingGenerator.fromContractId( "CABC...XYZ", "https://soroban-testnet.stellar.org", Networks.TESTNET ); const bindings = generator.generate({ contractName: "my-contract" }); ``` **Example** ```ts // Create from a Spec object directly const spec = new Spec(specEntries); const generator = BindingGenerator.fromSpec(spec); const bindings = generator.generate({ contractName: "my-contract" }); ``` **Source:** [src/bindings/generator.ts:78](https://github.com/stellar/js-stellar-sdk/blob/master/src/bindings/generator.ts#L78) ### `BindingGenerator.fromContractId(contractId, rpcServer)` Creates a BindingGenerator by fetching contract info from a deployed contract ID. Retrieves the contract's WASM from the network using the contract ID, then parses the specification. If the contract is a Stellar Asset Contract (SAC), returns a generator with the standard SAC specification. ```ts static fromContractId(contractId: string, rpcServer: RpcServer): Promise; ``` **Parameters** - **`contractId`** — `string` (required) — The contract ID (C... address) of the deployed contract - **`rpcServer`** — `RpcServer` (required) — The Stellar RPC server instance **Returns** A Promise resolving to a new BindingGenerator instance **Throws** - If the contract cannot be found or fetched **Example** ```ts const generator = await BindingGenerator.fromContractId( "CABC123...XYZ", rpcServer ); ``` **Source:** [src/bindings/generator.ts:182](https://github.com/stellar/js-stellar-sdk/blob/master/src/bindings/generator.ts#L182) ### `BindingGenerator.fromSpec(spec)` Creates a BindingGenerator from an existing Spec object. Use this when you already have a parsed contract specification, such as from manually constructed spec entries or from another source. ```ts static fromSpec(spec: Spec): BindingGenerator; ``` **Parameters** - **`spec`** — `Spec` (required) — The contract specification containing function and type definitions **Returns** A new BindingGenerator instance **Example** ```ts const spec = new Spec(specEntries); const generator = BindingGenerator.fromSpec(spec); ``` **Source:** [src/bindings/generator.ts:105](https://github.com/stellar/js-stellar-sdk/blob/master/src/bindings/generator.ts#L105) ### `BindingGenerator.fromWasm(wasmBuffer)` Creates a BindingGenerator from a WASM binary buffer. Parses the contract specification directly from the WASM file's custom section. This is the most common method when working with locally compiled contracts. ```ts static fromWasm(wasmBuffer: Buffer): BindingGenerator; ``` **Parameters** - **`wasmBuffer`** — `Buffer` (required) — The raw WASM binary as a Buffer **Returns** A Promise resolving to a new BindingGenerator instance **Throws** - If the WASM file doesn't contain a valid contract spec **Example** ```ts const wasmBuffer = fs.readFileSync("./target/wasm32-unknown-unknown/release/my_contract.wasm"); const generator = await BindingGenerator.fromWasm(wasmBuffer); ``` **Source:** [src/bindings/generator.ts:125](https://github.com/stellar/js-stellar-sdk/blob/master/src/bindings/generator.ts#L125) ### `BindingGenerator.fromWasmHash(wasmHash, rpcServer)` Creates a BindingGenerator by fetching WASM from the network using its hash. Retrieves the WASM bytecode from Stellar RPC using the WASM hash, then parses the contract specification from it. Useful when you know the hash of an installed WASM but don't have the binary locally. ```ts static fromWasmHash(wasmHash: string, rpcServer: RpcServer): Promise; ``` **Parameters** - **`wasmHash`** — `string` (required) — The hex-encoded hash of the installed WASM blob - **`rpcServer`** — `RpcServer` (required) — The Stellar RPC server instance **Returns** A Promise resolving to a new BindingGenerator instance **Throws** - If the WASM cannot be fetched or doesn't contain a valid spec **Example** ```ts const generator = await BindingGenerator.fromWasmHash( "a1b2c3...xyz", "https://soroban-testnet.stellar.org", Networks.TESTNET ); ``` **Source:** [src/bindings/generator.ts:151](https://github.com/stellar/js-stellar-sdk/blob/master/src/bindings/generator.ts#L151) ### `bindingGenerator.generate(options)` Generates TypeScript bindings for the contract. Produces all the files needed for a standalone npm package: - `client.ts`: A typed Client class with methods for each contract function - `types.ts`: TypeScript interfaces for all contract types (structs, enums, unions) - `index.ts`: Barrel export file - `package.json`, `tsconfig.json`, `README.md`, `.gitignore`: Package configuration The generated code does not write to disk - use the returned strings to write files as needed. ```ts generate(options: GenerateOptions): GeneratedBindings; ``` **Parameters** - **`options`** — `GenerateOptions` (required) — Configuration options for generation - `contractName`: Required. The name for the generated package (kebab-case recommended) **Returns** An object containing all generated file contents as strings **Throws** - If contractName is missing or empty **Example** ```ts const bindings = generator.generate({ contractName: "my-token", contractAddress: "CABC...XYZ", rpcUrl: "https://soroban-testnet.stellar.org", networkPassphrase: Networks.TESTNET }); // Write files to disk fs.writeFileSync("./src/client.ts", bindings.client); fs.writeFileSync("./src/types.ts", bindings.types); ``` **Source:** [src/bindings/generator.ts:226](https://github.com/stellar/js-stellar-sdk/blob/master/src/bindings/generator.ts#L226) # Source: docs/reference/seps-toml.md # SEPs / Toml ## StellarToml.Api.ContractId ```ts type ContractId = string ``` **Source:** [src/stellartoml/index.ts:101](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L101) ## StellarToml.Api.Currency ```ts interface Currency { anchor_asset?: string; anchor_asset_type?: "fiat" | "crypto" | "nft" | "stock" | "bond" | "commodity" | "realestate" | "other"; approval_criteria?: string; approval_server?: string; attestation_of_reserve?: string; attestation_of_reserve_amount?: string; attestation_of_reserve_last_audit?: string; code?: string; code_template?: string; collateral_address_messages?: string[]; collateral_address_signatures?: string[]; collateral_addresses?: string[]; conditions?: string; desc?: string; display_decimals?: number; fixed_number?: number; image?: string; is_asset_anchored?: boolean; is_unlimited?: boolean; issuer?: string; max_number?: number; name?: string; redemption_instructions?: string; regulated?: boolean; status?: "live" | "dead" | "test" | "private"; } ``` **Source:** [src/stellartoml/index.ts:134](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L134) ### `currency.anchor_asset` ```ts anchor_asset?: string; ``` **Source:** [src/stellartoml/index.ts:155](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L155) ### `currency.anchor_asset_type` ```ts anchor_asset_type?: "fiat" | "crypto" | "nft" | "stock" | "bond" | "commodity" | "realestate" | "other"; ``` **Source:** [src/stellartoml/index.ts:146](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L146) ### `currency.approval_criteria` ```ts approval_criteria?: string; ``` **Source:** [src/stellartoml/index.ts:167](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L167) ### `currency.approval_server` ```ts approval_server?: string; ``` **Source:** [src/stellartoml/index.ts:166](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L166) ### `currency.attestation_of_reserve` ```ts attestation_of_reserve?: string; ``` **Source:** [src/stellartoml/index.ts:156](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L156) ### `currency.attestation_of_reserve_amount` ```ts attestation_of_reserve_amount?: string; ``` **Source:** [src/stellartoml/index.ts:157](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L157) ### `currency.attestation_of_reserve_last_audit` ```ts attestation_of_reserve_last_audit?: string; ``` **Source:** [src/stellartoml/index.ts:158](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L158) ### `currency.code` ```ts code?: string; ``` **Source:** [src/stellartoml/index.ts:135](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L135) ### `currency.code_template` ```ts code_template?: string; ``` **Source:** [src/stellartoml/index.ts:136](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L136) ### `currency.collateral_address_messages` ```ts collateral_address_messages?: string[]; ``` **Source:** [src/stellartoml/index.ts:164](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L164) ### `currency.collateral_address_signatures` ```ts collateral_address_signatures?: string[]; ``` **Source:** [src/stellartoml/index.ts:165](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L165) ### `currency.collateral_addresses` ```ts collateral_addresses?: string[]; ``` **Source:** [src/stellartoml/index.ts:163](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L163) ### `currency.conditions` ```ts conditions?: string; ``` **Source:** [src/stellartoml/index.ts:142](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L142) ### `currency.desc` ```ts desc?: string; ``` **Source:** [src/stellartoml/index.ts:141](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L141) ### `currency.display_decimals` ```ts display_decimals?: number; ``` **Source:** [src/stellartoml/index.ts:138](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L138) ### `currency.fixed_number` ```ts fixed_number?: number; ``` **Source:** [src/stellartoml/index.ts:143](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L143) ### `currency.image` ```ts image?: string; ``` **Source:** [src/stellartoml/index.ts:161](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L161) ### `currency.is_asset_anchored` ```ts is_asset_anchored?: boolean; ``` **Source:** [src/stellartoml/index.ts:145](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L145) ### `currency.is_unlimited` ```ts is_unlimited?: boolean; ``` **Source:** [src/stellartoml/index.ts:159](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L159) ### `currency.issuer` ```ts issuer?: string; ``` **Source:** [src/stellartoml/index.ts:137](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L137) ### `currency.max_number` ```ts max_number?: number; ``` **Source:** [src/stellartoml/index.ts:144](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L144) ### `currency.name` ```ts name?: string; ``` **Source:** [src/stellartoml/index.ts:140](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L140) ### `currency.redemption_instructions` ```ts redemption_instructions?: string; ``` **Source:** [src/stellartoml/index.ts:160](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L160) ### `currency.regulated` ```ts regulated?: boolean; ``` **Source:** [src/stellartoml/index.ts:162](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L162) ### `currency.status` ```ts status?: "live" | "dead" | "test" | "private"; ``` **Source:** [src/stellartoml/index.ts:139](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L139) ## StellarToml.Api.Documentation ```ts interface Documentation { ORG_DBA?: string; ORG_DESCRIPTION?: string; ORG_GITHUB?: string; ORG_KEYBASE?: string; ORG_LICENSE_NUMBER?: string; ORG_LICENSE_TYPE?: string; ORG_LICENSING_AUTHORITY?: string; ORG_LOGO?: string; ORG_NAME?: string; ORG_OFFICIAL_EMAIL?: string; ORG_PHONE_NUMBER?: string; ORG_PHONE_NUMBER_ATTESTATION?: string; ORG_PHYSICAL_ADDRESS?: string; ORG_PHYSICAL_ADDRESS_ATTESTATION?: string; ORG_SUPPORT_EMAIL?: string; ORG_TWITTER?: string; ORG_URL?: string; } ``` **Source:** [src/stellartoml/index.ts:103](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L103) ### `documentation.ORG_DBA` ```ts ORG_DBA?: string; ``` **Source:** [src/stellartoml/index.ts:105](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L105) ### `documentation.ORG_DESCRIPTION` ```ts ORG_DESCRIPTION?: string; ``` **Source:** [src/stellartoml/index.ts:112](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L112) ### `documentation.ORG_GITHUB` ```ts ORG_GITHUB?: string; ``` **Source:** [src/stellartoml/index.ts:120](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L120) ### `documentation.ORG_KEYBASE` ```ts ORG_KEYBASE?: string; ``` **Source:** [src/stellartoml/index.ts:118](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L118) ### `documentation.ORG_LICENSE_NUMBER` ```ts ORG_LICENSE_NUMBER?: string; ``` **Source:** [src/stellartoml/index.ts:109](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L109) ### `documentation.ORG_LICENSE_TYPE` ```ts ORG_LICENSE_TYPE?: string; ``` **Source:** [src/stellartoml/index.ts:111](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L111) ### `documentation.ORG_LICENSING_AUTHORITY` ```ts ORG_LICENSING_AUTHORITY?: string; ``` **Source:** [src/stellartoml/index.ts:110](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L110) ### `documentation.ORG_LOGO` ```ts ORG_LOGO?: string; ``` **Source:** [src/stellartoml/index.ts:108](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L108) ### `documentation.ORG_NAME` ```ts ORG_NAME?: string; ``` **Source:** [src/stellartoml/index.ts:104](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L104) ### `documentation.ORG_OFFICIAL_EMAIL` ```ts ORG_OFFICIAL_EMAIL?: string; ``` **Source:** [src/stellartoml/index.ts:116](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L116) ### `documentation.ORG_PHONE_NUMBER` ```ts ORG_PHONE_NUMBER?: string; ``` **Source:** [src/stellartoml/index.ts:107](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L107) ### `documentation.ORG_PHONE_NUMBER_ATTESTATION` ```ts ORG_PHONE_NUMBER_ATTESTATION?: string; ``` **Source:** [src/stellartoml/index.ts:115](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L115) ### `documentation.ORG_PHYSICAL_ADDRESS` ```ts ORG_PHYSICAL_ADDRESS?: string; ``` **Source:** [src/stellartoml/index.ts:113](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L113) ### `documentation.ORG_PHYSICAL_ADDRESS_ATTESTATION` ```ts ORG_PHYSICAL_ADDRESS_ATTESTATION?: string; ``` **Source:** [src/stellartoml/index.ts:114](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L114) ### `documentation.ORG_SUPPORT_EMAIL` ```ts ORG_SUPPORT_EMAIL?: string; ``` **Source:** [src/stellartoml/index.ts:117](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L117) ### `documentation.ORG_TWITTER` ```ts ORG_TWITTER?: string; ``` **Source:** [src/stellartoml/index.ts:119](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L119) ### `documentation.ORG_URL` ```ts ORG_URL?: string; ``` **Source:** [src/stellartoml/index.ts:106](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L106) ## StellarToml.Api.ISODateTime ```ts type ISODateTime = string ``` **Source:** [src/stellartoml/index.ts:102](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L102) ## StellarToml.Api.Principal ```ts interface Principal { email: string; github?: string; id_photo_hash?: string; keybase?: string; name: string; telegram?: string; twitter?: string; verification_photo_hash?: string; } ``` **Source:** [src/stellartoml/index.ts:123](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L123) ### `principal.email` ```ts email: string; ``` **Source:** [src/stellartoml/index.ts:125](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L125) ### `principal.github` ```ts github?: string; ``` **Source:** [src/stellartoml/index.ts:126](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L126) ### `principal.id_photo_hash` ```ts id_photo_hash?: string; ``` **Source:** [src/stellartoml/index.ts:130](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L130) ### `principal.keybase` ```ts keybase?: string; ``` **Source:** [src/stellartoml/index.ts:127](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L127) ### `principal.name` ```ts name: string; ``` **Source:** [src/stellartoml/index.ts:124](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L124) ### `principal.telegram` ```ts telegram?: string; ``` **Source:** [src/stellartoml/index.ts:128](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L128) ### `principal.twitter` ```ts twitter?: string; ``` **Source:** [src/stellartoml/index.ts:129](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L129) ### `principal.verification_photo_hash` ```ts verification_photo_hash?: string; ``` **Source:** [src/stellartoml/index.ts:131](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L131) ## StellarToml.Api.PublicKey ```ts type PublicKey = string ``` **Source:** [src/stellartoml/index.ts:100](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L100) ## StellarToml.Api.StellarToml ```ts interface StellarToml { ACCOUNTS?: string[]; ANCHOR_QUOTE_SERVER?: string; CURRENCIES?: Currency[]; DIRECT_PAYMENT_SERVER?: string; DOCUMENTATION?: Documentation; FEDERATION_SERVER?: string; HORIZON_URL?: string; KYC_SERVER?: string; NETWORK_PASSPHRASE?: Networks; PRINCIPALS?: Principal[]; SIGNING_KEY?: string; TRANSFER_SERVER?: string; TRANSFER_SERVER_SEP0024?: string; URI_REQUEST_SIGNING_KEY?: string; VALIDATORS?: Validator[]; VERSION?: string; WEB_AUTH_CONTRACT_ID?: string; WEB_AUTH_ENDPOINT?: string; WEB_AUTH_FOR_CONTRACTS_ENDPOINT?: string; } ``` **Source:** [src/stellartoml/index.ts:182](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L182) ### `stellarToml.ACCOUNTS` ```ts ACCOUNTS?: string[]; ``` **Source:** [src/stellartoml/index.ts:184](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L184) ### `stellarToml.ANCHOR_QUOTE_SERVER` ```ts ANCHOR_QUOTE_SERVER?: string; ``` **Source:** [src/stellartoml/index.ts:197](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L197) ### `stellarToml.CURRENCIES` ```ts CURRENCIES?: Currency[]; ``` **Source:** [src/stellartoml/index.ts:200](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L200) ### `stellarToml.DIRECT_PAYMENT_SERVER` ```ts DIRECT_PAYMENT_SERVER?: string; ``` **Source:** [src/stellartoml/index.ts:196](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L196) ### `stellarToml.DOCUMENTATION` ```ts DOCUMENTATION?: Documentation; ``` **Source:** [src/stellartoml/index.ts:198](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L198) ### `stellarToml.FEDERATION_SERVER` ```ts FEDERATION_SERVER?: string; ``` **Source:** [src/stellartoml/index.ts:192](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L192) ### `stellarToml.HORIZON_URL` ```ts HORIZON_URL?: string; ``` **Source:** [src/stellartoml/index.ts:194](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L194) ### `stellarToml.KYC_SERVER` ```ts KYC_SERVER?: string; ``` **Source:** [src/stellartoml/index.ts:188](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L188) ### `stellarToml.NETWORK_PASSPHRASE` ```ts NETWORK_PASSPHRASE?: Networks; ``` **Source:** [src/stellartoml/index.ts:185](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L185) ### `stellarToml.PRINCIPALS` ```ts PRINCIPALS?: Principal[]; ``` **Source:** [src/stellartoml/index.ts:199](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L199) ### `stellarToml.SIGNING_KEY` ```ts SIGNING_KEY?: string; ``` **Source:** [src/stellartoml/index.ts:193](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L193) ### `stellarToml.TRANSFER_SERVER` ```ts TRANSFER_SERVER?: string; ``` **Source:** [src/stellartoml/index.ts:187](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L187) ### `stellarToml.TRANSFER_SERVER_SEP0024` ```ts TRANSFER_SERVER_SEP0024?: string; ``` **Source:** [src/stellartoml/index.ts:186](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L186) ### `stellarToml.URI_REQUEST_SIGNING_KEY` ```ts URI_REQUEST_SIGNING_KEY?: string; ``` **Source:** [src/stellartoml/index.ts:195](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L195) ### `stellarToml.VALIDATORS` ```ts VALIDATORS?: Validator[]; ``` **Source:** [src/stellartoml/index.ts:201](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L201) ### `stellarToml.VERSION` ```ts VERSION?: string; ``` **Source:** [src/stellartoml/index.ts:183](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L183) ### `stellarToml.WEB_AUTH_CONTRACT_ID` ```ts WEB_AUTH_CONTRACT_ID?: string; ``` **Source:** [src/stellartoml/index.ts:191](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L191) ### `stellarToml.WEB_AUTH_ENDPOINT` ```ts WEB_AUTH_ENDPOINT?: string; ``` **Source:** [src/stellartoml/index.ts:189](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L189) ### `stellarToml.WEB_AUTH_FOR_CONTRACTS_ENDPOINT` ```ts WEB_AUTH_FOR_CONTRACTS_ENDPOINT?: string; ``` **Source:** [src/stellartoml/index.ts:190](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L190) ## StellarToml.Api.StellarTomlResolveOptions ```ts interface StellarTomlResolveOptions { allowedRedirects?: number; allowHttp?: boolean; timeout?: number; } ``` **Source:** [src/stellartoml/index.ts:94](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L94) ### `stellarTomlResolveOptions.allowedRedirects` ```ts allowedRedirects?: number; ``` **Source:** [src/stellartoml/index.ts:97](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L97) ### `stellarTomlResolveOptions.allowHttp` ```ts allowHttp?: boolean; ``` **Source:** [src/stellartoml/index.ts:95](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L95) ### `stellarTomlResolveOptions.timeout` ```ts timeout?: number; ``` **Source:** [src/stellartoml/index.ts:96](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L96) ## StellarToml.Api.Url ```ts type Url = string ``` **Source:** [src/stellartoml/index.ts:99](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L99) ## StellarToml.Api.Validator ```ts interface Validator { ALIAS?: string; DISPLAY_NAME?: string; HISTORY?: string; HOST?: string; PUBLIC_KEY?: string; } ``` **Source:** [src/stellartoml/index.ts:171](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L171) ### `validator.ALIAS` ```ts ALIAS?: string; ``` **Source:** [src/stellartoml/index.ts:172](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L172) ### `validator.DISPLAY_NAME` ```ts DISPLAY_NAME?: string; ``` **Source:** [src/stellartoml/index.ts:173](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L173) ### `validator.HISTORY` ```ts HISTORY?: string; ``` **Source:** [src/stellartoml/index.ts:176](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L176) ### `validator.HOST` ```ts HOST?: string; ``` **Source:** [src/stellartoml/index.ts:175](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L175) ### `validator.PUBLIC_KEY` ```ts PUBLIC_KEY?: string; ``` **Source:** [src/stellartoml/index.ts:174](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L174) ## StellarToml.Resolver Resolver allows resolving `stellar.toml` files. ```ts class Resolver { constructor(); static resolve(domain: string, opts: StellarTomlResolveOptions = {}): Promise; } ``` **Source:** [src/stellartoml/index.ts:16](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L16) ### `new Resolver()` ```ts constructor(); ``` ### `Resolver.resolve(domain, opts)` Returns a parsed `stellar.toml` file for a given domain. ```ts static resolve(domain: string, opts: StellarTomlResolveOptions = {}): Promise; ``` **Parameters** - **`domain`** — `string` (required) — Domain to get stellar.toml file for - **`opts`** — `StellarTomlResolveOptions` (optional) (default: `{}`) — (optional) Options object - `allowHttp` (optional): Allow connecting to http servers. This must be set to false in production deployments! - `timeout` (optional): Allow a timeout. Allows user to avoid nasty lag due to TOML resolve issue. **Returns** A `Promise` that resolves to the parsed stellar.toml object **Example** ```ts 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 }); ``` **See also** - `Stellar.toml doc` **Source:** [src/stellartoml/index.ts:38](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L38) ## StellarToml.STELLAR_TOML_MAX_SIZE The maximum size of stellar.toml file, in bytes ```ts const STELLAR_TOML_MAX_SIZE: number ``` **Source:** [src/stellartoml/index.ts:11](https://github.com/stellar/js-stellar-sdk/blob/master/src/stellartoml/index.ts#L11) # Source: docs/reference/seps-federation.md # SEPs / Federation ## Federation.Api.Options Options for configuring connections to federation servers. You can also use `Config` class to set this globally. ```ts interface Options { allowHttp?: boolean; timeout?: number; } ``` **Source:** [src/federation/api.ts:25](https://github.com/stellar/js-stellar-sdk/blob/master/src/federation/api.ts#L25) ### `options.allowHttp` Allow connecting to http servers, default: `false`. This must be set to false in production deployments! ```ts allowHttp?: boolean; ``` **Source:** [src/federation/api.ts:29](https://github.com/stellar/js-stellar-sdk/blob/master/src/federation/api.ts#L29) ### `options.timeout` Allow a timeout, default: 0. Allows user to avoid nasty lag due to TOML resolve issue. ```ts timeout?: number; ``` **Source:** [src/federation/api.ts:33](https://github.com/stellar/js-stellar-sdk/blob/master/src/federation/api.ts#L33) ## Federation.Api.Record Record returned from a federation server. ```ts interface Record { account_id: string; memo?: string; memo_type?: string; } ``` **Source:** [src/federation/api.ts:7](https://github.com/stellar/js-stellar-sdk/blob/master/src/federation/api.ts#L7) ### `record.account_id` The Stellar public key resolved from the federation lookup ```ts account_id: string; ``` **Source:** [src/federation/api.ts:11](https://github.com/stellar/js-stellar-sdk/blob/master/src/federation/api.ts#L11) ### `record.memo` The memo value, if any, required to send payments to this user ```ts memo?: string; ``` **Source:** [src/federation/api.ts:19](https://github.com/stellar/js-stellar-sdk/blob/master/src/federation/api.ts#L19) ### `record.memo_type` The type of memo, if any, required to send payments to this user ```ts memo_type?: string; ``` **Source:** [src/federation/api.ts:15](https://github.com/stellar/js-stellar-sdk/blob/master/src/federation/api.ts#L15) ## Federation.FEDERATION_RESPONSE_MAX_SIZE The maximum size of response from a federation server ```ts const FEDERATION_RESPONSE_MAX_SIZE: number ``` **Source:** [src/federation/server.ts:14](https://github.com/stellar/js-stellar-sdk/blob/master/src/federation/server.ts#L14) ## Federation.Server 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. ```ts class Server { constructor(serverURL: string, domain: string, opts: Options = {}); static createForDomain(domain: string, opts: Options = {}): Promise; static resolve(value: string, opts: Options = {}): Promise; resolveAccountId(accountId: string): Promise; resolveAddress(address: string): Promise; resolveTransactionId(transactionId: string): Promise; } ``` **Source:** [src/federation/server.ts:25](https://github.com/stellar/js-stellar-sdk/blob/master/src/federation/server.ts#L25) ### `new Server(serverURL, domain, opts)` ```ts constructor(serverURL: string, domain: string, opts: Options = {}); ``` **Parameters** - **`serverURL`** — `string` (required) - **`domain`** — `string` (required) - **`opts`** — `Options` (optional) (default: `{}`) **Source:** [src/federation/server.ts:145](https://github.com/stellar/js-stellar-sdk/blob/master/src/federation/server.ts#L145) ### `Server.createForDomain(domain, opts)` Creates a `FederationServer` instance based on information from [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. ```ts static createForDomain(domain: string, opts: Options = {}): Promise; ``` **Parameters** - **`domain`** — `string` (required) — Domain to get federation server for - **`opts`** — `Options` (optional) (default: `{}`) — (optional) Options object **Returns** 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. **Example** ```ts 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 also** - Stellar.toml doc **Source:** [src/federation/server.ts:132](https://github.com/stellar/js-stellar-sdk/blob/master/src/federation/server.ts#L132) ### `Server.resolve(value, opts)` A helper method for handling user inputs that contain `destination` value. It accepts two types of values: * For Stellar address (ex. `bob*stellar.org`) it splits Stellar address and then tries to find information about federation server in `stellar.toml` file for a given domain. It returns a `Promise` which resolves if federation server exists and user has been found and rejects in all other cases. * For Account ID (ex. `GB5XVAABEQMY63WTHDQ5RXADGYF345VWMNPTN2GFUDZT57D57ZQTJ7PS`) it returns a `Promise` which 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. ```ts static resolve(value: string, opts: Options = {}): Promise; ``` **Parameters** - **`value`** — `string` (required) — Stellar Address (ex. `bob*stellar.org`) - **`opts`** — `Options` (optional) (default: `{}`) — (optional) Options object **Returns** 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. **Example** ```ts StellarSdk.FederationServer.resolve('bob*stellar.org') .then(federationRecord => { // { // account_id: 'GB5XVAABEQMY63WTHDQ5RXADGYF345VWMNPTN2GFUDZT57D57ZQTJ7PS', // memo_type: 'id', // memo: 100 // } }); ``` **See also** - - Federation doc - Stellar.toml doc **Source:** [src/federation/server.ts:71](https://github.com/stellar/js-stellar-sdk/blob/master/src/federation/server.ts#L71) ### `server.resolveAccountId(accountId)` Given an account ID, get their federation record if the user was found ```ts resolveAccountId(accountId: string): Promise; ``` **Parameters** - **`accountId`** — `string` (required) — Account ID (ex. `GBYNR2QJXLBCBTRN44MRORCMI4YO7FZPFBCNOKTOBCAAFC7KC3LNPRYS`) **Returns** A promise that resolves to the federation record **Throws** - Will throw an error if the federation server returns an invalid memo value. - Will throw an error if the federation server's response exceeds the allowed maximum size. - Will throw an error if the server query fails with an improper response. **See also** - Federation doc **Source:** [src/federation/server.ts:202](https://github.com/stellar/js-stellar-sdk/blob/master/src/federation/server.ts#L202) ### `server.resolveAddress(address)` Get the federation record if the user was found for a given Stellar address ```ts resolveAddress(address: string): Promise; ``` **Parameters** - **`address`** — `string` (required) — Stellar address (ex. `bob*stellar.org`). If `FederationServer` was instantiated with `domain` param only username (ex. `bob`) can be passed. **Returns** 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 **See also** - Federation doc **Source:** [src/federation/server.ts:174](https://github.com/stellar/js-stellar-sdk/blob/master/src/federation/server.ts#L174) ### `server.resolveTransactionId(transactionId)` Given a transactionId, get the federation record if the sender of the transaction was found ```ts resolveTransactionId(transactionId: string): Promise; ``` **Parameters** - **`transactionId`** — `string` (required) — Transaction ID (ex. `3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889`) **Returns** A promise that resolves to the federation record **Throws** - Will throw an error if the federation server returns an invalid memo value. - Will throw an error if the federation server's response exceeds the allowed maximum size. - Will throw an error if the server query fails with an improper response. **See also** - Federation doc **Source:** [src/federation/server.ts:219](https://github.com/stellar/js-stellar-sdk/blob/master/src/federation/server.ts#L219) # Source: docs/reference/seps-webauth.md # SEPs / WebAuth ## WebAuth.ChallengeTxDetails A parsed and validated challenge transaction, and some of its constituent details. ```ts type ChallengeTxDetails = unknown ``` **Source:** [src/webauth/utils.ts:104](https://github.com/stellar/js-stellar-sdk/blob/master/src/webauth/utils.ts#L104) ## WebAuth.buildChallengeTx Returns a valid `SEP-10` challenge transaction which you can use for Stellar Web Authentication. ```ts buildChallengeTx(serverKeypair: Keypair, clientAccountID: string, homeDomain: string, timeout: number = 300, networkPassphrase: string, webAuthDomain: string, memo: string | null = null, clientDomain: string | null = null, clientSigningKey: string | null = null): string ``` **Parameters** - **`serverKeypair`** — `Keypair` (required) — Keypair for server's signing account. - **`clientAccountID`** — `string` (required) — The stellar account (G...) or muxed account (M...) that the wallet wishes to authenticate with the server. - **`homeDomain`** — `string` (required) — The fully qualified domain name of the service requiring authentication - **`timeout`** — `number` (optional) (default: `300`) — Challenge duration (default to 5 minutes). - **`networkPassphrase`** — `string` (required) — The network passphrase. If you pass this argument then timeout is required. - **`webAuthDomain`** — `string` (required) — The fully qualified domain name of the service issuing the challenge. - **`memo`** — `string | null` (optional) (default: `null`) — The memo to attach to the challenge transaction. The memo must be of type `id`. If the `clientaccountID` is a muxed account, memos cannot be used. - **`clientDomain`** — `string | null` (optional) (default: `null`) — The fully qualified domain of the client requesting the challenge. Only necessary when the 'client_domain' parameter is passed. - **`clientSigningKey`** — `string | null` (optional) (default: `null`) — 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** A base64 encoded string of the raw TransactionEnvelope xdr struct for the transaction. **Throws** - Will throw if `clientAccountID` is a muxed account, and `memo` is present. - Will throw if `clientDomain` is provided, but `clientSigningKey` is missing **Example** ```ts import { Keypair, Networks, WebAuth } from 'stellar-sdk' let serverKeyPair = Keypair.fromSecret("server-secret") let challenge = WebAuth.buildChallengeTx( serverKeyPair, "client-stellar-account-id", "stellar.org", 300, Networks.TESTNET); ``` **See also** - `SEP-10: Stellar Web Auth` **Source:** [src/webauth/challenge_transaction.ts:63](https://github.com/stellar/js-stellar-sdk/blob/master/src/webauth/challenge_transaction.ts#L63) ## WebAuth.gatherTxSigners Checks if a transaction has been signed by one or more of the given signers, returning a list of non-repeated signers that were found to have signed the given transaction. ```ts gatherTxSigners(transaction: Transaction | FeeBumpTransaction, signers: string[]): string[] ``` **Parameters** - **`transaction`** — `Transaction | FeeBumpTransaction` (required) — The signed transaction. - **`signers`** — `string[]` (required) — The signer's public keys. **Returns** A list of signers that were found to have signed the transaction. **Example** ```ts let keypair1 = Keypair.random(); let keypair2 = Keypair.random(); const account = new StellarSdk.Account(keypair1.publicKey(), "-1"); const transaction = new TransactionBuilder(account, { fee: 100 }) .setTimeout(30) .build(); transaction.sign(keypair1, keypair2) WebAuth.gatherTxSigners(transaction, [keypair1.publicKey(), keypair2.publicKey()]) ``` **Source:** [src/webauth/utils.ts:32](https://github.com/stellar/js-stellar-sdk/blob/master/src/webauth/utils.ts#L32) ## WebAuth.readChallengeTx 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. 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: - `WebAuth.verifyChallengeTxThreshold` - `WebAuth.verifyChallengeTxSigners` ```ts readChallengeTx(challengeTx: string, serverAccountID: string, networkPassphrase: string, homeDomains: string | string[], webAuthDomain: string): { clientAccountID: string; matchedHomeDomain: string; memo: string | null; tx: Transaction } ``` **Parameters** - **`challengeTx`** — `string` (required) — SEP0010 challenge transaction in base64. - **`serverAccountID`** — `string` (required) — The server's stellar account (public key). - **`networkPassphrase`** — `string` (required) — The network passphrase, e.g.: 'Test SDF Network ; September 2015' (see `Networks`) - **`homeDomains`** — `string | string[]` (required) — 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. - **`webAuthDomain`** — `string` (required) — 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** 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 also** - `SEP-10: Stellar Web Auth` **Source:** [src/webauth/challenge_transaction.ts:163](https://github.com/stellar/js-stellar-sdk/blob/master/src/webauth/challenge_transaction.ts#L163) ## WebAuth.verifyChallengeTxSigners Verifies that for a SEP 10 challenge transaction all signatures on the transaction are accounted for. A transaction is verified if it is signed by the server account, and all other signatures match a signer that has been provided as an argument (as the accountIDs list). Additional signers can be provided that do not have a signature, but all signatures must be matched to a signer (accountIDs) for verification to succeed. If verification succeeds, a list of signers that were found is returned, not including the server account ID. Signers that are not prefixed as an address/account ID strkey (G...) will be ignored. Errors will be raised if: - The transaction is invalid according to `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. ```ts verifyChallengeTxSigners(challengeTx: string, serverAccountID: string, networkPassphrase: string, signers: string[], homeDomains: string | string[], webAuthDomain: string): string[] ``` **Parameters** - **`challengeTx`** — `string` (required) — SEP0010 challenge transaction in base64. - **`serverAccountID`** — `string` (required) — The server's stellar account (public key). - **`networkPassphrase`** — `string` (required) — The network passphrase, e.g.: 'Test SDF Network ; September 2015' (see `Networks`). - **`signers`** — `string[]` (required) — The signers public keys. This list should contain the public keys for all signers that have signed the transaction. - **`homeDomains`** — `string | string[]` (required) — The home domain(s) that should be included in the first Manage Data operation's string key. Required in readChallengeTx(). - **`webAuthDomain`** — `string` (required) — 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** The list of signers public keys that have signed the transaction, excluding the server account ID. **Example** ```ts import { Networks, TransactionBuilder, WebAuth } from 'stellar-sdk'; const serverKP = Keypair.random(); const clientKP1 = Keypair.random(); const clientKP2 = Keypair.random(); // Challenge, possibly built in the server side const challenge = WebAuth.buildChallengeTx( serverKP, clientKP1.publicKey(), "SDF", 300, Networks.TESTNET ); // clock.tick(200); // Simulates a 200 ms delay when communicating from server to client // Transaction gathered from a challenge, possibly from the client side const transaction = TransactionBuilder.fromXDR(challenge, Networks.TESTNET); transaction.sign(clientKP1, clientKP2); const signedChallenge = transaction .toEnvelope() .toXDR("base64") .toString(); // The result below should be equal to [clientKP1.publicKey(), clientKP2.publicKey()] WebAuth.verifyChallengeTxSigners( signedChallenge, serverKP.publicKey(), Networks.TESTNET, threshold, [clientKP1.publicKey(), clientKP2.publicKey()] ); ``` **See also** - `SEP-10: Stellar Web Auth` **Source:** [src/webauth/challenge_transaction.ts:419](https://github.com/stellar/js-stellar-sdk/blob/master/src/webauth/challenge_transaction.ts#L419) ## WebAuth.verifyChallengeTxThreshold Verifies that for a SEP-10 challenge transaction all signatures on the transaction are accounted for and that the signatures meet a threshold on an account. A transaction is verified if it is signed by the server account, and all other signatures match a signer that has been provided as an argument, and those signatures meet a threshold on the account. Signers that are not prefixed as an address/account ID strkey (G...) will be ignored. Errors will be raised if: - The transaction is invalid according to `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. ```ts verifyChallengeTxThreshold(challengeTx: string, serverAccountID: string, networkPassphrase: string, threshold: number, signerSummary: AccountRecordSigners[], homeDomains: string | string[], webAuthDomain: string): string[] ``` **Parameters** - **`challengeTx`** — `string` (required) — SEP0010 challenge transaction in base64. - **`serverAccountID`** — `string` (required) — The server's stellar account (public key). - **`networkPassphrase`** — `string` (required) — The network passphrase, e.g.: 'Test SDF Network ; September 2015' (see `Networks`). - **`threshold`** — `number` (required) — The required signatures threshold for verifying this transaction. - **`signerSummary`** — `AccountRecordSigners[]` (required) — a map of all authorized signers to their weights. It's used to validate if the transaction signatures have met the given threshold. - **`homeDomains`** — `string | string[]` (required) — The home domain(s) that should be included in the first Manage Data operation's string key. Required in `verifyChallengeTxSigners() => readChallengeTx()`. - **`webAuthDomain`** — `string` (required) — 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** The list of signers public keys that have signed the transaction, excluding the server account ID, given that the threshold was met. **Throws** - Will throw if the collective weight of the transaction's signers does not meet the necessary threshold to verify this transaction. **Example** ```ts import { Networks, TransactionBuilder, WebAuth } from 'stellar-sdk'; const serverKP = Keypair.random(); const clientKP1 = Keypair.random(); const clientKP2 = Keypair.random(); // Challenge, possibly built in the server side const challenge = WebAuth.buildChallengeTx( serverKP, clientKP1.publicKey(), "SDF", 300, Networks.TESTNET ); // clock.tick(200); // Simulates a 200 ms delay when communicating from server to client // Transaction gathered from a challenge, possibly from the client side const transaction = TransactionBuilder.fromXDR(challenge, Networks.TESTNET); transaction.sign(clientKP1, clientKP2); const signedChallenge = transaction .toEnvelope() .toXDR("base64") .toString(); // Defining the threshold and signerSummary const threshold = 3; const signerSummary = [ { key: this.clientKP1.publicKey(), weight: 1, }, { key: this.clientKP2.publicKey(), weight: 2, }, ]; // The result below should be equal to [clientKP1.publicKey(), clientKP2.publicKey()] WebAuth.verifyChallengeTxThreshold( signedChallenge, serverKP.publicKey(), Networks.TESTNET, threshold, signerSummary ); ``` **See also** - `SEP-10: Stellar Web Auth` **Source:** [src/webauth/challenge_transaction.ts:645](https://github.com/stellar/js-stellar-sdk/blob/master/src/webauth/challenge_transaction.ts#L645) ## WebAuth.verifyTxSignedBy Verifies if a transaction was signed by the given account id. ```ts verifyTxSignedBy(transaction: Transaction | FeeBumpTransaction, accountID: string): boolean ``` **Parameters** - **`transaction`** — `Transaction | FeeBumpTransaction` (required) — The signed transaction. - **`accountID`** — `string` (required) — The signer's public key. **Returns** Whether or not `accountID` was found to have signed the transaction. **Example** ```ts let keypair = Keypair.random(); const account = new StellarSdk.Account(keypair.publicKey(), "-1"); const transaction = new TransactionBuilder(account, { fee: 100 }) .setTimeout(30) .build(); transaction.sign(keypair) WebAuth.verifyTxSignedBy(transaction, keypair.publicKey()) ``` **Source:** [src/webauth/utils.ts:94](https://github.com/stellar/js-stellar-sdk/blob/master/src/webauth/utils.ts#L94) # Source: docs/reference/errors.md # Errors ## AccountRequiresMemoError 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 ```ts class AccountRequiresMemoError extends Error { constructor(message: string, accountId: string, operationIndex: number); static stackTraceLimit: number; static captureStackTrace(targetObject: object, constructorOpt?: Function): void; static prepareStackTrace(err: Error, stackTraces: CallSite[]): any; accountId: string; cause?: unknown; message: string; name: string; operationIndex: number; stack?: string; } ``` **Example** ```ts console.log('The following account requires a memo ', err.accountId) console.log('The account is used in operation: ', err.operationIndex) ``` **Source:** [src/errors/account_requires_memo.ts:20](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/account_requires_memo.ts#L20) ### `new AccountRequiresMemoError(message, accountId, operationIndex)` ```ts constructor(message: string, accountId: string, operationIndex: number); ``` **Parameters** - **`message`** — `string` (required) - **`accountId`** — `string` (required) - **`operationIndex`** — `number` (required) **Source:** [src/errors/account_requires_memo.ts:24](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/account_requires_memo.ts#L24) ### `AccountRequiresMemoError.stackTraceLimit` The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ```ts static stackTraceLimit: number; ``` **Source:** [node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts:68](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts#L68) ### `AccountRequiresMemoError.captureStackTrace(targetObject, constructorOpt)` Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` ```ts static captureStackTrace(targetObject: object, constructorOpt?: Function): void; ``` **Parameters** - **`targetObject`** — `object` (required) - **`constructorOpt`** — `Function` (optional) **Source:** [node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts:52](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts#L52) ### `AccountRequiresMemoError.prepareStackTrace(err, stackTraces)` ```ts static prepareStackTrace(err: Error, stackTraces: CallSite[]): any; ``` **Parameters** - **`err`** — `Error` (required) - **`stackTraces`** — `CallSite[]` (required) **See also** - https://v8.dev/docs/stack-trace-api#customizing-stack-traces **Source:** [node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts:56](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts#L56) ### `accountRequiresMemoError.accountId` ```ts accountId: string; ``` **Source:** [src/errors/account_requires_memo.ts:21](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/account_requires_memo.ts#L21) ### `accountRequiresMemoError.cause` ```ts cause?: unknown; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts#L26) ### `accountRequiresMemoError.message` ```ts message: string; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1077) ### `accountRequiresMemoError.name` ```ts name: string; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1076) ### `accountRequiresMemoError.operationIndex` ```ts operationIndex: number; ``` **Source:** [src/errors/account_requires_memo.ts:22](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/account_requires_memo.ts#L22) ### `accountRequiresMemoError.stack` ```ts stack?: string; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1078) ## BadRequestError BadRequestError is raised when a request made to Horizon is invalid in some way (incorrect timebounds for trade call builders, for example.) ```ts class BadRequestError extends NetworkError { constructor(message: string, response: any); static stackTraceLimit: number; static captureStackTrace(targetObject: object, constructorOpt?: Function): void; static prepareStackTrace(err: Error, stackTraces: CallSite[]): any; cause?: unknown; message: string; name: string; response: { data?: ErrorResponseData; status?: number; statusText?: string; url?: string }; stack?: string; getResponse(): { data?: ErrorResponseData; status?: number; statusText?: string; url?: string }; } ``` **Source:** [src/errors/bad_request.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/bad_request.ts#L10) ### `new BadRequestError(message, response)` ```ts constructor(message: string, response: any); ``` **Parameters** - **`message`** — `string` (required) - **`response`** — `any` (required) **Source:** [src/errors/network.ts:29](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/network.ts#L29) ### `BadRequestError.stackTraceLimit` The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ```ts static stackTraceLimit: number; ``` **Source:** [node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts:68](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts#L68) ### `BadRequestError.captureStackTrace(targetObject, constructorOpt)` Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` ```ts static captureStackTrace(targetObject: object, constructorOpt?: Function): void; ``` **Parameters** - **`targetObject`** — `object` (required) - **`constructorOpt`** — `Function` (optional) **Source:** [node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts:52](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts#L52) ### `BadRequestError.prepareStackTrace(err, stackTraces)` ```ts static prepareStackTrace(err: Error, stackTraces: CallSite[]): any; ``` **Parameters** - **`err`** — `Error` (required) - **`stackTraces`** — `CallSite[]` (required) **See also** - https://v8.dev/docs/stack-trace-api#customizing-stack-traces **Source:** [node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts:56](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts#L56) ### `badRequestError.cause` ```ts cause?: unknown; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts#L26) ### `badRequestError.message` ```ts message: string; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1077) ### `badRequestError.name` ```ts name: string; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1076) ### `badRequestError.response` Response details, received from the Horizon server. ```ts response: { data?: ErrorResponseData; status?: number; statusText?: string; url?: string }; ``` **Source:** [src/errors/network.ts:18](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/network.ts#L18) ### `badRequestError.stack` ```ts stack?: string; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1078) ### `badRequestError.getResponse()` Returns the error response sent by the Horizon server. ```ts getResponse(): { data?: ErrorResponseData; status?: number; statusText?: string; url?: string }; ``` **Returns** Response details, received from the Horizon server. **Source:** [src/errors/network.ts:38](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/network.ts#L38) ## BadResponseError BadResponseError is raised when a response from a `Horizon` or `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. ```ts class BadResponseError extends NetworkError { constructor(message: string, response: any); static stackTraceLimit: number; static captureStackTrace(targetObject: object, constructorOpt?: Function): void; static prepareStackTrace(err: Error, stackTraces: CallSite[]): any; cause?: unknown; message: string; name: string; response: { data?: ErrorResponseData; status?: number; statusText?: string; url?: string }; stack?: string; getResponse(): { data?: ErrorResponseData; status?: number; statusText?: string; url?: string }; } ``` **Source:** [src/errors/bad_response.ts:13](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/bad_response.ts#L13) ### `new BadResponseError(message, response)` ```ts constructor(message: string, response: any); ``` **Parameters** - **`message`** — `string` (required) - **`response`** — `any` (required) **Source:** [src/errors/network.ts:29](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/network.ts#L29) ### `BadResponseError.stackTraceLimit` The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ```ts static stackTraceLimit: number; ``` **Source:** [node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts:68](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts#L68) ### `BadResponseError.captureStackTrace(targetObject, constructorOpt)` Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` ```ts static captureStackTrace(targetObject: object, constructorOpt?: Function): void; ``` **Parameters** - **`targetObject`** — `object` (required) - **`constructorOpt`** — `Function` (optional) **Source:** [node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts:52](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts#L52) ### `BadResponseError.prepareStackTrace(err, stackTraces)` ```ts static prepareStackTrace(err: Error, stackTraces: CallSite[]): any; ``` **Parameters** - **`err`** — `Error` (required) - **`stackTraces`** — `CallSite[]` (required) **See also** - https://v8.dev/docs/stack-trace-api#customizing-stack-traces **Source:** [node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts:56](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts#L56) ### `badResponseError.cause` ```ts cause?: unknown; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts#L26) ### `badResponseError.message` ```ts message: string; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1077) ### `badResponseError.name` ```ts name: string; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1076) ### `badResponseError.response` Response details, received from the Horizon server. ```ts response: { data?: ErrorResponseData; status?: number; statusText?: string; url?: string }; ``` **Source:** [src/errors/network.ts:18](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/network.ts#L18) ### `badResponseError.stack` ```ts stack?: string; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1078) ### `badResponseError.getResponse()` Returns the error response sent by the Horizon server. ```ts getResponse(): { data?: ErrorResponseData; status?: number; statusText?: string; url?: string }; ``` **Returns** Response details, received from the Horizon server. **Source:** [src/errors/network.ts:38](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/network.ts#L38) ## NetworkError NetworkError is raised when an interaction with a Horizon server has caused some kind of problem. ```ts class NetworkError extends Error { constructor(message: string, response: any); static stackTraceLimit: number; static captureStackTrace(targetObject: object, constructorOpt?: Function): void; static prepareStackTrace(err: Error, stackTraces: CallSite[]): any; cause?: unknown; message: string; name: string; response: { data?: ErrorResponseData; status?: number; statusText?: string; url?: string }; stack?: string; getResponse(): { data?: ErrorResponseData; status?: number; statusText?: string; url?: string }; } ``` **Source:** [src/errors/network.ts:16](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/network.ts#L16) ### `new NetworkError(message, response)` ```ts constructor(message: string, response: any); ``` **Parameters** - **`message`** — `string` (required) - **`response`** — `any` (required) **Source:** [src/errors/network.ts:29](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/network.ts#L29) ### `NetworkError.stackTraceLimit` The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ```ts static stackTraceLimit: number; ``` **Source:** [node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts:68](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts#L68) ### `NetworkError.captureStackTrace(targetObject, constructorOpt)` Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` ```ts static captureStackTrace(targetObject: object, constructorOpt?: Function): void; ``` **Parameters** - **`targetObject`** — `object` (required) - **`constructorOpt`** — `Function` (optional) **Source:** [node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts:52](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts#L52) ### `NetworkError.prepareStackTrace(err, stackTraces)` ```ts static prepareStackTrace(err: Error, stackTraces: CallSite[]): any; ``` **Parameters** - **`err`** — `Error` (required) - **`stackTraces`** — `CallSite[]` (required) **See also** - https://v8.dev/docs/stack-trace-api#customizing-stack-traces **Source:** [node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts:56](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts#L56) ### `networkError.cause` ```ts cause?: unknown; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts#L26) ### `networkError.message` ```ts message: string; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1077) ### `networkError.name` ```ts name: string; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1076) ### `networkError.response` Response details, received from the Horizon server. ```ts response: { data?: ErrorResponseData; status?: number; statusText?: string; url?: string }; ``` **Source:** [src/errors/network.ts:18](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/network.ts#L18) ### `networkError.stack` ```ts stack?: string; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1078) ### `networkError.getResponse()` Returns the error response sent by the Horizon server. ```ts getResponse(): { data?: ErrorResponseData; status?: number; statusText?: string; url?: string }; ``` **Returns** Response details, received from the Horizon server. **Source:** [src/errors/network.ts:38](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/network.ts#L38) ## NotFoundError NotFoundError is raised when the resource requested from Horizon is unavailable. ```ts class NotFoundError extends NetworkError { constructor(message: string, response: any); static stackTraceLimit: number; static captureStackTrace(targetObject: object, constructorOpt?: Function): void; static prepareStackTrace(err: Error, stackTraces: CallSite[]): any; cause?: unknown; message: string; name: string; response: { data?: ErrorResponseData; status?: number; statusText?: string; url?: string }; stack?: string; getResponse(): { data?: ErrorResponseData; status?: number; statusText?: string; url?: string }; } ``` **Source:** [src/errors/not_found.ts:10](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/not_found.ts#L10) ### `new NotFoundError(message, response)` ```ts constructor(message: string, response: any); ``` **Parameters** - **`message`** — `string` (required) - **`response`** — `any` (required) **Source:** [src/errors/network.ts:29](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/network.ts#L29) ### `NotFoundError.stackTraceLimit` The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ```ts static stackTraceLimit: number; ``` **Source:** [node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts:68](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts#L68) ### `NotFoundError.captureStackTrace(targetObject, constructorOpt)` Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` ```ts static captureStackTrace(targetObject: object, constructorOpt?: Function): void; ``` **Parameters** - **`targetObject`** — `object` (required) - **`constructorOpt`** — `Function` (optional) **Source:** [node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts:52](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts#L52) ### `NotFoundError.prepareStackTrace(err, stackTraces)` ```ts static prepareStackTrace(err: Error, stackTraces: CallSite[]): any; ``` **Parameters** - **`err`** — `Error` (required) - **`stackTraces`** — `CallSite[]` (required) **See also** - https://v8.dev/docs/stack-trace-api#customizing-stack-traces **Source:** [node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts:56](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts#L56) ### `notFoundError.cause` ```ts cause?: unknown; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts#L26) ### `notFoundError.message` ```ts message: string; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1077) ### `notFoundError.name` ```ts name: string; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1076) ### `notFoundError.response` Response details, received from the Horizon server. ```ts response: { data?: ErrorResponseData; status?: number; statusText?: string; url?: string }; ``` **Source:** [src/errors/network.ts:18](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/network.ts#L18) ### `notFoundError.stack` ```ts stack?: string; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1078) ### `notFoundError.getResponse()` Returns the error response sent by the Horizon server. ```ts getResponse(): { data?: ErrorResponseData; status?: number; statusText?: string; url?: string }; ``` **Returns** Response details, received from the Horizon server. **Source:** [src/errors/network.ts:38](https://github.com/stellar/js-stellar-sdk/blob/master/src/errors/network.ts#L38) ## WebAuth.InvalidChallengeError 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). ```ts class InvalidChallengeError extends Error { constructor(message?: string); static stackTraceLimit: number; static captureStackTrace(targetObject: object, constructorOpt?: Function): void; static prepareStackTrace(err: Error, stackTraces: CallSite[]): any; cause?: unknown; message: string; name: string; stack?: string; } ``` **Source:** [src/webauth/errors.ts:8](https://github.com/stellar/js-stellar-sdk/blob/master/src/webauth/errors.ts#L8) ### `new InvalidChallengeError(message)` ```ts constructor(message?: string); ``` **Parameters** - **`message`** — `string` (optional) **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1082](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1082) ### `InvalidChallengeError.stackTraceLimit` The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. ```ts static stackTraceLimit: number; ``` **Source:** [node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts:68](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts#L68) ### `InvalidChallengeError.captureStackTrace(targetObject, constructorOpt)` Creates a `.stack` property on `targetObject`, which when accessed returns a string representing the location in the code at which `Error.captureStackTrace()` was called. ```js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` ``` The first line of the trace will be prefixed with `${myObject.name}: ${myObject.message}`. The optional `constructorOpt` argument accepts a function. If given, all frames above `constructorOpt`, including `constructorOpt`, will be omitted from the generated stack trace. The `constructorOpt` argument is useful for hiding implementation details of error generation from the user. For instance: ```js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); ``` ```ts static captureStackTrace(targetObject: object, constructorOpt?: Function): void; ``` **Parameters** - **`targetObject`** — `object` (required) - **`constructorOpt`** — `Function` (optional) **Source:** [node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts:52](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts#L52) ### `InvalidChallengeError.prepareStackTrace(err, stackTraces)` ```ts static prepareStackTrace(err: Error, stackTraces: CallSite[]): any; ``` **Parameters** - **`err`** — `Error` (required) - **`stackTraces`** — `CallSite[]` (required) **See also** - https://v8.dev/docs/stack-trace-api#customizing-stack-traces **Source:** [node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts:56](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/@types+node@22.19.17/node_modules/@types/node/globals.d.ts#L56) ### `invalidChallengeError.cause` ```ts cause?: unknown; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts:26](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es2022.error.d.ts#L26) ### `invalidChallengeError.message` ```ts message: string; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1077](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1077) ### `invalidChallengeError.name` ```ts name: string; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1076](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1076) ### `invalidChallengeError.stack` ```ts stack?: string; ``` **Source:** [node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts:1078](https://github.com/stellar/js-stellar-sdk/blob/master/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1078) # Source: docs/reference/cross-cutting.md # Cross-cutting ## Config Global config class. ```ts class Config { constructor(); static getTimeout(): number; static isAllowHttp(): boolean; static setAllowHttp(value: boolean): void; static setDefault(): void; static setTimeout(value: number): void; } ``` **Example** ```ts import { Config } from '@stellar/stellar-sdk'; Config.setAllowHttp(true); Config.setTimeout(5000); ``` **Example** ```ts StellarSdk.Config.setAllowHttp(true); StellarSdk.Config.setTimeout(5000); ``` **Source:** [src/config.ts:39](https://github.com/stellar/js-stellar-sdk/blob/master/src/config.ts#L39) ### `new Config()` ```ts constructor(); ``` ### `Config.getTimeout()` Returns the configured `timeout` flag. ```ts static getTimeout(): number; ``` **Returns** The timeout value. **Source:** [src/config.ts:71](https://github.com/stellar/js-stellar-sdk/blob/master/src/config.ts#L71) ### `Config.isAllowHttp()` Returns the configured `allowHttp` flag. ```ts static isAllowHttp(): boolean; ``` **Returns** The allowHttp value. **Source:** [src/config.ts:63](https://github.com/stellar/js-stellar-sdk/blob/master/src/config.ts#L63) ### `Config.setAllowHttp(value)` Sets `allowHttp` flag globally. When set to `true`, connections to insecure http protocol servers will be allowed. Must be set to `false` in production. ```ts static setAllowHttp(value: boolean): void; ``` **Parameters** - **`value`** — `boolean` (required) **Source:** [src/config.ts:46](https://github.com/stellar/js-stellar-sdk/blob/master/src/config.ts#L46) ### `Config.setDefault()` Sets all global config flags to default values. ```ts static setDefault(): void; ``` **Source:** [src/config.ts:78](https://github.com/stellar/js-stellar-sdk/blob/master/src/config.ts#L78) ### `Config.setTimeout(value)` Sets `timeout` flag globally. When set to anything besides 0, the request will timeout after specified time (ms). ```ts static setTimeout(value: number): void; ``` **Parameters** - **`value`** — `number` (required) **Source:** [src/config.ts:55](https://github.com/stellar/js-stellar-sdk/blob/master/src/config.ts#L55) ## Utils Miscellaneous utilities. ```ts class Utils { constructor(); static sleep(ms: number): Promise; static validateTimebounds(transaction: Transaction, gracePeriod: number = 0): boolean; } ``` **Source:** [src/utils.ts:7](https://github.com/stellar/js-stellar-sdk/blob/master/src/utils.ts#L7) ### `new Utils()` ```ts constructor(); ``` ### `Utils.sleep(ms)` ```ts static sleep(ms: number): Promise; ``` **Parameters** - **`ms`** — `number` (required) **Source:** [src/utils.ts:34](https://github.com/stellar/js-stellar-sdk/blob/master/src/utils.ts#L34) ### `Utils.validateTimebounds(transaction, gracePeriod)` Verifies if the current date is within the transaction's timebounds ```ts static validateTimebounds(transaction: Transaction, gracePeriod: number = 0): boolean; ``` **Parameters** - **`transaction`** — `Transaction` (required) — The transaction whose timebounds will be validated. - **`gracePeriod`** — `number` (optional) (default: `0`) — (optional) An additional window of time that should be considered valid on either end of the transaction's time range. **Returns** Returns true if the current time is within the transaction's [minTime, maxTime] range. **Source:** [src/utils.ts:17](https://github.com/stellar/js-stellar-sdk/blob/master/src/utils.ts#L17) # Source: docs/agents.md # AI Agents This SDK publishes its documentation in formats designed for AI agents. There are three independent surfaces; pick whichever matches your workflow. ## llms.txt bundles Structured bundles of the entire docs corpus, served at the site root: - [`llms.txt`](../llms.txt) — index of every guide and reference page, one entry per page, with each entry's `description` field sourced from the page's frontmatter. Use this as a routing map: pick the page most relevant to your task, then fetch it directly. - [`llms-full.txt`](../llms-full.txt) — the full corpus concatenated as one prose stream, with frontmatter blocks stripped and replaced by per-page `# Source: ` headings. Ingest as a single document when you want the whole API surface in one shot. Links inside `llms.txt` are bundle-relative, so they resolve correctly no matter what host or base path the bundle is served from. ## Raw markdown siblings Every rendered docs page has a `.md` sibling at the same URL with `.md` appended. For example: | HTML page | Raw markdown | | --- | --- | | `…/guides/01-getting-started/` | `…/guides/01-getting-started.md` | | `…/reference/core-keys/` | `…/reference/core-keys.md` | Agents that prefer parsing markdown directly (instead of stripping HTML or fetching the full bundle) can fetch any page's source by appending `.md` to its URL. Frontmatter is preserved. ## Crawler policy (robots.txt) The site's [`robots.txt`](../robots.txt) declares an open policy via [Cloudflare Content Signals](https://blog.cloudflare.com/content-signals-policy/): `search`, `ai-input`, and `ai-train` are all permitted. Per-bot `Allow` rules are emitted for every major AI crawler so the policy is auditable on inspection. The full bot list and the policy values are kept in [`config/site.ts`](https://github.com/stellar/js-stellar-sdk/blob/master/config/site.ts); edit that file and rebuild to change either. ## Refresh cadence All three surfaces (bundles, `.md` siblings, robots.txt) are regenerated on every release deploy. They reflect the **current SDK major** only — older majors are not bundled (see the [Versioning & Compatibility](./guides/00-versioning.md) page for the rationale). The current SDK version is **15.0.1**, sourced from `package.json#version` at build time. ## Intentionally not implemented A few emerging agent-readiness conventions don't apply to a JavaScript SDK documentation site and are deliberately not published here. This list is explicit so an agent (or an automated audit tool) can distinguish "deliberately absent" from "forgotten": - **API Catalog ([RFC 9727](https://www.rfc-editor.org/rfc/rfc9727))** is for domains that host HTTP APIs. This site documents a JS library; the underlying Stellar network APIs (Horizon, Soroban RPC) are owned by the Stellar Development Foundation and live at [developers.stellar.org](https://developers.stellar.org). - **MCP Server Card, WebMCP, and Agent Skills** are for sites that expose Model Context Protocol servers or agent-callable skills. We don't host either — the SDK is consumed via `npm install`. - **OAuth discovery endpoints** ([RFC 8414](https://www.rfc-editor.org/rfc/rfc8414), [RFC 9728](https://www.rfc-editor.org/rfc/rfc9728)) — no auth surface to advertise. - **Agent Card / A2A** — no agent-to-agent protocol exposed. - **Commerce protocols (x402, MPP, UCP, ACP)** — not a commerce site. If the SDK ever ships an MCP server, agent skill bundle, or HTTP API of its own, the relevant entries here would change. # Source: CHANGELOG.md # Changelog A breaking change will get clearly marked in this log. ## Unreleased ### Fixed * `RpcServer.pollTransaction` off-by-one: the polling loop used `<` instead of `<=`, causing one fewer attempt than configured([#1373](https://github.com/stellar/js-stellar-sdk/pull/1373)). * `requestAirdrop` error path: fixed incorrect property access (`error.response.detail` instead of `error.response.data.detail`) when checking for `createAccountAlreadyExist` ([#1373](https://github.com/stellar/js-stellar-sdk/pull/1373)). * Operator precedence bug in `parseSuccessful`: `sim.results?.length ?? 0 > 0` was parsed as `?? (0 > 0)`, causing simulation results and state changes to never be included in the parsed response ([#1373](https://github.com/stellar/js-stellar-sdk/pull/1373)). * `Spec.typeRef` now properly handles `scSpecTypeResult` by returning the JSON schema for the `okType`, instead of silently breaking out of the switch ([#1373](https://github.com/stellar/js-stellar-sdk/pull/1373)). * `structToJsonSchema` now places `additionalProperties: false` on the schema object itself rather than incorrectly nesting it inside `properties` ([#1373](https://github.com/stellar/js-stellar-sdk/pull/1373)). * Fixed bigint-to-U32/I32 conversion in `Spec` using `Number(val)` instead of `val as number` (a no-op for bigints) ([#1373](https://github.com/stellar/js-stellar-sdk/pull/1373)). * Fixed missing template literal `$` in two `Spec` error messages that were not interpolated ([#1373](https://github.com/stellar/js-stellar-sdk/pull/1373)). * WASM custom section parser: when a section was skipped (invalid name length), the offset was not advanced, causing an infinite loop or incorrect parsing of subsequent sections ([#1373](https://github.com/stellar/js-stellar-sdk/pull/1373)). * `FederationServer.resolve` now validates domains per RFC 1035, rejecting malformed domains. Port numbers are also accepted in the domain ([#1373](https://github.com/stellar/js-stellar-sdk/pull/1373)). * `FederationServer` URL mutation: `resolveAddress`, `resolveAccountId`, and `resolveTransactionId` mutated the shared `serverURL` by appending query params on each call. Fixed by cloning the URL before modifying ([#1373](https://github.com/stellar/js-stellar-sdk/pull/1373)). * `CallBuilder.stream()` URL mutation: `stream()` mutated the shared `this.url` by adding query params, corrupting the builder for subsequent calls. Fixed by cloning the URL ([#1373](https://github.com/stellar/js-stellar-sdk/pull/1373)). * `AssembledTransaction` restore path: when `buildWithOp` was used and automatic state restoration was needed, the rebuild incorrectly reconstructed the operation via `contract.call()` instead of reusing the original operation ([#1373](https://github.com/stellar/js-stellar-sdk/pull/1373)). * `SERVER_TIME_MAP` port collision: the Horizon time-sync cache keyed entries by hostname only, so two servers on different ports of the same host shared a cache entry. Fixed by including the port in the key ([#1373](https://github.com/stellar/js-stellar-sdk/pull/1373)). * `Spec.funcResToNative` now correctly returns an `Err` instance when a contract function with a `Result` return type returns an error, instead of throwing while decoding it as the `Ok` type ([#1373](https://github.com/stellar/js-stellar-sdk/pull/1373)). * SEP-10: `verifyChallengeTxSigners` now rejects challenges signed only by the server and `client_domain` key with no actual client signer, instead of returning an empty signers list ([#1372](https://github.com/stellar/js-stellar-sdk/pull/1372)). * `getAssetBalance` used incorrect flag bitmask constants (`AuthRequiredFlag`, `AuthRevocableFlag`, `AuthClawbackEnabledFlag`) which are account-level flags, not trustline-level flags. Replaced with the correct trustline flag bitmasks (`0x1`, `0x2`, `0x4`) ([#1372](https://github.com/stellar/js-stellar-sdk/pull/1372)). * `AssembledTransaction.simulate` did not clear `this.built` before re-simulating after a state restoration rebuild, causing it to assemble stale transaction data ([#1372](https://github.com/stellar/js-stellar-sdk/pull/1372)). * `AssembledTransaction.signAndSend` mutated the shared `this.options.submit` flag to prevent double submission. Replaced with a wrapper around `signTransaction` that injects `submit: false` without mutating shared state ([#1372](https://github.com/stellar/js-stellar-sdk/pull/1372)). * Fetch HTTP client: async request interceptors were not awaited — the synchronous `try/catch` loop passed unresolved promise objects as the config. Replaced with a proper `.then()` chain matching Axios interceptor semantics ([#1372](https://github.com/stellar/js-stellar-sdk/pull/1372)). * Fetch HTTP client: `maxRedirects` and `maxContentLength` were silently ignored on the no-axios / minimal builds, turning SDK-set SSRF and DoS guards (`StellarToml.Resolver.resolve`, `FederationServer`) into no-ops. A new bounded adapter activates when either option is set, refusing redirects past `maxRedirects` and streaming the response body with a running-total check so oversized responses abort mid-stream ([#1390](https://github.com/stellar/js-stellar-sdk/pull/1390)). * `src/bindings/config.ts` imported `../../package.json` with a relative path that resolved incorrectly for the `lib/no-axios/` and `lib/minimal/` build outputs, making those libs unloadable. Replaced with the `__PACKAGE_VERSION__` compile-time define ([#1390](https://github.com/stellar/js-stellar-sdk/pull/1390)). ### Added * `AccountResponse` constructor now uses explicit field-by-field assignment instead of `Object.entries` dynamic assignment for type safety ([#1373](https://github.com/stellar/js-stellar-sdk/pull/1373)). * Added `transactions` collection to `Api.AccountRecord` and `AccountResponse` ([#1373](https://github.com/stellar/js-stellar-sdk/pull/1373)). * Added range checks for U32/I32 values in `Spec`: bigint values are now validated against min/max bounds before conversion, throwing a `RangeError` instead of silently truncating ([#1373](https://github.com/stellar/js-stellar-sdk/pull/1373)). * `rpc.Server.getLatestLedger()` now includes `closeTime`, `headerXdr`, and `metadataXdr` in the typed response, with `headerXdr`/`metadataXdr` parsed into XDR objects instead of raw base64 strings ([#1389 ](https://github.com/stellar/js-stellar-sdk/pull/1389)). ### Deprecated * `BalanceResponse.revocable` is deprecated in favor of `authorizedToMaintainLiabilities`, which correctly reflects the trustline flag semantics ([#1372](https://github.com/stellar/js-stellar-sdk/pull/1372)). ## [v15.0.1](https://github.com/stellar/js-stellar-sdk/compare/v15.0.0...v15.0.1) ### Fixed * Pin axios to a specific version. ## [v15.0.0](https://github.com/stellar/js-stellar-sdk/compare/v14.6.1...v15.0.0) ### Breaking Changes * XDR has been upgraded to support **Protocol 26**, please refer to the [`@stellar/stellar-base`](https://github.com/stellar/js-stellar-base/releases/tag/v15.0.0) release notes for details and other breaking changes. ### Fixed * Sanitize identifiers and escape string literals in generated TypeScript bindings to prevent code injection via malicious contract spec names. `sanitizeIdentifier` now strips non-identifier characters, and a new `escapeStringLiteral` helper escapes quotes and newlines in string contexts ([#1345](https://github.com/stellar/js-stellar-sdk/pull/1345)). * `AssembledTransaction.fromXDR()` and `fromJSON()` now validate that the deserialized transaction targets the expected contract, rejecting mismatched contract IDs and non-invokeContract operations. ([#1349](https://github.com/stellar/js-stellar-sdk/pull/1349)). ## [v14.6.1](https://github.com/stellar/js-stellar-sdk/compare/v14.6.0...v14.6.1) ### Fixed * Fix `assembleTransaction` double-counting the resource fee when the input transaction already has Soroban data attached (e.g. when re-assembling a previously simulated transaction) ([#1343](https://github.com/stellar/js-stellar-sdk/pull/1343)). * Removed adding `resourceFee` in `assembleTransaction` as it's now handled by `TransactionBuilder.build()` ([#1343](https://github.com/stellar/js-stellar-sdk/pull/1343)). ## [v14.6.0](https://github.com/stellar/js-stellar-sdk/compare/v14.5.0...v14.6.0) ### Added * Upgraded underlying `@stellar/stellar-base` library to include its new features and fixes ([release notes](https://github.com/stellar/js-stellar-base/releases/tag/v14.1.0)). ## [v14.5.0](https://github.com/stellar/js-stellar-sdk/compare/v14.4.3...v14.5.0) ### Added * Introduced CLI functionality for generating smart contract bindings ([#1287](https://github.com/stellar/js-stellar-sdk/pull/1287)). * Added `BindingGeneration` class for parsing contract specs into fully typed TypeScript libraries for calling contract methods ([#1287](https://github.com/stellar/js-stellar-sdk/pull/1287)). * Introduced `rpc.Server.fundAddress` that supports funding contract and account addresses via Friendbot ([#1314](https://github.com/stellar/js-stellar-sdk/pull/1314)). * Updated the `StellarToml` interface with SEP 45 fields `WEB_AUTH_FOR_CONTRACTS_ENDPOINT` and `WEB_AUTH_CONTRACT_ID` ([#1326](https://github.com/stellar/js-stellar-sdk/pull/1326)). ### Fixed * X-App-Name and X-App-Version headers are now included when using `CallBuilder.stream()` ([#1317](https://github.com/stellar/js-stellar-sdk/pull/1317)). * `CallBuilder` now correctly uses the configured server URL for all requests, including pagination and linked resources. Previously, URLs returned by Horizon in `_links` would bypass reverse proxies ([#1318](https://github.com/stellar/js-stellar-sdk/pull/1318)). ### Deprecated * `rpc.Server.requestAirdrop` is deprecated in favor of `rpc.Server.fundAddress` ([#1314](https://github.com/stellar/js-stellar-sdk/pull/1314)). ## [v14.4.3](https://github.com/stellar/js-stellar-sdk/compare/v14.4.2...v14.4.3) ### Fixed * Upgraded underlying `@stellar/stellar-base` library to include its fixes ([release notes](https://github.com/stellar/js-stellar-base/releases/tag/v14.0.4)). ## [v14.4.2](https://github.com/stellar/js-stellar-sdk/compare/v14.4.1...v14.4.2) ### Fixed * Fixed package installation for Windows environments ([#1306](https://github.com/stellar/js-stellar-sdk/pull/1306)) ## [v14.4.1](https://github.com/stellar/js-stellar-sdk/compare/v14.4.0...v14.4.1) ### Fixed * Set `Api.GetEventsRequest.endLedger` to be optional to align with RPC behavior ([#1304](https://github.com/stellar/js-stellar-sdk/pull/1304/)) * Added back `Typepoint` and marked it _deprecated_ in favor of `Timepoint` ([#1303](https://github.com/stellar/js-stellar-sdk/pull/1303)) ## [v14.4.0](https://github.com/stellar/js-stellar-sdk/compare/v14.3.3...v14.4.0) ### Added * Introduced an `rpc.Server.getAssetBalance()` helper to fetch asset balances both for contracts and accounts ([#1286](https://github.com/stellar/js-stellar-sdk/pull/1286/)). * `rpc.Api.BalanceResponse` now can include a `revocable` field in its `balanceEntry` for when trustlines are fetched ([#1286](https://github.com/stellar/js-stellar-sdk/pull/1286/)). * Added Timepoint and Duration support to `Spec` ([#1288](https://github.com/stellar/js-stellar-sdk/pull/1288)) * `Api.GetHealthResponse` interface now includes `latestLedger`, `ledgerRetentionWindow`, and `oldestLedger` fields ([#1297](https://github.com/stellar/js-stellar-sdk/pull/1297)). * Added `publicKey`, `signTransaction`, and `signAuthEntry` as optional fields to `contract.MethodOptions` ([#1293](https://github.com/stellar/js-stellar-sdk/pull/1293)). ### Fixed * `Api.RawEventResponse.topics` is now optional to reflect topicless events ([#1292](https://github.com/stellar/js-stellar-sdk/pull/1292)). * `parseRawEvents` correctly checks if `Api.RawEventResponse.topics` is undefined ([#1292](https://github.com/stellar/js-stellar-sdk/pull/1292)). * Remove `WebAssembly` usage in favor of manual wasm parsing ([#1300](https://github.com/stellar/js-stellar-sdk/pull/1300)). * Fixed URL contamination in `Horizon.Server` methods ([#1296](https://github.com/stellar/js-stellar-sdk/pull/1296)). ## [v14.3.3](https://github.com/stellar/js-stellar-sdk/compare/v14.3.2...v14.3.3) ### Added * `Spec.nativeToScVal` supports parsing Muxed Address([#1274](https://github.com/stellar/js-stellar-sdk/pull/1274)), ## [v14.3.2](https://github.com/stellar/js-stellar-sdk/compare/v14.3.1...v14.3.2) ### Added * `AssembledTransaction.sign()` throws an error if `publicKey` was not provided when instantiated ([#1269](https://github.com/stellar/js-stellar-sdk/pull/1269)). ## [v14.3.1](https://github.com/stellar/js-stellar-sdk/compare/v14.3.0...v14.3.1) ### Added * Added optional `server: rpc.Server` field to `ClientOption` for HttpClient reuse. ([#1234](https://github.com/stellar/js-stellar-sdk/pull/1234)). ### Fixed * Replaced global `HttpClient` with per-instance clients in `horizon.Server` and `rpc.Server` to prevent cross-instance header contamination ([#1234](https://github.com/stellar/js-stellar-sdk/pull/1234)). ## [v14.3.0](https://github.com/stellar/js-stellar-sdk/compare/v14.2.0...v14.3.0) ### Added * `Spec.scValToNative` now supports parsing `Option`s ([#1228](https://github.com/stellar/js-stellar-sdk/pull/1228)). * Added `getLedgers` method to `rpc.Server` for retreiving ledger data. ([#1231](https://github.com/stellar/js-stellar-sdk/pull/1231)). ### Fixed * `Spec.scValToNative` returns `null` for `void`s or `Option`als instead of the ambiguous `undefined` ([#1228](https://github.com/stellar/js-stellar-sdk/pull/1228)). * The `getEvents` API now requires either a start and end ledger or a cursor to be provided ([#1231](https://github.com/stellar/js-stellar-sdk/pull/1231)). ### Deprecated * `GetEventsRequest` interface moved from `server.ts` to `api.ts` ([#1231](https://github.com/stellar/js-stellar-sdk/pull/1231)). ## [v14.2.0](https://github.com/stellar/js-stellar-sdk/compare/v14.1.1...v14.2.0) ### Added * `rpc.Server` now includes `getAccountEntry`, `getTrustlineEntry`, and `getClaimableBalance` methods to facilitate retrieving those entries without manually constructing the ledger keys ([#1218](https://github.com/stellar/js-stellar-sdk/pull/1218), [#1221](https://github.com/stellar/js-stellar-sdk/pull/1221)). ### Fixed * The `getTransactions` API no longer requires `startLedger` when providing `cursor` because they are mutually exclusive ([#1192](https://github.com/stellar/js-stellar-sdk/pull/1192)). * Updated `@stellar/stellar-base` to latest patch (see its [release notes](https://github.com/stellar/js-stellar-base/releases/tag/v14.0.1), [#1221](https://github.com/stellar/js-stellar-sdk/pull/1221)). ## [v14.1.1](https://github.com/stellar/js-stellar-sdk/compare/v14.1.0...v14.1.1) ### Fixed * Added missing `transactionIndex` and `operationIndex` to `getEvents` return schema ([#1206](https://github.com/stellar/js-stellar-sdk/pull/1206)). * Remove previously-deprecated and now-removed `pagingToken` from `getEvents` (use `id` instead or the top-level `cursor`, depending on pagination needs) ([#1207](https://github.com/stellar/js-stellar-sdk/pull/1207)). ## [v14.1.0](https://github.com/stellar/js-stellar-sdk/compare/v14.0.0...v14.1.0) ### Added * Add support to `new contract.Spec(...)` for constructing from a stream of `ScSpecEntry` XDR entries (base64, or binary) ([#1198](https://github.com/stellar/js-stellar-sdk/pull/1198)). * Add `contract.Spec.fromWasm(wasmFile)` for extracting contract spec from contract Wasm files. ([#1198](https://github.com/stellar/js-stellar-sdk/pull/1198)). ## [v14.0.0](https://github.com/stellar/js-stellar-sdk/compare/v13.1.0...v14.0.0) ### Breaking Changes * **This package requires Node 20.** * XDR has been upgraded to support **Protocol 23**, please refer to the [`@stellar/stellar-base`](https://github.com/stellar/js-stellar-base/releases/tag/v14.0.0-rc.1) release notes for details and other breaking changes. * Removes the defunct `destination_muxed_id_type` field for Horizon balance changes ([#1187](https://github.com/stellar/js-stellar-sdk/pull/1187)). ### Added * The Horizon API's `BalanceChange` object for operations now optionally has details about muxed information if the invocation involved a muxed destination address: ```typescript export type MuxedIdType = "uint64" | "string" | "bytes"; export interface BalanceChange { // ... destination_muxed_id_type?: MuxedIdType; destination_muxed_id?: string; } ``` * The RPC server's `getTransaction` and `getTransactions` responses now include a top-level `events` object containing a disjoint breakdown of the events: ```typescript export interface TransactionEvents { transactionEventsXdr: xdr.TransactionEvent[]; contractEventsXdr: xdr.ContractEvent[][]; } ``` * The RPC server's `getEvents` now includes retention state information: ```typescript export interface GetEventsResponse { // ... oldestLedger: number; latestLedgerCloseTime: string; oldestLedgerCloseTime: string; } ``` * The RPC server's `simulateTransaction` method now includes an optional `authMode` parameter to specify the type of authorization to simulate: ```typescript export type SimulationAuthMode = "enforce" | "record" | "record_allow_nonroot"; ``` * `AssembledTransaction#signAndSend` now takes a `watcher` argument ([#1174](https://github.com/stellar/js-stellar-sdk/pull/1174)). This `watcher` is an abstract class with two optional methods: - `onSubmitted`: called with the return value from the `sendTransaction` call that submits the transaction to the network for processing - `onProgress`: called with each return value of `getTransaction` that checks on the ongoing status of the transaction For example, a `watcher` like this: ```typescript await tx.signAndSend({ watcher: { onSubmitted: ({ status, hash, latestLedger }) => { console.log({ status, hash, latestLedger }); }, onProgress: ({ status, txHash, latestLedger }) => { console.log({ status, txHash, latestLedger }); } }}); ``` ...will result in output like: ``` { status: 'PENDING', hash: '8239a5c6a3248966291a202bab2ba393dabc872947b5ee4224921b071850b021', latestLedger: 25076 } { status: 'NOT_FOUND', txHash: '8239a5c6a3248966291a202bab2ba393dabc872947b5ee4224921b071850b021', latestLedger: 25076 } { status: 'SUCCESS', txHash: '8239a5c6a3248966291a202bab2ba393dabc872947b5ee4224921b071850b021', latestLedger: 25077 } ``` ### Fixed * Fixed type for Horizon streaming endpoints, namely `EventSourceOptions.onmessage` now extends `CollectionPage` ([#1100](https://github.com/stellar/js-stellar-sdk/pull/1100)). * Fix the issue of transaction submission failure in a no axios environment ([#1176](https://github.com/stellar/js-stellar-sdk/pull/1176)). ## [v14.0.0-rc.3](https://github.com/stellar/js-stellar-sdk/compare/v13.1.0...v14.0.0-rc.3) ### Fixed * Fixes a bug in `Rpc.Server.getTransaction` where either `transactionEventsXdr` and/or `contractEventsXdr` may not be present in the new `events` field. ## [v14.0.0-rc.2](https://github.com/stellar/js-stellar-sdk/compare/v13.1.0...v14.0.0-rc.2) ### Breaking Changes * The RPC server's `getTransaction` and `getTransactions` responses have dropped the `events.diagnosticEventsXdr` field ([#1183](https://github.com/stellar/js-stellar-sdk/pull/1183)): ```diff export interface TransactionEvents { - diagnosticEventsXdr: xdr.DiagnosticEvent[]; transactionEventsXdr: xdr.TransactionEvent[]; } ``` ### Fixed * Fixed type for Horizon streaming endpoints, namely `EventSourceOptions.onmessage` now extends `CollectionPage` ([#1100](https://github.com/stellar/js-stellar-sdk/pull/1100)). ## [v14.0.0-rc.1](https://github.com/stellar/js-stellar-sdk/compare/v13.1.0...v14.0.0-rc.1) ### Breaking Changes * **This package requires Node 20.** * XDR has been upgraded to support **Protocol 23**, please refer to the [`@stellar/stellar-base`](https://github.com/stellar/js-stellar-base/releases/tag/v14.0.0-rc.1) release notes for details and other breaking changes. * **Deprecated**: `getTransaction` and `getTransactions` top-level `diagnosticEventsXdr` field. ### Added * The Horizon API's `BalanceChange` object for operations now optionally has details about muxed information if the invocation involved a muxed destination address: ```typescript export type MuxedIdType = "uint64" | "string" | "bytes"; export interface BalanceChange { // ... destination_muxed_id_type?: MuxedIdType; destination_muxed_id?: string; } ``` * The RPC server's `getTransaction` and `getTransactions` responses now include a top-level `events` object containing a disjoint breakdown of the events: ```typescript export interface TransactionEvents { diagnosticEventsXdr: xdr.DiagnosticEvent[]; transactionEventsXdr: xdr.TransactionEvent[]; contractEventsXdr: xdr.ContractEvent[][]; } ``` * The RPC server's `getEvents` now includes retention state information: ```typescript export interface GetEventsResponse { // ... oldestLedger: number; latestLedgerCloseTime: string; oldestLedgerCloseTime: string; } ``` * The RPC server's `simulateTransaction` method now includes an optional `authMode` parameter to specify the type of authorization to simulate: ```typescript export type SimulationAuthMode = "enforce" | "record" | "record_allow_nonroot"; ``` * `AssembledTransaction#signAndSend` now takes a `watcher` argument ([#1174](https://github.com/stellar/js-stellar-sdk/pull/1174)). This `watcher` is an abstract class with two optional methods: - `onSubmitted`: called with the return value from the `sendTransaction` call that submits the transaction to the network for processing - `onProgress`: called with each return value of `getTransaction` that checks on the ongoing status of the transaction For example, a `watcher` like this: ```ts await tx.signAndSend({ watcher: { onSubmitted: ({ status, hash, latestLedger }) => { console.log({ status, hash, latestLedger }); }, onProgress: ({ status, txHash, latestLedger }) => { console.log({ status, txHash, latestLedger }); } }}); ``` ...will result in output like: ``` { status: 'PENDING', hash: '8239a5c6a3248966291a202bab2ba393dabc872947b5ee4224921b071850b021', latestLedger: 25076 } { status: 'NOT_FOUND', txHash: '8239a5c6a3248966291a202bab2ba393dabc872947b5ee4224921b071850b021', latestLedger: 25076 } { status: 'SUCCESS', txHash: '8239a5c6a3248966291a202bab2ba393dabc872947b5ee4224921b071850b021', latestLedger: 25077 } ``` ### Fixed * Fix the issue of transaction submission failure in a no axios environment ([#1176](https://github.com/stellar/js-stellar-sdk/pull/1176)). ## [v13.3.0](https://github.com/stellar/js-stellar-sdk/compare/v13.2.0...v13.3.0) ### Added * Add `includeFailed` to `PaymentCallBuilder` for including failed transactions in calls ([#1168](https://github.com/stellar/js-stellar-sdk/pull/1168)). ### Fixed * Ensure that `rpc.Api.GetTransactionsResponse.transactions` is always a valid array ([#1162](https://github.com/stellar/js-stellar-sdk/pull/1162)). ## [v13.2.0](https://github.com/stellar/js-stellar-sdk/compare/v13.1.0...v13.2.0) ### Added * Support passing in an optional `options.address` to the `contract.Client.deploy` method ([#1158](https://github.com/stellar/js-stellar-sdk/pull/1158)). ### Fixed * Extend support for parsing contract specifications in environments that don't have WebAssembly compilers ([#1157](https://github.com/stellar/js-stellar-sdk/pull/1157)). * Upgraded `@stellar/stellar-base` dependency to latest version ([#1159](https://github.com/stellar/js-stellar-sdk/pull/1159)). ## [v13.1.0](https://github.com/stellar/js-stellar-sdk/compare/v13.0.0...v13.1.0) ### Added * Added `Horizon.Server.root` to obtain information from the Horizon root endpoint ([#1122](https://github.com/stellar/js-stellar-sdk/pull/1122/)). ### Fixed * When using a friendbot that points to a Horizon instance that has ledger metadata disabled, you can no longer extract the account sequence from the response. Instead, we hit RPC directly ([#1107](https://github.com/stellar/js-stellar-sdk/pull/1107/)). * `rpc.Server.getEvents()` now correctly returns the `cursor` field at the top-level response ([#1124](https://github.com/stellar/js-stellar-sdk/pull/1124)). ## [v13.0.0](https://github.com/stellar/js-stellar-sdk/compare/v12.3.0...v13.0.0) This is a direct re-tag of rc.2 with the only change being an upgrade to the `stellar-base` library to incorporate a patch release. Nonetheless, the entire changelog from the prior major version here is replicated for a comprehensive view on what's broken, added, and fixed. ### Breaking Changes - We stopped supporting Node 18 explicitly a while ago, but now the Babelification of the codebase will transform to Node 18 instead of 16. #### TypeScript Bindings: the `contract` module. - `contract.AssembledTransaction#signAuthEntries` now takes an `address` instead of a `publicKey`. This brings the API more inline with its actual functionality: It can be used to sign all the auth entries for a particular _address_, whether that is the address of an account (public key) or a contract. ([#1044](https://github.com/stellar/js-stellar-sdk/pull/1044)). - The `ClientOptions.signTransaction` type has been updated to reflect the latest [SEP-43](https://stellar.org/protocol/sep-43#wallet-interface-format) protocol, which matches the latest major version of Freighter and other wallets. It now accepts `address`, `submit`, and `submitUrl` options, and it returns a promise containing the `signedTxXdr` and the `signerAddress`. It now also returns an `Error` type if an error occurs during signing. * `basicNodeSigner` has been updated to reflect this new type. - `ClientOptions.signAuthEntry` type has been updated to reflect the [SEP-43](https://stellar.org/protocol/sep-43#wallet-interface-format) protocol, which returns a promise containing the `signerAddress` in addition to the `signAuthEntry` that was returned previously. It also can return an `Error` type. - `SentTransaction.init` and `new SentTransaction` now take _one_ (1) argument instead of _two_ (2). The first argument had previously been deprecated and ignored. To update: ```diff -SentTransaction(nonsense, realStuff) +SentTransaction(realStuff) -new SentTransaction(nonsense, realStuff) +new SentTransaction(realStuff) ``` #### Server APIs: the `rpc` and `Horizon` modules. - Deprecated RPC APIs have been removed ([#1084](https://github.com/stellar/js-stellar-sdk/pull/1084)): * `simulateTransaction`'s `cost` field is removed * `rpc.Server.getEvents`'s `pagingToken` field is deprecated, use `cursor` instead - Deprecated Horizon APIs have been removed (deprecated since [v10.0.1](https://github.com/stellar/js-stellar-sdk/releases/tag/v10.0.1), []()): * removed fields `transaction_count`, `base_fee`, and `base_reserve` * removed fields `num_accounts` and `amount` from assets - The `SorobanRpc` import, previously deprecated, has been removed. You can import `rpc` instead: ```diff -import { SorobanRpc } from '@stellar/stellar-sdk' +import { rpc } from '@stellar/stellar-sdk' // alternatively, you can also import from the `rpc` entrypoint: import { Server } from '@stellar/stellar-sdk/rpc' ``` ### Added #### TypeScript Bindings: the `contract` module. * `contract.Client` now has a static `deploy` method that can be used to deploy a contract instance from an existing uploaded/"installed" Wasm hash. The first arguments to this method are the arguments for the contract's `__constructor` method in accordance with [CAP-42](https://stellar.org/protocol/cap-42) ([#1086](https://github.com/stellar/js-stellar-sdk/pull/1086/)). For example, using the `increment` test contract as modified in https://github.com/stellar/soroban-test-examples/pull/2/files#diff-8734809100be3803c3ce38064730b4578074d7c2dc5fb7c05ca802b2248b18afR10-R45: ```typescript const tx = await contract.Client.deploy( { counter: 42 }, { networkPassphrase, rpcUrl, wasmHash: uploadedWasmHash, publicKey: someKeypair.publicKey(), ...basicNodeSigner(someKeypair, networkPassphrase), }, ); const { result: client } = await tx.signAndSend(); const t = await client.get(); expect(t.result, 42); ``` * `contract.AssembledTransaction#signAuthEntries` now allows you to override `authorizeEntry`. This can be used to streamline novel workflows using cross-contract auth. ([#1044](https://github.com/stellar/js-stellar-sdk/pull/1044)). #### Server modules: the `rpc`, `Horizon`, and `stellartoml` modules. * `Horizon.ServerApi` now has an `EffectType` exported so that you can compare and infer effect types directly ([#1099](https://github.com/stellar/js-stellar-sdk/pull/1099)). * `Horizon.ServerApi.Trade` type now has a `type_i` field for type inference ([#1099](https://github.com/stellar/js-stellar-sdk/pull/1099)). * All effects now expose their type as an exact string ([#947](https://github.com/stellar/js-stellar-sdk/pull/947)). * `stellartoml.Resolver.resolve` now has a `allowedRedirects` option to configure the number of allowed redirects to follow when resolving a stellar toml file. * `rpc.Server.getEvents` now returns a `cursor` field that matches `pagingToken` and `id` * `rpc.Server.getTransactions` now returns a `txHash` field * `rpc.Server` has two new methods: - `pollTransaction` to retry transaction retrieval ([#1092]https://github.com/stellar/js-stellar-sdk/pull/1092), and - `getSACBalance` to fetch the balance of a built-in Stellar Asset Contract token held by a contract ([#1046](https://github.com/stellar/js-stellar-sdk/pull/1046)), returning this schema: ```typescript export interface BalanceResponse { latestLedger: number; /** present only on success, otherwise request malformed or no balance */ balanceEntry?: { /** a 64-bit integer */ amount: string; authorized: boolean; clawback: boolean; lastModifiedLedgerSeq?: number; liveUntilLedgerSeq?: number; }; } ``` #### New bundles without dependencies - You can now build the browser bundle without various dependencies: * Set `USE_AXIOS=false` to build without the `axios` dependency: this will build `stellar-sdk-no-axios.js` and `stellar-sdk-no-axios.min.js` in the `dist/` directory, or just run `yarn build:browser:no-axios` to generate these files. * You can import Node packages without the `axios` dependency via `@stellar/stellar-sdk/no-axios`. For Node environments that don't support modern imports, use `@stellar/stellar-sdk/lib/no-axios/index`. * Set `USE_EVENTSOURCE=false` to build without the `eventsource` dependency: this will build `stellar-sdk-no-eventsource.js` and `stellar-sdk-no-eventsource.min.js` in the `dist/` directory, or just run `yarn build:browser:no-eventsource` to generate these files. * You can import Node packages without the `eventsource` dependency via `@stellar/stellar-sdk/no-eventsource`. For Node.js environments that don't support modern imports, use `@stellar/stellar-sdk/lib/no-eventsource/index`. * To use a minimal build without both Axios and EventSource, use `stellar-sdk-minimal.js` for the browser build and import from `@stellar/stellar-sdk/minimal` for the Node package. ### Fixed - `contract.AssembledTransaction#nonInvokerSigningBy` now correctly returns contract addresses, in instances of cross-contract auth, rather than throwing an error. `sign` will ignore these contract addresses, since auth happens via cross-contract call ([#1044](https://github.com/stellar/js-stellar-sdk/pull/1044)). - `buildInvocationTree` now correctly handles V2 contract creation and displays constructor args ([js-stellar-base#785](https://github.com/stellar/js-stellar-base/pull/785)). ## [v13.0.0-rc.2](https://github.com/stellar/js-stellar-sdk/compare/v13.0.0-rc.1...v13.0.0-rc.2) ### Breaking Changes - The `ClientOptions.signTransaction` type has been updated to reflect the latest [SEP-43](https://stellar.org/protocol/sep-43#wallet-interface-format) protocol, which matches the latest major version of Freighter and other wallets. It now accepts `address`, `submit`, and `submitUrl` options, and it returns a promise containing the `signedTxXdr` and the `signerAddress`. It now also returns an `Error` type if an error occurs during signing. * `basicNodeSigner` has been updated to reflect the new type. - `ClientOptions.signAuthEntry` type has also been updated to reflect the [SEP-43](https://stellar.org/protocol/sep-43#wallet-interface-format) protocol, which also returns a promise containing the `signerAddress` in addition to the `signAuthEntry` that was returned previously. It also can return an `Error` type. ### Added * `contract.Client` now has a static `deploy` method that can be used to deploy a contract instance from an existing uploaded/"installed" Wasm hash. The first arguments to this method are the arguments for the contract's `__constructor` method in accordance with CAP-42 ([#1086](https://github.com/stellar/js-stellar-sdk/pull/1086/)). For example, using the `increment` test contract as modified in https://github.com/stellar/soroban-test-examples/pull/2/files#diff-8734809100be3803c3ce38064730b4578074d7c2dc5fb7c05ca802b2248b18afR10-R45: ```typescript const tx = await contract.Client.deploy( { counter: 42 }, { networkPassphrase, rpcUrl, wasmHash: uploadedWasmHash, publicKey: someKeypair.publicKey(), ...basicNodeSigner(someKeypair, networkPassphrase), }, ); const { result: client } = await tx.signAndSend(); const t = await client.get(); expect(t.result, 42); ``` * `Horizon.ServerApi` now has an `EffectType` exported so that you can compare and infer effect types directly ([#1099](https://github.com/stellar/js-stellar-sdk/pull/1099)). * `Horizon.ServerApi.Trade` type now has a `type_i` field for type inference. * All effects now expose their type as an exact string ([#947](https://github.com/stellar/js-stellar-sdk/pull/947)). * `stellartoml-Resolver.resolve` now has a `allowedRedirects` option to configure the number of allowed redirects to follow when resolving a stellar toml file. ## [v13.0.0-rc.1](https://github.com/stellar/js-stellar-sdk/compare/v13.0.0-beta.1...v13.0.0-rc.1) ### Breaking Changes - Deprecated RPC APIs have been removed ([#1084](https://github.com/stellar/js-stellar-sdk/pull/1084)): * `simulateTransaction`'s `cost` field is removed * `getEvents` returns a `cursor` field that matches `pagingToken` and `id` * `getTransactions` returns a `txHash` field - Horizon Server API types: removed fields `transaction_count`, `base_fee`, and `base_reserve` (deprecated since [v10.0.1](https://github.com/stellar/js-stellar-sdk/releases/tag/v10.0.1)) - `SentTransaction.init` and `new SentTransaction` now take _one_ (1) argument instead of _two_ (2). The first argument had previously been deprecated and ignored. To update: ```diff -SentTransaction(nonsense, realStuff) +SentTransaction(realStuff) -new SentTransaction(nonsense, realStuff) +new SentTransaction(realStuff) ``` - `SorobanRpc` import, previously deprecated, has been removed. You can import `rpc` instead: ```diff -import { SorobanRpc } from '@stellar/stellar-sdk' +import { rpc } from '@stellar/stellar-sdk' ``` As an alternative, you can also import from the `rpc` entrypoint: ```ts import { Server } from '@stellar/stellar-sdk/rpc' ``` ### Added - `rpc.Server` now has a `pollTransaction` method to retry transaction retrieval ([#1092]https://github.com/stellar/js-stellar-sdk/pull/1092). ## [v13.0.0-beta.1](https://github.com/stellar/js-stellar-sdk/compare/v12.3.0...v13.0.0-beta.1) ### Breaking Changes - `contract.AssembledTransaction#signAuthEntries` now takes an `address` instead of a `publicKey`. This brings the API more inline with its actual functionality: It can be used to sign all the auth entries for a particular _address_, whether that is the address of an account (public key) or a contract. ([#1044](https://github.com/stellar/js-stellar-sdk/pull/1044)). - The Node.js code will now Babelify to Node 18 instead of Node 16, but we stopped supporting Node 16 long ago so this shouldn't be a breaking change. ### Added - You can now build the browser bundle without various dependencies: * Set `USE_AXIOS=false` to build without the `axios` dependency: this will build `stellar-sdk-no-axios.js` and `stellar-sdk-no-axios.min.js` in the `dist/` directory, or just run `yarn build:browser:no-axios` to generate these files. * You can import Node packages without the `axios` dependency via `@stellar/stellar-sdk/no-axios`. For Node environments that don't support modern imports, use `@stellar/stellar-sdk/lib/no-axios/index`. * Set `USE_EVENTSOURCE=false` to build without the `eventsource` dependency: this will build `stellar-sdk-no-eventsource.js` and `stellar-sdk-no-eventsource.min.js` in the `dist/` directory, or just run `yarn build:browser:no-eventsource` to generate these files. * You can import Node packages without the `eventsource` dependency via `@stellar/stellar-sdk/no-eventsource`. For Node.js environments that don't support modern imports, use `@stellar/stellar-sdk/lib/no-eventsource/index`. * To use a minimal build without both Axios and EventSource, use `stellar-sdk-minimal.js` for the browser build and import from `@stellar/stellar-sdk/minimal` for the Node package. - `contract.AssembledTransaction#signAuthEntries` now allows you to override `authorizeEntry`. This can be used to streamline novel workflows using cross-contract auth. (#1044) - `rpc.Server` now has a `getSACBalance` helper which lets you fetch the balance of a built-in Stellar Asset Contract token held by a contract ([#1046](https://github.com/stellar/js-stellar-sdk/pull/1046)): ```typescript export interface BalanceResponse { latestLedger: number; /** present only on success, otherwise request malformed or no balance */ balanceEntry?: { /** a 64-bit integer */ amount: string; authorized: boolean; clawback: boolean; lastModifiedLedgerSeq?: number; liveUntilLedgerSeq?: number; }; } ``` ### Fixed - `contract.AssembledTransaction#nonInvokerSigningBy` now correctly returns contract addresses, in instances of cross-contract auth, rather than throwing an error. `sign` will ignore these contract addresses, since auth happens via cross-contract call ([#1044](https://github.com/stellar/js-stellar-sdk/pull/1044)). ## [v12.3.0](https://github.com/stellar/js-stellar-sdk/compare/v12.2.0...v12.3.0) ### Added - `rpc.Server` now has a `getTransactions`, which has the same response schema as `getTransactions` except with bundles of transactions ([#1037](https://github.com/stellar/js-stellar-sdk/pull/1037)). - `rpc.Server` now has a `getVersionInfo` method which reports version information of the RPC instance it is connected to ([#1028](https://github.com/stellar/js-stellar-sdk/issues/1028)): ```typescript export interface GetVersionInfoResponse { version: string; commit_hash: string; build_time_stamp: string; captive_core_version: string; protocol_version: number; } ``` ### Fixed - Lower authorization entry's default signature expiration to ~8min for security reasons ([#1023](https://github.com/stellar/js-stellar-sdk/pull/1023)). - Remove `statusText` error check to broaden compatibility ([#1001](https://github.com/stellar/js-stellar-sdk/pull/1001)). - Upgraded `stellar-base` which includes various fixes ([release notes](https://github.com/stellar/js-stellar-base/releases/tag/v12.1.1), [#1045](https://github.com/stellar/js-stellar-sdk/pull/1045)). ## [v12.2.0](https://github.com/stellar/js-stellar-sdk/compare/v12.1.0...v12.2.0) ### Fixed - `@stellar/stellar-base` and its underlying dependency `@stellar/js-xdr` have been upgraded to their latest versions; reference their release notes ([v12.1.0](https://github.com/stellar/js-stellar-base/releases/tag/v12.1.0) and [v3.1.2](https://github.com/stellar/js-xdr/releases/tag/v3.1.2), respectively) for details ([#1013](https://github.com/stellar/js-stellar-sdk/pull/1013)). ### Added - You can now pass custom headers to both `rpc.Server` and `Horizon.Server` ([#1013](https://github.com/stellar/js-stellar-sdk/pull/1013)): ```typescript import { Server } from "@stellar/stellar-sdk/rpc"; const s = new Server("", { headers: { "X-Custom-Header": "hello" }}) ``` - `Horizon.Server` now supports the new `POST /transactions_async` endpoint via the `submitAsyncTransaction` method ([#989](https://github.com/stellar/js-stellar-sdk/pull/989)). Its purpose is to provide an immediate response to the submission rather than waiting for Horizon to determine its status. The response schema is as follows: ```typescript interface SubmitAsyncTransactionResponse { // the submitted transaction hash hash: string; // one of "PENDING", "DUPLICATE", "TRY_AGAIN_LATER", or "ERROR" tx_status: string; // a base64-encoded xdr.TransactionResult iff `tx_status` is "ERROR" error_result_xdr: string; } ``` - `rpc.Server` now has a `getFeeStats` method which retrieves fee statistics for a previous chunk of ledgers to provide users with a way to provide informed decisions about getting their transactions included in the following ledgers ([#998](https://github.com/stellar/js-stellar-sdk/issues/998)): ```typescript export interface GetFeeStatsResponse { sorobanInclusionFee: FeeDistribution; inclusionFee: FeeDistribution; latestLedger: number; // uint32 } interface FeeDistribution { max: string; // uint64 min: string; // uint64 mode: string; // uint64 p10: string; // uint64 p20: string; // uint64 p30: string; // uint64 p40: string; // uint64 p50: string; // uint64 p60: string; // uint64 p70: string; // uint64 p80: string; // uint64 p90: string; // uint64 p95: string; // uint64 p99: string; // uint64 transactionCount: string; // uint32 ledgerCount: number; // uint32 } ``` ## [v12.1.0](https://github.com/stellar/js-stellar-sdk/compare/v12.0.1...v12.1.0) ### Added - `contract` now exports the `DEFAULT_TIMEOUT` ([#984](https://github.com/stellar/js-stellar-sdk/pull/984)). - `contract.AssembledTransaction` now has: - `toXDR` and `fromXDR` methods for serializing the transaction to and from XDR. These methods should be used in place of `AssembledTransaction.toJSON` and `AssembledTransaction.fromJSON`for multi-auth signing. The JSON methods are now deprecated. **Note:** you must now call `simulate` on the transaction before the final `signAndSend` call after all required signatures are gathered when using the XDR methods ([#977](https://github.com/stellar/js-stellar-sdk/pull/977)). - a `restoreFootprint` method which accepts the `restorePreamble` returned when a simulation call fails due to some contract state that has expired. When invoking a contract function, one can now set `restore` to `true` in the `MethodOptions`. When enabled, a `restoreFootprint` transaction will be created and await signing when required ([#991](https://github.com/stellar/js-stellar-sdk/pull/991)). - separate `sign` and `send` methods so that you can sign a transaction without sending it (`signAndSend` still works as before; [#922](https://github.com/stellar/js-stellar-sdk/pull/992)). - `contract.Client` now has a `txFromXDR` method which should be used in place of `txFromJSON` for multi-auth signing ([#977](https://github.com/stellar/js-stellar-sdk/pull/977)). ### Deprecated - In `contract.AssembledTransaction`, `toJSON` and `fromJSON` should be replaced with `toXDR` and `fromXDR`. - In `contract.Client`, `txFromJSON` should be replaced with `txFromXDR`. ### Fixed - If you edit an `AssembledTransaction` with `tx.raw = cloneFrom(tx.build)`, the `tx.simulationData` will now be updated correctly ([#985](https://github.com/stellar/js-stellar-sdk/pull/985)). ## [v12.0.1](https://github.com/stellar/js-stellar-sdk/compare/v11.3.0...v12.0.1) - This is a re-tag of `v12.0.0-rc.3` with dependency updates and a single new feature. ### Added - `rpc.server.simulateTransaction` now supports an optional `stateChanges?: LedgerEntryChange[]` field ([#963](https://github.com/stellar/js-stellar-sdk/pull/963)): * If `Before` is omitted, it constitutes a creation, if `After` is omitted, it constitutes a deletions, note that `Before` and `After` cannot be omitted at the same time. Each item follows this schema: ```typescript interface LedgerEntryChange { type: number; key: xdr.LedgerKey; before: xdr.LedgerEntry | null; after: xdr.LedgerEntry | null; } ``` ## [v12.0.0-rc.3](https://github.com/stellar/js-stellar-sdk/compare/v11.3.0...v12.0.0-rc.3) ### Breaking Changes - `ContractClient` functionality previously added in [v11.3.0](https://github.com/stellar/js-stellar-sdk/releases/tag/v11.3.0) was exported in a non-standard way. You can now import it as any other `stellar-sdk` module ([#962](https://github.com/stellar/js-stellar-sdk/pull/962)): ```diff -import { ContractClient } from '@stellar/stellar-sdk/lib/contract_client' +import { contract } from '@stellar/stellar-sdk' +const { Client } = contract ``` Note that this top-level `contract` export is a container for ContractClient and related functionality. The `ContractClient` class is now available at `contract.Client`, as shown. Further note that there is a capitalized `Contract` export as well, which comes [from stellar-base](https://github.com/stellar/js-stellar-base/blob/b96281b9b3f94af23a913f93bdb62477f5434ccc/src/contract.js#L6-L19). You can remember which is which because capital-C `Contract` is a class, whereas lowercase-c `contract` is a container/module with a bunch of classes, functions, and types. Additionally, this is available from the `/contract` entrypoint, if your version of Node [and TypeScript](https://stackoverflow.com/a/70020984/249801) support [the `exports` declaration](https://nodejs.org/api/packages.html#exports). Finally, some of its exports have been renamed: ```diff import { - ContractClient, + Client, AssembledTransaction, - ContractClientOptions, + ClientOptions, SentTransaction, -} from '@stellar/stellar-sdk/lib/contract_client' +} from '@stellar/stellar-sdk/contract' ``` - The `ContractSpec` class is now nested under the `contract` module, and has been **renamed** to `Spec` ([#962](https://github.com/stellar/js-stellar-sdk/pull/962)). Alternatively, you can import this from the `contract` entrypoint, if your version of Node [and TypeScript](https://stackoverflow.com/a/70020984/249801) support [the `exports` declaration](https://nodejs.org/api/packages.html#exports): ```diff -import { ContractSpec } from '@stellar/stellar-sdk' +import { contract } from '@stellar/stellar-sdk' +const { Spec } = contract // OR +import { Spec } from '@stellar/stellar-sdk/contract' ``` - Previously, `AssembledTransaction.signAndSend()` would return a `SentTransaction` even if the transaction was never finalized. That is, if it successfully sent the transaction to the network, but the transaction was still `status: 'PENDING'`, then it would `console.error` an error message, but return the indeterminate transaction anyhow. **It now throws** a `SentTransaction.Errors.TransactionStillPending` error with that error message instead ([#962](https://github.com/stellar/js-stellar-sdk/pull/962)). ### Deprecated - `SorobanRpc` module is now also exported as `rpc` ([#962](https://github.com/stellar/js-stellar-sdk/pull/962)). You can import it with either name for now, but `SorobanRpc` will be removed in a future release: ```diff -import { SorobanRpc } from '@stellar/stellar-sdk' +import { rpc } from '@stellar/stellar-sdk' ``` You can also now import it at the `/rpc` entrypoint, if your version of Node [and TypeScript](https://stackoverflow.com/a/70020984/249801) support [the `exports` declaration](https://nodejs.org/api/packages.html#exports). ```diff -import { SorobanRpc } from '@stellar/stellar-sdk' -const { Api } = SorobanRpc +import { Api } from '@stellar/stellar-sdk/rpc' ``` ### Added * New methods on `contract.Client` ([#960](https://github.com/stellar/js-stellar-sdk/pull/960)): - `from(opts: ContractClientOptions)` instantiates `contract.Client` by fetching the `contractId`'s WASM from the network to fill out the client's `ContractSpec`. - `fromWasm` and `fromWasmHash` methods to instantiate a `contract.Client` when you already have the WASM bytes or hash alongside the `contract.ClientOptions`. * New methods on `rpc.Server` ([#960](https://github.com/stellar/js-stellar-sdk/pull/960)): - `getContractWasmByContractId` and `getContractWasmByHash` to retrieve a contract's WASM bytecode via its `contractId` or `wasmHash`, respectively. ### Fixed * The breaking changes above (strictly speaking, they are not breaking changes because importing from the inner guts of the SDK is not supported) enable the `contract` module to be used in non-Node environments. ## [v12.0.0-rc.2](https://github.com/stellar/js-stellar-sdk/compare/v11.3.0...v12.0.0-rc.2) **This update supports Protocol 21**. It is an additive change to the protocol so there are no true backwards incompatibilities, but your software may break if you encounter new unexpected fields from this Protocol ([#949](https://github.com/stellar/js-stellar-sdk/pull/949)). ### Breaking Changes * The **default timeout for transaction calls is now set to 300 seconds (5 minutes)** from the previous default of 10 seconds. 10 seconds is often not enough time to review transactions before signing, especially in Freighter or using a hardware wallet like a Ledger, which would cause a `txTooLate` error response from the server. Five minutes is also the value used by the CLI, so this brings the two into alignment ([#956](https://github.com/stellar/js-stellar-sdk/pull/956)). ### Fixed * Dependencies have been properly updated to pull in Protocol 21 XDR ([#959](https://github.com/stellar/js-stellar-sdk/pull/959)). ## [v12.0.0-rc.1](https://github.com/stellar/js-stellar-sdk/compare/v11.3.0...v12.0.0-rc.1) ### Breaking Changes * **This update supports Protocol 21**. It is an additive change to the protocol so there are no true backwards incompatibilities, but your software may break if you encounter new unexpected fields from this Protocol ([#949](https://github.com/stellar/js-stellar-sdk/pull/949)). ### Fixed * Each item in the `GetEventsResponse.events` list will now have a `txHash` item corresponding to the transaction hash that triggered a particular event ([#939](https://github.com/stellar/js-stellar-sdk/pull/939)). * `ContractClient` now properly handles methods that take no arguments by making `MethodOptions` the only parameter, bringing it inline with the types generated by Soroban CLI's `soroban contract bindings typescript` ([#940](https://github.com/stellar/js-stellar-sdk/pull/940)). * `ContractClient` now allows `publicKey` to be undefined ([#941](https://github.com/stellar/js-stellar-sdk/pull/941)). * `SentTransaction` will only pass `allowHttp` if (and only if) its corresponding `AssembledTransaction#options` config allowed it ([#952](https://github.com/stellar/js-stellar-sdk/pull/952)). * `SentTransaction` will now modify the time bounds of the transaction to be `timeoutInSeconds` seconds after the transaction has been simulated. Previously this was set when the transaction is built, before the simulation. This makes the time bounds line up with the timeout retry logic in `SentTransaction`. ## [v11.3.0](https://github.com/stellar/js-stellar-sdk/compare/v11.2.2...v11.3.0) ### Added * Introduces an entire suite of helpers to assist with interacting with smart contracts ([#929](https://github.com/stellar/js-stellar-sdk/pull/929)): - `ContractClient`: generate a class from the contract specification where each Rust contract method gets a matching method in this class. Each method returns an `AssembledTransaction` that can be used to modify, simulate, decode results, and possibly sign, & submit the transaction. - `AssembledTransaction`: used to wrap a transaction-under-construction and provide high-level interfaces to the most common workflows, while still providing access to low-level transaction manipulation. - `SentTransaction`: transaction sent to the Soroban network, in two steps - initial submission and waiting for it to finalize to get the result (retried with exponential backoff) ### Fixed * Upgrade underlying dependencies, including `@stellar/js-xdr` which should broaden compatibility to pre-ES2016 environments ([#932](https://github.com/stellar/js-stellar-sdk/pull/932), [#930](https://github.com/stellar/js-stellar-sdk/pull/930)). ### Fixed * `SorobanRpc`: remove all instances of array-based parsing to conform to future breaking changes in Soroban RPC ([#924](https://github.com/stellar/js-stellar-sdk/pull/924)). ## [v11.2.2](https://github.com/stellar/js-stellar-sdk/compare/v11.2.1...v11.2.2) ### Fixed * Event streaming tests now pass on Node 20, which seems to have tighter conformance to the spec ([#917](https://github.com/stellar/js-stellar-sdk/pull/917)). * `@stellar/stellar-base` has been upgraded to its latest major version ([#918](https://github.com/stellar/js-stellar-sdk/pull/918), see [v11.0.0](https://github.com/stellar/js-stellar-base/releases/tag/v11.0.0) for release notes). ## [v11.2.1](https://github.com/stellar/js-stellar-sdk/compare/v11.2.0...v11.2.1) ### Fixed * An unnecessary dependency has been removed which was causing a TypeScript error in certain environments ([#912](https://github.com/stellar/js-stellar-sdk/pull/912)). * Dependencies have been upgraded (see [`stellar-base@v10.0.2`](https://github.com/stellar/js-stellar-base/releases/tag/v10.0.2) for release notes, [#913](https://github.com/stellar/js-stellar-sdk/pull/913)). ## [v11.2.0](https://github.com/stellar/js-stellar-sdk/compare/v11.1.0...v11.2.0) ### Added * Support for the new, optional `diagnosticEventsXdr` field on the `SorobanRpc.Server.sendTransaction` method. The raw field will be present when using the `_sendTransaction` method, while the normal method will have an already-parsed `diagnosticEvents: xdr.DiagnosticEvent[]` field, instead ([#905](https://github.com/stellar/js-stellar-sdk/pull/905)). * A new exported interface `SorobanRpc.Api.EventResponse` so that developers can type-check individual events ([#904](https://github.com/stellar/js-stellar-sdk/pull/904)). ### Updated * Dependencies have been updated to their latest versions ([#906](https://github.com/stellar/js-stellar-sdk/pull/906), [#908](https://github.com/stellar/js-stellar-sdk/pull/908)). ## [v11.1.0](https://github.com/stellar/js-stellar-sdk/compare/v11.0.1...v11.1.0) ### Added * `SorobanRpc.Server.simulateTransaction` now supports an optional `addlResources` parameter to allow users to specify additional resources that they want to include in a simulation ([#896](https://github.com/stellar/js-stellar-sdk/pull/896)). * `ContractSpec` now has a `jsonSchema()` method to generate a [JSON Schema](https://json-schema.org/) for a particular contract specification ([#889](https://github.com/stellar/js-stellar-sdk/pull/889)). ### Fixed * All dependencies have been updated to their latest versions, including `stellar-base` to [v10.0.1](https://github.com/stellar/js-stellar-base/releases/tag/v10.0.1) which included a small patch ([#897](https://github.com/stellar/js-stellar-sdk/pull/897)). ## [v11.0.1](https://github.com/stellar/js-stellar-sdk/compare/v10.2.1...v11.0.0) ### Fixed * `SorobanRpc.Server.getEvents` uses the correct type for the start ledger. ## [v11.0.0](https://github.com/stellar/js-stellar-sdk/compare/v10.2.1...v11.0.0) ### Breaking Changes * The package has been renamed to `@stellar/stellar-sdk`. * The new minimum supported version is Node 18. * The `PaymentCallBuilder` was incorrectly indicating that it would return a collection of `Payment` records, while [in reality](https://developers.stellar.org/api/horizon/resources/list-all-payments) it can return a handful of "payment-like" records ([#885](https://github.com/stellar/js-stellar-sdk/pull/885)). ### Fixed * The `SorobanRpc.Server.getEvents` method now correctly parses responses without a `contractId` field set. The `events[i].contractId` field on an event is now optional, omitted if there was no ID for the event (e.g. system events; ([#883](https://github.com/stellar/js-stellar-sdk/pull/883))). ## [v11.0.0-beta.6](https://github.com/stellar/js-stellar-sdk/compare/v11.0.0-beta.5...v11.0.0-beta.6) ### Fixed * The `stellar-base` library has been upgraded to `beta.4` which contains a bugfix for large sequence numbers ([#877](https://github.com/stellar/js-stellar-sdk/pull/877)). * The `SorobanRpc.Server.getTransaction()` method will now return the full response when encountering a `FAILED` transaction result ([#872](https://github.com/stellar/js-stellar-sdk/pull/872)). * The `SorobanRpc.Server.getEvents()` method will correctly parse the event value (which is an `xdr.ScVal` rather than an `xdr.DiagnosticEvent`, see the modified `SorobanRpc.Api.EventResponse.value`; [#876](https://github.com/stellar/js-stellar-sdk/pull/876)). ## [v11.0.0-beta.5](https://github.com/stellar/js-stellar-sdk/compare/v11.0.0-beta.4...v11.0.0-beta.5) ### Breaking Changes * The `soroban-client` library ([stellar/js-soroban-client](https://github.com/stellar/js-soroban-client)) has been merged into this package, causing significant breaking changes in the module structure ([#860](https://github.com/stellar/js-stellar-sdk/pull/860)): - The namespaces have changed to move each server-dependent component into its own module. Shared components (e.g. `TransactionBuilder`) are still in the top level, Horizon-specific interactions are in the `Horizon` namespace (i.e. `Server` is now `Horizon.Server`), and new Soroban RPC interactions are in the `SorobanRpc` namespace. - There is a [detailed migration guide](https://gist.github.com/Shaptic/5ce4f16d9cce7118f391fbde398c2f30) available to outline both the literal (i.e. necessary code changes) and philosophical (i.e. how to find certain functionality) changes needed to adapt to this merge. * The `SorobanRpc.Server.prepareTransaction` and `SorobanRpc.assembleTransaction` methods no longer need an optional `networkPassphrase` parameter, because it is implicitly part of the transaction already ([#870](https://github.com/stellar/js-stellar-sdk/pull/870)). ## [v11.0.0-beta.4](https://github.com/stellar/js-stellar-sdk/compare/v11.0.0-beta.3...v11.0.0-beta.4) ### Fixed - The `stellar-base` dependency has been pinned to a specific version to avoid incorrect semver resolution ([#867](https://github.com/stellar/js-stellar-sdk/pull/867)). ## [v11.0.0-beta.3](https://github.com/stellar/js-stellar-sdk/compare/v11.0.0-beta.2...v11.0.0-beta.3) ### Fixed - Fix a webpack error preventing correct exports of the SDK for browsers ([#862](https://github.com/stellar/js-stellar-sdk/pull/862)). ## [v11.0.0-beta.2](https://github.com/stellar/js-stellar-sdk/compare/v11.0.0-beta.1...v11.0.0-beta.2) ### Breaking Changes - Certain effects have been renamed to align better with the "tense" that other structures have ([#844](https://github.com/stellar/js-stellar-sdk/pull/844)): * `DepositLiquidityEffect` -> `LiquidityPoolDeposited` * `WithdrawLiquidityEffect` -> `LiquidityPoolWithdrew` * `LiquidityPoolTradeEffect` -> `LiquidityPoolTrade` * `LiquidityPoolCreatedEffect` -> `LiquidityPoolCreated` * `LiquidityPoolRevokedEffect` -> `LiquidityPoolRevoked` * `LiquidityPoolRemovedEffect` -> `LiquidityPoolRemoved` ### Add - New effects have been added to support Protocol 20 (Soroban) ([#842](https://github.com/stellar/js-stellar-sdk/pull/842)): * `ContractCredited` occurs when a Stellar asset moves **into** its corresponding Stellar Asset Contract instance * `ContractDebited` occurs when a Stellar asset moves **out of** its corresponding Stellar Asset Contract instance - Asset stat records (`ServerApi.AssetRecord`) contain two new fields to support the Protocol 20 (Soroban) release ([#841](https://github.com/stellar/js-stellar-sdk/pull/841)): * `num_contracts` - the integer quantity of contracts that hold this asset * `contracts_amount` - the total units of that asset held by contracts - New operation responses ([#845](https://github.com/stellar/js-stellar-sdk/pull/845)): * `invokeHostFunction`: see `Horizon.InvokeHostFunctionOperationResponse` * `bumpFootprintExpiration`: see `Horizon.BumpFootprintExpirationOperationResponse` * `restoreFootprint`: see `Horizon.RestoreFootprintOperationResponse` * You can refer to the actual definitions for details, but the gist of the schemas is below: ```ts interface InvokeHostFunctionOperationResponse { function: string; parameters: { value: string; type: string; }[]; address: string; salt: string; asset_balance_changes: { type: string; from: string; to: string; amount: string; }[]; } interface BumpFootprintExpirationOperationResponse { ledgersToExpire: string; } interface RestoreFootprintOperationResponse {}; ``` ### Fixed - Some effect definitions that were missing have been added ([#842](https://github.com/stellar/js-stellar-sdk/pull/842)): * `ClaimableBalanceClawedBack` is now defined * `type EffectRecord` now has all of the effect types - The `stellar-base` library has been upgraded to support the latest Protocol 20 XDR schema and all Soroban functionality ([]()). ## [v11.0.0-beta.1](https://github.com/stellar/js-stellar-sdk/compare/v11.0.0-beta.0...v11.0.0-beta.1) ### Update - Bundle size has decreased by dropping unnecessary dependencies (`lodash`: [#822](https://github.com/stellar/js-stellar-sdk/pull/822), `es6-promise`: [#823](https://github.com/stellar/js-stellar-sdk/pull/823), polyfills: [#825](https://github.com/stellar/js-stellar-sdk/pull/825), `detect-node`: [#831](https://github.com/stellar/js-stellar-sdk/issues/831)). - Dependencies (including `stellar-base`) have been updated to their latest versions ([#825](https://github.com/stellar/js-stellar-sdk/pull/825), [#827](https://github.com/stellar/js-stellar-sdk/pull/827)). ## [v11.0.0-beta.0](https://github.com/stellar/js-stellar-sdk/compare/v10.4.1...v11.0.0-beta.0) This version is marked by a major version bump because of the significant upgrades to underlying dependencies. While there should be no noticeable API changes from a downstream perspective, there may be breaking changes in the way that this library is bundled. ### Update - Build system has been overhauled to support Webpack 5 ([#814](https://github.com/stellar/js-stellar-sdk/pull/814)). - `stellar-base` has been updated to its corresponding overhaul ([#818](https://github.com/stellar/js-stellar-sdk/pull/818)). ### Fix - Missing fields have been added to certain API responses ([#801](https://github.com/stellar/js-stellar-sdk/pull/801) and [#797](https://github.com/stellar/js-stellar-sdk/pull/797)). ## [v10.4.1](https://github.com/stellar/js-stellar-sdk/compare/v10.4.0...v10.4.1) ### Update - Bumps `stellar-base` version to [v8.2.2](https://github.com/stellar/js-stellar-base/releases/tag/v8.2.2) to include latest fix: enabling fast signing in service workers ([#806](https://github.com/stellar/js-stellar-sdk/pull/806)). ## [v10.4.0](https://github.com/stellar/js-stellar-sdk/compare/v10.3.0...v10.4.0) ### Add - Add [SEP-1](https://stellar.org/protocol/sep-1) fields to `StellarTomlResolver` for type checks ([#794](https://github.com/stellar/js-stellar-sdk/pull/794)). - Add support for passing `X-Auth-Token` as a custom header ([#795](https://github.com/stellar/js-stellar-sdk/pull/795)). ### Update - Bumps `stellar-base` version to [v8.2.1](https://github.com/stellar/js-stellar-base/releases/tag/v8.2.1) to include latest fixes. ## [v10.3.0](https://github.com/stellar/js-stellar-sdk/compare/v10.2.0...v10.3.0) ### Fix - Adds `successful` field to transaction submission response ([#790](https://github.com/stellar/js-stellar-sdk/pull/790)). ### Update - Bumps `stellar-base` version to [v8.2.0](https://github.com/stellar/js-stellar-base/releases/tag/v8.2.0) to include CAP-40 support in `Operation.setOptions`. ## [v10.2.0](https://github.com/stellar/js-stellar-sdk/compare/v10.1.2...v10.2.0) ### Fix - Adds the missing `successful` field to transaction responses ([#790](https://github.com/stellar/js-stellar-sdk/pull/790)). ### Update - Bumps `stellar-base` version to [v8.1.0](https://github.com/stellar/js-stellar-base/releases/tag/v8.1.0) to include bug fixes and latest XDR changes. ## [v10.1.2](https://github.com/stellar/js-stellar-sdk/compare/v10.1.1...v10.1.2) ### Fix - Upgrades the `eventsource` dependency to fix a critical security vulnerability ([#783](https://github.com/stellar/js-stellar-sdk/pull/783)). ## [v10.1.1](https://github.com/stellar/js-stellar-sdk/compare/v10.1.0...v10.1.1) ### Fix - Reverts a change from [v10.1.0](#v10.1.0) which caused streams to die prematurely ([#780](https://github.com/stellar/js-stellar-sdk/pull/780)). - Bumps `stellar-base` version to [v8.0.1](https://github.com/stellar/js-stellar-base/releases/tag/v8.0.1) to include latest bugfixes. ## [v10.1.0](https://github.com/stellar/js-stellar-sdk/compare/v10.0.1...v10.1.0-beta.0) This is a promotion from the beta version without changes, besides upgrading the underlying [stellar-base@v8.0.0](https://github.com/stellar/js-stellar-base/releases/tag/v8.0.0) to its stable release. ## [v10.1.0-beta.0](https://github.com/stellar/js-stellar-sdk/compare/v10.0.1...v10.1.0-beta.0) ### Add - Add a way to filter offers by seller: `OfferCallBuilder.seller(string)`, corresponding to `GET /offers?seller=` ([#773](https://github.com/stellar/js-stellar-sdk/pull/773)). ### Add - Support for Protocol 19 ([#775](https://github.com/stellar/js-stellar-sdk/pull/775)): * new precondition fields on a `TransactionResponse` * new account fields on `AccountResponse` and `AccountRecord` * bumping `stellar-base` to the latest beta version ### Fix - Add missing field to account responses: `last_modified_time` which is the time equivalent of the existing `last_modified_ledger` ([#770](https://github.com/stellar/js-stellar-sdk/pull/770)). - Stop opening extra connections when SSE streams receive `event: close` events ([#772](https://github.com/stellar/js-stellar-sdk/pull/772)). - Fix SSE streams not loading under React Native (thank you, @hunterpetersen!) ([#761](https://github.com/stellar/js-stellar-sdk/pull/761)). ## [v10.0.1](https://github.com/stellar/js-stellar-sdk/compare/v10.0.0...v10.0.1) ### Fix - Add missing fields to the `LedgerRecord`: `successful_transaction_count` and `failed_transaction_count` ([#740](https://github.com/stellar/js-stellar-sdk/pull/740)). Note that this also marks several fields as _deprecated_ because they don't actually exist in the Horizon API response: * `transaction_count`: superceded by the sum of the aforementioned fields * `base_fee`: superceded by the `base_fee_in_stroops` field * `base_reserve`: superceded by the `base_reserve_in_stroops` field These deprecated fields will be removed in the next major version. It's unlikely that this breaking change should affect anyone, as these fields have likely been missing/invalid for some time. ### Update - Update a number of dependencies that needed various security updates: * several dependencies bumped their patch version ([#736](https://github.com/stellar/js-stellar-sdk/pull/736), [#684](https://github.com/stellar/js-stellar-sdk/pull/684), [#672](https://github.com/stellar/js-stellar-sdk/pull/672), [#666](https://github.com/stellar/js-stellar-sdk/pull/666), [#644](https://github.com/stellar/js-stellar-sdk/pull/644), [#622](https://github.com/stellar/js-stellar-sdk/pull/622)) * axios has been bumped to 0.25.0 without causing breaking changes ([#742](https://github.com/stellar/js-stellar-sdk/pull/742)) * the `karma` suite of packages has been updated to the latest major version ([#743](https://github.com/stellar/js-stellar-sdk/pull/743)) All of the dependencies in question besides `axios` were _developer_ dependencies, so there never was downstream security impact nor will there be downstream upgrade impact. ## [v10.0.0](https://github.com/stellar/js-stellar-sdk/compare/v9.1.0...v10.0.0) This release introduces breaking changes from `stellar-base`. It adds **unconditional support for muxed accounts**. Please refer to the corresponding [release notes](https://github.com/stellar/js-stellar-base/releases/tag/v7.0.0) for details on the breaking changes there. ### Breaking Updates - Upgrades the stellar-base library to v7.0.0 ([#735](https://github.com/stellar/js-stellar-sdk/pull/735)). - Removes the `AccountResponse.createSubaccount` method since this is also gone from the underlying `Account` interface. The `stellar-base` release notes describe alternative construction methods ([#735](https://github.com/stellar/js-stellar-sdk/pull/735)). ### Fix - Use the right string for liquidity pool trades ([#734](https://github.com/stellar/js-stellar-sdk/pull/734)). ## [v9.1.0](https://github.com/stellar/js-stellar-sdk/compare/v9.0.1...v9.1.0) ### Add - Adds a way to filter liquidity pools by participating account: `server.liquidityPools.forAccount(id)` ([#727](https://github.com/stellar/js-stellar-sdk/pull/727)). ### Updates - Updates the following SEP-10 utility functions to include [client domain verification](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0010.md#verifying-the-client-domain) functionality ([#720](https://github.com/stellar/js-stellar-sdk/pull/720)): - `Utils.buildChallengeTx()` accepts the `clientDomain` and `clientSigningKey` optional parameters - `Utils.readChallengeTx()` parses challenge transactions containing a `client_domain` ManageData operation - `Utils.verifyChallengeTxSigners()` verifies an additional signature from the `clientSigningKey` keypair if a `client_domain` Manage Data operation is included in the challenge - Bumps `stellar-base` version to [v6.0.6](https://github.com/stellar/js-stellar-base/releases/tag/v6.0.6). ### Fix - Fixes the `type_i` enumeration field to accurately reflect liquidity pool effects ([#723](https://github.com/stellar/js-stellar-sdk/pull/723)). - Upgrades axios dependency to v0.21.4 to alleviate security concern ([GHSA-cph5-m8f7-6c5x](https://github.com/advisories/GHSA-cph5-m8f7-6c5x), [#724](https://github.com/stellar/js-stellar-sdk/pull/724)). - Publish Bower package to [stellar/bower-js-stellar-sdk](https://github.com/stellar/bower-js-stellar-sdk) ([#725](https://github.com/stellar/js-stellar-sdk/pull/725)). ## [v9.0.1](https://github.com/stellar/js-stellar-sdk/compare/v9.0.0-beta.1...v9.0.1) This stable release adds **support for Protocol 18**. For details, you can refer to [CAP-38](https://stellar.org/protocol/cap-38) for XDR changes and [this document](https://docs.google.com/document/d/1pXL8kr1a2vfYSap9T67R-g72B_WWbaE1YsLMa04OgoU/view) for changes to the Horizon API. Refer to the release notes for the betas (e.g. [v9.0.0-beta.0](https://github.com/stellar/js-stellar-sdk/releases/v9.0.0-beta.0)) for a comprehensive list of changes to this library. ### Fix - Corrects the `reserves` field on `LiquidityPoolRecord`s to be an array ([#715](https://github.com/stellar/js-stellar-sdk/pull/715)). - Bumps the `stellar-base` dependency to [v6.0.4](https://github.com/stellar/js-stellar-base/releases/tag/v6.0.4) ([#715](https://github.com/stellar/js-stellar-sdk/pull/715)). ## [v9.0.0-beta.1](https://github.com/stellar/js-stellar-sdk/compare/v9.0.0-beta.0...v9.0.0-beta.1) ### Add - Add `/liquidity_pools/:id/trades` endpoint ([#710](https://github.com/stellar/js-stellar-sdk/pull/710)) ### Updates - Updates the following SEP-10 utility functions to be compliant with the protocols ([#709](https://github.com/stellar/js-stellar-sdk/pull/709/), [stellar-protocol/#1036](https://github.com/stellar/stellar-protocol/pull/1036)) - Updated `utils.buildChallengeTx()` to accept muxed accounts (`M...`) for client account IDs - Updated `utils.buildChallengeTx()` to accept a `memo` parameter to attach to the challenge transaction - Updated `utils.readChallengeTx()` to provide a `memo` property in the returned object - Updated `utils.readChallengeTx()` to validate challenge transactions with muxed accounts (`M...`) as the client account ID ### Fix - Drops the `chai-http` dependency to be only for developers ([#707](https://github.com/stellar/js-stellar-sdk/pull/707)). ## [v9.0.0-beta.0](https://github.com/stellar/js-stellar-sdk/compare/v8.2.5...v9.0.0-beta.0) This beta release adds **support for Automated Market Makers**. For details, you can refer to [CAP-38](https://stellar.org/protocol/cap-38) for XDR changes and [this document](https://docs.google.com/document/d/1pXL8kr1a2vfYSap9T67R-g72B_WWbaE1YsLMa04OgoU/view) for detailed changes to the Horizon API. ### Add - Introduced a `LiquidityPoolCallBuilder` to make calls to a new endpoint: * `/liquidity_pools[?reserves=...]` - a collection of liquidity pools, optionally filtered by one or more assets ([#682](https://github.com/stellar/js-stellar-sdk/pull/682)) * `/liquidity_pools/:id` - a specific liquidity pool ([#687](https://github.com/stellar/js-stellar-sdk/pull/687)) - Expanded the `TransactionCallBuilder`, `OperationCallBuilder`, and `EffectsCallBuilder`s to apply to specific liquidity pools ([#689](https://github.com/stellar/js-stellar-sdk/pull/689)). This corresponds to the following new endpoints: * `/liquidity_pools/:id/transactions` * `/liquidity_pools/:id/operations` * `/liquidity_pools/:id/effects` - Expanded the `TradesCallBuilder` to support fetching liquidity pool trades and accepts a new `trade_type` filter ([#685](https://github.com/stellar/js-stellar-sdk/pull/685)): * `/trades?trade_type={orderbook,liquidity_pools,all}`. By default, the filter is `all`, including both liquidity pool and orderbook records. * A liquidity pool trade contains the following fields: - `liquidity_pool_fee_bp`: LP fee expressed in basis points, and *either* - `base_liquidity_pool_id` or `counter_liquidity_pool_id` - Added new effects related to liquidity pools ([#690](https://github.com/stellar/js-stellar-sdk/pull/690)): * `DepositLiquidityEffect` * `WithdrawLiquidityEffect` * `LiquidityPoolTradeEffect` * `LiquidityPoolCreatedEffect` * `LiquidityPoolRemovedEffect` * `LiquidityPoolRevokedEffect` - Added new responses related to liquidity pool operations ([#692](https://github.com/stellar/js-stellar-sdk/pull/692)): * `DepositLiquidityOperationResponse` * `WithdrawLiquidityOperationResponse` ### Updates - Updated the underlying `stellar-base` library to [v6.0.1](https://github.com/stellar/js-stellar-base/releases/tag/v6.0.1) to include CAP-38 changes ([#681](https://github.com/stellar/js-stellar-sdk/pull/681)). - Updated various developer dependencies to secure versions ([#671](https://github.com/stellar/js-stellar-sdk/pull/671)). - Updated `AccountResponse` to include liquidity pool shares in its `balances` field ([#688](https://github.com/stellar/js-stellar-sdk/pull/688)). - Updated `AccountCallBuilder` to allow filtering based on participation in a certain liquidity pool ([#688](https://github.com/stellar/js-stellar-sdk/pull/688)), corresponding to the following new filter: * `/accounts?reserves=[...list of assets...]` - Updated `RevokeSponsorshipOperationResponse` to contain an optional attribute `trustline_liquidity_pool_id`, for when a liquidity pool trustline is revoked ([#690](https://github.com/stellar/js-stellar-sdk/pull/690)). ### Breaking changes - A `TradeRecord` can now correspond to two different types of trades and has changed ([#685](https://github.com/stellar/js-stellar-sdk/pull/685)): * `Orderbook` (the existing structure) - `counter_offer_id` and `base_offer_id` only show up in these records - the redundant `offer_id` field was removed; it matches `base_offer_id` * `LiquidityPool` (new) - `base_account` xor `counter_account` will appear in these records * `price` fields changed from `number`s to `string`s * The links to `base` and `counter` can now point to *either* an account or a liquidity pool - An account's `balances` array can now include a new type ([#688](https://github.com/stellar/js-stellar-sdk/pull/688)): * `asset_type` can now be `liquidity_pool_shares` * The following fields are *not* included in pool share balances: - `buying_liabilities` - `selling_liabilities` - `asset_code` - `asset_issue` - The `ChangeTrustOperationResponse` has changed ([#688](https://github.com/stellar/js-stellar-sdk/pull/688), [#692](https://github.com/stellar/js-stellar-sdk/pull/692)): * `asset_type` can now be `liquidity_pool_shares` * `asset_code`, `asset_issuer`, and `trustee` are now optional * `liquidity_pool_id` is a new optional field - The trustline effects (`TrustlineCreated`, `TrustlineUpdated`, `TrustlineRevoked`) have changed ([#690](https://github.com/stellar/js-stellar-sdk/pull/690)): * the asset type can now be `liquidity_pool_shares` * they can optionally include a `liquidity_pool_id` - Trustline sponsorship effects (`TrustlineSponsorshipCreated`, `TrustlineSponsorshipUpdated`, `TrustlineSponsorshipRemoved`) have been updated ([#690](https://github.com/stellar/js-stellar-sdk/pull/690)): * the `asset` field is now optional, and is replaced by * the `liquidity_pool_id` field for liquidity pools ## [v8.2.5](https://github.com/stellar/js-stellar-sdk/compare/v8.2.4...v8.2.5) ### Update - The `js-stellar-base` library has been updated to [v5.3.2](https://github.com/stellar/js-stellar-base/releases/tag/v5.3.2), which fixes a muxed account bug and updates vulnerable dependencies ([#670](https://github.com/stellar/js-stellar-sdk/pull/670)). ## [v8.2.4](https://github.com/stellar/js-stellar-sdk/compare/v8.2.3...v8.2.4) ### Fix - Utils.readTransactionTx now checks timebounds with a 5-minute grace period to account for clock drift. ## [v8.2.3](https://github.com/stellar/js-stellar-sdk/compare/v8.2.2...v8.2.3) ### Fix - Fix server signature verification in `Utils.readChallengeTx`. The function was not verifying the server account had signed the challenge transaction. ## [v8.2.2](https://github.com/stellar/js-stellar-sdk/compare/v8.2.1...v8.2.2) ### Fix - Fixes a breaking bug introduced in v8.2.0 in which `AccountResponse` no longer conformed to the `StellarBase.Account` interface, which was updated in [stellar-base@v5.2.0](https://github.com/stellar/js-stellar-base/releases/tag/v5.2.0) [(#655)](https://github.com/stellar/js-stellar-sdk/pull/655). ## [v8.2.1](https://github.com/stellar/js-stellar-sdk/compare/v8.2.0...v8.2.1) ### Fix - A defunct query paramater (`?c=[...]`) has been removed now that Horizon properly sends Cache-Control headers [(#652)](https://github.com/stellar/js-stellar-sdk/pull/652). ## [v8.2.0](https://github.com/stellar/js-stellar-sdk/compare/v8.1.1...v8.2.0) ### Add - Added support for querying the relevant transactions and operations for a claimable balance [(#628)](https://github.com/stellar/js-stellar-sdk/pull/628): * `TransactionCallBuilder.forClaimableBalance()`: builds a query to `/claimable_balances/:id/transactions/` * `OperationCallBuilder.forClaimableBalance()`: builds a query to `/claimable_balances/:id/operations/` - Added support for new stat fields on the `/assets` endpoint [(#628)](https://github.com/stellar/js-stellar-sdk/pull/628): * `accounts` - a breakdown of accounts using this asset by authorization type * `balances` - a breakdown of balances by account authorization type * `num_claimable_balances` - the number of pending claimable balances * `claimable_balances_amount` - the total balance of pending claimable balances - Added types for all Effects supported as an enum, and moved `Trade`, `Asset`, `Offer`, and `Account` types to separate files [(#635)](https://github.com/stellar/js-stellar-sdk/pull/635). ### Update - Upgraded `js-stellar-base` package to version `^5.2.1` from `^5.1.0`, refer to its [release notes](https://github.com/stellar/js-stellar-base/releases/tag/v5.2.0) for more [(#639)](https://github.com/stellar/js-stellar-sdk/pull/639): * opt-in **support for muxed accounts** ([SEP-23](https://stellar.org/protocol/sep-23)) * exposing the `AuthClawbackEnabled` flag to Typescript to **complete Protocol 17 support** * fixing a public key parsing regression - Exposed more Protocol 17 (CAP-35) operations [(#633)](https://github.com/stellar/js-stellar-sdk/pull/633): * The `/accounts` endpoint now resolves the `flags.auth_clawback_enabled` field. * The operation responses for `clawback`, `clawbackClaimableBalance`, and `setTrustLineFlags` are now defined. * The operation response for `setOptions` has been updated to show `auth_clawback_enabled`. ## [v8.1.1](https://github.com/stellar/js-stellar-sdk/compare/v8.1.0...v8.1.1) ### Fix - Upgraded `js-stellar-base` package to version `^5.1.0` from `^5.0.0` to expose the Typescript hints for CAP-35 operations [(#629)](https://github.com/stellar/js-stellar-sdk/pull/629). ## [v8.1.0](https://github.com/stellar/js-stellar-sdk/compare/v8.0.0...v8.1.0) ### Update - Upgraded `js-stellar-base` package to version `^5.0.0` from `^4.0.3` to support new CAP-35 operations [(#624)](https://github.com/stellar/js-stellar-sdk/pull/624) ## [v8.0.0](https://github.com/stellar/js-stellar-sdk/compare/v7.0.0...v8.0.0) ### Breaking - Updates the SEP-10 utility function parameters to support [SEP-10 v3.1](https://github.com/stellar/stellar-protocol/commit/6c8c9cf6685c85509835188a136ffb8cd6b9c11c) [(#607)](https://github.com/stellar/js-stellar-sdk/pull/607) - A new required `webAuthDomain` parameter was added to the following functions - `utils.buildChallengeTx()` - `utils.readChallengeTx()` - `utils.verifyChallengeTxThreshold()` - `utils.verifyChallengeTxSigners()` - The `webAuthDomain` parameter is expected to match the value of the Manage Data operation with the 'web_auth_domain' key, if present ### Fix - Fixes bug where the first Manage Data operation in a challenge transaction could have a null value [(#591)](https://github.com/stellar/js-stellar-sdk/pull/591) ### Update - Upgraded `axios` package to version `^0.21.1` from `^0.19.0` to fix security vulnerabilities [(#608)](https://github.com/stellar/js-stellar-sdk/pull/608) - Upgraded `js-stellar-base` package to version `^4.0.3` from `^4.0.0` to allow accounts with a balance of zero [(#616)](https://github.com/stellar/js-stellar-sdk/pull/616) ## [v7.0.0](https://github.com/stellar/js-stellar-sdk/compare/v6.2.0...v7.0.0) This release includes a major-version increase due to breaking changes included. ### Breaking - Updates the SEP-10 utility function parameters and return values to support [SEP-10 v3.0](https://github.com/stellar/stellar-protocol/commit/9d121f98fd2201a5edfe0ed2befe92f4bf88bfe4) - The following functions replaced the `homeDomain` parameter with `homeDomains` (note: plural): - `utils.readChallengeTx()` - `utils.verifyChallengeTxThreshold()` - `utils.verifyChallengeTxSigners()` - `utils.readChallengeTx()` now returns an additional object attribute, `matchedHomeDomain` ### Update - Update challenge transaction helpers for SEP0010 v3.0.0. ([#596](https://github.com/stellar/js-stellar-sdk/pull/596)) * Restore `homeDomain` validation in `readChallengeTx()`. ## [v6.2.0](https://github.com/stellar/js-stellar-sdk/compare/v6.1.0...v6.2.0) ### Update - Update challenge transaction helpers for SEP0010 v2.1.0. ([#581](https://github.com/stellar/js-stellar-sdk/issues/581)) * Remove verification of home domain. * Allow additional manage data operations that have the source account set as the server key. ## [v6.1.0](https://github.com/stellar/js-stellar-sdk/compare/v6.0.0...v6.1.0) ### Update - Update claim predicate fields to match Horizon 1.9.1 ([#575](https://github.com/stellar/js-stellar-sdk/pull/575)). ## [v6.0.0](https://github.com/stellar/js-stellar-sdk/compare/v5.0.4...v6.0.0) ### Add - Add support for claimable balances ([#572](https://github.com/stellar/js-stellar-sdk/pull/572)). Extend server class to allow loading claimable balances from Horizon. The following functions are available: ``` server.claimableBalances(); server.claimableBalances().claimant(claimant); server.claimableBalances().sponsor(sponsorID); server.claimableBalances().asset(asset); server.claimableBalances().claimableBalance(balanceID); ``` - Add the following attributes to `AccountResponse` ([#572](https://github.com/stellar/js-stellar-sdk/pull/572)): * `sponsor?: string` * `num_sponsoring: number` * `num_sponsored: number` - Add the optional attribute `sponsor` to `AccountSigner`, `BalanceLineAsset`, `ClaimableBalanceRecord`, and `OfferRecord` ([#572](https://github.com/stellar/js-stellar-sdk/pull/572)). - Add `sponsor` filtering support for `offers` and `accounts` ([#572](https://github.com/stellar/js-stellar-sdk/pull/572)). * `server.offers().sponsor(accountID)` * `server.accounts().sponsor(accountID)` - Extend operation responses to support new operations ([#572](https://github.com/stellar/js-stellar-sdk/pull/572)). * `create_claimable_balance` with the following fields: * `asset` - asset available to be claimed (in canonical form), * `amount` - amount available to be claimed, * `claimants` - list of claimants with predicates (see below): * `destination` - destination account ID, * `predicate` - predicate required to claim a balance (see below). * `claim_claimable_balance` with the following fields: * `balance_id` - unique ID of balance to be claimed, * `claimant` - account ID of a claimant. * `begin_sponsoring_future_reserves` with the following fields: * `sponsored_id` - account ID for which future reserves will be sponsored. * `end_sponsoring_future_reserves` with the following fields: * `begin_sponsor` - account sponsoring reserves. * `revoke_sponsorship` with the following fields: * `account_id` - if account sponsorship was revoked, * `claimable_balance_id` - if claimable balance sponsorship was revoked, * `data_account_id` - if account data sponsorship was revoked, * `data_name` - if account data sponsorship was revoked, * `offer_id` - if offer sponsorship was revoked, * `trustline_account_id` - if trustline sponsorship was revoked, * `trustline_asset` - if trustline sponsorship was revoked, * `signer_account_id` - if signer sponsorship was revoked, * `signer_key` - if signer sponsorship was revoked. - Extend effect responses to support new effects ([#572](https://github.com/stellar/js-stellar-sdk/pull/572)). * `claimable_balance_created` with the following fields: * `balance_id` - unique ID of claimable balance, * `asset` - asset available to be claimed (in canonical form), * `amount` - amount available to be claimed. * `claimable_balance_claimant_created` with the following fields: * `balance_id` - unique ID of a claimable balance, * `asset` - asset available to be claimed (in canonical form), * `amount` - amount available to be claimed, * `predicate` - predicate required to claim a balance (see below). * `claimable_balance_claimed` with the following fields: * `balance_id` - unique ID of a claimable balance, * `asset` - asset available to be claimed (in canonical form), * `amount` - amount available to be claimed, * `account_sponsorship_created` with the following fields: * `sponsor` - sponsor of an account. * `account_sponsorship_updated` with the following fields: * `new_sponsor` - new sponsor of an account, * `former_sponsor` - former sponsor of an account. * `account_sponsorship_removed` with the following fields: * `former_sponsor` - former sponsor of an account. * `trustline_sponsorship_created` with the following fields: * `sponsor` - sponsor of a trustline. * `trustline_sponsorship_updated` with the following fields: * `new_sponsor` - new sponsor of a trustline, * `former_sponsor` - former sponsor of a trustline. * `trustline_sponsorship_removed` with the following fields: * `former_sponsor` - former sponsor of a trustline. * `claimable_balance_sponsorship_created` with the following fields: * `sponsor` - sponsor of a claimable balance. * `claimable_balance_sponsorship_updated` with the following fields: * `new_sponsor` - new sponsor of a claimable balance, * `former_sponsor` - former sponsor of a claimable balance. * `claimable_balance_sponsorship_removed` with the following fields: * `former_sponsor` - former sponsor of a claimable balance. * `signer_sponsorship_created` with the following fields: * `signer` - signer being sponsored. * `sponsor` - signer sponsor. * `signer_sponsorship_updated` with the following fields: * `signer` - signer being sponsored. * `former_sponsor` - the former sponsor of the signer. * `new_sponsor` - the new sponsor of the signer. * `signer_sponsorship_removed` with the following fields: * `former_sponsor` - former sponsor of a signer. ### Breaking - Update `stellar-base` to `v4.0.0` which introduces a breaking change in the internal XDR library. The following functions were renamed: - `xdr.OperationBody.setOption()` -> `xdr.OperationBody.setOptions()` - `xdr.OperationBody.manageDatum()` -> `xdr.OperationBody.manageData()` - `xdr.OperationType.setOption()` -> `xdr.OperationType.setOptions()` - `xdr.OperationType.manageDatum()` -> `xdr.OperationType.manageData()` The following enum values were renamed in `OperationType`: - `setOption` -> `setOptions` - `manageDatum` -> `manageData` ## [v5.0.4](https://github.com/stellar/js-stellar-sdk/compare/v5.0.3...v5.0.4) ### Update - Add `tx_set_operation_count` to `ledger` resource ([#559](https://github.com/stellar/js-stellar-sdk/pull/559)). ## [v5.0.3](https://github.com/stellar/js-stellar-sdk/compare/v5.0.2...v5.0.3) ### Fix - Fix regression on `server.offer().forAccount()` which wasn't allowing streaming ([#533](https://github.com/stellar/js-stellar-sdk/pull/553)). ## [v5.0.2](https://github.com/stellar/js-stellar-sdk/compare/v5.0.1...v5.0.2) ### Update - Allow submitTransaction to receive a FeeBumpTransaction ([#548](https://github.com/stellar/js-stellar-sdk/pull/548)). ## [v5.0.1](https://github.com/stellar/js-stellar-sdk/compare/v5.0.0...v5.0.1) ### Update - Skip SEP0029 (memo required check) for multiplexed accounts ([#538](https://github.com/stellar/js-stellar-sdk/pull/538)). ### Fix - Fix missing documentation for `stellar-base` ([#544](https://github.com/stellar/js-stellar-sdk/pull/544)). - Move dom-monkeypatch to root types and publish to npm ([#543](https://github.com/stellar/js-stellar-sdk/pull/543)). ## [v5.0.0](https://github.com/stellar/js-stellar-sdk/compare/v4.1.0...v5.0.0) ### Add - Add fee bump related attributes to `TransactionResponse` ([#532](https://github.com/stellar/js-stellar-sdk/pull/532)): - `fee_account: string`. - `fee_bump_transaction: FeeBumpTransactionResponse`: ```js interface FeeBumpTransactionResponse { hash: string; signatures: string[]; } ``` - `inner_transaction: InnerTransactionResponse`: ```js interface InnerTransactionResponse { hash: string; signatures: string[]; max_fee: string; } ``` - Add `memo_bytes: string` to `TransactionResponse` ([#532](https://github.com/stellar/js-stellar-sdk/pull/532)). - Add `authorize_to_maintain_liabilities: boolean` to `AllowTrustOperation` ([#532](https://github.com/stellar/js-stellar-sdk/pull/532)). - Add `is_authorized_to_maintain_liabilities: boolean` to `BalanceLineNative` ([#532](https://github.com/stellar/js-stellar-sdk/pull/532)). - Add new result codes to `TransactionFailedResultCodes` ([#531](https://github.com/stellar/js-stellar-sdk/pull/531)). ```js TX_FEE_BUMP_INNER_SUCCESS = "tx_fee_bump_inner_success", TX_FEE_BUMP_INNER_FAILED = "tx_fee_bump_inner_failed", TX_NOT_SUPPORTED = "tx_not_supported", TX_SUCCESS = "tx_success", TX_TOO_EARLY = "tx_too_early", TX_TOO_LATE = "tx_too_late", TX_MISSING_OPERATION = "tx_missing_operation", TX_INSUFFICIENT_BALANCE = "tx_insufficient_balance", TX_NO_SOURCE_ACCOUNT = "tx_no_source_account", TX_INSUFFICIENT_FEE = "tx_insufficient_fee", TX_INTERNAL_ERROR = "tx_internal_error", ``` ### Breaking changes - The attributes `max_fee` and `fee_charged` in `TransactionResponse` can be now a `number` or a `string`. Update your code to handle both types since Horizon will start sending `string` in version `1.3.0` ([#528](https://github.com/stellar/js-stellar-sdk/pull/528)). - Bump `stellar-base` to `v3.0.0`: This new version of stellar-base brings support for protocol 13, including multiple breaking changes which might affect your code, please review the list of breaking changes in [stellar-base@3.0.0](https://github.com/stellar/js-stellar-base/releases/tag/v3.0.0) release ([#524](https://github.com/stellar/js-stellar-sdk/pull/524)). - Make `networkPassphrase` a required argument in `Utils.buildChallengeTx` and `Utils.readChallengeTx` ([#524](https://github.com/stellar/js-stellar-sdk/pull/524)). - Remove `Server.paths` ([#525](https://github.com/stellar/js-stellar-sdk/pull/525)). ## [v5.0.0-alpha.2](https://github.com/stellar/js-stellar-sdk/compare/v5.0.0-alpha.1..v5.0.0-alpha.2) ### Update - Update `stellar-base` to `v3.0.0-alpha-1`. ## [v5.0.0-alpha.1](https://github.com/stellar/js-stellar-sdk/compare/v4.1.0...v5.0.0-alpha.1) ### Breaking changes - Bump `stellar-base` to `v3.0.0-alpha-0`: This new version of stellar-base brings support for protocol 13, including multiple breaking changes which might affect your code, please review the list of breaking changes in [stellar-base@3.0.0-alpha.0](https://github.com/stellar/js-stellar-base/releases/tag/v3.0.0-alpha.0) release ([#524](https://github.com/stellar/js-stellar-sdk/pull/524)). - Make `networkPassphrase` a required argument in `Utils.buildChallengeTx` and `Utils.readChallengeTx` ([#524](https://github.com/stellar/js-stellar-sdk/pull/524)). - Remove `Server.paths` ([#525](https://github.com/stellar/js-stellar-sdk/pull/525)). ## [v4.1.0](https://github.com/stellar/js-stellar-sdk/compare/v4.0.2...v4.1.0) ### Add - Add SEP0029 (memo required) support. ([#516](https://github.com/stellar/js-stellar-sdk/issues/516)) Extends `server.submitTransaction` to always run a memo required check before sending the transaction. If any of the destinations require a memo and the transaction doesn't include one, then an `AccountRequiresMemoError` will be thrown. You can skip this check by passing `{skipMemoRequiredCheck: true}` to `server.submitTransaction`: ``` server.submitTransaction(tx, {skipMemoRequiredCheck: true}) ``` The check runs for each operation of type: - `payment` - `pathPaymentStrictReceive` - `pathPaymentStrictSend` - `mergeAccount` If the transaction includes a memo, then memo required checking is skipped. See [SEP0029](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0029.md) for more information about memo required check. ## [v4.0.2](https://github.com/stellar/js-stellar-sdk/compare/v4.0.1...v4.0.2) ### Fix - Fix URI TypeScript reference. ([#509](https://github.com/stellar/js-stellar-sdk/issues/509)) - Fix docs build. ([#503](https://github.com/stellar/js-stellar-sdk/issues/503)) - Fix documentation for method to filter offers by account. ([#507](https://github.com/stellar/js-stellar-sdk/issues/507)) - Fix types and add missing attribute to `account_response`. ([#504](https://github.com/stellar/js-stellar-sdk/issues/504)) ## [v4.0.1](https://github.com/stellar/js-stellar-sdk/compare/v4.0.0...v4.0.1) ### Add - Add `.offer` method to `OfferCallBuilder` which allows fetching a single offer by ID. ([#499](https://github.com/stellar/js-stellar-sdk/issues/499)) ### Fix - Fix broken link to Stellar logo+wordmark. ([#496](https://github.com/stellar/js-stellar-sdk/issues/496)) - Fix `_link` omition for AccountResponse class. ([#495](https://github.com/stellar/js-stellar-sdk/issues/495)) ### Update - Update challenge transaction helpers for SEP0010. ([#497](https://github.com/stellar/js-stellar-sdk/issues/497)) ## [v4.0.0](https://github.com/stellar/js-stellar-sdk/compare/v3.3.0...v4.0.0) ### Added - Add support for top-level offers endpoint with `seller`, `selling`, and `buying` filter. ([#485](https://github.com/stellar/js-stellar-sdk/issues/485)) Horizon 1.0 includes a new `/offers` end-point, which allows you to list all offers, supporting filtering by `seller`, `selling`, or `buying` asset. You can fetch data from this endpoint by doing `server.offers()` and use any of the following filters: - `seller`: `server.offers().forAccount(accountId)` - `buying`: `server.offers().buying(asset)` - `selling`: `server.offers().selling(asset)` This introduced a breaking change since it modified the signature for the function `server.offers()`. Before, if you wanted to list all the offers for a given account, you'd do: ``` server.offers('accounts', accountID) ``` Starting on this version you'll need to do: ``` server.offers().forAccount(accountId) ``` You can do now things that were not possible before, like finding all offers for an account filtering by the selling or buying asset ``` server.offers().forAccount(accountId).selling(assetA).buying(assetB) ``` - Add support for filtering accounts by `signer` or `asset` ([#474](https://github.com/stellar/js-stellar-sdk/issues/474)) Horizon 1.0 includes a new `/accounts` end-point, which allows you to list all accounts who have another account as a signer or hold a given asset. You can fetch data from this endpoint by doing `server.accounts()` and use any of the following filters: - `accountID`: `server.accounts().accountId(accountId)`, returns a single account. - `forSigner`: `server.accounts().forSigner(accountId)`, returns accounts where `accountId` is a signer. - `forAsset`: `server.accounts().forAsset(asset)`, returns accounts which hold the `asset`. - Add TypeScript typings for new fields in `fee_stats`. ([#462](https://github.com/stellar/js-stellar-sdk/issues/462)) ### Changed - Changed TypeScript typing for multiple operations "type", it will match the new value on Horizon. ([#477](https://github.com/stellar/js-stellar-sdk/issues/477)) ### Fixed - Fix fetchTimebounds() ([#487](https://github.com/stellar/js-stellar-sdk/issues/487)) - Clone the passed URI in CallBuilder constructor, to not mutate the outside ref ([#473](https://github.com/stellar/js-stellar-sdk/issues/473)) - Use axios CancelToken to ensure timeout ([#482](https://github.com/stellar/js-stellar-sdk/issues/482)) ### Breaking - Remove `fee_paid` field from transaction response. ([#476](https://github.com/stellar/js-stellar-sdk/issues/476)) - Remove all `*_accepted_fee` from FeeStatsResponse. ([#463](https://github.com/stellar/js-stellar-sdk/issues/463)) - Change function signature for `server.offers`. ([#485](https://github.com/stellar/js-stellar-sdk/issues/485)) The signature for the function `server.offers()` was changed to bring suppport for other filters. Before, if you wanted to list all the offers for a given account, you'd do: ``` server.offers('accounts', accountID) ``` Starting on this version you'll need to do: ``` server.offers().accountId(accountId) ``` ## [v3.3.0](https://github.com/stellar/js-stellar-sdk/compare/v3.2.0...v3.3.0) ### Deprecated ⚠️ - Horizon 0.25.0 will change the data type for multiple attributes from `Int64` to `string`. When the JSON payload includes an `Int64`, there are scenarios where large number data can be incorrectly parsed, since JavaScript doesn't support `Int64` values. You can read more about it in [#1363](https://github.com/stellar/go/issues/1363). This release extends the data types for the following attributes to be of type `string` or `number`: - `EffectRecord#offer_id` - `EffectRecord#new_seq` - `OfferRecord#id` - `TradeAggregationRecord#timestamp` - `TradeAggregationRecord#trade_count` - `ManageOfferOperationResponse#offer_id` - `PassiveOfferOperationResponse#offer_id` We recommend you update your code to handle both `string` or `number` in the fields listed above, so that once Horizon 0.25.0 is released, your application will be able to handle the new type without breaking. ## [v3.2.0](https://github.com/stellar/js-stellar-sdk/compare/v3.1.2...v3.2.0) ### Add ➕ - Add `fee_charged` an `max_fee` to `TransactionResponse` interface. ([455](https://github.com/stellar/js-stellar-sdk/pull/455)) ### Deprecated ⚠️ - Horizon 0.25 will stop sending the property `fee_paid` in the transaction response. Use `fee_charged` and `max_fee`, read more about it in [450](https://github.com/stellar/js-stellar-sdk/issues/450). ## [v3.1.2](https://github.com/stellar/js-stellar-sdk/compare/v3.1.1...v3.1.2) ### Change - Upgrade `stellar-base` to `v2.1.2`. ([452](https://github.com/stellar/js-stellar-sdk/pull/452)) ## [v3.1.1](https://github.com/stellar/js-stellar-sdk/compare/v3.1.0...v3.1.1) ### Change ⚠️ - Change arguments on [server.strictReceivePaths](https://stellar.github.io/js-stellar-sdk/Server.html#strictReceivePaths) since we included `destinationAccount` as an argument, but it is not longer required by Horizon. ([477](https://github.com/stellar/js-stellar-sdk/pull/447)) ## [v3.1.0](https://github.com/stellar/js-stellar-sdk/compare/v3.0.0...v3.1.0) ### Add ➕ - Add `server.strictReceivePaths` which adds support for `/paths/strict-receive`. ([444](https://github.com/stellar/js-stellar-sdk/pull/444)) This function takes a list of source assets or a source address, a destination address, a destination asset and a destination amount. You can call it passing a list of source assets: ``` server.strictReceivePaths(sourceAssets,destinationAsset, destinationAmount) ``` Or a by passing a Stellar source account address: ``` server.strictReceivePaths(sourceAccount,destinationAsset, destinationAmount) ``` When you call this function with a Stellar account address, it will look at the account’s trustlines and use them to determine all payment paths that can satisfy the desired amount. - Add `server.strictSendPaths` which adds support for `/paths/strict-send`. ([444](https://github.com/stellar/js-stellar-sdk/pull/444)) This function takes the asset you want to send, and the amount of that asset, along with either a list of destination assets or a destination address. You can call it passing a list of destination assets: ``` server.strictSendPaths(sourceAsset, sourceAmount, [destinationAsset]).call() ``` Or a by passing a Stellar account address: ``` server.strictSendPaths(sourceAsset, sourceAmount, "GDRREYWHQWJDICNH4SAH4TT2JRBYRPTDYIMLK4UWBDT3X3ZVVYT6I4UQ").call() ``` When you call this function with a Stellar account address, it will look at the account’s trustlines and use them to determine all payment paths that can satisfy the desired amount. ### Deprecated ⚠️ - [Server#paths](https://stellar.github.io/js-stellar-sdk/Server.html#paths) is deprecated in favor of [Server#strictReceivePaths](https://stellar.github.io/js-stellar-sdk/Server.html#strictReceivePaths). ([444](https://github.com/stellar/js-stellar-sdk/pull/444)) ## [v3.0.1](https://github.com/stellar/js-stellar-sdk/compare/v3.0.0...v3.0.1) ### Add - Add join method to call builder. ([#436](https://github.com/stellar/js-stellar-sdk/issues/436)) ## [v3.0.0](https://github.com/stellar/js-stellar-sdk/compare/v2.3.0...v3.0.0) ### BREAKING CHANGES ⚠ - Drop Support for Node 6 since it has been end-of-lifed and no longer in LTS. We now require Node 10 which is the current LTS until April 1st, 2021. ([#424](https://github.com/stellar/js-stellar-sdk/pull/424) ## [v2.3.0](https://github.com/stellar/js-stellar-sdk/compare/v2.2.3...v2.3.0) ### Add - Add feeStats support. ([#409](https://github.com/stellar/js-stellar-sdk/issues/409)) ### Fix - Fix Util.verifyChallengeTx documentation ([#405](https://github.com/stellar/js-stellar-sdk/issues/405)) - Fix: listen to stream events with addEventListener ([#408](https://github.com/stellar/js-stellar-sdk/issues/408)) ## [v2.2.3](https://github.com/stellar/js-stellar-sdk/compare/v2.2.2...v2.2.3) ### Fix - Fix ServerApi's OrderbookRecord type ([#401](https://github.com/stellar/js-stellar-sdk/issues/401)) ### Set - Set `name` in custom errors ([#403](https://github.com/stellar/js-stellar-sdk/issues/403)) ## [v2.2.2](https://github.com/stellar/js-stellar-sdk/compare/v2.2.1...v2.2.2) ### Fix - Fix manage data value in SEP0010 challenge builder. ([#396](https://github.com/stellar/js-stellar-sdk/issues/396)) ### Add - Add support for networkPassphrase in SEP0010 challenge builder. ([#397](https://github.com/stellar/js-stellar-sdk/issues/397)) ## [v2.2.1](https://github.com/stellar/js-stellar-sdk/compare/v2.2.0...v2.2.1) ### Fix - Fix [#391](https://github.com/stellar/js-stellar-sdk/issues/391): Remove instance check for MessageEvent on stream error. ([#392](https://github.com/stellar/js-stellar-sdk/issues/392)) ## [v2.2.0](https://github.com/stellar/js-stellar-sdk/compare/v2.1.1...v2.2.0) ### Add - Add helper `Utils.verifyChallengeTx` to verify SEP0010 "Challenge" Transaction. ([#388](https://github.com/stellar/js-stellar-sdk/issues/388)) - Add helper `Utils.verifyTxSignedBy` to verify that a transaction has been signed by a given account. ([#388](https://github.com/stellar/js-stellar-sdk/pull/388/commits/2cbf36891e529f63867d46bcf321b5bb76acef50)) ### Fix - Check for a global EventSource before deciding what to use. This allows you to inject polyfills in other environments like react-native. ([#389](https://github.com/stellar/js-stellar-sdk/issues/389)) ## [v2.1.1](https://github.com/stellar/js-stellar-sdk/compare/v2.1.0...v2.1.1) ### Fix - Fix CallBuilder onmessage type ([#385](https://github.com/stellar/js-stellar-sdk/issues/385)) ## [v2.1.0](https://github.com/stellar/js-stellar-sdk/compare/v2.0.1...v2.1.0) ### Add - Add single script to build docs and call it when combined with jsdoc. ([#380](https://github.com/stellar/js-stellar-sdk/issues/380)) - Add SEP0010 transaction challenge builder. ([#375](https://github.com/stellar/js-stellar-sdk/issues/375)) - Add `home_domain` to ServerApi.AccountRecord ([#376](https://github.com/stellar/js-stellar-sdk/issues/376)) ### Bump - Bump stellar-base to 1.0.3. ([#378](https://github.com/stellar/js-stellar-sdk/issues/378)) - Bump @stellar/tslint-config ([#377](https://github.com/stellar/js-stellar-sdk/issues/377)) ### Fix - Fix jsdoc's build in after_deploy ([#373](https://github.com/stellar/js-stellar-sdk/issues/373)) - Create new URI instead of passing serverUrl (Fix [#379](https://github.com/stellar/js-stellar-sdk/issues/379)). ([#382](https://github.com/stellar/js-stellar-sdk/issues/382)) ## [v2.0.1](https://github.com/stellar/js-stellar-sdk/compare/v1.0.2...v2.0.1) - **Breaking change** Port stellar-sdk to Typescript. Because we use a slightly different build process, there could be some unanticipated bugs. Additionally, some type definitions have changed: - Types that were once in the `Server` namespace but didn't actually deal with the `Server` class have been broken out into a new namespace, `ServerApi`. So, for example, `Server.AccountRecord` -> `ServerApi.AccountRecord`. - `Server.AccountResponse` is out of the `Server` namespace -> `AccountResponse` - `Server.*CallBuilder` is out of the `Server` namespace -> `*CallBuilder` - `HorizonResponseAccount` is now `Horizon.AccountResponse` - Upgrade Webpack to v4. - Add support for providing app name and version to request headers. - (NPM wouldn't accept the 2.0.0 version, so we're publishing to 2.0.1.) Many thanks to @Ffloriel and @Akuukis for their help with this release! ## [v1.0.5](https://github.com/stellar/js-stellar-sdk/compare/v1.0.4...v1.0.5) - Make CallCollectionFunction return a CollectionPage. - Update Horizon.AccountSigner[] types. ## [v1.0.4](https://github.com/stellar/js-stellar-sdk/compare/v1.0.3...v1.0.4) - Automatically tag alpha / beta releases as "next" in NPM. ## [v1.0.3](https://github.com/stellar/js-stellar-sdk/compare/v1.0.2...v1.0.3) - Upgrade axios to 0.19.0 to close a security vulnerability. - Some type fixes. ## [v1.0.2](https://github.com/stellar/js-stellar-sdk/compare/v1.0.1...v1.0.2) - Upgrade stellar-base to v1.0.2 to fix a bug with the browser bundle. ## [v1.0.1](https://github.com/stellar/js-stellar-sdk/compare/v1.0.0...v1.0.1) - Upgrade stellar-base to v1.0.1, which makes available again the deprecated operation functions `Operation.manageOffer` and `Operation.createPassiveOffer` (with a warning). - Fix the documentation around timebounds. ## [v1.0.0](https://github.com/stellar/js-stellar-sdk/compare/v0.15.4...v1.0.0) - Upgrade stellar-base to [v1.0.0](https://github.com/stellar/js-stellar-base/releases/tag/v1.0.0), which introduces two breaking changes. - Switch stellar-sdk's versioning to true semver! 🎉 ## [v0.15.4](https://github.com/stellar/js-stellar-sdk/compare/v0.15.3...v0.15.4) - Add types for LedgerCallBuilder.ledger. - Add types for Server.operationFeeStats. - Add types for the HorizonAxiosClient export. - Move @types/\* from devDependencies to dependencies. - Pass and use a stream response type to CallBuilders if it's different from the normal call response. - Upgrade stellar-base to a version that includes types, and remove @types/stellar-base as a result. ## [v0.15.3](https://github.com/stellar/js-stellar-sdk/compare/v0.15.2...v0.15.3) - In .travis.yml, try to switch from the encrypted API key to an environment var. ## [v0.15.2](https://github.com/stellar/js-stellar-sdk/compare/v0.15.1...v0.15.2) - Fix Server.transactions and Server.payments definitions to properly return collections - Renew the npm publish key ## [v0.15.1](https://github.com/stellar/js-stellar-sdk/compare/v0.15.0...v0.15.1) - Add Typescript type definitions (imported from DefinitelyTyped). - Make these changes to those definitions: - Add definitions for Server.fetchBaseFee and Server.fetchTimebounds - CallBuilder: No long always returns CollectionPaged results. Interfaces that extend CallBuilder should specify whether their response is a collection or not - CallBuilder: Add inflation_destination and last_modified_ledger property - OfferRecord: Fix the returned properties - TradeRecord: Fix the returned properties - TradesCallBuilder: Add forAccount method - TransactionCallBuilder: Add includeFailed method - Horizon.BalanceLineNative/Asset: Add buying_liabilities / selling_liabilities properties - Fix documentation links. ## [v0.15.0](https://github.com/stellar/js-stellar-sdk/compare/v0.14.0...v0.15.0) - **Breaking change**: `stellar-sdk` no longer ships with an `EventSource` polyfill. If you plan to support IE11 / Edge, please use [`event-source-polyfill`](https://www.npmjs.com/package/event-source-polyfill) to set `window.EventSource`. - Upgrade `stellar-base` to a version that doesn't use the `crypto` library, fixing a bug with Angular 6 - Add `Server.prototype.fetchTimebounds`, a helper function that helps you set the `timebounds` property when initting `TransactionBuilder`. It bases the timebounds on server time rather than local time. ## [v0.14.0](https://github.com/stellar/js-stellar-sdk/compare/v0.13.0...v0.14.0) - Updated some out-of-date dependencies - Update documentation to explicitly set fees - Add `Server.prototype.fetchBaseFee`, which devs can use to fetch the current base fee; we plan to add more functions to help suggest fees in future releases - Add `includeFailed` to `OperationCallBuilder` for including failed transactions in calls - Add `operationFeeStats` to `Server` for the new fee stats endpoint - After submitting a transaction with a `manageOffer` operation, return a new property `offerResults`, which explains what happened to the offer. See [`Server.prototype.submitTransaction`](https://stellar.github.io/js-stellar-sdk/Server.html#submitTransaction) for documentation. ## 0.13.0 - Update `stellar-base` to `0.11.0` - Added ESLint and Prettier to enforce code style - Upgraded dependencies, including Babel to 6 - Bump local node version to 6.14.0 ## 0.12.0 - Update `stellar-base` to `0.10.0`: - **Breaking change** Added [`TransactionBuilder.setTimeout`](https://stellar.github.io/js-stellar-base/TransactionBuilder.html#setTimeout) method that sets `timebounds.max_time` on a transaction. Because of the distributed nature of the Stellar network it is possible that the status of your transaction will be determined after a long time if the network is highly congested. If you want to be sure to receive the status of the transaction within a given period you should set the TimeBounds with `maxTime` on the transaction (this is what `setTimeout` does internally; if there's `minTime` set but no `maxTime` it will be added). Call to `TransactionBuilder.setTimeout` is required if Transaction does not have `max_time` set. If you don't want to set timeout, use `TimeoutInfinite`. In general you should set `TimeoutInfinite` only in smart contracts. Please check [`TransactionBuilder.setTimeout`](https://stellar.github.io/js-stellar-base/TransactionBuilder.html#setTimeout) docs for more information. - Fixed decoding empty `homeDomain`. - Add `offset` parameter to TradeAggregationCallBuilder to reflect new changes to the endpoint in horizon-0.15.0 ## 0.11.0 - Update `js-xdr` (by updating `stellar-base`) to support unmarshaling non-utf8 strings. - String fields returned by `Operation.fromXDRObject()` are of type `Buffer` now (except `SetOptions.home_domain` and `ManageData.name` - both required to be ASCII by stellar-core). ## 0.10.3 - Update `stellar-base` and xdr files. ## 0.10.2 - Update `stellar-base` (and `js-xdr`). ## 0.10.1 - Update `stellar-base` to `0.8.1`. ## 0.10.0 - Update `stellar-base` to `0.8.0` with `bump_sequence` support. ## 0.9.2 - Removed `.babelrc` file from the NPM package. ## 0.9.1 ### Breaking changes - `stellar-sdk` is now using native `Promise` instead of `bluebird`. The `catch` function is different. Instead of: ```js .catch(StellarSdk.NotFoundError, function (err) { /* ... */ }) ``` please use the following snippet: ```js .catch(function (err) { if (err instanceof StellarSdk.NotFoundError) { /* ... */ } }) ``` - We no longer support IE 11, Firefox < 42, Chrome < 49. ### Changes - Fixed `_ is undefined` bug. - Browser build is around 130 KB smaller! ## 0.8.2 - Added `timeout` option to `StellarTomlResolver` and `FederationServer` calls (https://github.com/stellar/js-stellar-sdk/issues/158). - Fixed adding random value to URLs multiple times (https://github.com/stellar/js-stellar-sdk/issues/169). - Fixed jsdoc for classes that extend `CallBuilder`. - Updated dependencies. - Added `yarn.lock` file to repository. ## 0.8.1 - Add an allowed trade aggregation resolution of one minute - Various bug fixes - Improved documentation ## 0.8.0 - Modify `/trades` endpoint to reflect changes in horizon. - Add `/trade_aggregations` support. - Add `/assets` support. ## 0.7.3 - Upgrade `stellar-base`. ## 0.7.2 - Allow hex string in setOptions signers. ## 0.7.1 - Upgrade `stellar-base`. ## 0.7.0 - Support for new signer types: `sha256Hash`, `preAuthTx`. - `StrKey` helper class with `strkey` encoding related methods. - Removed deprecated methods: `Keypair.isValidPublicKey` (use `StrKey`), `Keypair.isValidSecretKey` (use `StrKey`), `Keypair.fromSeed`, `Keypair.seed`, `Keypair.rawSeed`. - **Breaking changes**: - `Network` must be explicitly selected. Previously testnet was a default network. - `Operation.setOptions()` method `signer` param changed. - `Keypair.fromAccountId()` renamed to `Keypair.fromPublicKey()`. - `Keypair.accountId()` renamed to `Keypair.publicKey()`. - Dropping support for `End-of-Life` node versions. ## 0.6.2 - Updated `stellar.toml` location ## 0.6.1 - `forUpdate` methods of call builders now accept strings and numbers. - Create a copy of attribute in a response if there is a link with the same name (ex. `transaction.ledger`, `transaction._links.ledger`). ## 0.6.0 - **Breaking change** `CallBuilder.stream` now reconnects when no data was received for a long time. This is to prevent permanent disconnects (more in: [#76](https://github.com/stellar/js-stellar-sdk/pull/76)). Also, this method now returns `close` callback instead of `EventSource` object. - **Breaking change** `Server.loadAccount` now returns the `AccountResponse` object. - **Breaking change** Upgraded `stellar-base` to `0.6.0`. `ed25519` package is now an optional dependency. Check `StellarSdk.FastSigning` variable to check if `ed25519` package is available. More in README file. - New `StellarTomlResolver` class that allows getting `stellar.toml` file for a domain. - New `Config` class to set global config values. ## 0.5.1 - Fixed XDR decoding issue when using firefox ## 0.5.0 - **Breaking change** `Server` and `FederationServer` constructors no longer accept object in `serverUrl` parameter. - **Breaking change** Removed `AccountCallBuilder.address` method. Use `AccountCallBuilder.accountId` instead. - **Breaking change** It's no longer possible to connect to insecure server in `Server` or `FederationServer` unless `allowHttp` flag in `opts` is set. - Updated dependencies. ## 0.4.3 - Updated dependency (`stellar-base`). ## 0.4.2 - Updated dependencies. - Added tests. - Added `CHANGELOG.md` file. ## 0.4.1 - `stellar-base` bump. (c90c68f) ## 0.4.0 - **Breaking change** Bumped `stellar-base` to [0.5.0](https://github.com/stellar/js-stellar-base/blob/master/CHANGELOG.md#050). (b810aef)