diff --git a/.github/workflows/bundle_size.yml b/.github/workflows/bundle_size.yml deleted file mode 100644 index 7c0fdc8dc..000000000 --- a/.github/workflows/bundle_size.yml +++ /dev/null @@ -1,34 +0,0 @@ -# name: Bundle Size - -# on: -# pull_request: - -# jobs: -# build: -# env: -# NODE: "20" -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v4 - -# - name: Setup pnpm -# uses: pnpm/action-setup@v4 - - -# - name: Install Node.js -# uses: actions/setup-node@v4 -# with: -# node-version: ${{ env.NODE }} - -# - name: Enable Corepack -# run: corepack enable - -# - name: Report Bundle Size -# uses: preactjs/compressed-size-action@v2 -# with: -# repo-token: ${{ secrets.GITHUB_TOKEN }} -# install-script: "pnpm install --frozen-lockfile" -# build-script: "build:lib:all" -# clean-script: "clean:bundle-size" -# pattern: "dist/*.js" -# compression: "none" diff --git a/.github/workflows/docs_build.yml b/.github/workflows/docs_build.yml new file mode 100644 index 000000000..78e6bdf32 --- /dev/null +++ b/.github/workflows/docs_build.yml @@ -0,0 +1,54 @@ +name: Docs build + +on: + pull_request: + +permissions: + contents: read + +jobs: + check: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + + - name: Install Node (22.x) + uses: actions/setup-node@v4 + with: + node-version: "22.x" + cache: pnpm + cache-dependency-path: pnpm-lock.yaml + + - name: Enable Corepack + run: corepack enable + + - name: Install Dependencies + run: pnpm install --frozen-lockfile --network-concurrency 1 + + - name: Cache Astro build + uses: actions/cache@v4 + with: + path: .astro + key: astro-${{ hashFiles('astro.config.mjs', 'pnpm-lock.yaml') }} + + - name: Build reference docs + run: pnpm docs:reference + + - name: Build llms.txt bundles + run: pnpm docs:llms + + - name: Verify generated docs are up to date + run: git diff --exit-code -- docs/ + + - name: Generate robots.txt from config + run: pnpm docs:robots + + - name: Generate .htaccess from config (Apache hosts only) + run: pnpm docs:htaccess + + - name: Build Starlight site + run: pnpm docs:site diff --git a/.github/workflows/docs_deploy.yml.disabled b/.github/workflows/docs_deploy.yml.disabled new file mode 100644 index 000000000..5bb33ce01 --- /dev/null +++ b/.github/workflows/docs_deploy.yml.disabled @@ -0,0 +1,63 @@ +name: Docs deploy + +on: + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + + - name: Install Node (22.x) + uses: actions/setup-node@v4 + with: + node-version: "22.x" + cache: pnpm + cache-dependency-path: pnpm-lock.yaml + + - name: Enable Corepack + run: corepack enable + + - name: Install Dependencies + run: pnpm install --frozen-lockfile --network-concurrency 1 + + - name: Cache Astro build + uses: actions/cache@v4 + with: + path: .astro + key: astro-${{ hashFiles('astro.config.mjs', 'pnpm-lock.yaml') }} + + - name: Build docs + run: pnpm run docs + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: dist/site + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/gh_pages.yaml b/.github/workflows/gh_pages.yaml deleted file mode 100644 index 9ebff537c..000000000 --- a/.github/workflows/gh_pages.yaml +++ /dev/null @@ -1,59 +0,0 @@ -name: Github Pages -on: - release: - types: [published] - -jobs: - build-and-deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout SDK - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Setup pnpm - uses: pnpm/action-setup@v4 - - - name: Checkout Base - uses: actions/checkout@v4 - with: - repository: stellar/js-stellar-base - path: js-stellar-base - - - name: Install Node (22.x) - uses: actions/setup-node@v4 - with: - node-version: "22.x" - cache: pnpm - cache-dependency-path: pnpm-lock.yaml - - - name: Enable Corepack - run: corepack enable - - - name: Install Dependencies - run: pnpm install --frozen-lockfile --network-concurrency 1 - - - name: Build - run: pnpm run build:prod - - - name: Checkout GH pages - uses: actions/checkout@v4 - with: - repository: stellar/js-stellar-sdk - ref: gh-pages - path: jsdoc - - - name: Generate JS docs - continue-on-error: true - run: pnpm run docs - - - name: Publish JS docs - run: | - TAG=`git describe --tags` - cd jsdoc/ - git config user.name github-actions - git config user.email github-actions@github.com - git add . - git commit -m $TAG - git push origin gh-pages diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9bb62bbde..9bfe43314 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,8 +35,14 @@ jobs: - name: Install Dependencies run: pnpm install --frozen-lockfile --network-concurrency 1 - - name: Install Playwright - run: pnpm exec playwright install --with-deps chromium firefox + - name: Install Playwright Chromium + run: pnpm exec playwright install chromium + + - name: Install Playwright Firefox + run: pnpm exec playwright install firefox + + - name: Install Playwright system dependencies + run: pnpm exec playwright install-deps chromium firefox - name: Build run: pnpm run build:prod diff --git a/.gitignore b/.gitignore index fbaeaf3ab..c8abda9a7 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,23 @@ /dist/ /coverage/ /jsdoc/ +/.astro/ + +# Astro build-time mirrors of docs/llms*.txt — generated by +# scripts/build-llms.ts so the bundles resolve at the deployed site +# root. Canonical committed copies live at docs/llms.txt and +# docs/llms-full.txt. +/public/llms.txt +/public/llms-full.txt + +# Generated by scripts/build-robots.ts from config/site.ts. Run +# `pnpm docs:robots` (or `pnpm docs`) to (re)build. +/public/robots.txt + +# Generated by scripts/build-htaccess.ts from config/site.ts. Apache-only +# config; inert on hosts that don't honor .htaccess. Run +# `pnpm docs:htaccess` (or `pnpm docs`) to (re)build. +/public/.htaccess js-stellar-base/ test/unit/out/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 269f9fe59..f0841b611 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,23 +1,177 @@ -# How to contribute +# Contributing + +## How to contribute Please read the [Contribution Guide](https://github.com/stellar/docs/blob/master/CONTRIBUTING.md). +## Releasing + +Releases publish to npm via the [`npm publish`](.github/workflows/npm_publish.yml) +GitHub Actions workflow, which fires on `release.published`. The +workflow runs `pnpm run preversion` (clean, format, build, test) and +publishes with OIDC trusted publishing — no manual npm token needed. + +To cut a release: + +1. **Update [CHANGELOG.md](CHANGELOG.md):** move entries under + `## Unreleased` into a new versioned section. Heading format: + `## [vX.Y.Z](https://github.com/stellar/js-stellar-sdk/compare/v...v)`. +2. **Bump `"version"` in [package.json](package.json)** per + [semver](https://semver.org/): patch for fixes, minor for additions, + major for breaking changes. +3. **Run `pnpm install`** so [pnpm-lock.yaml](pnpm-lock.yaml) picks up + the new version. +4. **Open a release PR** with the changelog and version bump. +5. **After it merges,** draft a GitHub release at + with tag + `vX.Y.Z` targeting `master`. Paste the new changelog section into + the release notes. Publishing the release triggers + [`npm_publish.yml`](.github/workflows/npm_publish.yml). + +If the publish workflow fails, fix the issue and re-run via +`workflow_dispatch` from the Actions tab — no need to cut a new tag. + +## Documentation + +The docs system has three parts: + +1. **TSDoc comments in `src/`** — the source of truth for API + reference. Edited inline alongside code. +2. **Markdown guides in `docs/guides/`** — task-oriented prose, + hand-written. +3. **Generated reference and LLM bundles** — produced by build + scripts; never edited by hand. + +Authored and generated content are strictly separated: every file +is either fully authored or fully generated. They never mix. -# Releasing -Just like with the [js-stellar-base](https://github.com/stellar/js-stellar-base) library, there are a few important things to remember when releasing a new version of the library. +### Renderer portability -In fact, you should follow [the steps there](https://github.com/stellar/js-stellar-base/blob/master/CONTRIBUTING.md#Releasing), first, except for this repository. Then, **if base has been updated**, you want to follow the additional steps here: +The generated markdown under `docs/` targets no specific docs platform. +Starlight is the current renderer (chosen for its content collection, +sidebar autogeneration, and search), but the same `docs/` files should +render under Mintlify, Docusaurus, GitBook, Hugo, Jekyll, or any +plain-markdown viewer (including raw GitHub view) without modification. +That portability is a hard rule — when authoring TSDoc comments, guide +markdown, or extending the build pipeline, do not introduce +platform-specific syntax in the generated output: - - [ ] First, bump its version accordingly. This is straightforward: change the version field of `"stellar-base"` under the `"dependencies"` section in the SDK's [package.json](https://github.com/stellar/js-stellar-sdk/blob/master/package.json#L140), e.g.: +- No MDX components (``, ``, ``, etc.). +- No Starlight-specific directives or admonitions (`:::note`, `:::tip`, + `:::caution`). +- Frontmatter limited to the universal `title` / `description` + convention. Avoid platform-private fields. +- Cross-references between pages emitted as relative markdown links + (`./other-bucket.md#anchor`), never absolute URLs that bake in any + one platform's routing. -```diff - "dependencies": { - ... -- "stellar-base": "^1.0.0", -+ "stellar-base": "^2.0.0", - } +Renderer-specific configuration belongs in `astro.config.mjs` and +`src/content.config.ts`, not in the markdown. + +### Layout + +- `src/**/*.ts` — TSDoc comments here drive the API reference. +- `docs/guides/*.md` — task-oriented guides (authored). +- `docs/reference/*.md` — API reference (generated; do not edit). +- `docs/llms.txt`, `docs/llms-full.txt` — LLM-targeted bundles + (generated; do not edit). +- `docs/index.md`, `docs/agents.md` — landing pages (authored). + +### Frontmatter + +Every authored guide markdown file starts with Starlight +frontmatter: + +```yaml +--- +title: +description: +--- ``` - - [ ] Finally, run `pnpm install` so that the dependency is pulled (ensuring it's a valid version) and the lockfile is updated with the latest integrity details. You can now commit the change and PR accordingly. +Reference files under `docs/reference/` carry generator-emitted +frontmatter. Don't add new TSDoc tags to influence frontmatter — +the generator handles it. + +### Build commands + +| Command | Purpose | +| --------------------- | ------------------------------------------------ | +| `pnpm docs:reference` | Regenerate API reference markdown from TSDoc. | +| `pnpm docs:llms` | Regenerate `llms.txt` and `llms-full.txt`. | +| `pnpm docs:site` | Build the static Starlight site to `dist/site/`. | +| `pnpm docs` | Run all three in order. | + +### Local preview + +- `pnpm docs:dev` — Astro dev server with hot-module reload. + Use while authoring guides; changes appear live. +- `pnpm docs:preview` — production-mode preview (run after + `pnpm docs:site`). Use for visual and responsive checks before + merging or releasing. + +### Adding a new exported symbol + +1. Add or update the TSDoc comment in `src/`. +2. Tag the export with `@category` so it appears in the right + reference section. +3. Run `pnpm docs:reference`. +4. Commit the regenerated files in `docs/reference/` alongside + the source change. + +### Adding a new guide + +1. Create `docs/guides/.md` with the frontmatter shown + above. +2. The sidebar picks up the new file automatically — no config + change needed. + +### Images + +- Astro's `` component for raster images. It emits + WebP/AVIF and a responsive `srcset` automatically. +- Inline SVG for vector diagrams. +- Avoid unbounded raw `` tags. + +### `llms.txt` and `llms-full.txt` + +- `llms.txt` is the LLM sitemap: project H1, blockquote tagline, + version metadata, and per-area `## Guides` / `## Reference` / + `## Other` sections with link lists to every published doc page. +- `llms-full.txt` concatenates the full content of every doc page + into one bundle for AI-agent ingestion. + +Both are produced by `pnpm docs:llms` from the contents of `docs/`. +Never edit them by hand. + +### CI rule + +Pull requests fail if the generated reference docs or LLM bundles +are stale. Before pushing: + +```sh +pnpm docs:reference +pnpm docs:llms +git diff docs/ # should be empty +``` + +If `git diff docs/` shows changes, commit them. + +### Source-link ref + +Per-symbol "Source:" links in the generated reference and the +`Source ref:` field in `llms.txt` are pinned to a configurable +ref so local builds, PR-check builds, and release deploys can +each produce the right URLs without churning each other: + +- **Default**: trunk branch (`master`). Set in + [scripts/docs-source-ref.ts](scripts/docs-source-ref.ts) — update + there if the trunk branch is renamed. +- **Override** via the `DOCS_SOURCE_REF` env var. Release deploys + set it to the release tag (e.g. `v15.0.1`) so the deployed + snapshot links to the exact release source. Locally: + `DOCS_SOURCE_REF=v15.0.1 pnpm docs:reference`. -Note that new versions will be published to npm **and** Bower by GitHub Actions. +Because the default is evergreen, repeated `pnpm docs:reference` +or `pnpm docs:llms` runs are byte-idempotent — no per-commit SHA +churn in `docs/`. diff --git a/README.md b/README.md index e3ff66234..e36638374 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Stellar JS SDK (js-stellar-sdk) -npm version - - Weekly Downloads - -Test Status -[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/stellar/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). @@ -62,6 +62,8 @@ You can use a CDN: ``` + + 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 @@ -88,7 +90,7 @@ The default bundle uses a native-fetch HTTP client with no axios dependency. If #### Build with Axios ``` -npm run build:browser:axios +pnpm run build:lib: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`. @@ -96,9 +98,8 @@ This will create `stellar-sdk-axios.js` in `dist/`. Consumers can also import th 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/). + * across the [Stellar Developer Docs](https://developers.stellar.org), which includes tutorials and examples, 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: @@ -107,6 +108,8 @@ You can also refer to: ### Usage with React-Native + + 1. Install `yarn add --dev rn-nodeify` 2. Add the following postinstall script: ``` @@ -131,6 +134,8 @@ There is also a [sample](https://github.com/fnando/rn-stellar-sdk-sample) that y #### Usage with Expo managed workflows + + 1. Install `yarn add --dev rn-nodeify` 2. Add the following postinstall script: ``` @@ -154,6 +159,8 @@ const generateRandomKeypair = () => { #### 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: @@ -414,19 +421,16 @@ In order to have a faster test loop, these suite-specific commands **do not** bu 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 +# generate the docs site (reference pages, llms bundles, and the Astro site under dist/site) pnpm run docs -# get these files working in a browser -cd jsdoc && serve . +# preview the built site in a browser +pnpm docs:preview -# you'll be able to browse the docs at http://localhost:5000 +# the preview server prints the local URL (default http://localhost:4321) + +# for a live-reloading dev server instead, use: +pnpm docs:dev ``` ### Publishing @@ -437,7 +441,9 @@ For information on how to contribute or publish new versions of this software to ### `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. + + +`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 a 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! diff --git a/astro.config.mjs b/astro.config.mjs new file mode 100644 index 000000000..2ce5f4f86 --- /dev/null +++ b/astro.config.mjs @@ -0,0 +1,80 @@ +import { defineConfig, fontProviders } from "astro/config"; +import starlight from "@astrojs/starlight"; +import sitemap from "@astrojs/sitemap"; + +import { SITE_URL, BASE_PATH } from "./config/site.js"; + +export default defineConfig({ + site: SITE_URL, + base: BASE_PATH, + outDir: "./dist/site", + prefetch: { prefetchAll: true }, + fonts: [ + { + name: "Inter", + cssVariable: "--font-inter", + provider: fontProviders.google(), + weights: [400, 500, 600, 700], + styles: ["normal"], + subsets: ["latin"], + }, + { + name: "Inconsolata", + cssVariable: "--font-inconsolata", + provider: fontProviders.google(), + weights: [400, 700], + styles: ["normal"], + subsets: ["latin"], + }, + ], + integrations: [ + starlight({ + title: "@stellar/stellar-sdk", + components: { + PageTitle: "./src/starlightComponents/PageTitle.astro", + Head: "./src/starlightComponents/Head.astro", + }, + customCss: ["./src/styles/overrides.css"], + social: [ + { + icon: "github", + label: "GitHub", + href: "https://github.com/stellar/js-stellar-sdk", + }, + ], + // P17: per-page pointing at the LLMs + // sitemap so AI agents can discover the bundle from any rendered + // page. Hardcoded with the base prefix because Starlight emits + // `head` entries verbatim — Astro doesn't auto-prefix arbitrary + // attributes. + head: [ + { + tag: "link", + attrs: { + rel: "alternate", + type: "text/plain", + title: "LLMs sitemap", + href: `${BASE_PATH}/llms.txt`, + }, + }, + ], + sidebar: [ + { + label: "Guides", + // The `docs/` prefix is required because Starlight's autogenerate + // filter strips a hardcoded `src/content/docs/` prefix from each + // route's `filePath` before matching `directory`. With our custom + // content collection rooted at `./docs/`, that strip is a no-op, + // so paths still start with `docs/` at filter time. + items: [{ autogenerate: { directory: "docs/guides" } }], + }, + { + label: "Reference", + items: [{ autogenerate: { directory: "docs/reference" } }], + }, + { slug: "agents" }, + ], + }), + sitemap(), + ], +}); diff --git a/config/.jsdoc.json b/config/.jsdoc.json deleted file mode 100644 index 4dff11f59..000000000 --- a/config/.jsdoc.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "tags": { - "allowUnknownTags": ["optional", "category", "warning", "note", "link"] - }, - "plugins": [ - "plugins/markdown", - "node_modules/better-docs/typescript", - "node_modules/better-docs/category" - ], - "source": { - "include": ["lib/", "js-stellar-base/src"], - "includePattern": "\\.(js|ts)$", - "exclude": [ - "js-stellar-base/src/generated", - "lib/axios", - "lib/contract/utils.d.ts" - ] - }, - "opts": { - "encoding": "utf8", - "readme": "README.md", - "destination": "jsdoc/", - "recurse": true, - "verbose": true, - "template": "node_modules/better-docs", - "private": true - }, - "templates": { - "cleverLinks": false, - "monospaceLinks": false, - "search": true, - "default": { - "useLongnameInNav": true - }, - "better-docs": { - "name": "@stellar/stellar-sdk", - "title": "@stellar/stellar-sdk Documentation", - "hideGenerator": false, - "navLinks": [ - { - "label": "GitHub", - "href": "https://github.com/stellar/js-stellar-sdk" - }, - { - "label": "npm", - "href": "https://www.npmjs.com/package/@stellar/stellar-sdk" - } - ] - } - }, - "markdown": { - "hardwrap": false, - "idInHeadings": true - } -} diff --git a/config/site.ts b/config/site.ts new file mode 100644 index 000000000..14cb9e3ae --- /dev/null +++ b/config/site.ts @@ -0,0 +1,52 @@ +/** + * Single source of truth for the docs site's deploy identity and AI-agent + * policy. Anything that needs to know the site URL, the base path, or how + * AI agents are permitted to use this content (astro.config.mjs, + * scripts/build-robots.ts, scripts/build-llms.ts) imports from here. + * + * To change the deploy target or AI policy: edit this file and rebuild. + */ + +export const SITE_URL = "https://stellar.github.io"; +export const BASE_PATH = "/js-stellar-sdk"; +export const SITE_BASE_URL = `${SITE_URL}${BASE_PATH}` as const; + +/** + * Cloudflare Content Signals — declares preferences for how AI agents may + * use this site's content. Lives in robots.txt at build time. + * + * search — building search indexes / providing search results + * aiInput — real-time AI use (RAG, agents reading per-query) + * aiTrain — training or fine-tuning AI models + * + * Each: "yes" (allow), "no" (disallow), or omit (no signal). + * + * Spec: https://blog.cloudflare.com/content-signals-policy/ + */ +export const AI_POLICY = { + search: "yes", + aiInput: "yes", + aiTrain: "yes", +} as const; + +/** + * Major AI crawlers given explicit allow rules in robots.txt. The wildcard + * `User-agent: *` policy already permits them; per-bot entries make intent + * auditable and visible to scanners that grade per-bot. + */ +export const ALLOWED_AI_BOTS = [ + "GPTBot", + "ChatGPT-User", + "OAI-SearchBot", + "ClaudeBot", + "Claude-Web", + "Claude-SearchBot", + "anthropic-ai", + "PerplexityBot", + "Perplexity-User", + "Google-Extended", + "Applebot-Extended", + "CCBot", + "Bytespider", + "FacebookBot", +] as const; diff --git a/config/vitest.config.browser.ts b/config/vitest.config.browser.ts index de275e4e8..a63ead3a7 100644 --- a/config/vitest.config.browser.ts +++ b/config/vitest.config.browser.ts @@ -20,6 +20,10 @@ export default defineConfig({ "coverage/**", "**/*.d.ts", "lib/**/*.d.ts", + // Astro content collection schema for the docs site; imports + // the virtual `astro:content` module that only resolves inside + // Astro's runtime. Not SDK code, not in scope for SDK coverage. + "src/content.config.ts", ], }, browser: { diff --git a/config/vitest.config.ts b/config/vitest.config.ts index 1e43fa467..ced73e4a8 100644 --- a/config/vitest.config.ts +++ b/config/vitest.config.ts @@ -13,6 +13,10 @@ const coverageExclude = [ "lib/**/*.d.ts", "lib/**", "**/*/browser.js", + // Astro content collection schema for the docs site; imports the + // virtual `astro:content` module that only resolves inside Astro's + // runtime. Not SDK code, not in scope for SDK coverage. + "src/content.config.ts", ]; export default defineConfig({ diff --git a/docs/agents.md b/docs/agents.md new file mode 100644 index 000000000..6e91daf55 --- /dev/null +++ b/docs/agents.md @@ -0,0 +1,86 @@ +--- +title: AI Agents +description: Documentation bundles, raw-markdown access, and crawler signals for AI agents consuming this SDK's documentation. +--- + +# 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. diff --git a/docs/guides/00-versioning.md b/docs/guides/00-versioning.md new file mode 100644 index 000000000..122410945 --- /dev/null +++ b/docs/guides/00-versioning.md @@ -0,0 +1,32 @@ +--- +title: Versioning & Compatibility +description: + Why to use the latest @stellar/stellar-sdk, where these docs apply, and how to + find older docs and release notes. +--- + +# Versioning & Compatibility + +## Use the latest version + +We recommend always using the latest version of `@stellar/stellar-sdk` so your +application keeps working as expected on the Stellar network. The network +upgrades its protocol periodically, and an older SDK may not handle newer data — +for example, newer XDR will fail to decode when an older SDK version is used. + +You can check the protocol version a network currently runs from its Horizon +root endpoint, in the `current_protocol_version` field — for example, +[horizon.stellar.org](https://horizon.stellar.org/) for Mainnet. Each network +(Testnet, Futurenet) exposes its own Horizon root. + +## These docs cover the latest version only + +This site documents only the latest version of `@stellar/stellar-sdk`. To read +docs for an older version, find its Git tag on the +[releases page](https://github.com/stellar/js-stellar-sdk/releases) and browse +the `docs/` directory at that ref on GitHub. + +## What's new in each version + +See the [release notes](https://github.com/stellar/js-stellar-sdk/releases) for +what changed in each release — breaking changes are clearly marked. diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 000000000..79e17f356 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,461 @@ +--- +title: Stellar JS SDK (js-stellar-sdk) +description: A JavaScript library for communicating with a Stellar Horizon server and Stellar RPC. +--- + +# 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 +``` +pnpm run build:lib: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, 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 +# generate the docs site (reference pages, llms bundles, and the Astro site under dist/site) +pnpm run docs + +# preview the built site in a browser +pnpm docs:preview + +# the preview server prints the local URL (default http://localhost:4321) + +# for a live-reloading dev server instead, use: +pnpm docs:dev +``` + +### 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 a 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. diff --git a/docs/llms-full.txt b/docs/llms-full.txt new file mode 100644 index 000000000..4232c2a40 --- /dev/null +++ b/docs/llms-full.txt @@ -0,0 +1,32120 @@ +# 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 +``` +pnpm run build:lib: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, 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 +# generate the docs site (reference pages, llms bundles, and the Astro site under dist/site) +pnpm run docs + +# preview the built site in a browser +pnpm docs:preview + +# the preview server prints the local URL (default http://localhost:4321) + +# for a live-reloading dev server instead, use: +pnpm docs:dev +``` + +### 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 a 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 + +## Use the latest version + +We recommend always using the latest version of `@stellar/stellar-sdk` so your +application keeps working as expected on the Stellar network. The network +upgrades its protocol periodically, and an older SDK may not handle newer data — +for example, newer XDR will fail to decode when an older SDK version is used. + +You can check the protocol version a network currently runs from its Horizon +root endpoint, in the `current_protocol_version` field — for example, +[horizon.stellar.org](https://horizon.stellar.org/) for Mainnet. Each network +(Testnet, Futurenet) exposes its own Horizon root. + +## These docs cover the latest version only + +This site documents only the latest version of `@stellar/stellar-sdk`. To read +docs for an older version, find its Git tag on the +[releases page](https://github.com/stellar/js-stellar-sdk/releases) and browse +the `docs/` directory at that ref on GitHub. + +## What's new in each version + +See the [release notes](https://github.com/stellar/js-stellar-sdk/releases) for +what changed in each release — breaking changes are clearly marked. + +# 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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/base/operation.ts#L83) + +## AuthFlag + +```ts +type AuthFlag = { readonly clawbackEnabled: 8; readonly immutable: 4; readonly required: 1; readonly revocable: 2 } +``` + +**Source:** [src/base/operations/types.ts:431](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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`](#transactiongetkeypairsignaturekeypair) to sign the transaction. +- They should send you back their `publicKey` and the `signature` string +from [`getKeypairSignature`](#transactiongetkeypairsignaturekeypair), 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/main/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`](#transactionaddsignaturepublickey-signature) 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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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`](#transactiongetkeypairsignaturekeypair) to sign the transaction. +- They should send you back their `publicKey` and the `signature` string +from [`getKeypairSignature`](#transactiongetkeypairsignaturekeypair), 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/main/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/main/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`](#transactionaddsignaturepublickey-signature) 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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/base/auth.ts#L231) + +### `authorizeInvocationParams.invocation` + +```ts +invocation: SorobanAuthorizedInvocation; +``` + +**Source:** [src/base/auth.ts:234](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L234) + +### `authorizeInvocationParams.networkPassphrase` + +```ts +networkPassphrase: string; +``` + +**Source:** [src/base/auth.ts:235](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L235) + +### `authorizeInvocationParams.publicKey` + +```ts +publicKey?: string; +``` + +**Source:** [src/base/auth.ts:236](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/base/auth.ts#L232) + +### `authorizeInvocationParams.validUntilLedgerSeq` + +```ts +validUntilLedgerSeq: number; +``` + +**Source:** [src/base/auth.ts:233](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/base/invocation.ts#L23) + +### `createInvocation.asset` + +```ts +asset?: string; +``` + +**Source:** [src/base/invocation.ts:25](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/base/invocation.ts#L24) + +### `createInvocation.wasm` + +```ts +wasm?: WasmCreateDetails; +``` + +**Source:** [src/base/invocation.ts:26](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/base/invocation.ts#L37) + +### `executeInvocation.args` + +```ts +args: any[]; +``` + +**Source:** [src/base/invocation.ts:41](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/invocation.ts#L41) + +### `executeInvocation.function` + +```ts +function: string; +``` + +**Source:** [src/base/invocation.ts:39](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/invocation.ts#L39) + +### `executeInvocation.source` + +```ts +source: string; +``` + +**Source:** [src/base/invocation.ts:38](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/src/base/invocation.ts#L55) + +### `invocationTree.invocations` + +```ts +invocations: InvocationTree[]; +``` + +**Source:** [src/base/invocation.ts:56](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/base/invocation.ts#L6) + +### `wasmCreateDetails.address` + +```ts +address: string; +``` + +**Source:** [src/base/invocation.ts:8](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/invocation.ts#L8) + +### `wasmCreateDetails.constructorArgs` + +```ts +constructorArgs?: any[]; +``` + +**Source:** [src/base/invocation.ts:11](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/invocation.ts#L11) + +### `wasmCreateDetails.hash` + +```ts +hash: string; +``` + +**Source:** [src/base/invocation.ts:7](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/invocation.ts#L7) + +### `wasmCreateDetails.salt` + +```ts +salt: string; +``` + +**Source:** [src/base/invocation.ts:9](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/horizon/server.ts#L925) + +### `options.headers` + +```ts +headers?: Record; +``` + +**Source:** [src/horizon/server.ts:926](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/horizon/server.ts#L934) + +### `submitTransactionOptions.skipMemoRequiredCheck` + +```ts +skipMemoRequiredCheck?: boolean; +``` + +**Source:** [src/horizon/server.ts:935](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/horizon/server.ts#L929) + +### `timebounds.maxTime` + +```ts +maxTime: number; +``` + +**Source:** [src/horizon/server.ts:931](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/server.ts#L931) + +### `timebounds.minTime` + +```ts +minTime: number; +``` + +**Source:** [src/horizon/server.ts:930](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/rpc/api.ts#L589) + +### `balanceResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:587](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L376) + +### `baseSendTransactionResponse.hash` + +```ts +hash: string; +``` + +**Source:** [src/rpc/api.ts:378](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L378) + +### `baseSendTransactionResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:379](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L379) + +### `baseSendTransactionResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:380](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L380) + +### `baseSendTransactionResponse.status` + +```ts +status: SendTransactionStatus; +``` + +**Source:** [src/rpc/api.ts:377](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/src/rpc/api.ts#L228) + +### `eventFilter.contractIds` + +```ts +contractIds?: string[]; +``` + +**Source:** [src/rpc/api.ts:230](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L230) + +### `eventFilter.topics` + +```ts +topics?: string[][]; +``` + +**Source:** [src/rpc/api.ts:231](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L231) + +### `eventFilter.type` + +```ts +type?: EventType; +``` + +**Source:** [src/rpc/api.ts:229](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L304) + +### `eventResponse.contractId` + +```ts +contractId?: Contract; +``` + +**Source:** [src/rpc/api.ts:305](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L305) + +### `eventResponse.id` + +```ts +id: string; +``` + +**Source:** [src/rpc/api.ts:316](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L316) + +### `eventResponse.inSuccessfulContractCall` + +```ts +inSuccessfulContractCall: boolean; +``` + +**Source:** [src/rpc/api.ts:322](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L322) + +### `eventResponse.ledger` + +```ts +ledger: number; +``` + +**Source:** [src/rpc/api.ts:318](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L318) + +### `eventResponse.ledgerClosedAt` + +```ts +ledgerClosedAt: string; +``` + +**Source:** [src/rpc/api.ts:319](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L319) + +### `eventResponse.operationIndex` + +```ts +operationIndex: number; +``` + +**Source:** [src/rpc/api.ts:321](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L321) + +### `eventResponse.topic` + +```ts +topic: ScVal[]; +``` + +**Source:** [src/rpc/api.ts:306](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L306) + +### `eventResponse.transactionIndex` + +```ts +transactionIndex: number; +``` + +**Source:** [src/rpc/api.ts:320](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L320) + +### `eventResponse.txHash` + +```ts +txHash: string; +``` + +**Source:** [src/rpc/api.ts:323](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L323) + +### `eventResponse.type` + +```ts +type: EventType; +``` + +**Source:** [src/rpc/api.ts:317](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L317) + +### `eventResponse.value` + +```ts +value: ScVal; +``` + +**Source:** [src/rpc/api.ts:307](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/src/rpc/api.ts#L299) + +### `getEventsResponse.cursor` + +```ts +cursor: string; +``` + +**Source:** [src/rpc/api.ts:301](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L301) + +### `getEventsResponse.events` + +```ts +events: EventResponse[]; +``` + +**Source:** [src/rpc/api.ts:300](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L300) + +### `getEventsResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:235](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L235) + +### `getEventsResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: string; +``` + +**Source:** [src/rpc/api.ts:237](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L237) + +### `getEventsResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:236](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L236) + +### `getEventsResponse.oldestLedgerCloseTime` + +```ts +oldestLedgerCloseTime: string; +``` + +**Source:** [src/rpc/api.ts:238](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L97) + +### `getFailedTransactionResponse.applicationOrder` + +```ts +applicationOrder: number; +``` + +**Source:** [src/rpc/api.ts:102](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L102) + +### `getFailedTransactionResponse.createdAt` + +```ts +createdAt: number; +``` + +**Source:** [src/rpc/api.ts:101](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L101) + +### `getFailedTransactionResponse.diagnosticEventsXdr` + +```ts +diagnosticEventsXdr?: DiagnosticEvent[]; +``` + +**Source:** [src/rpc/api.ts:107](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L107) + +### `getFailedTransactionResponse.envelopeXdr` + +```ts +envelopeXdr: TransactionEnvelope; +``` + +**Source:** [src/rpc/api.ts:104](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L104) + +### `getFailedTransactionResponse.events` + +```ts +events: TransactionEvents; +``` + +**Source:** [src/rpc/api.ts:108](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L108) + +### `getFailedTransactionResponse.feeBump` + +```ts +feeBump: boolean; +``` + +**Source:** [src/rpc/api.ts:103](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L103) + +### `getFailedTransactionResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:87](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L87) + +### `getFailedTransactionResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:88](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L88) + +### `getFailedTransactionResponse.ledger` + +```ts +ledger: number; +``` + +**Source:** [src/rpc/api.ts:100](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L100) + +### `getFailedTransactionResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:89](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L89) + +### `getFailedTransactionResponse.oldestLedgerCloseTime` + +```ts +oldestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:90](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L90) + +### `getFailedTransactionResponse.resultMetaXdr` + +```ts +resultMetaXdr: TransactionMeta; +``` + +**Source:** [src/rpc/api.ts:106](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L106) + +### `getFailedTransactionResponse.resultXdr` + +```ts +resultXdr: TransactionResult; +``` + +**Source:** [src/rpc/api.ts:105](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L105) + +### `getFailedTransactionResponse.status` + +```ts +status: FAILED; +``` + +**Source:** [src/rpc/api.ts:98](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L98) + +### `getFailedTransactionResponse.txHash` + +```ts +txHash: string; +``` + +**Source:** [src/rpc/api.ts:86](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L560) + +### `getFeeStatsResponse.inclusionFee` + +```ts +inclusionFee: FeeDistribution; +``` + +**Source:** [src/rpc/api.ts:562](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L562) + +### `getFeeStatsResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:563](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L563) + +### `getFeeStatsResponse.sorobanInclusionFee` + +```ts +sorobanInclusionFee: FeeDistribution; +``` + +**Source:** [src/rpc/api.ts:561](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L5) + +### `getHealthResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:6](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L6) + +### `getHealthResponse.ledgerRetentionWindow` + +```ts +ledgerRetentionWindow: number; +``` + +**Source:** [src/rpc/api.ts:7](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L7) + +### `getHealthResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:8](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L8) + +### `getHealthResponse.status` + +```ts +status: "healthy"; +``` + +**Source:** [src/rpc/api.ts:9](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L52) + +### `getLatestLedgerResponse.closeTime` + +```ts +closeTime: string; +``` + +**Source:** [src/rpc/api.ts:56](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L56) + +### `getLatestLedgerResponse.headerXdr` + +```ts +headerXdr: LedgerHeader; +``` + +**Source:** [src/rpc/api.ts:57](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L57) + +### `getLatestLedgerResponse.id` + +```ts +id: string; +``` + +**Source:** [src/rpc/api.ts:53](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L53) + +### `getLatestLedgerResponse.metadataXdr` + +```ts +metadataXdr: LedgerCloseMeta; +``` + +**Source:** [src/rpc/api.ts:58](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L58) + +### `getLatestLedgerResponse.protocolVersion` + +```ts +protocolVersion: string; +``` + +**Source:** [src/rpc/api.ts:55](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L55) + +### `getLatestLedgerResponse.sequence` + +```ts +sequence: number; +``` + +**Source:** [src/rpc/api.ts:54](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L33) + +### `getLedgerEntriesResponse.entries` + +```ts +entries: LedgerEntryResult[]; +``` + +**Source:** [src/rpc/api.ts:34](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L34) + +### `getLedgerEntriesResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:35](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/src/rpc/api.ts#L669) + +### `getLedgersResponse.cursor` + +```ts +cursor: string; +``` + +**Source:** [src/rpc/api.ts:675](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L675) + +### `getLedgersResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:671](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L671) + +### `getLedgersResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:672](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L672) + +### `getLedgersResponse.ledgers` + +```ts +ledgers: LedgerResponse[]; +``` + +**Source:** [src/rpc/api.ts:670](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L670) + +### `getLedgersResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:673](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L673) + +### `getLedgersResponse.oldestLedgerCloseTime` + +```ts +oldestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:674](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L93) + +### `getMissingTransactionResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:87](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L87) + +### `getMissingTransactionResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:88](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L88) + +### `getMissingTransactionResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:89](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L89) + +### `getMissingTransactionResponse.oldestLedgerCloseTime` + +```ts +oldestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:90](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L94) + +### `getMissingTransactionResponse.txHash` + +```ts +txHash: string; +``` + +**Source:** [src/rpc/api.ts:86](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L45) + +### `getNetworkResponse.friendbotUrl` + +```ts +friendbotUrl?: string; +``` + +**Source:** [src/rpc/api.ts:46](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L46) + +### `getNetworkResponse.passphrase` + +```ts +passphrase: string; +``` + +**Source:** [src/rpc/api.ts:47](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L47) + +### `getNetworkResponse.protocolVersion` + +```ts +protocolVersion: string; +``` + +**Source:** [src/rpc/api.ts:48](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L111) + +### `getSuccessfulTransactionResponse.applicationOrder` + +```ts +applicationOrder: number; +``` + +**Source:** [src/rpc/api.ts:116](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L116) + +### `getSuccessfulTransactionResponse.createdAt` + +```ts +createdAt: number; +``` + +**Source:** [src/rpc/api.ts:115](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L115) + +### `getSuccessfulTransactionResponse.diagnosticEventsXdr` + +```ts +diagnosticEventsXdr?: DiagnosticEvent[]; +``` + +**Source:** [src/rpc/api.ts:121](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L121) + +### `getSuccessfulTransactionResponse.envelopeXdr` + +```ts +envelopeXdr: TransactionEnvelope; +``` + +**Source:** [src/rpc/api.ts:118](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L118) + +### `getSuccessfulTransactionResponse.events` + +```ts +events: TransactionEvents; +``` + +**Source:** [src/rpc/api.ts:124](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L124) + +### `getSuccessfulTransactionResponse.feeBump` + +```ts +feeBump: boolean; +``` + +**Source:** [src/rpc/api.ts:117](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L117) + +### `getSuccessfulTransactionResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:87](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L87) + +### `getSuccessfulTransactionResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:88](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L88) + +### `getSuccessfulTransactionResponse.ledger` + +```ts +ledger: number; +``` + +**Source:** [src/rpc/api.ts:114](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L114) + +### `getSuccessfulTransactionResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:89](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L89) + +### `getSuccessfulTransactionResponse.oldestLedgerCloseTime` + +```ts +oldestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:90](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L90) + +### `getSuccessfulTransactionResponse.resultMetaXdr` + +```ts +resultMetaXdr: TransactionMeta; +``` + +**Source:** [src/rpc/api.ts:120](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L120) + +### `getSuccessfulTransactionResponse.resultXdr` + +```ts +resultXdr: TransactionResult; +``` + +**Source:** [src/rpc/api.ts:119](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L119) + +### `getSuccessfulTransactionResponse.returnValue` + +```ts +returnValue?: ScVal; +``` + +**Source:** [src/rpc/api.ts:123](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L123) + +### `getSuccessfulTransactionResponse.status` + +```ts +status: SUCCESS; +``` + +**Source:** [src/rpc/api.ts:112](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L112) + +### `getSuccessfulTransactionResponse.txHash` + +```ts +txHash: string; +``` + +**Source:** [src/rpc/api.ts:86](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/src/rpc/api.ts#L208) + +### `getTransactionsResponse.cursor` + +```ts +cursor: string; +``` + +**Source:** [src/rpc/api.ts:214](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L214) + +### `getTransactionsResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:210](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L210) + +### `getTransactionsResponse.latestLedgerCloseTimestamp` + +```ts +latestLedgerCloseTimestamp: number; +``` + +**Source:** [src/rpc/api.ts:211](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L211) + +### `getTransactionsResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:212](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L212) + +### `getTransactionsResponse.oldestLedgerCloseTimestamp` + +```ts +oldestLedgerCloseTimestamp: number; +``` + +**Source:** [src/rpc/api.ts:213](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L213) + +### `getTransactionsResponse.transactions` + +```ts +transactions: TransactionInfo[]; +``` + +**Source:** [src/rpc/api.ts:209](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/src/rpc/api.ts#L553) + +### `getVersionInfoResponse.buildTimestamp` + +```ts +buildTimestamp: string; +``` + +**Source:** [src/rpc/api.ts:546](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L555) + +### `getVersionInfoResponse.captiveCoreVersion` + +```ts +captiveCoreVersion: string; +``` + +**Source:** [src/rpc/api.ts:547](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L551) + +### `getVersionInfoResponse.commitHash` + +```ts +commitHash: string; +``` + +**Source:** [src/rpc/api.ts:545](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L557) + +### `getVersionInfoResponse.protocolVersion` + +```ts +protocolVersion: number; +``` + +**Source:** [src/rpc/api.ts:548](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L548) + +### `getVersionInfoResponse.version` + +```ts +version: string; +``` + +**Source:** [src/rpc/api.ts:544](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/src/rpc/api.ts#L345) + +### `ledgerEntryChange.key` + +```ts +key: LedgerKey; +``` + +**Source:** [src/rpc/api.ts:344](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L344) + +### `ledgerEntryChange.type` + +```ts +type: number; +``` + +**Source:** [src/rpc/api.ts:343](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L12) + +### `ledgerEntryResult.key` + +```ts +key: LedgerKey; +``` + +**Source:** [src/rpc/api.ts:14](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L14) + +### `ledgerEntryResult.lastModifiedLedgerSeq` + +```ts +lastModifiedLedgerSeq?: number; +``` + +**Source:** [src/rpc/api.ts:13](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L13) + +### `ledgerEntryResult.liveUntilLedgerSeq` + +```ts +liveUntilLedgerSeq?: number; +``` + +**Source:** [src/rpc/api.ts:16](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L16) + +### `ledgerEntryResult.val` + +```ts +val: LedgerEntryData; +``` + +**Source:** [src/rpc/api.ts:15](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L687) + +### `ledgerResponse.hash` + +```ts +hash: string; +``` + +**Source:** [src/rpc/api.ts:688](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L688) + +### `ledgerResponse.headerXdr` + +```ts +headerXdr: LedgerHeaderHistoryEntry; +``` + +**Source:** [src/rpc/api.ts:691](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L691) + +### `ledgerResponse.ledgerCloseTime` + +```ts +ledgerCloseTime: string; +``` + +**Source:** [src/rpc/api.ts:690](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L690) + +### `ledgerResponse.metadataXdr` + +```ts +metadataXdr: LedgerCloseMeta; +``` + +**Source:** [src/rpc/api.ts:692](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L692) + +### `ledgerResponse.sequence` + +```ts +sequence: number; +``` + +**Source:** [src/rpc/api.ts:689](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L326) + +### `rawEventResponse.contractId` + +```ts +contractId: string; +``` + +**Source:** [src/rpc/api.ts:327](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L327) + +### `rawEventResponse.id` + +```ts +id: string; +``` + +**Source:** [src/rpc/api.ts:316](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L316) + +### `rawEventResponse.inSuccessfulContractCall` + +```ts +inSuccessfulContractCall: boolean; +``` + +**Source:** [src/rpc/api.ts:322](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L322) + +### `rawEventResponse.ledger` + +```ts +ledger: number; +``` + +**Source:** [src/rpc/api.ts:318](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L318) + +### `rawEventResponse.ledgerClosedAt` + +```ts +ledgerClosedAt: string; +``` + +**Source:** [src/rpc/api.ts:319](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L319) + +### `rawEventResponse.operationIndex` + +```ts +operationIndex: number; +``` + +**Source:** [src/rpc/api.ts:321](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L321) + +### `rawEventResponse.topic` + +```ts +topic?: string[]; +``` + +**Source:** [src/rpc/api.ts:328](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L328) + +### `rawEventResponse.transactionIndex` + +```ts +transactionIndex: number; +``` + +**Source:** [src/rpc/api.ts:320](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L320) + +### `rawEventResponse.txHash` + +```ts +txHash: string; +``` + +**Source:** [src/rpc/api.ts:323](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L323) + +### `rawEventResponse.type` + +```ts +type: EventType; +``` + +**Source:** [src/rpc/api.ts:317](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L317) + +### `rawEventResponse.value` + +```ts +value: string; +``` + +**Source:** [src/rpc/api.ts:329](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L310) + +### `rawGetEventsResponse.cursor` + +```ts +cursor: string; +``` + +**Source:** [src/rpc/api.ts:312](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L312) + +### `rawGetEventsResponse.events` + +```ts +events: RawEventResponse[]; +``` + +**Source:** [src/rpc/api.ts:311](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L311) + +### `rawGetEventsResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:235](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L235) + +### `rawGetEventsResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: string; +``` + +**Source:** [src/rpc/api.ts:237](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L237) + +### `rawGetEventsResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:236](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L236) + +### `rawGetEventsResponse.oldestLedgerCloseTime` + +```ts +oldestLedgerCloseTime: string; +``` + +**Source:** [src/rpc/api.ts:238](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L61) + +### `rawGetLatestLedgerResponse.closeTime` + +```ts +closeTime: string; +``` + +**Source:** [src/rpc/api.ts:65](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L67) + +### `rawGetLatestLedgerResponse.id` + +```ts +id: string; +``` + +**Source:** [src/rpc/api.ts:62](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L69) + +### `rawGetLatestLedgerResponse.protocolVersion` + +```ts +protocolVersion: string; +``` + +**Source:** [src/rpc/api.ts:64](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L64) + +### `rawGetLatestLedgerResponse.sequence` + +```ts +sequence: number; +``` + +**Source:** [src/rpc/api.ts:63](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L39) + +### `rawGetLedgerEntriesResponse.entries` + +```ts +entries?: RawLedgerEntryResult[]; +``` + +**Source:** [src/rpc/api.ts:40](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L40) + +### `rawGetLedgerEntriesResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:41](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L678) + +### `rawGetLedgersResponse.cursor` + +```ts +cursor: string; +``` + +**Source:** [src/rpc/api.ts:684](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L684) + +### `rawGetLedgersResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:680](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L680) + +### `rawGetLedgersResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:681](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L681) + +### `rawGetLedgersResponse.ledgers` + +```ts +ledgers: RawLedgerResponse[]; +``` + +**Source:** [src/rpc/api.ts:679](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L679) + +### `rawGetLedgersResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:682](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L682) + +### `rawGetLedgersResponse.oldestLedgerCloseTime` + +```ts +oldestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:683](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L127) + +### `rawGetTransactionResponse.applicationOrder` + +```ts +applicationOrder?: number; +``` + +**Source:** [src/rpc/api.ts:136](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L136) + +### `rawGetTransactionResponse.createdAt` + +```ts +createdAt?: number; +``` + +**Source:** [src/rpc/api.ts:139](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L139) + +### `rawGetTransactionResponse.diagnosticEventsXdr` + +```ts +diagnosticEventsXdr?: string[]; +``` + +**Source:** [src/rpc/api.ts:144](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L144) + +### `rawGetTransactionResponse.envelopeXdr` + +```ts +envelopeXdr?: string; +``` + +**Source:** [src/rpc/api.ts:141](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L141) + +### `rawGetTransactionResponse.events` + +```ts +events?: RawTransactionEvents; +``` + +**Source:** [src/rpc/api.ts:146](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L146) + +### `rawGetTransactionResponse.feeBump` + +```ts +feeBump?: boolean; +``` + +**Source:** [src/rpc/api.ts:137](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L137) + +### `rawGetTransactionResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:129](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L129) + +### `rawGetTransactionResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:130](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L130) + +### `rawGetTransactionResponse.ledger` + +```ts +ledger?: number; +``` + +**Source:** [src/rpc/api.ts:138](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L138) + +### `rawGetTransactionResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:131](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L131) + +### `rawGetTransactionResponse.oldestLedgerCloseTime` + +```ts +oldestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:132](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L132) + +### `rawGetTransactionResponse.resultMetaXdr` + +```ts +resultMetaXdr?: string; +``` + +**Source:** [src/rpc/api.ts:143](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L143) + +### `rawGetTransactionResponse.resultXdr` + +```ts +resultXdr?: string; +``` + +**Source:** [src/rpc/api.ts:142](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L142) + +### `rawGetTransactionResponse.status` + +```ts +status: GetTransactionStatus; +``` + +**Source:** [src/rpc/api.ts:128](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L128) + +### `rawGetTransactionResponse.txHash` + +```ts +txHash: string; +``` + +**Source:** [src/rpc/api.ts:133](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L217) + +### `rawGetTransactionsResponse.cursor` + +```ts +cursor: string; +``` + +**Source:** [src/rpc/api.ts:223](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L223) + +### `rawGetTransactionsResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:219](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L219) + +### `rawGetTransactionsResponse.latestLedgerCloseTimestamp` + +```ts +latestLedgerCloseTimestamp: number; +``` + +**Source:** [src/rpc/api.ts:220](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L220) + +### `rawGetTransactionsResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:221](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L221) + +### `rawGetTransactionsResponse.oldestLedgerCloseTimestamp` + +```ts +oldestLedgerCloseTimestamp: number; +``` + +**Source:** [src/rpc/api.ts:222](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/src/rpc/api.ts#L22) + +### `rawLedgerEntryResult.lastModifiedLedgerSeq` + +```ts +lastModifiedLedgerSeq?: number; +``` + +**Source:** [src/rpc/api.ts:20](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/src/rpc/api.ts#L695) + +### `rawLedgerResponse.hash` + +```ts +hash: string; +``` + +**Source:** [src/rpc/api.ts:696](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L700) + +### `rawLedgerResponse.ledgerCloseTime` + +```ts +ledgerCloseTime: string; +``` + +**Source:** [src/rpc/api.ts:698](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L702) + +### `rawLedgerResponse.sequence` + +```ts +sequence: number; +``` + +**Source:** [src/rpc/api.ts:697](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/src/rpc/api.ts#L367) + +### `rawSendTransactionResponse.hash` + +```ts +hash: string; +``` + +**Source:** [src/rpc/api.ts:378](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L378) + +### `rawSendTransactionResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:379](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L379) + +### `rawSendTransactionResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:380](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L380) + +### `rawSendTransactionResponse.status` + +```ts +status: SendTransactionStatus; +``` + +**Source:** [src/rpc/api.ts:377](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L519) + +### `rawSimulateTransactionResponse.error` + +```ts +error?: string; +``` + +**Source:** [src/rpc/api.ts:522](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L526) + +### `rawSimulateTransactionResponse.id` + +```ts +id: string; +``` + +**Source:** [src/rpc/api.ts:520](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L520) + +### `rawSimulateTransactionResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:521](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L521) + +### `rawSimulateTransactionResponse.minResourceFee` + +```ts +minResourceFee?: string; +``` + +**Source:** [src/rpc/api.ts:527](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/src/rpc/api.ts#L165) + +### `rawTransactionEvents.contractEventsXdr` + +```ts +contractEventsXdr?: string[][]; +``` + +**Source:** [src/rpc/api.ts:167](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L167) + +### `rawTransactionEvents.transactionEventsXdr` + +```ts +transactionEventsXdr?: string[]; +``` + +**Source:** [src/rpc/api.ts:166](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L170) + +### `rawTransactionInfo.applicationOrder` + +```ts +applicationOrder: number; +``` + +**Source:** [src/rpc/api.ts:174](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L174) + +### `rawTransactionInfo.createdAt` + +```ts +createdAt: number; +``` + +**Source:** [src/rpc/api.ts:173](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L173) + +### `rawTransactionInfo.diagnosticEventsXdr` + +```ts +diagnosticEventsXdr?: string[]; +``` + +**Source:** [src/rpc/api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L181) + +### `rawTransactionInfo.envelopeXdr` + +```ts +envelopeXdr?: string; +``` + +**Source:** [src/rpc/api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L178) + +### `rawTransactionInfo.events` + +```ts +events?: RawTransactionEvents; +``` + +**Source:** [src/rpc/api.ts:183](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L183) + +### `rawTransactionInfo.feeBump` + +```ts +feeBump: boolean; +``` + +**Source:** [src/rpc/api.ts:175](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L175) + +### `rawTransactionInfo.ledger` + +```ts +ledger: number; +``` + +**Source:** [src/rpc/api.ts:172](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L172) + +### `rawTransactionInfo.resultMetaXdr` + +```ts +resultMetaXdr?: string; +``` + +**Source:** [src/rpc/api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L180) + +### `rawTransactionInfo.resultXdr` + +```ts +resultXdr?: string; +``` + +**Source:** [src/rpc/api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L179) + +### `rawTransactionInfo.status` + +```ts +status: GetTransactionStatus; +``` + +**Source:** [src/rpc/api.ts:171](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L171) + +### `rawTransactionInfo.txHash` + +```ts +txHash: string; +``` + +**Source:** [src/rpc/api.ts:176](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L355) + +### `sendTransactionResponse.diagnosticEvents` + +```ts +diagnosticEvents?: DiagnosticEvent[]; +``` + +**Source:** [src/rpc/api.ts:357](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L357) + +### `sendTransactionResponse.errorResult` + +```ts +errorResult?: TransactionResult; +``` + +**Source:** [src/rpc/api.ts:356](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L356) + +### `sendTransactionResponse.hash` + +```ts +hash: string; +``` + +**Source:** [src/rpc/api.ts:378](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L378) + +### `sendTransactionResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:379](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L379) + +### `sendTransactionResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:380](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L380) + +### `sendTransactionResponse.status` + +```ts +status: SendTransactionStatus; +``` + +**Source:** [src/rpc/api.ts:377](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/src/rpc/api.ts#L383) + +### `simulateHostFunctionResult.auth` + +```ts +auth: SorobanAuthorizationEntry[]; +``` + +**Source:** [src/rpc/api.ts:384](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L384) + +### `simulateHostFunctionResult.retval` + +```ts +retval: ScVal; +``` + +**Source:** [src/rpc/api.ts:385](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/src/rpc/api.ts#L425) + +### `simulateTransactionErrorResponse.error` + +```ts +error: string; +``` + +**Source:** [src/rpc/api.ts:442](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/rpc/api.ts#L415) + +### `simulateTransactionRestoreResponse.minResourceFee` + +```ts +minResourceFee: string; +``` + +**Source:** [src/rpc/api.ts:431](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/src/rpc/api.ts#L437) + +### `simulateTransactionRestoreResponse.transactionData` + +```ts +transactionData: SorobanDataBuilder; +``` + +**Source:** [src/rpc/api.ts:430](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/src/rpc/api.ts#L415) + +### `simulateTransactionSuccessResponse.minResourceFee` + +```ts +minResourceFee: string; +``` + +**Source:** [src/rpc/api.ts:431](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/src/rpc/api.ts#L437) + +### `simulateTransactionSuccessResponse.transactionData` + +```ts +transactionData: SorobanDataBuilder; +``` + +**Source:** [src/rpc/api.ts:430](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/src/rpc/api.ts#L186) + +### `transactionEvents.contractEventsXdr` + +```ts +contractEventsXdr: ContractEvent[][]; +``` + +**Source:** [src/rpc/api.ts:188](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L188) + +### `transactionEvents.transactionEventsXdr` + +```ts +transactionEventsXdr: TransactionEvent[]; +``` + +**Source:** [src/rpc/api.ts:187](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L191) + +### `transactionInfo.applicationOrder` + +```ts +applicationOrder: number; +``` + +**Source:** [src/rpc/api.ts:195](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L195) + +### `transactionInfo.createdAt` + +```ts +createdAt: number; +``` + +**Source:** [src/rpc/api.ts:194](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L194) + +### `transactionInfo.diagnosticEventsXdr` + +```ts +diagnosticEventsXdr?: DiagnosticEvent[]; +``` + +**Source:** [src/rpc/api.ts:203](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L203) + +### `transactionInfo.envelopeXdr` + +```ts +envelopeXdr: TransactionEnvelope; +``` + +**Source:** [src/rpc/api.ts:199](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L199) + +### `transactionInfo.events` + +```ts +events: TransactionEvents; +``` + +**Source:** [src/rpc/api.ts:205](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L205) + +### `transactionInfo.feeBump` + +```ts +feeBump: boolean; +``` + +**Source:** [src/rpc/api.ts:196](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L196) + +### `transactionInfo.ledger` + +```ts +ledger: number; +``` + +**Source:** [src/rpc/api.ts:193](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L193) + +### `transactionInfo.resultMetaXdr` + +```ts +resultMetaXdr: TransactionMeta; +``` + +**Source:** [src/rpc/api.ts:201](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L201) + +### `transactionInfo.resultXdr` + +```ts +resultXdr: TransactionResult; +``` + +**Source:** [src/rpc/api.ts:200](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L200) + +### `transactionInfo.returnValue` + +```ts +returnValue?: ScVal; +``` + +**Source:** [src/rpc/api.ts:202](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L202) + +### `transactionInfo.status` + +```ts +status: GetTransactionStatus; +``` + +**Source:** [src/rpc/api.ts:192](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L192) + +### `transactionInfo.txHash` + +```ts +txHash: string; +``` + +**Source:** [src/rpc/api.ts:197](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/rpc/server.ts#L896) + +### `server._getLatestLedger()` + +```ts +_getLatestLedger(): Promise; +``` + +**Source:** [src/rpc/server.ts:967](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/rpc/server.ts#L60) + +### `pollingOptions.attempts` + +```ts +attempts?: number; +``` + +**Source:** [src/rpc/server.ts:61](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L61) + +### `pollingOptions.sleepStrategy` + +```ts +sleepStrategy?: SleepStrategy; +``` + +**Source:** [src/rpc/server.ts:62](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/src/friendbot/index.ts#L3) + +### `response.hash` + +```ts +hash: string; +``` + +**Source:** [src/friendbot/index.ts:4](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/contract/client.ts#L214) + +## contract.ClientOptions + +Options for a smart contract client. + +```ts +type ClientOptions = { allowHttp?: boolean; contractId: string; errorTypes?: Record; headers?: Record; networkPassphrase: string; publicKey?: string; rpcUrl: string; server?: Server; signAuthEntry?: SignAuthEntry; signTransaction?: SignTransaction } +``` + +**Source:** [src/contract/types.ts:127](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/src/contract/rust_result.ts#L52) + +## contract.MethodOptions + +Options for a smart contract method invocation. + +```ts +type MethodOptions = { fee?: string; publicKey?: string; restore?: boolean; signAuthEntry?: SignAuthEntry; signTransaction?: SignTransaction; simulate?: boolean; timeoutInSeconds?: number } +``` + +**Source:** [src/contract/types.ts:203](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/contract/spec.ts#L14) + +### `union.tag` + +```ts +tag: string; +``` + +**Source:** [src/contract/spec.ts:15](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/spec.ts#L15) + +### `union.values` + +```ts +values?: T; +``` + +**Source:** [src/contract/spec.ts:16](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/contract/types.ts#L60) + +### `walletError.code` + +```ts +code: number; +``` + +**Source:** [src/contract/types.ts:62](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L62) + +### `walletError.ext` + +```ts +ext?: string[]; +``` + +**Source:** [src/contract/types.ts:63](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L63) + +### `walletError.message` + +```ts +message: string; +``` + +**Source:** [src/contract/types.ts:61](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/stellartoml/index.ts#L158) + +### `currency.code` + +```ts +code?: string; +``` + +**Source:** [src/stellartoml/index.ts:135](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/src/stellartoml/index.ts#L163) + +### `currency.conditions` + +```ts +conditions?: string; +``` + +**Source:** [src/stellartoml/index.ts:142](https://github.com/stellar/js-stellar-sdk/blob/main/src/stellartoml/index.ts#L142) + +### `currency.desc` + +```ts +desc?: string; +``` + +**Source:** [src/stellartoml/index.ts:141](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/src/stellartoml/index.ts#L143) + +### `currency.image` + +```ts +image?: string; +``` + +**Source:** [src/stellartoml/index.ts:161](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/src/stellartoml/index.ts#L159) + +### `currency.issuer` + +```ts +issuer?: string; +``` + +**Source:** [src/stellartoml/index.ts:137](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/stellartoml/index.ts#L144) + +### `currency.name` + +```ts +name?: string; +``` + +**Source:** [src/stellartoml/index.ts:140](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/stellartoml/index.ts#L160) + +### `currency.regulated` + +```ts +regulated?: boolean; +``` + +**Source:** [src/stellartoml/index.ts:162](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/stellartoml/index.ts#L123) + +### `principal.email` + +```ts +email: string; +``` + +**Source:** [src/stellartoml/index.ts:125](https://github.com/stellar/js-stellar-sdk/blob/main/src/stellartoml/index.ts#L125) + +### `principal.github` + +```ts +github?: string; +``` + +**Source:** [src/stellartoml/index.ts:126](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/stellartoml/index.ts#L130) + +### `principal.keybase` + +```ts +keybase?: string; +``` + +**Source:** [src/stellartoml/index.ts:127](https://github.com/stellar/js-stellar-sdk/blob/main/src/stellartoml/index.ts#L127) + +### `principal.name` + +```ts +name: string; +``` + +**Source:** [src/stellartoml/index.ts:124](https://github.com/stellar/js-stellar-sdk/blob/main/src/stellartoml/index.ts#L124) + +### `principal.telegram` + +```ts +telegram?: string; +``` + +**Source:** [src/stellartoml/index.ts:128](https://github.com/stellar/js-stellar-sdk/blob/main/src/stellartoml/index.ts#L128) + +### `principal.twitter` + +```ts +twitter?: string; +``` + +**Source:** [src/stellartoml/index.ts:129](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/src/stellartoml/index.ts#L182) + +### `stellarToml.ACCOUNTS` + +```ts +ACCOUNTS?: string[]; +``` + +**Source:** [src/stellartoml/index.ts:184](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/stellartoml/index.ts#L197) + +### `stellarToml.CURRENCIES` + +```ts +CURRENCIES?: Currency[]; +``` + +**Source:** [src/stellartoml/index.ts:200](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/stellartoml/index.ts#L196) + +### `stellarToml.DOCUMENTATION` + +```ts +DOCUMENTATION?: Documentation; +``` + +**Source:** [src/stellartoml/index.ts:198](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/src/stellartoml/index.ts#L185) + +### `stellarToml.PRINCIPALS` + +```ts +PRINCIPALS?: Principal[]; +``` + +**Source:** [src/stellartoml/index.ts:199](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/src/stellartoml/index.ts#L195) + +### `stellarToml.VALIDATORS` + +```ts +VALIDATORS?: Validator[]; +``` + +**Source:** [src/stellartoml/index.ts:201](https://github.com/stellar/js-stellar-sdk/blob/main/src/stellartoml/index.ts#L201) + +### `stellarToml.VERSION` + +```ts +VERSION?: string; +``` + +**Source:** [src/stellartoml/index.ts:183](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/src/stellartoml/index.ts#L94) + +### `stellarTomlResolveOptions.allowedRedirects` + +```ts +allowedRedirects?: number; +``` + +**Source:** [src/stellartoml/index.ts:97](https://github.com/stellar/js-stellar-sdk/blob/main/src/stellartoml/index.ts#L97) + +### `stellarTomlResolveOptions.allowHttp` + +```ts +allowHttp?: boolean; +``` + +**Source:** [src/stellartoml/index.ts:95](https://github.com/stellar/js-stellar-sdk/blob/main/src/stellartoml/index.ts#L95) + +### `stellarTomlResolveOptions.timeout` + +```ts +timeout?: number; +``` + +**Source:** [src/stellartoml/index.ts:96](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/src/stellartoml/index.ts#L171) + +### `validator.ALIAS` + +```ts +ALIAS?: string; +``` + +**Source:** [src/stellartoml/index.ts:172](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/stellartoml/index.ts#L173) + +### `validator.HISTORY` + +```ts +HISTORY?: string; +``` + +**Source:** [src/stellartoml/index.ts:176](https://github.com/stellar/js-stellar-sdk/blob/main/src/stellartoml/index.ts#L176) + +### `validator.HOST` + +```ts +HOST?: string; +``` + +**Source:** [src/stellartoml/index.ts:175](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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 = { clientAccountId: string; matchedHomeDomain: string; memo?: string; tx: Transaction } +``` + +**Source:** [src/webauth/utils.ts:104](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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) diff --git a/docs/llms.txt b/docs/llms.txt new file mode 100644 index 000000000..b571c26bf --- /dev/null +++ b/docs/llms.txt @@ -0,0 +1,34 @@ +# @stellar/stellar-sdk + +> A library for working with the Stellar network, including communication with the Horizon and Soroban RPC servers. + +- Version: 15.0.1 +- Source ref: main + +## Guides + +- [Versioning & Compatibility](guides/00-versioning) + +## Reference + +- [Core / Keys](reference/core-keys) +- [Core / Assets](reference/core-assets) +- [Core / Transactions](reference/core-transactions) +- [Core / XDR](reference/core-xdr) +- [Core / Soroban Primitives](reference/core-soroban-primitives) +- [Network / Horizon](reference/network-horizon) +- [Network / RPC](reference/network-rpc) +- [Network / Friendbot](reference/network-friendbot) +- [Network / HTTP](reference/network-http) +- [Contracts / Client](reference/contracts-client) +- [Contracts / Bindings](reference/contracts-bindings) +- [SEPs / Toml](reference/seps-toml) +- [SEPs / Federation](reference/seps-federation) +- [SEPs / WebAuth](reference/seps-webauth) +- [Errors](reference/errors) +- [Cross-cutting](reference/cross-cutting) + +## Other + +- [AI Agents](agents): Documentation bundles, raw-markdown access, and crawler signals for AI agents consuming this SDK's documentation. +- [Full bundle](llms-full.txt): All guide and reference content plus CHANGELOG, in one file. diff --git a/docs/reference/contracts-bindings.md b/docs/reference/contracts-bindings.md new file mode 100644 index 000000000..309d577a1 --- /dev/null +++ b/docs/reference/contracts-bindings.md @@ -0,0 +1,236 @@ +--- +title: Contracts / Bindings +description: Generate strongly-typed TypeScript bindings from a Soroban contract's WASM or interface metadata. +--- + +# 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/main/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/main/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/main/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/main/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/main/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/main/src/bindings/generator.ts#L226) diff --git a/docs/reference/contracts-client.md b/docs/reference/contracts-client.md new file mode 100644 index 000000000..150bb519e --- /dev/null +++ b/docs/reference/contracts-client.md @@ -0,0 +1,1688 @@ +--- +title: Contracts / Client +description: High-level client for invoking Soroban smart contracts — assemble, simulate, sign, and submit calls. +--- + +# 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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/contract/client.ts#L214) + +## contract.ClientOptions + +Options for a smart contract client. + +```ts +type ClientOptions = { allowHttp?: boolean; contractId: string; errorTypes?: Record; headers?: Record; networkPassphrase: string; publicKey?: string; rpcUrl: string; server?: Server; signAuthEntry?: SignAuthEntry; signTransaction?: SignTransaction } +``` + +**Source:** [src/contract/types.ts:127](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/src/contract/rust_result.ts#L52) + +## contract.MethodOptions + +Options for a smart contract method invocation. + +```ts +type MethodOptions = { fee?: string; publicKey?: string; restore?: boolean; signAuthEntry?: SignAuthEntry; signTransaction?: SignTransaction; simulate?: boolean; timeoutInSeconds?: number } +``` + +**Source:** [src/contract/types.ts:203](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/contract/spec.ts#L14) + +### `union.tag` + +```ts +tag: string; +``` + +**Source:** [src/contract/spec.ts:15](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/spec.ts#L15) + +### `union.values` + +```ts +values?: T; +``` + +**Source:** [src/contract/spec.ts:16](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/contract/types.ts#L60) + +### `walletError.code` + +```ts +code: number; +``` + +**Source:** [src/contract/types.ts:62](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L62) + +### `walletError.ext` + +```ts +ext?: string[]; +``` + +**Source:** [src/contract/types.ts:63](https://github.com/stellar/js-stellar-sdk/blob/main/src/contract/types.ts#L63) + +### `walletError.message` + +```ts +message: string; +``` + +**Source:** [src/contract/types.ts:61](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/contract/types.ts#L20) diff --git a/docs/reference/core-assets.md b/docs/reference/core-assets.md new file mode 100644 index 000000000..f62ad75dc --- /dev/null +++ b/docs/reference/core-assets.md @@ -0,0 +1,814 @@ +--- +title: Core / Assets +description: Asset and liquidity-pool primitives — native, alphanumeric, claimable balances, and pool IDs. +--- + +# 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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/base/get_liquidity_pool_id.ts#L38) diff --git a/docs/reference/core-keys.md b/docs/reference/core-keys.md new file mode 100644 index 000000000..f85e0dfb0 --- /dev/null +++ b/docs/reference/core-keys.md @@ -0,0 +1,832 @@ +--- +title: Core / Keys +description: Public/private keypair handling — generate, sign, verify, and encode keys as Stellar strkeys. +--- + +# 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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/base/signing.ts#L31) diff --git a/docs/reference/core-soroban-primitives.md b/docs/reference/core-soroban-primitives.md new file mode 100644 index 000000000..703d5c779 --- /dev/null +++ b/docs/reference/core-soroban-primitives.md @@ -0,0 +1,1301 @@ +--- +title: Core / Soroban Primitives +description: Soroban smart-contract primitives — Address, contract IDs, and ScVal conversion helpers. +--- + +# 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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/base/auth.ts#L231) + +### `authorizeInvocationParams.invocation` + +```ts +invocation: SorobanAuthorizedInvocation; +``` + +**Source:** [src/base/auth.ts:234](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L234) + +### `authorizeInvocationParams.networkPassphrase` + +```ts +networkPassphrase: string; +``` + +**Source:** [src/base/auth.ts:235](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L235) + +### `authorizeInvocationParams.publicKey` + +```ts +publicKey?: string; +``` + +**Source:** [src/base/auth.ts:236](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/base/auth.ts#L232) + +### `authorizeInvocationParams.validUntilLedgerSeq` + +```ts +validUntilLedgerSeq: number; +``` + +**Source:** [src/base/auth.ts:233](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/base/invocation.ts#L23) + +### `createInvocation.asset` + +```ts +asset?: string; +``` + +**Source:** [src/base/invocation.ts:25](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/base/invocation.ts#L24) + +### `createInvocation.wasm` + +```ts +wasm?: WasmCreateDetails; +``` + +**Source:** [src/base/invocation.ts:26](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/base/invocation.ts#L37) + +### `executeInvocation.args` + +```ts +args: any[]; +``` + +**Source:** [src/base/invocation.ts:41](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/invocation.ts#L41) + +### `executeInvocation.function` + +```ts +function: string; +``` + +**Source:** [src/base/invocation.ts:39](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/invocation.ts#L39) + +### `executeInvocation.source` + +```ts +source: string; +``` + +**Source:** [src/base/invocation.ts:38](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/src/base/invocation.ts#L55) + +### `invocationTree.invocations` + +```ts +invocations: InvocationTree[]; +``` + +**Source:** [src/base/invocation.ts:56](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/base/invocation.ts#L6) + +### `wasmCreateDetails.address` + +```ts +address: string; +``` + +**Source:** [src/base/invocation.ts:8](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/invocation.ts#L8) + +### `wasmCreateDetails.constructorArgs` + +```ts +constructorArgs?: any[]; +``` + +**Source:** [src/base/invocation.ts:11](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/invocation.ts#L11) + +### `wasmCreateDetails.hash` + +```ts +hash: string; +``` + +**Source:** [src/base/invocation.ts:7](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/invocation.ts#L7) + +### `wasmCreateDetails.salt` + +```ts +salt: string; +``` + +**Source:** [src/base/invocation.ts:9](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/base/invocation.ts#L229) diff --git a/docs/reference/core-transactions.md b/docs/reference/core-transactions.md new file mode 100644 index 000000000..ada496bba --- /dev/null +++ b/docs/reference/core-transactions.md @@ -0,0 +1,4309 @@ +--- +title: Core / Transactions +description: Build, sign, and inspect Stellar transactions with the TransactionBuilder API. +--- + +# 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/main/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/main/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/main/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/main/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/main/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/main/src/base/operation.ts#L83) + +## AuthFlag + +```ts +type AuthFlag = { readonly clawbackEnabled: 8; readonly immutable: 4; readonly required: 1; readonly revocable: 2 } +``` + +**Source:** [src/base/operations/types.ts:431](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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`](#transactiongetkeypairsignaturekeypair) to sign the transaction. +- They should send you back their `publicKey` and the `signature` string +from [`getKeypairSignature`](#transactiongetkeypairsignaturekeypair), 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/main/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`](#transactionaddsignaturepublickey-signature) 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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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`](#transactiongetkeypairsignaturekeypair) to sign the transaction. +- They should send you back their `publicKey` and the `signature` string +from [`getKeypairSignature`](#transactiongetkeypairsignaturekeypair), 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/main/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/main/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`](#transactionaddsignaturepublickey-signature) 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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/base/numbers/index.ts#L31) diff --git a/docs/reference/core-xdr.md b/docs/reference/core-xdr.md new file mode 100644 index 000000000..214203119 --- /dev/null +++ b/docs/reference/core-xdr.md @@ -0,0 +1,20 @@ +--- +title: Core / XDR +description: XDR encoding utilities and hashing helpers used by the SDK internally and re-exported for callers. +--- + +# 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/main/src/base/hashing.ts#L8) diff --git a/docs/reference/cross-cutting.md b/docs/reference/cross-cutting.md new file mode 100644 index 000000000..0b6e89458 --- /dev/null +++ b/docs/reference/cross-cutting.md @@ -0,0 +1,164 @@ +--- +title: Cross-cutting +description: Cross-cutting utilities — global configuration, BigNumber helpers, URL parsing, and shared internals. +--- + +# 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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/utils.ts#L17) diff --git a/docs/reference/errors.md b/docs/reference/errors.md new file mode 100644 index 000000000..66170a6a1 --- /dev/null +++ b/docs/reference/errors.md @@ -0,0 +1,1086 @@ +--- +title: Errors +description: Error classes thrown by the SDK and the patterns for distinguishing them at runtime. +--- + +# 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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/lib/lib.es5.d.ts#L1078) diff --git a/docs/reference/examples.md b/docs/reference/examples.md deleted file mode 100644 index 7fde9f797..000000000 --- a/docs/reference/examples.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -title: Basic Examples ---- - -- [Creating a payment Transaction](#creating-a-payment-transaction) -- [Loading an account's transaction history](#loading-an-accounts-transaction-history) -- [Streaming payment events](#streaming-payment-events) - -## Creating a payment transaction - -The `js-stellar-sdk` exposes the [`TransactionBuilder`](https://stellar.github.io/js-stellar-base/TransactionBuilder.html) class from `js-stellar-base`. There are more examples of [building transactions here](https://github.com/stellar/js-stellar-base/blob/master/docs/reference/base-examples.md). All those examples can be signed and submitted to Stellar in a similar manner as is done below. - -In this example, the destination account must exist. The example is written -using modern Javascript, but `await` calls can also be rendered with promises. - -```javascript -// Create, sign, and submit a transaction using JS Stellar SDK. - -// Assumes that you have the following items: -// 1. Secret key of a funded account to be the source account -// 2. Public key of an existing account as a recipient -// These two keys can be created and funded by the friendbot at -// https://laboratory.stellar.org under the heading "Quick Start: Test Account" -// 3. Access to JS Stellar SDK (https://github.com/stellar/js-stellar-sdk) -// either through Node.js or in the browser. - -// This code can be run in the browser at https://laboratory.stellar.org -// That site exposes a global StellarSdk object you can use. -// To run this code in Chrome, open the console tab in the DevTools. -// The hotkey to open the DevTools console is Ctrl+Shift+J or (Cmd+Opt+J on Mac). -const { - Horizon, - Networks, - Asset, - Keypair, - Operation, - TransactionBuilder, -} = require('@stellar/stellar-sdk'); - -// The source account is the account we will be signing and sending from. -const sourceSecretKey = 'SCZANGBA5YHTNYVVV4C3U252E2B6P6F5T3U6MM63WBSBZATAQI3EBTQ4'; - -// Derive Keypair object and public key (that starts with a G) from the secret -const sourceKeypair = Keypair.fromSecret(sourceSecretKey); -const sourcePublicKey = sourceKeypair.publicKey(); - -const receiverPublicKey = 'GAIRISXKPLOWZBMFRPU5XRGUUX3VMA3ZEWKBM5MSNRU3CHV6P4PYZ74D'; - -// Configure the server to the Horizon instance hosted by Stellar.org -// To use the live network, set the hostname to 'horizon.stellar.org' -const server = new Horizon.Server('https://horizon-testnet.stellar.org'); - -(async function main() { - // Transactions require a valid sequence number that is specific to this account. - // We can fetch the current sequence number for the source account from Horizon. - const account = await server.loadAccount(sourcePublicKey); - - // Right now, there's one function that fetches the base fee. - const fee = await server.fetchBaseFee(); - - const transaction = new TransactionBuilder(account, { - fee, - // Uncomment the following line to build transactions for the live network. Be - // sure to also change the horizon hostname. - // networkPassphrase: StellarSdk.Networks.PUBLIC, - networkPassphrase: Networks.TESTNET - }) - // Add a payment operation to the transaction - .addOperation(Operation.payment({ - destination: receiverPublicKey, - // The term native asset refers to lumens - asset: Asset.native(), - // Specify 350.1234567 lumens. Lumens are divisible to seven digits past - // the decimal. They are represented in the SDK in string format to avoid - // errors from the use of the JavaScript Number data structure. - amount: '350.1234567', - })) - // Make this transaction valid for the next 30 seconds only - .setTimeout(30) - // Uncomment to add a memo (https://developers.stellar.org/docs/glossary/transactions/) - // .addMemo(Memo.text('Hello world!')) - .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). - transaction.sign(sourceKeypair); - - // Let's see the XDR (encoded in base64) of the transaction we just built - console.log(transaction.toEnvelope().toXDR('base64')); - - // Submit the transaction to the Horizon server. The Horizon server will then - // submit the transaction into the network for us. - try { - const transactionResult = await server.submitTransaction(transaction); - console.log(JSON.stringify(transactionResult, null, 2)); - console.log('\nSuccess! View the transaction at: '); - console.log(transactionResult._links.transaction.href); - } catch (e) { - console.log('An error has occurred:'); - console.log(e); - } -})(); -``` - -## Loading an account's transaction history - -Let's say you want to look at an account's transaction history. You can use the `transactions()` command and pass in the account address to `forAccount` as the resource you're interested in. - -```javascript -const StellarSdk = require('@stellar/stellar-sdk') -const server = new StellarSdk.Horizon.Server('https://horizon-testnet.stellar.org'); -const accountId = 'GBBORXCY3PQRRDLJ7G7DWHQBXPCJVFGJ4RGMJQVAX6ORAUH6RWSPP6FM'; - -server.transactions() - .forAccount(accountId) - .call() - .then(function (page) { - console.log('Page 1: '); - console.log(page.records); - return page.next(); - }) - .then(function (page) { - console.log('Page 2: '); - console.log(page.records); - }) - .catch(function (err) { - console.log(err); - }); -``` - -## Streaming payment events - -The SDK provides streaming support for Horizon endpoints using `EventSource`. You can pass a function to handle any events that occur on the stream. - -Try submitting a transaction (via the guide above) while running the following code example. - -```javascript -const StellarSdk = require('@stellar/stellar-sdk') -const server = new StellarSdk.Horizon.Server('https://horizon-testnet.stellar.org'); - -// Get a message any time a payment occurs. Cursor is set to "now" to be notified -// of payments happening starting from when this script runs (as opposed to from -// the beginning of time). -const es = server.payments() - .cursor('now') - .stream({ - onmessage: function (message) { - console.log(message); - } - }) -``` - -For more on streaming events, please check out [the Horizon documentation](https://developers.stellar.org/api/introduction/streaming/) and this [guide to server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events). diff --git a/docs/reference/network-friendbot.md b/docs/reference/network-friendbot.md new file mode 100644 index 000000000..128ed36dd --- /dev/null +++ b/docs/reference/network-friendbot.md @@ -0,0 +1,33 @@ +--- +title: Network / Friendbot +description: Testnet account funding via Friendbot — request lumens for accounts on test networks. +--- + +# 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/main/src/friendbot/index.ts#L3) + +### `response.hash` + +```ts +hash: string; +``` + +**Source:** [src/friendbot/index.ts:4](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/friendbot/index.ts#L5) diff --git a/docs/reference/network-horizon.md b/docs/reference/network-horizon.md new file mode 100644 index 000000000..3390f148e --- /dev/null +++ b/docs/reference/network-horizon.md @@ -0,0 +1,12932 @@ +--- +title: Network / Horizon +description: Client for the Stellar Horizon REST API — accounts, payments, paths, offers, and streaming endpoints. +--- + +# 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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/horizon/server.ts#L925) + +### `options.headers` + +```ts +headers?: Record; +``` + +**Source:** [src/horizon/server.ts:926](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/horizon/server.ts#L934) + +### `submitTransactionOptions.skipMemoRequiredCheck` + +```ts +skipMemoRequiredCheck?: boolean; +``` + +**Source:** [src/horizon/server.ts:935](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/horizon/server.ts#L929) + +### `timebounds.maxTime` + +```ts +maxTime: number; +``` + +**Source:** [src/horizon/server.ts:931](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/server.ts#L931) + +### `timebounds.minTime` + +```ts +minTime: number; +``` + +**Source:** [src/horizon/server.ts:930](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/horizon/horizon_axios_client.ts#L96) diff --git a/docs/reference/network-http.md b/docs/reference/network-http.md new file mode 100644 index 000000000..7d641cf97 --- /dev/null +++ b/docs/reference/network-http.md @@ -0,0 +1,6 @@ +--- +title: Network / HTTP +description: HTTP client primitives — timeouts, headers, and URL utilities shared by the Horizon and RPC clients. +--- + +# Network / HTTP diff --git a/docs/reference/network-rpc.md b/docs/reference/network-rpc.md new file mode 100644 index 000000000..3c6993817 --- /dev/null +++ b/docs/reference/network-rpc.md @@ -0,0 +1,4515 @@ +--- +title: Network / RPC +description: Client for Soroban RPC — simulate, send, and poll Soroban smart-contract transactions. +--- + +# 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/main/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/main/src/rpc/api.ts#L589) + +### `balanceResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:587](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L376) + +### `baseSendTransactionResponse.hash` + +```ts +hash: string; +``` + +**Source:** [src/rpc/api.ts:378](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L378) + +### `baseSendTransactionResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:379](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L379) + +### `baseSendTransactionResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:380](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L380) + +### `baseSendTransactionResponse.status` + +```ts +status: SendTransactionStatus; +``` + +**Source:** [src/rpc/api.ts:377](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/src/rpc/api.ts#L228) + +### `eventFilter.contractIds` + +```ts +contractIds?: string[]; +``` + +**Source:** [src/rpc/api.ts:230](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L230) + +### `eventFilter.topics` + +```ts +topics?: string[][]; +``` + +**Source:** [src/rpc/api.ts:231](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L231) + +### `eventFilter.type` + +```ts +type?: EventType; +``` + +**Source:** [src/rpc/api.ts:229](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L304) + +### `eventResponse.contractId` + +```ts +contractId?: Contract; +``` + +**Source:** [src/rpc/api.ts:305](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L305) + +### `eventResponse.id` + +```ts +id: string; +``` + +**Source:** [src/rpc/api.ts:316](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L316) + +### `eventResponse.inSuccessfulContractCall` + +```ts +inSuccessfulContractCall: boolean; +``` + +**Source:** [src/rpc/api.ts:322](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L322) + +### `eventResponse.ledger` + +```ts +ledger: number; +``` + +**Source:** [src/rpc/api.ts:318](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L318) + +### `eventResponse.ledgerClosedAt` + +```ts +ledgerClosedAt: string; +``` + +**Source:** [src/rpc/api.ts:319](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L319) + +### `eventResponse.operationIndex` + +```ts +operationIndex: number; +``` + +**Source:** [src/rpc/api.ts:321](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L321) + +### `eventResponse.topic` + +```ts +topic: ScVal[]; +``` + +**Source:** [src/rpc/api.ts:306](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L306) + +### `eventResponse.transactionIndex` + +```ts +transactionIndex: number; +``` + +**Source:** [src/rpc/api.ts:320](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L320) + +### `eventResponse.txHash` + +```ts +txHash: string; +``` + +**Source:** [src/rpc/api.ts:323](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L323) + +### `eventResponse.type` + +```ts +type: EventType; +``` + +**Source:** [src/rpc/api.ts:317](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L317) + +### `eventResponse.value` + +```ts +value: ScVal; +``` + +**Source:** [src/rpc/api.ts:307](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/src/rpc/api.ts#L299) + +### `getEventsResponse.cursor` + +```ts +cursor: string; +``` + +**Source:** [src/rpc/api.ts:301](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L301) + +### `getEventsResponse.events` + +```ts +events: EventResponse[]; +``` + +**Source:** [src/rpc/api.ts:300](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L300) + +### `getEventsResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:235](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L235) + +### `getEventsResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: string; +``` + +**Source:** [src/rpc/api.ts:237](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L237) + +### `getEventsResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:236](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L236) + +### `getEventsResponse.oldestLedgerCloseTime` + +```ts +oldestLedgerCloseTime: string; +``` + +**Source:** [src/rpc/api.ts:238](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L97) + +### `getFailedTransactionResponse.applicationOrder` + +```ts +applicationOrder: number; +``` + +**Source:** [src/rpc/api.ts:102](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L102) + +### `getFailedTransactionResponse.createdAt` + +```ts +createdAt: number; +``` + +**Source:** [src/rpc/api.ts:101](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L101) + +### `getFailedTransactionResponse.diagnosticEventsXdr` + +```ts +diagnosticEventsXdr?: DiagnosticEvent[]; +``` + +**Source:** [src/rpc/api.ts:107](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L107) + +### `getFailedTransactionResponse.envelopeXdr` + +```ts +envelopeXdr: TransactionEnvelope; +``` + +**Source:** [src/rpc/api.ts:104](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L104) + +### `getFailedTransactionResponse.events` + +```ts +events: TransactionEvents; +``` + +**Source:** [src/rpc/api.ts:108](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L108) + +### `getFailedTransactionResponse.feeBump` + +```ts +feeBump: boolean; +``` + +**Source:** [src/rpc/api.ts:103](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L103) + +### `getFailedTransactionResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:87](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L87) + +### `getFailedTransactionResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:88](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L88) + +### `getFailedTransactionResponse.ledger` + +```ts +ledger: number; +``` + +**Source:** [src/rpc/api.ts:100](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L100) + +### `getFailedTransactionResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:89](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L89) + +### `getFailedTransactionResponse.oldestLedgerCloseTime` + +```ts +oldestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:90](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L90) + +### `getFailedTransactionResponse.resultMetaXdr` + +```ts +resultMetaXdr: TransactionMeta; +``` + +**Source:** [src/rpc/api.ts:106](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L106) + +### `getFailedTransactionResponse.resultXdr` + +```ts +resultXdr: TransactionResult; +``` + +**Source:** [src/rpc/api.ts:105](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L105) + +### `getFailedTransactionResponse.status` + +```ts +status: FAILED; +``` + +**Source:** [src/rpc/api.ts:98](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L98) + +### `getFailedTransactionResponse.txHash` + +```ts +txHash: string; +``` + +**Source:** [src/rpc/api.ts:86](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L560) + +### `getFeeStatsResponse.inclusionFee` + +```ts +inclusionFee: FeeDistribution; +``` + +**Source:** [src/rpc/api.ts:562](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L562) + +### `getFeeStatsResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:563](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L563) + +### `getFeeStatsResponse.sorobanInclusionFee` + +```ts +sorobanInclusionFee: FeeDistribution; +``` + +**Source:** [src/rpc/api.ts:561](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L5) + +### `getHealthResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:6](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L6) + +### `getHealthResponse.ledgerRetentionWindow` + +```ts +ledgerRetentionWindow: number; +``` + +**Source:** [src/rpc/api.ts:7](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L7) + +### `getHealthResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:8](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L8) + +### `getHealthResponse.status` + +```ts +status: "healthy"; +``` + +**Source:** [src/rpc/api.ts:9](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L52) + +### `getLatestLedgerResponse.closeTime` + +```ts +closeTime: string; +``` + +**Source:** [src/rpc/api.ts:56](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L56) + +### `getLatestLedgerResponse.headerXdr` + +```ts +headerXdr: LedgerHeader; +``` + +**Source:** [src/rpc/api.ts:57](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L57) + +### `getLatestLedgerResponse.id` + +```ts +id: string; +``` + +**Source:** [src/rpc/api.ts:53](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L53) + +### `getLatestLedgerResponse.metadataXdr` + +```ts +metadataXdr: LedgerCloseMeta; +``` + +**Source:** [src/rpc/api.ts:58](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L58) + +### `getLatestLedgerResponse.protocolVersion` + +```ts +protocolVersion: string; +``` + +**Source:** [src/rpc/api.ts:55](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L55) + +### `getLatestLedgerResponse.sequence` + +```ts +sequence: number; +``` + +**Source:** [src/rpc/api.ts:54](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L33) + +### `getLedgerEntriesResponse.entries` + +```ts +entries: LedgerEntryResult[]; +``` + +**Source:** [src/rpc/api.ts:34](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L34) + +### `getLedgerEntriesResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:35](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/src/rpc/api.ts#L669) + +### `getLedgersResponse.cursor` + +```ts +cursor: string; +``` + +**Source:** [src/rpc/api.ts:675](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L675) + +### `getLedgersResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:671](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L671) + +### `getLedgersResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:672](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L672) + +### `getLedgersResponse.ledgers` + +```ts +ledgers: LedgerResponse[]; +``` + +**Source:** [src/rpc/api.ts:670](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L670) + +### `getLedgersResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:673](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L673) + +### `getLedgersResponse.oldestLedgerCloseTime` + +```ts +oldestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:674](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L93) + +### `getMissingTransactionResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:87](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L87) + +### `getMissingTransactionResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:88](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L88) + +### `getMissingTransactionResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:89](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L89) + +### `getMissingTransactionResponse.oldestLedgerCloseTime` + +```ts +oldestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:90](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L94) + +### `getMissingTransactionResponse.txHash` + +```ts +txHash: string; +``` + +**Source:** [src/rpc/api.ts:86](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L45) + +### `getNetworkResponse.friendbotUrl` + +```ts +friendbotUrl?: string; +``` + +**Source:** [src/rpc/api.ts:46](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L46) + +### `getNetworkResponse.passphrase` + +```ts +passphrase: string; +``` + +**Source:** [src/rpc/api.ts:47](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L47) + +### `getNetworkResponse.protocolVersion` + +```ts +protocolVersion: string; +``` + +**Source:** [src/rpc/api.ts:48](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L111) + +### `getSuccessfulTransactionResponse.applicationOrder` + +```ts +applicationOrder: number; +``` + +**Source:** [src/rpc/api.ts:116](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L116) + +### `getSuccessfulTransactionResponse.createdAt` + +```ts +createdAt: number; +``` + +**Source:** [src/rpc/api.ts:115](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L115) + +### `getSuccessfulTransactionResponse.diagnosticEventsXdr` + +```ts +diagnosticEventsXdr?: DiagnosticEvent[]; +``` + +**Source:** [src/rpc/api.ts:121](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L121) + +### `getSuccessfulTransactionResponse.envelopeXdr` + +```ts +envelopeXdr: TransactionEnvelope; +``` + +**Source:** [src/rpc/api.ts:118](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L118) + +### `getSuccessfulTransactionResponse.events` + +```ts +events: TransactionEvents; +``` + +**Source:** [src/rpc/api.ts:124](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L124) + +### `getSuccessfulTransactionResponse.feeBump` + +```ts +feeBump: boolean; +``` + +**Source:** [src/rpc/api.ts:117](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L117) + +### `getSuccessfulTransactionResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:87](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L87) + +### `getSuccessfulTransactionResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:88](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L88) + +### `getSuccessfulTransactionResponse.ledger` + +```ts +ledger: number; +``` + +**Source:** [src/rpc/api.ts:114](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L114) + +### `getSuccessfulTransactionResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:89](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L89) + +### `getSuccessfulTransactionResponse.oldestLedgerCloseTime` + +```ts +oldestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:90](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L90) + +### `getSuccessfulTransactionResponse.resultMetaXdr` + +```ts +resultMetaXdr: TransactionMeta; +``` + +**Source:** [src/rpc/api.ts:120](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L120) + +### `getSuccessfulTransactionResponse.resultXdr` + +```ts +resultXdr: TransactionResult; +``` + +**Source:** [src/rpc/api.ts:119](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L119) + +### `getSuccessfulTransactionResponse.returnValue` + +```ts +returnValue?: ScVal; +``` + +**Source:** [src/rpc/api.ts:123](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L123) + +### `getSuccessfulTransactionResponse.status` + +```ts +status: SUCCESS; +``` + +**Source:** [src/rpc/api.ts:112](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L112) + +### `getSuccessfulTransactionResponse.txHash` + +```ts +txHash: string; +``` + +**Source:** [src/rpc/api.ts:86](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/src/rpc/api.ts#L208) + +### `getTransactionsResponse.cursor` + +```ts +cursor: string; +``` + +**Source:** [src/rpc/api.ts:214](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L214) + +### `getTransactionsResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:210](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L210) + +### `getTransactionsResponse.latestLedgerCloseTimestamp` + +```ts +latestLedgerCloseTimestamp: number; +``` + +**Source:** [src/rpc/api.ts:211](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L211) + +### `getTransactionsResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:212](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L212) + +### `getTransactionsResponse.oldestLedgerCloseTimestamp` + +```ts +oldestLedgerCloseTimestamp: number; +``` + +**Source:** [src/rpc/api.ts:213](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L213) + +### `getTransactionsResponse.transactions` + +```ts +transactions: TransactionInfo[]; +``` + +**Source:** [src/rpc/api.ts:209](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/src/rpc/api.ts#L553) + +### `getVersionInfoResponse.buildTimestamp` + +```ts +buildTimestamp: string; +``` + +**Source:** [src/rpc/api.ts:546](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L555) + +### `getVersionInfoResponse.captiveCoreVersion` + +```ts +captiveCoreVersion: string; +``` + +**Source:** [src/rpc/api.ts:547](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L551) + +### `getVersionInfoResponse.commitHash` + +```ts +commitHash: string; +``` + +**Source:** [src/rpc/api.ts:545](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L557) + +### `getVersionInfoResponse.protocolVersion` + +```ts +protocolVersion: number; +``` + +**Source:** [src/rpc/api.ts:548](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L548) + +### `getVersionInfoResponse.version` + +```ts +version: string; +``` + +**Source:** [src/rpc/api.ts:544](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/src/rpc/api.ts#L345) + +### `ledgerEntryChange.key` + +```ts +key: LedgerKey; +``` + +**Source:** [src/rpc/api.ts:344](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L344) + +### `ledgerEntryChange.type` + +```ts +type: number; +``` + +**Source:** [src/rpc/api.ts:343](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L12) + +### `ledgerEntryResult.key` + +```ts +key: LedgerKey; +``` + +**Source:** [src/rpc/api.ts:14](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L14) + +### `ledgerEntryResult.lastModifiedLedgerSeq` + +```ts +lastModifiedLedgerSeq?: number; +``` + +**Source:** [src/rpc/api.ts:13](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L13) + +### `ledgerEntryResult.liveUntilLedgerSeq` + +```ts +liveUntilLedgerSeq?: number; +``` + +**Source:** [src/rpc/api.ts:16](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L16) + +### `ledgerEntryResult.val` + +```ts +val: LedgerEntryData; +``` + +**Source:** [src/rpc/api.ts:15](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L687) + +### `ledgerResponse.hash` + +```ts +hash: string; +``` + +**Source:** [src/rpc/api.ts:688](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L688) + +### `ledgerResponse.headerXdr` + +```ts +headerXdr: LedgerHeaderHistoryEntry; +``` + +**Source:** [src/rpc/api.ts:691](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L691) + +### `ledgerResponse.ledgerCloseTime` + +```ts +ledgerCloseTime: string; +``` + +**Source:** [src/rpc/api.ts:690](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L690) + +### `ledgerResponse.metadataXdr` + +```ts +metadataXdr: LedgerCloseMeta; +``` + +**Source:** [src/rpc/api.ts:692](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L692) + +### `ledgerResponse.sequence` + +```ts +sequence: number; +``` + +**Source:** [src/rpc/api.ts:689](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L326) + +### `rawEventResponse.contractId` + +```ts +contractId: string; +``` + +**Source:** [src/rpc/api.ts:327](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L327) + +### `rawEventResponse.id` + +```ts +id: string; +``` + +**Source:** [src/rpc/api.ts:316](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L316) + +### `rawEventResponse.inSuccessfulContractCall` + +```ts +inSuccessfulContractCall: boolean; +``` + +**Source:** [src/rpc/api.ts:322](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L322) + +### `rawEventResponse.ledger` + +```ts +ledger: number; +``` + +**Source:** [src/rpc/api.ts:318](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L318) + +### `rawEventResponse.ledgerClosedAt` + +```ts +ledgerClosedAt: string; +``` + +**Source:** [src/rpc/api.ts:319](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L319) + +### `rawEventResponse.operationIndex` + +```ts +operationIndex: number; +``` + +**Source:** [src/rpc/api.ts:321](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L321) + +### `rawEventResponse.topic` + +```ts +topic?: string[]; +``` + +**Source:** [src/rpc/api.ts:328](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L328) + +### `rawEventResponse.transactionIndex` + +```ts +transactionIndex: number; +``` + +**Source:** [src/rpc/api.ts:320](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L320) + +### `rawEventResponse.txHash` + +```ts +txHash: string; +``` + +**Source:** [src/rpc/api.ts:323](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L323) + +### `rawEventResponse.type` + +```ts +type: EventType; +``` + +**Source:** [src/rpc/api.ts:317](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L317) + +### `rawEventResponse.value` + +```ts +value: string; +``` + +**Source:** [src/rpc/api.ts:329](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L310) + +### `rawGetEventsResponse.cursor` + +```ts +cursor: string; +``` + +**Source:** [src/rpc/api.ts:312](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L312) + +### `rawGetEventsResponse.events` + +```ts +events: RawEventResponse[]; +``` + +**Source:** [src/rpc/api.ts:311](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L311) + +### `rawGetEventsResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:235](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L235) + +### `rawGetEventsResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: string; +``` + +**Source:** [src/rpc/api.ts:237](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L237) + +### `rawGetEventsResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:236](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L236) + +### `rawGetEventsResponse.oldestLedgerCloseTime` + +```ts +oldestLedgerCloseTime: string; +``` + +**Source:** [src/rpc/api.ts:238](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L61) + +### `rawGetLatestLedgerResponse.closeTime` + +```ts +closeTime: string; +``` + +**Source:** [src/rpc/api.ts:65](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L67) + +### `rawGetLatestLedgerResponse.id` + +```ts +id: string; +``` + +**Source:** [src/rpc/api.ts:62](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L69) + +### `rawGetLatestLedgerResponse.protocolVersion` + +```ts +protocolVersion: string; +``` + +**Source:** [src/rpc/api.ts:64](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L64) + +### `rawGetLatestLedgerResponse.sequence` + +```ts +sequence: number; +``` + +**Source:** [src/rpc/api.ts:63](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L39) + +### `rawGetLedgerEntriesResponse.entries` + +```ts +entries?: RawLedgerEntryResult[]; +``` + +**Source:** [src/rpc/api.ts:40](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L40) + +### `rawGetLedgerEntriesResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:41](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L678) + +### `rawGetLedgersResponse.cursor` + +```ts +cursor: string; +``` + +**Source:** [src/rpc/api.ts:684](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L684) + +### `rawGetLedgersResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:680](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L680) + +### `rawGetLedgersResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:681](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L681) + +### `rawGetLedgersResponse.ledgers` + +```ts +ledgers: RawLedgerResponse[]; +``` + +**Source:** [src/rpc/api.ts:679](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L679) + +### `rawGetLedgersResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:682](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L682) + +### `rawGetLedgersResponse.oldestLedgerCloseTime` + +```ts +oldestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:683](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L127) + +### `rawGetTransactionResponse.applicationOrder` + +```ts +applicationOrder?: number; +``` + +**Source:** [src/rpc/api.ts:136](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L136) + +### `rawGetTransactionResponse.createdAt` + +```ts +createdAt?: number; +``` + +**Source:** [src/rpc/api.ts:139](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L139) + +### `rawGetTransactionResponse.diagnosticEventsXdr` + +```ts +diagnosticEventsXdr?: string[]; +``` + +**Source:** [src/rpc/api.ts:144](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L144) + +### `rawGetTransactionResponse.envelopeXdr` + +```ts +envelopeXdr?: string; +``` + +**Source:** [src/rpc/api.ts:141](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L141) + +### `rawGetTransactionResponse.events` + +```ts +events?: RawTransactionEvents; +``` + +**Source:** [src/rpc/api.ts:146](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L146) + +### `rawGetTransactionResponse.feeBump` + +```ts +feeBump?: boolean; +``` + +**Source:** [src/rpc/api.ts:137](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L137) + +### `rawGetTransactionResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:129](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L129) + +### `rawGetTransactionResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:130](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L130) + +### `rawGetTransactionResponse.ledger` + +```ts +ledger?: number; +``` + +**Source:** [src/rpc/api.ts:138](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L138) + +### `rawGetTransactionResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:131](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L131) + +### `rawGetTransactionResponse.oldestLedgerCloseTime` + +```ts +oldestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:132](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L132) + +### `rawGetTransactionResponse.resultMetaXdr` + +```ts +resultMetaXdr?: string; +``` + +**Source:** [src/rpc/api.ts:143](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L143) + +### `rawGetTransactionResponse.resultXdr` + +```ts +resultXdr?: string; +``` + +**Source:** [src/rpc/api.ts:142](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L142) + +### `rawGetTransactionResponse.status` + +```ts +status: GetTransactionStatus; +``` + +**Source:** [src/rpc/api.ts:128](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L128) + +### `rawGetTransactionResponse.txHash` + +```ts +txHash: string; +``` + +**Source:** [src/rpc/api.ts:133](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L217) + +### `rawGetTransactionsResponse.cursor` + +```ts +cursor: string; +``` + +**Source:** [src/rpc/api.ts:223](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L223) + +### `rawGetTransactionsResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:219](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L219) + +### `rawGetTransactionsResponse.latestLedgerCloseTimestamp` + +```ts +latestLedgerCloseTimestamp: number; +``` + +**Source:** [src/rpc/api.ts:220](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L220) + +### `rawGetTransactionsResponse.oldestLedger` + +```ts +oldestLedger: number; +``` + +**Source:** [src/rpc/api.ts:221](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L221) + +### `rawGetTransactionsResponse.oldestLedgerCloseTimestamp` + +```ts +oldestLedgerCloseTimestamp: number; +``` + +**Source:** [src/rpc/api.ts:222](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/src/rpc/api.ts#L22) + +### `rawLedgerEntryResult.lastModifiedLedgerSeq` + +```ts +lastModifiedLedgerSeq?: number; +``` + +**Source:** [src/rpc/api.ts:20](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/src/rpc/api.ts#L695) + +### `rawLedgerResponse.hash` + +```ts +hash: string; +``` + +**Source:** [src/rpc/api.ts:696](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L700) + +### `rawLedgerResponse.ledgerCloseTime` + +```ts +ledgerCloseTime: string; +``` + +**Source:** [src/rpc/api.ts:698](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L702) + +### `rawLedgerResponse.sequence` + +```ts +sequence: number; +``` + +**Source:** [src/rpc/api.ts:697](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/src/rpc/api.ts#L367) + +### `rawSendTransactionResponse.hash` + +```ts +hash: string; +``` + +**Source:** [src/rpc/api.ts:378](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L378) + +### `rawSendTransactionResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:379](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L379) + +### `rawSendTransactionResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:380](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L380) + +### `rawSendTransactionResponse.status` + +```ts +status: SendTransactionStatus; +``` + +**Source:** [src/rpc/api.ts:377](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L519) + +### `rawSimulateTransactionResponse.error` + +```ts +error?: string; +``` + +**Source:** [src/rpc/api.ts:522](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L526) + +### `rawSimulateTransactionResponse.id` + +```ts +id: string; +``` + +**Source:** [src/rpc/api.ts:520](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L520) + +### `rawSimulateTransactionResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:521](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L521) + +### `rawSimulateTransactionResponse.minResourceFee` + +```ts +minResourceFee?: string; +``` + +**Source:** [src/rpc/api.ts:527](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/src/rpc/api.ts#L165) + +### `rawTransactionEvents.contractEventsXdr` + +```ts +contractEventsXdr?: string[][]; +``` + +**Source:** [src/rpc/api.ts:167](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L167) + +### `rawTransactionEvents.transactionEventsXdr` + +```ts +transactionEventsXdr?: string[]; +``` + +**Source:** [src/rpc/api.ts:166](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L170) + +### `rawTransactionInfo.applicationOrder` + +```ts +applicationOrder: number; +``` + +**Source:** [src/rpc/api.ts:174](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L174) + +### `rawTransactionInfo.createdAt` + +```ts +createdAt: number; +``` + +**Source:** [src/rpc/api.ts:173](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L173) + +### `rawTransactionInfo.diagnosticEventsXdr` + +```ts +diagnosticEventsXdr?: string[]; +``` + +**Source:** [src/rpc/api.ts:181](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L181) + +### `rawTransactionInfo.envelopeXdr` + +```ts +envelopeXdr?: string; +``` + +**Source:** [src/rpc/api.ts:178](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L178) + +### `rawTransactionInfo.events` + +```ts +events?: RawTransactionEvents; +``` + +**Source:** [src/rpc/api.ts:183](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L183) + +### `rawTransactionInfo.feeBump` + +```ts +feeBump: boolean; +``` + +**Source:** [src/rpc/api.ts:175](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L175) + +### `rawTransactionInfo.ledger` + +```ts +ledger: number; +``` + +**Source:** [src/rpc/api.ts:172](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L172) + +### `rawTransactionInfo.resultMetaXdr` + +```ts +resultMetaXdr?: string; +``` + +**Source:** [src/rpc/api.ts:180](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L180) + +### `rawTransactionInfo.resultXdr` + +```ts +resultXdr?: string; +``` + +**Source:** [src/rpc/api.ts:179](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L179) + +### `rawTransactionInfo.status` + +```ts +status: GetTransactionStatus; +``` + +**Source:** [src/rpc/api.ts:171](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L171) + +### `rawTransactionInfo.txHash` + +```ts +txHash: string; +``` + +**Source:** [src/rpc/api.ts:176](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L355) + +### `sendTransactionResponse.diagnosticEvents` + +```ts +diagnosticEvents?: DiagnosticEvent[]; +``` + +**Source:** [src/rpc/api.ts:357](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L357) + +### `sendTransactionResponse.errorResult` + +```ts +errorResult?: TransactionResult; +``` + +**Source:** [src/rpc/api.ts:356](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L356) + +### `sendTransactionResponse.hash` + +```ts +hash: string; +``` + +**Source:** [src/rpc/api.ts:378](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L378) + +### `sendTransactionResponse.latestLedger` + +```ts +latestLedger: number; +``` + +**Source:** [src/rpc/api.ts:379](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L379) + +### `sendTransactionResponse.latestLedgerCloseTime` + +```ts +latestLedgerCloseTime: number; +``` + +**Source:** [src/rpc/api.ts:380](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L380) + +### `sendTransactionResponse.status` + +```ts +status: SendTransactionStatus; +``` + +**Source:** [src/rpc/api.ts:377](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/src/rpc/api.ts#L383) + +### `simulateHostFunctionResult.auth` + +```ts +auth: SorobanAuthorizationEntry[]; +``` + +**Source:** [src/rpc/api.ts:384](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L384) + +### `simulateHostFunctionResult.retval` + +```ts +retval: ScVal; +``` + +**Source:** [src/rpc/api.ts:385](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/src/rpc/api.ts#L425) + +### `simulateTransactionErrorResponse.error` + +```ts +error: string; +``` + +**Source:** [src/rpc/api.ts:442](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/rpc/api.ts#L415) + +### `simulateTransactionRestoreResponse.minResourceFee` + +```ts +minResourceFee: string; +``` + +**Source:** [src/rpc/api.ts:431](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/src/rpc/api.ts#L437) + +### `simulateTransactionRestoreResponse.transactionData` + +```ts +transactionData: SorobanDataBuilder; +``` + +**Source:** [src/rpc/api.ts:430](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/src/rpc/api.ts#L415) + +### `simulateTransactionSuccessResponse.minResourceFee` + +```ts +minResourceFee: string; +``` + +**Source:** [src/rpc/api.ts:431](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/src/rpc/api.ts#L437) + +### `simulateTransactionSuccessResponse.transactionData` + +```ts +transactionData: SorobanDataBuilder; +``` + +**Source:** [src/rpc/api.ts:430](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/src/rpc/api.ts#L186) + +### `transactionEvents.contractEventsXdr` + +```ts +contractEventsXdr: ContractEvent[][]; +``` + +**Source:** [src/rpc/api.ts:188](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L188) + +### `transactionEvents.transactionEventsXdr` + +```ts +transactionEventsXdr: TransactionEvent[]; +``` + +**Source:** [src/rpc/api.ts:187](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/rpc/api.ts#L191) + +### `transactionInfo.applicationOrder` + +```ts +applicationOrder: number; +``` + +**Source:** [src/rpc/api.ts:195](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L195) + +### `transactionInfo.createdAt` + +```ts +createdAt: number; +``` + +**Source:** [src/rpc/api.ts:194](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L194) + +### `transactionInfo.diagnosticEventsXdr` + +```ts +diagnosticEventsXdr?: DiagnosticEvent[]; +``` + +**Source:** [src/rpc/api.ts:203](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L203) + +### `transactionInfo.envelopeXdr` + +```ts +envelopeXdr: TransactionEnvelope; +``` + +**Source:** [src/rpc/api.ts:199](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L199) + +### `transactionInfo.events` + +```ts +events: TransactionEvents; +``` + +**Source:** [src/rpc/api.ts:205](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L205) + +### `transactionInfo.feeBump` + +```ts +feeBump: boolean; +``` + +**Source:** [src/rpc/api.ts:196](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L196) + +### `transactionInfo.ledger` + +```ts +ledger: number; +``` + +**Source:** [src/rpc/api.ts:193](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L193) + +### `transactionInfo.resultMetaXdr` + +```ts +resultMetaXdr: TransactionMeta; +``` + +**Source:** [src/rpc/api.ts:201](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L201) + +### `transactionInfo.resultXdr` + +```ts +resultXdr: TransactionResult; +``` + +**Source:** [src/rpc/api.ts:200](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L200) + +### `transactionInfo.returnValue` + +```ts +returnValue?: ScVal; +``` + +**Source:** [src/rpc/api.ts:202](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L202) + +### `transactionInfo.status` + +```ts +status: GetTransactionStatus; +``` + +**Source:** [src/rpc/api.ts:192](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/api.ts#L192) + +### `transactionInfo.txHash` + +```ts +txHash: string; +``` + +**Source:** [src/rpc/api.ts:197](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/rpc/server.ts#L896) + +### `server._getLatestLedger()` + +```ts +_getLatestLedger(): Promise; +``` + +**Source:** [src/rpc/server.ts:967](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/rpc/server.ts#L60) + +### `pollingOptions.attempts` + +```ts +attempts?: number; +``` + +**Source:** [src/rpc/server.ts:61](https://github.com/stellar/js-stellar-sdk/blob/main/src/rpc/server.ts#L61) + +### `pollingOptions.sleepStrategy` + +```ts +sleepStrategy?: SleepStrategy; +``` + +**Source:** [src/rpc/server.ts:62](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/src/rpc/parsers.ts#L236) diff --git a/docs/reference/readme.md b/docs/reference/readme.md deleted file mode 100644 index 2d68c5c6c..000000000 --- a/docs/reference/readme.md +++ /dev/null @@ -1,138 +0,0 @@ ---- -title: Overview ---- -The JavaScript Stellar SDK facilitates integration with the Stellar [Horizon API server](https://developers.stellar.org/api/), the Stellar [Soroban RPC server](https://developers.stellar.org/network/soroban-rpc) and submission of Stellar transactions, either on Node.js or in the browser. It has three main uses: [querying Horizon](#querying-horizon), [interacting with Soroban RPC](), and [building, signing, and submitting transactions to the Stellar network](#building-transactions). - - * [Building and installing the SDK](https://github.com/stellar/js-stellar-sdk) - * [Examples of using the SDK](./examples.md) - -# Querying Horizon -The Stellar SDK gives you access to all the endpoints exposed by Horizon. - -## Building requests -js-stellar-sdk uses the [Builder pattern](https://en.wikipedia.org/wiki/Builder_pattern) to create the requests to send to Horizon. Starting with a [server](https://stellar.github.io/js-stellar-sdk/Server.html) object, you can chain methods together to generate a query. (See the [Horizon reference](https://developers.stellar.org/api/) documentation for what methods are possible.) - -```js -var StellarSdk = require('@stellar/stellar-sdk'); -var server = new StellarSdk.Horizon.Server('https://horizon-testnet.stellar.org'); -// get a list of transactions that occurred in ledger 1400 -server.transactions() - .forLedger(1400) - .call().then(function(r){ console.log(r); }); - -// get a list of transactions submitted by a particular account -server.transactions() - .forAccount('GASOCNHNNLYFNMDJYQ3XFMI7BYHIOCFW3GJEOWRPEGK2TDPGTG2E5EDW') - .call().then(function(r){ console.log(r); }); -``` - -Once the request is built, it can be invoked with `.call()` or with `.stream()`. `call()` will return a [promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) to the response given by Horizon. - -## Streaming requests -Many requests can be invoked with `stream()`. Instead of returning a promise like `call()` does, `.stream()` will return an `EventSource`. Horizon will start sending responses from either the beginning of time or from the point specified with `.cursor()`. (See the [Horizon reference](https://developers.stellar.org/api/introduction/streaming/) documentation to learn which endpoints support streaming.) - -For example, to log instances of transactions from a particular account: - -```javascript -var StellarSdk = require('@stellar/stellar-sdk') -var server = new StellarSdk.Horizon.Server('https://horizon-testnet.stellar.org'); -var lastCursor=0; // or load where you left off - -var txHandler = function (txResponse) { - console.log(txResponse); -}; - -var errorHandler = function (error) { - console.error("Stream encountered an error:", error); - - setTimeout(() => { - console.log("Reconnecting..."); - es(); - }, 5000); -}; - -var es = server.transactions() - .forAccount(accountAddress) - .cursor(lastCursor) - .stream({ - onmessage: txHandler, - onerror: errorHandler - }) -``` - -## Handling responses - -### XDR -The transaction endpoints will return some fields in raw [XDR](https://developers.stellar.org/api/introduction/xdr/) -form. You can convert this XDR to JSON using the `.fromXDR()` method. - -An example of re-writing the txHandler from above to print the XDR fields as JSON: - -```javascript -var txHandler = function (txResponse) { - console.log( JSON.stringify(StellarSdk.xdr.TransactionEnvelope.fromXDR(txResponse.envelope_xdr, 'base64')) ); - console.log( JSON.stringify(StellarSdk.xdr.TransactionResult.fromXDR(txResponse.result_xdr, 'base64')) ); - console.log( JSON.stringify(StellarSdk.xdr.TransactionMeta.fromXDR(txResponse.result_meta_xdr, 'base64')) ); -}; - -``` - - -### Following links -The [HAL format](https://developers.stellar.org/api/introduction/response-format/) links returned with the Horizon response are converted into functions you can call on the returned object. -This allows you to simply use `.next()` to page through results. It also makes fetching additional info, as in the following example, easy: - -```js -server.payments() - .limit(1) - .call() - .then(function(response){ - // will follow the transactions link returned by Horizon - response.records[0].transaction().then(function(txs){ - console.log(txs); - }); - }); -``` - - -# Transactions - -## Building transactions - -See the [Building Transactions](https://github.com/stellar/js-stellar-base/blob/master/docs/reference/building-transactions.md) guide for information about assembling a transaction. - -## Submitting transactions -Once you have built your transaction, you can submit it to the Stellar network with `Server.submitTransaction()`. -```js -const StellarSdk = require('@stellar/stellar-sdk') -const server = new StellarSdk.Horizon.Server('https://horizon-testnet.stellar.org'); - -(async function main() { - const account = await server.loadAccount(publicKey); - - // Right now, we have one function that fetches the base fee. - const fee = await server.fetchBaseFee(); - - const transaction = new StellarSdk.TransactionBuilder(account, { fee, networkPassphrase: StellarSdk.Networks.TESTNET }) - .addOperation( - // this operation funds the new account with XLM - StellarSdk.Operation.payment({ - destination: "GASOCNHNNLYFNMDJYQ3XFMI7BYHIOCFW3GJEOWRPEGK2TDPGTG2E5EDW", - asset: StellarSdk.Asset.native(), - amount: "2" - }) - ) - .setTimeout(30) - .build(); - - // sign the transaction - transaction.sign(StellarSdk.Keypair.fromSecret(secretString)); - - try { - const transactionResult = await server.submitTransaction(transaction); - console.log(transactionResult); - } catch (err) { - console.error(err); - } -})() -``` diff --git a/docs/reference/seps-federation.md b/docs/reference/seps-federation.md new file mode 100644 index 000000000..283159d01 --- /dev/null +++ b/docs/reference/seps-federation.md @@ -0,0 +1,301 @@ +--- +title: SEPs / Federation +description: Federation protocol (SEP-2) client — resolve user-friendly addresses to Stellar account IDs. +--- + +# 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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/federation/server.ts#L219) diff --git a/docs/reference/seps-toml.md b/docs/reference/seps-toml.md new file mode 100644 index 000000000..8d8c69813 --- /dev/null +++ b/docs/reference/seps-toml.md @@ -0,0 +1,851 @@ +--- +title: SEPs / Toml +description: Parse and validate stellar.toml files per SEP-1, including issuer metadata and currency descriptors. +--- + +# SEPs / Toml + +## StellarToml.Api.ContractId + +```ts +type ContractId = string +``` + +**Source:** [src/stellartoml/index.ts:101](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/stellartoml/index.ts#L158) + +### `currency.code` + +```ts +code?: string; +``` + +**Source:** [src/stellartoml/index.ts:135](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/src/stellartoml/index.ts#L163) + +### `currency.conditions` + +```ts +conditions?: string; +``` + +**Source:** [src/stellartoml/index.ts:142](https://github.com/stellar/js-stellar-sdk/blob/main/src/stellartoml/index.ts#L142) + +### `currency.desc` + +```ts +desc?: string; +``` + +**Source:** [src/stellartoml/index.ts:141](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/src/stellartoml/index.ts#L143) + +### `currency.image` + +```ts +image?: string; +``` + +**Source:** [src/stellartoml/index.ts:161](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/src/stellartoml/index.ts#L159) + +### `currency.issuer` + +```ts +issuer?: string; +``` + +**Source:** [src/stellartoml/index.ts:137](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/stellartoml/index.ts#L144) + +### `currency.name` + +```ts +name?: string; +``` + +**Source:** [src/stellartoml/index.ts:140](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/stellartoml/index.ts#L160) + +### `currency.regulated` + +```ts +regulated?: boolean; +``` + +**Source:** [src/stellartoml/index.ts:162](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/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/main/src/stellartoml/index.ts#L123) + +### `principal.email` + +```ts +email: string; +``` + +**Source:** [src/stellartoml/index.ts:125](https://github.com/stellar/js-stellar-sdk/blob/main/src/stellartoml/index.ts#L125) + +### `principal.github` + +```ts +github?: string; +``` + +**Source:** [src/stellartoml/index.ts:126](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/stellartoml/index.ts#L130) + +### `principal.keybase` + +```ts +keybase?: string; +``` + +**Source:** [src/stellartoml/index.ts:127](https://github.com/stellar/js-stellar-sdk/blob/main/src/stellartoml/index.ts#L127) + +### `principal.name` + +```ts +name: string; +``` + +**Source:** [src/stellartoml/index.ts:124](https://github.com/stellar/js-stellar-sdk/blob/main/src/stellartoml/index.ts#L124) + +### `principal.telegram` + +```ts +telegram?: string; +``` + +**Source:** [src/stellartoml/index.ts:128](https://github.com/stellar/js-stellar-sdk/blob/main/src/stellartoml/index.ts#L128) + +### `principal.twitter` + +```ts +twitter?: string; +``` + +**Source:** [src/stellartoml/index.ts:129](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/src/stellartoml/index.ts#L182) + +### `stellarToml.ACCOUNTS` + +```ts +ACCOUNTS?: string[]; +``` + +**Source:** [src/stellartoml/index.ts:184](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/stellartoml/index.ts#L197) + +### `stellarToml.CURRENCIES` + +```ts +CURRENCIES?: Currency[]; +``` + +**Source:** [src/stellartoml/index.ts:200](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/stellartoml/index.ts#L196) + +### `stellarToml.DOCUMENTATION` + +```ts +DOCUMENTATION?: Documentation; +``` + +**Source:** [src/stellartoml/index.ts:198](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/src/stellartoml/index.ts#L185) + +### `stellarToml.PRINCIPALS` + +```ts +PRINCIPALS?: Principal[]; +``` + +**Source:** [src/stellartoml/index.ts:199](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/src/stellartoml/index.ts#L195) + +### `stellarToml.VALIDATORS` + +```ts +VALIDATORS?: Validator[]; +``` + +**Source:** [src/stellartoml/index.ts:201](https://github.com/stellar/js-stellar-sdk/blob/main/src/stellartoml/index.ts#L201) + +### `stellarToml.VERSION` + +```ts +VERSION?: string; +``` + +**Source:** [src/stellartoml/index.ts:183](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/src/stellartoml/index.ts#L94) + +### `stellarTomlResolveOptions.allowedRedirects` + +```ts +allowedRedirects?: number; +``` + +**Source:** [src/stellartoml/index.ts:97](https://github.com/stellar/js-stellar-sdk/blob/main/src/stellartoml/index.ts#L97) + +### `stellarTomlResolveOptions.allowHttp` + +```ts +allowHttp?: boolean; +``` + +**Source:** [src/stellartoml/index.ts:95](https://github.com/stellar/js-stellar-sdk/blob/main/src/stellartoml/index.ts#L95) + +### `stellarTomlResolveOptions.timeout` + +```ts +timeout?: number; +``` + +**Source:** [src/stellartoml/index.ts:96](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/src/stellartoml/index.ts#L171) + +### `validator.ALIAS` + +```ts +ALIAS?: string; +``` + +**Source:** [src/stellartoml/index.ts:172](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/src/stellartoml/index.ts#L173) + +### `validator.HISTORY` + +```ts +HISTORY?: string; +``` + +**Source:** [src/stellartoml/index.ts:176](https://github.com/stellar/js-stellar-sdk/blob/main/src/stellartoml/index.ts#L176) + +### `validator.HOST` + +```ts +HOST?: string; +``` + +**Source:** [src/stellartoml/index.ts:175](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/src/stellartoml/index.ts#L11) diff --git a/docs/reference/seps-webauth.md b/docs/reference/seps-webauth.md new file mode 100644 index 000000000..82f77c14e --- /dev/null +++ b/docs/reference/seps-webauth.md @@ -0,0 +1,393 @@ +--- +title: SEPs / WebAuth +description: Wallet authentication via SEP-10 challenge transactions — build, sign, and validate WebAuth flows. +--- + +# SEPs / WebAuth + +## WebAuth.ChallengeTxDetails + +A parsed and validated challenge transaction, and some of its constituent details. + +```ts +type ChallengeTxDetails = { clientAccountId: string; matchedHomeDomain: string; memo?: string; tx: Transaction } +``` + +**Source:** [src/webauth/utils.ts:104](https://github.com/stellar/js-stellar-sdk/blob/main/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/main/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/main/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/main/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/main/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/main/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/main/src/webauth/utils.ts#L94) diff --git a/eslint.config.js b/eslint.config.js index bff2f99f2..89c9d140b 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -4,7 +4,7 @@ import { configs } from "eslint-config-airbnb-extended/legacy"; import prettierConfigRules from "eslint-config-prettier/flat"; import prettierPlugin from "eslint-plugin-prettier"; import importPlugin from "eslint-plugin-import"; -import jsdoc from "eslint-plugin-jsdoc"; +import tsdoc from "eslint-plugin-tsdoc"; import js from "@eslint/js"; import globals from "globals"; @@ -35,10 +35,11 @@ const typescriptConfig = [ files: ["**/*.ts", "**/*.tsx"], rules: { "@typescript-eslint/require-await": "error", - "@typescript-eslint/no-unused-vars": [ - "error", - { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }, - ], + // Delegated to TypeScript's `noUnusedLocals` / `noUnusedParameters` + // (set in tsconfig.json) — TS understands JSDoc `{@link}` references, + // typescript-eslint's no-unused-vars does not. + "@typescript-eslint/no-unused-vars": "off", + "no-unused-vars": "off", "no-fallthrough": "off", }, }, @@ -57,37 +58,12 @@ const prettierConfig = [ }, ]; -const jsDocConfig = [ - // configuration included in plugin - jsdoc.configs["flat/recommended-typescript"], - // other configuration objects... +const tsdocConfig = [ { + name: "tsdoc/syntax", files: ["**/*.ts"], - // `plugins` here is not necessary if including the above config - plugins: { - jsdoc, - }, - rules: { - "jsdoc/check-tag-names": [ - "error", - { definedTags: ["warning", "category"] }, - ], - "jsdoc/require-description": "warn", - "jsdoc/no-undefined-types": "warn", - "jsdoc/require-returns": "off", - "jsdoc/require-param": "off", - "jsdoc/require-param-type": "off", - "jsdoc/require-returns-type": "off", - "jsdoc/no-blank-blocks": "off", - "jsdoc/no-multi-asterisks": "off", - "jsdoc/tag-lines": "off", - "jsdoc/require-jsdoc": "off", - "jsdoc/no-defaults": "off", - "jsdoc/no-types": "off", - "jsdoc/reject-function-type": "off", - "jsdoc/reject-any-type": "off", - "jsdoc/require-description": "off", - }, + plugins: { tsdoc }, + rules: { "tsdoc/syntax": "warn" }, }, ]; @@ -108,6 +84,18 @@ const testConfig = [ }, ]; +const scriptsConfig = [ + { + name: "scripts/typescript", + files: ["scripts/**/*.ts"], + languageOptions: { + parserOptions: { + project: "./scripts/tsconfig.json", + }, + }, + }, +]; + // The base XDR/SDK module preserves a public API shape (namespace+const merging, // XDR-string-literal type aliases, snake_case helpers like `best_r`, leading-_ // internals) and uses a "public API at top, helpers below" file layout. Loosen @@ -118,9 +106,27 @@ const baseSdkConfig = [ files: ["src/base/**/*.ts"], rules: { "@typescript-eslint/no-redeclare": "off", - "@typescript-eslint/no-use-before-define": ["error", { functions: false }], + "@typescript-eslint/no-use-before-define": [ + "error", + { functions: false }, + ], "@typescript-eslint/naming-convention": "off", - "jsdoc/no-undefined-types": "off", + }, + }, +]; + +// scripts/build-docs.ts dispatches a discriminated-union renderer through +// mutually recursive helpers; function-declaration hoisting handles the +// runtime ordering. Match baseSdkConfig's `functions: false` loosening. +const scriptsRulesConfig = [ + { + name: "scripts/mutual-recursion", + files: ["scripts/**/*.ts"], + rules: { + "@typescript-eslint/no-use-before-define": [ + "error", + { functions: false }, + ], }, }, ]; @@ -140,6 +146,12 @@ ignoreFiles.ignores.push( "rollup.config.mjs", "config/**/*", "src/base/generated/**", + // Astro build-time configs — excluded from tsconfig.json (they + // import the virtual `astro:content` module), so the typescript- + // eslint parser can't resolve them via the SDK project. Lint + // coverage from prettier is sufficient for these small configs. + "src/content.config.ts", + "astro.config.mjs", ], ); export default [ @@ -151,12 +163,16 @@ export default [ ...javascriptConfig, // TypeScript Config ...typescriptConfig, - // JSDoc Config - ...jsDocConfig, + // TSDoc Config + ...tsdocConfig, // Test Config ...testConfig, - // Base SDK overrides (must come after typescriptConfig/jsDocConfig) + // Scripts Config (uses scripts/tsconfig.json for type-aware lint) + ...scriptsConfig, + // Base SDK overrides (must come after typescriptConfig/tsdocConfig) ...baseSdkConfig, + // Scripts overrides (must come after typescriptConfig/scriptsConfig) + ...scriptsRulesConfig, // Prettier Config ...prettierConfig, ]; diff --git a/package.json b/package.json index 853432199..a2b55a5e5 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,14 @@ "postbuild:lib:axios": "node config/write-module-type.js lib/axios/cjs commonjs", "clean": "rm -rf lib/ dist/ coverage/ jsdoc/ test/e2e/.soroban", "clean:bundle-size": "rm -rf node_modules lib/ dist/ coverage/ jsdoc/ test/e2e/.soroban", - "docs": "jsdoc -c ./config/.jsdoc.json", + "docs": "pnpm docs:reference && pnpm docs:llms && pnpm docs:robots && pnpm docs:htaccess && pnpm docs:site", + "docs:reference": "tsx scripts/build-docs.ts", + "docs:llms": "tsx scripts/build-llms.ts", + "docs:robots": "tsx scripts/build-robots.ts", + "docs:htaccess": "tsx scripts/build-htaccess.ts", + "docs:site": "astro build && tsx scripts/build-md-siblings.ts", + "docs:dev": "astro dev", + "docs:preview": "astro preview", "test": "pnpm run test:node && pnpm run test:node:axios && pnpm run test:integration && pnpm run test:browser", "test:all": "pnpm run test:node && pnpm run test:node:axios && pnpm run test:integration && pnpm run test:browser && pnpm run test:e2e", "test:e2e": "./test/e2e/initialize.sh && vitest run --config config/vitest.config.e2e.ts --coverage", @@ -117,6 +124,8 @@ "node": ">=22.0.0" }, "devDependencies": { + "@astrojs/sitemap": "^3.7.2", + "@astrojs/starlight": "^0.39.0", "@eslint/compat": "^1.4.1", "@eslint/js": "^9.39.4", "@rollup/plugin-commonjs": "^28.0.6", @@ -136,7 +145,7 @@ "@vitest/coverage-istanbul": "4.1.2", "@vitest/coverage-v8": "^4.1.2", "@vitest/ui": "^4.1.2", - "better-docs": "^2.7.3", + "astro": "^6.3.0", "browserify-zlib": "^0.2.0", "cross-env": "^7.0.3", "dotenv": "^16.6.0", @@ -146,22 +155,21 @@ "eslint-config-prettier": "^10.1.8", "eslint-import-resolver-typescript": "^4.4.4", "eslint-plugin-import": "^2.32.0", - "eslint-plugin-jsdoc": "^61.1.12", "eslint-plugin-prettier": "^5.5.5", + "eslint-plugin-tsdoc": "^0.5.2", "globals": "^17.5.0", "husky": "^9.1.7", - "jsdoc": "^4.0.4", "jsdom": "^27.0.0", "lint-staged": "^15.5.1", "lodash": "^4.17.21", "msw": "^2.13.4", - "playwright": "^1.58.0", + "playwright": "^1.60.0", "prettier": "^3.8.1", "rollup": "^4.44.1", "rollup-plugin-esbuild": "^6.2.1", "rollup-plugin-polyfill-node": "^0.13.0", - "taffydb": "^2.7.3", - "ts-node": "^10.9.2", + "tsx": "^4.21.0", + "typedoc": "^0.28.19", "typescript": "5.9.3", "vitest": "^4.1.2" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 63981a903..89aa9eddf 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,6 +45,12 @@ importers: specifier: ^1.5.0 version: 1.5.0 devDependencies: + '@astrojs/sitemap': + specifier: ^3.7.2 + version: 3.7.2 + '@astrojs/starlight': + specifier: ^0.39.0 + version: 0.39.0(astro@6.3.0(@types/node@22.19.17)(lightningcss@1.32.0)(rollup@4.60.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3))(typescript@5.9.3) '@eslint/compat': specifier: ^1.4.1 version: 1.4.1(eslint@9.39.4) @@ -89,22 +95,22 @@ importers: version: 8.58.0(eslint@9.39.4)(typescript@5.9.3) '@vitest/browser': specifier: ^4.1.2 - version: 4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3))(vitest@4.1.2) + version: 4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3))(vitest@4.1.2) '@vitest/browser-playwright': specifier: ^4.1.2 - version: 4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(playwright@1.58.2)(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3))(vitest@4.1.2) + version: 4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(playwright@1.60.0)(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3))(vitest@4.1.2) '@vitest/coverage-istanbul': specifier: 4.1.2 version: 4.1.2(vitest@4.1.2) '@vitest/coverage-v8': specifier: ^4.1.2 - version: 4.1.2(@vitest/browser@4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3))(vitest@4.1.2))(vitest@4.1.2) + version: 4.1.2(@vitest/browser@4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3))(vitest@4.1.2))(vitest@4.1.2) '@vitest/ui': specifier: ^4.1.2 version: 4.1.2(vitest@4.1.2) - better-docs: - specifier: ^2.7.3 - version: 2.7.3(prop-types@15.8.1)(react-dom@17.0.2(react@17.0.2))(react@17.0.2) + astro: + specifier: ^6.3.0 + version: 6.3.0(@types/node@22.19.17)(lightningcss@1.32.0)(rollup@4.60.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3) browserify-zlib: specifier: ^0.2.0 version: 0.2.0 @@ -132,21 +138,18 @@ importers: eslint-plugin-import: specifier: ^2.32.0 version: 2.32.0(@typescript-eslint/parser@8.58.0(eslint@9.39.4)(typescript@5.9.3))(eslint-import-resolver-typescript@4.4.4)(eslint@9.39.4) - eslint-plugin-jsdoc: - specifier: ^61.1.12 - version: 61.7.1(eslint@9.39.4) eslint-plugin-prettier: specifier: ^5.5.5 version: 5.5.5(eslint-config-prettier@10.1.8(eslint@9.39.4))(eslint@9.39.4)(prettier@3.8.1) + eslint-plugin-tsdoc: + specifier: ^0.5.2 + version: 0.5.2(eslint@9.39.4)(typescript@5.9.3) globals: specifier: ^17.5.0 version: 17.5.0 husky: specifier: ^9.1.7 version: 9.1.7 - jsdoc: - specifier: ^4.0.4 - version: 4.0.5 jsdom: specifier: ^27.0.0 version: 27.4.0(@noble/hashes@2.2.0) @@ -160,8 +163,8 @@ importers: specifier: ^2.13.4 version: 2.13.4(@types/node@22.19.17)(typescript@5.9.3) playwright: - specifier: ^1.58.0 - version: 1.58.2 + specifier: ^1.60.0 + version: 1.60.0 prettier: specifier: ^3.8.1 version: 3.8.1 @@ -174,18 +177,18 @@ importers: rollup-plugin-polyfill-node: specifier: ^0.13.0 version: 0.13.0(rollup@4.60.2) - taffydb: - specifier: ^2.7.3 - version: 2.7.3 - ts-node: - specifier: ^10.9.2 - version: 10.9.2(@types/node@22.19.17)(typescript@5.9.3) + tsx: + specifier: ^4.21.0 + version: 4.21.0 + typedoc: + specifier: ^0.28.19 + version: 0.28.19(typescript@5.9.3) typescript: specifier: 5.9.3 version: 5.9.3 vitest: specifier: ^4.1.2 - version: 4.1.2(@types/node@22.19.17)(@vitest/browser-playwright@4.1.2)(@vitest/ui@4.1.2)(jsdom@27.4.0(@noble/hashes@2.2.0))(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3)) + version: 4.1.2(@types/node@22.19.17)(@vitest/browser-playwright@4.1.2)(@vitest/ui@4.1.2)(jsdom@27.4.0(@noble/hashes@2.2.0))(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) packages: @@ -201,6 +204,37 @@ packages: '@asamuzakjp/nwsapi@2.3.9': resolution: {integrity: sha512-n8GuYSrI9bF7FFZ/SjhwevlHc8xaVlb/7HmHelnc/PZXBD2ZR49NnN9sMMuDdEGPeeRQ5d0hqlSlEpgCX3Wl0Q==} + '@astrojs/compiler@4.0.0': + resolution: {integrity: sha512-eouss7G8ygdZqHuke033VMcVw5HTZUu+PXd/h06DGDUg/jt5btPYPqh66ENWw/mU78rBrf/oeC4oqoBwMtDMNA==} + + '@astrojs/internal-helpers@0.9.0': + resolution: {integrity: sha512-GdYkzR26re8izmyYlBqf4z2s7zNngmWLFuxw0UKiPNqHraZGS6GKWIwSHgS22RDlu2ePFJ8bzmpBcUszut/SDg==} + + '@astrojs/markdown-remark@7.1.1': + resolution: {integrity: sha512-C6e9BnLGlbdv6bV8MYGeHpHxsUHrCrB4OuRLqi5LI7oiBVcBcqfUN06zpwFQdHgV48QCCrMmLpyqBr7VqC+swA==} + + '@astrojs/mdx@5.0.4': + resolution: {integrity: sha512-tSbuuYueNODiFAFaME7pjHY5lOLoxBYJi1cKd6scw9+a4ZO7C7UGdafEoVAQvOV2eO8a6RaHSAJYGVPL1w8BPA==} + engines: {node: '>=22.12.0'} + peerDependencies: + astro: ^6.0.0 + + '@astrojs/prism@4.0.1': + resolution: {integrity: sha512-nksZQVjlferuWzhPsBpQ1JE5XuKAf1id1/9Hj4a9KG4+ofrlzxUUwX4YGQF/SuDiuiGKEnzopGOt38F3AnVWsQ==} + engines: {node: '>=22.12.0'} + + '@astrojs/sitemap@3.7.2': + resolution: {integrity: sha512-PqkzkcZTb5ICiyIR8VoKbIAP/laNRXi5tw616N1Ckk+40oNB8Can1AzVV56lrbC5GKSZFCyJYUVYqVivMisvpA==} + + '@astrojs/starlight@0.39.0': + resolution: {integrity: sha512-Jggl+Wyq/WLakIeSa/NGWl+hs4g/IeqS08zDkdCkd35IPoN1MbaeyZ3JPviA3e3+Zo1M49eMuh77ZBjk4KrsxQ==} + peerDependencies: + astro: ^6.0.0 + + '@astrojs/telemetry@3.3.2': + resolution: {integrity: sha512-j8DNruA8ors99Al39RYZPJK4DC1bKkoNm93mAMuBhY9TCNC4R8n1q7ovFnJ5qhGh5Lsh7pa1gpQVpYpsJPeTHQ==} + engines: {node: 18.20.8 || ^20.3.0 || >=22.0.0} + '@babel/code-frame@7.29.0': resolution: {integrity: sha512-9NhCeYjq9+3uxgdtp20LSiJXJvN0FeCtNGpJxuMFZ1Kv3cWUNb6DOhJwUvcVCzKGR66cw4njwM6hrJLqgOwbcw==} engines: {node: '>=6.9.0'} @@ -256,10 +290,6 @@ packages: engines: {node: '>=6.0.0'} hasBin: true - '@babel/runtime@7.29.2': - resolution: {integrity: sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==} - engines: {node: '>=6.9.0'} - '@babel/template@7.28.6': resolution: {integrity: sha512-YA6Ma2KsCdGb+WC6UpBVFJGXL58MDA6oyONbjyF/+5sBgxY/dwkhLogbMT2GXXyU84/IhRw/2D1Os1B/giz+BQ==} engines: {node: '>=6.9.0'} @@ -272,9 +302,6 @@ packages: resolution: {integrity: sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==} engines: {node: '>=6.9.0'} - '@bcoe/v8-coverage@0.2.3': - resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} - '@bcoe/v8-coverage@1.0.2': resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==} engines: {node: '>=18'} @@ -282,9 +309,17 @@ packages: '@blazediff/core@1.9.1': resolution: {integrity: sha512-ehg3jIkYKulZh+8om/O25vkvSsXXwC+skXmyA87FFx6A/45eqOkZsBltMw/TVteb0mloiGT8oGRTcjRAz66zaA==} - '@cspotcode/source-map-support@0.8.1': - resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} - engines: {node: '>=12'} + '@capsizecss/unpack@4.0.0': + resolution: {integrity: sha512-VERIM64vtTP1C4mxQ5thVT9fK0apjPFobqybMtA1UdUujWka24ERHbRHFGmpbbhp73MhV+KSsHQH9C6uOTdEQA==} + engines: {node: '>=18'} + + '@clack/core@1.3.0': + resolution: {integrity: sha512-xJPHpAmEQUBrXSLx0gF+q5K/IyihXpsHZcha+jB+tyahsKRK3Dxo4D0coZDewHo12NhiuzC3dTtMPbm53GEAAA==} + engines: {node: '>= 20.12.0'} + + '@clack/prompts@1.3.0': + resolution: {integrity: sha512-GgcWwRCs/xPtaqlMy8qRhPnZf9vlWcWZNHAitnVQ3yk7JmSralSiq5q07yaffYE8SogtDm7zFeKccx1QNVARpw==} + engines: {node: '>= 20.12.0'} '@csstools/color-helpers@6.0.2': resolution: {integrity: sha512-LMGQLS9EuADloEFkcTBR3BwV/CGHV7zyDxVRtVDTwdI2Ca4it0CCVTT9wCkxSgokjE5Ho41hEPgb8OEUwoXr6Q==} @@ -322,6 +357,10 @@ packages: resolution: {integrity: sha512-QxULHAm7cNu72w97JUNCBFODFaXpbDg+dP8b/oWFAZ2MTRppA3U00Y2L1HqaS4J6yBqxwa/Y3nMBaxVKbB/NsA==} engines: {node: '>=20.19.0'} + '@ctrl/tinycolor@4.2.0': + resolution: {integrity: sha512-kzyuwOAQnXJNLS9PSyrk0CWk35nWJW/zl/6KvnTBMFK65gm7U1/Z5BqjxeapjZCIhQcM/DsrEmcbRwDyXyXK4A==} + engines: {node: '>=14'} + '@emnapi/core@1.9.1': resolution: {integrity: sha512-mukuNALVsoix/w1BJwFzwXBN/dHeejQtuVzcDsfOEsdpCumXb/E9j8w11h5S54tT1xhifGfbbSm/ICrObRb3KA==} @@ -331,164 +370,312 @@ packages: '@emnapi/wasi-threads@1.2.0': resolution: {integrity: sha512-N10dEJNSsUx41Z6pZsXU8FjPjpBEplgH24sfkmITrBED1/U2Esum9F3lfLrMjKHHjmi557zQn7kR9R+XWXu5Rg==} - '@es-joy/jsdoccomment@0.78.0': - resolution: {integrity: sha512-rQkU5u8hNAq2NVRzHnIUUvR6arbO0b6AOlvpTNS48CkiKSn/xtNfOzBK23JE4SiW89DgvU7GtxLVgV4Vn2HBAw==} - engines: {node: '>=20.11.0'} - - '@es-joy/resolve.exports@1.2.0': - resolution: {integrity: sha512-Q9hjxWI5xBM+qW2enxfe8wDKdFWMfd0Z29k5ZJnuBqD/CasY5Zryj09aCA6owbGATWz+39p5uIdaHXpopOcG8g==} - engines: {node: '>=10'} - '@esbuild/aix-ppc64@0.24.2': resolution: {integrity: sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] + '@esbuild/aix-ppc64@0.27.7': + resolution: {integrity: sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + '@esbuild/android-arm64@0.24.2': resolution: {integrity: sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==} engines: {node: '>=18'} cpu: [arm64] os: [android] + '@esbuild/android-arm64@0.27.7': + resolution: {integrity: sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm@0.24.2': resolution: {integrity: sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==} engines: {node: '>=18'} cpu: [arm] os: [android] + '@esbuild/android-arm@0.27.7': + resolution: {integrity: sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + '@esbuild/android-x64@0.24.2': resolution: {integrity: sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==} engines: {node: '>=18'} cpu: [x64] os: [android] + '@esbuild/android-x64@0.27.7': + resolution: {integrity: sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + '@esbuild/darwin-arm64@0.24.2': resolution: {integrity: sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] + '@esbuild/darwin-arm64@0.27.7': + resolution: {integrity: sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-x64@0.24.2': resolution: {integrity: sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==} engines: {node: '>=18'} cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.27.7': + resolution: {integrity: sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + '@esbuild/freebsd-arm64@0.24.2': resolution: {integrity: sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.27.7': + resolution: {integrity: sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-x64@0.24.2': resolution: {integrity: sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] + '@esbuild/freebsd-x64@0.27.7': + resolution: {integrity: sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + '@esbuild/linux-arm64@0.24.2': resolution: {integrity: sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==} engines: {node: '>=18'} cpu: [arm64] os: [linux] + '@esbuild/linux-arm64@0.27.7': + resolution: {integrity: sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm@0.24.2': resolution: {integrity: sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==} engines: {node: '>=18'} cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.27.7': + resolution: {integrity: sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + '@esbuild/linux-ia32@0.24.2': resolution: {integrity: sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==} engines: {node: '>=18'} cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.27.7': + resolution: {integrity: sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-loong64@0.24.2': resolution: {integrity: sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==} engines: {node: '>=18'} cpu: [loong64] os: [linux] + '@esbuild/linux-loong64@0.27.7': + resolution: {integrity: sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-mips64el@0.24.2': resolution: {integrity: sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.27.7': + resolution: {integrity: sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-ppc64@0.24.2': resolution: {integrity: sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.27.7': + resolution: {integrity: sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-riscv64@0.24.2': resolution: {integrity: sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.27.7': + resolution: {integrity: sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-s390x@0.24.2': resolution: {integrity: sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==} engines: {node: '>=18'} cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.27.7': + resolution: {integrity: sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-x64@0.24.2': resolution: {integrity: sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==} engines: {node: '>=18'} cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.27.7': + resolution: {integrity: sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + '@esbuild/netbsd-arm64@0.24.2': resolution: {integrity: sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] + '@esbuild/netbsd-arm64@0.27.7': + resolution: {integrity: sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + '@esbuild/netbsd-x64@0.24.2': resolution: {integrity: sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.27.7': + resolution: {integrity: sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + '@esbuild/openbsd-arm64@0.24.2': resolution: {integrity: sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] + '@esbuild/openbsd-arm64@0.27.7': + resolution: {integrity: sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + '@esbuild/openbsd-x64@0.24.2': resolution: {integrity: sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.27.7': + resolution: {integrity: sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openharmony-arm64@0.27.7': + resolution: {integrity: sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + '@esbuild/sunos-x64@0.24.2': resolution: {integrity: sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==} engines: {node: '>=18'} cpu: [x64] os: [sunos] + '@esbuild/sunos-x64@0.27.7': + resolution: {integrity: sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + '@esbuild/win32-arm64@0.24.2': resolution: {integrity: sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==} engines: {node: '>=18'} cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.27.7': + resolution: {integrity: sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-ia32@0.24.2': resolution: {integrity: sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==} engines: {node: '>=18'} cpu: [ia32] os: [win32] + '@esbuild/win32-ia32@0.27.7': + resolution: {integrity: sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-x64@0.24.2': resolution: {integrity: sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==} engines: {node: '>=18'} cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.27.7': + resolution: {integrity: sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + '@eslint-community/eslint-utils@4.9.1': resolution: {integrity: sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -545,6 +732,21 @@ packages: '@noble/hashes': optional: true + '@expressive-code/core@0.42.0': + resolution: {integrity: sha512-MN11+9nfmaC7sYu2BZJXAXqwkBRt8t1xTSqP+Ti1NfTEskgl6xUnzDxoaiQkg0BMzpglA0pys4dpDKquP/cyIw==} + + '@expressive-code/plugin-frames@0.42.0': + resolution: {integrity: sha512-XtkPm+941Uta7Y+81Acv+OA/20F1NJmJhCX6UYGKpqEIGqplNh3PTOhcURp6tcruhlzJcWcvpWy6Oigz3SrjqA==} + + '@expressive-code/plugin-shiki@0.42.0': + resolution: {integrity: sha512-PMKey/kLmewttAHQezL+Y5Fx3vVssfDi3+FJOYQQS2mXP3tQspFELtKKAfsXfmSXdToZYgwoO69HJndqfE+09g==} + + '@expressive-code/plugin-text-markers@0.42.0': + resolution: {integrity: sha512-l59lUx8fq1v5g6SpmbDjiU0+7IdfbiWnAyRmtTVSpfhyq+nZMN4UcmYyu2b9Mynhzt7Gr+O+cXyEPDNb2AVWVQ==} + + '@gerrit0/mini-shiki@3.23.0': + resolution: {integrity: sha512-bEMORlG0cqdjVyCEuU0cDQbORWX+kYCeo0kV1lbxF5bt4r7SID2l9bqsxJEM0zndaxpOUT7riCyIVEuqq/Ynxg==} + '@humanfs/core@0.19.1': resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} engines: {node: '>=18.18.0'} @@ -561,6 +763,159 @@ packages: resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} engines: {node: '>=18.18'} + '@img/colour@1.1.0': + resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==} + engines: {node: '>=18'} + + '@img/sharp-darwin-arm64@0.34.5': + resolution: {integrity: sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [darwin] + + '@img/sharp-darwin-x64@0.34.5': + resolution: {integrity: sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [darwin] + + '@img/sharp-libvips-darwin-arm64@1.2.4': + resolution: {integrity: sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==} + cpu: [arm64] + os: [darwin] + + '@img/sharp-libvips-darwin-x64@1.2.4': + resolution: {integrity: sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==} + cpu: [x64] + os: [darwin] + + '@img/sharp-libvips-linux-arm64@1.2.4': + resolution: {integrity: sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@img/sharp-libvips-linux-arm@1.2.4': + resolution: {integrity: sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==} + cpu: [arm] + os: [linux] + libc: [glibc] + + '@img/sharp-libvips-linux-ppc64@1.2.4': + resolution: {integrity: sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@img/sharp-libvips-linux-riscv64@1.2.4': + resolution: {integrity: sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@img/sharp-libvips-linux-s390x@1.2.4': + resolution: {integrity: sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@img/sharp-libvips-linux-x64@1.2.4': + resolution: {integrity: sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@img/sharp-libvips-linuxmusl-arm64@1.2.4': + resolution: {integrity: sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@img/sharp-libvips-linuxmusl-x64@1.2.4': + resolution: {integrity: sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@img/sharp-linux-arm64@0.34.5': + resolution: {integrity: sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@img/sharp-linux-arm@0.34.5': + resolution: {integrity: sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm] + os: [linux] + libc: [glibc] + + '@img/sharp-linux-ppc64@0.34.5': + resolution: {integrity: sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@img/sharp-linux-riscv64@0.34.5': + resolution: {integrity: sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@img/sharp-linux-s390x@0.34.5': + resolution: {integrity: sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@img/sharp-linux-x64@0.34.5': + resolution: {integrity: sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@img/sharp-linuxmusl-arm64@0.34.5': + resolution: {integrity: sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@img/sharp-linuxmusl-x64@0.34.5': + resolution: {integrity: sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@img/sharp-wasm32@0.34.5': + resolution: {integrity: sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [wasm32] + + '@img/sharp-win32-arm64@0.34.5': + resolution: {integrity: sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [arm64] + os: [win32] + + '@img/sharp-win32-ia32@0.34.5': + resolution: {integrity: sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [ia32] + os: [win32] + + '@img/sharp-win32-x64@0.34.5': + resolution: {integrity: sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + cpu: [x64] + os: [win32] + '@inquirer/ansi@2.0.5': resolution: {integrity: sha512-doc2sWgJpbFQ64UflSVd17ibMGDuxO1yKgOgLMwavzESnXjFWJqUeG8saYosqKpHp4kWiM5x1nXvEjbpx90gzw==} engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'} @@ -619,12 +974,14 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} - '@jridgewell/trace-mapping@0.3.9': - resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + '@mdx-js/mdx@3.1.1': + resolution: {integrity: sha512-f6ZO2ifpwAQIpzGWaBQT2TXxPv6z3RBzQKpVftEWN78Vl/YweF1uwussDx8ECAXVtr3Rs89fKyG9YlzUs9DyGQ==} + + '@microsoft/tsdoc-config@0.18.1': + resolution: {integrity: sha512-9brPoVdfN9k9g0dcWkFeA7IH9bbcttzDJlXvkf8b2OBzd5MueR1V2wkKBL0abn0otvmkHJC6aapBOTJDDeMCZg==} - '@jsdoc/salty@0.2.11': - resolution: {integrity: sha512-luR/TZqgru6gNjBQnRIbzNPOmDG62VIFQO7QyEjc1/zk3VP3yoGfuecwP2uOlAmKz+t6aq9bwsBV3FgiyHTT7Q==} - engines: {node: '>=v12.0.0'} + '@microsoft/tsdoc@0.16.0': + resolution: {integrity: sha512-xgAyonlVVS+q7Vc7qLW0UrJU7rSFcETRWsqdXZtjzRU8dF+6CkozTK4V4y1LwOX7j8r/vHphjDeMeGI4tNGeGA==} '@mswjs/interceptors@0.41.3': resolution: {integrity: sha512-cXu86tF4VQVfwz8W1SPbhoRyHJkti6mjH/XJIxp40jhO4j2k1m4KYrEykxqWPkFF3vrK4rgQppBh//AwyGSXPA==} @@ -633,8 +990,8 @@ packages: '@napi-rs/wasm-runtime@0.2.12': resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==} - '@napi-rs/wasm-runtime@1.1.2': - resolution: {integrity: sha512-sNXv5oLJ7ob93xkZ1XnxisYhGYXfaG9f65/ZgYuAu3qt7b3NadcOEhLvx28hv31PgX8SZJRYrAIPQilQmFpLVw==} + '@napi-rs/wasm-runtime@1.1.4': + resolution: {integrity: sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==} peerDependencies: '@emnapi/core': ^1.7.1 '@emnapi/runtime': ^1.7.1 @@ -673,12 +1030,53 @@ packages: '@open-draft/until@2.1.0': resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} + '@oslojs/encoding@1.1.0': + resolution: {integrity: sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ==} + '@oxc-project/types@0.122.0': resolution: {integrity: sha512-oLAl5kBpV4w69UtFZ9xqcmTi+GENWOcPF7FCrczTiBbmC0ibXxCwyvZGbO39rCVEuLGAZM84DH0pUIyyv/YJzA==} '@package-json/types@0.0.12': resolution: {integrity: sha512-uu43FGU34B5VM9mCNjXCwLaGHYjXdNincqKLaraaCW+7S2+SmiBg1Nv8bPnmschrIfZmfKNY9f3fC376MRrObw==} + '@pagefind/darwin-arm64@1.5.2': + resolution: {integrity: sha512-MXpI+7HsAdPkvJ0gk9xj9g541BCqBZOBbdwj9g6lB5LCj6kSV6nqDSjzcAJwvOsfu0fjwvC8hQU+ecfhp+MpiQ==} + cpu: [arm64] + os: [darwin] + + '@pagefind/darwin-x64@1.5.2': + resolution: {integrity: sha512-IojxFWMEJe0RQ7PQ3KXQsPIImNsbpPYpoZ+QUDrL8fAl/O27IX+LVLs74/UzEZy5uA2LD8Nz1AiwKr72vrkZQw==} + cpu: [x64] + os: [darwin] + + '@pagefind/default-ui@1.5.2': + resolution: {integrity: sha512-pm1LMnQg8N2B3n2TnjKlhaFihpz6zTiA4HiGQ6/slKO/+8K9CAU5kcjdSSPgpuk1PMuuN4hxLipUIifnrkl3Sg==} + + '@pagefind/freebsd-x64@1.5.2': + resolution: {integrity: sha512-7EVzo9+0w+2cbe671BtMj10UlNo83I+HrLVLfRxO731svHRJKUfJ/mo05gU14pe9PCfpKNQT8FS3Xc/oDN6pOA==} + cpu: [x64] + os: [freebsd] + + '@pagefind/linux-arm64@1.5.2': + resolution: {integrity: sha512-Ovt9+K35sqzn8H3ZMXGwls4TD/wMJuvRtShHIsmUQREmaxjrDEX7gHckRCrwYJ4XE1H1p6HkLz3wukrAnsfXQw==} + cpu: [arm64] + os: [linux] + + '@pagefind/linux-x64@1.5.2': + resolution: {integrity: sha512-V+tFqHKXhQKq/WqPBD67AFy7scn1/aZID00ws4fSDd+1daSi5UHR9VVlRrOUYKxn3VuFQYRD7lYXdZK1WED1YA==} + cpu: [x64] + os: [linux] + + '@pagefind/windows-arm64@1.5.2': + resolution: {integrity: sha512-hN9Nh90fNW61nNRCW9ZyQrAj/mD0eRvmJ8NlTUzkbuW8kIzGJUi3cxjFkEcMZ5h/8FsKWD/VcouZl4yo1F7B6g==} + cpu: [arm64] + os: [win32] + + '@pagefind/windows-x64@1.5.2': + resolution: {integrity: sha512-Fa2Iyw7kaDRzGMfNYNUXNW2zbL5FQVDgSOcbDHdzBrDEdpqOqg8TcZ68F22ol6NJ9IGzvUdmeyZypLW5dyhqsg==} + cpu: [x64] + os: [win32] + '@pkgr/core@0.2.9': resolution: {integrity: sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} @@ -721,36 +1119,42 @@ packages: engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] + libc: [glibc] '@rolldown/binding-linux-arm64-musl@1.0.0-rc.12': resolution: {integrity: sha512-V6/wZztnBqlx5hJQqNWwFdxIKN0m38p8Jas+VoSfgH54HSj9tKTt1dZvG6JRHcjh6D7TvrJPWFGaY9UBVOaWPw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] + libc: [musl] '@rolldown/binding-linux-ppc64-gnu@1.0.0-rc.12': resolution: {integrity: sha512-AP3E9BpcUYliZCxa3w5Kwj9OtEVDYK6sVoUzy4vTOJsjPOgdaJZKFmN4oOlX0Wp0RPV2ETfmIra9x1xuayFB7g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] + libc: [glibc] '@rolldown/binding-linux-s390x-gnu@1.0.0-rc.12': resolution: {integrity: sha512-nWwpvUSPkoFmZo0kQazZYOrT7J5DGOJ/+QHHzjvNlooDZED8oH82Yg67HvehPPLAg5fUff7TfWFHQS8IV1n3og==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] + libc: [glibc] '@rolldown/binding-linux-x64-gnu@1.0.0-rc.12': resolution: {integrity: sha512-RNrafz5bcwRy+O9e6P8Z/OCAJW/A+qtBczIqVYwTs14pf4iV1/+eKEjdOUta93q2TsT/FI0XYDP3TCky38LMAg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] + libc: [glibc] '@rolldown/binding-linux-x64-musl@1.0.0-rc.12': resolution: {integrity: sha512-Jpw/0iwoKWx3LJ2rc1yjFrj+T7iHZn2JDg1Yny1ma0luviFS4mhAIcd1LFNxK3EYu3DHWCps0ydXQ5i/rrJ2ig==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] + libc: [musl] '@rolldown/binding-openharmony-arm64@1.0.0-rc.12': resolution: {integrity: sha512-vRugONE4yMfVn0+7lUKdKvN4D5YusEiPilaoO2sgUWpCvrncvWgPMzK00ZFFJuiPgLwgFNP5eSiUlv2tfc+lpA==} @@ -866,66 +1270,79 @@ packages: resolution: {integrity: sha512-2QxQrM+KQ7DAW4o22j+XZ6RKdxjLD7BOWTP0Bv0tmjdyhXSsr2Ul1oJDQqh9Zf5qOwTuTc7Ek83mOFaKnodPjg==} cpu: [arm] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.60.2': resolution: {integrity: sha512-TbziEu2DVsTEOPif2mKWkMeDMLoYjx95oESa9fkQQK7r/Orta0gnkcDpzwufEcAO2BLBsD7mZkXGFqEdMRRwfw==} cpu: [arm] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.60.2': resolution: {integrity: sha512-bO/rVDiDUuM2YfuCUwZ1t1cP+/yqjqz+Xf2VtkdppefuOFS2OSeAfgafaHNkFn0t02hEyXngZkxtGqXcXwO8Rg==} cpu: [arm64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.60.2': resolution: {integrity: sha512-hr26p7e93Rl0Za+JwW7EAnwAvKkehh12BU1Llm9Ykiibg4uIr2rbpxG9WCf56GuvidlTG9KiiQT/TXT1yAWxTA==} cpu: [arm64] os: [linux] + libc: [musl] '@rollup/rollup-linux-loong64-gnu@4.60.2': resolution: {integrity: sha512-pOjB/uSIyDt+ow3k/RcLvUAOGpysT2phDn7TTUB3n75SlIgZzM6NKAqlErPhoFU+npgY3/n+2HYIQVbF70P9/A==} cpu: [loong64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-loong64-musl@4.60.2': resolution: {integrity: sha512-2/w+q8jszv9Ww1c+6uJT3OwqhdmGP2/4T17cu8WuwyUuuaCDDJ2ojdyYwZzCxx0GcsZBhzi3HmH+J5pZNXnd+Q==} cpu: [loong64] os: [linux] + libc: [musl] '@rollup/rollup-linux-ppc64-gnu@4.60.2': resolution: {integrity: sha512-11+aL5vKheYgczxtPVVRhdptAM2H7fcDR5Gw4/bTcteuZBlH4oP9f5s9zYO9aGZvoGeBpqXI/9TZZihZ609wKw==} cpu: [ppc64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-ppc64-musl@4.60.2': resolution: {integrity: sha512-i16fokAGK46IVZuV8LIIwMdtqhin9hfYkCh8pf8iC3QU3LpwL+1FSFGej+O7l3E/AoknL6Dclh2oTdnRMpTzFQ==} cpu: [ppc64] os: [linux] + libc: [musl] '@rollup/rollup-linux-riscv64-gnu@4.60.2': resolution: {integrity: sha512-49FkKS6RGQoriDSK/6E2GkAsAuU5kETFCh7pG4yD/ylj9rKhTmO3elsnmBvRD4PgJPds5W2PkhC82aVwmUcJ7A==} cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.60.2': resolution: {integrity: sha512-mjYNkHPfGpUR00DuM1ZZIgs64Hpf4bWcz9Z41+4Q+pgDx73UwWdAYyf6EG/lRFldmdHHzgrYyge5akFUW0D3mQ==} cpu: [riscv64] os: [linux] + libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.60.2': resolution: {integrity: sha512-ALyvJz965BQk8E9Al/JDKKDLH2kfKFLTGMlgkAbbYtZuJt9LU8DW3ZoDMCtQpXAltZxwBHevXz5u+gf0yA0YoA==} cpu: [s390x] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.60.2': resolution: {integrity: sha512-UQjrkIdWrKI626Du8lCQ6MJp/6V1LAo2bOK9OTu4mSn8GGXIkPXk/Vsp4bLHCd9Z9Iz2OTEaokUE90VweJgIYQ==} cpu: [x64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-musl@4.60.2': resolution: {integrity: sha512-bTsRGj6VlSdn/XD4CGyzMnzaBs9bsRxy79eTqTCBsA8TMIEky7qg48aPkvJvFe1HyzQ5oMZdg7AnVlWQSKLTnw==} cpu: [x64] os: [linux] + libc: [musl] '@rollup/rollup-openbsd-x64@4.60.2': resolution: {integrity: sha512-6d4Z3534xitaA1FcMWP7mQPq5zGwBmGbhphh2DwaA1aNIXUu3KTOfwrWpbwI4/Gr0uANo7NTtaykFyO2hPuFLg==} @@ -960,9 +1377,48 @@ packages: '@rtsao/scc@1.1.0': resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} - '@sindresorhus/base62@1.0.0': - resolution: {integrity: sha512-TeheYy0ILzBEI/CO55CP6zJCSdSWeRtGnHy8U8dWSUH4I68iqTsy7HkMktR4xakThc9jotkPQUXT4ITdbV7cHA==} - engines: {node: '>=18'} + '@shikijs/core@4.0.2': + resolution: {integrity: sha512-hxT0YF4ExEqB8G/qFdtJvpmHXBYJ2lWW7qTHDarVkIudPFE6iCIrqdgWxGn5s+ppkGXI0aEGlibI0PAyzP3zlw==} + engines: {node: '>=20'} + + '@shikijs/engine-javascript@4.0.2': + resolution: {integrity: sha512-7PW0Nm49DcoUIQEXlJhNNBHyoGMjalRETTCcjMqEaMoJRLljy1Bi/EGV3/qLBgLKQejdspiiYuHGQW6dX94Nag==} + engines: {node: '>=20'} + + '@shikijs/engine-oniguruma@3.23.0': + resolution: {integrity: sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==} + + '@shikijs/engine-oniguruma@4.0.2': + resolution: {integrity: sha512-UpCB9Y2sUKlS9z8juFSKz7ZtysmeXCgnRF0dlhXBkmQnek7lAToPte8DkxmEYGNTMii72zU/lyXiCB6StuZeJg==} + engines: {node: '>=20'} + + '@shikijs/langs@3.23.0': + resolution: {integrity: sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==} + + '@shikijs/langs@4.0.2': + resolution: {integrity: sha512-KaXby5dvoeuZzN0rYQiPMjFoUrz4hgwIE+D6Du9owcHcl6/g16/yT5BQxSW5cGt2MZBz6Hl0YuRqf12omRfUUg==} + engines: {node: '>=20'} + + '@shikijs/primitive@4.0.2': + resolution: {integrity: sha512-M6UMPrSa3fN5ayeJwFVl9qWofl273wtK1VG8ySDZ1mQBfhCpdd8nEx7nPZ/tk7k+TYcpqBZzj/AnwxT9lO+HJw==} + engines: {node: '>=20'} + + '@shikijs/themes@3.23.0': + resolution: {integrity: sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==} + + '@shikijs/themes@4.0.2': + resolution: {integrity: sha512-mjCafwt8lJJaVSsQvNVrJumbnnj1RI8jbUKrPKgE6E3OvQKxnuRoBaYC51H4IGHePsGN/QtALglWBU7DoKDFnA==} + engines: {node: '>=20'} + + '@shikijs/types@3.23.0': + resolution: {integrity: sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==} + + '@shikijs/types@4.0.2': + resolution: {integrity: sha512-qzbeRooUTPnLE+sHD/Z8DStmaDgnbbc/pMrU203950aRqjX/6AFHeDYT+j00y2lPdz0ywJKx7o/7qnqTivtlXg==} + engines: {node: '>=20'} + + '@shikijs/vscode-textmate@10.0.2': + resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} '@standard-schema/spec@1.1.0': resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} @@ -980,41 +1436,35 @@ packages: peerDependencies: eslint: ^9.0.0 || ^10.0.0 - '@tsconfig/node10@1.0.12': - resolution: {integrity: sha512-UCYBaeFvM11aU2y3YPZ//O5Rhj+xKyzy7mvcIoAjASbigy8mHMryP5cK7dgjlz2hWxh1g5pLw084E0a/wlUSFQ==} - - '@tsconfig/node12@1.0.11': - resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} - - '@tsconfig/node14@1.0.3': - resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} - - '@tsconfig/node16@1.0.4': - resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} - '@tybys/wasm-util@0.10.1': resolution: {integrity: sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==} - '@types/babel-types@7.0.16': - resolution: {integrity: sha512-5QXs9GBFTNTmilLlWBhnsprqpjfrotyrnzUdwDrywEL/DA4LuCWQT300BTOXA3Y9ngT9F2uvmCoIxI6z8DlJEA==} - - '@types/babylon@6.16.9': - resolution: {integrity: sha512-sEKyxMVEowhcr8WLfN0jJYe4gS4Z9KC2DGz0vqfC7+MXFbmvOF7jSjALC77thvAO2TLgFUPa9vDeOak+AcUrZA==} + '@tybys/wasm-util@0.10.2': + resolution: {integrity: sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==} '@types/chai@5.2.3': resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} + '@types/debug@4.1.13': + resolution: {integrity: sha512-KSVgmQmzMwPlmtljOomayoR89W4FynCAi3E8PPs7vmDVPe84hT+vGPKkJfThkmXs0x0jAaa9U8uW8bbfyS2fWw==} + '@types/deep-eql@4.0.2': resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} '@types/detect-node@2.0.2': resolution: {integrity: sha512-2r16DIvQ3dLcRHBPzbdlPsqUWvNaIE7g3fPlGcoA5IF0Nvv7gaONWleB2rhEmggvj/P5VvxseWchR2noncrgGg==} + '@types/estree-jsx@1.0.5': + resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==} + '@types/estree@1.0.8': resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} - '@types/istanbul-lib-coverage@2.0.6': - resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} + '@types/hast@3.0.4': + resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} + + '@types/js-yaml@4.0.9': + resolution: {integrity: sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==} '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -1022,14 +1472,17 @@ packages: '@types/json5@0.0.29': resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} - '@types/linkify-it@5.0.0': - resolution: {integrity: sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==} + '@types/mdast@4.0.4': + resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} - '@types/markdown-it@14.1.2': - resolution: {integrity: sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==} + '@types/mdx@2.0.13': + resolution: {integrity: sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw==} - '@types/mdurl@2.0.0': - resolution: {integrity: sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==} + '@types/ms@2.1.0': + resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} + + '@types/nlcst@2.0.3': + resolution: {integrity: sha512-vSYNSDe6Ix3q+6Z7ri9lyWqgGhJTmzRjZRqyq15N0Z/1/UnVsno9G/N40NBijoYx2seFDIl0+B2mgAb9mezUCA==} '@types/node@22.19.17': resolution: {integrity: sha512-wGdMcf+vPYM6jikpS/qhg6WiqSV/OhG+jeeHT/KlVqxYfD40iYJf9/AE1uQxVWFvU7MipKRkRv8NSHiCGgPr8Q==} @@ -1040,6 +1493,9 @@ packages: '@types/resolve@1.20.2': resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} + '@types/sax@1.2.7': + resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==} + '@types/set-cookie-parser@2.4.10': resolution: {integrity: sha512-GGmQVGpQWUe5qglJozEjZV/5dyxbOOZ0LHe/lqyWssB88Y4svNfst0uqBVscdDeIKl5Jy5+aPSvy7mI9tYRguw==} @@ -1049,6 +1505,12 @@ packages: '@types/statuses@2.0.6': resolution: {integrity: sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA==} + '@types/unist@2.0.11': + resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==} + + '@types/unist@3.0.3': + resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + '@typescript-eslint/eslint-plugin@8.58.0': resolution: {integrity: sha512-RLkVSiNuUP1C2ROIWfqX+YcUfLaSnxGE/8M+Y57lopVwg9VTYYfhuz15Yf1IzCKgZj6/rIbYTmJCUSqr76r0Wg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1064,16 +1526,32 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' + '@typescript-eslint/project-service@8.56.1': + resolution: {integrity: sha512-TAdqQTzHNNvlVFfR+hu2PDJrURiwKsUvxFn1M0h95BB8ah5jejas08jUWG4dBA68jDMI988IvtfdAI53JzEHOQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/project-service@8.58.0': resolution: {integrity: sha512-8Q/wBPWLQP1j16NxoPNIKpDZFMaxl7yWIoqXWYeWO+Bbd2mjgvoF0dxP2jKZg5+x49rgKdf7Ck473M8PC3V9lg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.1.0' + '@typescript-eslint/scope-manager@8.56.1': + resolution: {integrity: sha512-YAi4VDKcIZp0O4tz/haYKhmIDZFEUPOreKbfdAN3SzUDMcPhJ8QI99xQXqX+HoUVq8cs85eRKnD+rne2UAnj2w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.58.0': resolution: {integrity: sha512-W1Lur1oF50FxSnNdGp3Vs6P+yBRSmZiw4IIjEeYxd8UQJwhUF0gDgDD/W/Tgmh73mxgEU3qX0Bzdl/NGuSPEpQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/tsconfig-utils@8.56.1': + resolution: {integrity: sha512-qOtCYzKEeyr3aR9f28mPJqBty7+DBqsdd63eO0yyDwc6vgThj2UjWfJIcsFeSucYydqcuudMOprZ+x1SpF3ZuQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/tsconfig-utils@8.58.0': resolution: {integrity: sha512-doNSZEVJsWEu4htiVC+PR6NpM+pa+a4ClH9INRWOWCUzMst/VA9c4gXq92F8GUD1rwhNvRLkgjfYtFXegXQF7A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1087,16 +1565,33 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' + '@typescript-eslint/types@8.56.1': + resolution: {integrity: sha512-dbMkdIUkIkchgGDIv7KLUpa0Mda4IYjo4IAMJUZ+3xNoUXxMsk9YtKpTHSChRS85o+H9ftm51gsK1dZReY9CVw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.58.0': resolution: {integrity: sha512-O9CjxypDT89fbHxRfETNoAnHj/i6IpRK0CvbVN3qibxlLdo5p5hcLmUuCCrHMpxiWSwKyI8mCP7qRNYuOJ0Uww==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.56.1': + resolution: {integrity: sha512-qzUL1qgalIvKWAf9C1HpvBjif+Vm6rcT5wZd4VoMb9+Km3iS3Cv9DY6dMRMDtPnwRAFyAi7YXJpTIEXLvdfPxg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/typescript-estree@8.58.0': resolution: {integrity: sha512-7vv5UWbHqew/dvs+D3e1RvLv1v2eeZ9txRHPnEEBUgSNLx5ghdzjHa0sgLWYVKssH+lYmV0JaWdoubo0ncGYLA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.1.0' + '@typescript-eslint/utils@8.56.1': + resolution: {integrity: sha512-HPAVNIME3tABJ61siYlHzSWCGtOoeP2RTIaHXFMPqjrQKCGB9OgUVdiNgH7TJS2JNIQ5qQ4RsAUDuGaGme/KOA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.0.0' + '@typescript-eslint/utils@8.58.0': resolution: {integrity: sha512-RfeSqcFeHMHlAWzt4TBjWOAtoW9lnsAGiP3GbaX9uVgTYYrMbVnGONEfUCiSss+xMHFl+eHZiipmA8WkQ7FuNA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1104,10 +1599,17 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' + '@typescript-eslint/visitor-keys@8.56.1': + resolution: {integrity: sha512-KiROIzYdEV85YygXw6BI/Dx4fnBlFQu6Mq4QE4MOH9fFnhohw6wX/OAvDY2/C+ut0I3RSPKenvZJIVYqJNkhEw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.58.0': resolution: {integrity: sha512-XJ9UD9+bbDo4a4epraTwG3TsNPeiB9aShrUneAVXy8q4LuwowN+qu89/6ByLMINqvIMeI9H9hOHQtg/ijrYXzQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.3.1': + resolution: {integrity: sha512-mUFwbeTqrVgDQxFveS+df2yfap6iuP20NAKAsBt5jDEoOTDew+zwLAOilHCeQJOVSvmgCX4ogqIrA0mnyr08yQ==} + '@unrs/resolver-binding-android-arm-eabi@1.11.1': resolution: {integrity: sha512-ppLRUgHVaGRWUx0R0Ut06Mjo9gBaBkg3v/8AxusGLhsIotbBLuRk51rAzqLC8gq6NyyAojEXglNjzf6R948DNw==} cpu: [arm] @@ -1147,41 +1649,49 @@ packages: resolution: {integrity: sha512-34gw7PjDGB9JgePJEmhEqBhWvCiiWCuXsL9hYphDF7crW7UgI05gyBAi6MF58uGcMOiOqSJ2ybEeCvHcq0BCmQ==} cpu: [arm64] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-arm64-musl@1.11.1': resolution: {integrity: sha512-RyMIx6Uf53hhOtJDIamSbTskA99sPHS96wxVE/bJtePJJtpdKGXO1wY90oRdXuYOGOTuqjT8ACccMc4K6QmT3w==} cpu: [arm64] os: [linux] + libc: [musl] '@unrs/resolver-binding-linux-ppc64-gnu@1.11.1': resolution: {integrity: sha512-D8Vae74A4/a+mZH0FbOkFJL9DSK2R6TFPC9M+jCWYia/q2einCubX10pecpDiTmkJVUH+y8K3BZClycD8nCShA==} cpu: [ppc64] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-riscv64-gnu@1.11.1': resolution: {integrity: sha512-frxL4OrzOWVVsOc96+V3aqTIQl1O2TjgExV4EKgRY09AJ9leZpEg8Ak9phadbuX0BA4k8U5qtvMSQQGGmaJqcQ==} cpu: [riscv64] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-riscv64-musl@1.11.1': resolution: {integrity: sha512-mJ5vuDaIZ+l/acv01sHoXfpnyrNKOk/3aDoEdLO/Xtn9HuZlDD6jKxHlkN8ZhWyLJsRBxfv9GYM2utQ1SChKew==} cpu: [riscv64] os: [linux] + libc: [musl] '@unrs/resolver-binding-linux-s390x-gnu@1.11.1': resolution: {integrity: sha512-kELo8ebBVtb9sA7rMe1Cph4QHreByhaZ2QEADd9NzIQsYNQpt9UkM9iqr2lhGr5afh885d/cB5QeTXSbZHTYPg==} cpu: [s390x] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-x64-gnu@1.11.1': resolution: {integrity: sha512-C3ZAHugKgovV5YvAMsxhq0gtXuwESUKc5MhEtjBpLoHPLYM+iuwSj3lflFwK3DPm68660rZ7G8BMcwSro7hD5w==} cpu: [x64] os: [linux] + libc: [glibc] '@unrs/resolver-binding-linux-x64-musl@1.11.1': resolution: {integrity: sha512-rV0YSoyhK2nZ4vEswT/QwqzqQXw5I6CjoaYMOX0TqBlWhojUf8P94mvI7nuJTeaCkkds3QE4+zS8Ko+GdXuZtA==} cpu: [x64] os: [linux] + libc: [musl] '@unrs/resolver-binding-wasm32-wasi@1.11.1': resolution: {integrity: sha512-5u4RkfxJm+Ng7IWgkzi3qrFOvLvQYnPBmjmZQ8+szTK/b31fQCnleNl1GgEt7nIsZRIf5PLhPwT0WM+q45x/UQ==} @@ -1262,31 +1772,11 @@ packages: '@vitest/utils@4.1.2': resolution: {integrity: sha512-xw2/TiX82lQHA06cgbqRKFb5lCAy3axQ4H4SoUFhUsg+wztiet+co86IAMDtF6Vm1hc7J6j09oh/rgDn+JdKIQ==} - ace-builds@1.43.6: - resolution: {integrity: sha512-L1ddibQ7F3vyXR2k2fg+I8TQTPWVA6CKeDQr/h2+8CeyTp3W6EQL8xNFZRTztuP8xNOAqL3IYPqdzs31GCjDvg==} - - acorn-globals@3.1.0: - resolution: {integrity: sha512-uWttZCk96+7itPxK8xCzY86PnxKTMrReKDqrHzv42VQY0K30PUO8WY13WMOuI+cOdX4EIdzdvQ8k6jkuGRFMYw==} - acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn-walk@8.3.5: - resolution: {integrity: sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==} - engines: {node: '>=0.4.0'} - - acorn@3.3.0: - resolution: {integrity: sha512-OLUyIIZ7mF5oaAUT1w0TFqQS81q3saT46x8t7ukpPjMNk+nbs4ZHhs7ToV8EWnLYLepjETXd4XaCE4uxkMeqUw==} - engines: {node: '>=0.4.0'} - hasBin: true - - acorn@4.0.13: - resolution: {integrity: sha512-fu2ygVGuMmlzG8ZeRJ0bvR41nsAkxxhbyk8bZ1SS521Z7vmgJFTQQlfz/Mp/nJexGBz+v8sC9bM6+lNgskt4Ug==} - engines: {node: '>=0.4.0'} - hasBin: true - acorn@8.16.0: resolution: {integrity: sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==} engines: {node: '>=0.4.0'} @@ -1299,9 +1789,8 @@ packages: ajv@6.14.0: resolution: {integrity: sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==} - align-text@0.1.4: - resolution: {integrity: sha512-GrTZLRpmp6wIC2ztrWW9MjjTgSKccffgFagbNDOX95/dcjEcYZibYTeaOntySQLcdw1ztBoFkviiUvTMbb9MYg==} - engines: {node: '>=0.10.0'} + ajv@8.18.0: + resolution: {integrity: sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==} ansi-escapes@7.3.0: resolution: {integrity: sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg==} @@ -1323,12 +1812,12 @@ packages: resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} engines: {node: '>=12'} - are-docs-informative@0.0.2: - resolution: {integrity: sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==} - engines: {node: '>=14'} + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} - arg@4.1.3: - resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} + arg@5.0.2: + resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} @@ -1345,6 +1834,9 @@ packages: resolution: {integrity: sha512-FmeCCAenzH0KH381SPT5FZmiA/TmpndpcaShhfgEN9eCVjnFBqq3l1xrI42y8+PPLI6hypzou4GXw00WHmPBLQ==} engines: {node: '>= 0.4'} + array-iterate@2.0.1: + resolution: {integrity: sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==} + array.prototype.findlast@1.2.5: resolution: {integrity: sha512-CVvd6FHg1Z3POpBLxO6E6zr+rSKEQ9L6rZHAaY7lLfhKsWYUBBOuMs0e9o24oopj6H+geRCX0YJ+TJLBK2eHyQ==} engines: {node: '>= 0.4'} @@ -1369,9 +1861,6 @@ packages: resolution: {integrity: sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==} engines: {node: '>= 0.4'} - asap@2.0.6: - resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} - assertion-error@2.0.1: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} @@ -1379,17 +1868,23 @@ packages: ast-types-flow@0.0.8: resolution: {integrity: sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==} - ast-types@0.12.4: - resolution: {integrity: sha512-ky/YVYCbtVAS8TdMIaTiPFHwEpRB5z1hctepJplTr3UW5q8TDrpIMCILyk8pmLxGtn2KCtC/lSn7zOsaI7nzDw==} - engines: {node: '>=4'} - - ast-types@0.14.2: - resolution: {integrity: sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA==} - engines: {node: '>=4'} - ast-v8-to-istanbul@1.0.0: resolution: {integrity: sha512-1fSfIwuDICFA4LKkCzRPO7F0hzFf0B7+Xqrl27ynQaa+Rh0e1Es0v6kWHPott3lU10AyAr7oKHa65OppjLn3Rg==} + astring@1.9.0: + resolution: {integrity: sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==} + hasBin: true + + astro-expressive-code@0.42.0: + resolution: {integrity: sha512-aiTePi2Cn0mJPYWZSzP1GcxCinX9mNtJyCCshVVPSg1yRwM7ADvFJOx0FnS440M9t65hp8JH//dc2qr22Bm4ag==} + peerDependencies: + astro: ^4.0.0-beta || ^5.0.0-beta || ^3.3.0 || ^6.0.0-beta + + astro@6.3.0: + resolution: {integrity: sha512-yhDelVblNzQE4mjS0s27T9BZuAlfRCy+qHk6IlMgSr+ADG5QNpyPkroJAVCFRH08Nf2VhDM5dz6n4GWiTB9TlQ==} + engines: {node: '>=22.12.0', npm: '>=9.6.5', pnpm: '>=7.1.0'} + hasBin: true + async-function@1.0.0: resolution: {integrity: sha512-hsU18Ae8CDTR6Kgu9DYf0EbCr/a5iGL0rytQDobUcdpYOKokk8LEjVphnXkDkgpi0wYVsqrXuP0bZxJaTqdgoA==} engines: {node: '>= 0.4'} @@ -1412,15 +1907,8 @@ packages: resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} engines: {node: '>= 0.4'} - babel-runtime@6.26.0: - resolution: {integrity: sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==} - - babel-types@6.26.0: - resolution: {integrity: sha512-zhe3V/26rCWsEZK8kZN+HaQj5yQ1CilTObixFzKW1UWjqG7618Twz6YEsCnjfg5gBcJh02DrpCkS9h98ZqDY+g==} - - babylon@6.18.0: - resolution: {integrity: sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==} - hasBin: true + bail@2.0.2: + resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==} balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -1441,12 +1929,11 @@ packages: engines: {node: '>=6.0.0'} hasBin: true - better-docs@2.7.3: - resolution: {integrity: sha512-OEk9e7RQUQbo1DmVo0mdsALZ+mT0SwIen7/DGnN4xKNktXKgz1j7+KQ2pObNHHVSFGu8YMQW/Ig1v6eiTkdnbw==} - engines: {node: '>=12'} - peerDependencies: - react: ^17.0.2 - react-dom: ^17.0.2 + bcp-47-match@2.0.3: + resolution: {integrity: sha512-JtTezzbAibu8G0R9op9zb3vcWZd9JF6M0xOYGPn0fNCd7wOpRB1mU2mH9T8gaBGbAAyIIVgB2G7xG0GP98zMAQ==} + + bcp-47@2.1.0: + resolution: {integrity: sha512-9IIS3UPrvIa1Ej+lVDdDwO7zLehjqsaByECw0bu2RRGP73jALm6FYbzI5gWbgHLvNdkvfXB5YrSbocZdOS0c0w==} bidi-js@1.0.3: resolution: {integrity: sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw==} @@ -1454,8 +1941,8 @@ packages: bignumber.js@11.0.0: resolution: {integrity: sha512-pkOSwKRi2HLwEbmTNf7C0M9lw3Z5dXQ1irbanJvySh/nJQBcFsMxF+g5o2JEn5BPFmfAqYalrhOwoFdLJXohEg==} - bluebird@3.7.2: - resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} + boolbase@1.0.0: + resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} brace-expansion@1.1.13: resolution: {integrity: sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==} @@ -1464,9 +1951,6 @@ packages: resolution: {integrity: sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==} engines: {node: 18 || 20 || >=22} - brace@0.11.1: - resolution: {integrity: sha512-Fc8Ne62jJlKHiG/ajlonC4Sd66Pq68fFwK4ihJGNZpGqboc324SQk+lRvMzpPRuJOmfrJefdG8/7JdWX4bzJ2Q==} - braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} @@ -1485,11 +1969,6 @@ packages: buffer@6.0.3: resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} - c8@7.14.0: - resolution: {integrity: sha512-i04rtkkcNcCf7zsQcSv/T9EbUn4RXQ6mropeMcjFOsQXQ0iGLAr/xT6TImQg4+U9hmNpN9XdvPkjUL1IzbgxJw==} - engines: {node: '>=10.12.0'} - hasBin: true - call-bind-apply-helpers@1.0.2: resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} engines: {node: '>= 0.4'} @@ -1506,20 +1985,11 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} - camelcase@1.2.1: - resolution: {integrity: sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==} - engines: {node: '>=0.10.0'} - caniuse-lite@1.0.30001782: resolution: {integrity: sha512-dZcaJLJeDMh4rELYFw1tvSn1bhZWYFOt468FcbHHxx/Z/dFidd1I6ciyFdi3iwfQCyOjqo9upF6lGQYtMiJWxw==} - catharsis@0.9.0: - resolution: {integrity: sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==} - engines: {node: '>= 10'} - - center-align@0.1.3: - resolution: {integrity: sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ==} - engines: {node: '>=0.10.0'} + ccount@2.0.1: + resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} chai@6.2.2: resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} @@ -1533,12 +2003,25 @@ packages: resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==} engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} - character-parser@2.2.0: - resolution: {integrity: sha512-+UqJQjFEFaTAs3bNsF2j2kEN1baG/zghZbdqoYEDxGZtJo9LBzl1A+m0D4n3qKx8N2FNv8/Xp6yV9mQmBuptaw==} + character-entities-html4@2.1.0: + resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} + + character-entities-legacy@3.0.0: + resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} - clean-css@4.2.4: - resolution: {integrity: sha512-EJUDT7nDVFDvaQgAo2G/PJvxmp1o/c6iXLbswsBbUFXi1Nr+AjA2cKmfbKDMjMvzEe75g3P6JkaDDAKk96A85A==} - engines: {node: '>= 4.0'} + character-entities@2.0.2: + resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} + + character-reference-invalid@2.0.1: + resolution: {integrity: sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==} + + chokidar@5.0.0: + resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==} + engines: {node: '>= 20.19.0'} + + ci-info@4.4.0: + resolution: {integrity: sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==} + engines: {node: '>=8'} cli-cursor@5.0.0: resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==} @@ -1552,16 +2035,17 @@ packages: resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} engines: {node: '>= 12'} - cliui@2.1.0: - resolution: {integrity: sha512-GIOYRizG+TGoc7Wgc1LiOTLare95R3mzKgoln+Q/lE4ceiYH19gUpl0l0Ffq4lJDEf3FxujMe6IBfOCs7pfqNA==} - - cliui@7.0.4: - resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} - cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + engines: {node: '>=6'} + + collapse-white-space@2.1.0: + resolution: {integrity: sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==} + color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} @@ -1576,6 +2060,13 @@ packages: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} + comma-separated-tokens@2.0.3: + resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} + + commander@11.1.0: + resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} + engines: {node: '>=16'} + commander@13.1.0: resolution: {integrity: sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==} engines: {node: '>=18'} @@ -1587,14 +2078,14 @@ packages: commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - comment-parser@1.4.1: - resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==} - engines: {node: '>= 12.0.0'} - comment-parser@1.4.6: resolution: {integrity: sha512-ObxuY6vnbWTN6Od72xfwN9DbzC7Y2vv8u1Soi9ahRKL37gb6y1qk6/dgjs+3JWuXJHWvsg3BXIwzd/rkmAwavg==} engines: {node: '>= 12.0.0'} + common-ancestor-path@2.0.0: + resolution: {integrity: sha512-dnN3ibLeoRf2HNC+OlCiNc5d2zxbLJXOtiZUudNFSXZrNSydxcCsSpRzXwfu7BBWCIfHPw+xTayeBvJCP/D8Ng==} + engines: {node: '>= 18'} + commondir@1.0.1: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} @@ -1604,23 +2095,16 @@ packages: confusing-browser-globals@1.0.11: resolution: {integrity: sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==} - constantinople@3.1.2: - resolution: {integrity: sha512-yePcBqEFhLOqSBtwYOGGS1exHo/s1xjekXiinh4itpNQGCu4KA1euPh1fg07N2wMITZXQkBz75Ntdt1ctGZouw==} - convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} + cookie-es@1.2.3: + resolution: {integrity: sha512-lXVyvUvrNXblMqzIRrxHb57UUVmqsSWlxqt3XIjCkUP0wDAf6uicO6KMbEgYrMNtEvWgWHwe42CKxPu9MYAnWw==} + cookie@1.1.1: resolution: {integrity: sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==} engines: {node: '>=18'} - core-js@2.6.12: - resolution: {integrity: sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==} - deprecated: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js. - - create-require@1.1.1: - resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - cross-env@7.0.3: resolution: {integrity: sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==} engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} @@ -1630,10 +2114,36 @@ packages: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} + crossws@0.3.5: + resolution: {integrity: sha512-ojKiDvcmByhwa8YYqbQI/hg7MEU0NC03+pSdEq4ZUnZR9xXpwk7E43SMNGkn+JxJGPFtNvQ48+vV2p+P1ml5PA==} + + css-select@5.2.2: + resolution: {integrity: sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==} + + css-selector-parser@3.3.0: + resolution: {integrity: sha512-Y2asgMGFqJKF4fq4xHDSlFYIkeVfRsm69lQC1q9kbEsH5XtnINTMrweLkjYMeaUgiXBy/uvKeO/a1JHTNnmB2g==} + + css-tree@2.2.1: + resolution: {integrity: sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0, npm: '>=7.0.0'} + css-tree@3.2.1: resolution: {integrity: sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==} engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0} + css-what@6.2.2: + resolution: {integrity: sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==} + engines: {node: '>= 6'} + + cssesc@3.0.0: + resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} + engines: {node: '>=4'} + hasBin: true + + csso@5.0.5: + resolution: {integrity: sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==} + engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0, npm: '>=7.0.0'} + cssstyle@5.3.7: resolution: {integrity: sha512-7D2EPVltRrsTkhpQmksIu+LxeWAIEk6wRDMJ1qljlv+CKHJM+cJLlfhWIzNA44eAsHXSNe3+vO6DW1yCYx8SuQ==} engines: {node: '>=20'} @@ -1657,9 +2167,6 @@ packages: resolution: {integrity: sha512-BS8PfmtDGnrgYdOonGZQdLZslWIeCGFP9tpan0hi1Co2Zr2NKADsvGYA8XxuG/4UWgJ6Cjtv+YJnB6MM69QGlQ==} engines: {node: '>= 0.4'} - de-indent@1.0.2: - resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} - debug@3.2.7: resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} peerDependencies: @@ -1677,13 +2184,12 @@ packages: supports-color: optional: true - decamelize@1.2.0: - resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} - engines: {node: '>=0.10.0'} - decimal.js@10.6.0: resolution: {integrity: sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==} + decode-named-character-reference@1.3.0: + resolution: {integrity: sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==} + deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} @@ -1699,36 +2205,63 @@ packages: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} + defu@6.1.7: + resolution: {integrity: sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==} + delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} + dequal@2.0.3: + resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} + engines: {node: '>=6'} + + destr@2.0.5: + resolution: {integrity: sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==} + detect-libc@2.1.2: resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} engines: {node: '>=8'} - diff-match-patch@1.0.5: - resolution: {integrity: sha512-IayShXAgj/QMXgB0IWmKx+rOPuGMhqm5w6jvFxmVenXKIzRqTAAsbBPT3kWQeGANj3jGgvcvv4yK6SxqYmikgw==} + devalue@5.8.0: + resolution: {integrity: sha512-2zA9pFEsnp7vWBZbXF5JAgAq0fsUIt/1XPbRiAmRV3lp/2C3upzH+sADiyy66aFCihoLEsrQHxNM5w1gIDfsBg==} + + devlop@1.1.0: + resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} - diff@4.0.4: - resolution: {integrity: sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==} + diff@8.0.4: + resolution: {integrity: sha512-DPi0FmjiSU5EvQV0++GFDOJ9ASQUVFh5kD+OzOnYdi7n3Wpm9hWWGfB/O2blfHcMVTL5WkQXSnRiK9makhrcnw==} engines: {node: '>=0.3.1'} + direction@2.0.1: + resolution: {integrity: sha512-9S6m9Sukh1cZNknO1CWAr2QAWsbKLafQiyM5gZ7VgXHeuaoUwffKN4q6NC4A/Mf9iiPlOXQEKW/Mv/mh9/3YFA==} + hasBin: true + doctrine@2.1.0: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} - doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} + dom-serializer@2.0.0: + resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} + + domelementtype@2.3.0: + resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} - doctypes@1.1.0: - resolution: {integrity: sha512-LLBi6pEqS6Do3EKQ3J0NqHWV5hhb78Pi8vvESYwyOy2c31ZEZVdtitdzsQsKb7878PEERhzUk0ftqGhG6Mz+pQ==} + domhandler@5.0.3: + resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} + engines: {node: '>= 4'} + + domutils@3.2.2: + resolution: {integrity: sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==} dotenv@16.6.1: resolution: {integrity: sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==} engines: {node: '>=12'} + dset@3.1.4: + resolution: {integrity: sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA==} + engines: {node: '>=4'} + dunder-proto@1.0.1: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} @@ -1799,23 +2332,34 @@ packages: resolution: {integrity: sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==} engines: {node: '>= 0.4'} + esast-util-from-estree@2.0.0: + resolution: {integrity: sha512-4CyanoAudUSBAn5K13H4JhsMH6L9ZP7XbLVe/dKybkxMO7eDyLsT8UHl9TRNrU2Gr9nz+FovfSIjuXWJ81uVwQ==} + + esast-util-from-js@2.0.1: + resolution: {integrity: sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw==} + esbuild@0.24.2: resolution: {integrity: sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==} engines: {node: '>=18'} hasBin: true + esbuild@0.27.7: + resolution: {integrity: sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==} + engines: {node: '>=18'} + hasBin: true + escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} - escape-string-regexp@2.0.0: - resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} - engines: {node: '>=8'} - escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} + escape-string-regexp@5.0.0: + resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} + engines: {node: '>=12'} + eslint-compat-utils@0.5.1: resolution: {integrity: sha512-3z3vFexKIEnjHE3zCMRo6fn/e44U7T1khUjg+Hp0ZQMCigh28rALD0nPFBcGZuiLC5rLZa2ubQHDRln09JfU2Q==} engines: {node: '>=12'} @@ -1909,12 +2453,6 @@ packages: '@typescript-eslint/parser': optional: true - eslint-plugin-jsdoc@61.7.1: - resolution: {integrity: sha512-36DpldF95MlTX//n3/naULFVt8d1cV4jmSkx7ZKrE9ikkKHAgMLesuWp1SmwpVwAs5ndIM6abKd6PeOYZUgdWg==} - engines: {node: '>=20.11.0'} - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 - eslint-plugin-jsx-a11y@6.10.2: resolution: {integrity: sha512-scB3nz4WmG75pV8+3eRUQOHZlNSUhFNq37xnpgRkCCELU3XMvXAxLk1eqWWyE22Ki4Q01Fnsw9BA3cJHDPgn2Q==} engines: {node: '>=4.0'} @@ -1953,6 +2491,9 @@ packages: peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 + eslint-plugin-tsdoc@0.5.2: + resolution: {integrity: sha512-BlvqjWZdBJDIPO/YU3zcPCF23CvjYT3gyu63yo6b609NNV3D1b6zceAREy2xnweuBoDpZcLNuPyAUq9cvx6bbQ==} + eslint-scope@8.4.0: resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1983,15 +2524,6 @@ packages: resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - espree@11.2.0: - resolution: {integrity: sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==} - engines: {node: ^20.19.0 || ^22.13.0 || >=24} - - esprima@4.0.1: - resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} - engines: {node: '>=4'} - hasBin: true - esquery@1.7.0: resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} engines: {node: '>=0.10'} @@ -2004,9 +2536,23 @@ packages: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} - estree-to-babel@3.2.1: - resolution: {integrity: sha512-YNF+mZ/Wu2FU/gvmzuWtYc8rloubL7wfXCTgouFrnjGVXPA/EeYYA7pupXWrb3Iv1cTBeSSxxJIbK23l4MRNqg==} - engines: {node: '>=8.3.0'} + estree-util-attach-comments@3.0.0: + resolution: {integrity: sha512-cKUwm/HUcTDsYh/9FgnuFqpfquUbwIqwKM26BVCGDPVgvaCl/nDCCjUfiLlx6lsEZ3Z4RFxNbOQ60pkaEwFxGw==} + + estree-util-build-jsx@3.0.1: + resolution: {integrity: sha512-8U5eiL6BTrPxp/CHbs2yMgP8ftMhR5ww1eIKoWRMlqvltHF8fZn5LRDvTKuxD3DUn+shRbLGqXemcP51oFCsGQ==} + + estree-util-is-identifier-name@3.0.0: + resolution: {integrity: sha512-hFtqIDZTIUZ9BXLb8y4pYGyk6+wekIivNVTcmvk8NoOh+VeRn5y6cEHzbURrWbfp1fIqdVipilzj+lfaadNZmg==} + + estree-util-scope@1.0.0: + resolution: {integrity: sha512-2CAASclonf+JFWBNJPndcOpA8EMJwa0Q8LUFJEKqXLW6+qBvbFZuF5gItbQOs/umBUkjviCSDCbBwU2cXbmrhQ==} + + estree-util-to-js@2.0.0: + resolution: {integrity: sha512-WDF+xj5rRWmD5tj6bIqRi6CkLIXbbNQUcxQHzGysQzvHmdYG2G7p/Tf0J0gpxGgkeMZNTIjT/AoSvC9Xehcgdg==} + + estree-util-visit@2.0.0: + resolution: {integrity: sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==} estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} @@ -2037,6 +2583,12 @@ packages: resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} engines: {node: '>=12.0.0'} + expressive-code@0.42.0: + resolution: {integrity: sha512-V5DtJLEKuj4wf9O6IRtPtRObkMVy2ggR+S0MdjrTw6m58krZnDioyhW1si3Y04c5YPeooP4nd85Yq9NwEVHS4g==} + + extend@3.0.2: + resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} + fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -2059,6 +2611,9 @@ packages: fast-string-width@3.0.2: resolution: {integrity: sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==} + fast-uri@3.1.2: + resolution: {integrity: sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==} + fast-wrap-ansi@0.2.0: resolution: {integrity: sha512-rLV8JHxTyhVmFYhBJuMujcrHqOT2cnO5Zxj37qROj23CP39GXubJRBUFF0z8KFK77Uc0SukZUf7JZhsVEQ6n8w==} @@ -2099,6 +2654,10 @@ packages: flatted@3.4.2: resolution: {integrity: sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==} + flattie@1.1.1: + resolution: {integrity: sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ==} + engines: {node: '>=8'} + follow-redirects@1.15.11: resolution: {integrity: sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==} engines: {node: '>=4.0'} @@ -2108,21 +2667,21 @@ packages: debug: optional: true + fontace@0.4.1: + resolution: {integrity: sha512-lDMvbAzSnHmbYMTEld5qdtvNH2/pWpICOqpean9IgC7vUbUJc3k+k5Dokp85CegamqQpFbXf0rAVkbzpyTA8aw==} + + fontkitten@1.0.3: + resolution: {integrity: sha512-Wp1zXWPVUPBmfoa3Cqc9ctaKuzKAV6uLstRqlR56kSjplf5uAce+qeyYym7F+PHbGTk+tCEdkCW6RD7DX/gBZw==} + engines: {node: '>=20'} + for-each@0.3.5: resolution: {integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==} engines: {node: '>= 0.4'} - foreground-child@2.0.0: - resolution: {integrity: sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==} - engines: {node: '>=8.0.0'} - form-data@4.0.5: resolution: {integrity: sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==} engines: {node: '>= 6'} - fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - fsevents@2.3.2: resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -2178,6 +2737,13 @@ packages: get-tsconfig@4.14.0: resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==} + get-tsconfig@5.0.0-beta.4: + resolution: {integrity: sha512-7nF7C9fIPFEMHgEMEfgIlO9wDdZ8CyHw27rWciFZfHvHDReIiPhsYuzPRXsfvBCqFy1l8RRyyWV7QLM+ZhUJsQ==} + engines: {node: '>=20.20.0'} + + github-slugger@2.0.0: + resolution: {integrity: sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==} + glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -2186,10 +2752,6 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} - glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me - globals@14.0.0: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} @@ -2220,6 +2782,9 @@ packages: resolution: {integrity: sha512-5bJ+nf/UCpAjHM8i06fl7eLyVC9iuNAjm9qzkiu2ZGhM0VscSvS6WDPfAwkdkBuoXGM9FJSbKl6wylMwP9Ktig==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} + h3@1.15.11: + resolution: {integrity: sha512-L3THSe2MPeBwgIZVSH5zLdBBU90TOxarvhK9d04IDY2AmVS8j2Jz2LIWtwsGOU3lu2I5jCN7FNvVfY2+XyF+mg==} + has-bigints@1.1.0: resolution: {integrity: sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==} engines: {node: '>= 0.4'} @@ -2243,16 +2808,69 @@ packages: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} - hash-sum@1.0.2: - resolution: {integrity: sha512-fUs4B4L+mlt8/XAtSOGMUO1TXmAelItBPtJG7CyHJfYTdDjwisntGO2JQz7oUsatOY9o68+57eziUVNw/mRHmA==} - hasown@2.0.2: resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} engines: {node: '>= 0.4'} - he@1.2.0: - resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} - hasBin: true + hast-util-embedded@3.0.0: + resolution: {integrity: sha512-naH8sld4Pe2ep03qqULEtvYr7EjrLK2QHY8KJR6RJkTUjPGObe1vnx585uzem2hGra+s1q08DZZpfgDVYRbaXA==} + + hast-util-format@1.1.0: + resolution: {integrity: sha512-yY1UDz6bC9rDvCWHpx12aIBGRG7krurX0p0Fm6pT547LwDIZZiNr8a+IHDogorAdreULSEzP82Nlv5SZkHZcjA==} + + hast-util-from-html@2.0.3: + resolution: {integrity: sha512-CUSRHXyKjzHov8yKsQjGOElXy/3EKpyX56ELnkHH34vDVw1N1XSQ1ZcAvTyAPtGqLTuKP/uxM+aLkSPqF/EtMw==} + + hast-util-from-parse5@8.0.3: + resolution: {integrity: sha512-3kxEVkEKt0zvcZ3hCRYI8rqrgwtlIOFMWkbclACvjlDw8Li9S2hk/d51OI0nr/gIpdMHNepwgOKqZ/sy0Clpyg==} + + hast-util-has-property@3.0.0: + resolution: {integrity: sha512-MNilsvEKLFpV604hwfhVStK0usFY/QmM5zX16bo7EjnAEGofr5YyI37kzopBlZJkHD4t887i+q/C8/tr5Q94cA==} + + hast-util-is-body-ok-link@3.0.1: + resolution: {integrity: sha512-0qpnzOBLztXHbHQenVB8uNuxTnm/QBFUOmdOSsEn7GnBtyY07+ENTWVFBAnXd/zEgd9/SUG3lRY7hSIBWRgGpQ==} + + hast-util-is-element@3.0.0: + resolution: {integrity: sha512-Val9mnv2IWpLbNPqc/pUem+a7Ipj2aHacCwgNfTiK0vJKl0LF+4Ba4+v1oPHFpf3bLYmreq0/l3Gud9S5OH42g==} + + hast-util-minify-whitespace@1.0.1: + resolution: {integrity: sha512-L96fPOVpnclQE0xzdWb/D12VT5FabA7SnZOUMtL1DbXmYiHJMXZvFkIZfiMmTCNJHUeO2K9UYNXoVyfz+QHuOw==} + + hast-util-parse-selector@4.0.0: + resolution: {integrity: sha512-wkQCkSYoOGCRKERFWcxMVMOcYE2K1AaNLU8DXS9arxnLOUEWbOXKXiJUNzEpqZ3JOKpnha3jkFrumEjVliDe7A==} + + hast-util-phrasing@3.0.1: + resolution: {integrity: sha512-6h60VfI3uBQUxHqTyMymMZnEbNl1XmEGtOxxKYL7stY2o601COo62AWAYBQR9lZbYXYSBoxag8UpPRXK+9fqSQ==} + + hast-util-raw@9.1.0: + resolution: {integrity: sha512-Y8/SBAHkZGoNkpzqqfCldijcuUKh7/su31kEBp67cFY09Wy0mTRgtsLYsiIxMJxlu0f6AA5SUTbDR8K0rxnbUw==} + + hast-util-select@6.0.4: + resolution: {integrity: sha512-RqGS1ZgI0MwxLaKLDxjprynNzINEkRHY2i8ln4DDjgv9ZhcYVIHN9rlpiYsqtFwrgpYU361SyWDQcGNIBVu3lw==} + + hast-util-to-estree@3.1.3: + resolution: {integrity: sha512-48+B/rJWAp0jamNbAAf9M7Uf//UVqAoMmgXhBdxTDJLGKY+LRnZ99qcG+Qjl5HfMpYNzS5v4EAwVEF34LeAj7w==} + + hast-util-to-html@9.0.5: + resolution: {integrity: sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==} + + hast-util-to-jsx-runtime@2.3.6: + resolution: {integrity: sha512-zl6s8LwNyo1P9uw+XJGvZtdFF1GdAkOg8ujOw+4Pyb76874fLps4ueHXDhXWdk6YHQ6OgUtinliG7RsYvCbbBg==} + + hast-util-to-parse5@8.0.1: + resolution: {integrity: sha512-MlWT6Pjt4CG9lFCjiz4BH7l9wmrMkfkJYCxFwKQic8+RTZgWPuWxwAfjJElsXkex7DJjfSJsQIt931ilUgmwdA==} + + hast-util-to-string@3.0.1: + resolution: {integrity: sha512-XelQVTDWvqcl3axRfI0xSeoVKzyIFPwsAGSLIsKdJKQMXDYJS4WYrBNF/8J7RdhIcFI2BOHgAifggsvsxp/3+A==} + + hast-util-to-text@4.0.2: + resolution: {integrity: sha512-KK6y/BN8lbaq654j7JgBydev7wuNMcID54lkRav1P0CaE1e47P72AWWPiGKXTJU271ooYzcvTAn/Zt0REnvc7A==} + + hast-util-whitespace@3.0.0: + resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==} + + hastscript@9.0.1: + resolution: {integrity: sha512-g7df9rMFX/SPi34tyGCyUBREQoKkapwdY/T04Qn9TDWfHhAYt4/I0gMVirzK5wEzeUqIjEB+LXC/ypb7Aqno5w==} headers-polyfill@5.0.1: resolution: {integrity: sha512-1TJ6Fih/b8h5TIcv+1+Hw0PDQWJTKDKzFZzcKOiW1wJza3XoAQlkCuXLbymPYB8+ZQyw8mHvdw560e8zVFIWyA==} @@ -2267,12 +2885,21 @@ packages: resolution: {integrity: sha512-CV9TW3Y3f8/wT0BRFc1/KAVQ3TUHiXmaAb6VW9vtiMFf7SLoMd1PdAc4W3KFOFETBJUb90KatHqlsZMWV+R9Gg==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} - html-entities@2.6.0: - resolution: {integrity: sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ==} - html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + html-escaper@3.0.3: + resolution: {integrity: sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==} + + html-void-elements@3.0.0: + resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} + + html-whitespace-sensitive-tag-names@3.0.1: + resolution: {integrity: sha512-q+310vW8zmymYHALr1da4HyXUQ0zgiIwIicEfotYPWGN0OJVEN/58IJ3A4GBYcEq3LGAZqKb+ugvP0GNB9CEAA==} + + http-cache-semantics@4.2.0: + resolution: {integrity: sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==} + http-proxy-agent@7.0.2: resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} engines: {node: '>= 14'} @@ -2290,6 +2917,14 @@ packages: engines: {node: '>=18'} hasBin: true + i18next@26.0.10: + resolution: {integrity: sha512-k3yGPAlWR2RdMYoVXJoDZDT87qeHIWKH7gVksdZMpRty7QX/D9QZeYGvN08KGbKHke9wn01eYT+EEsrqX/YTlw==} + peerDependencies: + typescript: ^5 || ^6 + peerDependenciesMeta: + typescript: + optional: true + ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -2309,17 +2944,22 @@ packages: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} - inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. - - inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + inline-style-parser@0.2.7: + resolution: {integrity: sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==} internal-slot@1.1.0: resolution: {integrity: sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==} engines: {node: '>= 0.4'} + iron-webcrypto@1.2.1: + resolution: {integrity: sha512-feOM6FaSr6rEABp/eDfVseKyTMDt+KGpeB35SkVn9Tyn0CqvVsY3EwI0v5i8nMHyJnzCIQf7nsy3p41TPkJZhg==} + + is-alphabetical@2.0.1: + resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==} + + is-alphanumerical@2.0.1: + resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==} + is-array-buffer@3.0.5: resolution: {integrity: sha512-DDfANUiiG2wC1qawP66qlTugJeL5HyzMpfr8lLK+jMQirGzNod0B12cFB/9q838Ru27sBwfw78/rdoU7RERz6A==} engines: {node: '>= 0.4'} @@ -2336,9 +2976,6 @@ packages: resolution: {integrity: sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==} engines: {node: '>= 0.4'} - is-buffer@1.1.6: - resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} - is-bun-module@2.0.0: resolution: {integrity: sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==} @@ -2358,8 +2995,18 @@ packages: resolution: {integrity: sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==} engines: {node: '>= 0.4'} - is-expression@3.0.0: - resolution: {integrity: sha512-vyMeQMq+AiH5uUnoBfMTwf18tO3bM6k1QXBE9D6ueAAquEfCZe3AJPtud9g6qS0+4X8xA7ndpZiDyeb2l2qOBw==} + is-decimal@2.0.1: + resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==} + + is-docker@3.0.0: + resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + hasBin: true + + is-docker@4.0.0: + resolution: {integrity: sha512-LHE+wROyG/Y/0ZnbktRCoTix2c1RhgWaZraMZ8o1Q7zCh0VSrICJQO5oqIIISrcSBtrXv0o233w1IYwsWCjTzA==} + engines: {node: '>=20'} + hasBin: true is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} @@ -2389,6 +3036,14 @@ packages: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} + is-hexadecimal@2.0.1: + resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==} + + is-inside-container@1.0.0: + resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} + engines: {node: '>=14.16'} + hasBin: true + is-map@2.0.3: resolution: {integrity: sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==} engines: {node: '>= 0.4'} @@ -2411,12 +3066,13 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} + is-plain-obj@4.1.0: + resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} + engines: {node: '>=12'} + is-potential-custom-element-name@1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} - is-promise@2.2.2: - resolution: {integrity: sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==} - is-reference@1.2.1: resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} @@ -2464,6 +3120,10 @@ packages: resolution: {integrity: sha512-mfcwb6IzQyOKTs84CQMrOwW4gQcaTOAWJ0zzJCl2WSPDrWk/OzDaImWFH3djXhb24g4eudZfLRozAvPGw4d9hQ==} engines: {node: '>= 0.4'} + is-wsl@3.1.1: + resolution: {integrity: sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==} + engines: {node: '>=16'} + isarray@2.0.5: resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} @@ -2486,8 +3146,8 @@ packages: resolution: {integrity: sha512-H0dkQoCa3b2VEeKQBOxFph+JAbcrQdE7KC0UkqwpLmv2EC4P41QXP+rqo9wYodACiG5/WM5s9oDApTU8utwj9g==} engines: {node: '>= 0.4'} - js-stringify@1.0.2: - resolution: {integrity: sha512-rtS5ATOo2Q5k1G+DADISilDA6lv79zIiwFd6CcjuIxGKLFm5C+RLImRscVap9k55i+MOZwgliw+NejvkLuGD5g==} + jju@1.4.0: + resolution: {integrity: sha512-8wb9Yw966OSxApiCt0K3yNJL8pnNeIv+OEq2YMidz4FKP6nonSRoOXc80iXY4JaN2FC11B9qsNmDsm+ZOfMROA==} js-tokens@10.0.0: resolution: {integrity: sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==} @@ -2499,18 +3159,6 @@ packages: resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} hasBin: true - js2xmlparser@4.0.2: - resolution: {integrity: sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==} - - jsdoc-type-pratt-parser@7.0.0: - resolution: {integrity: sha512-c7YbokssPOSHmqTbSAmTtnVgAVa/7lumWNYqomgd5KOMyPrRve2anx6lonfOsXEQacqF9FKVUj7bLg4vRSvdYA==} - engines: {node: '>=20.0.0'} - - jsdoc@4.0.5: - resolution: {integrity: sha512-P4C6MWP9yIlMiK8nwoZvxN84vb6MsnXcHuy7XzVOvQoCizWX5JFCBsWIIWKXBltpoRZXddUOVQmCTOZt9yDj9g==} - engines: {node: '>=12.0.0'} - hasBin: true - jsdom@27.4.0: resolution: {integrity: sha512-mjzqwWRD9Y1J1KUi7W97Gja1bwOOM5Ug0EZ6UDK3xS7j7mndrkwozHtSblfomlzyB4NepioNt+B2sOSzczVgtQ==} engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0} @@ -2531,6 +3179,9 @@ packages: json-schema-traverse@0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} @@ -2543,8 +3194,8 @@ packages: engines: {node: '>=6'} hasBin: true - jstransformer@1.0.0: - resolution: {integrity: sha512-C9YK3Rf8q6VAPDCCU9fnqo3mAfOH6vUGnMcP4AQAYIEpWtfGLpwOTmZ+igtdK5y+VvI2n3CyYSzy4Qh34eq24A==} + jsonc-parser@3.3.1: + resolution: {integrity: sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==} jsx-ast-utils@3.3.5: resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==} @@ -2553,12 +3204,9 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - kind-of@3.2.2: - resolution: {integrity: sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==} - engines: {node: '>=0.10.0'} - - klaw@3.0.0: - resolution: {integrity: sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==} + klona@2.0.6: + resolution: {integrity: sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA==} + engines: {node: '>= 8'} language-subtag-registry@0.3.23: resolution: {integrity: sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==} @@ -2567,10 +3215,6 @@ packages: resolution: {integrity: sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==} engines: {node: '>=0.10'} - lazy-cache@1.0.4: - resolution: {integrity: sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ==} - engines: {node: '>=0.10.0'} - levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -2610,24 +3254,28 @@ packages: engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] lightningcss-linux-arm64-musl@1.32.0: resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] + libc: [musl] lightningcss-linux-x64-gnu@1.32.0: resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [glibc] lightningcss-linux-x64-musl@1.32.0: resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] + libc: [musl] lightningcss-win32-arm64-msvc@1.32.0: resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} @@ -2665,14 +3313,6 @@ packages: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} - lodash.get@4.4.2: - resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} - deprecated: This package is deprecated. Use the optional chaining (?.) operator instead. - - lodash.isequal@4.5.0: - resolution: {integrity: sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==} - deprecated: This package is deprecated. Use require('node:util').isDeepStrictEqual instead. - lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} @@ -2683,9 +3323,8 @@ packages: resolution: {integrity: sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==} engines: {node: '>=18'} - longest@1.0.1: - resolution: {integrity: sha512-k+yt5n3l48JU4k8ftnKG6V7u32wyH2NfKzeMto9F/QRE0amxy/LayxwlvjjkZEIzqR+19IrtFO8p5kB9QaYUFg==} - engines: {node: '>=0.10.0'} + longest-streak@3.1.0: + resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} @@ -2695,12 +3334,12 @@ packages: resolution: {integrity: sha512-aY/R+aEsRelme17KGQa/1ZSIpLpNYYrhcrepKTZgE+W3WM16YMCaPwOHLHsmopZHELU0Ojin1lPVxKR0MihncA==} engines: {node: 20 || >=22} - lru-cache@4.1.5: - resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} - lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + lunr@2.3.9: + resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} + magic-string@0.30.21: resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} @@ -2711,28 +3350,78 @@ packages: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} - make-error@1.3.6: - resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - - markdown-it-anchor@8.6.7: - resolution: {integrity: sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==} - peerDependencies: - '@types/markdown-it': '*' - markdown-it: '*' + markdown-extensions@2.0.0: + resolution: {integrity: sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q==} + engines: {node: '>=16'} markdown-it@14.1.1: resolution: {integrity: sha512-BuU2qnTti9YKgK5N+IeMubp14ZUKUUw7yeJbkjtosvHiP0AZ5c8IAgEMk79D0eC8F23r4Ac/q8cAIFdm2FtyoA==} hasBin: true - marked@4.3.0: - resolution: {integrity: sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==} - engines: {node: '>= 12'} - hasBin: true + markdown-table@3.0.4: + resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==} math-intrinsics@1.1.0: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} engines: {node: '>= 0.4'} + mdast-util-definitions@6.0.0: + resolution: {integrity: sha512-scTllyX6pnYNZH/AIp/0ePz6s4cZtARxImwoPJ7kS42n+MnVsI4XbnG6d4ibehRIldYMWM2LD7ImQblVhUejVQ==} + + mdast-util-directive@3.1.0: + resolution: {integrity: sha512-I3fNFt+DHmpWCYAT7quoM6lHf9wuqtI+oCOfvILnoicNIqjh5E3dEJWiXuYME2gNe8vl1iMQwyUHa7bgFmak6Q==} + + mdast-util-find-and-replace@3.0.2: + resolution: {integrity: sha512-Tmd1Vg/m3Xz43afeNxDIhWRtFZgM2VLyaf4vSTYwudTyeuTneoL3qtWMA5jeLyz/O1vDJmmV4QuScFCA2tBPwg==} + + mdast-util-from-markdown@2.0.3: + resolution: {integrity: sha512-W4mAWTvSlKvf8L6J+VN9yLSqQ9AOAAvHuoDAmPkz4dHf553m5gVj2ejadHJhoJmcmxEnOv6Pa8XJhpxE93kb8Q==} + + mdast-util-gfm-autolink-literal@2.0.1: + resolution: {integrity: sha512-5HVP2MKaP6L+G6YaxPNjuL0BPrq9orG3TsrZ9YXbA3vDw/ACI4MEsnoDpn6ZNm7GnZgtAcONJyPhOP8tNJQavQ==} + + mdast-util-gfm-footnote@2.1.0: + resolution: {integrity: sha512-sqpDWlsHn7Ac9GNZQMeUzPQSMzR6Wv0WKRNvQRg0KqHh02fpTz69Qc1QSseNX29bhz1ROIyNyxExfawVKTm1GQ==} + + mdast-util-gfm-strikethrough@2.0.0: + resolution: {integrity: sha512-mKKb915TF+OC5ptj5bJ7WFRPdYtuHv0yTRxK2tJvi+BDqbkiG7h7u/9SI89nRAYcmap2xHQL9D+QG/6wSrTtXg==} + + mdast-util-gfm-table@2.0.0: + resolution: {integrity: sha512-78UEvebzz/rJIxLvE7ZtDd/vIQ0RHv+3Mh5DR96p7cS7HsBhYIICDBCu8csTNWNO6tBWfqXPWekRuj2FNOGOZg==} + + mdast-util-gfm-task-list-item@2.0.0: + resolution: {integrity: sha512-IrtvNvjxC1o06taBAVJznEnkiHxLFTzgonUdy8hzFVeDun0uTjxxrRGVaNFqkU1wJR3RBPEfsxmU6jDWPofrTQ==} + + mdast-util-gfm@3.1.0: + resolution: {integrity: sha512-0ulfdQOM3ysHhCJ1p06l0b0VKlhU0wuQs3thxZQagjcjPrlFRqY215uZGHHJan9GEAXd9MbfPjFJz+qMkVR6zQ==} + + mdast-util-mdx-expression@2.0.1: + resolution: {integrity: sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==} + + mdast-util-mdx-jsx@3.2.0: + resolution: {integrity: sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q==} + + mdast-util-mdx@3.0.0: + resolution: {integrity: sha512-JfbYLAW7XnYTTbUsmpu0kdBUVe+yKVJZBItEjwyYJiDJuZ9w4eeaqks4HQO+R7objWgS2ymV60GYpI14Ug554w==} + + mdast-util-mdxjs-esm@2.0.1: + resolution: {integrity: sha512-EcmOpxsZ96CvlP03NghtH1EsLtr0n9Tm4lPUJUBccV9RwUOneqSycg19n5HGzCf+10LozMRSObtVr3ee1WoHtg==} + + mdast-util-phrasing@4.1.0: + resolution: {integrity: sha512-TqICwyvJJpBwvGAMZjj4J2n0X8QWp21b9l0o7eXyVJ25YNWYbJDVIyD1bZXE6WtV6RmKJVYmQAKWa0zWOABz2w==} + + mdast-util-to-hast@13.2.1: + resolution: {integrity: sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==} + + mdast-util-to-markdown@2.1.2: + resolution: {integrity: sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==} + + mdast-util-to-string@4.0.0: + resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} + + mdn-data@2.0.28: + resolution: {integrity: sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==} + mdn-data@2.27.1: resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==} @@ -2746,31 +3435,135 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} - micromatch@4.0.8: - resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} - engines: {node: '>=8.6'} + micromark-core-commonmark@2.0.3: + resolution: {integrity: sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==} - mime-db@1.52.0: - resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} - engines: {node: '>= 0.6'} + micromark-extension-directive@4.0.0: + resolution: {integrity: sha512-/C2nqVmXXmiseSSuCdItCMho7ybwwop6RrrRPk0KbOHW21JKoCldC+8rFOaundDoRBUWBnJJcxeA/Kvi34WQXg==} - mime-types@2.1.35: - resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} - engines: {node: '>= 0.6'} + micromark-extension-gfm-autolink-literal@2.1.0: + resolution: {integrity: sha512-oOg7knzhicgQ3t4QCjCWgTmfNhvQbDDnJeVu9v81r7NltNCVmhPy1fJRX27pISafdjL+SVc4d3l48Gb6pbRypw==} - mimic-fn@4.0.0: - resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} - engines: {node: '>=12'} + micromark-extension-gfm-footnote@2.1.0: + resolution: {integrity: sha512-/yPhxI1ntnDNsiHtzLKYnE3vf9JZ6cAisqVDauhp4CEHxlb4uoOTxOCJ+9s51bIB8U1N1FJ1RXOKTIlD5B/gqw==} - mimic-function@5.0.1: - resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} - engines: {node: '>=18'} + micromark-extension-gfm-strikethrough@2.1.0: + resolution: {integrity: sha512-ADVjpOOkjz1hhkZLlBiYA9cR2Anf8F4HqZUO6e5eDcPQd0Txw5fxLzzxnEkSkfnD0wziSGiv7sYhk/ktvbf1uw==} - min-indent@1.0.1: - resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} - engines: {node: '>=4'} + micromark-extension-gfm-table@2.1.1: + resolution: {integrity: sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg==} - minimatch@10.2.5: + micromark-extension-gfm-tagfilter@2.0.0: + resolution: {integrity: sha512-xHlTOmuCSotIA8TW1mDIM6X2O1SiX5P9IuDtqGonFhEK0qgRI4yeC6vMxEV2dgyr2TiD+2PQ10o+cOhdVAcwfg==} + + micromark-extension-gfm-task-list-item@2.1.0: + resolution: {integrity: sha512-qIBZhqxqI6fjLDYFTBIa4eivDMnP+OZqsNwmQ3xNLE4Cxwc+zfQEfbs6tzAo2Hjq+bh6q5F+Z8/cksrLFYWQQw==} + + micromark-extension-gfm@3.0.0: + resolution: {integrity: sha512-vsKArQsicm7t0z2GugkCKtZehqUm31oeGBV/KVSorWSy8ZlNAv7ytjFhvaryUiCUJYqs+NoE6AFhpQvBTM6Q4w==} + + micromark-extension-mdx-expression@3.0.1: + resolution: {integrity: sha512-dD/ADLJ1AeMvSAKBwO22zG22N4ybhe7kFIZ3LsDI0GlsNr2A3KYxb0LdC1u5rj4Nw+CHKY0RVdnHX8vj8ejm4Q==} + + micromark-extension-mdx-jsx@3.0.2: + resolution: {integrity: sha512-e5+q1DjMh62LZAJOnDraSSbDMvGJ8x3cbjygy2qFEi7HCeUT4BDKCvMozPozcD6WmOt6sVvYDNBKhFSz3kjOVQ==} + + micromark-extension-mdx-md@2.0.0: + resolution: {integrity: sha512-EpAiszsB3blw4Rpba7xTOUptcFeBFi+6PY8VnJ2hhimH+vCQDirWgsMpz7w1XcZE7LVrSAUGb9VJpG9ghlYvYQ==} + + micromark-extension-mdxjs-esm@3.0.0: + resolution: {integrity: sha512-DJFl4ZqkErRpq/dAPyeWp15tGrcrrJho1hKK5uBS70BCtfrIFg81sqcTVu3Ta+KD1Tk5vAtBNElWxtAa+m8K9A==} + + micromark-extension-mdxjs@3.0.0: + resolution: {integrity: sha512-A873fJfhnJ2siZyUrJ31l34Uqwy4xIFmvPY1oj+Ean5PHcPBYzEsvqvWGaWcfEIr11O5Dlw3p2y0tZWpKHDejQ==} + + micromark-factory-destination@2.0.1: + resolution: {integrity: sha512-Xe6rDdJlkmbFRExpTOmRj9N3MaWmbAgdpSrBQvCFqhezUn4AHqJHbaEnfbVYYiexVSs//tqOdY/DxhjdCiJnIA==} + + micromark-factory-label@2.0.1: + resolution: {integrity: sha512-VFMekyQExqIW7xIChcXn4ok29YE3rnuyveW3wZQWWqF4Nv9Wk5rgJ99KzPvHjkmPXF93FXIbBp6YdW3t71/7Vg==} + + micromark-factory-mdx-expression@2.0.3: + resolution: {integrity: sha512-kQnEtA3vzucU2BkrIa8/VaSAsP+EJ3CKOvhMuJgOEGg9KDC6OAY6nSnNDVRiVNRqj7Y4SlSzcStaH/5jge8JdQ==} + + micromark-factory-space@2.0.1: + resolution: {integrity: sha512-zRkxjtBxxLd2Sc0d+fbnEunsTj46SWXgXciZmHq0kDYGnck/ZSGj9/wULTV95uoeYiK5hRXP2mJ98Uo4cq/LQg==} + + micromark-factory-title@2.0.1: + resolution: {integrity: sha512-5bZ+3CjhAd9eChYTHsjy6TGxpOFSKgKKJPJxr293jTbfry2KDoWkhBb6TcPVB4NmzaPhMs1Frm9AZH7OD4Cjzw==} + + micromark-factory-whitespace@2.0.1: + resolution: {integrity: sha512-Ob0nuZ3PKt/n0hORHyvoD9uZhr+Za8sFoP+OnMcnWK5lngSzALgQYKMr9RJVOWLqQYuyn6ulqGWSXdwf6F80lQ==} + + micromark-util-character@2.1.1: + resolution: {integrity: sha512-wv8tdUTJ3thSFFFJKtpYKOYiGP2+v96Hvk4Tu8KpCAsTMs6yi+nVmGh1syvSCsaxz45J6Jbw+9DD6g97+NV67Q==} + + micromark-util-chunked@2.0.1: + resolution: {integrity: sha512-QUNFEOPELfmvv+4xiNg2sRYeS/P84pTW0TCgP5zc9FpXetHY0ab7SxKyAQCNCc1eK0459uoLI1y5oO5Vc1dbhA==} + + micromark-util-classify-character@2.0.1: + resolution: {integrity: sha512-K0kHzM6afW/MbeWYWLjoHQv1sgg2Q9EccHEDzSkxiP/EaagNzCm7T/WMKZ3rjMbvIpvBiZgwR3dKMygtA4mG1Q==} + + micromark-util-combine-extensions@2.0.1: + resolution: {integrity: sha512-OnAnH8Ujmy59JcyZw8JSbK9cGpdVY44NKgSM7E9Eh7DiLS2E9RNQf0dONaGDzEG9yjEl5hcqeIsj4hfRkLH/Bg==} + + micromark-util-decode-numeric-character-reference@2.0.2: + resolution: {integrity: sha512-ccUbYk6CwVdkmCQMyr64dXz42EfHGkPQlBj5p7YVGzq8I7CtjXZJrubAYezf7Rp+bjPseiROqe7G6foFd+lEuw==} + + micromark-util-decode-string@2.0.1: + resolution: {integrity: sha512-nDV/77Fj6eH1ynwscYTOsbK7rR//Uj0bZXBwJZRfaLEJ1iGBR6kIfNmlNqaqJf649EP0F3NWNdeJi03elllNUQ==} + + micromark-util-encode@2.0.1: + resolution: {integrity: sha512-c3cVx2y4KqUnwopcO9b/SCdo2O67LwJJ/UyqGfbigahfegL9myoEFoDYZgkT7f36T0bLrM9hZTAaAyH+PCAXjw==} + + micromark-util-events-to-acorn@2.0.3: + resolution: {integrity: sha512-jmsiEIiZ1n7X1Rr5k8wVExBQCg5jy4UXVADItHmNk1zkwEVhBuIUKRu3fqv+hs4nxLISi2DQGlqIOGiFxgbfHg==} + + micromark-util-html-tag-name@2.0.1: + resolution: {integrity: sha512-2cNEiYDhCWKI+Gs9T0Tiysk136SnR13hhO8yW6BGNyhOC4qYFnwF1nKfD3HFAIXA5c45RrIG1ub11GiXeYd1xA==} + + micromark-util-normalize-identifier@2.0.1: + resolution: {integrity: sha512-sxPqmo70LyARJs0w2UclACPUUEqltCkJ6PhKdMIDuJ3gSf/Q+/GIe3WKl0Ijb/GyH9lOpUkRAO2wp0GVkLvS9Q==} + + micromark-util-resolve-all@2.0.1: + resolution: {integrity: sha512-VdQyxFWFT2/FGJgwQnJYbe1jjQoNTS4RjglmSjTUlpUMa95Htx9NHeYW4rGDJzbjvCsl9eLjMQwGeElsqmzcHg==} + + micromark-util-sanitize-uri@2.0.1: + resolution: {integrity: sha512-9N9IomZ/YuGGZZmQec1MbgxtlgougxTodVwDzzEouPKo3qFWvymFHWcnDi2vzV1ff6kas9ucW+o3yzJK9YB1AQ==} + + micromark-util-subtokenize@2.1.0: + resolution: {integrity: sha512-XQLu552iSctvnEcgXw6+Sx75GflAPNED1qx7eBJ+wydBb2KCbRZe+NwvIEEMM83uml1+2WSXpBAcp9IUCgCYWA==} + + micromark-util-symbol@2.0.1: + resolution: {integrity: sha512-vs5t8Apaud9N28kgCrRUdEed4UJ+wWNvicHLPxCa9ENlYuAY31M0ETy5y1vA33YoNPDFTghEbnh6efaE8h4x0Q==} + + micromark-util-types@2.0.2: + resolution: {integrity: sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==} + + micromark@4.0.2: + resolution: {integrity: sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==} + + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + + mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + + mimic-fn@4.0.0: + resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} + engines: {node: '>=12'} + + mimic-function@5.0.1: + resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} + engines: {node: '>=18'} + + minimatch@10.2.5: resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==} engines: {node: 18 || 20 || >=22} @@ -2780,11 +3573,6 @@ packages: minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} - mkdirp@1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} - engines: {node: '>=10'} - hasBin: true - mrmime@2.0.1: resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==} engines: {node: '>=10'} @@ -2811,6 +3599,11 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + nanoid@3.3.12: + resolution: {integrity: sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + napi-postinstall@0.3.4: resolution: {integrity: sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} @@ -2819,31 +3612,41 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - neo-async@2.6.2: - resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + neotraverse@0.6.18: + resolution: {integrity: sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA==} + engines: {node: '>= 10'} - node-dir@0.1.17: - resolution: {integrity: sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg==} - engines: {node: '>= 0.10.5'} + nlcst-to-string@4.0.0: + resolution: {integrity: sha512-YKLBCcUYKAg0FNlOBT6aI91qFmSiFKiluk655WzPF+DDMA02qIyy8uiRqI8QXtcFpEvll12LpL5MXqEmAZ+dcA==} node-exports-info@1.6.0: resolution: {integrity: sha512-pyFS63ptit/P5WqUkt+UUfe+4oevH+bFeIiPPdfb0pFeYEu/1ELnJu5l+5EcTKYL5M7zaAa7S8ddywgXypqKCw==} engines: {node: '>= 0.4'} + node-fetch-native@1.6.7: + resolution: {integrity: sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==} + + node-mock-http@1.0.4: + resolution: {integrity: sha512-8DY+kFsDkNXy1sJglUfuODx1/opAGJGyrTuFqEoN90oRc2Vk0ZbD4K2qmKXBBEhZQzdKHIVfEJpDU8Ak2NJEvQ==} + node-releases@2.0.36: resolution: {integrity: sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==} + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + npm-run-path@5.3.0: resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + nth-check@2.1.1: + resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} + object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} - object-deep-merge@2.0.0: - resolution: {integrity: sha512-3DC3UMpeffLTHiuXSy/UG4NOIYTLlY9u3V82+djSCLYClWobZiS4ivYzpIUWrRY/nfsJ8cWsKyG3QfyLePmhvg==} - object-inspect@1.13.4: resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} engines: {node: '>= 0.4'} @@ -2875,8 +3678,11 @@ packages: obug@2.1.1: resolution: {integrity: sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==} - once@1.4.0: - resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + ofetch@1.5.1: + resolution: {integrity: sha512-2W4oUZlVaqAPAil6FUg/difl6YhqhUR7x2eZY4bQCko22UXg3hptq9KLQdqFClV+Wu85UX7hNtdGTngi/1BxcA==} + + ohash@2.0.11: + resolution: {integrity: sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==} onetime@6.0.0: resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} @@ -2886,6 +3692,12 @@ packages: resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} engines: {node: '>=18'} + oniguruma-parser@0.12.2: + resolution: {integrity: sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw==} + + oniguruma-to-es@4.3.6: + resolution: {integrity: sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==} + optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} @@ -2901,10 +3713,29 @@ packages: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} + p-limit@7.3.0: + resolution: {integrity: sha512-7cIXg/Z0M5WZRblrsOla88S4wAK+zOQQWeBYfV3qJuJXMr+LnbYjaadrFaS0JILfEDPVqHyKnZ1Z/1d6J9VVUw==} + engines: {node: '>=20'} + p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} + p-queue@9.2.0: + resolution: {integrity: sha512-dWgLE8AH0HjQ9fe74pUkKkvzzYT18Inp4zra3lKHnnwqGvcfcUBrvF2EAVX+envufDNBOzpPq/IBUONDbI7+3g==} + engines: {node: '>=20'} + + p-timeout@7.0.1: + resolution: {integrity: sha512-AxTM2wDGORHGEkPCt8yqxOTMgpfbEHqF51f/5fJCmwFC3C/zNcGT63SymH2ttOAaiIws2zVg4+izQCjrakcwHg==} + engines: {node: '>=20'} + + package-manager-detector@1.6.0: + resolution: {integrity: sha512-61A5ThoTiDG/C8s8UMZwSorAGwMJ0ERVGj2OjoW5pAalsNOg15+iQiPzrLJ4jhZ1HJzmC2PIHT2oEiH3R5fzNA==} + + pagefind@1.5.2: + resolution: {integrity: sha512-XTUaK0hXMCu2jszWE584JGQT7y284TmMV9l/HX3rnG5uo3rHI/uHU56XTyyyPFjeWEBxECbAi0CaFDJOONtG0Q==} + hasBin: true + pako@1.0.11: resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} @@ -2912,11 +3743,14 @@ packages: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} - parse-imports-exports@0.2.4: - resolution: {integrity: sha512-4s6vd6dx1AotCx/RCI2m7t7GCh5bDRUtGNvRfHSP2wbBQdMi67pPe7mtzmgwcaQ8VKK/6IB7Glfyu3qdZJPybQ==} + parse-entities@4.0.2: + resolution: {integrity: sha512-GG2AQYWoLgL877gQIKeRPGO1xF9+eG1ujIb5soS5gPvLQ1y2o8FL90w2QWNdf9I361Mpp7726c+lj3U0qK1uGw==} - parse-statements@1.0.11: - resolution: {integrity: sha512-HlsyYdMBnbPQ9Jr/VgJ1YF4scnldvJpJxCVx6KgqPL4dxppsWrJHCIIxQXMJrqGnsRkNPATbeMJ8Yxu7JMsYcA==} + parse-latin@7.0.0: + resolution: {integrity: sha512-mhHgobPPua5kZ98EF4HWiH167JWBfl4pvAIXXdbaVohtK7a6YBOy56kvhCqduqyo/f3yrHFWmqmiMg/BkBkYYQ==} + + parse5@7.3.0: + resolution: {integrity: sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==} parse5@8.0.0: resolution: {integrity: sha512-9m4m5GSgXjL4AjumKzq1Fgfp3Z8rsvjRNbnkVwfu2ImRqE5D0LnY2QfDen18FSY9C573YU5XxSapdHZTZ2WolA==} @@ -2925,10 +3759,6 @@ packages: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} - path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -2946,6 +3776,9 @@ packages: pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + piccolore@0.1.3: + resolution: {integrity: sha512-o8bTeDWjE086iwKrROaDf31K0qC/BENdm15/uH9usSC/uZjJOKb2YGiVHfLY4GhwsERiPI1jmwI2XrA7ACOxVw==} + picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -2962,13 +3795,13 @@ packages: engines: {node: '>=0.10'} hasBin: true - playwright-core@1.58.2: - resolution: {integrity: sha512-yZkEtftgwS8CsfYo7nm0KE8jsvm6i/PTgVtB8DL726wNf6H2IMsDuxCpJj59KDaxCtSnrWan2AeDqM7JBaultg==} + playwright-core@1.60.0: + resolution: {integrity: sha512-9bW6zvX/m0lEbgTKJ6YppOKx8H3VOPBMOCFh2irXFOT4BbHgrx5hPjwJYLT40Lu+4qtD36qKc/Hn56StUW57IA==} engines: {node: '>=18'} hasBin: true - playwright@1.58.2: - resolution: {integrity: sha512-vA30H8Nvkq/cPBnNw4Q8TWz1EJyqgpuinBcHET0YVJVFldr8JDNiU9LaWAE1KqSkRYazuaBhTpB5ZzShOezQ6A==} + playwright@1.60.0: + resolution: {integrity: sha512-hheHdokM8cdqCb0lcE3s+zT4t4W+vvjpGxsZlDnikarzx8tSzMebh3UiFtgqwFwnTnjYQcsyMF8ei2mCO/tpeA==} engines: {node: '>=18'} hasBin: true @@ -2980,6 +3813,20 @@ packages: resolution: {integrity: sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==} engines: {node: '>= 0.4'} + postcss-nested@6.2.0: + resolution: {integrity: sha512-HQbt28KulC5AJzG+cZtj9kvKB93CFCdLvog1WFLf1D+xmMvPGlBstkpTEZfK5+AN9hfJocyBFCNiqyS48bpgzQ==} + engines: {node: '>=12.0'} + peerDependencies: + postcss: ^8.2.14 + + postcss-selector-parser@6.1.2: + resolution: {integrity: sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==} + engines: {node: '>=4'} + + postcss@8.5.15: + resolution: {integrity: sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==} + engines: {node: ^10 || ^12 || >=14} + postcss@8.5.8: resolution: {integrity: sha512-OW/rX8O/jXnm82Ey1k44pObPtdblfiuWnrd8X7GJ7emImCOstunGbXUpp7HdBrFQX6rJzn3sPT397Wp5aCwCHg==} engines: {node: ^10 || ^12 || >=14} @@ -2997,59 +3844,20 @@ packages: engines: {node: '>=14'} hasBin: true - private@0.1.8: - resolution: {integrity: sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==} - engines: {node: '>= 0.6'} - - promise@7.3.1: - resolution: {integrity: sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==} + prismjs@1.30.0: + resolution: {integrity: sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==} + engines: {node: '>=6'} prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} + property-information@7.1.0: + resolution: {integrity: sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==} + proxy-from-env@2.1.0: resolution: {integrity: sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==} engines: {node: '>=10'} - pseudomap@1.0.2: - resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} - - pug-attrs@2.0.4: - resolution: {integrity: sha512-TaZ4Z2TWUPDJcV3wjU3RtUXMrd3kM4Wzjbe3EWnSsZPsJ3LDI0F3yCnf2/W7PPFF+edUFQ0HgDL1IoxSz5K8EQ==} - - pug-code-gen@2.0.3: - resolution: {integrity: sha512-r9sezXdDuZJfW9J91TN/2LFbiqDhmltTFmGpHTsGdrNGp3p4SxAjjXEfnuK2e4ywYsRIVP0NeLbSAMHUcaX1EA==} - - pug-error@1.3.3: - resolution: {integrity: sha512-qE3YhESP2mRAWMFJgKdtT5D7ckThRScXRwkfo+Erqga7dyJdY3ZquspprMCj/9sJ2ijm5hXFWQE/A3l4poMWiQ==} - - pug-filters@3.1.1: - resolution: {integrity: sha512-lFfjNyGEyVWC4BwX0WyvkoWLapI5xHSM3xZJFUhx4JM4XyyRdO8Aucc6pCygnqV2uSgJFaJWW3Ft1wCWSoQkQg==} - - pug-lexer@4.1.0: - resolution: {integrity: sha512-i55yzEBtjm0mlplW4LoANq7k3S8gDdfC6+LThGEvsK4FuobcKfDAwt6V4jKPH9RtiE3a2Akfg5UpafZ1OksaPA==} - - pug-linker@3.0.6: - resolution: {integrity: sha512-bagfuHttfQOpANGy1Y6NJ+0mNb7dD2MswFG2ZKj22s8g0wVsojpRlqveEQHmgXXcfROB2RT6oqbPYr9EN2ZWzg==} - - pug-load@2.0.12: - resolution: {integrity: sha512-UqpgGpyyXRYgJs/X60sE6SIf8UBsmcHYKNaOccyVLEuT6OPBIMo6xMPhoJnqtB3Q3BbO4Z3Bjz5qDsUWh4rXsg==} - - pug-parser@5.0.1: - resolution: {integrity: sha512-nGHqK+w07p5/PsPIyzkTQfzlYfuqoiGjaoqHv1LjOv2ZLXmGX1O+4Vcvps+P4LhxZ3drYSljjq4b+Naid126wA==} - - pug-runtime@2.0.5: - resolution: {integrity: sha512-P+rXKn9un4fQY77wtpcuFyvFaBww7/91f3jHa154qU26qFAnOe6SW1CbIDcxiG5lLK9HazYrMCCuDvNgDQNptw==} - - pug-strip-comments@1.0.4: - resolution: {integrity: sha512-i5j/9CS4yFhSxHp5iKPHwigaig/VV9g+FgReLJWWHEHbvKsbqL0oP/K5ubuLco6Wu3Kan5p7u7qk8A4oLLh6vw==} - - pug-walk@1.1.8: - resolution: {integrity: sha512-GMu3M5nUL3fju4/egXwZO0XLi6fW/K3T3VTgFQ14GxNi8btlxgT5qZL//JwZFm/2Fa64J/PNS8AZeys3wiMkVA==} - - pug@2.0.4: - resolution: {integrity: sha512-XhoaDlvi6NIzL49nu094R2NA6P37ijtgMDuWE+ofekDChvfKnzFal60bhSdiy8y2PBO6fmz3oMEIcfpBVRUdvw==} - punycode.js@2.3.1: resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} engines: {node: '>=6'} @@ -3061,54 +3869,89 @@ packages: queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - react-ace@9.5.0: - resolution: {integrity: sha512-4l5FgwGh6K7A0yWVMQlPIXDItM4Q9zzXRqOae8KkCl6MkOob7sC1CzHxZdOGvV+QioKWbX2p5HcdOVUv6cAdSg==} - peerDependencies: - react: ^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0 - react-dom: ^0.13.0 || ^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0 + radix3@1.1.2: + resolution: {integrity: sha512-b484I/7b8rDEdSDKckSSBA8knMpcdsXudlE/LNL639wFoHKwLbEkQFZHWEYwDC0wa0FKUcCY+GAF73Z7wxNVFA==} - react-docgen@5.4.3: - resolution: {integrity: sha512-xlLJyOlnfr8lLEEeaDZ+X2J/KJoe6Nr9AzxnkdQWush5hz2ZSu66w6iLMOScMmxoSHWpWMn+k3v5ZiyCfcWsOA==} - engines: {node: '>=8.10.0'} - hasBin: true + react-is@16.13.1: + resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} - react-dom@17.0.2: - resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==} - peerDependencies: - react: 17.0.2 + readdirp@5.0.0: + resolution: {integrity: sha512-9u/XQ1pvrQtYyMpZe7DXKv2p5CNvyVwzUB6uhLAnQwHMSgKMBR62lc7AHljaeteeHXn11XTAaLLUVZYVZyuRBQ==} + engines: {node: '>= 20.19.0'} - react-frame-component@5.3.2: - resolution: {integrity: sha512-ce0/9xAnnkLDY6zxnTegP3Yjchw5z9aEaz0qKEGecrdnh3nAnQ5kehO84sNeLj3wQPB5ZM0OoVVQDQilhaE/5Q==} - peerDependencies: - prop-types: ^15.8.1 || ^16.0.0 || ^17.0.0 || ^18.0.0 - react: '>= 16.8 || ^17.0.0 || ^18.0.0 || ^19.0.0' - react-dom: '>= 16.8 || ^17.0.0 || ^18.0.0 || ^19.0.0' + recma-build-jsx@1.0.0: + resolution: {integrity: sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew==} - react-is@16.13.1: - resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} + recma-jsx@1.0.1: + resolution: {integrity: sha512-huSIy7VU2Z5OLv6oFLosQGGDqPqdO1iq6bWNAdhzMxSJP7RAso4fCZ1cKu8j9YHCZf3TPrq4dw3okhrylgcd7w==} + peerDependencies: + acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - react@17.0.2: - resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==} - engines: {node: '>=0.10.0'} + recma-parse@1.0.0: + resolution: {integrity: sha512-OYLsIGBB5Y5wjnSnQW6t3Xg7q3fQ7FWbw/vcXtORTnyaSFscOtABg+7Pnz6YZ6c27fG1/aN8CjfwoUEUIdwqWQ==} - recast@0.17.6: - resolution: {integrity: sha512-yoQRMRrK1lszNtbkGyM4kN45AwylV5hMiuEveUBlxytUViWevjvX6w+tzJt1LH4cfUhWt4NZvy3ThIhu6+m5wQ==} - engines: {node: '>= 4'} + recma-stringify@1.0.0: + resolution: {integrity: sha512-cjwII1MdIIVloKvC9ErQ+OgAtwHBmcZ0Bg4ciz78FtbT8In39aAYbaA7zvxQ61xVMSPE8WxhLwLbhif4Js2C+g==} reflect.getprototypeof@1.0.10: resolution: {integrity: sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==} engines: {node: '>= 0.4'} - regenerator-runtime@0.11.1: - resolution: {integrity: sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==} + regex-recursion@6.0.2: + resolution: {integrity: sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==} + + regex-utilities@2.3.0: + resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==} + + regex@6.1.0: + resolution: {integrity: sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg==} regexp.prototype.flags@1.5.4: resolution: {integrity: sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==} engines: {node: '>= 0.4'} - repeat-string@1.6.1: - resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} - engines: {node: '>=0.10'} + rehype-expressive-code@0.42.0: + resolution: {integrity: sha512-8rp/1YMEVVSYbtz+bFBx+uSx3vA4i4T8RwRm5Q/IWbucQnnQqQ0hDqtmKOr8tv+59Cik6cu5aH3WPo0I7csuTA==} + + rehype-format@5.0.1: + resolution: {integrity: sha512-zvmVru9uB0josBVpr946OR8ui7nJEdzZobwLOOqHb/OOD88W0Vk2SqLwoVOj0fM6IPCCO6TaV9CvQvJMWwukFQ==} + + rehype-parse@9.0.1: + resolution: {integrity: sha512-ksCzCD0Fgfh7trPDxr2rSylbwq9iYDkSn8TCDmEJ49ljEUBxDVCzCHv7QNzZOfODanX4+bWQ4WZqLCRWYLfhag==} + + rehype-raw@7.0.0: + resolution: {integrity: sha512-/aE8hCfKlQeA8LmyeyQvQF3eBiLRGNlfBJEvWH7ivp9sBqs7TNqBL5X3v157rM4IFETqDnIOO+z5M/biZbo9Ww==} + + rehype-recma@1.0.0: + resolution: {integrity: sha512-lqA4rGUf1JmacCNWWZx0Wv1dHqMwxzsDWYMTowuplHF3xH0N/MmrZ/G3BDZnzAkRmxDadujCjaKM2hqYdCBOGw==} + + rehype-stringify@10.0.1: + resolution: {integrity: sha512-k9ecfXHmIPuFVI61B9DeLPN0qFHfawM6RsuX48hoqlaKSF61RskNjSm1lI8PhBEM0MRdLxVVm4WmTqJQccH9mA==} + + rehype@13.0.2: + resolution: {integrity: sha512-j31mdaRFrwFRUIlxGeuPXXKWQxet52RBQRvCmzl5eCefn/KGbomK5GMHNMsOJf55fgo3qw5tST5neDuarDYR2A==} + + remark-directive@4.0.0: + resolution: {integrity: sha512-7sxn4RfF1o3izevPV1DheyGDD6X4c9hrGpfdUpm7uC++dqrnJxIZVkk7CoKqcLm0VUMAuOol7Mno3m6g8cfMuA==} + + remark-gfm@4.0.1: + resolution: {integrity: sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==} + + remark-mdx@3.1.1: + resolution: {integrity: sha512-Pjj2IYlUY3+D8x00UJsIOg5BEvfMyeI+2uLPn9VO9Wg4MEtN/VTIq2NEJQfde9PnX15KgtHyl9S0BcTnWrIuWg==} + + remark-parse@11.0.0: + resolution: {integrity: sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==} + + remark-rehype@11.1.2: + resolution: {integrity: sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==} + + remark-smartypants@3.0.2: + resolution: {integrity: sha512-ILTWeOriIluwEvPjv67v7Blgrcx+LZOkAUVtKI3putuhlZm84FnqDORNXPPm+HY3NdZOMhyDwZ1E+eZB/Df5dA==} + engines: {node: '>=16.0.0'} + + remark-stringify@11.0.0: + resolution: {integrity: sha512-1OSmLd3awB/t8qdoEOMazZkNsfVTeY4fTsgzcQFdXNq8ToTN4ZGwrMnlda4K6smTFKD+GRV6O48i6Z4iKgPPpw==} require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} @@ -3118,13 +3961,6 @@ packages: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} - requizzle@0.2.4: - resolution: {integrity: sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw==} - - reserved-identifiers@1.2.0: - resolution: {integrity: sha512-yE7KUfFvaBFzGPs5H3Ops1RevfUEsDc5Iz65rOwWg4lE8HJSYtle77uul3+573457oHvBKuHYDl/xqUkKpEEdw==} - engines: {node: '>=18'} - resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -3146,6 +3982,18 @@ packages: resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==} engines: {node: '>=18'} + retext-latin@4.0.0: + resolution: {integrity: sha512-hv9woG7Fy0M9IlRQloq/N6atV82NxLGveq+3H2WOi79dtIYWN8OaxogDm77f8YnVXJL2VD3bbqowu5E3EMhBYA==} + + retext-smartypants@6.2.0: + resolution: {integrity: sha512-kk0jOU7+zGv//kfjXEBjdIryL1Acl4i9XNkHxtM7Tm5lFiCog576fjNC9hjoR7LTKQ0DsPWy09JummSsH1uqfQ==} + + retext-stringify@4.0.0: + resolution: {integrity: sha512-rtfN/0o8kL1e+78+uxPTqu1Klt0yPzKuQ2BfWwwfgIUSayyzxpM1PJzkKt4V8803uB9qSy32MvI7Xep9khTpiA==} + + retext@9.0.0: + resolution: {integrity: sha512-sbMDcpHCNjvlheSgMfEcVrZko3cDzdbe1x/e7G66dFp0Ff7Mldvi2uv6JkJQzdRcvLYE8CA8Oe8siQx8ZOgTcA==} + rettime@0.11.7: resolution: {integrity: sha512-DoAm1WjR1eH7z8sHPtvvUMIZh4/CSKkGCz6CxPqOrEAnOGtOuHSnSE9OC+razqxKuf4ub7pAYyl/vZV0vGs5tg==} @@ -3156,15 +4004,6 @@ packages: rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} - right-align@0.1.3: - resolution: {integrity: sha512-yqINtL/G7vs2v+dFIZmFUDbnVyFUJFKd6gK22Kgo6R4jfJGFtisKyncWDDULgjfqf4ASQuIQyjJ7XZ+3aWpsAg==} - engines: {node: '>=0.10.0'} - - rimraf@3.0.2: - resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} - deprecated: Rimraf versions prior to v4 are no longer supported - hasBin: true - rolldown@1.0.0-rc.12: resolution: {integrity: sha512-yP4USLIMYrwpPHEFB5JGH1uxhcslv6/hL0OyvTuY+3qlOSJvZ7ntYnoWpehBxufkgN0cvXxppuTu5hHa/zPh+A==} engines: {node: ^20.19.0 || >=22.12.0} @@ -3202,13 +4041,14 @@ packages: resolution: {integrity: sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==} engines: {node: '>= 0.4'} + sax@1.6.0: + resolution: {integrity: sha512-6R3J5M4AcbtLUdZmRv2SygeVaM7IhrLXu9BmnOGmmACak8fiUtOsYNWUS4uK7upbmHIBbLBeFeI//477BKLBzA==} + engines: {node: '>=11.0.0'} + saxes@6.0.0: resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} engines: {node: '>=v12.22.7'} - scheduler@0.20.2: - resolution: {integrity: sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==} - semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -3237,6 +4077,10 @@ packages: resolution: {integrity: sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==} engines: {node: '>= 0.4'} + sharp@0.34.5: + resolution: {integrity: sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -3245,6 +4089,10 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} + shiki@4.0.2: + resolution: {integrity: sha512-eAVKTMedR5ckPo4xne/PjYQYrU3qx78gtJZ+sHlXEg5IHhhoQhMfZVzetTYuaJS0L2Ef3AcCRzCHV8T0WI6nIQ==} + engines: {node: '>=20'} + side-channel-list@1.0.0: resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} engines: {node: '>= 0.4'} @@ -3264,9 +4112,6 @@ packages: siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} - signal-exit@3.0.7: - resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} - signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} @@ -3275,6 +4120,14 @@ packages: resolution: {integrity: sha512-2wcC/oGxHis/BoHkkPwldgiPSYcpZK3JU28WoMVv55yHJgcZ8rlXvuG9iZggz+sU1d4bRgIGASwyWqjxu3FM0g==} engines: {node: '>=18'} + sisteransi@1.0.5: + resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} + + sitemap@9.0.1: + resolution: {integrity: sha512-S6hzjGJSG3d6if0YoF5kTyeRJvia6FSTBroE5fQ0bu1QNxyJqhhinfUsXi9fH3MgtXODWvwo2BDyQSnhPQ88uQ==} + engines: {node: '>=20.19.5', npm: '>=10.8.2'} + hasBin: true + slice-ansi@5.0.0: resolution: {integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==} engines: {node: '>=12'} @@ -3298,22 +4151,16 @@ packages: source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} - source-map@0.5.7: - resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} - engines: {node: '>=0.10.0'} - source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} - spdx-exceptions@2.5.0: - resolution: {integrity: sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==} - - spdx-expression-parse@4.0.0: - resolution: {integrity: sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==} + source-map@0.7.6: + resolution: {integrity: sha512-i5uvt8C3ikiWeNZSVZNWcfZPItFQOsYTUAOkcUPGd8DqDy1uOUikjt5dG+uRlwyvR108Fb9DOd4GvXfT0N2/uQ==} + engines: {node: '>= 12'} - spdx-license-ids@3.0.23: - resolution: {integrity: sha512-CWLcCCH7VLu13TgOH+r8p1O/Znwhqv/dbb6lqWy67G+pT1kHmeD/+V36AVb/vq8QMIQwVShJ6Ssl5FPh0fuSdw==} + space-separated-tokens@2.0.2: + resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} stable-hash-x@0.2.0: resolution: {integrity: sha512-o3yWv49B/o4QZk5ZcsALc6t0+eCelPc44zZsLtCQnZPDwFpDYSWcDnrv2TtMmMbQ7uKo3J0HTURCqckw23czNQ==} @@ -3333,6 +4180,9 @@ packages: resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==} engines: {node: '>= 0.4'} + stream-replace-string@2.0.0: + resolution: {integrity: sha512-TlnjJ1C0QrmxRNrON00JvaFFlNh5TTG00APw23j74ET7gkQpTASi6/L2fuiav8pzK715HXtUeClpBTw2NPSn6w==} + strict-event-emitter@0.5.1: resolution: {integrity: sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==} @@ -3371,6 +4221,9 @@ packages: resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} engines: {node: '>= 0.4'} + stringify-entities@4.0.4: + resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} + strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -3387,14 +4240,16 @@ packages: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} - strip-indent@3.0.0: - resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} - engines: {node: '>=8'} - strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} + style-to-js@1.1.21: + resolution: {integrity: sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ==} + + style-to-object@1.0.14: + resolution: {integrity: sha512-LIN7rULI0jBscWQYaSswptyderlarFkjQ+t79nzty8tcIAceVomEVlLzH5VP4Cmsv6MtKhs7qaAiwlcp+Mgaxw==} + supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} @@ -3403,6 +4258,11 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} + svgo@4.0.1: + resolution: {integrity: sha512-XDpWUOPC6FEibaLzjfe0ucaV0YrOjYotGJO1WpF0Zd+n6ZGEQUsSugaoLq9QkEZtAfQIxT42UChcssDVPP3+/w==} + engines: {node: '>=16'} + hasBin: true + symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} @@ -3410,9 +4270,6 @@ packages: resolution: {integrity: sha512-Bh7QjT8/SuKUIfObSXNHNSK6WHo6J1tHCqJsuaFDP7gP0fkzSfTxI8y85JrppZ0h8l0maIgc2tfuZQ6/t3GtnQ==} engines: {node: ^14.18.0 || >=16.0.0} - taffydb@2.7.3: - resolution: {integrity: sha512-GQ3gtYFSOAxSMN/apGtDKKkbJf+8izz5YfbGqIsUc7AMiQOapARZ76dhilRY2h39cynYxBFdafQo5HUL5vgkrg==} - tagged-tag@1.0.0: resolution: {integrity: sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==} engines: {node: '>=20'} @@ -3426,13 +4283,16 @@ packages: engines: {node: '>=10'} hasBin: true - test-exclude@6.0.0: - resolution: {integrity: sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==} - engines: {node: '>=8'} + tiny-inflate@1.0.3: + resolution: {integrity: sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw==} tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + tinyclip@0.1.12: + resolution: {integrity: sha512-Ae3OVUqifDw0wBriIBS7yVaW44Dp6eSHQcyq4Igc7eN2TJH/2YsicswaW+J/OuMvhpDPOKEgpAZCjkb4hpoyeA==} + engines: {node: ^16.14.0 || >= 17.3.0} + tinyexec@1.0.4: resolution: {integrity: sha512-u9r3uZC0bdpGOXtlxUIdwf9pkmvhqJdrVCH9fapQtgy/OeTTMZ1nqH7agtvEfmGui6e1XxjcdrlxvxJvc3sMqw==} engines: {node: '>=18'} @@ -3441,6 +4301,10 @@ packages: resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} engines: {node: '>=12.0.0'} + tinyglobby@0.2.16: + resolution: {integrity: sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==} + engines: {node: '>=12.0.0'} + tinyrainbow@3.1.0: resolution: {integrity: sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==} engines: {node: '>=14.0.0'} @@ -3452,21 +4316,10 @@ packages: resolution: {integrity: sha512-I4FZcVFcqCRuT0ph6dCDpPuO4Xgzvh+spkcTr1gK7peIvxWauoloVO0vuy1FQnijT63ss6AsHB6+OIM4aXHbPg==} hasBin: true - to-fast-properties@1.0.3: - resolution: {integrity: sha512-lxrWP8ejsq+7E3nNjwYmUBMAgjMTZoTI+sdBOpvNyijeDLa29LUn9QaoXAHv4+Z578hbmHHJKZknzxVtvo77og==} - engines: {node: '>=0.10.0'} - to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} - to-valid-identifier@1.0.0: - resolution: {integrity: sha512-41wJyvKep3yT2tyPqX/4blcfybknGB4D+oETKLs7Q76UiPqRpUJK3hr1nxelyYO0PHKVzJwlu0aCeEAsGI6rpw==} - engines: {node: '>=20'} - - token-stream@0.0.1: - resolution: {integrity: sha512-nfjOAu/zAWmX9tgwi5NRp7O7zTDUD1miHiB40klUnAh9qnL1iXdgzcz/i5dMaL5jahcBAaSfmNOBBJBLJW8TEg==} - totalist@3.0.1: resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} engines: {node: '>=6'} @@ -3479,6 +4332,12 @@ packages: resolution: {integrity: sha512-bLVMLPtstlZ4iMQHpFHTR7GAGj2jxi8Dg0s2h2MafAE4uSWF98FC/3MomU51iQAMf8/qDUbKWf5GxuvvVcXEhw==} engines: {node: '>=20'} + trim-lines@3.0.1: + resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} + + trough@2.2.0: + resolution: {integrity: sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==} + ts-api-utils@2.5.0: resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} engines: {node: '>=18.12'} @@ -3490,29 +4349,17 @@ packages: peerDependencies: typescript: '>=4.0.0' - ts-map@1.0.3: - resolution: {integrity: sha512-vDWbsl26LIcPGmDpoVzjEP6+hvHZkBkLW7JpvwbCv/5IYPJlsbzCVXY3wsCeAxAUeTclNOUZxnLdGh3VBD/J6w==} - - ts-node@10.9.2: - resolution: {integrity: sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==} - hasBin: true - peerDependencies: - '@swc/core': '>=1.2.50' - '@swc/wasm': '>=1.2.50' - '@types/node': '*' - typescript: '>=2.7' - peerDependenciesMeta: - '@swc/core': - optional: true - '@swc/wasm': - optional: true - tsconfig-paths@3.15.0: resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tsx@4.21.0: + resolution: {integrity: sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==} + engines: {node: '>=18.0.0'} + hasBin: true + type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -3537,6 +4384,13 @@ packages: resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} engines: {node: '>= 0.4'} + typedoc@0.28.19: + resolution: {integrity: sha512-wKh+lhdmMFivMlc6vRRcMGXeGEHGU2g8a2CkPTJjJlwRf1iXbimWIPcFolCqe4E0d/FRtGszpIrsp3WLpDB8Pw==} + engines: {node: '>= 18', pnpm: '>= 10'} + hasBin: true + peerDependencies: + typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x || 6.0.x + typescript-eslint@8.58.0: resolution: {integrity: sha512-e2TQzKfaI85fO+F3QywtX+tCTsu/D3WW5LVU6nz8hTFKFZ8yBJ6mSYRpXqdR3mFjPWmO0eWsTa5f+UpAOe/FMA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -3544,16 +4398,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - typescript@3.9.10: - resolution: {integrity: sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q==} - engines: {node: '>=4.2.0'} - hasBin: true - - typescript@4.9.5: - resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==} - engines: {node: '>=4.2.0'} - hasBin: true - typescript@5.9.3: resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} engines: {node: '>=14.17'} @@ -3562,24 +4406,22 @@ packages: uc.micro@2.1.0: resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} - uglify-js@2.8.29: - resolution: {integrity: sha512-qLq/4y2pjcU3vhlhseXGGJ7VbFO4pBANu0kwl8VCa9KEI0V8VfZIx2Fy3w01iSTA/pGwKZSmu/+I4etLNDdt5w==} - engines: {node: '>=0.8.0'} - hasBin: true - - uglify-to-browserify@1.0.2: - resolution: {integrity: sha512-vb2s1lYx2xBtUgy+ta+b2J/GLVUR+wmpINwHePmPRhOsIVCG2wDzKJ0n14GslH1BifsqVzSOwQhRaCAsZ/nI4Q==} + ufo@1.6.4: + resolution: {integrity: sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==} uint8array-extras@1.5.0: resolution: {integrity: sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==} engines: {node: '>=18'} + ultrahtml@1.6.0: + resolution: {integrity: sha512-R9fBn90VTJrqqLDwyMph+HGne8eqY1iPfYhPzZrvKpIfwkWZbcYlfpsb8B9dTvBfpy1/hqAD7Wi8EKfP9e8zdw==} + unbox-primitive@1.1.0: resolution: {integrity: sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==} engines: {node: '>= 0.4'} - underscore@1.13.8: - resolution: {integrity: sha512-DXtD3ZtEQzc7M8m4cXotyHR+FAS18C64asBYY5vqZexfYryNNnDc02W4hKg3rdQuqOYas1jkseX0+nZXjTXnvQ==} + uncrypto@0.1.3: + resolution: {integrity: sha512-Ql87qFHB3s/De2ClA9e0gsnS6zXG27SkTiSJwjCc9MebbfapQfuPzumMIUMi38ezPZVNFcHI9sUIepeQfw8J8Q==} undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} @@ -3587,6 +4429,42 @@ packages: undici-types@7.16.0: resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} + unified@11.0.5: + resolution: {integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==} + + unifont@0.7.4: + resolution: {integrity: sha512-oHeis4/xl42HUIeHuNZRGEvxj5AaIKR+bHPNegRq5LV1gdc3jundpONbjglKpihmJf+dswygdMJn3eftGIMemg==} + + unist-util-find-after@5.0.0: + resolution: {integrity: sha512-amQa0Ep2m6hE2g72AugUItjbuM8X8cGQnFoHk0pGfrFeT9GZhzN5SW8nRsiGKK7Aif4CrACPENkA6P/Lw6fHGQ==} + + unist-util-is@6.0.1: + resolution: {integrity: sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==} + + unist-util-modify-children@4.0.0: + resolution: {integrity: sha512-+tdN5fGNddvsQdIzUF3Xx82CU9sMM+fA0dLgR9vOmT0oPT2jH+P1nd5lSqfCfXAw+93NhcXNY2qqvTUtE4cQkw==} + + unist-util-position-from-estree@2.0.0: + resolution: {integrity: sha512-KaFVRjoqLyF6YXCbVLNad/eS4+OfPQQn2yOd7zF/h5T/CSL2v8NpN6a5TPvtbXthAGw5nG+PuTtq+DdIZr+cRQ==} + + unist-util-position@5.0.0: + resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==} + + unist-util-remove-position@5.0.0: + resolution: {integrity: sha512-Hp5Kh3wLxv0PHj9m2yZhhLt58KzPtEYKQQ4yxfYFEO7EvHwzyDYnduhHnY1mDxoqr7VUwVuHXk9RXKIiYS1N8Q==} + + unist-util-stringify-position@4.0.0: + resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} + + unist-util-visit-children@3.0.0: + resolution: {integrity: sha512-RgmdTfSBOg04sdPcpTSD1jzoNBjt9a80/ZCzp5cI9n1qPzLZWF9YdvWGN2zmTumP1HWhXKdUWexjy/Wy/lJ7tA==} + + unist-util-visit-parents@6.0.2: + resolution: {integrity: sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==} + + unist-util-visit@5.1.0: + resolution: {integrity: sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==} + unplugin-utils@0.2.5: resolution: {integrity: sha512-gwXJnPRewT4rT7sBi/IvxKTjsms7jX7QIDLOClApuZwR49SXbrB1z2NLUZ+vDHyqCj/n58OzRRqaW+B8OZi8vg==} engines: {node: '>=18.12.0'} @@ -3594,6 +4472,68 @@ packages: unrs-resolver@1.11.1: resolution: {integrity: sha512-bSjt9pjaEBnNiGgc9rUiHGKv5l4/TGzDmYw3RhnkJGtLhbnnA/5qJj7x3dNDCRx/PJxu774LlH8lCOlB4hEfKg==} + unstorage@1.17.5: + resolution: {integrity: sha512-0i3iqvRfx29hkNntHyQvJTpf5W9dQ9ZadSoRU8+xVlhVtT7jAX57fazYO9EHvcRCfBCyi5YRya7XCDOsbTgkPg==} + peerDependencies: + '@azure/app-configuration': ^1.8.0 + '@azure/cosmos': ^4.2.0 + '@azure/data-tables': ^13.3.0 + '@azure/identity': ^4.6.0 + '@azure/keyvault-secrets': ^4.9.0 + '@azure/storage-blob': ^12.26.0 + '@capacitor/preferences': ^6 || ^7 || ^8 + '@deno/kv': '>=0.9.0' + '@netlify/blobs': ^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0 + '@planetscale/database': ^1.19.0 + '@upstash/redis': ^1.34.3 + '@vercel/blob': '>=0.27.1' + '@vercel/functions': ^2.2.12 || ^3.0.0 + '@vercel/kv': ^1 || ^2 || ^3 + aws4fetch: ^1.0.20 + db0: '>=0.2.1' + idb-keyval: ^6.2.1 + ioredis: ^5.4.2 + uploadthing: ^7.4.4 + peerDependenciesMeta: + '@azure/app-configuration': + optional: true + '@azure/cosmos': + optional: true + '@azure/data-tables': + optional: true + '@azure/identity': + optional: true + '@azure/keyvault-secrets': + optional: true + '@azure/storage-blob': + optional: true + '@capacitor/preferences': + optional: true + '@deno/kv': + optional: true + '@netlify/blobs': + optional: true + '@planetscale/database': + optional: true + '@upstash/redis': + optional: true + '@vercel/blob': + optional: true + '@vercel/functions': + optional: true + '@vercel/kv': + optional: true + aws4fetch: + optional: true + db0: + optional: true + idb-keyval: + optional: true + ioredis: + optional: true + uploadthing: + optional: true + until-async@3.0.2: resolution: {integrity: sha512-IiSk4HlzAMqTUseHHe3VhIGyuFmN90zMTpD3Z3y8jeQbzLIq500MVM7Jq2vUAnTKAFPJrqwkzr6PoTcPhGcOiw==} @@ -3606,12 +4546,57 @@ packages: uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - v8-compile-cache-lib@3.0.1: - resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - v8-to-istanbul@9.3.0: - resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==} - engines: {node: '>=10.12.0'} + vfile-location@5.0.3: + resolution: {integrity: sha512-5yXvWDEgqeiYiBe1lbxYF7UMAIm/IcopxMHrMQDq3nvKcjPKIhZklUKL+AE7J7uApI4kwe2snsK+eI6UTj9EHg==} + + vfile-message@4.0.3: + resolution: {integrity: sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==} + + vfile@6.0.3: + resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} + + vite@7.3.3: + resolution: {integrity: sha512-/4XH147Ui7OGTjg3HbdWe5arnZQSbfuRzdr9Ec7TQi5I7R+ir0Rlc9GIvD4v0XZurELqA035KVXJXpR61xhiTA==} + engines: {node: ^20.19.0 || >=22.12.0} + hasBin: true + peerDependencies: + '@types/node': ^20.19.0 || >=22.12.0 + jiti: '>=1.21.0' + less: ^4.0.0 + lightningcss: ^1.21.0 + sass: ^1.70.0 + sass-embedded: ^1.70.0 + stylus: '>=0.54.8' + sugarss: ^5.0.0 + terser: ^5.16.0 + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + '@types/node': + optional: true + jiti: + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + tsx: + optional: true + yaml: + optional: true vite@8.0.3: resolution: {integrity: sha512-B9ifbFudT1TFhfltfaIPgjo9Z3mDynBTJSUYxTjOQruf/zHH+ezCQKcoqO+h7a9Pw9Nm/OtlXAiGT1axBgwqrQ==} @@ -3656,6 +4641,14 @@ packages: yaml: optional: true + vitefu@1.1.3: + resolution: {integrity: sha512-ub4okH7Z5KLjb6hDyjqrGXqWtWvoYdU3IGm/NorpgHncKoLTCfRIbvlhBm7r0YstIaQRYlp4yEbFqDcKSzXSSg==} + peerDependencies: + vite: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 + peerDependenciesMeta: + vite: + optional: true + vitest@4.1.2: resolution: {integrity: sha512-xjR1dMTVHlFLh98JE3i/f/WePqJsah4A0FK9cc8Ehp9Udk0AZk6ccpIZhh1qJ/yxVWRZ+Q54ocnD8TXmkhspGg==} engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} @@ -3691,23 +4684,13 @@ packages: jsdom: optional: true - void-elements@2.0.1: - resolution: {integrity: sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung==} - engines: {node: '>=0.10.0'} - - vue-docgen-api@3.26.0: - resolution: {integrity: sha512-ujdg4i5ZI/wE46RZQMFzKnDGyhEuPCu+fMA86CAd9EIek/6+OqraSVBm5ZkLrbEd5f8xxdnqMU4yiSGHHeao/Q==} - - vue-template-compiler@2.7.16: - resolution: {integrity: sha512-AYbUWAJHLGGQM7+cNTELw+KsOG9nl2CnSv467WobS5Cv9uk3wFcnr1Etsz2sEIHEZvw1U+o9mRlEO6QbZvUPGQ==} - - vue2-ace-editor@0.0.15: - resolution: {integrity: sha512-e3TR9OGXc71cGpvYcW068lNpRcFt3+OONCC81oxHL/0vwl/V3OgqnNMw2/RRolgQkO/CA5AjqVHWmANWKOtNnQ==} - w3c-xmlserializer@5.0.0: resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} engines: {node: '>=18'} + web-namespaces@2.0.1: + resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} + webidl-conversions@8.0.1: resolution: {integrity: sha512-BMhLD/Sw+GbJC21C/UgyaZX41nPt8bUTg+jWyDeg7e7YN4xOM05YPSIXceACnXVtqyEw/LMClUQMtMZ+PGGpqQ==} engines: {node: '>=20'} @@ -3736,6 +4719,10 @@ packages: resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} engines: {node: '>= 0.4'} + which-pm-runs@1.1.0: + resolution: {integrity: sha512-n1brCuqClxfFfq/Rb0ICg9giSZqCS+pLtccdag6C2HyufBrh3fBOiy9nb6ggRMvWOVH5GrdJskj5iGTZNxd7SA==} + engines: {node: '>=4'} + which-typed-array@1.1.20: resolution: {integrity: sha512-LYfpUkmqwl0h9A2HL09Mms427Q1RZWuOHsukfVcKRq9q95iQxdw0ix1JQrqbcDR9PH1QDwf5Qo8OZb5lksZ8Xg==} engines: {node: '>= 0.4'} @@ -3750,21 +4737,10 @@ packages: engines: {node: '>=8'} hasBin: true - window-size@0.1.0: - resolution: {integrity: sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg==} - engines: {node: '>= 0.8.0'} - - with@5.1.1: - resolution: {integrity: sha512-uAnSsFGfSpF6DNhBXStvlZILfHJfJu4eUkfbRGk94kGO1Ta7bg6FwfvoOhhyHAJuFbCw+0xk4uJ3u57jLvlCJg==} - word-wrap@1.2.5: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} - wordwrap@0.0.2: - resolution: {integrity: sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q==} - engines: {node: '>=0.4.0'} - wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -3773,9 +4749,6 @@ packages: resolution: {integrity: sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==} engines: {node: '>=18'} - wrappy@1.0.2: - resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - ws@8.20.0: resolution: {integrity: sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==} engines: {node: '>=10.0.0'} @@ -3795,16 +4768,13 @@ packages: xmlchars@2.2.0: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} - xmlcreate@2.0.4: - resolution: {integrity: sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==} + xxhash-wasm@1.1.0: + resolution: {integrity: sha512-147y/6YNh+tlp6nd/2pWq38i9h6mz/EuQ6njIrmW8D1BS5nCqs0P6DG+m6zTGnNz5I+uhZ0SHxBs9BsPrwcKDA==} y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} - yallist@2.1.2: - resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} - yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} @@ -3813,33 +4783,26 @@ packages: engines: {node: '>= 14.6'} hasBin: true - yargs-parser@20.2.9: - resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} - engines: {node: '>=10'} - yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} - yargs@16.2.0: - resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} - engines: {node: '>=10'} + yargs-parser@22.0.0: + resolution: {integrity: sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==} + engines: {node: ^20.19.0 || ^22.12.0 || >=23} yargs@17.7.2: resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} engines: {node: '>=12'} - yargs@3.10.0: - resolution: {integrity: sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A==} - - yn@3.1.1: - resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} - engines: {node: '>=6'} - yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} + yocto-queue@1.2.2: + resolution: {integrity: sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==} + engines: {node: '>=12.20'} + zod-validation-error@4.0.2: resolution: {integrity: sha512-Q6/nZLe6jxuU80qb/4uJ4t5v2VEZ44lzQjPDhYJNztRQ4wyWc6VF3D3Kb/fAuPetZQnhS3hnajCf9CsWesghLQ==} engines: {node: '>=18.0.0'} @@ -3849,6 +4812,9 @@ packages: zod@4.3.6: resolution: {integrity: sha512-rftlrkhHZOcjDwkGlnUtZZkvaPHCsDATp4pGpuOOMDaTdDDXF91wuVDJoWoPsKX/3YPQ5fHuF3STjcYyKr+Qhg==} + zwitch@2.0.4: + resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} + snapshots: '@acemir/cssom@0.9.31': {} @@ -3871,6 +4837,110 @@ snapshots: '@asamuzakjp/nwsapi@2.3.9': {} + '@astrojs/compiler@4.0.0': {} + + '@astrojs/internal-helpers@0.9.0': + dependencies: + picomatch: 4.0.4 + + '@astrojs/markdown-remark@7.1.1': + dependencies: + '@astrojs/internal-helpers': 0.9.0 + '@astrojs/prism': 4.0.1 + github-slugger: 2.0.0 + hast-util-from-html: 2.0.3 + hast-util-to-text: 4.0.2 + js-yaml: 4.1.1 + mdast-util-definitions: 6.0.0 + rehype-raw: 7.0.0 + rehype-stringify: 10.0.1 + remark-gfm: 4.0.1 + remark-parse: 11.0.0 + remark-rehype: 11.1.2 + remark-smartypants: 3.0.2 + retext-smartypants: 6.2.0 + shiki: 4.0.2 + smol-toml: 1.6.1 + unified: 11.0.5 + unist-util-remove-position: 5.0.0 + unist-util-visit: 5.1.0 + unist-util-visit-parents: 6.0.2 + vfile: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@astrojs/mdx@5.0.4(astro@6.3.0(@types/node@22.19.17)(lightningcss@1.32.0)(rollup@4.60.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3))': + dependencies: + '@astrojs/markdown-remark': 7.1.1 + '@mdx-js/mdx': 3.1.1 + acorn: 8.16.0 + astro: 6.3.0(@types/node@22.19.17)(lightningcss@1.32.0)(rollup@4.60.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3) + es-module-lexer: 2.0.0 + estree-util-visit: 2.0.0 + hast-util-to-html: 9.0.5 + piccolore: 0.1.3 + rehype-raw: 7.0.0 + remark-gfm: 4.0.1 + remark-smartypants: 3.0.2 + source-map: 0.7.6 + unist-util-visit: 5.1.0 + vfile: 6.0.3 + transitivePeerDependencies: + - supports-color + + '@astrojs/prism@4.0.1': + dependencies: + prismjs: 1.30.0 + + '@astrojs/sitemap@3.7.2': + dependencies: + sitemap: 9.0.1 + stream-replace-string: 2.0.0 + zod: 4.3.6 + + '@astrojs/starlight@0.39.0(astro@6.3.0(@types/node@22.19.17)(lightningcss@1.32.0)(rollup@4.60.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3))(typescript@5.9.3)': + dependencies: + '@astrojs/markdown-remark': 7.1.1 + '@astrojs/mdx': 5.0.4(astro@6.3.0(@types/node@22.19.17)(lightningcss@1.32.0)(rollup@4.60.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) + '@astrojs/sitemap': 3.7.2 + '@pagefind/default-ui': 1.5.2 + '@types/hast': 3.0.4 + '@types/js-yaml': 4.0.9 + '@types/mdast': 4.0.4 + astro: 6.3.0(@types/node@22.19.17)(lightningcss@1.32.0)(rollup@4.60.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3) + astro-expressive-code: 0.42.0(astro@6.3.0(@types/node@22.19.17)(lightningcss@1.32.0)(rollup@4.60.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) + bcp-47: 2.1.0 + hast-util-from-html: 2.0.3 + hast-util-select: 6.0.4 + hast-util-to-string: 3.0.1 + hastscript: 9.0.1 + i18next: 26.0.10(typescript@5.9.3) + js-yaml: 4.1.1 + klona: 2.0.6 + magic-string: 0.30.21 + mdast-util-directive: 3.1.0 + mdast-util-to-markdown: 2.1.2 + mdast-util-to-string: 4.0.0 + pagefind: 1.5.2 + rehype: 13.0.2 + rehype-format: 5.0.1 + remark-directive: 4.0.0 + ultrahtml: 1.6.0 + unified: 11.0.5 + unist-util-visit: 5.1.0 + vfile: 6.0.3 + transitivePeerDependencies: + - supports-color + - typescript + + '@astrojs/telemetry@3.3.2': + dependencies: + ci-info: 4.4.0 + dset: 3.1.4 + is-docker: 4.0.0 + is-wsl: 3.1.1 + which-pm-runs: 1.1.0 + '@babel/code-frame@7.29.0': dependencies: '@babel/helper-validator-identifier': 7.28.5 @@ -3948,8 +5018,6 @@ snapshots: dependencies: '@babel/types': 7.29.0 - '@babel/runtime@7.29.2': {} - '@babel/template@7.28.6': dependencies: '@babel/code-frame': 7.29.0 @@ -3973,15 +5041,25 @@ snapshots: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.28.5 - '@bcoe/v8-coverage@0.2.3': {} - '@bcoe/v8-coverage@1.0.2': {} '@blazediff/core@1.9.1': {} - '@cspotcode/source-map-support@0.8.1': + '@capsizecss/unpack@4.0.0': + dependencies: + fontkitten: 1.0.3 + + '@clack/core@1.3.0': dependencies: - '@jridgewell/trace-mapping': 0.3.9 + fast-wrap-ansi: 0.2.0 + sisteransi: 1.0.5 + + '@clack/prompts@1.3.0': + dependencies: + '@clack/core': 1.3.0 + fast-string-width: 3.0.2 + fast-wrap-ansi: 0.2.0 + sisteransi: 1.0.5 '@csstools/color-helpers@6.0.2': {} @@ -4007,6 +5085,8 @@ snapshots: '@csstools/css-tokenizer@4.0.0': {} + '@ctrl/tinycolor@4.2.0': {} + '@emnapi/core@1.9.1': dependencies: '@emnapi/wasi-threads': 1.2.0 @@ -4023,91 +5103,159 @@ snapshots: tslib: 2.8.1 optional: true - '@es-joy/jsdoccomment@0.78.0': - dependencies: - '@types/estree': 1.0.8 - '@typescript-eslint/types': 8.58.0 - comment-parser: 1.4.1 - esquery: 1.7.0 - jsdoc-type-pratt-parser: 7.0.0 - - '@es-joy/resolve.exports@1.2.0': {} - '@esbuild/aix-ppc64@0.24.2': optional: true + '@esbuild/aix-ppc64@0.27.7': + optional: true + '@esbuild/android-arm64@0.24.2': optional: true + '@esbuild/android-arm64@0.27.7': + optional: true + '@esbuild/android-arm@0.24.2': optional: true + '@esbuild/android-arm@0.27.7': + optional: true + '@esbuild/android-x64@0.24.2': optional: true + '@esbuild/android-x64@0.27.7': + optional: true + '@esbuild/darwin-arm64@0.24.2': optional: true + '@esbuild/darwin-arm64@0.27.7': + optional: true + '@esbuild/darwin-x64@0.24.2': optional: true + '@esbuild/darwin-x64@0.27.7': + optional: true + '@esbuild/freebsd-arm64@0.24.2': optional: true + '@esbuild/freebsd-arm64@0.27.7': + optional: true + '@esbuild/freebsd-x64@0.24.2': optional: true + '@esbuild/freebsd-x64@0.27.7': + optional: true + '@esbuild/linux-arm64@0.24.2': optional: true + '@esbuild/linux-arm64@0.27.7': + optional: true + '@esbuild/linux-arm@0.24.2': optional: true + '@esbuild/linux-arm@0.27.7': + optional: true + '@esbuild/linux-ia32@0.24.2': optional: true + '@esbuild/linux-ia32@0.27.7': + optional: true + '@esbuild/linux-loong64@0.24.2': optional: true + '@esbuild/linux-loong64@0.27.7': + optional: true + '@esbuild/linux-mips64el@0.24.2': optional: true + '@esbuild/linux-mips64el@0.27.7': + optional: true + '@esbuild/linux-ppc64@0.24.2': optional: true + '@esbuild/linux-ppc64@0.27.7': + optional: true + '@esbuild/linux-riscv64@0.24.2': optional: true + '@esbuild/linux-riscv64@0.27.7': + optional: true + '@esbuild/linux-s390x@0.24.2': optional: true + '@esbuild/linux-s390x@0.27.7': + optional: true + '@esbuild/linux-x64@0.24.2': optional: true + '@esbuild/linux-x64@0.27.7': + optional: true + '@esbuild/netbsd-arm64@0.24.2': optional: true + '@esbuild/netbsd-arm64@0.27.7': + optional: true + '@esbuild/netbsd-x64@0.24.2': optional: true + '@esbuild/netbsd-x64@0.27.7': + optional: true + '@esbuild/openbsd-arm64@0.24.2': optional: true + '@esbuild/openbsd-arm64@0.27.7': + optional: true + '@esbuild/openbsd-x64@0.24.2': optional: true + '@esbuild/openbsd-x64@0.27.7': + optional: true + + '@esbuild/openharmony-arm64@0.27.7': + optional: true + '@esbuild/sunos-x64@0.24.2': optional: true + '@esbuild/sunos-x64@0.27.7': + optional: true + '@esbuild/win32-arm64@0.24.2': optional: true + '@esbuild/win32-arm64@0.27.7': + optional: true + '@esbuild/win32-ia32@0.24.2': optional: true + '@esbuild/win32-ia32@0.27.7': + optional: true + '@esbuild/win32-x64@0.24.2': optional: true + '@esbuild/win32-x64@0.27.7': + optional: true + '@eslint-community/eslint-utils@4.9.1(eslint@9.39.4)': dependencies: eslint: 9.39.4 @@ -4164,6 +5312,39 @@ snapshots: optionalDependencies: '@noble/hashes': 2.2.0 + '@expressive-code/core@0.42.0': + dependencies: + '@ctrl/tinycolor': 4.2.0 + hast-util-select: 6.0.4 + hast-util-to-html: 9.0.5 + hast-util-to-text: 4.0.2 + hastscript: 9.0.1 + postcss: 8.5.8 + postcss-nested: 6.2.0(postcss@8.5.8) + unist-util-visit: 5.1.0 + unist-util-visit-parents: 6.0.2 + + '@expressive-code/plugin-frames@0.42.0': + dependencies: + '@expressive-code/core': 0.42.0 + + '@expressive-code/plugin-shiki@0.42.0': + dependencies: + '@expressive-code/core': 0.42.0 + shiki: 4.0.2 + + '@expressive-code/plugin-text-markers@0.42.0': + dependencies: + '@expressive-code/core': 0.42.0 + + '@gerrit0/mini-shiki@3.23.0': + dependencies: + '@shikijs/engine-oniguruma': 3.23.0 + '@shikijs/langs': 3.23.0 + '@shikijs/themes': 3.23.0 + '@shikijs/types': 3.23.0 + '@shikijs/vscode-textmate': 10.0.2 + '@humanfs/core@0.19.1': {} '@humanfs/node@0.16.7': @@ -4175,6 +5356,103 @@ snapshots: '@humanwhocodes/retry@0.4.3': {} + '@img/colour@1.1.0': + optional: true + + '@img/sharp-darwin-arm64@0.34.5': + optionalDependencies: + '@img/sharp-libvips-darwin-arm64': 1.2.4 + optional: true + + '@img/sharp-darwin-x64@0.34.5': + optionalDependencies: + '@img/sharp-libvips-darwin-x64': 1.2.4 + optional: true + + '@img/sharp-libvips-darwin-arm64@1.2.4': + optional: true + + '@img/sharp-libvips-darwin-x64@1.2.4': + optional: true + + '@img/sharp-libvips-linux-arm64@1.2.4': + optional: true + + '@img/sharp-libvips-linux-arm@1.2.4': + optional: true + + '@img/sharp-libvips-linux-ppc64@1.2.4': + optional: true + + '@img/sharp-libvips-linux-riscv64@1.2.4': + optional: true + + '@img/sharp-libvips-linux-s390x@1.2.4': + optional: true + + '@img/sharp-libvips-linux-x64@1.2.4': + optional: true + + '@img/sharp-libvips-linuxmusl-arm64@1.2.4': + optional: true + + '@img/sharp-libvips-linuxmusl-x64@1.2.4': + optional: true + + '@img/sharp-linux-arm64@0.34.5': + optionalDependencies: + '@img/sharp-libvips-linux-arm64': 1.2.4 + optional: true + + '@img/sharp-linux-arm@0.34.5': + optionalDependencies: + '@img/sharp-libvips-linux-arm': 1.2.4 + optional: true + + '@img/sharp-linux-ppc64@0.34.5': + optionalDependencies: + '@img/sharp-libvips-linux-ppc64': 1.2.4 + optional: true + + '@img/sharp-linux-riscv64@0.34.5': + optionalDependencies: + '@img/sharp-libvips-linux-riscv64': 1.2.4 + optional: true + + '@img/sharp-linux-s390x@0.34.5': + optionalDependencies: + '@img/sharp-libvips-linux-s390x': 1.2.4 + optional: true + + '@img/sharp-linux-x64@0.34.5': + optionalDependencies: + '@img/sharp-libvips-linux-x64': 1.2.4 + optional: true + + '@img/sharp-linuxmusl-arm64@0.34.5': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-arm64': 1.2.4 + optional: true + + '@img/sharp-linuxmusl-x64@0.34.5': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-x64': 1.2.4 + optional: true + + '@img/sharp-wasm32@0.34.5': + dependencies: + '@emnapi/runtime': 1.9.1 + optional: true + + '@img/sharp-win32-arm64@0.34.5': + optional: true + + '@img/sharp-win32-ia32@0.34.5': + optional: true + + '@img/sharp-win32-x64@0.34.5': + optional: true + '@inquirer/ansi@2.0.5': {} '@inquirer/confirm@6.0.11(@types/node@22.19.17)': @@ -4228,14 +5506,44 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 - '@jridgewell/trace-mapping@0.3.9': + '@mdx-js/mdx@3.1.1': dependencies: - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.5 + '@types/estree': 1.0.8 + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + '@types/mdx': 2.0.13 + acorn: 8.16.0 + collapse-white-space: 2.1.0 + devlop: 1.1.0 + estree-util-is-identifier-name: 3.0.0 + estree-util-scope: 1.0.0 + estree-walker: 3.0.3 + hast-util-to-jsx-runtime: 2.3.6 + markdown-extensions: 2.0.0 + recma-build-jsx: 1.0.0 + recma-jsx: 1.0.1(acorn@8.16.0) + recma-stringify: 1.0.0 + rehype-recma: 1.0.0 + remark-mdx: 3.1.1 + remark-parse: 11.0.0 + remark-rehype: 11.1.2 + source-map: 0.7.6 + unified: 11.0.5 + unist-util-position-from-estree: 2.0.0 + unist-util-stringify-position: 4.0.0 + unist-util-visit: 5.1.0 + vfile: 6.0.3 + transitivePeerDependencies: + - supports-color - '@jsdoc/salty@0.2.11': + '@microsoft/tsdoc-config@0.18.1': dependencies: - lodash: 4.17.23 + '@microsoft/tsdoc': 0.16.0 + ajv: 8.18.0 + jju: 1.4.0 + resolve: 1.22.12 + + '@microsoft/tsdoc@0.16.0': {} '@mswjs/interceptors@0.41.3': dependencies: @@ -4253,11 +5561,11 @@ snapshots: '@tybys/wasm-util': 0.10.1 optional: true - '@napi-rs/wasm-runtime@1.1.2(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)': + '@napi-rs/wasm-runtime@1.1.4(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)': dependencies: '@emnapi/core': 1.9.1 '@emnapi/runtime': 1.9.1 - '@tybys/wasm-util': 0.10.1 + '@tybys/wasm-util': 0.10.2 optional: true '@next/eslint-plugin-next@16.2.1': @@ -4291,9 +5599,34 @@ snapshots: '@open-draft/until@2.1.0': {} + '@oslojs/encoding@1.1.0': {} + '@oxc-project/types@0.122.0': {} - '@package-json/types@0.0.12': {} + '@package-json/types@0.0.12': {} + + '@pagefind/darwin-arm64@1.5.2': + optional: true + + '@pagefind/darwin-x64@1.5.2': + optional: true + + '@pagefind/default-ui@1.5.2': {} + + '@pagefind/freebsd-x64@1.5.2': + optional: true + + '@pagefind/linux-arm64@1.5.2': + optional: true + + '@pagefind/linux-x64@1.5.2': + optional: true + + '@pagefind/windows-arm64@1.5.2': + optional: true + + '@pagefind/windows-x64@1.5.2': + optional: true '@pkgr/core@0.2.9': {} @@ -4337,7 +5670,7 @@ snapshots: '@rolldown/binding-wasm32-wasi@1.0.0-rc.12(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)': dependencies: - '@napi-rs/wasm-runtime': 1.1.2(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1) + '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1) transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' @@ -4481,7 +5814,63 @@ snapshots: '@rtsao/scc@1.1.0': {} - '@sindresorhus/base62@1.0.0': {} + '@shikijs/core@4.0.2': + dependencies: + '@shikijs/primitive': 4.0.2 + '@shikijs/types': 4.0.2 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + hast-util-to-html: 9.0.5 + + '@shikijs/engine-javascript@4.0.2': + dependencies: + '@shikijs/types': 4.0.2 + '@shikijs/vscode-textmate': 10.0.2 + oniguruma-to-es: 4.3.6 + + '@shikijs/engine-oniguruma@3.23.0': + dependencies: + '@shikijs/types': 3.23.0 + '@shikijs/vscode-textmate': 10.0.2 + + '@shikijs/engine-oniguruma@4.0.2': + dependencies: + '@shikijs/types': 4.0.2 + '@shikijs/vscode-textmate': 10.0.2 + + '@shikijs/langs@3.23.0': + dependencies: + '@shikijs/types': 3.23.0 + + '@shikijs/langs@4.0.2': + dependencies: + '@shikijs/types': 4.0.2 + + '@shikijs/primitive@4.0.2': + dependencies: + '@shikijs/types': 4.0.2 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + + '@shikijs/themes@3.23.0': + dependencies: + '@shikijs/types': 3.23.0 + + '@shikijs/themes@4.0.2': + dependencies: + '@shikijs/types': 4.0.2 + + '@shikijs/types@3.23.0': + dependencies: + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + + '@shikijs/types@4.0.2': + dependencies: + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + + '@shikijs/vscode-textmate@10.0.2': {} '@standard-schema/spec@1.1.0': {} @@ -4499,50 +5888,56 @@ snapshots: estraverse: 5.3.0 picomatch: 4.0.4 - '@tsconfig/node10@1.0.12': {} - - '@tsconfig/node12@1.0.11': {} - - '@tsconfig/node14@1.0.3': {} - - '@tsconfig/node16@1.0.4': {} - '@tybys/wasm-util@0.10.1': dependencies: tslib: 2.8.1 optional: true - '@types/babel-types@7.0.16': {} - - '@types/babylon@6.16.9': + '@tybys/wasm-util@0.10.2': dependencies: - '@types/babel-types': 7.0.16 + tslib: 2.8.1 + optional: true '@types/chai@5.2.3': dependencies: '@types/deep-eql': 4.0.2 assertion-error: 2.0.1 + '@types/debug@4.1.13': + dependencies: + '@types/ms': 2.1.0 + '@types/deep-eql@4.0.2': {} '@types/detect-node@2.0.2': {} + '@types/estree-jsx@1.0.5': + dependencies: + '@types/estree': 1.0.8 + '@types/estree@1.0.8': {} - '@types/istanbul-lib-coverage@2.0.6': {} + '@types/hast@3.0.4': + dependencies: + '@types/unist': 3.0.3 + + '@types/js-yaml@4.0.9': {} '@types/json-schema@7.0.15': {} '@types/json5@0.0.29': {} - '@types/linkify-it@5.0.0': {} - - '@types/markdown-it@14.1.2': + '@types/mdast@4.0.4': dependencies: - '@types/linkify-it': 5.0.0 - '@types/mdurl': 2.0.0 + '@types/unist': 3.0.3 + + '@types/mdx@2.0.13': {} - '@types/mdurl@2.0.0': {} + '@types/ms@2.1.0': {} + + '@types/nlcst@2.0.3': + dependencies: + '@types/unist': 3.0.3 '@types/node@22.19.17': dependencies: @@ -4554,6 +5949,10 @@ snapshots: '@types/resolve@1.20.2': {} + '@types/sax@1.2.7': + dependencies: + '@types/node': 22.19.17 + '@types/set-cookie-parser@2.4.10': dependencies: '@types/node': 24.12.2 @@ -4564,6 +5963,10 @@ snapshots: '@types/statuses@2.0.6': {} + '@types/unist@2.0.11': {} + + '@types/unist@3.0.3': {} + '@typescript-eslint/eslint-plugin@8.58.0(@typescript-eslint/parser@8.58.0(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4)(typescript@5.9.3)': dependencies: '@eslint-community/regexpp': 4.12.2 @@ -4592,6 +5995,15 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/project-service@8.56.1(typescript@5.9.3)': + dependencies: + '@typescript-eslint/tsconfig-utils': 8.58.0(typescript@5.9.3) + '@typescript-eslint/types': 8.58.0 + debug: 4.4.3 + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/project-service@8.58.0(typescript@5.9.3)': dependencies: '@typescript-eslint/tsconfig-utils': 8.58.0(typescript@5.9.3) @@ -4601,11 +6013,20 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/scope-manager@8.56.1': + dependencies: + '@typescript-eslint/types': 8.56.1 + '@typescript-eslint/visitor-keys': 8.56.1 + '@typescript-eslint/scope-manager@8.58.0': dependencies: '@typescript-eslint/types': 8.58.0 '@typescript-eslint/visitor-keys': 8.58.0 + '@typescript-eslint/tsconfig-utils@8.56.1(typescript@5.9.3)': + dependencies: + typescript: 5.9.3 + '@typescript-eslint/tsconfig-utils@8.58.0(typescript@5.9.3)': dependencies: typescript: 5.9.3 @@ -4622,8 +6043,25 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/types@8.56.1': {} + '@typescript-eslint/types@8.58.0': {} + '@typescript-eslint/typescript-estree@8.56.1(typescript@5.9.3)': + dependencies: + '@typescript-eslint/project-service': 8.56.1(typescript@5.9.3) + '@typescript-eslint/tsconfig-utils': 8.56.1(typescript@5.9.3) + '@typescript-eslint/types': 8.56.1 + '@typescript-eslint/visitor-keys': 8.56.1 + debug: 4.4.3 + minimatch: 10.2.5 + semver: 7.7.4 + tinyglobby: 0.2.15 + ts-api-utils: 2.5.0(typescript@5.9.3) + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/typescript-estree@8.58.0(typescript@5.9.3)': dependencies: '@typescript-eslint/project-service': 8.58.0(typescript@5.9.3) @@ -4639,6 +6077,17 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/utils@8.56.1(eslint@9.39.4)(typescript@5.9.3)': + dependencies: + '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.4) + '@typescript-eslint/scope-manager': 8.56.1 + '@typescript-eslint/types': 8.56.1 + '@typescript-eslint/typescript-estree': 8.56.1(typescript@5.9.3) + eslint: 9.39.4 + typescript: 5.9.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.58.0(eslint@9.39.4)(typescript@5.9.3)': dependencies: '@eslint-community/eslint-utils': 4.9.1(eslint@9.39.4) @@ -4650,11 +6099,18 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/visitor-keys@8.56.1': + dependencies: + '@typescript-eslint/types': 8.56.1 + eslint-visitor-keys: 5.0.1 + '@typescript-eslint/visitor-keys@8.58.0': dependencies: '@typescript-eslint/types': 8.58.0 eslint-visitor-keys: 5.0.1 + '@ungap/structured-clone@1.3.1': {} + '@unrs/resolver-binding-android-arm-eabi@1.11.1': optional: true @@ -4714,29 +6170,29 @@ snapshots: '@unrs/resolver-binding-win32-x64-msvc@1.11.1': optional: true - '@vitest/browser-playwright@4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(playwright@1.58.2)(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3))(vitest@4.1.2)': + '@vitest/browser-playwright@4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(playwright@1.60.0)(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3))(vitest@4.1.2)': dependencies: - '@vitest/browser': 4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3))(vitest@4.1.2) - '@vitest/mocker': 4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3)) - playwright: 1.58.2 + '@vitest/browser': 4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3))(vitest@4.1.2) + '@vitest/mocker': 4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) + playwright: 1.60.0 tinyrainbow: 3.1.0 - vitest: 4.1.2(@types/node@22.19.17)(@vitest/browser-playwright@4.1.2)(@vitest/ui@4.1.2)(jsdom@27.4.0(@noble/hashes@2.2.0))(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3)) + vitest: 4.1.2(@types/node@22.19.17)(@vitest/browser-playwright@4.1.2)(@vitest/ui@4.1.2)(jsdom@27.4.0(@noble/hashes@2.2.0))(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) transitivePeerDependencies: - bufferutil - msw - utf-8-validate - vite - '@vitest/browser@4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3))(vitest@4.1.2)': + '@vitest/browser@4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3))(vitest@4.1.2)': dependencies: '@blazediff/core': 1.9.1 - '@vitest/mocker': 4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3)) + '@vitest/mocker': 4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) '@vitest/utils': 4.1.2 magic-string: 0.30.21 pngjs: 7.0.0 sirv: 3.0.2 tinyrainbow: 3.1.0 - vitest: 4.1.2(@types/node@22.19.17)(@vitest/browser-playwright@4.1.2)(@vitest/ui@4.1.2)(jsdom@27.4.0(@noble/hashes@2.2.0))(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3)) + vitest: 4.1.2(@types/node@22.19.17)(@vitest/browser-playwright@4.1.2)(@vitest/ui@4.1.2)(jsdom@27.4.0(@noble/hashes@2.2.0))(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) ws: 8.20.0 transitivePeerDependencies: - bufferutil @@ -4756,11 +6212,11 @@ snapshots: magicast: 0.5.2 obug: 2.1.1 tinyrainbow: 3.1.0 - vitest: 4.1.2(@types/node@22.19.17)(@vitest/browser-playwright@4.1.2)(@vitest/ui@4.1.2)(jsdom@27.4.0(@noble/hashes@2.2.0))(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3)) + vitest: 4.1.2(@types/node@22.19.17)(@vitest/browser-playwright@4.1.2)(@vitest/ui@4.1.2)(jsdom@27.4.0(@noble/hashes@2.2.0))(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) transitivePeerDependencies: - supports-color - '@vitest/coverage-v8@4.1.2(@vitest/browser@4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3))(vitest@4.1.2))(vitest@4.1.2)': + '@vitest/coverage-v8@4.1.2(@vitest/browser@4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3))(vitest@4.1.2))(vitest@4.1.2)': dependencies: '@bcoe/v8-coverage': 1.0.2 '@vitest/utils': 4.1.2 @@ -4772,9 +6228,9 @@ snapshots: obug: 2.1.1 std-env: 4.0.0 tinyrainbow: 3.1.0 - vitest: 4.1.2(@types/node@22.19.17)(@vitest/browser-playwright@4.1.2)(@vitest/ui@4.1.2)(jsdom@27.4.0(@noble/hashes@2.2.0))(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3)) + vitest: 4.1.2(@types/node@22.19.17)(@vitest/browser-playwright@4.1.2)(@vitest/ui@4.1.2)(jsdom@27.4.0(@noble/hashes@2.2.0))(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) optionalDependencies: - '@vitest/browser': 4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3))(vitest@4.1.2) + '@vitest/browser': 4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3))(vitest@4.1.2) '@vitest/expect@4.1.2': dependencies: @@ -4785,14 +6241,14 @@ snapshots: chai: 6.2.2 tinyrainbow: 3.1.0 - '@vitest/mocker@4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3))': + '@vitest/mocker@4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3))': dependencies: '@vitest/spy': 4.1.2 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: msw: 2.13.4(@types/node@22.19.17)(typescript@5.9.3) - vite: 8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3) + vite: 8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3) '@vitest/pretty-format@4.1.2': dependencies: @@ -4821,7 +6277,7 @@ snapshots: sirv: 3.0.2 tinyglobby: 0.2.15 tinyrainbow: 3.1.0 - vitest: 4.1.2(@types/node@22.19.17)(@vitest/browser-playwright@4.1.2)(@vitest/ui@4.1.2)(jsdom@27.4.0(@noble/hashes@2.2.0))(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3)) + vitest: 4.1.2(@types/node@22.19.17)(@vitest/browser-playwright@4.1.2)(@vitest/ui@4.1.2)(jsdom@27.4.0(@noble/hashes@2.2.0))(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) '@vitest/utils@4.1.2': dependencies: @@ -4829,24 +6285,10 @@ snapshots: convert-source-map: 2.0.0 tinyrainbow: 3.1.0 - ace-builds@1.43.6: {} - - acorn-globals@3.1.0: - dependencies: - acorn: 4.0.13 - acorn-jsx@5.3.2(acorn@8.16.0): dependencies: acorn: 8.16.0 - acorn-walk@8.3.5: - dependencies: - acorn: 8.16.0 - - acorn@3.3.0: {} - - acorn@4.0.13: {} - acorn@8.16.0: {} agent-base@7.1.4: {} @@ -4858,11 +6300,12 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 - align-text@0.1.4: + ajv@8.18.0: dependencies: - kind-of: 3.2.2 - longest: 1.0.1 - repeat-string: 1.6.1 + fast-deep-equal: 3.1.3 + fast-uri: 3.1.2 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 ansi-escapes@7.3.0: dependencies: @@ -4878,9 +6321,12 @@ snapshots: ansi-styles@6.2.3: {} - are-docs-informative@0.0.2: {} + anymatch@3.1.3: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.2 - arg@4.1.3: {} + arg@5.0.2: {} argparse@2.0.1: {} @@ -4902,6 +6348,8 @@ snapshots: is-string: 1.1.1 math-intrinsics: 1.1.0 + array-iterate@2.0.1: {} + array.prototype.findlast@1.2.5: dependencies: call-bind: 1.0.8 @@ -4953,24 +6401,116 @@ snapshots: get-intrinsic: 1.3.0 is-array-buffer: 3.0.5 - asap@2.0.6: {} - assertion-error@2.0.1: {} ast-types-flow@0.0.8: {} - ast-types@0.12.4: {} - - ast-types@0.14.2: - dependencies: - tslib: 2.8.1 - ast-v8-to-istanbul@1.0.0: dependencies: '@jridgewell/trace-mapping': 0.3.31 estree-walker: 3.0.3 js-tokens: 10.0.0 + astring@1.9.0: {} + + astro-expressive-code@0.42.0(astro@6.3.0(@types/node@22.19.17)(lightningcss@1.32.0)(rollup@4.60.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)): + dependencies: + astro: 6.3.0(@types/node@22.19.17)(lightningcss@1.32.0)(rollup@4.60.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3) + rehype-expressive-code: 0.42.0 + + astro@6.3.0(@types/node@22.19.17)(lightningcss@1.32.0)(rollup@4.60.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3): + dependencies: + '@astrojs/compiler': 4.0.0 + '@astrojs/internal-helpers': 0.9.0 + '@astrojs/markdown-remark': 7.1.1 + '@astrojs/telemetry': 3.3.2 + '@capsizecss/unpack': 4.0.0 + '@clack/prompts': 1.3.0 + '@oslojs/encoding': 1.1.0 + '@rollup/pluginutils': 5.3.0(rollup@4.60.2) + aria-query: 5.3.2 + axobject-query: 4.1.0 + ci-info: 4.4.0 + clsx: 2.1.1 + common-ancestor-path: 2.0.0 + cookie: 1.1.1 + devalue: 5.8.0 + diff: 8.0.4 + dset: 3.1.4 + es-module-lexer: 2.0.0 + esbuild: 0.27.7 + flattie: 1.1.1 + fontace: 0.4.1 + get-tsconfig: 5.0.0-beta.4 + github-slugger: 2.0.0 + html-escaper: 3.0.3 + http-cache-semantics: 4.2.0 + js-yaml: 4.1.1 + jsonc-parser: 3.3.1 + magic-string: 0.30.21 + magicast: 0.5.2 + mrmime: 2.0.1 + neotraverse: 0.6.18 + obug: 2.1.1 + p-limit: 7.3.0 + p-queue: 9.2.0 + package-manager-detector: 1.6.0 + piccolore: 0.1.3 + picomatch: 4.0.4 + rehype: 13.0.2 + semver: 7.7.4 + shiki: 4.0.2 + smol-toml: 1.6.1 + svgo: 4.0.1 + tinyclip: 0.1.12 + tinyexec: 1.0.4 + tinyglobby: 0.2.15 + ultrahtml: 1.6.0 + unifont: 0.7.4 + unist-util-visit: 5.1.0 + unstorage: 1.17.5 + vfile: 6.0.3 + vite: 7.3.3(@types/node@22.19.17)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3) + vitefu: 1.1.3(vite@7.3.3(@types/node@22.19.17)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) + xxhash-wasm: 1.1.0 + yargs-parser: 22.0.0 + zod: 4.3.6 + optionalDependencies: + sharp: 0.34.5 + transitivePeerDependencies: + - '@azure/app-configuration' + - '@azure/cosmos' + - '@azure/data-tables' + - '@azure/identity' + - '@azure/keyvault-secrets' + - '@azure/storage-blob' + - '@capacitor/preferences' + - '@deno/kv' + - '@netlify/blobs' + - '@planetscale/database' + - '@types/node' + - '@upstash/redis' + - '@vercel/blob' + - '@vercel/functions' + - '@vercel/kv' + - aws4fetch + - db0 + - idb-keyval + - ioredis + - jiti + - less + - lightningcss + - rollup + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - tsx + - uploadthing + - yaml + async-function@1.0.0: {} asynckit@0.4.0: {} @@ -4991,19 +6531,7 @@ snapshots: axobject-query@4.1.0: {} - babel-runtime@6.26.0: - dependencies: - core-js: 2.6.12 - regenerator-runtime: 0.11.1 - - babel-types@6.26.0: - dependencies: - babel-runtime: 6.26.0 - esutils: 2.0.3 - lodash: 4.17.23 - to-fast-properties: 1.0.3 - - babylon@6.18.0: {} + bail@2.0.2: {} balanced-match@1.0.2: {} @@ -5015,21 +6543,13 @@ snapshots: baseline-browser-mapping@2.10.12: {} - better-docs@2.7.3(prop-types@15.8.1)(react-dom@17.0.2(react@17.0.2))(react@17.0.2): - dependencies: - brace: 0.11.1 - react: 17.0.2 - react-ace: 9.5.0(react-dom@17.0.2(react@17.0.2))(react@17.0.2) - react-docgen: 5.4.3 - react-dom: 17.0.2(react@17.0.2) - react-frame-component: 5.3.2(prop-types@15.8.1)(react-dom@17.0.2(react@17.0.2))(react@17.0.2) - typescript: 4.9.5 - underscore: 1.13.8 - vue-docgen-api: 3.26.0 - vue2-ace-editor: 0.0.15 - transitivePeerDependencies: - - prop-types - - supports-color + bcp-47-match@2.0.3: {} + + bcp-47@2.1.0: + dependencies: + is-alphabetical: 2.0.1 + is-alphanumerical: 2.0.1 + is-decimal: 2.0.1 bidi-js@1.0.3: dependencies: @@ -5037,7 +6557,7 @@ snapshots: bignumber.js@11.0.0: {} - bluebird@3.7.2: {} + boolbase@1.0.0: {} brace-expansion@1.1.13: dependencies: @@ -5048,8 +6568,6 @@ snapshots: dependencies: balanced-match: 4.0.4 - brace@0.11.1: {} - braces@3.0.3: dependencies: fill-range: 7.1.1 @@ -5073,21 +6591,6 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 - c8@7.14.0: - dependencies: - '@bcoe/v8-coverage': 0.2.3 - '@istanbuljs/schema': 0.1.3 - find-up: 5.0.0 - foreground-child: 2.0.0 - istanbul-lib-coverage: 3.2.2 - istanbul-lib-report: 3.0.1 - istanbul-reports: 3.2.0 - rimraf: 3.0.2 - test-exclude: 6.0.0 - v8-to-istanbul: 9.3.0 - yargs: 16.2.0 - yargs-parser: 20.2.9 - call-bind-apply-helpers@1.0.2: dependencies: es-errors: 1.3.0 @@ -5107,18 +6610,9 @@ snapshots: callsites@3.1.0: {} - camelcase@1.2.1: {} - caniuse-lite@1.0.30001782: {} - catharsis@0.9.0: - dependencies: - lodash: 4.17.23 - - center-align@0.1.3: - dependencies: - align-text: 0.1.4 - lazy-cache: 1.0.4 + ccount@2.0.1: {} chai@6.2.2: {} @@ -5129,13 +6623,19 @@ snapshots: chalk@5.6.2: {} - character-parser@2.2.0: - dependencies: - is-regex: 1.2.1 + character-entities-html4@2.1.0: {} + + character-entities-legacy@3.0.0: {} - clean-css@4.2.4: + character-entities@2.0.2: {} + + character-reference-invalid@2.0.1: {} + + chokidar@5.0.0: dependencies: - source-map: 0.6.1 + readdirp: 5.0.0 + + ci-info@4.4.0: {} cli-cursor@5.0.0: dependencies: @@ -5148,24 +6648,16 @@ snapshots: cli-width@4.1.0: {} - cliui@2.1.0: - dependencies: - center-align: 0.1.3 - right-align: 0.1.3 - wordwrap: 0.0.2 - - cliui@7.0.4: - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - cliui@8.0.1: dependencies: string-width: 4.2.3 strip-ansi: 6.0.1 wrap-ansi: 7.0.0 + clsx@2.1.1: {} + + collapse-white-space@2.1.0: {} + color-convert@2.0.1: dependencies: color-name: 1.1.4 @@ -5178,36 +6670,31 @@ snapshots: dependencies: delayed-stream: 1.0.0 + comma-separated-tokens@2.0.3: {} + + commander@11.1.0: {} + commander@13.1.0: {} commander@14.0.3: {} commander@2.20.3: {} - comment-parser@1.4.1: {} - comment-parser@1.4.6: {} + common-ancestor-path@2.0.0: {} + commondir@1.0.1: {} concat-map@0.0.1: {} confusing-browser-globals@1.0.11: {} - constantinople@3.1.2: - dependencies: - '@types/babel-types': 7.0.16 - '@types/babylon': 6.16.9 - babel-types: 6.26.0 - babylon: 6.18.0 - convert-source-map@2.0.0: {} - cookie@1.1.1: {} - - core-js@2.6.12: {} + cookie-es@1.2.3: {} - create-require@1.1.1: {} + cookie@1.1.1: {} cross-env@7.0.3: dependencies: @@ -5219,11 +6706,38 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 + crossws@0.3.5: + dependencies: + uncrypto: 0.1.3 + + css-select@5.2.2: + dependencies: + boolbase: 1.0.0 + css-what: 6.2.2 + domhandler: 5.0.3 + domutils: 3.2.2 + nth-check: 2.1.1 + + css-selector-parser@3.3.0: {} + + css-tree@2.2.1: + dependencies: + mdn-data: 2.0.28 + source-map-js: 1.2.1 + css-tree@3.2.1: dependencies: mdn-data: 2.27.1 source-map-js: 1.2.1 + css-what@6.2.2: {} + + cssesc@3.0.0: {} + + csso@5.0.5: + dependencies: + css-tree: 2.2.1 + cssstyle@5.3.7: dependencies: '@asamuzakjp/css-color': 4.1.2 @@ -5256,8 +6770,6 @@ snapshots: es-errors: 1.3.0 is-data-view: 1.0.2 - de-indent@1.0.2: {} - debug@3.2.7: dependencies: ms: 2.1.3 @@ -5266,10 +6778,12 @@ snapshots: dependencies: ms: 2.1.3 - decamelize@1.2.0: {} - decimal.js@10.6.0: {} + decode-named-character-reference@1.3.0: + dependencies: + character-entities: 2.0.2 + deep-is@0.1.4: {} deepmerge@4.3.1: {} @@ -5286,26 +6800,52 @@ snapshots: has-property-descriptors: 1.0.2 object-keys: 1.1.1 + defu@6.1.7: {} + delayed-stream@1.0.0: {} + dequal@2.0.3: {} + + destr@2.0.5: {} + detect-libc@2.1.2: {} - diff-match-patch@1.0.5: {} + devalue@5.8.0: {} + + devlop@1.1.0: + dependencies: + dequal: 2.0.3 + + diff@8.0.4: {} - diff@4.0.4: {} + direction@2.0.1: {} doctrine@2.1.0: dependencies: esutils: 2.0.3 - doctrine@3.0.0: + dom-serializer@2.0.0: dependencies: - esutils: 2.0.3 + domelementtype: 2.3.0 + domhandler: 5.0.3 + entities: 4.5.0 + + domelementtype@2.3.0: {} + + domhandler@5.0.3: + dependencies: + domelementtype: 2.3.0 - doctypes@1.1.0: {} + domutils@3.2.2: + dependencies: + dom-serializer: 2.0.0 + domelementtype: 2.3.0 + domhandler: 5.0.3 dotenv@16.6.1: {} + dset@3.1.4: {} + dunder-proto@1.0.1: dependencies: call-bind-apply-helpers: 1.0.2 @@ -5437,6 +6977,20 @@ snapshots: is-date-object: 1.1.0 is-symbol: 1.1.1 + esast-util-from-estree@2.0.0: + dependencies: + '@types/estree-jsx': 1.0.5 + devlop: 1.1.0 + estree-util-visit: 2.0.0 + unist-util-position-from-estree: 2.0.0 + + esast-util-from-js@2.0.1: + dependencies: + '@types/estree-jsx': 1.0.5 + acorn: 8.16.0 + esast-util-from-estree: 2.0.0 + vfile-message: 4.0.3 + esbuild@0.24.2: optionalDependencies: '@esbuild/aix-ppc64': 0.24.2 @@ -5465,12 +7019,41 @@ snapshots: '@esbuild/win32-ia32': 0.24.2 '@esbuild/win32-x64': 0.24.2 - escalade@3.2.0: {} + esbuild@0.27.7: + optionalDependencies: + '@esbuild/aix-ppc64': 0.27.7 + '@esbuild/android-arm': 0.27.7 + '@esbuild/android-arm64': 0.27.7 + '@esbuild/android-x64': 0.27.7 + '@esbuild/darwin-arm64': 0.27.7 + '@esbuild/darwin-x64': 0.27.7 + '@esbuild/freebsd-arm64': 0.27.7 + '@esbuild/freebsd-x64': 0.27.7 + '@esbuild/linux-arm': 0.27.7 + '@esbuild/linux-arm64': 0.27.7 + '@esbuild/linux-ia32': 0.27.7 + '@esbuild/linux-loong64': 0.27.7 + '@esbuild/linux-mips64el': 0.27.7 + '@esbuild/linux-ppc64': 0.27.7 + '@esbuild/linux-riscv64': 0.27.7 + '@esbuild/linux-s390x': 0.27.7 + '@esbuild/linux-x64': 0.27.7 + '@esbuild/netbsd-arm64': 0.27.7 + '@esbuild/netbsd-x64': 0.27.7 + '@esbuild/openbsd-arm64': 0.27.7 + '@esbuild/openbsd-x64': 0.27.7 + '@esbuild/openharmony-arm64': 0.27.7 + '@esbuild/sunos-x64': 0.27.7 + '@esbuild/win32-arm64': 0.27.7 + '@esbuild/win32-ia32': 0.27.7 + '@esbuild/win32-x64': 0.27.7 - escape-string-regexp@2.0.0: {} + escalade@3.2.0: {} escape-string-regexp@4.0.0: {} + escape-string-regexp@5.0.0: {} + eslint-compat-utils@0.5.1(eslint@9.39.4): dependencies: eslint: 9.39.4 @@ -5600,26 +7183,6 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-plugin-jsdoc@61.7.1(eslint@9.39.4): - dependencies: - '@es-joy/jsdoccomment': 0.78.0 - '@es-joy/resolve.exports': 1.2.0 - are-docs-informative: 0.0.2 - comment-parser: 1.4.1 - debug: 4.4.3 - escape-string-regexp: 4.0.0 - eslint: 9.39.4 - espree: 11.2.0 - esquery: 1.7.0 - html-entities: 2.6.0 - object-deep-merge: 2.0.0 - parse-imports-exports: 0.2.4 - semver: 7.7.4 - spdx-expression-parse: 4.0.0 - to-valid-identifier: 1.0.0 - transitivePeerDependencies: - - supports-color - eslint-plugin-jsx-a11y@6.10.2(eslint@9.39.4): dependencies: aria-query: 5.3.2 @@ -5696,6 +7259,16 @@ snapshots: string.prototype.matchall: 4.0.12 string.prototype.repeat: 1.0.0 + eslint-plugin-tsdoc@0.5.2(eslint@9.39.4)(typescript@5.9.3): + dependencies: + '@microsoft/tsdoc': 0.16.0 + '@microsoft/tsdoc-config': 0.18.1 + '@typescript-eslint/utils': 8.56.1(eslint@9.39.4)(typescript@5.9.3) + transitivePeerDependencies: + - eslint + - supports-color + - typescript + eslint-scope@8.4.0: dependencies: esrecurse: 4.3.0 @@ -5752,14 +7325,6 @@ snapshots: acorn-jsx: 5.3.2(acorn@8.16.0) eslint-visitor-keys: 4.2.1 - espree@11.2.0: - dependencies: - acorn: 8.16.0 - acorn-jsx: 5.3.2(acorn@8.16.0) - eslint-visitor-keys: 5.0.1 - - esprima@4.0.1: {} - esquery@1.7.0: dependencies: estraverse: 5.3.0 @@ -5770,13 +7335,34 @@ snapshots: estraverse@5.3.0: {} - estree-to-babel@3.2.1: + estree-util-attach-comments@3.0.0: dependencies: - '@babel/traverse': 7.29.0 - '@babel/types': 7.29.0 - c8: 7.14.0 - transitivePeerDependencies: - - supports-color + '@types/estree': 1.0.8 + + estree-util-build-jsx@3.0.1: + dependencies: + '@types/estree-jsx': 1.0.5 + devlop: 1.1.0 + estree-util-is-identifier-name: 3.0.0 + estree-walker: 3.0.3 + + estree-util-is-identifier-name@3.0.0: {} + + estree-util-scope@1.0.0: + dependencies: + '@types/estree': 1.0.8 + devlop: 1.1.0 + + estree-util-to-js@2.0.0: + dependencies: + '@types/estree-jsx': 1.0.5 + astring: 1.9.0 + source-map: 0.7.6 + + estree-util-visit@2.0.0: + dependencies: + '@types/estree-jsx': 1.0.5 + '@types/unist': 3.0.3 estree-walker@2.0.2: {} @@ -5808,6 +7394,15 @@ snapshots: expect-type@1.3.0: {} + expressive-code@0.42.0: + dependencies: + '@expressive-code/core': 0.42.0 + '@expressive-code/plugin-frames': 0.42.0 + '@expressive-code/plugin-shiki': 0.42.0 + '@expressive-code/plugin-text-markers': 0.42.0 + + extend@3.0.2: {} + fast-deep-equal@3.1.3: {} fast-diff@1.3.0: {} @@ -5830,6 +7425,8 @@ snapshots: dependencies: fast-string-truncated-width: 3.0.3 + fast-uri@3.1.2: {} + fast-wrap-ansi@0.2.0: dependencies: fast-string-width: 3.0.2 @@ -5868,16 +7465,21 @@ snapshots: flatted@3.4.2: {} + flattie@1.1.1: {} + follow-redirects@1.15.11: {} - for-each@0.3.5: + fontace@0.4.1: dependencies: - is-callable: 1.2.7 + fontkitten: 1.0.3 - foreground-child@2.0.0: + fontkitten@1.0.3: dependencies: - cross-spawn: 7.0.6 - signal-exit: 3.0.7 + tiny-inflate: 1.0.3 + + for-each@0.3.5: + dependencies: + is-callable: 1.2.7 form-data@4.0.5: dependencies: @@ -5887,8 +7489,6 @@ snapshots: hasown: 2.0.2 mime-types: 2.1.35 - fs.realpath@1.0.0: {} - fsevents@2.3.2: optional: true @@ -5946,6 +7546,12 @@ snapshots: dependencies: resolve-pkg-maps: 1.0.0 + get-tsconfig@5.0.0-beta.4: + dependencies: + resolve-pkg-maps: 1.0.0 + + github-slugger@2.0.0: {} + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 @@ -5954,15 +7560,6 @@ snapshots: dependencies: is-glob: 4.0.3 - glob@7.2.3: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.5 - once: 1.4.0 - path-is-absolute: 1.0.1 - globals@14.0.0: {} globals@15.15.0: {} @@ -5982,6 +7579,18 @@ snapshots: graphql@16.13.2: {} + h3@1.15.11: + dependencies: + cookie-es: 1.2.3 + crossws: 0.3.5 + defu: 6.1.7 + destr: 2.0.5 + iron-webcrypto: 1.2.1 + node-mock-http: 1.0.4 + radix3: 1.1.2 + ufo: 1.6.4 + uncrypto: 0.1.3 + has-bigints@1.1.0: {} has-flag@4.0.0: {} @@ -6000,13 +7609,198 @@ snapshots: dependencies: has-symbols: 1.1.0 - hash-sum@1.0.2: {} - hasown@2.0.2: dependencies: function-bind: 1.1.2 - he@1.2.0: {} + hast-util-embedded@3.0.0: + dependencies: + '@types/hast': 3.0.4 + hast-util-is-element: 3.0.0 + + hast-util-format@1.1.0: + dependencies: + '@types/hast': 3.0.4 + hast-util-embedded: 3.0.0 + hast-util-minify-whitespace: 1.0.1 + hast-util-phrasing: 3.0.1 + hast-util-whitespace: 3.0.0 + html-whitespace-sensitive-tag-names: 3.0.1 + unist-util-visit-parents: 6.0.2 + + hast-util-from-html@2.0.3: + dependencies: + '@types/hast': 3.0.4 + devlop: 1.1.0 + hast-util-from-parse5: 8.0.3 + parse5: 7.3.0 + vfile: 6.0.3 + vfile-message: 4.0.3 + + hast-util-from-parse5@8.0.3: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + devlop: 1.1.0 + hastscript: 9.0.1 + property-information: 7.1.0 + vfile: 6.0.3 + vfile-location: 5.0.3 + web-namespaces: 2.0.1 + + hast-util-has-property@3.0.0: + dependencies: + '@types/hast': 3.0.4 + + hast-util-is-body-ok-link@3.0.1: + dependencies: + '@types/hast': 3.0.4 + + hast-util-is-element@3.0.0: + dependencies: + '@types/hast': 3.0.4 + + hast-util-minify-whitespace@1.0.1: + dependencies: + '@types/hast': 3.0.4 + hast-util-embedded: 3.0.0 + hast-util-is-element: 3.0.0 + hast-util-whitespace: 3.0.0 + unist-util-is: 6.0.1 + + hast-util-parse-selector@4.0.0: + dependencies: + '@types/hast': 3.0.4 + + hast-util-phrasing@3.0.1: + dependencies: + '@types/hast': 3.0.4 + hast-util-embedded: 3.0.0 + hast-util-has-property: 3.0.0 + hast-util-is-body-ok-link: 3.0.1 + hast-util-is-element: 3.0.0 + + hast-util-raw@9.1.0: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + '@ungap/structured-clone': 1.3.1 + hast-util-from-parse5: 8.0.3 + hast-util-to-parse5: 8.0.1 + html-void-elements: 3.0.0 + mdast-util-to-hast: 13.2.1 + parse5: 7.3.0 + unist-util-position: 5.0.0 + unist-util-visit: 5.1.0 + vfile: 6.0.3 + web-namespaces: 2.0.1 + zwitch: 2.0.4 + + hast-util-select@6.0.4: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + bcp-47-match: 2.0.3 + comma-separated-tokens: 2.0.3 + css-selector-parser: 3.3.0 + devlop: 1.1.0 + direction: 2.0.1 + hast-util-has-property: 3.0.0 + hast-util-to-string: 3.0.1 + hast-util-whitespace: 3.0.0 + nth-check: 2.1.1 + property-information: 7.1.0 + space-separated-tokens: 2.0.2 + unist-util-visit: 5.1.0 + zwitch: 2.0.4 + + hast-util-to-estree@3.1.3: + dependencies: + '@types/estree': 1.0.8 + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + comma-separated-tokens: 2.0.3 + devlop: 1.1.0 + estree-util-attach-comments: 3.0.0 + estree-util-is-identifier-name: 3.0.0 + hast-util-whitespace: 3.0.0 + mdast-util-mdx-expression: 2.0.1 + mdast-util-mdx-jsx: 3.2.0 + mdast-util-mdxjs-esm: 2.0.1 + property-information: 7.1.0 + space-separated-tokens: 2.0.2 + style-to-js: 1.1.21 + unist-util-position: 5.0.0 + zwitch: 2.0.4 + transitivePeerDependencies: + - supports-color + + hast-util-to-html@9.0.5: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + ccount: 2.0.1 + comma-separated-tokens: 2.0.3 + hast-util-whitespace: 3.0.0 + html-void-elements: 3.0.0 + mdast-util-to-hast: 13.2.1 + property-information: 7.1.0 + space-separated-tokens: 2.0.2 + stringify-entities: 4.0.4 + zwitch: 2.0.4 + + hast-util-to-jsx-runtime@2.3.6: + dependencies: + '@types/estree': 1.0.8 + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + comma-separated-tokens: 2.0.3 + devlop: 1.1.0 + estree-util-is-identifier-name: 3.0.0 + hast-util-whitespace: 3.0.0 + mdast-util-mdx-expression: 2.0.1 + mdast-util-mdx-jsx: 3.2.0 + mdast-util-mdxjs-esm: 2.0.1 + property-information: 7.1.0 + space-separated-tokens: 2.0.2 + style-to-js: 1.1.21 + unist-util-position: 5.0.0 + vfile-message: 4.0.3 + transitivePeerDependencies: + - supports-color + + hast-util-to-parse5@8.0.1: + dependencies: + '@types/hast': 3.0.4 + comma-separated-tokens: 2.0.3 + devlop: 1.1.0 + property-information: 7.1.0 + space-separated-tokens: 2.0.2 + web-namespaces: 2.0.1 + zwitch: 2.0.4 + + hast-util-to-string@3.0.1: + dependencies: + '@types/hast': 3.0.4 + + hast-util-to-text@4.0.2: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + hast-util-is-element: 3.0.0 + unist-util-find-after: 5.0.0 + + hast-util-whitespace@3.0.0: + dependencies: + '@types/hast': 3.0.4 + + hastscript@9.0.1: + dependencies: + '@types/hast': 3.0.4 + comma-separated-tokens: 2.0.3 + hast-util-parse-selector: 4.0.0 + property-information: 7.1.0 + space-separated-tokens: 2.0.2 headers-polyfill@5.0.1: dependencies: @@ -6025,10 +7819,16 @@ snapshots: transitivePeerDependencies: - '@noble/hashes' - html-entities@2.6.0: {} - html-escaper@2.0.2: {} + html-escaper@3.0.3: {} + + html-void-elements@3.0.0: {} + + html-whitespace-sensitive-tag-names@3.0.1: {} + + http-cache-semantics@4.2.0: {} + http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.4 @@ -6047,6 +7847,10 @@ snapshots: husky@9.1.7: {} + i18next@26.0.10(typescript@5.9.3): + optionalDependencies: + typescript: 5.9.3 + ieee754@1.2.1: {} ignore@5.3.2: {} @@ -6060,12 +7864,7 @@ snapshots: imurmurhash@0.1.4: {} - inflight@1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - - inherits@2.0.4: {} + inline-style-parser@0.2.7: {} internal-slot@1.1.0: dependencies: @@ -6073,6 +7872,15 @@ snapshots: hasown: 2.0.2 side-channel: 1.1.0 + iron-webcrypto@1.2.1: {} + + is-alphabetical@2.0.1: {} + + is-alphanumerical@2.0.1: + dependencies: + is-alphabetical: 2.0.1 + is-decimal: 2.0.1 + is-array-buffer@3.0.5: dependencies: call-bind: 1.0.8 @@ -6096,8 +7904,6 @@ snapshots: call-bound: 1.0.4 has-tostringtag: 1.0.2 - is-buffer@1.1.6: {} - is-bun-module@2.0.0: dependencies: semver: 7.7.4 @@ -6119,10 +7925,11 @@ snapshots: call-bound: 1.0.4 has-tostringtag: 1.0.2 - is-expression@3.0.0: - dependencies: - acorn: 4.0.13 - object-assign: 4.1.1 + is-decimal@2.0.1: {} + + is-docker@3.0.0: {} + + is-docker@4.0.0: {} is-extglob@2.1.1: {} @@ -6150,6 +7957,12 @@ snapshots: dependencies: is-extglob: 2.1.1 + is-hexadecimal@2.0.1: {} + + is-inside-container@1.0.0: + dependencies: + is-docker: 3.0.0 + is-map@2.0.3: {} is-module@1.0.0: {} @@ -6165,9 +7978,9 @@ snapshots: is-number@7.0.0: {} - is-potential-custom-element-name@1.0.1: {} + is-plain-obj@4.1.0: {} - is-promise@2.2.2: {} + is-potential-custom-element-name@1.0.1: {} is-reference@1.2.1: dependencies: @@ -6216,6 +8029,10 @@ snapshots: call-bound: 1.0.4 get-intrinsic: 1.3.0 + is-wsl@3.1.1: + dependencies: + is-inside-container: 1.0.0 + isarray@2.0.5: {} isexe@2.0.0: {} @@ -6242,7 +8059,7 @@ snapshots: has-symbols: 1.1.0 set-function-name: 2.0.2 - js-stringify@1.0.2: {} + jju@1.4.0: {} js-tokens@10.0.0: {} @@ -6252,30 +8069,6 @@ snapshots: dependencies: argparse: 2.0.1 - js2xmlparser@4.0.2: - dependencies: - xmlcreate: 2.0.4 - - jsdoc-type-pratt-parser@7.0.0: {} - - jsdoc@4.0.5: - dependencies: - '@babel/parser': 7.29.2 - '@jsdoc/salty': 0.2.11 - '@types/markdown-it': 14.1.2 - bluebird: 3.7.2 - catharsis: 0.9.0 - escape-string-regexp: 2.0.0 - js2xmlparser: 4.0.2 - klaw: 3.0.0 - markdown-it: 14.1.1 - markdown-it-anchor: 8.6.7(@types/markdown-it@14.1.2)(markdown-it@14.1.1) - marked: 4.3.0 - mkdirp: 1.0.4 - requizzle: 0.2.4 - strip-json-comments: 3.1.1 - underscore: 1.13.8 - jsdom@27.4.0(@noble/hashes@2.2.0): dependencies: '@acemir/cssom': 0.9.31 @@ -6310,6 +8103,8 @@ snapshots: json-schema-traverse@0.4.1: {} + json-schema-traverse@1.0.0: {} + json-stable-stringify-without-jsonify@1.0.1: {} json5@1.0.2: @@ -6318,10 +8113,7 @@ snapshots: json5@2.2.3: {} - jstransformer@1.0.0: - dependencies: - is-promise: 2.2.2 - promise: 7.3.1 + jsonc-parser@3.3.1: {} jsx-ast-utils@3.3.5: dependencies: @@ -6334,13 +8126,7 @@ snapshots: dependencies: json-buffer: 3.0.1 - kind-of@3.2.2: - dependencies: - is-buffer: 1.1.6 - - klaw@3.0.0: - dependencies: - graceful-fs: 4.2.11 + klona@2.0.6: {} language-subtag-registry@0.3.23: {} @@ -6348,8 +8134,6 @@ snapshots: dependencies: language-subtag-registry: 0.3.23 - lazy-cache@1.0.4: {} - levn@0.4.1: dependencies: prelude-ls: 1.2.1 @@ -6438,10 +8222,6 @@ snapshots: dependencies: p-locate: 5.0.0 - lodash.get@4.4.2: {} - - lodash.isequal@4.5.0: {} - lodash.merge@4.6.2: {} lodash@4.17.23: {} @@ -6454,7 +8234,7 @@ snapshots: strip-ansi: 7.2.0 wrap-ansi: 9.0.2 - longest@1.0.1: {} + longest-streak@3.1.0: {} loose-envify@1.4.0: dependencies: @@ -6462,15 +8242,12 @@ snapshots: lru-cache@11.2.7: {} - lru-cache@4.1.5: - dependencies: - pseudomap: 1.0.2 - yallist: 2.1.2 - lru-cache@5.1.1: dependencies: yallist: 3.1.1 + lunr@2.3.9: {} + magic-string@0.30.21: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 @@ -6485,12 +8262,7 @@ snapshots: dependencies: semver: 7.7.4 - make-error@1.3.6: {} - - markdown-it-anchor@8.6.7(@types/markdown-it@14.1.2)(markdown-it@14.1.1): - dependencies: - '@types/markdown-it': 14.1.2 - markdown-it: 14.1.1 + markdown-extensions@2.0.0: {} markdown-it@14.1.1: dependencies: @@ -6501,10 +8273,195 @@ snapshots: punycode.js: 2.3.1 uc.micro: 2.1.0 - marked@4.3.0: {} + markdown-table@3.0.4: {} math-intrinsics@1.1.0: {} + mdast-util-definitions@6.0.0: + dependencies: + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + unist-util-visit: 5.1.0 + + mdast-util-directive@3.1.0: + dependencies: + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + ccount: 2.0.1 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + parse-entities: 4.0.2 + stringify-entities: 4.0.4 + unist-util-visit-parents: 6.0.2 + transitivePeerDependencies: + - supports-color + + mdast-util-find-and-replace@3.0.2: + dependencies: + '@types/mdast': 4.0.4 + escape-string-regexp: 5.0.0 + unist-util-is: 6.0.1 + unist-util-visit-parents: 6.0.2 + + mdast-util-from-markdown@2.0.3: + dependencies: + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + decode-named-character-reference: 1.3.0 + devlop: 1.1.0 + mdast-util-to-string: 4.0.0 + micromark: 4.0.2 + micromark-util-decode-numeric-character-reference: 2.0.2 + micromark-util-decode-string: 2.0.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + unist-util-stringify-position: 4.0.0 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm-autolink-literal@2.0.1: + dependencies: + '@types/mdast': 4.0.4 + ccount: 2.0.1 + devlop: 1.1.0 + mdast-util-find-and-replace: 3.0.2 + micromark-util-character: 2.1.1 + + mdast-util-gfm-footnote@2.1.0: + dependencies: + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + micromark-util-normalize-identifier: 2.0.1 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm-strikethrough@2.0.0: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm-table@2.0.0: + dependencies: + '@types/mdast': 4.0.4 + devlop: 1.1.0 + markdown-table: 3.0.4 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm-task-list-item@2.0.0: + dependencies: + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-gfm@3.1.0: + dependencies: + mdast-util-from-markdown: 2.0.3 + mdast-util-gfm-autolink-literal: 2.0.1 + mdast-util-gfm-footnote: 2.1.0 + mdast-util-gfm-strikethrough: 2.0.0 + mdast-util-gfm-table: 2.0.0 + mdast-util-gfm-task-list-item: 2.0.0 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-mdx-expression@2.0.1: + dependencies: + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-mdx-jsx@3.2.0: + dependencies: + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + ccount: 2.0.1 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + parse-entities: 4.0.2 + stringify-entities: 4.0.4 + unist-util-stringify-position: 4.0.0 + vfile-message: 4.0.3 + transitivePeerDependencies: + - supports-color + + mdast-util-mdx@3.0.0: + dependencies: + mdast-util-from-markdown: 2.0.3 + mdast-util-mdx-expression: 2.0.1 + mdast-util-mdx-jsx: 3.2.0 + mdast-util-mdxjs-esm: 2.0.1 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-mdxjs-esm@2.0.1: + dependencies: + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.3 + mdast-util-to-markdown: 2.1.2 + transitivePeerDependencies: + - supports-color + + mdast-util-phrasing@4.1.0: + dependencies: + '@types/mdast': 4.0.4 + unist-util-is: 6.0.1 + + mdast-util-to-hast@13.2.1: + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + '@ungap/structured-clone': 1.3.1 + devlop: 1.1.0 + micromark-util-sanitize-uri: 2.0.1 + trim-lines: 3.0.1 + unist-util-position: 5.0.0 + unist-util-visit: 5.1.0 + vfile: 6.0.3 + + mdast-util-to-markdown@2.1.2: + dependencies: + '@types/mdast': 4.0.4 + '@types/unist': 3.0.3 + longest-streak: 3.1.0 + mdast-util-phrasing: 4.1.0 + mdast-util-to-string: 4.0.0 + micromark-util-classify-character: 2.0.1 + micromark-util-decode-string: 2.0.1 + unist-util-visit: 5.1.0 + zwitch: 2.0.4 + + mdast-util-to-string@4.0.0: + dependencies: + '@types/mdast': 4.0.4 + + mdn-data@2.0.28: {} + mdn-data@2.27.1: {} mdurl@2.0.0: {} @@ -6513,6 +8470,280 @@ snapshots: merge2@1.4.1: {} + micromark-core-commonmark@2.0.3: + dependencies: + decode-named-character-reference: 1.3.0 + devlop: 1.1.0 + micromark-factory-destination: 2.0.1 + micromark-factory-label: 2.0.1 + micromark-factory-space: 2.0.1 + micromark-factory-title: 2.0.1 + micromark-factory-whitespace: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-chunked: 2.0.1 + micromark-util-classify-character: 2.0.1 + micromark-util-html-tag-name: 2.0.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-resolve-all: 2.0.1 + micromark-util-subtokenize: 2.1.0 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-directive@4.0.0: + dependencies: + devlop: 1.1.0 + micromark-factory-space: 2.0.1 + micromark-factory-whitespace: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + parse-entities: 4.0.2 + + micromark-extension-gfm-autolink-literal@2.1.0: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-sanitize-uri: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-gfm-footnote@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-core-commonmark: 2.0.3 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-sanitize-uri: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-gfm-strikethrough@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-util-chunked: 2.0.1 + micromark-util-classify-character: 2.0.1 + micromark-util-resolve-all: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-gfm-table@2.1.1: + dependencies: + devlop: 1.1.0 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-gfm-tagfilter@2.0.0: + dependencies: + micromark-util-types: 2.0.2 + + micromark-extension-gfm-task-list-item@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-gfm@3.0.0: + dependencies: + micromark-extension-gfm-autolink-literal: 2.1.0 + micromark-extension-gfm-footnote: 2.1.0 + micromark-extension-gfm-strikethrough: 2.1.0 + micromark-extension-gfm-table: 2.1.1 + micromark-extension-gfm-tagfilter: 2.0.0 + micromark-extension-gfm-task-list-item: 2.1.0 + micromark-util-combine-extensions: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-mdx-expression@3.0.1: + dependencies: + '@types/estree': 1.0.8 + devlop: 1.1.0 + micromark-factory-mdx-expression: 2.0.3 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-events-to-acorn: 2.0.3 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-extension-mdx-jsx@3.0.2: + dependencies: + '@types/estree': 1.0.8 + devlop: 1.1.0 + estree-util-is-identifier-name: 3.0.0 + micromark-factory-mdx-expression: 2.0.3 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-events-to-acorn: 2.0.3 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + vfile-message: 4.0.3 + + micromark-extension-mdx-md@2.0.0: + dependencies: + micromark-util-types: 2.0.2 + + micromark-extension-mdxjs-esm@3.0.0: + dependencies: + '@types/estree': 1.0.8 + devlop: 1.1.0 + micromark-core-commonmark: 2.0.3 + micromark-util-character: 2.1.1 + micromark-util-events-to-acorn: 2.0.3 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + unist-util-position-from-estree: 2.0.0 + vfile-message: 4.0.3 + + micromark-extension-mdxjs@3.0.0: + dependencies: + acorn: 8.16.0 + acorn-jsx: 5.3.2(acorn@8.16.0) + micromark-extension-mdx-expression: 3.0.1 + micromark-extension-mdx-jsx: 3.0.2 + micromark-extension-mdx-md: 2.0.0 + micromark-extension-mdxjs-esm: 3.0.0 + micromark-util-combine-extensions: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-factory-destination@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-factory-label@2.0.1: + dependencies: + devlop: 1.1.0 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-factory-mdx-expression@2.0.3: + dependencies: + '@types/estree': 1.0.8 + devlop: 1.1.0 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-events-to-acorn: 2.0.3 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + unist-util-position-from-estree: 2.0.0 + vfile-message: 4.0.3 + + micromark-factory-space@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-types: 2.0.2 + + micromark-factory-title@2.0.1: + dependencies: + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-factory-whitespace@2.0.1: + dependencies: + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-character@2.1.1: + dependencies: + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-chunked@2.0.1: + dependencies: + micromark-util-symbol: 2.0.1 + + micromark-util-classify-character@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-combine-extensions@2.0.1: + dependencies: + micromark-util-chunked: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-decode-numeric-character-reference@2.0.2: + dependencies: + micromark-util-symbol: 2.0.1 + + micromark-util-decode-string@2.0.1: + dependencies: + decode-named-character-reference: 1.3.0 + micromark-util-character: 2.1.1 + micromark-util-decode-numeric-character-reference: 2.0.2 + micromark-util-symbol: 2.0.1 + + micromark-util-encode@2.0.1: {} + + micromark-util-events-to-acorn@2.0.3: + dependencies: + '@types/estree': 1.0.8 + '@types/unist': 3.0.3 + devlop: 1.1.0 + estree-util-visit: 2.0.0 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + vfile-message: 4.0.3 + + micromark-util-html-tag-name@2.0.1: {} + + micromark-util-normalize-identifier@2.0.1: + dependencies: + micromark-util-symbol: 2.0.1 + + micromark-util-resolve-all@2.0.1: + dependencies: + micromark-util-types: 2.0.2 + + micromark-util-sanitize-uri@2.0.1: + dependencies: + micromark-util-character: 2.1.1 + micromark-util-encode: 2.0.1 + micromark-util-symbol: 2.0.1 + + micromark-util-subtokenize@2.1.0: + dependencies: + devlop: 1.1.0 + micromark-util-chunked: 2.0.1 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + + micromark-util-symbol@2.0.1: {} + + micromark-util-types@2.0.2: {} + + micromark@4.0.2: + dependencies: + '@types/debug': 4.1.13 + debug: 4.4.3 + decode-named-character-reference: 1.3.0 + devlop: 1.1.0 + micromark-core-commonmark: 2.0.3 + micromark-factory-space: 2.0.1 + micromark-util-character: 2.1.1 + micromark-util-chunked: 2.0.1 + micromark-util-combine-extensions: 2.0.1 + micromark-util-decode-numeric-character-reference: 2.0.2 + micromark-util-encode: 2.0.1 + micromark-util-normalize-identifier: 2.0.1 + micromark-util-resolve-all: 2.0.1 + micromark-util-sanitize-uri: 2.0.1 + micromark-util-subtokenize: 2.1.0 + micromark-util-symbol: 2.0.1 + micromark-util-types: 2.0.2 + transitivePeerDependencies: + - supports-color + micromatch@4.0.8: dependencies: braces: 3.0.3 @@ -6528,8 +8759,6 @@ snapshots: mimic-function@5.0.1: {} - min-indent@1.0.1: {} - minimatch@10.2.5: dependencies: brace-expansion: 5.0.5 @@ -6540,8 +8769,6 @@ snapshots: minimist@1.2.8: {} - mkdirp@1.0.4: {} - mrmime@2.0.1: {} ms@2.1.3: {} @@ -6575,15 +8802,17 @@ snapshots: nanoid@3.3.11: {} + nanoid@3.3.12: {} + napi-postinstall@0.3.4: {} natural-compare@1.4.0: {} - neo-async@2.6.2: {} + neotraverse@0.6.18: {} - node-dir@0.1.17: + nlcst-to-string@4.0.0: dependencies: - minimatch: 3.1.5 + '@types/nlcst': 2.0.3 node-exports-info@1.6.0: dependencies: @@ -6592,15 +8821,23 @@ snapshots: object.entries: 1.1.9 semver: 6.3.1 + node-fetch-native@1.6.7: {} + + node-mock-http@1.0.4: {} + node-releases@2.0.36: {} + normalize-path@3.0.0: {} + npm-run-path@5.3.0: dependencies: path-key: 4.0.0 - object-assign@4.1.1: {} + nth-check@2.1.1: + dependencies: + boolbase: 1.0.0 - object-deep-merge@2.0.0: {} + object-assign@4.1.1: {} object-inspect@1.13.4: {} @@ -6644,9 +8881,13 @@ snapshots: obug@2.1.1: {} - once@1.4.0: + ofetch@1.5.1: dependencies: - wrappy: 1.0.2 + destr: 2.0.5 + node-fetch-native: 1.6.7 + ufo: 1.6.4 + + ohash@2.0.11: {} onetime@6.0.0: dependencies: @@ -6656,6 +8897,14 @@ snapshots: dependencies: mimic-function: 5.0.1 + oniguruma-parser@0.12.2: {} + + oniguruma-to-es@4.3.6: + dependencies: + oniguruma-parser: 0.12.2 + regex: 6.1.0 + regex-recursion: 6.0.2 + optionator@0.9.4: dependencies: deep-is: 0.1.4 @@ -6677,21 +8926,61 @@ snapshots: dependencies: yocto-queue: 0.1.0 + p-limit@7.3.0: + dependencies: + yocto-queue: 1.2.2 + p-locate@5.0.0: dependencies: p-limit: 3.1.0 + p-queue@9.2.0: + dependencies: + eventemitter3: 5.0.4 + p-timeout: 7.0.1 + + p-timeout@7.0.1: {} + + package-manager-detector@1.6.0: {} + + pagefind@1.5.2: + optionalDependencies: + '@pagefind/darwin-arm64': 1.5.2 + '@pagefind/darwin-x64': 1.5.2 + '@pagefind/freebsd-x64': 1.5.2 + '@pagefind/linux-arm64': 1.5.2 + '@pagefind/linux-x64': 1.5.2 + '@pagefind/windows-arm64': 1.5.2 + '@pagefind/windows-x64': 1.5.2 + pako@1.0.11: {} parent-module@1.0.1: dependencies: callsites: 3.1.0 - parse-imports-exports@0.2.4: + parse-entities@4.0.2: + dependencies: + '@types/unist': 2.0.11 + character-entities-legacy: 3.0.0 + character-reference-invalid: 2.0.1 + decode-named-character-reference: 1.3.0 + is-alphanumerical: 2.0.1 + is-decimal: 2.0.1 + is-hexadecimal: 2.0.1 + + parse-latin@7.0.0: dependencies: - parse-statements: 1.0.11 + '@types/nlcst': 2.0.3 + '@types/unist': 3.0.3 + nlcst-to-string: 4.0.0 + unist-util-modify-children: 4.0.0 + unist-util-visit-children: 3.0.0 + vfile: 6.0.3 - parse-statements@1.0.11: {} + parse5@7.3.0: + dependencies: + entities: 6.0.1 parse5@8.0.0: dependencies: @@ -6699,8 +8988,6 @@ snapshots: path-exists@4.0.0: {} - path-is-absolute@1.0.1: {} - path-key@3.1.1: {} path-key@4.0.0: {} @@ -6711,6 +8998,8 @@ snapshots: pathe@2.0.3: {} + piccolore@0.1.3: {} + picocolors@1.1.1: {} picomatch@2.3.2: {} @@ -6719,17 +9008,33 @@ snapshots: pidtree@0.6.0: {} - playwright-core@1.58.2: {} + playwright-core@1.60.0: {} - playwright@1.58.2: + playwright@1.60.0: dependencies: - playwright-core: 1.58.2 + playwright-core: 1.60.0 optionalDependencies: fsevents: 2.3.2 - pngjs@7.0.0: {} + pngjs@7.0.0: {} + + possible-typed-array-names@1.1.0: {} + + postcss-nested@6.2.0(postcss@8.5.8): + dependencies: + postcss: 8.5.8 + postcss-selector-parser: 6.1.2 + + postcss-selector-parser@6.1.2: + dependencies: + cssesc: 3.0.0 + util-deprecate: 1.0.2 - possible-typed-array-names@1.1.0: {} + postcss@8.5.15: + dependencies: + nanoid: 3.3.12 + picocolors: 1.1.1 + source-map-js: 1.2.1 postcss@8.5.8: dependencies: @@ -6745,11 +9050,7 @@ snapshots: prettier@3.8.1: {} - private@0.1.8: {} - - promise@7.3.1: - dependencies: - asap: 2.0.6 + prismjs@1.30.0: {} prop-types@15.8.1: dependencies: @@ -6757,171 +9058,184 @@ snapshots: object-assign: 4.1.1 react-is: 16.13.1 + property-information@7.1.0: {} + proxy-from-env@2.1.0: {} - pseudomap@1.0.2: {} + punycode.js@2.3.1: {} - pug-attrs@2.0.4: - dependencies: - constantinople: 3.1.2 - js-stringify: 1.0.2 - pug-runtime: 2.0.5 + punycode@2.3.1: {} - pug-code-gen@2.0.3: - dependencies: - constantinople: 3.1.2 - doctypes: 1.1.0 - js-stringify: 1.0.2 - pug-attrs: 2.0.4 - pug-error: 1.3.3 - pug-runtime: 2.0.5 - void-elements: 2.0.1 - with: 5.1.1 + queue-microtask@1.2.3: {} - pug-error@1.3.3: {} + radix3@1.1.2: {} - pug-filters@3.1.1: - dependencies: - clean-css: 4.2.4 - constantinople: 3.1.2 - jstransformer: 1.0.0 - pug-error: 1.3.3 - pug-walk: 1.1.8 - resolve: 1.22.12 - uglify-js: 2.8.29 + react-is@16.13.1: {} + + readdirp@5.0.0: {} - pug-lexer@4.1.0: + recma-build-jsx@1.0.0: dependencies: - character-parser: 2.2.0 - is-expression: 3.0.0 - pug-error: 1.3.3 + '@types/estree': 1.0.8 + estree-util-build-jsx: 3.0.1 + vfile: 6.0.3 - pug-linker@3.0.6: + recma-jsx@1.0.1(acorn@8.16.0): dependencies: - pug-error: 1.3.3 - pug-walk: 1.1.8 + acorn: 8.16.0 + acorn-jsx: 5.3.2(acorn@8.16.0) + estree-util-to-js: 2.0.0 + recma-parse: 1.0.0 + recma-stringify: 1.0.0 + unified: 11.0.5 - pug-load@2.0.12: + recma-parse@1.0.0: dependencies: - object-assign: 4.1.1 - pug-walk: 1.1.8 + '@types/estree': 1.0.8 + esast-util-from-js: 2.0.1 + unified: 11.0.5 + vfile: 6.0.3 - pug-parser@5.0.1: + recma-stringify@1.0.0: dependencies: - pug-error: 1.3.3 - token-stream: 0.0.1 + '@types/estree': 1.0.8 + estree-util-to-js: 2.0.0 + unified: 11.0.5 + vfile: 6.0.3 - pug-runtime@2.0.5: {} + reflect.getprototypeof@1.0.10: + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-abstract: 1.24.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + get-intrinsic: 1.3.0 + get-proto: 1.0.1 + which-builtin-type: 1.2.1 - pug-strip-comments@1.0.4: + regex-recursion@6.0.2: dependencies: - pug-error: 1.3.3 + regex-utilities: 2.3.0 - pug-walk@1.1.8: {} + regex-utilities@2.3.0: {} - pug@2.0.4: + regex@6.1.0: dependencies: - pug-code-gen: 2.0.3 - pug-filters: 3.1.1 - pug-lexer: 4.1.0 - pug-linker: 3.0.6 - pug-load: 2.0.12 - pug-parser: 5.0.1 - pug-runtime: 2.0.5 - pug-strip-comments: 1.0.4 + regex-utilities: 2.3.0 - punycode.js@2.3.1: {} + regexp.prototype.flags@1.5.4: + dependencies: + call-bind: 1.0.8 + define-properties: 1.2.1 + es-errors: 1.3.0 + get-proto: 1.0.1 + gopd: 1.2.0 + set-function-name: 2.0.2 - punycode@2.3.1: {} + rehype-expressive-code@0.42.0: + dependencies: + expressive-code: 0.42.0 - queue-microtask@1.2.3: {} + rehype-format@5.0.1: + dependencies: + '@types/hast': 3.0.4 + hast-util-format: 1.1.0 - react-ace@9.5.0(react-dom@17.0.2(react@17.0.2))(react@17.0.2): + rehype-parse@9.0.1: dependencies: - ace-builds: 1.43.6 - diff-match-patch: 1.0.5 - lodash.get: 4.4.2 - lodash.isequal: 4.5.0 - prop-types: 15.8.1 - react: 17.0.2 - react-dom: 17.0.2(react@17.0.2) + '@types/hast': 3.0.4 + hast-util-from-html: 2.0.3 + unified: 11.0.5 - react-docgen@5.4.3: + rehype-raw@7.0.0: dependencies: - '@babel/core': 7.29.0 - '@babel/generator': 7.29.1 - '@babel/runtime': 7.29.2 - ast-types: 0.14.2 - commander: 2.20.3 - doctrine: 3.0.0 - estree-to-babel: 3.2.1 - neo-async: 2.6.2 - node-dir: 0.1.17 - strip-indent: 3.0.0 + '@types/hast': 3.0.4 + hast-util-raw: 9.1.0 + vfile: 6.0.3 + + rehype-recma@1.0.0: + dependencies: + '@types/estree': 1.0.8 + '@types/hast': 3.0.4 + hast-util-to-estree: 3.1.3 transitivePeerDependencies: - supports-color - react-dom@17.0.2(react@17.0.2): + rehype-stringify@10.0.1: dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - react: 17.0.2 - scheduler: 0.20.2 + '@types/hast': 3.0.4 + hast-util-to-html: 9.0.5 + unified: 11.0.5 - react-frame-component@5.3.2(prop-types@15.8.1)(react-dom@17.0.2(react@17.0.2))(react@17.0.2): + rehype@13.0.2: dependencies: - prop-types: 15.8.1 - react: 17.0.2 - react-dom: 17.0.2(react@17.0.2) + '@types/hast': 3.0.4 + rehype-parse: 9.0.1 + rehype-stringify: 10.0.1 + unified: 11.0.5 - react-is@16.13.1: {} + remark-directive@4.0.0: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-directive: 3.1.0 + micromark-extension-directive: 4.0.0 + unified: 11.0.5 + transitivePeerDependencies: + - supports-color - react@17.0.2: + remark-gfm@4.0.1: dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 + '@types/mdast': 4.0.4 + mdast-util-gfm: 3.1.0 + micromark-extension-gfm: 3.0.0 + remark-parse: 11.0.0 + remark-stringify: 11.0.0 + unified: 11.0.5 + transitivePeerDependencies: + - supports-color - recast@0.17.6: + remark-mdx@3.1.1: dependencies: - ast-types: 0.12.4 - esprima: 4.0.1 - private: 0.1.8 - source-map: 0.6.1 + mdast-util-mdx: 3.0.0 + micromark-extension-mdxjs: 3.0.0 + transitivePeerDependencies: + - supports-color - reflect.getprototypeof@1.0.10: + remark-parse@11.0.0: dependencies: - call-bind: 1.0.8 - define-properties: 1.2.1 - es-abstract: 1.24.1 - es-errors: 1.3.0 - es-object-atoms: 1.1.1 - get-intrinsic: 1.3.0 - get-proto: 1.0.1 - which-builtin-type: 1.2.1 + '@types/mdast': 4.0.4 + mdast-util-from-markdown: 2.0.3 + micromark-util-types: 2.0.2 + unified: 11.0.5 + transitivePeerDependencies: + - supports-color - regenerator-runtime@0.11.1: {} + remark-rehype@11.1.2: + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + mdast-util-to-hast: 13.2.1 + unified: 11.0.5 + vfile: 6.0.3 - regexp.prototype.flags@1.5.4: + remark-smartypants@3.0.2: dependencies: - call-bind: 1.0.8 - define-properties: 1.2.1 - es-errors: 1.3.0 - get-proto: 1.0.1 - gopd: 1.2.0 - set-function-name: 2.0.2 + retext: 9.0.0 + retext-smartypants: 6.2.0 + unified: 11.0.5 + unist-util-visit: 5.1.0 - repeat-string@1.6.1: {} + remark-stringify@11.0.0: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-to-markdown: 2.1.2 + unified: 11.0.5 require-directory@2.1.1: {} require-from-string@2.0.2: {} - requizzle@0.2.4: - dependencies: - lodash: 4.17.23 - - reserved-identifiers@1.2.0: {} - resolve-from@4.0.0: {} resolve-pkg-maps@1.0.0: {} @@ -6947,19 +9261,36 @@ snapshots: onetime: 7.0.0 signal-exit: 4.1.0 - rettime@0.11.7: {} - - reusify@1.1.0: {} + retext-latin@4.0.0: + dependencies: + '@types/nlcst': 2.0.3 + parse-latin: 7.0.0 + unified: 11.0.5 - rfdc@1.4.1: {} + retext-smartypants@6.2.0: + dependencies: + '@types/nlcst': 2.0.3 + nlcst-to-string: 4.0.0 + unist-util-visit: 5.1.0 - right-align@0.1.3: + retext-stringify@4.0.0: dependencies: - align-text: 0.1.4 + '@types/nlcst': 2.0.3 + nlcst-to-string: 4.0.0 + unified: 11.0.5 - rimraf@3.0.2: + retext@9.0.0: dependencies: - glob: 7.2.3 + '@types/nlcst': 2.0.3 + retext-latin: 4.0.0 + retext-stringify: 4.0.0 + unified: 11.0.5 + + rettime@0.11.7: {} + + reusify@1.1.0: {} + + rfdc@1.4.1: {} rolldown@1.0.0-rc.12(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1): dependencies: @@ -7055,15 +9386,12 @@ snapshots: es-errors: 1.3.0 is-regex: 1.2.1 + sax@1.6.0: {} + saxes@6.0.0: dependencies: xmlchars: 2.2.0 - scheduler@0.20.2: - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - semver@6.3.1: {} semver@7.7.4: {} @@ -7094,12 +9422,55 @@ snapshots: es-errors: 1.3.0 es-object-atoms: 1.1.1 + sharp@0.34.5: + dependencies: + '@img/colour': 1.1.0 + detect-libc: 2.1.2 + semver: 7.7.4 + optionalDependencies: + '@img/sharp-darwin-arm64': 0.34.5 + '@img/sharp-darwin-x64': 0.34.5 + '@img/sharp-libvips-darwin-arm64': 1.2.4 + '@img/sharp-libvips-darwin-x64': 1.2.4 + '@img/sharp-libvips-linux-arm': 1.2.4 + '@img/sharp-libvips-linux-arm64': 1.2.4 + '@img/sharp-libvips-linux-ppc64': 1.2.4 + '@img/sharp-libvips-linux-riscv64': 1.2.4 + '@img/sharp-libvips-linux-s390x': 1.2.4 + '@img/sharp-libvips-linux-x64': 1.2.4 + '@img/sharp-libvips-linuxmusl-arm64': 1.2.4 + '@img/sharp-libvips-linuxmusl-x64': 1.2.4 + '@img/sharp-linux-arm': 0.34.5 + '@img/sharp-linux-arm64': 0.34.5 + '@img/sharp-linux-ppc64': 0.34.5 + '@img/sharp-linux-riscv64': 0.34.5 + '@img/sharp-linux-s390x': 0.34.5 + '@img/sharp-linux-x64': 0.34.5 + '@img/sharp-linuxmusl-arm64': 0.34.5 + '@img/sharp-linuxmusl-x64': 0.34.5 + '@img/sharp-wasm32': 0.34.5 + '@img/sharp-win32-arm64': 0.34.5 + '@img/sharp-win32-ia32': 0.34.5 + '@img/sharp-win32-x64': 0.34.5 + optional: true + shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 shebang-regex@3.0.0: {} + shiki@4.0.2: + dependencies: + '@shikijs/core': 4.0.2 + '@shikijs/engine-javascript': 4.0.2 + '@shikijs/engine-oniguruma': 4.0.2 + '@shikijs/langs': 4.0.2 + '@shikijs/themes': 4.0.2 + '@shikijs/types': 4.0.2 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + side-channel-list@1.0.0: dependencies: es-errors: 1.3.0 @@ -7130,8 +9501,6 @@ snapshots: siginfo@2.0.0: {} - signal-exit@3.0.7: {} - signal-exit@4.1.0: {} sirv@3.0.2: @@ -7140,6 +9509,15 @@ snapshots: mrmime: 2.0.1 totalist: 3.0.1 + sisteransi@1.0.5: {} + + sitemap@9.0.1: + dependencies: + '@types/node': 24.12.2 + '@types/sax': 1.2.7 + arg: 5.0.2 + sax: 1.6.0 + slice-ansi@5.0.0: dependencies: ansi-styles: 6.2.3 @@ -7161,18 +9539,11 @@ snapshots: buffer-from: 1.1.2 source-map: 0.6.1 - source-map@0.5.7: {} - source-map@0.6.1: {} - spdx-exceptions@2.5.0: {} - - spdx-expression-parse@4.0.0: - dependencies: - spdx-exceptions: 2.5.0 - spdx-license-ids: 3.0.23 + source-map@0.7.6: {} - spdx-license-ids@3.0.23: {} + space-separated-tokens@2.0.2: {} stable-hash-x@0.2.0: {} @@ -7187,6 +9558,8 @@ snapshots: es-errors: 1.3.0 internal-slot: 1.1.0 + stream-replace-string@2.0.0: {} + strict-event-emitter@0.5.1: {} string-argv@0.3.2: {} @@ -7253,6 +9626,11 @@ snapshots: define-properties: 1.2.1 es-object-atoms: 1.1.1 + stringify-entities@4.0.4: + dependencies: + character-entities-html4: 2.1.0 + character-entities-legacy: 3.0.0 + strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 @@ -7265,11 +9643,15 @@ snapshots: strip-final-newline@3.0.0: {} - strip-indent@3.0.0: + strip-json-comments@3.1.1: {} + + style-to-js@1.1.21: dependencies: - min-indent: 1.0.1 + style-to-object: 1.0.14 - strip-json-comments@3.1.1: {} + style-to-object@1.0.14: + dependencies: + inline-style-parser: 0.2.7 supports-color@7.2.0: dependencies: @@ -7277,14 +9659,22 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} + svgo@4.0.1: + dependencies: + commander: 11.1.0 + css-select: 5.2.2 + css-tree: 3.2.1 + css-what: 6.2.2 + csso: 5.0.5 + picocolors: 1.1.1 + sax: 1.6.0 + symbol-tree@3.2.4: {} synckit@0.11.12: dependencies: '@pkgr/core': 0.2.9 - taffydb@2.7.3: {} - tagged-tag@1.0.0: {} tapable@2.3.2: {} @@ -7296,14 +9686,12 @@ snapshots: commander: 2.20.3 source-map-support: 0.5.21 - test-exclude@6.0.0: - dependencies: - '@istanbuljs/schema': 0.1.3 - glob: 7.2.3 - minimatch: 3.1.5 + tiny-inflate@1.0.3: {} tinybench@2.9.0: {} + tinyclip@0.1.12: {} + tinyexec@1.0.4: {} tinyglobby@0.2.15: @@ -7311,6 +9699,11 @@ snapshots: fdir: 6.5.0(picomatch@4.0.4) picomatch: 4.0.4 + tinyglobby@0.2.16: + dependencies: + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 + tinyrainbow@3.1.0: {} tldts-core@7.0.27: {} @@ -7319,19 +9712,10 @@ snapshots: dependencies: tldts-core: 7.0.27 - to-fast-properties@1.0.3: {} - to-regex-range@5.0.1: dependencies: is-number: 7.0.0 - to-valid-identifier@1.0.0: - dependencies: - '@sindresorhus/base62': 1.0.0 - reserved-identifiers: 1.2.0 - - token-stream@0.0.1: {} - totalist@3.0.1: {} tough-cookie@6.0.1: @@ -7342,6 +9726,10 @@ snapshots: dependencies: punycode: 2.3.1 + trim-lines@3.0.1: {} + + trough@2.2.0: {} + ts-api-utils@2.5.0(typescript@5.9.3): dependencies: typescript: 5.9.3 @@ -7351,26 +9739,6 @@ snapshots: picomatch: 4.0.4 typescript: 5.9.3 - ts-map@1.0.3: {} - - ts-node@10.9.2(@types/node@22.19.17)(typescript@5.9.3): - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.12 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - '@types/node': 22.19.17 - acorn: 8.16.0 - acorn-walk: 8.3.5 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.4 - make-error: 1.3.6 - typescript: 5.9.3 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - tsconfig-paths@3.15.0: dependencies: '@types/json5': 0.0.29 @@ -7378,7 +9746,15 @@ snapshots: minimist: 1.2.8 strip-bom: 3.0.0 - tslib@2.8.1: {} + tslib@2.8.1: + optional: true + + tsx@4.21.0: + dependencies: + esbuild: 0.27.7 + get-tsconfig: 4.14.0 + optionalDependencies: + fsevents: 2.3.3 type-check@0.4.0: dependencies: @@ -7421,6 +9797,15 @@ snapshots: possible-typed-array-names: 1.1.0 reflect.getprototypeof: 1.0.10 + typedoc@0.28.19(typescript@5.9.3): + dependencies: + '@gerrit0/mini-shiki': 3.23.0 + lunr: 2.3.9 + markdown-it: 14.1.1 + minimatch: 10.2.5 + typescript: 5.9.3 + yaml: 2.8.3 + typescript-eslint@8.58.0(eslint@9.39.4)(typescript@5.9.3): dependencies: '@typescript-eslint/eslint-plugin': 8.58.0(@typescript-eslint/parser@8.58.0(eslint@9.39.4)(typescript@5.9.3))(eslint@9.39.4)(typescript@5.9.3) @@ -7432,26 +9817,16 @@ snapshots: transitivePeerDependencies: - supports-color - typescript@3.9.10: {} - - typescript@4.9.5: {} - typescript@5.9.3: {} uc.micro@2.1.0: {} - uglify-js@2.8.29: - dependencies: - source-map: 0.5.7 - yargs: 3.10.0 - optionalDependencies: - uglify-to-browserify: 1.0.2 - - uglify-to-browserify@1.0.2: - optional: true + ufo@1.6.4: {} uint8array-extras@1.5.0: {} + ultrahtml@1.6.0: {} + unbox-primitive@1.1.0: dependencies: call-bound: 1.0.4 @@ -7459,12 +9834,74 @@ snapshots: has-symbols: 1.1.0 which-boxed-primitive: 1.1.1 - underscore@1.13.8: {} + uncrypto@0.1.3: {} undici-types@6.21.0: {} undici-types@7.16.0: {} + unified@11.0.5: + dependencies: + '@types/unist': 3.0.3 + bail: 2.0.2 + devlop: 1.1.0 + extend: 3.0.2 + is-plain-obj: 4.1.0 + trough: 2.2.0 + vfile: 6.0.3 + + unifont@0.7.4: + dependencies: + css-tree: 3.2.1 + ofetch: 1.5.1 + ohash: 2.0.11 + + unist-util-find-after@5.0.0: + dependencies: + '@types/unist': 3.0.3 + unist-util-is: 6.0.1 + + unist-util-is@6.0.1: + dependencies: + '@types/unist': 3.0.3 + + unist-util-modify-children@4.0.0: + dependencies: + '@types/unist': 3.0.3 + array-iterate: 2.0.1 + + unist-util-position-from-estree@2.0.0: + dependencies: + '@types/unist': 3.0.3 + + unist-util-position@5.0.0: + dependencies: + '@types/unist': 3.0.3 + + unist-util-remove-position@5.0.0: + dependencies: + '@types/unist': 3.0.3 + unist-util-visit: 5.1.0 + + unist-util-stringify-position@4.0.0: + dependencies: + '@types/unist': 3.0.3 + + unist-util-visit-children@3.0.0: + dependencies: + '@types/unist': 3.0.3 + + unist-util-visit-parents@6.0.2: + dependencies: + '@types/unist': 3.0.3 + unist-util-is: 6.0.1 + + unist-util-visit@5.1.0: + dependencies: + '@types/unist': 3.0.3 + unist-util-is: 6.0.1 + unist-util-visit-parents: 6.0.2 + unplugin-utils@0.2.5: dependencies: pathe: 2.0.3 @@ -7494,6 +9931,17 @@ snapshots: '@unrs/resolver-binding-win32-ia32-msvc': 1.11.1 '@unrs/resolver-binding-win32-x64-msvc': 1.11.1 + unstorage@1.17.5: + dependencies: + anymatch: 3.1.3 + chokidar: 5.0.0 + destr: 2.0.5 + h3: 1.15.11 + lru-cache: 11.2.7 + node-fetch-native: 1.6.7 + ofetch: 1.5.1 + ufo: 1.6.4 + until-async@3.0.2: {} update-browserslist-db@1.2.3(browserslist@4.28.1): @@ -7506,35 +9954,65 @@ snapshots: dependencies: punycode: 2.3.1 - v8-compile-cache-lib@3.0.1: {} + util-deprecate@1.0.2: {} - v8-to-istanbul@9.3.0: + vfile-location@5.0.3: dependencies: - '@jridgewell/trace-mapping': 0.3.31 - '@types/istanbul-lib-coverage': 2.0.6 - convert-source-map: 2.0.0 + '@types/unist': 3.0.3 + vfile: 6.0.3 - vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3): + vfile-message@4.0.3: dependencies: - lightningcss: 1.32.0 + '@types/unist': 3.0.3 + unist-util-stringify-position: 4.0.0 + + vfile@6.0.3: + dependencies: + '@types/unist': 3.0.3 + vfile-message: 4.0.3 + + vite@7.3.3(@types/node@22.19.17)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3): + dependencies: + esbuild: 0.27.7 + fdir: 6.5.0(picomatch@4.0.4) picomatch: 4.0.4 postcss: 8.5.8 - rolldown: 1.0.0-rc.12(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1) + rollup: 4.60.2 tinyglobby: 0.2.15 + optionalDependencies: + '@types/node': 22.19.17 + fsevents: 2.3.3 + lightningcss: 1.32.0 + terser: 5.46.2 + tsx: 4.21.0 + yaml: 2.8.3 + + vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3): + dependencies: + lightningcss: 1.32.0 + picomatch: 4.0.4 + postcss: 8.5.15 + rolldown: 1.0.0-rc.12(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1) + tinyglobby: 0.2.16 optionalDependencies: '@types/node': 22.19.17 esbuild: 0.24.2 fsevents: 2.3.3 terser: 5.46.2 + tsx: 4.21.0 yaml: 2.8.3 transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' - vitest@4.1.2(@types/node@22.19.17)(@vitest/browser-playwright@4.1.2)(@vitest/ui@4.1.2)(jsdom@27.4.0(@noble/hashes@2.2.0))(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3)): + vitefu@1.1.3(vite@7.3.3(@types/node@22.19.17)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)): + optionalDependencies: + vite: 7.3.3(@types/node@22.19.17)(lightningcss@1.32.0)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3) + + vitest@4.1.2(@types/node@22.19.17)(@vitest/browser-playwright@4.1.2)(@vitest/ui@4.1.2)(jsdom@27.4.0(@noble/hashes@2.2.0))(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)): dependencies: '@vitest/expect': 4.1.2 - '@vitest/mocker': 4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3)) + '@vitest/mocker': 4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3)) '@vitest/pretty-format': 4.1.2 '@vitest/runner': 4.1.2 '@vitest/snapshot': 4.1.2 @@ -7551,44 +10029,22 @@ snapshots: tinyexec: 1.0.4 tinyglobby: 0.2.15 tinyrainbow: 3.1.0 - vite: 8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3) + vite: 8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 22.19.17 - '@vitest/browser-playwright': 4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(playwright@1.58.2)(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(yaml@2.8.3))(vitest@4.1.2) + '@vitest/browser-playwright': 4.1.2(msw@2.13.4(@types/node@22.19.17)(typescript@5.9.3))(playwright@1.60.0)(vite@8.0.3(@emnapi/core@1.9.1)(@emnapi/runtime@1.9.1)(@types/node@22.19.17)(esbuild@0.24.2)(terser@5.46.2)(tsx@4.21.0)(yaml@2.8.3))(vitest@4.1.2) '@vitest/ui': 4.1.2(vitest@4.1.2) jsdom: 27.4.0(@noble/hashes@2.2.0) transitivePeerDependencies: - msw - void-elements@2.0.1: {} - - vue-docgen-api@3.26.0: - dependencies: - '@babel/parser': 7.29.2 - '@babel/types': 7.29.0 - ast-types: 0.12.4 - hash-sum: 1.0.2 - lru-cache: 4.1.5 - pug: 2.0.4 - recast: 0.17.6 - ts-map: 1.0.3 - typescript: 3.9.10 - vue-template-compiler: 2.7.16 - - vue-template-compiler@2.7.16: - dependencies: - de-indent: 1.0.2 - he: 1.2.0 - - vue2-ace-editor@0.0.15: - dependencies: - brace: 0.11.1 - w3c-xmlserializer@5.0.0: dependencies: xml-name-validator: 5.0.0 + web-namespaces@2.0.1: {} + webidl-conversions@8.0.1: {} whatwg-mimetype@4.0.0: {} @@ -7631,6 +10087,8 @@ snapshots: is-weakmap: 2.0.2 is-weakset: 2.0.4 + which-pm-runs@1.1.0: {} + which-typed-array@1.1.20: dependencies: available-typed-arrays: 1.0.7 @@ -7650,17 +10108,8 @@ snapshots: siginfo: 2.0.0 stackback: 0.0.2 - window-size@0.1.0: {} - - with@5.1.1: - dependencies: - acorn: 3.3.0 - acorn-globals: 3.1.0 - word-wrap@1.2.5: {} - wordwrap@0.0.2: {} - wrap-ansi@7.0.0: dependencies: ansi-styles: 4.3.0 @@ -7673,37 +10122,23 @@ snapshots: string-width: 7.2.0 strip-ansi: 7.2.0 - wrappy@1.0.2: {} - ws@8.20.0: {} xml-name-validator@5.0.0: {} xmlchars@2.2.0: {} - xmlcreate@2.0.4: {} + xxhash-wasm@1.1.0: {} y18n@5.0.8: {} - yallist@2.1.2: {} - yallist@3.1.1: {} yaml@2.8.3: {} - yargs-parser@20.2.9: {} - yargs-parser@21.1.1: {} - yargs@16.2.0: - dependencies: - cliui: 7.0.4 - escalade: 3.2.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 20.2.9 + yargs-parser@22.0.0: {} yargs@17.7.2: dependencies: @@ -7715,19 +10150,14 @@ snapshots: y18n: 5.0.8 yargs-parser: 21.1.1 - yargs@3.10.0: - dependencies: - camelcase: 1.2.1 - cliui: 2.1.0 - decamelize: 1.2.0 - window-size: 0.1.0 - - yn@3.1.1: {} - yocto-queue@0.1.0: {} + yocto-queue@1.2.2: {} + zod-validation-error@4.0.2(zod@4.3.6): dependencies: zod: 4.3.6 zod@4.3.6: {} + + zwitch@2.0.4: {} diff --git a/public/favicon.svg b/public/favicon.svg new file mode 100644 index 000000000..e85f97c7a --- /dev/null +++ b/public/favicon.svg @@ -0,0 +1,8 @@ + + + + + diff --git a/scripts/build-docs.ts b/scripts/build-docs.ts new file mode 100644 index 000000000..392279501 --- /dev/null +++ b/scripts/build-docs.ts @@ -0,0 +1,1361 @@ +/** + * Walks api.json from typedoc, routes each public symbol to a bucket + * by source file path, and writes one markdown file per bucket to + * `docs/reference/`. Each symbol is rendered as an H2 block with a + * summary, a TS-fenced declaration, structured params, and a source + * link pinned to `DOCS_SOURCE_REF` (default: trunk branch; release + * deploys override). See `.claude/notes/docs-plan.md` → + * "scripts/build-docs.ts — phased implementation" for the full + * multi-phase plan. + */ + +import { execSync } from "node:child_process"; +import { mkdirSync, readFileSync, writeFileSync } from "node:fs"; +import { join } from "node:path"; + +import { DOCS_SOURCE_REF } from "./docs-source-ref.js"; + +const REPO_ROOT = process.cwd(); +const TYPEDOC_JSON = join(REPO_ROOT, "tmp/typedoc-json/api.json"); +const OUTPUT_DIR = join(REPO_ROOT, "docs/reference"); +const REPO_SLUG = "stellar/js-stellar-sdk"; + +const BUCKET_TO_SLUG = { + "Core / Keys": "core-keys", + "Core / Assets": "core-assets", + "Core / Transactions": "core-transactions", + "Core / XDR": "core-xdr", + "Core / Soroban Primitives": "core-soroban-primitives", + "Network / Horizon": "network-horizon", + "Network / RPC": "network-rpc", + "Network / Friendbot": "network-friendbot", + "Network / HTTP": "network-http", + "Contracts / Client": "contracts-client", + "Contracts / Bindings": "contracts-bindings", + "SEPs / Toml": "seps-toml", + "SEPs / Federation": "seps-federation", + "SEPs / WebAuth": "seps-webauth", + Errors: "errors", + "Cross-cutting": "cross-cutting", +} as const satisfies Record; + +type BucketName = keyof typeof BUCKET_TO_SLUG; + +// Human-meaningful one-sentence summary per bucket, emitted as the +// `description:` frontmatter field on each generated reference page. +// Used for the rendered (Lighthouse SEO check, social +// link previews) and surfaced verbatim in the llms.txt bundle. +// +// Keep dash-separated phrasing (no `: `) so YAML scalar parsing stays +// trivial and unambiguous without quoting. +const BUCKET_DESCRIPTIONS: Record = { + "Core / Keys": + "Public/private keypair handling — generate, sign, verify, and encode keys as Stellar strkeys.", + "Core / Assets": + "Asset and liquidity-pool primitives — native, alphanumeric, claimable balances, and pool IDs.", + "Core / Transactions": + "Build, sign, and inspect Stellar transactions with the TransactionBuilder API.", + "Core / XDR": + "XDR encoding utilities and hashing helpers used by the SDK internally and re-exported for callers.", + "Core / Soroban Primitives": + "Soroban smart-contract primitives — Address, contract IDs, and ScVal conversion helpers.", + "Network / Horizon": + "Client for the Stellar Horizon REST API — accounts, payments, paths, offers, and streaming endpoints.", + "Network / RPC": + "Client for Soroban RPC — simulate, send, and poll Soroban smart-contract transactions.", + "Network / Friendbot": + "Testnet account funding via Friendbot — request lumens for accounts on test networks.", + "Network / HTTP": + "HTTP client primitives — timeouts, headers, and URL utilities shared by the Horizon and RPC clients.", + "Contracts / Client": + "High-level client for invoking Soroban smart contracts — assemble, simulate, sign, and submit calls.", + "Contracts / Bindings": + "Generate strongly-typed TypeScript bindings from a Soroban contract's WASM or interface metadata.", + "SEPs / Toml": + "Parse and validate stellar.toml files per SEP-1, including issuer metadata and currency descriptors.", + "SEPs / Federation": + "Federation protocol (SEP-2) client — resolve user-friendly addresses to Stellar account IDs.", + "SEPs / WebAuth": + "Wallet authentication via SEP-10 challenge transactions — build, sign, and validate WebAuth flows.", + Errors: + "Error classes thrown by the SDK and the patterns for distinguishing them at runtime.", + "Cross-cutting": + "Cross-cutting utilities — global configuration, BigNumber helpers, URL parsing, and shared internals.", +}; + +// Exact-file overrides take precedence over directory prefixes. +// Use for files whose bucket differs from the directory's default +// (e.g. src/webauth/errors.ts → Errors, not SEPs / WebAuth). +const FILE_OVERRIDES: Record = { + "src/utils.ts": "Cross-cutting", + "src/utils/url.ts": "Network / HTTP", + "src/config.ts": "Cross-cutting", + "src/webauth/errors.ts": "Errors", + "src/base/util/bignumber.ts": "Cross-cutting", + "src/base/util/util.ts": "Cross-cutting", + "src/base/util/checksum.ts": "Core / Keys", + "src/base/keypair.ts": "Core / Keys", + "src/base/signing.ts": "Core / Keys", + "src/base/strkey.ts": "Core / Keys", + "src/base/signerkey.ts": "Core / Keys", + "src/base/asset.ts": "Core / Assets", + "src/base/liquidity_pool_asset.ts": "Core / Assets", + "src/base/liquidity_pool_id.ts": "Core / Assets", + "src/base/get_liquidity_pool_id.ts": "Core / Assets", + "src/base/claimant.ts": "Core / Assets", + "src/base/hashing.ts": "Core / XDR", + "src/base/address.ts": "Core / Soroban Primitives", + "src/base/contract.ts": "Core / Soroban Primitives", + "src/base/scval.ts": "Core / Soroban Primitives", + "src/base/auth.ts": "Core / Soroban Primitives", + "src/base/invocation.ts": "Core / Soroban Primitives", + "src/base/events.ts": "Core / Soroban Primitives", + "src/base/sorobandata_builder.ts": "Core / Soroban Primitives", + "src/base/soroban.ts": "Core / Soroban Primitives", +}; + +// Ordered: more-specific prefix first. Walk takes first match, so +// `src/base/operations/` resolves before `src/base/`. +const DIRECTORY_PREFIXES: ReadonlyArray = [ + ["src/base/operations/", "Core / Transactions"], + ["src/base/numbers/", "Core / Transactions"], + ["src/base/util/", "Core / Transactions"], + ["src/base/", "Core / Transactions"], + ["src/horizon/", "Network / Horizon"], + ["src/rpc/", "Network / RPC"], + ["src/friendbot/", "Network / Friendbot"], + ["src/http-client/", "Network / HTTP"], + ["src/contract/", "Contracts / Client"], + ["src/bindings/", "Contracts / Bindings"], + ["src/cli/", "Contracts / Bindings"], + ["src/stellartoml/", "SEPs / Toml"], + ["src/federation/", "SEPs / Federation"], + ["src/webauth/", "SEPs / WebAuth"], + ["src/errors/", "Errors"], +]; + +type RouteResult = BucketName | "external" | "unmapped"; + +function bucketForPath(path: string): RouteResult { + if (!path.startsWith("src/")) return "external"; + if (path.startsWith("src/base/generated/")) return "external"; + const override = FILE_OVERRIDES[path]; + if (override !== undefined) return override; + for (const [prefix, bucket] of DIRECTORY_PREFIXES) { + if (path.startsWith(prefix)) return bucket; + } + return "unmapped"; +} + +// TypeDoc 0.28 ReflectionKind numeric codes (the JSON model uses these). +const KIND_PROJECT = 1; +const KIND_MODULE = 2; +const KIND_NAMESPACE = 4; +const KIND_ENUM = 8; +const KIND_VARIABLE = 32; +const KIND_FUNCTION = 64; +const KIND_CLASS = 128; +const KIND_INTERFACE = 256; +const KIND_CONSTRUCTOR = 512; +const KIND_PROPERTY = 1024; +const KIND_METHOD = 2048; +const KIND_ACCESSOR = 262144; +const KIND_TYPE_ALIAS = 2097152; + +const KIND_CALL_SIGNATURE = 4096; +const KIND_CONSTRUCTOR_SIGNATURE = 16384; + +// Member kinds that we render as H3 sub-blocks under their parent +// class or interface. +const MEMBER_KINDS = new Set([ + KIND_CONSTRUCTOR, + KIND_PROPERTY, + KIND_METHOD, + KIND_ACCESSOR, +]); + +const TARGET_KINDS = new Set([ + KIND_ENUM, + KIND_VARIABLE, + KIND_FUNCTION, + KIND_CLASS, + KIND_INTERFACE, + KIND_TYPE_ALIAS, +]); + +const CONTAINER_KINDS = new Set([ + KIND_PROJECT, + KIND_MODULE, + KIND_NAMESPACE, +]); + +// === TypeDoc JSON-model shapes (subset used by the renderer) === + +type LiteralValue = + | string + | number + | boolean + | null + | { value: string; negative: boolean }; + +interface SummaryDisplayPart { + kind: "text" | "code" | "inline-tag"; + text: string; + tag?: string; +} + +interface Comment { + summary?: SummaryDisplayPart[]; + blockTags?: { tag: string; content?: SummaryDisplayPart[] }[]; +} + +type TDType = + | { type: "intrinsic"; name: string } + | { type: "literal"; value: LiteralValue } + | { + type: "reference"; + name: string; + qualifiedName?: string; + typeArguments?: TDType[]; + } + | { type: "array"; elementType: TDType } + | { type: "union"; types: TDType[] } + | { type: "intersection"; types: TDType[] } + | { type: "tuple"; elements?: TDType[] } + | { + type: "namedTupleMember"; + name: string; + isOptional?: boolean; + element: TDType; + } + | { + type: "conditional"; + checkType: TDType; + extendsType: TDType; + trueType: TDType; + falseType: TDType; + } + | { type: "indexedAccess"; indexType: TDType; objectType: TDType } + | { type: "inferred"; name: string; constraint?: TDType } + | { + type: "mapped"; + parameter: string; + parameterType: TDType; + templateType: TDType; + optionalModifier?: "+" | "-"; + readonlyModifier?: "+" | "-"; + nameType?: TDType; + } + | { type: "optional"; elementType: TDType } + | { type: "predicate"; name: string; asserts: boolean; targetType?: TDType } + | { type: "query"; queryType: TDType } + | { type: "reflection"; declaration: Reflection } + | { type: "rest"; elementType: TDType } + | { type: "templateLiteral"; head: string; tail: [TDType, string][] } + | { + type: "typeOperator"; + operator: "keyof" | "unique" | "readonly"; + target: TDType; + } + | { type: "unknown"; name: string }; + +interface ReflectionFlags { + isStatic?: boolean; + isOptional?: boolean; + isRest?: boolean; + isReadonly?: boolean; + isConst?: boolean; + isPrivate?: boolean; + isProtected?: boolean; +} + +interface SourceLocation { + fileName: string; + line: number; +} + +interface Reflection { + id: number; + name: string; + kind: number; + flags?: ReflectionFlags; + sources?: SourceLocation[]; + children?: Reflection[]; + comment?: Comment; + signatures?: Reflection[]; + parameters?: Reflection[]; + type?: TDType; + extendedTypes?: TDType[]; + implementedTypes?: TDType[]; + typeParameters?: Reflection[]; + defaultValue?: string; + varianceModifier?: "in" | "out" | "in out"; + default?: TDType; + indexSignature?: Reflection; + indexSignatures?: Reflection[]; + // Accessor reflections (kind 262144) carry getter/setter as + // dedicated signature fields instead of `signatures[]`. + getSignature?: Reflection; + setSignature?: Reflection; +} + +interface SymbolRecord { + qname: string; + kind: number; + bucket: BucketName; + sourceFilePath: string; + sourceLine: number; + refl: Reflection; + // Public members of a class or interface, attached at walk time so + // `renderSymbolBlock` can emit a class body declaration plus H3 + // sub-blocks per member. Empty/absent for non-class/interface kinds. + members?: Reflection[]; +} + +interface UnmappedSymbol { + qname: string; + kind: number; + sourceFilePath: string; + sourceLine: number; +} + +function collectPublicMembers(refl: Reflection): Reflection[] { + return (refl.children ?? []).filter( + (child) => + MEMBER_KINDS.has(child.kind) && + child.flags?.isPrivate !== true && + child.flags?.isProtected !== true, + ); +} + +function walkReflection( + refl: Reflection, + path: string[], + collected: SymbolRecord[], + unmapped: UnmappedSymbol[], +): void { + if (TARGET_KINDS.has(refl.kind)) { + const qname = + path.length > 0 ? `${path.join(".")}.${refl.name}` : refl.name; + const source = refl.sources?.[0]; + const sourceFilePath = source?.fileName ?? ""; + const sourceLine = source?.line ?? 0; + const route = bucketForPath(sourceFilePath); + if (route === "external") { + // Silently skip type augmentations from third-party packages + // and generated XDR (already excluded via typedoc.json). + } else if (route === "unmapped") { + unmapped.push({ qname, kind: refl.kind, sourceFilePath, sourceLine }); + } else { + const record: SymbolRecord = { + qname, + kind: refl.kind, + bucket: route, + sourceFilePath, + sourceLine, + refl, + }; + if (refl.kind === KIND_CLASS || refl.kind === KIND_INTERFACE) { + record.members = collectPublicMembers(refl); + } + collected.push(record); + } + } + + if (CONTAINER_KINDS.has(refl.kind)) { + const childPath = refl.kind === KIND_PROJECT ? path : [...path, refl.name]; + for (const child of refl.children ?? []) { + walkReflection(child, childPath, collected, unmapped); + } + } +} + +// === Type AST rendering === + +// Wrap a subterm in parens when it would otherwise reparse incorrectly +// in an array/typeOperator/indexedAccess host context. +function needsParens(t: TDType): boolean { + if ( + t.type === "union" || + t.type === "intersection" || + t.type === "conditional" + ) { + return true; + } + if (t.type === "reflection") { + const sig = t.declaration.signatures?.[0]; + if ( + sig !== undefined && + (sig.kind === KIND_CALL_SIGNATURE || + sig.kind === KIND_CONSTRUCTOR_SIGNATURE) + ) { + return true; + } + } + return false; +} + +function renderTypeAtom(t: TDType): string { + return needsParens(t) ? `(${renderType(t)})` : renderType(t); +} + +function renderType(t: TDType): string { + switch (t.type) { + case "intrinsic": + return t.name; + case "literal": + return renderLiteralValue(t.value); + case "reference": { + const args = t.typeArguments; + if (args !== undefined && args.length > 0) { + return `${t.name}<${args.map(renderType).join(", ")}>`; + } + return t.name; + } + case "array": + return `${renderTypeAtom(t.elementType)}[]`; + case "union": + return t.types.map(renderTypeAtom).join(" | "); + case "intersection": + return t.types.map(renderTypeAtom).join(" & "); + case "tuple": + return `[${(t.elements ?? []).map(renderType).join(", ")}]`; + case "namedTupleMember": + return `${t.name}${t.isOptional === true ? "?" : ""}: ${renderType(t.element)}`; + case "conditional": + return `${renderTypeAtom(t.checkType)} extends ${renderTypeAtom(t.extendsType)} ? ${renderType(t.trueType)} : ${renderType(t.falseType)}`; + case "indexedAccess": + return `${renderTypeAtom(t.objectType)}[${renderType(t.indexType)}]`; + case "inferred": + return t.constraint !== undefined + ? `infer ${t.name} extends ${renderType(t.constraint)}` + : `infer ${t.name}`; + case "mapped": + return renderMappedType(t); + case "optional": + return `${renderType(t.elementType)}?`; + case "predicate": + return renderPredicateType(t); + case "query": + return `typeof ${renderType(t.queryType)}`; + case "reflection": + return renderReflectionType(t.declaration); + case "rest": + return `...${renderTypeAtom(t.elementType)}`; + case "templateLiteral": + return renderTemplateLiteralType(t); + case "typeOperator": + return `${t.operator} ${renderTypeAtom(t.target)}`; + case "unknown": + return t.name; + default: { + const exhaustive: never = t; + void exhaustive; + throw new Error( + `Unhandled TypeDoc type kind: ${JSON.stringify(t).slice(0, 200)}`, + ); + } + } +} + +function renderLiteralValue(value: LiteralValue): string { + if (value === null) return "null"; + if (typeof value === "string") return JSON.stringify(value); + if (typeof value === "number") return String(value); + if (typeof value === "boolean") return String(value); + if (typeof value === "object" && "value" in value) { + return `${value.negative ? "-" : ""}${value.value}n`; + } + throw new Error(`Unhandled literal value: ${JSON.stringify(value)}`); +} + +function renderMappedType(t: { + parameter: string; + parameterType: TDType; + templateType: TDType; + optionalModifier?: "+" | "-"; + readonlyModifier?: "+" | "-"; + nameType?: TDType; +}): string { + const readonlyMod = + t.readonlyModifier === "+" + ? "readonly " + : t.readonlyModifier === "-" + ? "-readonly " + : ""; + const optMod = + t.optionalModifier === "+" ? "?" : t.optionalModifier === "-" ? "-?" : ""; + const nameClause = + t.nameType !== undefined ? ` as ${renderType(t.nameType)}` : ""; + return `{ ${readonlyMod}[${t.parameter} in ${renderType(t.parameterType)}${nameClause}]${optMod}: ${renderType(t.templateType)} }`; +} + +function renderPredicateType(t: { + name: string; + asserts: boolean; + targetType?: TDType; +}): string { + if (t.asserts) { + return t.targetType !== undefined + ? `asserts ${t.name} is ${renderType(t.targetType)}` + : `asserts ${t.name}`; + } + if (t.targetType !== undefined) { + return `${t.name} is ${renderType(t.targetType)}`; + } + throw new Error( + `Predicate type with no targetType and not asserts: ${t.name}`, + ); +} + +function renderTemplateLiteralType(t: { + head: string; + tail: [TDType, string][]; +}): string { + let out = t.head; + for (const [tt, suffix] of t.tail) { + out += "${" + renderType(tt) + "}" + suffix; + } + return "`" + out + "`"; +} + +function renderReflectionType(decl: Reflection): string { + const sig = decl.signatures?.[0]; + if ( + sig !== undefined && + (sig.kind === KIND_CALL_SIGNATURE || + sig.kind === KIND_CONSTRUCTOR_SIGNATURE) + ) { + const newPrefix = sig.kind === KIND_CONSTRUCTOR_SIGNATURE ? "new " : ""; + const tparams = renderTypeParameters(sig.typeParameters); + const params = renderParameters(sig.parameters ?? []); + const ret = sig.type !== undefined ? renderType(sig.type) : "unknown"; + return `${newPrefix}${tparams}(${params}) => ${ret}`; + } + // Object literal type: properties, methods, and (optionally) index sigs. + const members: string[] = []; + for (const child of decl.children ?? []) { + if (child.signatures !== undefined && child.signatures.length > 0) { + const childSig = child.signatures[0]; + const tparams = renderTypeParameters(childSig.typeParameters); + const params = renderParameters(childSig.parameters ?? []); + const ret = + childSig.type !== undefined ? renderType(childSig.type) : "unknown"; + members.push(`${child.name}${tparams}(${params}): ${ret}`); + } else if (child.type !== undefined) { + const optional = child.flags?.isOptional === true ? "?" : ""; + const readonly = child.flags?.isReadonly === true ? "readonly " : ""; + members.push( + `${readonly}${child.name}${optional}: ${renderType(child.type)}`, + ); + } + } + const indexSigs = + decl.indexSignatures ?? + (decl.indexSignature !== undefined ? [decl.indexSignature] : []); + for (const idx of indexSigs) { + const params = renderParameters(idx.parameters ?? []); + const ret = idx.type !== undefined ? renderType(idx.type) : "unknown"; + members.push(`[${params}]: ${ret}`); + } + if (members.length === 0) return "{}"; + return `{ ${members.join("; ")} }`; +} + +function renderTypeParameters(tps: Reflection[] | undefined): string { + if (tps === undefined || tps.length === 0) return ""; + const parts = tps.map((tp) => { + const variance = + tp.varianceModifier !== undefined ? `${tp.varianceModifier} ` : ""; + const constraint = + tp.type !== undefined ? ` extends ${renderType(tp.type)}` : ""; + const def = tp.default !== undefined ? ` = ${renderType(tp.default)}` : ""; + return `${variance}${tp.name}${constraint}${def}`; + }); + return `<${parts.join(", ")}>`; +} + +function renderParameters(params: Reflection[]): string { + return params + .map((p) => { + const rest = p.flags?.isRest === true ? "..." : ""; + const optional = p.flags?.isOptional === true ? "?" : ""; + const typeStr = p.type !== undefined ? renderType(p.type) : "unknown"; + const defaultStr = + p.defaultValue !== undefined ? ` = ${p.defaultValue}` : ""; + return `${rest}${p.name}${optional}: ${typeStr}${defaultStr}`; + }) + .join(", "); +} + +// === Per-symbol signature rendering === + +// Per-line declaration of a class/interface member, used inside the +// synthesized class/interface body. No trailing semicolon — caller adds. +function renderMemberDeclarationLine(m: Reflection): string { + const isStatic = m.flags?.isStatic === true; + const staticPrefix = isStatic ? "static " : ""; + + if (m.kind === KIND_CONSTRUCTOR) { + const sig = m.signatures?.[0]; + if (sig === undefined) { + throw new Error(`Constructor reflection has no signatures`); + } + const params = renderParameters(sig.parameters ?? []); + return `constructor(${params})`; + } + + if (m.kind === KIND_PROPERTY) { + const readonly = m.flags?.isReadonly === true ? "readonly " : ""; + const optional = m.flags?.isOptional === true ? "?" : ""; + const t = m.type !== undefined ? renderType(m.type) : "unknown"; + return `${staticPrefix}${readonly}${m.name}${optional}: ${t}`; + } + + if (m.kind === KIND_METHOD) { + const sig = m.signatures?.[0]; + if (sig === undefined) { + throw new Error(`Method reflection ${m.name} has no signatures`); + } + const tparams = renderTypeParameters(sig.typeParameters); + const params = renderParameters(sig.parameters ?? []); + const ret = sig.type !== undefined ? renderType(sig.type) : "unknown"; + return `${staticPrefix}${m.name}${tparams}(${params}): ${ret}`; + } + + if (m.kind === KIND_ACCESSOR) { + // TypeDoc represents accessors as kind 262144 with getSignature + // and/or setSignature sub-reflections. For the body declaration + // we surface the accessor as a property; readonly when only a + // getter exists. + const getter = m.getSignature; + const setter = m.setSignature; + if (getter !== undefined) { + const t = getter.type !== undefined ? renderType(getter.type) : "unknown"; + const readonly = setter === undefined ? "readonly " : ""; + return `${staticPrefix}${readonly}${m.name}: ${t}`; + } + if (setter !== undefined) { + const param = setter.parameters?.[0]; + const t = param?.type !== undefined ? renderType(param.type) : "unknown"; + return `${staticPrefix}${m.name}: ${t}`; + } + throw new Error( + `Accessor ${m.name} has neither getSignature nor setSignature`, + ); + } + + throw new Error( + `Unhandled member kind ${m.kind} for ${m.name} (expected constructor, property, method, or accessor)`, + ); +} + +// Sort key for class/interface members. Primary order: +// constructor → static → instance properties → instance accessors → +// instance methods. Within each group, TypeDoc's emitted order is +// preserved (Array.prototype.sort is stable in modern V8). +function memberSortKey(m: Reflection): number { + if (m.kind === KIND_CONSTRUCTOR) return 0; + const isStatic = m.flags?.isStatic === true; + if (isStatic) return 1; + if (m.kind === KIND_PROPERTY) return 2; + if (m.kind === KIND_ACCESSOR) return 3; + if (m.kind === KIND_METHOD) return 4; + return 5; +} + +function sortMembers(members: Reflection[]): Reflection[] { + return [...members].sort((a, b) => memberSortKey(a) - memberSortKey(b)); +} + +// Synthesize a full class declaration with all public members on +// individual lines inside the body. Used as the main code-fence +// content for an H2 class block. +function renderClassDeclaration( + refl: Reflection, + members: Reflection[], +): string { + const tparams = renderTypeParameters(refl.typeParameters); + const ext = + refl.extendedTypes !== undefined && refl.extendedTypes.length > 0 + ? ` extends ${refl.extendedTypes.map(renderType).join(", ")}` + : ""; + const impl = + refl.implementedTypes !== undefined && refl.implementedTypes.length > 0 + ? ` implements ${refl.implementedTypes.map(renderType).join(", ")}` + : ""; + const head = `class ${refl.name}${tparams}${ext}${impl}`; + if (members.length === 0) return head; + const lines = sortMembers(members).map( + (m) => ` ${renderMemberDeclarationLine(m)};`, + ); + return `${head} {\n${lines.join("\n")}\n}`; +} + +function renderInterfaceDeclaration( + refl: Reflection, + members: Reflection[], +): string { + const tparams = renderTypeParameters(refl.typeParameters); + const ext = + refl.extendedTypes !== undefined && refl.extendedTypes.length > 0 + ? ` extends ${refl.extendedTypes.map(renderType).join(", ")}` + : ""; + const head = `interface ${refl.name}${tparams}${ext}`; + if (members.length === 0) return head; + const lines = sortMembers(members).map( + (m) => ` ${renderMemberDeclarationLine(m)};`, + ); + return `${head} {\n${lines.join("\n")}\n}`; +} + +function renderSignature(refl: Reflection): string { + switch (refl.kind) { + case KIND_TYPE_ALIAS: { + const tparams = renderTypeParameters(refl.typeParameters); + const rhs = + refl.type !== undefined + ? renderType(refl.type) + : refl.children !== undefined && refl.children.length > 0 + ? renderReflectionType(refl) + : "unknown"; + return `type ${refl.name}${tparams} = ${rhs}`; + } + case KIND_FUNCTION: { + const sig = refl.signatures?.[0]; + if (sig === undefined) { + throw new Error(`Function reflection ${refl.name} has no signatures`); + } + const tparams = renderTypeParameters(sig.typeParameters); + const params = renderParameters(sig.parameters ?? []); + const ret = sig.type !== undefined ? renderType(sig.type) : "unknown"; + return `${refl.name}${tparams}(${params}): ${ret}`; + } + case KIND_VARIABLE: { + const t = refl.type !== undefined ? renderType(refl.type) : "unknown"; + return `const ${refl.name}: ${t}`; + } + case KIND_ENUM: + return `enum ${refl.name}`; + } + throw new Error( + `renderSignature: unexpected kind ${refl.kind} for ${refl.name} (classes/interfaces use renderClassDeclaration/renderInterfaceDeclaration)`, + ); +} + +// === Summary rendering === + +// Slugifier matching Starlight's heading-id rule: lowercase, collapse +// runs of whitespace into `-`, then strip everything that isn't +// `[a-z0-9-]`. Verified against built `dist/site/reference/*.html` +// anchor ids — must stay aligned with Starlight's behavior, since +// `{@link}` resolution emits anchors that those rendered pages +// expose. +function slugifyHeading(text: string): string { + return text + .toLowerCase() + .replace(/\s+/g, "-") + .replace(/[^a-z0-9-]/g, ""); +} + +interface RenderedFile { + slug: string; + content: string; +} + +// Post-render guard: every intra-page (`#anchor`) and cross-file +// (`./slug.md#anchor`) markdown link must point at a heading that +// actually exists. Heading ids are derived with `slugifyHeading`, so +// they match the ids Starlight emits. This catches stale or mistyped +// anchors — e.g. JSDoc links written against an older anchor scheme — +// before they ship as dead links. Fails the build on any miss, +// consistent with the unmapped-symbol gate in `main()`. External +// (`http(s):`/`mailto:`) links and non-`.md` relative paths are out of +// scope and skipped. +function validateAnchors(files: RenderedFile[]): void { + // Strip fenced code blocks first: a ```ts``` declaration is not a + // heading, and signatures must never be scanned for links. + const stripFences = (content: string): string => + content.replace(/```[\s\S]*?```/g, ""); + + const anchorsBySlug = new Map>(); + for (const { slug, content } of files) { + const ids = new Set(); + for (const m of stripFences(content).matchAll(/^#{1,6}\s+(.+?)\s*$/gm)) { + ids.add(slugifyHeading(m[1])); + } + anchorsBySlug.set(slug, ids); + } + + const problems: string[] = []; + for (const { slug, content } of files) { + for (const m of stripFences(content).matchAll(/\[[^\]]*\]\(([^)]+)\)/g)) { + const url = m[1].trim(); + if (/^(https?:|mailto:)/.test(url)) continue; + + if (url.startsWith("#")) { + const anchor = url.slice(1); + if (anchorsBySlug.get(slug)?.has(anchor) !== true) { + problems.push( + `${slug}.md: ${m[0]} → no heading with id "#${anchor}" on this page`, + ); + } + continue; + } + + const cross = url.match(/^\.?\/?([\w-]+)\.md(?:#(.+))?$/); + if (cross !== null) { + const targetSlug = cross[1]; + const targetAnchor = cross[2]; + const targetIds = anchorsBySlug.get(targetSlug); + if (targetIds === undefined) { + problems.push( + `${slug}.md: ${m[0]} → links to unknown file "${targetSlug}.md"`, + ); + } else if (targetAnchor !== undefined && !targetIds.has(targetAnchor)) { + problems.push( + `${slug}.md: ${m[0]} → no heading with id "#${targetAnchor}" in ${targetSlug}.md`, + ); + } + } + } + } + + if (problems.length > 0) { + console.error( + `[error] ${problems.length} dead anchor link(s) in generated reference docs:`, + ); + for (const p of problems) { + console.error(` [dead-anchor] ${p}`); + } + process.exit(1); + } +} + +interface ResolvedLink { + bucket: BucketName; + slug: string; + anchor: string; +} + +interface LinkResolver { + resolve(target: string, currentBucket: BucketName): string | undefined; +} + +function buildLinkResolver(records: SymbolRecord[]): LinkResolver { + const map = new Map(); + for (const record of records) { + const slug = BUCKET_TO_SLUG[record.bucket]; + map.set(record.qname, { + bucket: record.bucket, + slug, + anchor: slugifyHeading(record.qname), + }); + for (const m of record.members ?? []) { + const memberQname = `${record.qname}.${m.name}`; + const headingText = memberHeadingText(m, record.refl.name); + map.set(memberQname, { + bucket: record.bucket, + slug, + anchor: slugifyHeading(headingText), + }); + } + } + return { + resolve(target, currentBucket) { + const entry = map.get(target); + if (entry === undefined) return undefined; + // Same-file links keep the relative path empty; cross-file links + // emit `./.md#` so raw markdown viewers (e.g. plain + // GitHub view) follow the link to the right file regardless of + // any specific docs-platform URL scheme. + const anchor = `#${entry.anchor}`; + return entry.bucket === currentBucket + ? anchor + : `./${entry.slug}.md${anchor}`; + }, + }; +} + +// Module-level state set during the rendering pass so renderSummary +// can resolve `{@link}` parts without threading the resolver through +// every render-function signature. Cleared after the pass for safety. +let currentLinkResolver: LinkResolver | undefined; +let currentRenderBucket: BucketName | undefined; + +// Match `{@link Target}` or `{@link Target | display}` — used to +// recover link references that TypeDoc emitted as code parts because +// the source TSDoc wrapped them in backticks. The captured groups are +// (target, optionalDisplay). +const BACKTICKED_LINK_RE = + /^`?\{@(?:link|linkcode|linkplain)\s+([^}|]+?)(?:\s*\|\s*([^}]+?))?\s*\}`?$/; + +function resolveLinkPart(target: string, display: string): string { + if (currentLinkResolver !== undefined && currentRenderBucket !== undefined) { + const url = currentLinkResolver.resolve(target, currentRenderBucket); + if (url !== undefined) { + return `[\`${display}\`](${url})`; + } + } + // Unresolved: render as inline code so the reference at least + // visually distinguishes itself from prose, even without a link. + return `\`${display}\``; +} + +function renderSummary(parts: SummaryDisplayPart[] | undefined): string { + if (parts === undefined || parts.length === 0) return ""; + return parts + .map((p) => { + if (p.kind === "text") return p.text; + if (p.kind === "code") { + // Recovery for source TSDoc that wraps `{@link Foo}` in + // backticks. TypeDoc emits the whole thing as a single `code` + // part instead of an `inline-tag`, so we re-parse it here and + // resolve to a styled markdown link if we can. + const m = BACKTICKED_LINK_RE.exec(p.text); + if (m !== null) { + const target = m[1].trim(); + const display = (m[2] ?? m[1]).trim(); + return resolveLinkPart(target, display); + } + return p.text; + } + if (p.kind === "inline-tag") { + if (p.tag === undefined) { + throw new Error( + `Inline tag part missing tag: ${JSON.stringify(p).slice(0, 200)}`, + ); + } + if ( + p.tag === "@link" || + p.tag === "@linkcode" || + p.tag === "@linkplain" + ) { + // `{@link Foo | display}` parts arrive with `text` already + // resolved to the display text by TypeDoc; `target` carries + // the symbol path. Use `target` for resolution and `text` + // for display, falling back to `text` for both when + // `target` is absent. + const target = (p as SummaryDisplayPart & { target?: string }).target; + return resolveLinkPart(target ?? p.text, p.text); + } + return `{${p.tag} ${p.text}}`; + } + throw new Error( + `Unhandled summary part kind: ${JSON.stringify(p).slice(0, 200)}`, + ); + }) + .join("") + .trim(); +} + +function findComment(refl: Reflection): Comment | undefined { + return refl.comment ?? refl.signatures?.[0]?.comment; +} + +// === Block-tag extraction and section rendering === + +interface ExtractedTags { + deprecated?: SummaryDisplayPart[]; + returns?: SummaryDisplayPart[]; + warning?: SummaryDisplayPart[]; + throws: SummaryDisplayPart[][]; + examples: SummaryDisplayPart[][]; + see: SummaryDisplayPart[][]; +} + +function extractTags(comment: Comment | undefined): ExtractedTags { + const tags: ExtractedTags = { throws: [], examples: [], see: [] }; + if (comment === undefined) return tags; + for (const bt of comment.blockTags ?? []) { + const content = bt.content ?? []; + if (bt.tag === "@deprecated") tags.deprecated = content; + else if (bt.tag === "@returns") tags.returns = content; + else if (bt.tag === "@warning") tags.warning = content; + else if (bt.tag === "@throws") tags.throws.push(content); + else if (bt.tag === "@example") tags.examples.push(content); + else if (bt.tag === "@see") tags.see.push(content); + } + return tags; +} + +function renderDeprecatedParagraph( + content: SummaryDisplayPart[] | undefined, +): string { + if (content === undefined) return ""; + const desc = renderSummary(content); + return desc.length > 0 ? `**Deprecated.** ${desc}` : "**Deprecated.**"; +} + +// Stripe-style parameter rendering: bullet per param with bold name, +// code-spanned type, required/optional indicator, and prose +// description from `@param` if present. Multi-line descriptions +// (e.g. with embedded sub-bullets describing object fields) are +// re-indented so nested markdown still parses as a continuation of +// the param's bullet. +function renderParametersSection(sig: Reflection | undefined): string { + const params = sig?.parameters ?? []; + if (params.length === 0) return ""; + const bullets: string[] = []; + for (const p of params) { + const rest = p.flags?.isRest === true ? "..." : ""; + const optional = + p.flags?.isOptional === true || p.defaultValue !== undefined; + const requiredTag = optional ? "optional" : "required"; + const typeStr = p.type !== undefined ? renderType(p.type) : "unknown"; + const defaultStr = + p.defaultValue !== undefined ? ` (default: \`${p.defaultValue}\`)` : ""; + const desc = renderSummary(p.comment?.summary); + const head = `- **\`${rest}${p.name}\`** — \`${typeStr}\` (${requiredTag})${defaultStr}`; + if (desc.length === 0) { + bullets.push(head); + } else { + const indented = desc + .split("\n") + .map((line, i) => (i === 0 ? line : ` ${line}`)) + .join("\n"); + bullets.push(`${head} — ${indented}`); + } + } + return `**Parameters**\n\n${bullets.join("\n")}`; +} + +function renderReturnsSection( + content: SummaryDisplayPart[] | undefined, +): string { + if (content === undefined) return ""; + const desc = renderSummary(content); + if (desc.length === 0) return ""; + return `**Returns**\n\n${desc}`; +} + +function renderThrowsSection(contents: SummaryDisplayPart[][]): string { + const bullets: string[] = []; + for (const c of contents) { + const desc = renderSummary(c); + if (desc.length === 0) continue; + bullets.push(`- ${desc}`); + } + if (bullets.length === 0) return ""; + return `**Throws**\n\n${bullets.join("\n")}`; +} + +// TypeDoc emits the entire `@example` fence as a single `code`-kind +// summary part. When the source omits the language tag, prepend `ts` +// so the rendered markdown highlights as TypeScript. +function ensureExampleLanguageHint(text: string): string { + return text.replace(/^```\n/, "```ts\n"); +} + +function renderExamplesSection(contents: SummaryDisplayPart[][]): string { + const blocks: string[] = []; + for (const c of contents) { + const text = renderSummary(c); + if (text.length === 0) continue; + blocks.push(`**Example**\n\n${ensureExampleLanguageHint(text)}`); + } + return blocks.join("\n\n"); +} + +function renderSeeSection(contents: SummaryDisplayPart[][]): string { + const bullets: string[] = []; + for (const c of contents) { + const desc = renderSummary(c); + if (desc.length === 0) continue; + bullets.push(`- ${desc}`); + } + if (bullets.length === 0) return ""; + return `**See also**\n\n${bullets.join("\n")}`; +} + +function renderWarningSection( + content: SummaryDisplayPart[] | undefined, +): string { + if (content === undefined) return ""; + const desc = renderSummary(content); + if (desc.length === 0) return ""; + return `**Warning**\n\n${desc}`; +} + +// === Per-symbol block === + +// H3 heading text (without the `### ` prefix or backtick wrappers) +// for a class/interface member. Used both for emitting the heading +// and for computing its anchor slug for `{@link}` resolution. +// Conveys static vs instance via heading shape (no separate `static` +// indicator): +// - constructor: `new ClassName(args)` +// - static method: `ClassName.method(args)` +// - static property: `ClassName.prop` +// - instance method: `instance.method(args)` (lower-cased ClassName) +// - instance property: `instance.prop` +function memberHeadingText(m: Reflection, parentName: string): string { + const isStatic = m.flags?.isStatic === true; + const instanceReceiver = + parentName.charAt(0).toLowerCase() + parentName.slice(1); + + if (m.kind === KIND_CONSTRUCTOR) { + const sig = m.signatures?.[0]; + const paramNames = (sig?.parameters ?? []).map((p) => p.name).join(", "); + return `new ${parentName}(${paramNames})`; + } + + if (m.kind === KIND_PROPERTY || m.kind === KIND_ACCESSOR) { + const receiver = isStatic ? parentName : instanceReceiver; + return `${receiver}.${m.name}`; + } + + if (m.kind === KIND_METHOD) { + const receiver = isStatic ? parentName : instanceReceiver; + const sig = m.signatures?.[0]; + const paramNames = (sig?.parameters ?? []).map((p) => p.name).join(", "); + return `${receiver}.${m.name}(${paramNames})`; + } + + throw new Error(`memberHeadingText: unhandled kind ${m.kind} for ${m.name}`); +} + +function renderMemberHeading(m: Reflection, parentName: string): string { + return `### \`${memberHeadingText(m, parentName)}\``; +} + +// One H3 sub-block per public member: heading, summary, ts code fence +// of the member's own signature, params/returns/throws/examples +// sections, source link. +function renderMemberBlock( + m: Reflection, + parentName: string, + sourceRef: string, +): string { + const heading = renderMemberHeading(m, parentName); + + // Comment lives on the member directly for properties, on the + // first signature for callable members. + const comment = + m.comment ?? + m.signatures?.[0]?.comment ?? + m.getSignature?.comment ?? + m.setSignature?.comment; + const tags = extractTags(comment); + + const deprecated = renderDeprecatedParagraph(tags.deprecated); + const summary = renderSummary(comment?.summary); + const fence = `\`\`\`ts\n${renderMemberDeclarationLine(m)};\n\`\`\``; + + // For callable members, use signatures[0] for params/returns. For + // accessors, use getSignature for return-shape. + const callable = m.signatures?.[0] ?? m.getSignature; + const params = + callable !== undefined ? renderParametersSection(callable) : ""; + const returnsTag = + tags.returns ?? + callable?.comment?.blockTags?.find((t) => t.tag === "@returns")?.content; + const returns = renderReturnsSection(returnsTag); + const throwsSection = renderThrowsSection(tags.throws); + const examples = renderExamplesSection(tags.examples); + const see = renderSeeSection(tags.see); + const warning = renderWarningSection(tags.warning); + + const memberSource = m.sources?.[0]; + const sourceLink = + memberSource !== undefined + ? `**Source:** [${memberSource.fileName}:${memberSource.line}](https://github.com/${REPO_SLUG}/blob/${sourceRef}/${memberSource.fileName}#L${memberSource.line})` + : ""; + + const sections = [ + heading, + deprecated, + summary, + fence, + params, + returns, + throwsSection, + examples, + see, + warning, + sourceLink, + ]; + return sections.filter((s) => s.length > 0).join("\n\n"); +} + +function renderSymbolBlock(record: SymbolRecord, sourceRef: string): string { + try { + const comment = findComment(record.refl); + const tags = extractTags(comment); + + const heading = `## ${record.qname}`; + const deprecated = renderDeprecatedParagraph(tags.deprecated); + const summary = renderSummary(comment?.summary); + + // Class/interface get a synthesized full-body declaration in the + // code fence; everything else uses renderSignature. + const isClassLike = + record.kind === KIND_CLASS || record.kind === KIND_INTERFACE; + const decl = isClassLike + ? record.kind === KIND_CLASS + ? renderClassDeclaration(record.refl, record.members ?? []) + : renderInterfaceDeclaration(record.refl, record.members ?? []) + : renderSignature(record.refl); + const fence = `\`\`\`ts\n${decl}\n\`\`\``; + + // Top-level params/returns only apply to function-like top-level + // symbols. For classes/interfaces, those sections live on the + // per-member H3 blocks instead. + const params = isClassLike + ? "" + : renderParametersSection(record.refl.signatures?.[0]); + const returns = isClassLike ? "" : renderReturnsSection(tags.returns); + const throwsSection = isClassLike ? "" : renderThrowsSection(tags.throws); + + const examples = renderExamplesSection(tags.examples); + const see = renderSeeSection(tags.see); + const warning = renderWarningSection(tags.warning); + const sourceLink = `**Source:** [${record.sourceFilePath}:${record.sourceLine}](https://github.com/${REPO_SLUG}/blob/${sourceRef}/${record.sourceFilePath}#L${record.sourceLine})`; + + const memberBlocks = isClassLike + ? sortMembers(record.members ?? []).map((m) => + renderMemberBlock(m, record.refl.name, sourceRef), + ) + : []; + + const sections = [ + heading, + deprecated, + summary, + fence, + params, + returns, + throwsSection, + examples, + see, + warning, + sourceLink, + ...memberBlocks, + ]; + return sections.filter((s) => s.length > 0).join("\n\n"); + } catch (err) { + const msg = err instanceof Error ? err.message : String(err); + throw new Error( + `Failed to render symbol ${record.qname} at ${record.sourceFilePath}:${record.sourceLine}: ${msg}`, + ); + } +} + +// === File rendering === + +function compareSymbols(a: SymbolRecord, b: SymbolRecord): number { + if (a.qname !== b.qname) return a.qname < b.qname ? -1 : 1; + if (a.sourceFilePath !== b.sourceFilePath) { + return a.sourceFilePath < b.sourceFilePath ? -1 : 1; + } + return a.sourceLine - b.sourceLine; +} + +function renderFile( + bucketName: BucketName, + symbols: SymbolRecord[], + sourceRef: string, +): string { + const sorted = [...symbols].sort(compareSymbols); + const header = [ + "---", + `title: ${bucketName}`, + `description: ${BUCKET_DESCRIPTIONS[bucketName]}`, + "---", + "", + `# ${bucketName}`, + ].join("\n"); + if (sorted.length === 0) { + return `${header}\n`; + } + // Set the current bucket so `renderSummary` can decide same-file vs + // cross-file `{@link}` resolution. Cleared in `main()` after all + // files render. + currentRenderBucket = bucketName; + const blocks = sorted + .map((s) => renderSymbolBlock(s, sourceRef)) + .join("\n\n"); + return `${header}\n\n${blocks}\n`; +} + +function main(): void { + console.log("Running typedoc to refresh api.json..."); + execSync("pnpm exec typedoc", { stdio: "inherit", cwd: REPO_ROOT }); + + const pkg = JSON.parse( + readFileSync(join(REPO_ROOT, "package.json"), "utf8"), + ) as { version: string }; + console.log( + `Building reference docs: SDK v${pkg.version} with source ref '${DOCS_SOURCE_REF}'`, + ); + + const project = JSON.parse(readFileSync(TYPEDOC_JSON, "utf8")) as Reflection; + + const collected: SymbolRecord[] = []; + const unmapped: UnmappedSymbol[] = []; + walkReflection(project, [], collected, unmapped); + + if (unmapped.length > 0) { + console.error( + `[error] ${unmapped.length} target-kind symbol(s) live in src/ but match no FILE_OVERRIDES or DIRECTORY_PREFIXES rule:`, + ); + for (const u of unmapped) { + console.error( + ` [unmapped] ${u.qname} at ${u.sourceFilePath}:${u.sourceLine}: add a routing rule in scripts/build-docs.ts.`, + ); + } + process.exit(1); + } + + const byBucket = new Map( + (Object.keys(BUCKET_TO_SLUG) as BucketName[]).map((b) => [b, []]), + ); + for (const r of collected) { + const list = byBucket.get(r.bucket); + if (list === undefined) { + throw new Error( + `Internal: missing bucket for "${r.bucket}" — pre-population gap`, + ); + } + list.push(r); + } + + // Build the qname → bucket/anchor map after collection so that + // `{@link Foo}` references in any TSDoc summary can resolve to a + // relative markdown URL during rendering. Set as module-level state + // since renderSummary is called transitively from many sites and + // threading the resolver as a parameter would touch every layer. + currentLinkResolver = buildLinkResolver(collected); + + mkdirSync(OUTPUT_DIR, { recursive: true }); + const rendered: RenderedFile[] = []; + let totalSymbols = 0; + for (const [bucket, slug] of Object.entries(BUCKET_TO_SLUG) as [ + BucketName, + string, + ][]) { + const list = byBucket.get(bucket); + if (list === undefined) { + throw new Error(`Internal: bucket "${bucket}" not pre-populated`); + } + const content = renderFile(bucket, list, DOCS_SOURCE_REF); + rendered.push({ slug, content }); + console.log(` ${slug}.md: ${list.length} symbol(s)`); + totalSymbols += list.length; + } + + // Guard before writing: a dead intra-page or cross-file anchor must + // fail the build rather than ship (mirrors the unmapped-symbol gate + // above). Only write once every link is known to resolve. + validateAnchors(rendered); + for (const { slug, content } of rendered) { + writeFileSync(join(OUTPUT_DIR, `${slug}.md`), content, "utf8"); + } + currentLinkResolver = undefined; + currentRenderBucket = undefined; + console.log( + `Wrote 16 reference files (${totalSymbols} symbols) to ${OUTPUT_DIR}.`, + ); +} + +main(); diff --git a/scripts/build-htaccess.ts b/scripts/build-htaccess.ts new file mode 100644 index 000000000..b603d44e9 --- /dev/null +++ b/scripts/build-htaccess.ts @@ -0,0 +1,89 @@ +/** + * Generates public/.htaccess from config/site.ts. The file enables two + * agent-friendly response behaviors on Apache: + * + * 1. Link response headers (RFC 8288) advertising the LLMs bundles. + * 2. Markdown content negotiation: when the client sends + * `Accept: text/markdown` and a sibling .md file exists for the + * requested page, serve that instead of the HTML. + * + * Apache-only. The generated file is inert on hosts that don't honor + * .htaccess (GitHub Pages, Cloudflare Pages, Netlify, S3). For those + * hosts the same behaviors must be implemented in the host's native + * format (e.g. _headers for CF/Netlify, edge functions for GH Pages). + * + * Sibling to scripts/build-robots.ts; both write into the gitignored + * public/ tree so Astro picks them up at site-root paths. + */ + +import { mkdirSync, writeFileSync } from "node:fs"; +import { join } from "node:path"; + +import { BASE_PATH } from "../config/site.js"; + +const REPO_ROOT = process.cwd(); +const PUBLIC_DIR = join(REPO_ROOT, "public"); +const HTACCESS_OUT = join(PUBLIC_DIR, ".htaccess"); + +function renderLinkHeader(): string { + // RFC 8288: comma-separated list of links, each `; rel="..."; type="..."`. + // Inside Apache's quoted Header directive, double quotes must be backslash-escaped. + const llms = `<${BASE_PATH}/llms.txt>; rel=\\"alternate\\"; type=\\"text/plain\\"`; + const llmsFull = `<${BASE_PATH}/llms-full.txt>; rel=\\"alternate\\"; type=\\"text/plain\\"`; + return `${llms}, ${llmsFull}`; +} + +function renderHtaccess(): string { + return `# Generated by scripts/build-htaccess.ts from config/site.ts. +# Edit that file (or this script) and rebuild via \`pnpm docs:htaccess\`. +# +# Apache-only directives. This file is inert on static hosts that don't +# read .htaccess (GitHub Pages, Cloudflare Pages, Netlify, S3). For those +# hosts the same behaviors must be expressed in their native formats. +# +# DOCUMENT_ROOT caveat: the markdown-negotiation file checks below assume +# the site is deployed at the apex of an Apache vhost. If you ever upload +# dist/site/ into a non-root subdirectory of an Apache host, +# %{DOCUMENT_ROOT}/$1.md will look in the wrong place and the rewrite +# will silently no-op (Apache will serve the original HTML). Adjust by +# prepending the subdirectory or switching to %{REQUEST_FILENAME}-based +# checks. + + + # Apache: Link response header for agent discovery (RFC 8288). + # Advertises both LLMs bundles on every response. + Header set Link "${renderLinkHeader()}" + + # Apache: tell caches/CDNs that responses vary by Accept header so + # markdown and HTML variants of the same URL don't cross-pollute caches. + Header append Vary Accept + + + + RewriteEngine On + + # Apache: markdown content negotiation. When the client prefers + # text/markdown and a sibling .md file exists at the requested path, + # serve that instead of the HTML render. + + # Homepage special case: GET / + Accept: text/markdown → /index.md + RewriteCond %{HTTP_ACCEPT} text/markdown + RewriteCond %{DOCUMENT_ROOT}/index.md -f + RewriteRule ^/?$ /index.md [L] + + # All other pages with trailing slash: /foo/bar/ → /foo/bar.md + RewriteCond %{HTTP_ACCEPT} text/markdown + RewriteCond %{DOCUMENT_ROOT}/$1.md -f + RewriteRule ^/?(.+?)/?$ /$1.md [L] + +`; +} + +function main(): void { + const content = renderHtaccess(); + mkdirSync(PUBLIC_DIR, { recursive: true }); + writeFileSync(HTACCESS_OUT, content, "utf8"); + console.log(`Wrote ${HTACCESS_OUT} (${content.length}B).`); +} + +main(); diff --git a/scripts/build-llms.ts b/scripts/build-llms.ts new file mode 100644 index 000000000..1924479f5 --- /dev/null +++ b/scripts/build-llms.ts @@ -0,0 +1,294 @@ +/** + * Two responsibilities for the docs pipeline: + * + * 1. Syncs README.md → docs/index.md (the canonical homepage). The + * docs/index.md file is README contents prefixed with a Starlight + * frontmatter block. Title is derived from README's first H1; + * description is hardcoded below. + * + * 2. Reads `docs/`, emits `docs/llms.txt` (compact index) and + * `docs/llms-full.txt` (full corpus + appended CHANGELOG.md). The + * llms.txt schema is locked in `.claude/notes/docs-plan.md` → + * "`llms.txt` schema" subsection. + * + * Both outputs are committed in `docs/`; CI's `git diff --exit-code -- docs/` + * step catches drift. Sibling to scripts/build-docs.ts; both feed the docs + * pipeline (`pnpm docs`). + */ + +import { mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs"; +import { join } from "node:path"; + +import { DOCS_SOURCE_REF } from "./docs-source-ref.js"; + +const REPO_ROOT = process.cwd(); +const DOCS_DIR = join(REPO_ROOT, "docs"); +const PUBLIC_DIR = join(REPO_ROOT, "public"); +const README_PATH = join(REPO_ROOT, "README.md"); +const INDEX_OUT = join(DOCS_DIR, "index.md"); +const LLMS_OUT = join(DOCS_DIR, "llms.txt"); +const LLMS_FULL_OUT = join(DOCS_DIR, "llms-full.txt"); +// Mirrored copies under public/ so Astro publishes them at the site +// root (`/llms.txt`, `/llms-full.txt`). The canonical +// committed copy lives at docs/; public/ is gitignored and rebuilt. +const PUBLIC_LLMS_OUT = join(PUBLIC_DIR, "llms.txt"); +const PUBLIC_LLMS_FULL_OUT = join(PUBLIC_DIR, "llms-full.txt"); +const CHANGELOG_PATH = join(REPO_ROOT, "CHANGELOG.md"); +const PKG_PATH = join(REPO_ROOT, "package.json"); + +const PROJECT_NAME = "@stellar/stellar-sdk"; + +// Docs site homepage frontmatter description. Kept here rather than +// pulled from package.json#description because the docs site's tagline +// is tuned for human readers, not npm registry surfacing. +const INDEX_DESCRIPTION = + "A JavaScript library for communicating with a Stellar Horizon server and Stellar RPC."; + +// Reference-page slug order. Mirrors BUCKET_TO_SLUG insertion order +// in scripts/build-docs.ts; keep in sync if either side changes. (If +// a third script ever needs this list, refactor to a shared module +// under scripts/lib/ — until then, the duplication is the lighter +// option.) +const REFERENCE_SLUG_ORDER: readonly string[] = [ + "core-keys", + "core-assets", + "core-transactions", + "core-xdr", + "core-soroban-primitives", + "network-horizon", + "network-rpc", + "network-friendbot", + "network-http", + "contracts-client", + "contracts-bindings", + "seps-toml", + "seps-federation", + "seps-webauth", + "errors", + "cross-cutting", +]; + +interface Frontmatter { + title?: string; + description?: string; +} + +interface DocPage { + // Path relative to docs/, e.g., "index.md", "guides/00-versioning.md". + docsRelPath: string; + // Path relative to repo root, e.g., "docs/index.md". + repoRelPath: string; + // Site URL, e.g., "/", "/agents", "/guides/00-versioning". + url: string; + frontmatter: Frontmatter; + // Body with frontmatter stripped and leading/trailing newlines trimmed. + body: string; +} + +// Single-line `key: value` parser. Sufficient for our frontmatter +// shape (title + description; no nested keys, no multiline values, no +// quoted strings). +function parseFrontmatter(content: string): { fm: Frontmatter; body: string } { + if (!content.startsWith("---\n")) { + return { fm: {}, body: content }; + } + const end = content.indexOf("\n---\n", 4); + if (end === -1) { + return { fm: {}, body: content }; + } + const block = content.substring(4, end); + const body = content.substring(end + 5); + const fm: Frontmatter = {}; + for (const line of block.split("\n")) { + const match = line.match(/^([a-zA-Z][a-zA-Z0-9_-]*):\s*(.+)$/); + if (match === null) continue; + const key = match[1]; + const value = match[2].trim(); + if (key === "title") fm.title = value; + else if (key === "description") fm.description = value; + } + return { fm, body }; +} + +// Bundle-relative paths (no leading slash) so links resolve against the +// bundle's own URL per RFC 3986. Keeps llms.txt portable across hosts and +// base paths: served from `https://any-host/any-base/llms.txt`, a link +// like `guides/00-versioning` resolves to +// `https://any-host/any-base/guides/00-versioning`. +function urlForDocsRelPath(docsRelPath: string): string { + const stripped = docsRelPath.replace(/\.md$/, ""); + if (stripped === "index") return "."; + return stripped; +} + +function readDoc(docsRelPath: string): DocPage { + const fullPath = join(DOCS_DIR, docsRelPath); + const raw = readFileSync(fullPath, "utf8"); + const { fm, body: rawBody } = parseFrontmatter(raw); + const body = rawBody.replace(/^\n+/, "").replace(/\n+$/, ""); + return { + docsRelPath, + repoRelPath: `docs/${docsRelPath}`, + url: urlForDocsRelPath(docsRelPath), + frontmatter: fm, + body, + }; +} + +function listGuideFiles(): string[] { + const dir = join(DOCS_DIR, "guides"); + return readdirSync(dir) + .filter((f) => f.endsWith(".md")) + .sort() + .map((f) => `guides/${f}`); +} + +function listReferenceFiles(): string[] { + return REFERENCE_SLUG_ORDER.map((slug) => `reference/${slug}.md`); +} + +// === llms.txt rendering === + +function renderEntryWithDescription(p: DocPage): string { + const title = p.frontmatter.title ?? p.docsRelPath; + const description = p.frontmatter.description ?? ""; + return description.length > 0 + ? `- [${title}](${p.url}): ${description}` + : `- [${title}](${p.url})`; +} + +function renderEntryTitleOnly(p: DocPage): string { + const title = p.frontmatter.title ?? p.docsRelPath; + return `- [${title}](${p.url})`; +} + +function renderLlmsTxt(opts: { + description: string; + version: string; + sourceRef: string; + guides: DocPage[]; + reference: DocPage[]; + agents: DocPage; +}): string { + const lines: string[] = []; + lines.push(`# ${PROJECT_NAME}`); + lines.push(""); + lines.push(`> ${opts.description}`); + lines.push(""); + lines.push(`- Version: ${opts.version}`); + lines.push(`- Source ref: ${opts.sourceRef}`); + lines.push(""); + lines.push("## Guides"); + lines.push(""); + for (const g of opts.guides) lines.push(renderEntryWithDescription(g)); + lines.push(""); + lines.push("## Reference"); + lines.push(""); + for (const r of opts.reference) lines.push(renderEntryTitleOnly(r)); + lines.push(""); + lines.push("## Other"); + lines.push(""); + lines.push(renderEntryWithDescription(opts.agents)); + lines.push( + "- [Full bundle](llms-full.txt): All guide and reference content plus CHANGELOG, in one file.", + ); + return `${lines.join("\n")}\n`; +} + +// === llms-full.txt rendering === + +function renderSection(repoRelPath: string, body: string): string { + return `# Source: ${repoRelPath}\n\n${body}`; +} + +function renderLlmsFullTxt(opts: { + index: DocPage; + guides: DocPage[]; + reference: DocPage[]; + agents: DocPage; + changelog: string; +}): string { + const sections: string[] = []; + sections.push(renderSection(opts.index.repoRelPath, opts.index.body)); + for (const g of opts.guides) + sections.push(renderSection(g.repoRelPath, g.body)); + for (const r of opts.reference) + sections.push(renderSection(r.repoRelPath, r.body)); + sections.push(renderSection(opts.agents.repoRelPath, opts.agents.body)); + sections.push(renderSection("CHANGELOG.md", opts.changelog)); + return `${sections.join("\n\n")}\n`; +} + +// === README → docs/index.md sync === + +// Writes docs/index.md as Starlight frontmatter + README contents. Title +// is derived from README's first H1; description is hardcoded above. +// Must run before any subsequent step that reads docs/index.md. +function syncIndexFromReadme(): void { + const readme = readFileSync(README_PATH, "utf8"); + const h1Match = readme.match(/^#\s+(.+)$/m); + if (h1Match === null) { + throw new Error( + "README.md has no '# ' heading — required to derive docs/index.md title.", + ); + } + const title = h1Match[1].trim(); + const frontmatter = `---\ntitle: ${title}\ndescription: ${INDEX_DESCRIPTION}\n---\n\n`; + writeFileSync(INDEX_OUT, frontmatter + readme, "utf8"); + console.log( + `Synced README.md → ${INDEX_OUT} (${frontmatter.length + readme.length}B).`, + ); +} + +// === main === + +function main(): void { + syncIndexFromReadme(); + + const pkg = JSON.parse(readFileSync(PKG_PATH, "utf8")) as { + version: string; + description: string; + }; + console.log( + `Building llms bundles: SDK v${pkg.version} with source ref '${DOCS_SOURCE_REF}'`, + ); + + const indexPage = readDoc("index.md"); + const agentsPage = readDoc("agents.md"); + const guidesPages = listGuideFiles().map(readDoc); + const referencePages = listReferenceFiles().map(readDoc); + + const changelog = readFileSync(CHANGELOG_PATH, "utf8") + .replace(/^\n+/, "") + .replace(/\n+$/, ""); + + const llmsTxt = renderLlmsTxt({ + description: pkg.description, + version: pkg.version, + sourceRef: DOCS_SOURCE_REF, + guides: guidesPages, + reference: referencePages, + agents: agentsPage, + }); + + const llmsFullTxt = renderLlmsFullTxt({ + index: indexPage, + guides: guidesPages, + reference: referencePages, + agents: agentsPage, + changelog, + }); + + writeFileSync(LLMS_OUT, llmsTxt, "utf8"); + writeFileSync(LLMS_FULL_OUT, llmsFullTxt, "utf8"); + + mkdirSync(PUBLIC_DIR, { recursive: true }); + writeFileSync(PUBLIC_LLMS_OUT, llmsTxt, "utf8"); + writeFileSync(PUBLIC_LLMS_FULL_OUT, llmsFullTxt, "utf8"); + + console.log(`Wrote ${LLMS_OUT} (${llmsTxt.length}B).`); + console.log(`Wrote ${LLMS_FULL_OUT} (${llmsFullTxt.length}B).`); + console.log(`Mirrored to ${PUBLIC_DIR} for Astro site-root serving.`); +} + +main(); diff --git a/scripts/build-md-siblings.ts b/scripts/build-md-siblings.ts new file mode 100644 index 000000000..5c19fabfb --- /dev/null +++ b/scripts/build-md-siblings.ts @@ -0,0 +1,112 @@ +/** + * Copies every docs/**\/*.md source file into dist/site/ at the same URL + * the rendered HTML lives at, with a `.md` extension. Lets agents fetch + * raw markdown by appending `.md` to any docs URL — a partial substitute + * for true `Accept: text/markdown` content negotiation, which requires a + * dynamic server we don't have on static hosting. + * + * Mapping: + * docs/index.md -> dist/site/index.md + * docs/agents.md -> dist/site/agents.md + * docs/guides/01-getting-started.md -> dist/site/guides/01-getting-started.md + * docs/reference/core-keys.md -> dist/site/reference/core-keys.md + * + * Frontmatter is preserved as-is. Must run after `pnpm docs:site` because + * it writes into the Astro build output directory. + */ + +import { + existsSync, + mkdirSync, + readFileSync, + readdirSync, + statSync, + writeFileSync, +} from "node:fs"; +import { dirname, join, relative } from "node:path"; + +const REPO_ROOT = process.cwd(); +const DOCS_DIR = join(REPO_ROOT, "docs"); +const DIST_DIR = join(REPO_ROOT, "dist", "site"); + +function walkMarkdown(root: string): string[] { + const out: string[] = []; + for (const entry of readdirSync(root)) { + const full = join(root, entry); + const st = statSync(full); + if (st.isDirectory()) { + out.push(...walkMarkdown(full)); + } else if (st.isFile() && entry.endsWith(".md")) { + out.push(full); + } + } + return out; +} + +/** + * Adjusts a markdown link target for the `.md` sibling URL space. + * + * Source markdown is authored against the HTML render: each page lives at + * a directory URL with a trailing slash (e.g. `/js-stellar-sdk/agents/`), + * so a link like `../llms.txt` correctly resolves to the base root. The + * raw `.md` sibling lives at `.md` (one fewer directory level), + * so the same link would resolve one level too high. Compensating is + * a deterministic single-step rewrite: drop one leading `../`. + * + * Skip cases (returned unchanged): + * - Absolute URLs and protocol-relative (`http://`, `https://`, `//`) + * - Absolute paths (`/foo`) + * - Anchors only (`#section`) + * - Intra-docs `.md` links — Starlight rewrites them for HTML and the + * same source form works between sibling `.md` files at matching depths. + */ +function transformTarget(target: string): string { + if (/^[a-z][a-z0-9+.-]*:/i.test(target)) return target; + if (target.startsWith("//")) return target; + if (target.startsWith("/")) return target; + if (target.startsWith("#")) return target; + + // .md link (with optional #anchor or ?query) — pass through. + const pathPart = target.split(/[#?]/)[0]; + if (pathPart.endsWith(".md")) return target; + + if (target.startsWith("../")) return target.slice(3); + return target; +} + +// Inline links `[text](url)` and image links `![alt](url)`. URL is the +// first whitespace-or-`)`-delimited token; any trailing `"title"` (or +// equivalent) is preserved verbatim. +const INLINE_LINK_RE = /(!?\[[^\]]*\])\(\s*([^)\s]+)((?:\s+[^)]*)?)\)/g; + +function rewriteLinks(content: string): string { + return content.replace( + INLINE_LINK_RE, + (_match, prefix: string, target: string, trailer: string) => + `${prefix}(${transformTarget(target)}${trailer})`, + ); +} + +function main(): void { + if (!existsSync(DIST_DIR)) { + console.error( + `Missing ${DIST_DIR}. Run \`pnpm docs:site\` before this script.`, + ); + process.exit(1); + } + + const sources = walkMarkdown(DOCS_DIR); + let written = 0; + for (const src of sources) { + const rel = relative(DOCS_DIR, src); + const dst = join(DIST_DIR, rel); + mkdirSync(dirname(dst), { recursive: true }); + const content = readFileSync(src, "utf8"); + writeFileSync(dst, rewriteLinks(content), "utf8"); + written += 1; + } + + console.log(`Copied ${written} .md sibling(s) into ${DIST_DIR}.`); +} + +main(); diff --git a/scripts/build-robots.ts b/scripts/build-robots.ts new file mode 100644 index 000000000..adbc543fd --- /dev/null +++ b/scripts/build-robots.ts @@ -0,0 +1,59 @@ +/** + * Generates public/robots.txt from config/site.ts. Outputs: + * - Wildcard policy with Cloudflare Content Signals (AI_POLICY) + * - Per-bot Allow blocks for every entry in ALLOWED_AI_BOTS + * - One Sitemap directive pointing at the XML sitemap-index + * + * Sibling to scripts/build-llms.ts; both write into the gitignored + * public/ tree so Astro picks them up at site-root paths. + */ + +import { mkdirSync, writeFileSync } from "node:fs"; +import { join } from "node:path"; + +import { AI_POLICY, ALLOWED_AI_BOTS, SITE_BASE_URL } from "../config/site.js"; + +const REPO_ROOT = process.cwd(); +const PUBLIC_DIR = join(REPO_ROOT, "public"); +const ROBOTS_OUT = join(PUBLIC_DIR, "robots.txt"); + +function renderContentSignal(): string { + return `search=${AI_POLICY.search}, ai-input=${AI_POLICY.aiInput}, ai-train=${AI_POLICY.aiTrain}`; +} + +function renderRobotsTxt(): string { + const lines: string[] = []; + + lines.push( + "# Stellar SDK docs are open for indexing, AI assistance, and AI training.", + ); + lines.push( + "# Source of truth: config/site.ts. Regenerate via `pnpm docs:robots`.", + ); + lines.push(""); + lines.push("User-agent: *"); + lines.push(`Content-Signal: ${renderContentSignal()}`); + lines.push("Allow: /"); + lines.push(""); + lines.push( + "# Major AI crawlers — redundant with the wildcard above, but makes intent", + ); + lines.push("# auditable to humans and visible to per-bot scanners."); + for (const bot of ALLOWED_AI_BOTS) { + lines.push(`User-agent: ${bot}`); + lines.push("Allow: /"); + } + lines.push(""); + lines.push(`Sitemap: ${SITE_BASE_URL}/sitemap-index.xml`); + + return `${lines.join("\n")}\n`; +} + +function main(): void { + const robotsTxt = renderRobotsTxt(); + mkdirSync(PUBLIC_DIR, { recursive: true }); + writeFileSync(ROBOTS_OUT, robotsTxt, "utf8"); + console.log(`Wrote ${ROBOTS_OUT} (${robotsTxt.length}B).`); +} + +main(); diff --git a/scripts/docs-source-ref.ts b/scripts/docs-source-ref.ts new file mode 100644 index 000000000..6cb59317b --- /dev/null +++ b/scripts/docs-source-ref.ts @@ -0,0 +1,15 @@ +// Branch / tag / commit ref embedded into rendered source links and +// the `Generated:` field of LLM bundles. Local builds, PR-check builds, +// and any normal `pnpm docs:reference` / `pnpm docs:llms` invocation +// use the default below — kept evergreen so regeneration produces no +// diff churn (the same ref gets baked in every time, regardless of +// HEAD). Release deploys override via the `DOCS_SOURCE_REF` env var +// (set to the release tag, e.g. `v15.0.1`) so the deployed snapshot +// links to the exact source at release time. +// +// Update `DEFAULT_DOCS_REF` here when the trunk branch is renamed +// (e.g. `master` → `main`). Do not hardcode the branch name in +// scripts/build-docs.ts or scripts/build-llms.ts. +export const DEFAULT_DOCS_REF = "main"; + +export const DOCS_SOURCE_REF = process.env.DOCS_SOURCE_REF ?? DEFAULT_DOCS_REF; diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json new file mode 100644 index 000000000..597197c6a --- /dev/null +++ b/scripts/tsconfig.json @@ -0,0 +1,14 @@ +{ + "extends": "@stellar/tsconfig", + "compilerOptions": { + "noEmit": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "lib": ["ES2022"], + "module": "Node20", + "moduleResolution": "node16", + "target": "es2022", + "types": ["node"] + }, + "include": ["./**/*.ts"] +} diff --git a/src/base/asset.ts b/src/base/asset.ts index d5bc4ebfd..a24d02ff5 100644 --- a/src/base/asset.ts +++ b/src/base/asset.ts @@ -138,7 +138,7 @@ export class Asset { * ID should refer to, since every network will have a unique ID for the * same contract (see {@link Networks} for options) * - * @warning This makes no guarantee that this contract actually *exists*. + * **Warning:** This makes no guarantee that this contract actually *exists*. */ contractId(networkPassphrase: string): string { const networkId = hash(Buffer.from(networkPassphrase)); @@ -214,7 +214,7 @@ export class Asset { * - `native`, * - `credit_alphanum4`, * - `credit_alphanum12` - * @throws {Error} Throws `Error` if asset type is unsupported. + * @throws Throws `Error` if asset type is unsupported. */ getAssetType(): AssetType { switch (this.getRawAssetType().value) { @@ -278,7 +278,7 @@ export class Asset { /** * Compares two assets according to the criteria: * - * 1. First compare the type (native < alphanum4 < alphanum12). + * 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. * diff --git a/src/base/auth.ts b/src/base/auth.ts index 0f551a247..c75e266a8 100644 --- a/src/base/auth.ts +++ b/src/base/auth.ts @@ -3,7 +3,6 @@ import xdr from "./xdr.js"; import { Keypair } from "./keypair.js"; import { StrKey } from "./strkey.js"; -// eslint-disable-next-line @typescript-eslint/no-unused-vars import type { Networks } from "./network.js"; import { hash } from "./hashing.js"; @@ -211,19 +210,19 @@ export async function authorizeEntry( * This is in contrast to {@link authorizeEntry}, which signs an existing entry. * * @param params - the parameters for building and signing the authorization - * @param params.signer - either a {@link Keypair} instance (or anything with a + * - `signer`: either a {@link Keypair} instance (or anything with a * `.sign(buf): Buffer-like` method) or a function which takes a payload (a * {@link xdr.HashIdPreimageSorobanAuthorization} instance) input and returns * the signature of the hash of the raw payload bytes (where the signing key * should correspond to the address in the `entry`) - * @param params.validUntilLedgerSeq - the (exclusive) future ledger sequence + * - `validUntilLedgerSeq`: the (exclusive) future ledger sequence * number until which this authorization entry should be valid (if * `currentLedgerSeq==validUntilLedgerSeq`, this is expired) - * @param params.invocation - the invocation tree that we're authorizing + * - `invocation`: the invocation tree that we're authorizing * (likely, this comes from transaction simulation) - * @param params.networkPassphrase - the network passphrase is incorporated into + * - `networkPassphrase`: the network passphrase is incorporated into * the signature (see {@link Networks} for options) - * @param params.publicKey - the public identity of the signer (when providing a + * - `publicKey`: the public identity of the signer (when providing a * {@link Keypair} to `signer`, this can be omitted, as it just uses * {@link Keypair.publicKey}) * diff --git a/src/base/fee_bump_transaction.ts b/src/base/fee_bump_transaction.ts index bd02da5f3..1d1cd16ad 100644 --- a/src/base/fee_bump_transaction.ts +++ b/src/base/fee_bump_transaction.ts @@ -11,7 +11,7 @@ import { encodeMuxedAccountToAddress } from "./util/decode_encode_muxed_account. * the transaction envelope XDR use {@link TransactionBuilder.fromXDR}. * * Once a {@link FeeBumpTransaction} has been created, its attributes and operations - * should not be changed. You should only add signatures (using {@link FeeBumpTransaction#sign}) before + * should not be changed. You should only add signatures (using {@link FeeBumpTransaction.sign}) before * submitting to the network or forwarding on to additional signers. */ export class FeeBumpTransaction extends TransactionBase { diff --git a/src/base/get_liquidity_pool_id.ts b/src/base/get_liquidity_pool_id.ts index db87b28a2..eea90bebc 100644 --- a/src/base/get_liquidity_pool_id.ts +++ b/src/base/get_liquidity_pool_id.ts @@ -31,9 +31,9 @@ export const LiquidityPoolFeeV18 = 30; * * @param liquidityPoolType - A string representing the liquidity pool type. * @param liquidityPoolParameters - The liquidity pool parameters. - * @param liquidityPoolParameters.assetA - The first asset in the Pool, it must respect the rule assetA < assetB. - * @param liquidityPoolParameters.assetB - The second asset in the Pool, it must respect the rule assetA < assetB. - * @param liquidityPoolParameters.fee - The liquidity pool fee. For now the only fee supported is `30`. + * - `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`. */ export function getLiquidityPoolId( liquidityPoolType: LiquidityPoolType, diff --git a/src/base/invocation.ts b/src/base/invocation.ts index b157fe581..e2fb20d35 100644 --- a/src/base/invocation.ts +++ b/src/base/invocation.ts @@ -92,7 +92,7 @@ export type InvocationWalker = ( * Here, we show a browser modal after simulating an arbitrary transaction, * `tx`, which we assume has an `Operation.invokeHostFunction` inside of it: * - * ```typescript + * ```ts * import { Server, buildInvocationTree } from '@stellar/stellar-sdk'; * * const s = new Server("fill in accordingly"); diff --git a/src/base/keypair.ts b/src/base/keypair.ts index 514d70e29..212e1d1e0 100644 --- a/src/base/keypair.ts +++ b/src/base/keypair.ts @@ -26,9 +26,9 @@ export class Keypair { /** * @param keys - at least one of keys must be provided. - * @param keys.type - public-key signature system name (currently only `ed25519` keys are supported) - * @param keys.publicKey - raw public key - * @param keys.secretKey - raw secret key (32-byte secret seed in ed25519) + * - `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) */ constructor( keys: @@ -145,7 +145,7 @@ export class Keypair { * You will get a different type of muxed account depending on whether or not * you pass an ID. * - * @param [id] - stringified integer indicating the underlying muxed + * @param id - (optional) stringified integer indicating the underlying muxed * ID of the new account object */ xdrMuxedAccount(id?: string): xdr.MuxedAccount { @@ -194,7 +194,7 @@ export class Keypair { * * The secret key is encoded in Stellar format (e.g., `SDAK....`). * - * @throws {Error} if no secret key is available + * @throws if no secret key is available */ secret(): string { if (!this._secretSeed) { @@ -211,7 +211,7 @@ export class Keypair { /** * Returns raw secret key bytes. * - * @throws {Error} if no secret seed is available + * @throws if no secret seed is available */ rawSecretKey(): Buffer { if (!this._secretSeed) { @@ -231,7 +231,7 @@ export class Keypair { * Signs data. * * @param data - data to sign - * @throws {Error} if no secret key is available + * @throws if no secret key is available */ sign(data: Buffer): Buffer { if (!this._secretKey) { diff --git a/src/base/liquidity_pool_asset.ts b/src/base/liquidity_pool_asset.ts index 73f767cb4..b518d83ed 100644 --- a/src/base/liquidity_pool_asset.ts +++ b/src/base/liquidity_pool_asset.ts @@ -15,8 +15,8 @@ export class LiquidityPoolAsset { fee: number; /** - * @param assetA - The first asset in the Pool, it must respect the rule assetA < assetB. See {@link Asset.compare} for more details on how assets are sorted. - * @param assetB - The second asset in the Pool, it must respect the rule assetA < assetB. See {@link Asset.compare} for more details on how assets are sorted. + * @param assetA - The first asset in the Pool, it must respect the rule `assetA < assetB`. See {@link Asset.compare} for more details on how assets are sorted. + * @param assetB - The second asset in the Pool, it must respect the rule `assetA < assetB`. See {@link Asset.compare} for more details on how assets are sorted. * @param fee - The liquidity pool fee. For now the only fee supported is `30`. */ constructor(assetA: Asset, assetB: Asset, fee: number) { @@ -68,9 +68,9 @@ export class LiquidityPoolAsset { /** * Returns the `xdr.ChangeTrustAsset` object for this liquidity pool asset. * - * Note: To convert from an {@link Asset `Asset`} to `xdr.ChangeTrustAsset` + * Note: To convert from an {@link Asset | `Asset`} to `xdr.ChangeTrustAsset` * please refer to the - * {@link Asset.toChangeTrustXDRObject `Asset.toChangeTrustXDRObject`} method. + * {@link Asset.toChangeTrustXDRObject | `Asset.toChangeTrustXDRObject`} method. */ toXDRObject(): xdr.ChangeTrustAsset { const lpConstantProductParamsXdr = diff --git a/src/base/liquidity_pool_id.ts b/src/base/liquidity_pool_id.ts index be981ec67..9c6a5a676 100644 --- a/src/base/liquidity_pool_id.ts +++ b/src/base/liquidity_pool_id.ts @@ -41,9 +41,9 @@ export class LiquidityPoolId { /** * Returns the `xdr.TrustLineAsset` object for this liquidity pool ID. * - * Note: To convert from {@link Asset `Asset`} to `xdr.TrustLineAsset` please + * Note: To convert from {@link Asset | `Asset`} to `xdr.TrustLineAsset` please * refer to the - * {@link Asset.toTrustLineXDRObject `Asset.toTrustLineXDRObject`} method. + * {@link Asset.toTrustLineXDRObject | `Asset.toTrustLineXDRObject`} method. */ toXDRObject(): xdr.TrustLineAsset { const xdrPoolId = Buffer.from( diff --git a/src/base/numbers/index.ts b/src/base/numbers/index.ts index de60ca010..8ff5276fb 100644 --- a/src/base/numbers/index.ts +++ b/src/base/numbers/index.ts @@ -16,15 +16,17 @@ export type { ScIntType }; * you can pass it to the constructor of {@link XdrLargeInt}. * * @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 + * ``` * * @param scv - the XDR smart contract value to convert * - * @throws {TypeError} if the `scv` input value doesn't represent an integer + * @throws if the `scv` input value doesn't represent an integer */ export function scValToBigInt(scv: xdr.ScVal): bigint { const switchName = scv.switch().name; diff --git a/src/base/numbers/sc_int.ts b/src/base/numbers/sc_int.ts index 7b38b83de..bbed71562 100644 --- a/src/base/numbers/sc_int.ts +++ b/src/base/numbers/sc_int.ts @@ -12,6 +12,7 @@ import { XdrLargeInt, type ScIntType } from "./xdr_large_int.js"; * example, you could do `new XdrLargeInt('u128', bytes...).toBigInt()`. * * @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. @@ -52,8 +53,9 @@ import { XdrLargeInt, type ScIntType } from "./xdr_large_int.js"; * * // Or reinterpret it as a different type (size permitting): * const scv = i.toI64(); + * ``` * - * @throws {TypeError} if the `value` is invalid (e.g. floating point), too + * @throws if the `value` is invalid (e.g. floating point), too * large (i.e. exceeds a 256-bit value), doesn't fit in the `opts.type`, * the signedness of `opts.type` doesn't match the input `value`, or a * string `value` can't be parsed as a big integer @@ -67,7 +69,7 @@ export class ScInt extends XdrLargeInt { * you can construct them directly without needing this wrapper, e.g. * `xdr.ScVal.scvU32(1234)`. * @param opts - an optional object controlling optional parameters - * @param opts.type - specify a type ('i64', 'u64', 'i128', 'u128', 'i256', + * - `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. */ diff --git a/src/base/numbers/xdr_large_int.ts b/src/base/numbers/xdr_large_int.ts index 368174a62..59cd921c9 100644 --- a/src/base/numbers/xdr_large_int.ts +++ b/src/base/numbers/xdr_large_int.ts @@ -98,7 +98,7 @@ export class XdrLargeInt { /** * Converts to a native JS number. * - * @throws {RangeError} if the value can't fit into a Number + * @throws if the value can't fit into a Number */ toNumber(): number { const bi = this.int.toBigInt(); @@ -120,7 +120,7 @@ export class XdrLargeInt { /** * The integer encoded with `ScValType = I64`. * - * @throws {RangeError} if the value cannot fit in 64 bits + * @throws if the value cannot fit in 64 bits */ toI64(): xdr.ScVal { this._sizeCheck(64); @@ -159,7 +159,7 @@ export class XdrLargeInt { /** * The integer encoded with `ScValType = I128`. * - * @throws {RangeError} if the value cannot fit in 128 bits + * @throws if the value cannot fit in 128 bits */ toI128(): xdr.ScVal { this._sizeCheck(128); @@ -182,7 +182,7 @@ export class XdrLargeInt { /** * The integer encoded with `ScValType = U128`. * - * @throws {RangeError} if the value cannot fit in 128 bits + * @throws if the value cannot fit in 128 bits */ toU128(): xdr.ScVal { this._sizeCheck(128); @@ -199,7 +199,7 @@ export class XdrLargeInt { /** * The integer encoded with `ScValType = I256` * - * @throws {RangeError} if the value cannot fit in a signed 256-bit integer + * @throws if the value cannot fit in a signed 256-bit integer */ toI256(): xdr.ScVal { const v = this.int.toBigInt(); diff --git a/src/base/operations/account_merge.ts b/src/base/operations/account_merge.ts index 8f5ac5230..d4288176f 100644 --- a/src/base/operations/account_merge.ts +++ b/src/base/operations/account_merge.ts @@ -11,8 +11,8 @@ import { setSourceAccount } from "../util/operations.js"; * Transfers native balance to destination account. * * @param opts - options object - * @param opts.destination - destination to merge the source account into - * @param opts.source - operation source account (defaults to + * - `destination`: destination to merge the source account into + * - `source`: operation source account (defaults to * transaction source) */ export function accountMerge( diff --git a/src/base/operations/allow_trust.ts b/src/base/operations/allow_trust.ts index e7ef0f20c..7bcb9df93 100644 --- a/src/base/operations/allow_trust.ts +++ b/src/base/operations/allow_trust.ts @@ -15,10 +15,10 @@ import { setSourceAccount } from "../util/operations.js"; * account's credit for a given asset. * * @param opts - Options object - * @param opts.trustor - The trusting account (the one being authorized) - * @param opts.assetCode - The asset code being authorized. - * @param opts.authorize - `1` to authorize, `2` to authorize to maintain liabilities, and `0` to deauthorize. - * @param opts.source - The source account (defaults to transaction source). + * - `trustor`: The trusting account (the one being authorized) + * - `assetCode`: The asset code being authorized. + * - `authorize`: `1` to authorize, `2` to authorize to maintain liabilities, and `0` to deauthorize. + * - `source`: The source account (defaults to transaction source). */ export function allowTrust( opts: AllowTrustOpts, diff --git a/src/base/operations/begin_sponsoring_future_reserves.ts b/src/base/operations/begin_sponsoring_future_reserves.ts index d979da6aa..c923297a4 100644 --- a/src/base/operations/begin_sponsoring_future_reserves.ts +++ b/src/base/operations/begin_sponsoring_future_reserves.ts @@ -11,13 +11,15 @@ import { setSourceAccount } from "../util/operations.js"; /** * Create a "begin sponsoring future reserves" operation. * @param opts - Options object - * @param opts.sponsoredId - The sponsored account id. - * @param opts.source - The source account for the operation. Defaults to the transaction's source account. + * - `sponsoredId`: The sponsored account id. + * - `source`: The source account for the operation. Defaults to the transaction's source account. * * @example + * ```ts * const op = Operation.beginSponsoringFutureReserves({ * sponsoredId: 'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7' * }); + * ``` * */ export function beginSponsoringFutureReserves( diff --git a/src/base/operations/bump_sequence.ts b/src/base/operations/bump_sequence.ts index 9333f05c9..e91c1778a 100644 --- a/src/base/operations/bump_sequence.ts +++ b/src/base/operations/bump_sequence.ts @@ -10,8 +10,8 @@ import { /** * This operation bumps sequence number. * @param opts - Options object - * @param opts.bumpTo - Sequence number to bump to. - * @param opts.source - The optional source account. + * - `bumpTo`: Sequence number to bump to. + * - `source`: The optional source account. */ export function bumpSequence( opts: BumpSequenceOpts, diff --git a/src/base/operations/change_trust.ts b/src/base/operations/change_trust.ts index e1325df2e..4d21a70ff 100644 --- a/src/base/operations/change_trust.ts +++ b/src/base/operations/change_trust.ts @@ -20,10 +20,10 @@ const MAX_INT64 = "9223372036854775807"; * given asset from the source account to another. * * @param opts - Options object - * @param opts.asset - The asset for the trust line. - * @param opts.limit - The limit for the asset, defaults to max int64. + * - `asset`: The asset for the trust line. + * - `limit`: The limit for the asset, defaults to max int64. * If the limit is set to "0" it deletes the trustline. - * @param opts.source - The source account (defaults to transaction source). + * - `source`: The source account (defaults to transaction source). */ export function changeTrust( opts: ChangeTrustOpts, diff --git a/src/base/operations/claim_claimable_balance.ts b/src/base/operations/claim_claimable_balance.ts index e7ccef26e..16f37d3bc 100644 --- a/src/base/operations/claim_claimable_balance.ts +++ b/src/base/operations/claim_claimable_balance.ts @@ -9,13 +9,15 @@ import { /** * Create a new claim claimable balance operation. * @param opts - Options object - * @param opts.balanceId - The claimable balance id to be claimed. - * @param opts.source - The source account for the operation. Defaults to the transaction's source account. + * - `balanceId`: The claimable balance id to be claimed. + * - `source`: The source account for the operation. Defaults to the transaction's source account. * * @example + * ```ts * const op = Operation.claimClaimableBalance({ * balanceId: '00000000da0d57da7d4850e7fc10d2a9d0ebc731f7afb40574c03395b17d49149b91f5be', * }); + * ``` */ export function claimClaimableBalance( opts: ClaimClaimableBalanceOpts = {} as ClaimClaimableBalanceOpts, diff --git a/src/base/operations/clawback.ts b/src/base/operations/clawback.ts index ee3708a2e..895bdb8ff 100644 --- a/src/base/operations/clawback.ts +++ b/src/base/operations/clawback.ts @@ -13,11 +13,11 @@ import { * * * @param opts - Options object - * @param opts.asset - The asset being clawed back. - * @param opts.amount - The amount of the asset to claw back. - * @param opts.from - The public key of the (optionally-muxed) + * - `asset`: The asset being clawed back. + * - `amount`: The amount of the asset to claw back. + * - `from`: The public key of the (optionally-muxed) * account to claw back from. - * @param opts.source - The source account for the operation. + * - `source`: The source account for the operation. * Defaults to the transaction's source account. * * @see https://github.com/stellar/stellar-protocol/blob/master/core/cap-0035.md#clawback-operation diff --git a/src/base/operations/clawback_claimable_balance.ts b/src/base/operations/clawback_claimable_balance.ts index b01e40e10..d1c89e4d8 100644 --- a/src/base/operations/clawback_claimable_balance.ts +++ b/src/base/operations/clawback_claimable_balance.ts @@ -11,13 +11,15 @@ import { * Creates a clawback operation for a claimable balance. * * @param opts - Options object - * @param opts.balanceId - The claimable balance ID to be clawed back. - * @param opts.source - The source account for the operation. Defaults to the transaction's source account. + * - `balanceId`: The claimable balance ID to be clawed back. + * - `source`: The source account for the operation. Defaults to the transaction's source account. * * @example + * ```ts * const op = Operation.clawbackClaimableBalance({ * balanceId: '00000000da0d57da7d4850e7fc10d2a9d0ebc731f7afb40574c03395b17d49149b91f5be', * }); + * ``` * * @see https://github.com/stellar/stellar-protocol/blob/master/core/cap-0035.md#clawback-claimable-balance-operation */ diff --git a/src/base/operations/create_account.ts b/src/base/operations/create_account.ts index 6bb7a34fb..47e3ec148 100644 --- a/src/base/operations/create_account.ts +++ b/src/base/operations/create_account.ts @@ -17,10 +17,10 @@ import { * Create and fund a non-existent account. * * @param opts - Options object - * @param opts.destination - Destination account ID to create an account for. - * @param opts.startingBalance - Amount in XLM the account should be funded for. Must be greater + * - `destination`: Destination account ID to create an account for. + * - `startingBalance`: Amount in XLM the account should be funded for. Must be greater * than the {@link https://developers.stellar.org/docs/glossary/fees/ | reserve balance amount}. - * @param opts.source - The source account for the payment. Defaults to the transaction's source account. + * - `source`: The source account for the payment. Defaults to the transaction's source account. */ export function createAccount( opts: CreateAccountOpts, diff --git a/src/base/operations/create_claimable_balance.ts b/src/base/operations/create_claimable_balance.ts index efc90b06a..6df87c6a3 100644 --- a/src/base/operations/create_claimable_balance.ts +++ b/src/base/operations/create_claimable_balance.ts @@ -17,12 +17,13 @@ import { * * * @param opts - Options object - * @param opts.asset - The asset for the claimable balance. - * @param opts.amount - Amount. - * @param opts.claimants - An array of Claimants - * @param opts.source - The source account for the operation. Defaults to the transaction's source account. + * - `asset`: The asset for the claimable balance. + * - `amount`: Amount. + * - `claimants`: An array of Claimants + * - `source`: The source account for the operation. Defaults to the transaction's source account. * * @example + * ```ts * const asset = new Asset( * 'USD', * 'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7' @@ -40,6 +41,7 @@ import { * amount, * claimants * }); + * ``` */ export function createClaimableBalance( opts: CreateClaimableBalanceOpts, diff --git a/src/base/operations/create_passive_sell_offer.ts b/src/base/operations/create_passive_sell_offer.ts index c1504b4d9..cb1075694 100644 --- a/src/base/operations/create_passive_sell_offer.ts +++ b/src/base/operations/create_passive_sell_offer.ts @@ -18,14 +18,14 @@ import { * just used as 1:1 exchanges for path payments. Use manage offer to manage * this offer after using this operation to create it. * @param opts - Options object - * @param opts.selling - What you're selling. - * @param opts.buying - What you're buying. - * @param opts.amount - The total amount you're selling. If 0, deletes the offer. - * @param opts.price - Price of 1 unit of `selling` in terms of `buying`. - * @param opts.price.n - If `opts.price` is an object: the price numerator - * @param opts.price.d - If `opts.price` is an object: the price denominator - * @param opts.source - The source account (defaults to transaction source). - * @throws {Error} when the best rational approximation of `price` cannot be found. + * - `selling`: What you're selling. + * - `buying`: What you're buying. + * - `amount`: The total amount you're selling. If 0, deletes the offer. + * - `price`: Price of 1 unit of `selling` in terms of `buying`. + * - `price.n`: If `opts.price` is an object: the price numerator + * - `price.d`: If `opts.price` is an object: the price denominator + * - `source`: The source account (defaults to transaction source). + * @throws when the best rational approximation of `price` cannot be found. */ export function createPassiveSellOffer( opts: CreatePassiveSellOfferOpts, diff --git a/src/base/operations/end_sponsoring_future_reserves.ts b/src/base/operations/end_sponsoring_future_reserves.ts index a645d059e..7695a89c5 100644 --- a/src/base/operations/end_sponsoring_future_reserves.ts +++ b/src/base/operations/end_sponsoring_future_reserves.ts @@ -9,10 +9,12 @@ import { /** * Create an "end sponsoring future reserves" operation. * @param opts - Options object - * @param opts.source - The source account for the operation. Defaults to the transaction's source account. + * - `source`: The source account for the operation. Defaults to the transaction's source account. * * @example + * ```ts * const op = Operation.endSponsoringFutureReserves(); + * ``` * */ export function endSponsoringFutureReserves( diff --git a/src/base/operations/extend_footprint_ttl.ts b/src/base/operations/extend_footprint_ttl.ts index cab2b34da..e6ba976ed 100644 --- a/src/base/operations/extend_footprint_ttl.ts +++ b/src/base/operations/extend_footprint_ttl.ts @@ -27,9 +27,9 @@ import { * * * @param opts - object holding operation parameters - * @param opts.extendTo - the minimum TTL that all the entries in + * - `extendTo`: the minimum TTL that all the entries in * the read-only footprint will have - * @param opts.source - an optional source account + * - `source`: an optional source account */ export function extendFootprintTtl( opts: ExtendFootprintTtlOpts, diff --git a/src/base/operations/inflation.ts b/src/base/operations/inflation.ts index caccbf076..3d368e525 100644 --- a/src/base/operations/inflation.ts +++ b/src/base/operations/inflation.ts @@ -9,7 +9,7 @@ import { /** * This operation generates the inflation. * @param opts - Options object - * @param opts.source - The optional source account. + * - `source`: The optional source account. */ export function inflation( opts: InflationOpts = {}, diff --git a/src/base/operations/invoke_host_function.ts b/src/base/operations/invoke_host_function.ts index a88eb6d0e..7cd563d0a 100644 --- a/src/base/operations/invoke_host_function.ts +++ b/src/base/operations/invoke_host_function.ts @@ -19,9 +19,9 @@ import { setSourceAccount } from "../util/operations.js"; * * * @param opts - options object - * @param opts.func - host function to execute (with its wrapped parameters) - * @param opts.auth - list outlining the tree of authorizations required for the call - * @param opts.source - an optional source account + * - `func`: host function to execute (with its wrapped parameters) + * - `auth`: list outlining the tree of authorizations required for the call + * - `source`: an optional source account * * @see https://soroban.stellar.org/docs/fundamentals-and-concepts/invoking-contracts-with-transactions#function * @see Operation.invokeContractFunction @@ -87,11 +87,11 @@ export function invokeHostFunction( * * * @param opts - the set of parameters - * @param opts.contract - a strkey-fied contract address (`C...`) - * @param opts.function - the name of the contract fn to invoke - * @param opts.args - parameters to pass to the function invocation - * @param opts.auth - an optional list outlining the tree of authorizations required for the call - * @param opts.source - an optional source account + * - `contract`: a strkey-fied contract address (`C...`) + * - `function`: the name of the contract fn to invoke + * - `args`: parameters to pass to the function invocation + * - `auth`: an optional list outlining the tree of authorizations required for the call + * - `source`: an optional source account * * @see Operation.invokeHostFunction * @see Contract.call @@ -127,12 +127,12 @@ export function invokeContractFunction( * * * @param opts - the set of parameters - * @param opts.address - the contract uploader address - * @param opts.wasmHash - the SHA-256 hash of the contract WASM you're uploading - * @param opts.constructorArgs - the optional parameters to pass to the constructor - * @param opts.salt - an optional, 32-byte salt to distinguish deployment instances - * @param opts.auth - an optional list outlining the tree of authorizations required for the call - * @param opts.source - an optional source account + * - `address`: the contract uploader address + * - `wasmHash`: the SHA-256 hash of the contract WASM you're uploading + * - `constructorArgs`: the optional parameters to pass to the constructor + * - `salt`: an optional, 32-byte salt to distinguish deployment instances + * - `auth`: an optional list outlining the tree of authorizations required for the call + * - `source`: an optional source account * * @see https://soroban.stellar.org/docs/fundamentals-and-concepts/invoking-contracts-with-transactions#function */ @@ -179,9 +179,9 @@ export function createCustomContract( * * * @param opts - the set of parameters - * @param opts.asset - the Stellar asset to wrap, either as an {@link Asset} object or in canonical form (SEP-11, `code:issuer`) - * @param opts.auth - an optional list outlining the tree of authorizations required for the upload - * @param opts.source - an optional source account + * - `asset`: the Stellar asset to wrap, either as an {@link Asset} object or in canonical form (SEP-11, `code:issuer`) + * - `auth`: an optional list outlining the tree of authorizations required for the upload + * - `source`: an optional source account * * @see https://stellar.org/protocol/sep-11#alphanum4-alphanum12 * @see https://soroban.stellar.org/docs/fundamentals-and-concepts/invoking-contracts-with-transactions @@ -229,9 +229,9 @@ export function createStellarAssetContract( * * * @param opts - the set of parameters - * @param opts.wasm - a WASM blob to upload to the ledger - * @param opts.auth - an optional list outlining the tree of authorizations required for the upload - * @param opts.source - an optional source account + * - `wasm`: a WASM blob to upload to the ledger + * - `auth`: an optional list outlining the tree of authorizations required for the upload + * - `source`: an optional source account * * @see https://soroban.stellar.org/docs/fundamentals-and-concepts/invoking-contracts-with-transactions#function */ diff --git a/src/base/operations/liquidity_pool_deposit.ts b/src/base/operations/liquidity_pool_deposit.ts index f586a2c30..7046ef4f9 100644 --- a/src/base/operations/liquidity_pool_deposit.ts +++ b/src/base/operations/liquidity_pool_deposit.ts @@ -18,16 +18,16 @@ import { * @see https://developers.stellar.org/docs/start/list-of-operations/#liquidity-pool-deposit * * @param opts - Options object - * @param opts.liquidityPoolId - The liquidity pool ID. - * @param opts.maxAmountA - Maximum amount of first asset to deposit. - * @param opts.maxAmountB - Maximum amount of second asset to deposit. - * @param opts.minPrice - Minimum depositA/depositB price. - * @param opts.minPrice.n - If `opts.minPrice` is an object: the price numerator - * @param opts.minPrice.d - If `opts.minPrice` is an object: the price denominator - * @param opts.maxPrice - Maximum depositA/depositB price. - * @param opts.maxPrice.n - If `opts.maxPrice` is an object: the price numerator - * @param opts.maxPrice.d - If `opts.maxPrice` is an object: the price denominator - * @param opts.source - The source account for the operation. Defaults to the transaction's source account. + * - `liquidityPoolId`: The liquidity pool ID. + * - `maxAmountA`: Maximum amount of first asset to deposit. + * - `maxAmountB`: Maximum amount of second asset to deposit. + * - `minPrice`: Minimum depositA/depositB price. + * - `minPrice.n`: If `opts.minPrice` is an object: the price numerator + * - `minPrice.d`: If `opts.minPrice` is an object: the price denominator + * - `maxPrice`: Maximum depositA/depositB price. + * - `maxPrice.n`: If `opts.maxPrice` is an object: the price numerator + * - `maxPrice.d`: If `opts.maxPrice` is an object: the price denominator + * - `source`: The source account for the operation. Defaults to the transaction's source account. */ export function liquidityPoolDeposit( opts: LiquidityPoolDepositOpts = {} as LiquidityPoolDepositOpts, diff --git a/src/base/operations/liquidity_pool_withdraw.ts b/src/base/operations/liquidity_pool_withdraw.ts index 5bde72575..5adb3376c 100644 --- a/src/base/operations/liquidity_pool_withdraw.ts +++ b/src/base/operations/liquidity_pool_withdraw.ts @@ -17,11 +17,11 @@ import { * @see https://developers.stellar.org/docs/start/list-of-operations/#liquidity-pool-withdraw * * @param opts - Options object - * @param opts.liquidityPoolId - The liquidity pool ID. - * @param opts.amount - Amount of pool shares to withdraw. - * @param opts.minAmountA - Minimum amount of first asset to withdraw. - * @param opts.minAmountB - Minimum amount of second asset to withdraw. - * @param opts.source - The source account for the operation. Defaults to the transaction's source account. + * - `liquidityPoolId`: The liquidity pool ID. + * - `amount`: Amount of pool shares to withdraw. + * - `minAmountA`: Minimum amount of first asset to withdraw. + * - `minAmountB`: Minimum amount of second asset to withdraw. + * - `source`: The source account for the operation. Defaults to the transaction's source account. */ export function liquidityPoolWithdraw( opts: LiquidityPoolWithdrawOpts = {} as LiquidityPoolWithdrawOpts, diff --git a/src/base/operations/manage_buy_offer.ts b/src/base/operations/manage_buy_offer.ts index 0b17ba270..e9b532601 100644 --- a/src/base/operations/manage_buy_offer.ts +++ b/src/base/operations/manage_buy_offer.ts @@ -16,15 +16,15 @@ import { * Returns a XDR ManageBuyOfferOp. A "manage buy offer" operation creates, updates, or * deletes a buy offer. * @param opts - Options object - * @param opts.selling - What you're selling. - * @param opts.buying - What you're buying. - * @param opts.buyAmount - The total amount you're buying. If 0, deletes the offer. - * @param opts.price - Price of 1 unit of `buying` in terms of `selling`. - * @param opts.price.n - If `opts.price` is an object: the price numerator - * @param opts.price.d - If `opts.price` is an object: the price denominator - * @param opts.offerId - If `0`, will create a new offer (default). Otherwise, edits an existing offer. - * @param opts.source - The source account (defaults to transaction source). - * @throws {Error} when the best rational approximation of `price` cannot be found. + * - `selling`: What you're selling. + * - `buying`: What you're buying. + * - `buyAmount`: The total amount you're buying. If 0, deletes the offer. + * - `price`: Price of 1 unit of `buying` in terms of `selling`. + * - `price.n`: If `opts.price` is an object: the price numerator + * - `price.d`: If `opts.price` is an object: the price denominator + * - `offerId`: If `0`, will create a new offer (default). Otherwise, edits an existing offer. + * - `source`: The source account (defaults to transaction source). + * @throws when the best rational approximation of `price` cannot be found. */ export function manageBuyOffer( opts: ManageBuyOfferOpts, diff --git a/src/base/operations/manage_data.ts b/src/base/operations/manage_data.ts index 74ac4c2ee..c97acfbd9 100644 --- a/src/base/operations/manage_data.ts +++ b/src/base/operations/manage_data.ts @@ -9,9 +9,9 @@ import { /** * This operation adds data entry to the ledger. * @param opts - Options object - * @param opts.name - The name of the data entry. - * @param opts.value - The value of the data entry. - * @param opts.source - The optional source account. + * - `name`: The name of the data entry. + * - `value`: The value of the data entry. + * - `source`: The optional source account. */ export function manageData( opts: ManageDataOpts, diff --git a/src/base/operations/manage_sell_offer.ts b/src/base/operations/manage_sell_offer.ts index cb61fb312..be322480f 100644 --- a/src/base/operations/manage_sell_offer.ts +++ b/src/base/operations/manage_sell_offer.ts @@ -16,15 +16,15 @@ import { * Returns a XDR ManageSellOfferOp. A "manage sell offer" operation creates, updates, or * deletes an offer. * @param opts - Options object - * @param opts.selling - What you're selling. - * @param opts.buying - What you're buying. - * @param opts.amount - The total amount you're selling. If 0, deletes the offer. - * @param opts.price - Price of 1 unit of `selling` in terms of `buying`. - * @param opts.price.n - If `opts.price` is an object: the price numerator - * @param opts.price.d - If `opts.price` is an object: the price denominator - * @param opts.offerId - If `0`, will create a new offer (default). Otherwise, edits an existing offer. - * @param opts.source - The source account (defaults to transaction source). - * @throws {Error} when the best rational approximation of `price` cannot be found. + * - `selling`: What you're selling. + * - `buying`: What you're buying. + * - `amount`: The total amount you're selling. If 0, deletes the offer. + * - `price`: Price of 1 unit of `selling` in terms of `buying`. + * - `price.n`: If `opts.price` is an object: the price numerator + * - `price.d`: If `opts.price` is an object: the price denominator + * - `offerId`: If `0`, will create a new offer (default). Otherwise, edits an existing offer. + * - `source`: The source account (defaults to transaction source). + * @throws when the best rational approximation of `price` cannot be found. */ export function manageSellOffer( opts: ManageSellOfferOpts, diff --git a/src/base/operations/path_payment_strict_receive.ts b/src/base/operations/path_payment_strict_receive.ts index 362b01551..d4174ad5b 100644 --- a/src/base/operations/path_payment_strict_receive.ts +++ b/src/base/operations/path_payment_strict_receive.ts @@ -24,13 +24,13 @@ import { * @see https://developers.stellar.org/docs/start/list-of-operations/#path-payment-strict-receive * * @param opts - Options object - * @param opts.sendAsset - asset to pay with - * @param opts.sendMax - maximum amount of sendAsset to send - * @param opts.destination - destination account to send to - * @param opts.destAsset - asset the destination will receive - * @param opts.destAmount - amount the destination receives - * @param opts.path - array of Asset objects to use as the path - * @param opts.source - The source account for the payment. + * - `sendAsset`: asset to pay with + * - `sendMax`: maximum amount of sendAsset to send + * - `destination`: destination account to send to + * - `destAsset`: asset the destination will receive + * - `destAmount`: amount the destination receives + * - `path`: array of Asset objects to use as the path + * - `source`: The source account for the payment. * Defaults to the transaction's source account. */ export function pathPaymentStrictReceive( diff --git a/src/base/operations/path_payment_strict_send.ts b/src/base/operations/path_payment_strict_send.ts index e10bb0c71..7dff3718a 100644 --- a/src/base/operations/path_payment_strict_send.ts +++ b/src/base/operations/path_payment_strict_send.ts @@ -23,13 +23,13 @@ import { * @see https://developers.stellar.org/docs/start/list-of-operations/#path-payment-strict-send * * @param opts - Options object - * @param opts.sendAsset - asset to pay with - * @param opts.sendAmount - amount of sendAsset to send (excluding fees) - * @param opts.destination - destination account to send to - * @param opts.destAsset - asset the destination will receive - * @param opts.destMin - minimum amount of destAsset to be received - * @param opts.path - array of Asset objects to use as the path - * @param opts.source - The source account for the payment. Defaults to the transaction's source account. + * - `sendAsset`: asset to pay with + * - `sendAmount`: amount of sendAsset to send (excluding fees) + * - `destination`: destination account to send to + * - `destAsset`: asset the destination will receive + * - `destMin`: minimum amount of destAsset to be received + * - `path`: array of Asset objects to use as the path + * - `source`: The source account for the payment. Defaults to the transaction's source account. */ export function pathPaymentStrictSend( opts: PathPaymentStrictSendOpts, diff --git a/src/base/operations/payment.ts b/src/base/operations/payment.ts index bbcef0b5a..a6a47252f 100644 --- a/src/base/operations/payment.ts +++ b/src/base/operations/payment.ts @@ -14,10 +14,10 @@ import { * @see https://developers.stellar.org/docs/start/list-of-operations/#payment * * @param opts - options object - * @param opts.destination - destination account ID - * @param opts.asset - asset to send - * @param opts.amount - amount to send - * @param opts.source - The source account for the payment. + * - `destination`: destination account ID + * - `asset`: asset to send + * - `amount`: amount to send + * - `source`: The source account for the payment. * Defaults to the transaction's source account. */ export function payment(opts: PaymentOpts): xdr.Operation { diff --git a/src/base/operations/restore_footprint.ts b/src/base/operations/restore_footprint.ts index f5c64cbc9..5c0af72d8 100644 --- a/src/base/operations/restore_footprint.ts +++ b/src/base/operations/restore_footprint.ts @@ -15,14 +15,13 @@ import { * * It takes no parameters because the relevant footprint is derived from the * transaction itself. See {@link TransactionBuilder}'s `opts.sorobanData` - * parameter (or {@link TransactionBuilder.setSorobanData} / - * {@link TransactionBuilder.setLedgerKeys}), which is a + * parameter (or {@link TransactionBuilder.setSorobanData}), which is a * {@link xdr.SorobanTransactionData} instance that contains fee data & resource * usage as part of {@link xdr.SorobanTransactionData}. * * * @param opts - an optional set of parameters - * @param opts.source - an optional source account + * - `source`: an optional source account */ export function restoreFootprint( opts: RestoreFootprintOpts = {}, diff --git a/src/base/operations/revoke_sponsorship.ts b/src/base/operations/revoke_sponsorship.ts index 82530ee83..228fa3be8 100644 --- a/src/base/operations/revoke_sponsorship.ts +++ b/src/base/operations/revoke_sponsorship.ts @@ -26,13 +26,15 @@ import { setSourceAccount } from "../util/operations.js"; * Create a "revoke sponsorship" operation for an account. * * @param opts - Options object - * @param opts.account - The sponsored account ID. - * @param opts.source - The source account for the operation. Defaults to the transaction's source account. + * - `account`: The sponsored account ID. + * - `source`: The source account for the operation. Defaults to the transaction's source account. * * @example + * ```ts * const op = Operation.revokeAccountSponsorship({ * account: 'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7' * }); + * ``` */ export function revokeAccountSponsorship( opts: RevokeAccountSponsorshipOpts = {} as RevokeAccountSponsorshipOpts, @@ -61,11 +63,12 @@ export function revokeAccountSponsorship( * Create a "revoke sponsorship" operation for a trustline. * * @param opts - Options object - * @param opts.account - The account ID which owns the trustline. - * @param opts.asset - The trustline asset. - * @param opts.source - The source account for the operation. Defaults to the transaction's source account. + * - `account`: The account ID which owns the trustline. + * - `asset`: The trustline asset. + * - `source`: The source account for the operation. Defaults to the transaction's source account. * * @example + * ```ts * const op = Operation.revokeTrustlineSponsorship({ * account: 'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7', * asset: new StellarBase.LiquidityPoolId( @@ -73,6 +76,7 @@ export function revokeAccountSponsorship( * 'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7' * ) * }); + * ``` */ export function revokeTrustlineSponsorship( opts: RevokeTrustlineSponsorshipOpts = {} as RevokeTrustlineSponsorshipOpts, @@ -112,15 +116,17 @@ export function revokeTrustlineSponsorship( * Create a "revoke sponsorship" operation for an offer. * * @param opts - Options object - * @param opts.seller - The account ID which created the offer. - * @param opts.offerId - The offer ID. - * @param opts.source - The source account for the operation. Defaults to the transaction's source account. + * - `seller`: The account ID which created the offer. + * - `offerId`: The offer ID. + * - `source`: The source account for the operation. Defaults to the transaction's source account. * * @example + * ```ts * const op = Operation.revokeOfferSponsorship({ * seller: 'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7', * offerId: '1234' * }); + * ``` */ export function revokeOfferSponsorship( opts: RevokeOfferSponsorshipOpts = {} as RevokeOfferSponsorshipOpts, @@ -154,15 +160,17 @@ export function revokeOfferSponsorship( * Create a "revoke sponsorship" operation for a data entry. * * @param opts - Options object - * @param opts.account - The account ID which owns the data entry. - * @param opts.name - The name of the data entry. - * @param opts.source - The source account for the operation. Defaults to the transaction's source account. + * - `account`: The account ID which owns the data entry. + * - `name`: The name of the data entry. + * - `source`: The source account for the operation. Defaults to the transaction's source account. * * @example + * ```ts * const op = Operation.revokeDataSponsorship({ * account: 'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7', * name: 'foo' * }); + * ``` */ export function revokeDataSponsorship( opts: RevokeDataSponsorshipOpts = {} as RevokeDataSponsorshipOpts, @@ -196,13 +204,15 @@ export function revokeDataSponsorship( * Create a "revoke sponsorship" operation for a claimable balance. * * @param opts - Options object - * @param opts.balanceId - The sponsored claimable balance ID. - * @param opts.source - The source account for the operation. Defaults to the transaction's source account. + * - `balanceId`: The sponsored claimable balance ID. + * - `source`: The source account for the operation. Defaults to the transaction's source account. * * @example + * ```ts * const op = Operation.revokeClaimableBalanceSponsorship({ * balanceId: '00000000da0d57da7d4850e7fc10d2a9d0ebc731f7afb40574c03395b17d49149b91f5be', * }); + * ``` */ export function revokeClaimableBalanceSponsorship( opts: RevokeClaimableBalanceSponsorshipOpts = {} as RevokeClaimableBalanceSponsorshipOpts, @@ -231,13 +241,15 @@ export function revokeClaimableBalanceSponsorship( * Creates a "revoke sponsorship" operation for a liquidity pool. * * @param opts - Options object. - * @param opts.liquidityPoolId - The sponsored liquidity pool ID in 'hex' string. - * @param opts.source - The source account for the operation. Defaults to the transaction's source account. + * - `liquidityPoolId`: The sponsored liquidity pool ID in 'hex' string. + * - `source`: The source account for the operation. Defaults to the transaction's source account. * * @example + * ```ts * const op = Operation.revokeLiquidityPoolSponsorship({ * liquidityPoolId: 'dd7b1ab831c273310ddbec6f97870aa83c2fbd78ce22aded37ecbf4f3380fac7', * }); + * ``` */ export function revokeLiquidityPoolSponsorship( opts: RevokeLiquidityPoolSponsorshipOpts = {} as RevokeLiquidityPoolSponsorshipOpts, @@ -269,21 +281,23 @@ export function revokeLiquidityPoolSponsorship( * Create a "revoke sponsorship" operation for a signer. * * @param opts - Options object - * @param opts.account - The account ID where the signer sponsorship is being removed from. - * @param opts.signer - The signer whose sponsorship is being removed. Exactly one of the following must be set: - * @param opts.signer.ed25519PublicKey - (optional) The ed25519 public key of the signer. - * @param opts.signer.sha256Hash - (optional) sha256 hash (Buffer or hex string). - * @param opts.signer.preAuthTx - (optional) Hash (Buffer or hex string) of transaction. - * @param opts.signer.ed25519SignedPayload - (optional) Signed payload signer (StrKey P... address). - * @param opts.source - The source account for the operation. Defaults to the transaction's source account. + * - `account`: The account ID where the signer sponsorship is being removed from. + * - `signer`: The signer whose sponsorship is being removed. Exactly one of the following must be set: + * - `signer.ed25519PublicKey`: (optional) The ed25519 public key of the signer. + * - `signer.sha256Hash`: (optional) sha256 hash (Buffer or hex string). + * - `signer.preAuthTx`: (optional) Hash (Buffer or hex string) of transaction. + * - `signer.ed25519SignedPayload`: (optional) Signed payload signer (StrKey P... address). + * - `source`: The source account for the operation. Defaults to the transaction's source account. * * @example + * ```ts * const op = Operation.revokeSignerSponsorship({ * account: 'GDGU5OAPHNPU5UCLE5RDJHG7PXZFQYWKCFOEXSXNMR6KRQRI5T6XXCD7', * signer: { * ed25519PublicKey: 'GCEZWKCA5VLDNRLN3RPRJMRZOX3Z6G5CHCGSNFHEYVXM3XOJMDS674JZ' * } * }) + * ``` */ export function revokeSignerSponsorship( opts: RevokeSignerSponsorshipOpts = {} as RevokeSignerSponsorshipOpts, diff --git a/src/base/operations/set_options.ts b/src/base/operations/set_options.ts index 02985df5f..0aaa4ec05 100644 --- a/src/base/operations/set_options.ts +++ b/src/base/operations/set_options.ts @@ -29,22 +29,22 @@ function weightCheckFunction(value: number, name: string): boolean { * * * @param opts - Options object - * @param opts.inflationDest - Set this account ID as the account's inflation destination. - * @param opts.clearFlags - Bitmap integer for which account flags to clear. - * @param opts.setFlags - Bitmap integer for which account flags to set. - * @param opts.masterWeight - The master key weight. - * @param opts.lowThreshold - The sum weight for the low threshold. - * @param opts.medThreshold - The sum weight for the medium threshold. - * @param opts.highThreshold - The sum weight for the high threshold. - * @param opts.signer - Add or remove a signer from the account. The signer is + * - `inflationDest`: Set this account ID as the account's inflation destination. + * - `clearFlags`: Bitmap integer for which account flags to clear. + * - `setFlags`: Bitmap integer for which account flags to set. + * - `masterWeight`: The master key weight. + * - `lowThreshold`: The sum weight for the low threshold. + * - `medThreshold`: The sum weight for the medium threshold. + * - `highThreshold`: The sum weight for the high threshold. + * - `signer`: Add or remove a signer from the account. The signer is * deleted if the weight is 0. Only one of `ed25519PublicKey`, `sha256Hash`, `preAuthTx` should be defined. - * @param opts.signer.ed25519PublicKey - The ed25519 public key of the signer. - * @param opts.signer.sha256Hash - sha256 hash (Buffer or hex string) of preimage that will unlock funds. Preimage should be used as signature of future transaction. - * @param opts.signer.preAuthTx - Hash (Buffer or hex string) of transaction that will unlock funds. - * @param opts.signer.ed25519SignedPayload - Signed payload signer (ed25519 public key + raw payload) for atomic transaction signature disclosure. - * @param opts.signer.weight - The weight of the new signer (0 to delete or 1-255) - * @param opts.homeDomain - sets the home domain used for reverse federation lookup. - * @param opts.source - The source account (defaults to transaction source). + * - `signer.ed25519PublicKey`: The ed25519 public key of the signer. + * - `signer.sha256Hash`: sha256 hash (Buffer or hex string) of preimage that will unlock funds. Preimage should be used as signature of future transaction. + * - `signer.preAuthTx`: Hash (Buffer or hex string) of transaction that will unlock funds. + * - `signer.ed25519SignedPayload`: Signed payload signer (ed25519 public key + raw payload) for atomic transaction signature disclosure. + * - `signer.weight`: The weight of the new signer (0 to delete or 1-255) + * - `homeDomain`: sets the home domain used for reverse federation lookup. + * - `source`: The source account (defaults to transaction source). * @see [Account flags](https://developers.stellar.org/docs/glossary/accounts/#flags) */ export function setOptions( diff --git a/src/base/operations/set_trustline_flags.ts b/src/base/operations/set_trustline_flags.ts index bd7424038..4d1deee2d 100644 --- a/src/base/operations/set_trustline_flags.ts +++ b/src/base/operations/set_trustline_flags.ts @@ -20,17 +20,17 @@ import { setSourceAccount } from "../util/operations.js"; * * * @param opts - Options object - * @param opts.trustor - the account whose trustline this is - * @param opts.asset - the asset on the trustline - * @param opts.flags - the set of flags to modify - * @param opts.flags.authorized - authorize account to perform + * - `trustor`: the account whose trustline this is + * - `asset`: the asset on the trustline + * - `flags`: the set of flags to modify + * - `flags.authorized`: authorize account to perform * transactions with its credit - * @param opts.flags.authorizedToMaintainLiabilities - authorize + * - `flags.authorizedToMaintainLiabilities`: authorize * account to maintain and reduce liabilities for its credit - * @param opts.flags.clawbackEnabled - stop claimable balances on + * - `flags.clawbackEnabled`: stop claimable balances on * this trustlines from having clawbacks enabled (this flag can only be set * to false!) - * @param opts.source - The source account for the operation. + * - `source`: The source account for the operation. * Defaults to the transaction's source account. * * @see https://github.com/stellar/stellar-protocol/blob/master/core/cap-0035.md#set-trustline-flags-operation diff --git a/src/base/scval.ts b/src/base/scval.ts index 2f86cdb75..faa2be802 100644 --- a/src/base/scval.ts +++ b/src/base/scval.ts @@ -28,23 +28,23 @@ export interface NativeToScValOpts { * * 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 + * - `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 {@link ScInt}) + * - `number` / `bigint` → the smallest possible XDR integer type that will fit + * the input value (if you want a specific type, use {@link ScInt}) * - * - {@link Address} or {@link Contract} -> scvAddress (for contracts and + * - {@link Address} or {@link 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! + * - `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 + * - `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 @@ -56,7 +56,7 @@ export interface NativeToScValOpts { * @param val - a native (or convertible) input value to wrap * @param opts - an optional set of hints around the type of * conversion you'd like to see - * @param opts.type - there is different behavior for different input + * - `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 @@ -79,7 +79,7 @@ export interface NativeToScValOpts { * return an `scvSymbol`, whereas without the type it would have been an * `scvString`. * - * @throws {TypeError} if... + * @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) @@ -91,6 +91,7 @@ export interface NativeToScValOpts { * @see scValToNative * * @example + * ```ts * nativeToScVal(1000); // gives ScValType === scvU64 * nativeToScVal(1000n); // gives ScValType === scvU64 * nativeToScVal(1n << 100n); // gives ScValType === scvU128 @@ -116,8 +117,10 @@ export interface NativeToScValOpts { * // [ scvSymbol, scvI128 ], * // [ scvString, scvArray ] * // ] + * ``` * * @example + * ```ts * import { * nativeToScVal, * scValToNative, @@ -153,6 +156,7 @@ export interface NativeToScValOpts { * * // Similarly, the inverse should work: * scValToNative(scv) == gigaMap; // true + * ``` */ export function nativeToScVal( val: unknown, @@ -348,15 +352,16 @@ export function nativeToScVal( * 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, + * - `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 diff --git a/src/base/soroban.ts b/src/base/soroban.ts index 0c779344a..c1aad664a 100644 --- a/src/base/soroban.ts +++ b/src/base/soroban.ts @@ -1,4 +1,4 @@ -/** Helper class to assist with formatting and parsing token amounts. */ +/** Helper class to assist with formatting and parsing token amounts.*/ export class Soroban { /** * Given a whole number smart contract amount of a token and an amount of @@ -10,11 +10,13 @@ export class Soroban { * @param amount - the token amount you want to display * @param decimals - specify how many decimal places a token has * - * @throws {TypeError} if the given amount has a decimal point already + * @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"; + * ``` */ static formatTokenAmount(amount: string, decimals: number): string { if (amount.includes(".")) { @@ -61,9 +63,11 @@ export class Soroban { * might not be present) * * @example + * ```ts * const displayValueAmount = "123.4560" * const parsedAmtForSmartContract = parseTokenAmount(displayValueAmount, 5); * parsedAmtForSmartContract === "12345600" + * ``` */ static parseTokenAmount(value: string, decimals: number): string { const [whole, fraction, ...rest] = value.split(".").slice(); diff --git a/src/base/sorobandata_builder.ts b/src/base/sorobandata_builder.ts index f25c94e2a..6dc4a62e0 100644 --- a/src/base/sorobandata_builder.ts +++ b/src/base/sorobandata_builder.ts @@ -12,6 +12,7 @@ export type IntLike = bigint | number | string; * (re)building the entire data structure from scratch. * * @example + * ```ts * // You want to use an existing data blob but override specific parts. * const newData = new SorobanDataBuilder(existing) * .setReadOnly(someLedgerKeys) @@ -23,6 +24,7 @@ export type IntLike = bigint | number | string; * .setFootprint([someLedgerKey], []) * .setResourceFee("1000") * .build(); + * ``` */ export class SorobanDataBuilder { private _data: xdr.SorobanTransactionData; diff --git a/src/base/transaction.ts b/src/base/transaction.ts index 3e2f629ea..d0734371e 100644 --- a/src/base/transaction.ts +++ b/src/base/transaction.ts @@ -17,7 +17,7 @@ import { OperationRecord } from "./operations/types.js"; * TransactionBuilder.fromXDR}. * * Once a Transaction has been created, its attributes and operations should not - * be changed. You should only add signatures (using {@link Transaction#sign}) + * be changed. You should only add signatures (using {@link Transaction.sign}) * to a Transaction object before submitting to the network or forwarding on to * additional signers. * @@ -312,7 +312,7 @@ export class Transaction extends TransactionBase< * * @param opIndex - the index of the CreateClaimableBalance op * - * @throws {Error} for invalid `opIndex` value, if op at `opIndex` is not + * @throws for invalid `opIndex` value, if op at `opIndex` is not * `CreateClaimableBalance`, or for general XDR un/marshalling failures * * @see https://github.com/stellar/go/blob/d712346e61e288d450b0c08038c158f8848cc3e4/txnbuild/transaction.go#L392-L435 diff --git a/src/base/transaction_base.ts b/src/base/transaction_base.ts index 97e2f32d1..b382466e0 100644 --- a/src/base/transaction_base.ts +++ b/src/base/transaction_base.ts @@ -3,7 +3,7 @@ import { hash } from "./hashing.js"; import { Keypair } from "./keypair.js"; /** - * @ignore + * @internal */ export class TransactionBase< TTx extends xdr.FeeBumpTransaction | xdr.Transaction | xdr.TransactionV0, @@ -46,7 +46,7 @@ export class TransactionBase< * Returns a defensive copy so that external mutations cannot alter the * transaction that will be signed or serialized. * - * @throws {Error} if the internal transaction is not a recognized XDR type + * @throws if the internal transaction is not a recognized XDR type */ get tx(): TTx { const buf = this._tx.toXDR(); @@ -106,7 +106,7 @@ export class TransactionBase< /** * Signs a transaction with the given {@link Keypair}. Useful if someone sends * you a transaction XDR for you to sign and return (see - * [addSignature](#addSignature) for more information). + * `{@link Transaction.addSignature | addSignature}` for more information). * * When you get a transaction XDR to sign.... * - Instantiate a `Transaction` object with the XDR @@ -145,9 +145,9 @@ export class TransactionBase< * 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. + * for `{@link Transaction.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 + * from `{@link Transaction.getKeypairSignature | getKeypairSignature}`, both of which you pass to * this function. * * @param publicKey - the public key of the signer diff --git a/src/base/transaction_builder.ts b/src/base/transaction_builder.ts index f03b51065..cd151efac 100644 --- a/src/base/transaction_builder.ts +++ b/src/base/transaction_builder.ts @@ -29,16 +29,16 @@ const UINT32_MAX = 4294967295; // 2^32 - 1 /** * 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 {@link - * Server#fetchBaseFee} to get an accurate value of minimum transaction - * fee on the network. + * transaction, the greater the required fee. Use + * {@link Horizon.Server.fetchBaseFee} to get an accurate value of minimum + * transaction fee on the network. * * @see [Fees](https://developers.stellar.org/docs/glossary/fees/) */ export const BASE_FEE = "100"; // Stroops /** - * @see {@link TransactionBuilder#setTimeout} + * @see {@link TransactionBuilder.setTimeout} * @see [Timeout](https://developers.stellar.org/api/resources/transactions/post/) */ export const TimeoutInfinite = 0; @@ -111,8 +111,8 @@ export interface TransactionBuilderOptions { *

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 `{@link - * Transaction}` that can be signed. The returned transaction will contain the + * method on the `TransactionBuilder` to return a fully constructed + * {@link 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.

* @@ -267,15 +267,15 @@ export class TransactionBuilder { * * @param tx - a "template" transaction to clone exactly * @param opts - additional options to override the clone, e.g. - * {fee: '1000'} will override the existing base fee derived from `tx` (see - * the {@link TransactionBuilder} constructor for detailed options) + * `{fee: '1000'}` will override the existing base fee derived from `tx` + * (see the {@link TransactionBuilder} constructor for detailed options) * - * @warning This does not clone the transaction's - * {@link xdr.SorobanTransactionData} (if applicable), use - * {@link SorobanDataBuilder} and {@link TransactionBuilder.setSorobanData} - * as needed, instead.. + * **Warning:** This does not clone the transaction's + * {@link xdr.SorobanTransactionData} (if applicable), use + * {@link SorobanDataBuilder} and {@link TransactionBuilder.setSorobanData} + * as needed, instead. * - * @todo This cannot clone {@link FeeBumpTransaction}s, yet. + * TODO: This cannot clone {@link FeeBumpTransaction}s, yet. */ static cloneFrom( tx: Transaction, @@ -401,15 +401,15 @@ export class TransactionBuilder { * 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 {@link - * TimeBounds} with `maxTime` on the transaction (this is what `setTimeout` + * 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 - * `{@link TimeoutInfinite}`. In general you should set `{@link - * TimeoutInfinite}` only in smart contracts. + * {@link TimeoutInfinite}. In general you should set + * {@link 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 @@ -546,7 +546,7 @@ export class TransactionBuilder { * If you want to prepare a transaction which will be valid only while the * account sequence number is * - * minAccountSequence <= sourceAccountSequence < tx.seqNum + * `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` @@ -554,8 +554,8 @@ export class TransactionBuilder { * * @param minAccountSequence - 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`. + * default), the transaction is valid when `sourceAccount`'s sequence + * number `== tx.seqNum - 1`. */ setMinAccountSequence(minAccountSequence: string): TransactionBuilder { if (this.minAccountSequence !== null) { @@ -678,7 +678,7 @@ export class TransactionBuilder { * @param sorobanData - the {@link xdr.SorobanTransactionData} as a raw xdr * object or a base64 string to be decoded * - * @see {SorobanDataBuilder} + * @see {@link SorobanDataBuilder} */ setSorobanData( sorobanData: xdr.SorobanTransactionData | string, @@ -1081,11 +1081,11 @@ export class TransactionBuilder { * Stellar network (e.g. "Public Global Stellar Network ; September 2015", * see {@link Networks}) * - * @todo Alongside the next major version bump, this type signature can be + * 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. + * Your fee-bump amount should be `>= 10x` the original fee. * @see https://developers.stellar.org/docs/glossary/fee-bumps/#replace-by-fee */ static buildFeeBumpTransaction( diff --git a/src/base/util/continued_fraction.ts b/src/base/util/continued_fraction.ts index fce483082..6b9911a7e 100644 --- a/src/base/util/continued_fraction.ts +++ b/src/base/util/continued_fraction.ts @@ -8,7 +8,7 @@ const MAX_INT_BN = new CustomBigNumber(MAX_INT); * number as `[n, d]` where `n` is the numerator and `d` is the denominator. * * @param rawNumber - real number to approximate - * @throws {Error} when the best rational approximation cannot be found + * @throws when the best rational approximation cannot be found */ export function best_r( rawNumber: BigNumber | number | string, diff --git a/src/base/util/operations.ts b/src/base/util/operations.ts index a4fc549c7..7bc55ca07 100644 --- a/src/base/util/operations.ts +++ b/src/base/util/operations.ts @@ -7,7 +7,7 @@ import CustomBigNumber from "./bignumber.js"; export const ONE = 10000000; const MAX_INT64 = "9223372036854775807"; -/** Sets the source account on the operation attributes from the opts. */ +/** Sets the source account on the operation attributes from the opts.*/ export function setSourceAccount( opAttributes: OperationAttributes, opts: { source?: string }, @@ -169,7 +169,7 @@ export function isValidAmount(value: unknown, allowZero = false): boolean { return true; } -/** Returns a standard error message for invalid amount arguments. */ +/** Returns a standard error message for invalid amount arguments.*/ export function constructAmountRequirementsError(arg: string): string { return `${arg} argument must be of type String, represent a positive number and have at most 7 digits after the decimal`; } diff --git a/src/bindings/generator.ts b/src/bindings/generator.ts index 4b8b719c0..826de3c77 100644 --- a/src/bindings/generator.ts +++ b/src/bindings/generator.ts @@ -9,11 +9,12 @@ import { Server } from "../rpc/index.js"; /** * Options for generating TypeScript bindings. - * - * @property contractName - The name used for the generated package and client class. - * Should be in kebab-case (e.g., "my-contract"). */ export type GenerateOptions = { + /** + * The name used for the generated package and client class. + * Should be in kebab-case (e.g., "my-contract"). + */ contractName: string; }; @@ -22,22 +23,21 @@ export type GenerateOptions = { * * Contains all generated TypeScript source files and configuration files * needed to create a standalone npm package for interacting with a Stellar contract. - * - * @property index - The index.ts barrel export file that re-exports Client and types - * @property types - The types.ts file containing TypeScript interfaces for contract structs, enums, and unions - * @property client - The client.ts file containing the generated Client class with typed methods - * @property packageJson - The package.json for the generated npm package - * @property tsConfig - The tsconfig.json for TypeScript compilation - * @property readme - The README.md with usage documentation - * @property gitignore - The .gitignore file for the generated package */ export type GeneratedBindings = { + /** The index.ts barrel export file that re-exports Client and types */ index: string; + /** The types.ts file containing TypeScript interfaces for contract structs, enums, and unions */ types: string; + /** The client.ts file containing the generated Client class with typed methods */ client: string; + /** The package.json for the generated npm package */ packageJson: string; + /** The tsconfig.json for TypeScript compilation */ tsConfig: string; + /** The README.md with usage documentation */ readme: string; + /** The .gitignore file for the generated package */ gitignore: string; }; @@ -49,12 +49,15 @@ export type GeneratedBindings = { * and compile-time type checking. * * @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", @@ -62,12 +65,15 @@ export type GeneratedBindings = { * 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" }); + * ``` */ export class BindingGenerator { private spec: Spec; @@ -91,8 +97,10 @@ export class BindingGenerator { * @returns A new BindingGenerator instance * * @example + * ```ts * const spec = new Spec(specEntries); * const generator = BindingGenerator.fromSpec(spec); + * ``` */ static fromSpec(spec: Spec): BindingGenerator { return new BindingGenerator(spec); @@ -106,11 +114,13 @@ export class BindingGenerator { * * @param wasmBuffer - The raw WASM binary as a Buffer * @returns A Promise resolving to a new BindingGenerator instance - * @throws {Error} If the WASM file doesn't contain a valid contract spec + * @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); + * ``` */ static fromWasm(wasmBuffer: Buffer): BindingGenerator { const spec = new Spec(specFromWasm(wasmBuffer)); @@ -127,14 +137,16 @@ export class BindingGenerator { * @param wasmHash - The hex-encoded hash of the installed WASM blob * @param rpcServer - The Stellar RPC server instance * @returns A Promise resolving to a new BindingGenerator instance - * @throws {Error} If the WASM cannot be fetched or doesn't contain a valid spec + * @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 * ); + * ``` */ static async fromWasmHash( wasmHash: string, @@ -157,13 +169,15 @@ export class BindingGenerator { * @param contractId - The contract ID (C... address) of the deployed contract * @param rpcServer - The Stellar RPC server instance * @returns A Promise resolving to a new BindingGenerator instance - * @throws {Error} If the contract cannot be found or fetched + * @throws If the contract cannot be found or fetched * * @example + * ```ts * const generator = await BindingGenerator.fromContractId( * "CABC123...XYZ", * rpcServer * ); + * ``` */ static async fromContractId( contractId: string, @@ -191,11 +205,12 @@ export class BindingGenerator { * to write files as needed. * * @param options - Configuration options for generation - * @param options.contractName - Required. The name for the generated package (kebab-case recommended) + * - `contractName`: Required. The name for the generated package (kebab-case recommended) * @returns An object containing all generated file contents as strings - * @throws {Error} If contractName is missing or empty + * @throws If contractName is missing or empty * * @example + * ```ts * const bindings = generator.generate({ * contractName: "my-token", * contractAddress: "CABC...XYZ", @@ -206,6 +221,7 @@ export class BindingGenerator { * // Write files to disk * fs.writeFileSync("./src/client.ts", bindings.client); * fs.writeFileSync("./src/types.ts", bindings.types); + * ``` */ generate(options: GenerateOptions): GeneratedBindings { this.validateOptions(options); @@ -241,7 +257,7 @@ export class BindingGenerator { * Validates that required generation options are provided. * * @param options - The options to validate - * @throws {Error} If contractName is missing or empty + * @throws If contractName is missing or empty */ private validateOptions(options: GenerateOptions): void { if (!options.contractName || options.contractName.trim() === "") { diff --git a/src/config.ts b/src/config.ts index 6fd210606..39c63070d 100644 --- a/src/config.ts +++ b/src/config.ts @@ -4,12 +4,12 @@ export interface Configuration { /** * Allow connecting to http servers. This must be set to false in production deployments! - * @default false + * @defaultValue false */ allowHttp: boolean; /** * Allow a timeout. Allows user to avoid nasty lag due network issues. - * @default 0 + * @defaultValue 0 */ timeout: number; } @@ -23,22 +23,25 @@ let config = { ...defaultConfig }; /** * Global config class. - * @hideconstructor - * @example Usage in node + * @example Usage in node + * ```ts * import { Config } from '@stellar/stellar-sdk'; * Config.setAllowHttp(true); * Config.setTimeout(5000); - * @example Usage in the browser + * ``` + * + * @example Usage in the browser + * ```ts * StellarSdk.Config.setAllowHttp(true); * StellarSdk.Config.setTimeout(5000); + * ``` */ class Config { /** * Sets `allowHttp` flag globally. When set to `true`, connections to insecure * http protocol servers will be allowed. Must be set to `false` in * production. - * @default false - * @static + * @defaultValue false */ public static setAllowHttp(value: boolean): void { config.allowHttp = value; @@ -47,8 +50,7 @@ class Config { /** * Sets `timeout` flag globally. When set to anything besides 0, the request * will timeout after specified time (ms). - * @default 0 - * @static + * @defaultValue 0 */ public static setTimeout(value: number): void { config.timeout = value; @@ -56,8 +58,7 @@ class Config { /** * Returns the configured `allowHttp` flag. - * @static - * @returns {boolean} The allowHttp value. + * @returns The allowHttp value. */ public static isAllowHttp(): boolean { return config.allowHttp; @@ -65,7 +66,7 @@ class Config { /** * Returns the configured `timeout` flag. - * @returns {number} The timeout value. + * @returns The timeout value. */ public static getTimeout(): number { return config.timeout; @@ -73,7 +74,6 @@ class Config { /** * Sets all global config flags to default values. - * @static */ public static setDefault(): void { config = { ...defaultConfig }; diff --git a/src/content.config.ts b/src/content.config.ts new file mode 100644 index 000000000..f6ba8237c --- /dev/null +++ b/src/content.config.ts @@ -0,0 +1,10 @@ +import { defineCollection } from "astro:content"; +import { glob } from "astro/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; + +export const collections = { + docs: defineCollection({ + loader: glob({ base: "./docs", pattern: "**/*.md" }), + schema: docsSchema(), + }), +}; diff --git a/src/contract/assembled_transaction.ts b/src/contract/assembled_transaction.ts index 4289b190e..d5d3347b1 100644 --- a/src/contract/assembled_transaction.ts +++ b/src/contract/assembled_transaction.ts @@ -48,8 +48,6 @@ import { UserRejectedError, } from "./errors.js"; -/** @module contract */ - /** * The main workhorse of {@link Client}. This class is used to wrap a * transaction-under-construction and provide high-level interfaces to the most @@ -58,8 +56,8 @@ import { * * 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 + * 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 @@ -226,8 +224,8 @@ import { * const tx = swapClient.txFromJSON(json) * ``` * - * Or, if you're using a client generated with `soroban contract bindings - * typescript`, this deserialization will look like: + * 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) @@ -251,14 +249,13 @@ import { * * To see an even more complicated example, where Alice swaps with Bob but the * transaction is invoked by yet another party, check out - * [test-swap.js](../../test/e2e/src/test-swap.js). + * [test-swap.js](https://github.com/stellar/js-stellar-sdk/blob/master/test/e2e/src/test-swap.js). * - * @memberof module:contract */ export class AssembledTransaction { /** - * The TransactionBuilder as constructed in `{@link - * AssembledTransaction}.build`. Feel free set `simulate: false` to modify + * The TransactionBuilder as constructed in + * {@link AssembledTransaction}.build. Feel free set `simulate: false` to modify * this object before calling `tx.simulate()` manually. Example: * * ```ts @@ -296,7 +293,7 @@ export class AssembledTransaction { /** * Cached simulation result. This is set after the first call to - * {@link AssembledTransaction#simulationData}, and is used to facilitate + * {@link AssembledTransaction.simulationData}, and is used to facilitate * serialization and deserialization of the AssembledTransaction. * * Most of the time, if you need this data, you can call @@ -309,7 +306,7 @@ export class AssembledTransaction { /** * Cached simulation transaction data. This is set after the first call to - * {@link AssembledTransaction#simulationData}, and is used to facilitate + * {@link AssembledTransaction.simulationData}, and is used to facilitate * serialization and deserialization of the AssembledTransaction. * * Most of the time, if you need this data, you can call @@ -563,10 +560,12 @@ export class AssembledTransaction { * can use {@link AssembledTransaction.buildWithOp} instead. * * @example + * ```ts * const tx = await AssembledTransaction.build({ * ..., * simulate: false, * }) + * ``` */ static build( options: AssembledTransactionOptions, @@ -587,6 +586,7 @@ export class AssembledTransaction { * Soroban Smart Contracts like `invokeHostFunction` and `createCustomContract`. * * @example + * ```ts * const tx = await AssembledTransaction.buildWithOp( * Operation.createCustomContract({ ... }); * { @@ -594,6 +594,7 @@ export class AssembledTransaction { * simulate: false, * } * ) + * ``` */ static async buildWithOp( operation: xdr.Operation, @@ -915,7 +916,7 @@ export class AssembledTransaction { * 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 - * {@link AssembledTransaction#signAuthEntries}. Then re-serialize and send to + * {@link AssembledTransaction.signAuthEntries}. Then re-serialize and send to * the next account in this list. */ needsNonInvokerSigningBy = ({ @@ -965,7 +966,7 @@ export class AssembledTransaction { }; /** - * If {@link AssembledTransaction#needsNonInvokerSigningBy} returns a + * If {@link 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 @@ -973,8 +974,8 @@ export class AssembledTransaction { * * 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 {@link AssembledTransaction#sign} - * the transaction envelope and {@link AssembledTransaction#send} it to the + * who simulated the transaction so they can {@link AssembledTransaction.sign} + * the transaction envelope and {@link AssembledTransaction.send} it to the * network. * * Sending to all `needsNonInvokerSigningBy` owners in parallel is not @@ -1110,9 +1111,9 @@ export class AssembledTransaction { * - The provided `restorePreamble` should include a minimum resource fee and valid * transaction data. * - * @throws {Error} - Throws an error if no `signTransaction` function is provided during + * @throws - Throws an error if no `signTransaction` function is provided during * Client initialization. - * @throws {RestoreFailureError} - Throws a custom error if the + * @throws - Throws a custom error if the * restore transaction fails, providing the details of the failure. */ async restoreFootprint( diff --git a/src/contract/basic_node_signer.ts b/src/contract/basic_node_signer.ts index cc15a8a8a..265ffcca6 100644 --- a/src/contract/basic_node_signer.ts +++ b/src/contract/basic_node_signer.ts @@ -3,16 +3,15 @@ import type { Client } from "./client.js"; import type { SignAuthEntry, SignTransaction } from "./types.js"; /** - * For use with {@link Client} and {@link module:contract.AssembledTransaction}. + * For use with {@link Client} and {@link contract.AssembledTransaction}. * Implements `signTransaction` and `signAuthEntry` with signatures expected by * those classes. This is useful for testing and maybe some simple Node * applications. Feel free to use this as a starting point for your own * Wallet/TransactionSigner implementation. * - * @memberof module:contract * - * @param {Keypair} keypair {@link Keypair} to use to sign the transaction or auth entry - * @param {string} networkPassphrase passphrase of network to sign for + * @param keypair - {@link Keypair} to use to sign the transaction or auth entry + * @param networkPassphrase - passphrase of network to sign for */ export const basicNodeSigner = ( keypair: Keypair, diff --git a/src/contract/client.ts b/src/contract/client.ts index 627d4eda1..b2fb80fe2 100644 --- a/src/contract/client.ts +++ b/src/contract/client.ts @@ -26,15 +26,13 @@ async function specFromWasmHash( * Generate a class from the contract spec that where each contract method * gets included with an identical name. * - * Each method returns an {@link module:contract.AssembledTransaction | AssembledTransaction} that can + * Each method returns an {@link contract.AssembledTransaction | AssembledTransaction} that can * be used to modify, simulate, decode results, and possibly sign, & submit the * transaction. * - * @memberof module:contract * - * @class - * @param {module:contract.Spec} spec {@link Spec} to construct a Client for - * @param {module:contract.ClientOptions} options see {@link ClientOptions} + * @param spec - {@link Spec} to construct a Client for + * @param options - see {@link ClientOptions} */ export class Client { static async deploy( @@ -141,11 +139,11 @@ export class Client { * Generates a Client instance from the provided ClientOptions and the contract's wasm hash. * The wasmHash can be provided in either hex or base64 format. * - * @param {Buffer | string} wasmHash The hash of the contract's wasm binary, in either hex or base64 format. - * @param {ClientOptions} options The ClientOptions object containing the necessary configuration, including the rpcUrl. - * @param {('hex' | 'base64')} [format='hex'] The format of the provided wasmHash, either "hex" or "base64". Defaults to "hex". - * @returns {Promise} A Promise that resolves to a Client instance. - * @throws {TypeError} If the provided options object does not contain an rpcUrl. + * @param wasmHash - The hash of the contract's wasm binary, in either hex or base64 format. + * @param options - The ClientOptions object containing the necessary configuration, including the rpcUrl. + * @param format - (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. */ static async fromWasmHash( wasmHash: Buffer | string, @@ -170,10 +168,10 @@ export class Client { /** * Generates a Client instance from the provided ClientOptions and the contract's wasm binary. * - * @param {Buffer} wasm The contract's wasm binary as a Buffer. - * @param {ClientOptions} options The ClientOptions object containing the necessary configuration. - * @returns {Promise} A Promise that resolves to a Client instance. - * @throws {Error} If the contract spec cannot be obtained from the provided wasm binary. + * @param wasm - The contract's wasm binary as a Buffer. + * @param options - The ClientOptions object containing the necessary configuration. + * @returns A Promise that resolves to a Client instance. + * @throws If the contract spec cannot be obtained from the provided wasm binary. */ static async fromWasm(wasm: Buffer, options: ClientOptions): Promise { const spec = await Spec.fromWasm(wasm); @@ -183,9 +181,9 @@ export class Client { /** * Generates a Client instance from the provided ClientOptions, which must include the contractId and rpcUrl. * - * @param {ClientOptions} options The ClientOptions object containing the necessary configuration, including the contractId and rpcUrl. - * @returns {Promise} A Promise that resolves to a Client instance. - * @throws {TypeError} If the provided options object does not contain both rpcUrl and contractId. + * @param options - 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. */ static async from(options: ClientOptions): Promise { if (!options || !options.rpcUrl || !options.contractId) { diff --git a/src/contract/rust_result.ts b/src/contract/rust_result.ts index 1a9e736b8..000cdfe30 100644 --- a/src/contract/rust_result.ts +++ b/src/contract/rust_result.ts @@ -8,8 +8,8 @@ * * #### Why is this needed? * - * This is used by {@link module:contract.Spec | `ContractSpec`} and - * {@link module:contract.AssembledTransaction | `AssembledTransaction`} when + * This is used by {@link contract.Spec | `ContractSpec`} and + * {@link contract.AssembledTransaction | `AssembledTransaction`} when * parsing values return by contracts. * * Contract methods can be implemented to return simple values, in which case @@ -32,7 +32,6 @@ * remove this and flatten all JS calls to `try...catch`. Easier to remove this * logic later than it would be to add it. * - * @memberof module:contract */ export interface Result { unwrap(): T; @@ -43,23 +42,22 @@ export interface Result { /** * Error interface containing the error message. Matches Rust's implementation. - * Part of implementing {@link module:contract.Result | Result}, a minimal + * Part of implementing {@link contract.Result | Result}, a minimal * implementation of Rust's `Result` type. Used for contract methods that return * Results, to maintain their distinction from methods that simply either return * a value or throw. * - * @memberof module:contract */ export interface ErrorMessage { message: string; } /** - * Part of implementing {@link module:contract.Result | Result}, a minimal + * Part of implementing {@link contract.Result | Result}, a minimal * implementation of Rust's `Result` type. Used for contract methods that return * Results, to maintain their distinction from methods that simply either return * a value or throw. - * @private + * @internal */ export class Ok implements Result { constructor(readonly value: T) {} @@ -82,11 +80,11 @@ export class Ok implements Result { } /** - * Part of implementing {@link module:contract.Result | Result}, a minimal + * Part of implementing {@link contract.Result | Result}, a minimal * implementation of Rust's `Result` type. Used for contract methods that return * Results, to maintain their distinction from methods that simply either return * a value or throw. - * @private + * @internal */ export class Err implements Result { constructor(readonly error: E) {} diff --git a/src/contract/sent_transaction.ts b/src/contract/sent_transaction.ts index 2508b83e6..2bb3a92b0 100644 --- a/src/contract/sent_transaction.ts +++ b/src/contract/sent_transaction.ts @@ -21,11 +21,9 @@ import type { AssembledTransaction } from "./assembled_transaction.js"; * `getTransactionResponseAll` and the most recent attempt in * `getTransactionResponse`. * - * @memberof module:contract - * @class * - * @param {Function} signTransaction More info in {@link MethodOptions} - * @param {module:contract.AssembledTransaction} assembled {@link AssembledTransaction} from which this SentTransaction was initialized + * @param signTransaction - More info in {@link MethodOptions} + * @param assembled - {@link AssembledTransaction} from which this SentTransaction was initialized */ export class SentTransaction { public server: Server; diff --git a/src/contract/spec.ts b/src/contract/spec.ts index 5be08f905..4e91d6eb0 100644 --- a/src/contract/spec.ts +++ b/src/contract/spec.ts @@ -189,9 +189,9 @@ const PRIMITIVE_DEFINITONS: { [key: string]: JSONSchema7Definition } = { /** * Converts an XDR type definition to a JSON schema reference. - * @param typeDef type to convert to json schema reference - * @returns {JSONSchema7} a schema describing the type - * @private + * @param typeDef - type to convert to json schema reference + * @returns a schema describing the type + * @internal */ function typeRef(typeDef: xdr.ScSpecTypeDef): JSONSchema7 { const t = typeDef.switch(); @@ -464,11 +464,11 @@ function unionToJsonSchema(udt: xdr.ScSpecUdtUnionV0): any { * * Constructs a new ContractSpec from an array of XDR spec entries. * - * @memberof module:contract - * @param {xdr.ScSpecEntry[] | string[]} entries the XDR spec entries - * @throws {Error} if entries is invalid + * @param entries - the XDR spec entries + * @throws if entries is invalid * * @example + * ```ts * const specEntries = [...]; // XDR spec entries of a smart contract * const contractSpec = new ContractSpec(specEntries); * @@ -486,6 +486,7 @@ function unionToJsonSchema(udt: xdr.ScSpecUdtUnionV0): any { * const result = contractSpec.funcResToNative('funcName', resultScv); * * console.log(result); // {success: true} + * ``` */ export class Spec { /** @@ -496,9 +497,9 @@ export class Spec { /** * Generates a Spec instance from the contract's wasm binary. * - * @param {Buffer} wasm The contract's wasm binary as a Buffer. - * @returns {Promise} A Promise that resolves to a Spec instance. - * @throws {Error} If the contract spec cannot be obtained from the provided wasm binary. + * @param wasm - 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. */ static fromWasm(wasm: Buffer): Spec { const spec = specFromWasm(wasm); @@ -513,8 +514,8 @@ export class Spec { * - An array of xdr.ScSpecEntry. * - An array of base64 XDR encoded xdr.ScSpecEntry. * - * @returns {Promise} A Promise that resolves to a Client instance. - * @throws {Error} If the contract spec cannot be obtained from the provided wasm binary. + * @returns A Promise that resolves to a Client instance. + * @throws If the contract spec cannot be obtained from the provided wasm binary. */ constructor(entries: Buffer | string | xdr.ScSpecEntry[] | string[]) { if (Buffer.isBuffer(entries)) { @@ -538,7 +539,7 @@ export class Spec { /** * Gets the XDR functions from the spec. - * @returns {xdr.ScSpecFunctionV0[]} all contract functions + * @returns all contract functions */ funcs(): xdr.ScSpecFunctionV0[] { return this.entries @@ -553,10 +554,10 @@ export class Spec { /** * Gets the XDR function spec for the given function name. * - * @param {string} name the name of the function - * @returns {xdr.ScSpecFunctionV0} the function spec + * @param name - the name of the function + * @returns the function spec * - * @throws {Error} if no function with the given name exists + * @throws if no function with the given name exists */ getFunc(name: string): xdr.ScSpecFunctionV0 { const entry = this.findEntry(name); @@ -571,18 +572,20 @@ export class Spec { /** * Converts native JS arguments to ScVals for calling a contract function. * - * @param {string} name the name of the function - * @param {object} args the arguments object - * @returns {xdr.ScVal[]} the converted arguments + * @param name - the name of the function + * @param args - the arguments object + * @returns the converted arguments * - * @throws {Error} if argument is missing or incorrect type + * @throws if argument is missing or incorrect type * * @example + * ```ts * const args = { * arg1: 'value1', * arg2: 1234 * }; * const scArgs = contractSpec.funcArgsToScVals('funcName', args); + * ``` */ funcArgsToScVals(name: string, args: object): xdr.ScVal[] { const fn = this.getFunc(name); @@ -594,15 +597,17 @@ export class Spec { /** * Converts the result ScVal of a function call to a native JS value. * - * @param {string} name the name of the function - * @param {xdr.ScVal | string} val_or_base64 the result ScVal or base64 encoded string - * @returns {any} the converted native value + * @param name - the name of the function + * @param val_or_base64 - the result ScVal or base64 encoded string + * @returns the converted native value * - * @throws {Error} if return type mismatch or invalid input + * @throws if return type mismatch or invalid input * * @example + * ```ts * const resultScv = 'AAA=='; // Base64 encoded ScVal * const result = contractSpec.funcResToNative('funcName', resultScv); + * ``` */ funcResToNative(name: string, val_or_base64: xdr.ScVal | string): any { const val = @@ -634,10 +639,10 @@ export class Spec { /** * Finds the XDR spec entry for the given name. * - * @param {string} name the name to find - * @returns {xdr.ScSpecEntry} the entry + * @param name - the name to find + * @returns the entry * - * @throws {Error} if no entry with the given name exists + * @throws if no entry with the given name exists */ findEntry(name: string): xdr.ScSpecEntry { const entry = this.entries.find( @@ -652,11 +657,11 @@ export class Spec { /** * Converts a native JS value to an ScVal based on the given type. * - * @param {any} val the native JS value - * @param {xdr.ScSpecTypeDef} [ty] the expected type - * @returns {xdr.ScVal} the converted ScVal + * @param val - the native JS value + * @param ty - (optional) the expected type + * @returns the converted ScVal * - * @throws {Error} if value cannot be converted to the given type + * @throws if value cannot be converted to the given type */ nativeToScVal(val: any, ty: xdr.ScSpecTypeDef): xdr.ScVal { const t: xdr.ScSpecType = ty.switch(); @@ -958,11 +963,11 @@ export class Spec { /** * Converts an base64 encoded ScVal back to a native JS value based on the given type. * - * @param {string} scv the base64 encoded ScVal - * @param {xdr.ScSpecTypeDef} typeDef the expected type - * @returns {any} the converted native JS value + * @param scv - the base64 encoded ScVal + * @param typeDef - the expected type + * @returns the converted native JS value * - * @throws {Error} if ScVal cannot be converted to the given type + * @throws if ScVal cannot be converted to the given type */ scValStrToNative(scv: string, typeDef: xdr.ScSpecTypeDef): T { return this.scValToNative(xdr.ScVal.fromXDR(scv, "base64"), typeDef); @@ -971,11 +976,11 @@ export class Spec { /** * Converts an ScVal back to a native JS value based on the given type. * - * @param {xdr.ScVal} scv the ScVal - * @param {xdr.ScSpecTypeDef} typeDef the expected type - * @returns {any} the converted native JS value + * @param scv - the ScVal + * @param typeDef - the expected type + * @returns the converted native JS value * - * @throws {Error} if ScVal cannot be converted to the given type + * @throws if ScVal cannot be converted to the given type */ scValToNative(scv: xdr.ScVal, typeDef: xdr.ScSpecTypeDef): T { const t = typeDef.switch(); @@ -1187,10 +1192,10 @@ export class Spec { * * If `funcName` is provided, the schema will be a reference to the function schema. * - * @param {string} [funcName] the name of the function to convert - * @returns {JSONSchema7} the converted JSON schema + * @param funcName - (optional) the name of the function to convert + * @returns the converted JSON schema * - * @throws {Error} if the contract spec is invalid + * @throws if the contract spec is invalid */ jsonSchema(funcName?: string): JSONSchema7 { const definitions: { [key: string]: JSONSchema7Definition } = {}; diff --git a/src/contract/types.ts b/src/contract/types.ts index 333f9ced5..210da9ef0 100644 --- a/src/contract/types.ts +++ b/src/contract/types.ts @@ -8,64 +8,52 @@ import { Server } from "../rpc/index.js"; export type XDR_BASE64 = string; /** * An unsigned 32-bit integer. - * @memberof module:contract */ export type u32 = number; /** * A signed 32-bit integer. - * @memberof module:contract */ export type i32 = number; /** * An unsigned 64-bit integer. - * @memberof module:contract */ export type u64 = bigint; /** * A signed 64-bit integer. - * @memberof module:contract */ export type i64 = bigint; /** * An unsigned 128-bit integer. - * @memberof module:contract */ export type u128 = bigint; /** * A signed 128-bit integer. - * @memberof module:contract */ export type i128 = bigint; /** * An unsigned 256-bit integer. - * @memberof module:contract */ export type u256 = bigint; /** * A signed 256-bit integer. - * @memberof module:contract */ export type i256 = bigint; export type Option = T | undefined; /** * @deprecated Use {@link Timepoint} instead. - * @memberof module:contract */ export type Typepoint = bigint; /** * An unsigned 64-bit integer. - * @memberof module:contract */ export type Timepoint = bigint; /** * An unsigned 64-bit integer. - * @memberof module:contract */ export type Duration = bigint; /** * A "regular" transaction, as opposed to a FeeBumpTransaction. - * @memberof module:contract */ export type Tx = Transaction; @@ -84,10 +72,10 @@ export interface WalletError { * * @param xdr - The XDR string representing the transaction to be signed. * @param opts - Options for signing the transaction. - * @param opts.networkPassphrase - The network's passphrase on which the transaction is intended to be signed. - * @param opts.address - The public key of the account that should be used to sign. - * @param opts.submit - If set to true, submits the transaction immediately after signing. - * @param opts.submitUrl - The URL of the network to which the transaction should be submitted, if applicable. + * - `networkPassphrase`: The network's passphrase on which the transaction is intended to be signed. + * - `address`: The public key of the account that should be used to sign. + * - `submit`: If set to true, submits the transaction immediately after signing. + * - `submitUrl`: The URL of the network to which the transaction should be submitted, if applicable. * * @returns A promise resolving to an object with the signed transaction XDR and optional signer address and error. */ @@ -115,8 +103,8 @@ export type SignTransaction = ( * * @param authEntry - The authorization entry preimage to be signed. * @param opts - Options for signing the authorization entry. - * @param opts.networkPassphrase - The network's passphrase on which the authorization entry is intended to be signed. - * @param opts.address - The public key of the account that should be used to sign. + * - `networkPassphrase`: The network's passphrase on which the authorization entry is intended to be signed. + * - `address`: The public key of the account that should be used to sign. * * @returns A promise resolving to an object with the signed authorization entry and optional signer address and error. */ @@ -135,7 +123,6 @@ export type SignAuthEntry = ( /** * Options for a smart contract client. - * @memberof module:contract */ export type ClientOptions = { /** @@ -149,7 +136,7 @@ export type ClientOptions = { * calls, which only need to be simulated. If you do not provide it during * initialization, you can provide it later, either when you initialize a * method (see {@link MethodOptions}) or when you call - * {@link module:contract.AssembledTransaction#signAndSend signAndSend}. + * {@link contract.AssembledTransaction.signAndSend | signAndSend}. * * Matches signature of `signTransaction` from Freighter. */ @@ -160,7 +147,7 @@ export type ClientOptions = { * for multi-auth transactions, in which one transaction is signed by * multiple parties. If you do not provide it during initialization, you can * provide it later either when you initialize a method (see {@link MethodOptions}) - * or when you call {@link module:contract.AssembledTransaction#signAuthEntries signAuthEntries}. + * or when you call {@link contract.AssembledTransaction.signAuthEntries | signAuthEntries}. * * Matches signature of `signAuthEntry` from Freighter. */ @@ -180,7 +167,7 @@ export type ClientOptions = { /** * If true, will allow HTTP requests to the RPC. If false, will * only allow HTTPS requests. - * @default false + * @defaultValue false */ allowHttp?: boolean; /** Optional headers to include in requests to the RPC. */ @@ -194,13 +181,13 @@ export type ClientOptions = { * on-chain XDR that also describes your contract's methods. Each error will * have a specific number. * - * A Client makes method calls with an {@link module:contract.AssembledTransaction AssembledTransaction}. + * A Client makes method calls with an {@link contract.AssembledTransaction | AssembledTransaction}. * When one of these method calls encounters an error, `AssembledTransaction` * will first attempt to parse the error as an "official" `contracterror` - * error, by using this passed-in `errorTypes` object. See - * {@link module:contract.AssembledTransaction#parseError parseError}. If `errorTypes` is blank or no + * error, by using this passed-in `errorTypes` object. See `parseError` + * on {@link contract.AssembledTransaction}. If `errorTypes` is blank or no * matching error is found, then it will throw the raw error. - * @default {} + * @defaultValue `{}` */ errorTypes?: Record; /** @@ -212,33 +199,32 @@ export type ClientOptions = { /** * Options for a smart contract method invocation. - * @memberof module:contract */ export type MethodOptions = { /** * The fee to pay for the transaction. - * @default 100 + * @defaultValue 100 */ fee?: string; /** * The timebounds which should be set for transactions generated by this - * contract client. {@link module:contract#.DEFAULT_TIMEOUT} - * @default 300 + * contract client. {@link contract.DEFAULT_TIMEOUT} + * @defaultValue 300 */ timeoutInSeconds?: number; /** * Whether to automatically simulate the transaction when constructing the * AssembledTransaction. - * @default true + * @defaultValue true */ simulate?: boolean; /** * If true, will automatically attempt to restore the transaction if there * are archived entries that need renewal. - * @default false + * @defaultValue false */ restore?: boolean; @@ -285,7 +271,7 @@ export type AssembledTransactionOptions = MethodOptions & /** * This option will be passed through to the SEP43-compatible wallet extension. If true, and if the wallet supports it, the transaction will be signed and immediately submitted to the network by the wallet, bypassing the submit logic in {@link SentTransaction}. - * @default false + * @defaultValue false */ submit?: boolean; @@ -301,17 +287,13 @@ export type AssembledTransactionOptions = MethodOptions & * This is attached to the transaction _before_ transaction simulation (it is * needed for simulation to succeed). It is also re-calculated and re-added * _before_ transaction signing. - * @constant {number} - * @default 300 - * @memberof module:contract + * @defaultValue 300 */ export const DEFAULT_TIMEOUT = 5 * 60; /** * An impossible account on the Stellar network - * @constant {string} - * @default GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF - * @memberof module:contract + * @defaultValue GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF */ export const NULL_ACCOUNT = "GAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWHF"; diff --git a/src/contract/utils.ts b/src/contract/utils.ts index fb72dc368..fd63ff4e7 100644 --- a/src/contract/utils.ts +++ b/src/contract/utils.ts @@ -6,7 +6,7 @@ import { NULL_ACCOUNT, type AssembledTransactionOptions } from "./types.js"; /** * Keep calling a `fn` for `timeoutInSeconds` seconds, if `keepWaitingIf` is * true. Returns an array of all attempts to call the function. - * @private + * @internal */ export async function withExponentialBackoff( /** Function to call repeatedly */ @@ -80,15 +80,13 @@ export async function withExponentialBackoff( * matches these "expected error types" that a contract may throw, and helps * {@link AssembledTransaction} parse these errors. * - * @constant {RegExp} - * @default "/Error\(Contract, #(\d+)\)/" - * @memberof module:contract.Client + * @defaultValue `/Error\(Contract, #(\d+)\)/` */ export const contractErrorPattern = /Error\(Contract, #(\d+)\)/; /** * A TypeScript type guard that checks if an object has a `toString` method. - * @private + * @internal */ export function implementsToString( /** some object that may or may not have a `toString` method */ @@ -125,7 +123,7 @@ export function parseWasmCustomSections( * - Values are stored with the least significant bytes first * * @returns The decoded 32-bit unsigned integer - * @throws {Error} If the encoding is invalid or exceeds 32 bits + * @throws If the encoding is invalid or exceeds 32 bits */ function readVarUint32(): number { let value = 0; @@ -178,7 +176,7 @@ export function parseWasmCustomSections( /** * Reads a binary stream of ScSpecEntries into an array for processing by ContractSpec - * @private + * @internal */ export function processSpecEntryStream(buffer: Buffer) { const reader = new cereal.XdrReader(buffer); diff --git a/src/contract/wasm_spec_parser.ts b/src/contract/wasm_spec_parser.ts index 1960d3abc..620dd3e23 100644 --- a/src/contract/wasm_spec_parser.ts +++ b/src/contract/wasm_spec_parser.ts @@ -1,9 +1,9 @@ import { parseWasmCustomSections } from "./utils.js"; /** * Obtains the contract spec XDR from a contract's wasm binary. - * @param wasm The contract's wasm binary as a Buffer. + * @param wasm - The contract's wasm binary as a Buffer. * @returns The XDR buffer representing the contract spec. - * @throws {Error} If the contract spec cannot be obtained from the provided wasm binary. + * @throws If the contract spec cannot be obtained from the provided wasm binary. */ export function specFromWasm(wasm: Buffer) { const customData = parseWasmCustomSections(wasm); diff --git a/src/errors/account_requires_memo.ts b/src/errors/account_requires_memo.ts index e4284328a..b6d9547b2 100644 --- a/src/errors/account_requires_memo.ts +++ b/src/errors/account_requires_memo.ts @@ -6,15 +6,16 @@ * * This error contains two attributes to help you identify the account requiring * the memo and the operation where the account is the destination - * @category Errors * - * @param {string} message Human-readable error message - * @param {string} accountId The account which requires a memo - * @param {number} operationIndex The index of the operation where `accountId` is the destination + * @param message - Human-readable error message + * @param accountId - The account which requires a memo + * @param operationIndex - The index of the operation where `accountId` is the destination * * @example + * ```ts * console.log('The following account requires a memo ', err.accountId) * console.log('The account is used in operation: ', err.operationIndex) + * ``` */ export class AccountRequiresMemoError extends Error { public accountId: string; @@ -25,12 +26,10 @@ export class AccountRequiresMemoError extends Error { /** * The account which requires a memo. - * @type {string} */ this.accountId = accountId; /** * Operation where accountId is the destination. - * @type {number} */ this.operationIndex = operationIndex; } diff --git a/src/errors/bad_request.ts b/src/errors/bad_request.ts index f9c99d9f0..93d1c81a4 100644 --- a/src/errors/bad_request.ts +++ b/src/errors/bad_request.ts @@ -3,11 +3,8 @@ import { NetworkError } from "./network.js"; /** * BadRequestError is raised when a request made to Horizon is invalid in some * way (incorrect timebounds for trade call builders, for example.) - * @augments NetworkError - * @inheritdoc - * @category Errors * - * @param {string} message Human-readable error message - * @param {any} response Response details, received from the Horizon server + * @param message - Human-readable error message + * @param response - Response details, received from the Horizon server */ export class BadRequestError extends NetworkError {} diff --git a/src/errors/bad_response.ts b/src/errors/bad_response.ts index dbf95ff68..d36bd5fd0 100644 --- a/src/errors/bad_response.ts +++ b/src/errors/bad_response.ts @@ -2,15 +2,12 @@ import { NetworkError } from "./network.js"; /** * BadResponseError is raised when a response from a - * {@link module:Horizon | Horizon} or {@link module:Federation | Federation} + * {@link Horizon | Horizon} or {@link Federation | Federation} * server is invalid in some way. For example, a federation response may exceed * the maximum allowed size, or a transaction submission may have failed with * Horizon. - * @augments NetworkError - * @inheritdoc - * @category Errors * - * @param {string} message Human-readable error message. - * @param {any} response Response details, received from the server. + * @param message - Human-readable error message. + * @param response - Response details, received from the server. */ export class BadResponseError extends NetworkError {} diff --git a/src/errors/network.ts b/src/errors/network.ts index 3b380ee12..3582b89f1 100644 --- a/src/errors/network.ts +++ b/src/errors/network.ts @@ -5,40 +5,35 @@ import { HorizonApi } from "../horizon/horizon_api.js"; /** * NetworkError is raised when an interaction with a Horizon server has caused * some kind of problem. - * @category Errors * - * @param {string} message Human-readable error message - * @param {any} response Response details, received from the Horizon server. - * @param {HorizonApi.ErrorResponseData} [response.data] The data returned by Horizon as part of the error: {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/response | Error Response} - * @param {number} [response.status] HTTP status code describing the basic issue with a submitted transaction {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/http-status-codes/standard | Standard Status Codes} - * @param {string} [response.statusText] A human-readable description of what the status code means: {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/http-status-codes/horizon-specific | Horizon-Specific Status Codes} - * @param {string} [response.url] URL which can provide more information about the problem that occurred. + * @param message - Human-readable error message + * @param response - Response details, received from the Horizon server. + * - `data` (optional): The data returned by Horizon as part of the error: {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/response | Error Response} + * - `status` (optional): HTTP status code describing the basic issue with a submitted transaction {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/http-status-codes/standard | Standard Status Codes} + * - `statusText` (optional): A human-readable description of what the status code means: {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/http-status-codes/horizon-specific | Horizon-Specific Status Codes} + * - `url` (optional): URL which can provide more information about the problem that occurred. */ export class NetworkError extends Error { + /** Response details, received from the Horizon server. */ public response: { + /** The data returned by Horizon as part of the error: {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/response | Error Response} */ data?: HorizonApi.ErrorResponseData; + /** HTTP status code describing the basic issue with a submitted transaction {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/http-status-codes/standard | Standard Status Codes} */ status?: number; + /** A human-readable description of what the status code means: {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/http-status-codes/horizon-specific | Horizon-Specific Status Codes} */ statusText?: string; + /** URL which can provide more information about the problem that occurred. */ url?: string; }; constructor(message: string, response: any) { super(message); - /** - * The response sent by the Horizon server. - * @type {object} Response details, received from the Horizon server - * @property {object} response Response details, received from the Horizon server - * @property {HorizonApi.ErrorResponseData} [response.data] The data returned by Horizon as part of the error: {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/response | Error Response} - * @property {number} [response.status] HTTP status code describing the basic issue with a submitted transaction {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/http-status-codes/standard | Standard Status Codes} - * @property {string} [response.statusText] A human-readable description of what the status code means: {@link https://developers.stellar.org/docs/data/horizon/api-reference/errors/http-status-codes/horizon-specific | Horizon-Specific Status Codes} - * @property {string} [response.url] URL which can provide more information about the problem that occurred. - */ this.response = response; } /** * Returns the error response sent by the Horizon server. - * @returns {any} Response details, received from the Horizon server. + * @returns Response details, received from the Horizon server. */ public getResponse() { return this.response; diff --git a/src/errors/not_found.ts b/src/errors/not_found.ts index db8142052..dd2398274 100644 --- a/src/errors/not_found.ts +++ b/src/errors/not_found.ts @@ -3,11 +3,8 @@ import { NetworkError } from "./network.js"; /** * NotFoundError is raised when the resource requested from Horizon is * unavailable. - * @augments NetworkError - * @inheritdoc - * @category Errors * - * @param {string} message Human-readable error message - * @param {any} response Response details, received from the Horizon server + * @param message - Human-readable error message + * @param response - Response details, received from the Horizon server */ export class NotFoundError extends NetworkError {} diff --git a/src/federation/server.ts b/src/federation/server.ts index 5cd7332fc..7ecc03d79 100644 --- a/src/federation/server.ts +++ b/src/federation/server.ts @@ -7,11 +7,9 @@ import { Resolver } from "../stellartoml/index.js"; import type { Api } from "./api.js"; import { httpClient } from "../http-client/index.js"; -/** @module Federation */ - /** * The maximum size of response from a federation server - * @default 102400 + * @defaultValue 102400 */ export const FEDERATION_RESPONSE_MAX_SIZE: number = 100 * 1024; @@ -20,13 +18,10 @@ export const FEDERATION_RESPONSE_MAX_SIZE: number = 100 * 1024; * [federation server](https://developers.stellar.org/docs/learn/encyclopedia/federation) * instance and exposes an interface for requests to that instance. * - * @alias module:Federation.Server - * @memberof module:Federation - * @param {string} serverURL The federation server URL (ex. `https://acme.com/federation`). - * @param {string} domain Domain this server represents - * @param {Api.Options} [opts] Options object - * @returns {void} - */ + * @param serverURL - The federation server URL (ex. `https://acme.com/federation`). + * @param domain - Domain this server represents + * @param opts - (optional) Options object + * @returns */ export class FederationServer { /** * The federation server URL (ex. `https://acme.com/federation`). @@ -55,6 +50,7 @@ export class FederationServer { * if the account actually exists in a ledger. * * @example + * ```ts * StellarSdk.FederationServer.resolve('bob*stellar.org') * .then(federationRecord => { * // { @@ -63,13 +59,14 @@ export class FederationServer { * // memo: 100 * // } * }); + * ``` * * @see Federation doc * @see Stellar.toml doc - * @param {string} value Stellar Address (ex. `bob*stellar.org`) - * @param {object} [opts] Options object - * @returns {Promise} A promise that resolves to the federation record - * @throws {Error} Will throw an error if the provided account ID is not a valid Ed25519 public key. + * @param value - Stellar Address (ex. `bob*stellar.org`) + * @param opts - (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. */ public static async resolve( value: string, @@ -116,6 +113,7 @@ export class FederationServer { * contain information about a federation server Promise will reject. * * @example + * ```ts * StellarSdk.FederationServer.createForDomain('acme.com') * .then(federationServer => { * // federationServer.resolveAddress('bob').then(...) @@ -123,12 +121,13 @@ export class FederationServer { * .catch(error => { * // stellar.toml does not exist or it does not contain information about federation server. * }); + * ``` * * @see Stellar.toml doc - * @param {string} domain Domain to get federation server for - * @param {module:Federation.Api.Options} [opts] Options object - * @returns {Promise} A promise that resolves to the federation record - * @throws {Error} Will throw an error if the domain's stellar.toml file does not contain a federation server field. + * @param domain - Domain to get federation server for + * @param opts - (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. */ public static async createForDomain( domain: string, @@ -168,9 +167,9 @@ export class FederationServer { /** * Get the federation record if the user was found for a given Stellar address * @see Federation doc - * @param {string} address Stellar address (ex. `bob*stellar.org`). If `FederationServer` was instantiated with `domain` param only username (ex. `bob`) can be passed. - * @returns {Promise} A promise that resolves to the federation record - * @throws {Error} 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 + * @param address - 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 */ public async resolveAddress(address: string): Promise { let stellarAddress = address; @@ -194,11 +193,11 @@ export class FederationServer { /** * Given an account ID, get their federation record if the user was found * @see Federation doc - * @param {string} accountId Account ID (ex. `GBYNR2QJXLBCBTRN44MRORCMI4YO7FZPFBCNOKTOBCAAFC7KC3LNPRYS`) - * @returns {Promise} A promise that resolves to the federation record - * @throws {Error} Will throw an error if the federation server returns an invalid memo value. - * @throws {Error} Will throw an error if the federation server's response exceeds the allowed maximum size. - * @throws {BadResponseError} Will throw an error if the server query fails with an improper response. + * @param accountId - 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. + * @throws Will throw an error if the federation server's response exceeds the allowed maximum size. + * @throws Will throw an error if the server query fails with an improper response. */ public async resolveAccountId(accountId: string): Promise { const url = new URL(this.serverURL); @@ -211,11 +210,11 @@ export class FederationServer { /** * Given a transactionId, get the federation record if the sender of the transaction was found * @see Federation doc - * @param {string} transactionId Transaction ID (ex. `3389e9f0f1a65f19736cacf544c2e825313e8447f569233bb8db39aa607c8889`) - * @returns {Promise} A promise that resolves to the federation record - * @throws {Error} Will throw an error if the federation server returns an invalid memo value. - * @throws {Error} Will throw an error if the federation server's response exceeds the allowed maximum size. - * @throws {BadResponseError} Will throw an error if the server query fails with an improper response. + * @param transactionId - 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. + * @throws Will throw an error if the federation server's response exceeds the allowed maximum size. + * @throws Will throw an error if the server query fails with an improper response. */ public async resolveTransactionId( transactionId: string, diff --git a/src/horizon/account_call_builder.ts b/src/horizon/account_call_builder.ts index 399995400..4eedd99ed 100644 --- a/src/horizon/account_call_builder.ts +++ b/src/horizon/account_call_builder.ts @@ -5,14 +5,12 @@ import type { HttpClient } from "../http-client/index.js"; /** * Creates a new {@link AccountCallBuilder} pointed to server defined by `serverUrl`. * - * Do not create this object directly, use {@link Horizon.Server#accounts}. + * Do not create this object directly, use {@link Horizon.Server.accounts}. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-accounts|All Accounts} + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-accounts | All Accounts} * - * @augments CallBuilder - * @private - * @class - * @param {string} serverUrl Horizon server URL. + * @internal + * @param serverUrl - Horizon server URL. */ export class AccountCallBuilder extends CallBuilder< ServerApi.CollectionPage @@ -26,9 +24,9 @@ export class AccountCallBuilder extends CallBuilder< * Returns information and links relating to a single account. * The balances section in the returned JSON will also list all the trust lines this account has set up. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-an-account|Account Details} - * @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` - * @returns {CallBuilder} a new CallBuilder instance for the /accounts/:id endpoint + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-an-account | Account Details} + * @param id - For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` + * @returns a new CallBuilder instance for the /accounts/:id endpoint */ public accountId(id: string): CallBuilder { const builder = new CallBuilder( @@ -41,9 +39,9 @@ export class AccountCallBuilder extends CallBuilder< /** * This endpoint filters accounts by signer account. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-accounts|Accounts} - * @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` - * @returns {AccountCallBuilder} current AccountCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-accounts | Accounts} + * @param id - For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` + * @returns current AccountCallBuilder instance */ public forSigner(id: string): this { this.url.searchParams.set("signer", id); @@ -52,10 +50,10 @@ export class AccountCallBuilder extends CallBuilder< /** * This endpoint filters all accounts who are trustees to an asset. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-accounts|Accounts} + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-accounts | Accounts} * @see Asset - * @param {Asset} asset For example: `new Asset('USD','GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD')` - * @returns {AccountCallBuilder} current AccountCallBuilder instance + * @param asset - For example: `new Asset('USD','GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD')` + * @returns current AccountCallBuilder instance */ public forAsset(asset: Asset): this { this.url.searchParams.set("asset", `${asset}`); @@ -64,9 +62,9 @@ export class AccountCallBuilder extends CallBuilder< /** * This endpoint filters accounts where the given account is sponsoring the account or any of its sub-entries.. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-accounts|Accounts} - * @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` - * @returns {AccountCallBuilder} current AccountCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-accounts | Accounts} + * @param id - For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` + * @returns current AccountCallBuilder instance */ public sponsor(id: string): this { this.url.searchParams.set("sponsor", id); @@ -76,8 +74,8 @@ export class AccountCallBuilder extends CallBuilder< /** * This endpoint filters accounts holding a trustline to the given liquidity pool. * - * @param {string} id The ID of the liquidity pool. For example: `dd7b1ab831c273310ddbec6f97870aa83c2fbd78ce22aded37ecbf4f3380fac7`. - * @returns {AccountCallBuilder} current AccountCallBuilder instance + * @param id - The ID of the liquidity pool. For example: `dd7b1ab831c273310ddbec6f97870aa83c2fbd78ce22aded37ecbf4f3380fac7`. + * @returns current AccountCallBuilder instance */ public forLiquidityPool(id: string): this { this.url.searchParams.set("liquidity_pool", id); diff --git a/src/horizon/account_response.ts b/src/horizon/account_response.ts index 8aa8d1745..6f1b8f245 100644 --- a/src/horizon/account_response.ts +++ b/src/horizon/account_response.ts @@ -6,18 +6,17 @@ import { HorizonApi } from "./horizon_api.js"; import { ServerApi } from "./server_api.js"; /** - * Do not create this object directly, use {@link module:Horizon.Server#loadAccount | Horizon.Server#loadAccount}. + * Do not create this object directly, use {@link Horizon.Server.loadAccount | Horizon.Server#loadAccount}. * * Returns information and links relating to a single account. * The balances section in the returned JSON will also list all the trust lines this account has set up. * It also contains {@link BaseAccount} object and exposes it's methods so can be used in {@link TransactionBuilder}. * - * @memberof module:Horizon - * @private + * @internal * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/accounts/object|Account Details} - * @param {string} response Response from horizon account endpoint. - * @returns {AccountResponse} AccountResponse instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/accounts/object | Account Details} + * @param response - Response from horizon account endpoint. + * @returns AccountResponse instance */ export class AccountResponse { public readonly id!: string; @@ -83,7 +82,7 @@ export class AccountResponse { /** * Get Stellar account public key ex. `GB3KJPLFUYN5VL6R3GU3EGCGVCKFDSD7BEDX42HWG5BWFKB3KQGJJRMA` - * @returns {string} accountId + * @returns accountId */ public accountId(): string { return this._baseAccount.accountId(); @@ -91,7 +90,7 @@ export class AccountResponse { /** * Get the current sequence number - * @returns {string} sequenceNumber + * @returns sequenceNumber */ public sequenceNumber(): string { return this._baseAccount.sequenceNumber(); @@ -99,8 +98,7 @@ export class AccountResponse { /** * Increments sequence number in this object by one. - * @returns {void} - */ + * @returns */ public incrementSequenceNumber(): void { this._baseAccount.incrementSequenceNumber(); this.sequence = this._baseAccount.sequenceNumber(); diff --git a/src/horizon/assets_call_builder.ts b/src/horizon/assets_call_builder.ts index 2cbe71acc..7632c5ba1 100644 --- a/src/horizon/assets_call_builder.ts +++ b/src/horizon/assets_call_builder.ts @@ -5,12 +5,10 @@ import type { HttpClient } from "../http-client/index.js"; /** * Creates a new {@link AssetsCallBuilder} pointed to server defined by serverUrl. * - * Do not create this object directly, use {@link Horizon.Server#assets}. + * Do not create this object directly, use {@link Horizon.Server.assets}. * - * @class - * @augments CallBuilder - * @private - * @param {string} serverUrl Horizon server URL. + * @internal + * @param serverUrl - Horizon server URL. */ export class AssetsCallBuilder extends CallBuilder< ServerApi.CollectionPage @@ -22,8 +20,8 @@ export class AssetsCallBuilder extends CallBuilder< /** * This endpoint filters all assets by the asset code. - * @param {string} value For example: `USD` - * @returns {AssetsCallBuilder} current AssetCallBuilder instance + * @param value - For example: `USD` + * @returns current AssetCallBuilder instance */ public forCode(value: string): AssetsCallBuilder { this.url.searchParams.set("asset_code", value); @@ -32,8 +30,8 @@ export class AssetsCallBuilder extends CallBuilder< /** * This endpoint filters all assets by the asset issuer. - * @param {string} value For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` - * @returns {AssetsCallBuilder} current AssetCallBuilder instance + * @param value - For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` + * @returns current AssetCallBuilder instance */ public forIssuer(value: string): AssetsCallBuilder { this.url.searchParams.set("asset_issuer", value); diff --git a/src/horizon/call_builder.ts b/src/horizon/call_builder.ts index 1f8459f36..1538a1720 100644 --- a/src/horizon/call_builder.ts +++ b/src/horizon/call_builder.ts @@ -28,8 +28,7 @@ export interface EventSourceOptions { * Creates a new {@link CallBuilder} pointed to server defined by serverUrl. * * This is an **abstract** class. Do not create this object directly, use {@link Server} class. - * @param {string} serverUrl URL of Horizon server - * @class CallBuilder + * @param serverUrl - URL of Horizon server */ export class CallBuilder< T extends @@ -74,7 +73,7 @@ export class CallBuilder< /** * Triggers a HTTP request using this builder's current configuration. - * @returns {Promise} a Promise that resolves to the server's response. + * @returns a Promise that resolves to the server's response. */ public call(): Promise { this.checkFilter(); @@ -104,11 +103,11 @@ export class CallBuilder< * events call the function returned by this method. * @see [Horizon Response Format](https://developers.stellar.org/api/introduction/response-format/) * @see [MDN EventSource](https://developer.mozilla.org/en-US/docs/Web/API/EventSource) - * @param {object} [options] EventSource options. - * @param {Function} [options.onmessage] Callback function to handle incoming messages. - * @param {Function} [options.onerror] Callback function to handle errors. - * @param {number} [options.reconnectTimeout] Custom stream connection timeout in ms, default is 15 seconds. - * @returns {Function} Close function. Run to close the connection and stop listening for new events. + * @param options - (optional) EventSource options. + * - `onmessage` (optional): Callback function to handle incoming messages. + * - `onerror` (optional): Callback function to handle errors. + * - `reconnectTimeout` (optional): Custom stream connection timeout in ms, default is 15 seconds. + * @returns Close function. Run to close the connection and stop listening for new events. */ public stream( options: EventSourceOptions< @@ -237,8 +236,8 @@ export class CallBuilder< /** * Sets `cursor` parameter for the current call. Returns the CallBuilder object on which this method has been called. * @see [Paging](https://developers.stellar.org/api/introduction/pagination/) - * @param {string} cursor A cursor is a value that points to a specific location in a collection of resources. - * @returns {object} current CallBuilder instance + * @param cursor - A cursor is a value that points to a specific location in a collection of resources. + * @returns current CallBuilder instance */ public cursor(cursor: string): this { this.url.searchParams.set("cursor", cursor); @@ -248,8 +247,8 @@ export class CallBuilder< /** * Sets `limit` parameter for the current call. Returns the CallBuilder object on which this method has been called. * @see [Paging](https://developers.stellar.org/api/introduction/pagination/) - * @param {number} recordsNumber Number of records the server should return. - * @returns {object} current CallBuilder instance + * @param recordsNumber - Number of records the server should return. + * @returns current CallBuilder instance */ public limit(recordsNumber: number): this { this.url.searchParams.set("limit", recordsNumber.toString()); @@ -258,8 +257,8 @@ export class CallBuilder< /** * Sets `order` parameter for the current call. Returns the CallBuilder object on which this method has been called. - * @param {"asc"|"desc"} direction Sort direction - * @returns {object} current CallBuilder instance + * @param direction - Sort direction + * @returns current CallBuilder instance */ public order(direction: "asc" | "desc"): this { this.url.searchParams.set("order", direction); @@ -274,8 +273,8 @@ export class CallBuilder< * will include a `transaction` field for each operation in the * response. * - * @param "include" join Records to be included in the response. - * @returns {object} current CallBuilder instance. + * @param include - join Records to be included in the response. + * @returns current CallBuilder instance. */ public join(include: "transactions"): this { this.url.searchParams.set("join", include); @@ -290,12 +289,12 @@ export class CallBuilder< * it's helpful to be able to conveniently create queries to the * `/accounts/:id/effects` endpoint: * - * this.forEndpoint("accounts", accountId)`. + * `this.forEndpoint("accounts", accountId)`. * - * @param {string} endpoint neighbor endpoint in question, like /operations - * @param {string} param filter parameter, like an operation ID + * @param endpoint - neighbor endpoint in question, like /operations + * @param param - filter parameter, like an operation ID * - * @returns {CallBuilder} this CallBuilder instance + * @returns this CallBuilder instance */ protected forEndpoint(endpoint: string, param: string): this { if (this.neighborRoot === "") { @@ -306,9 +305,8 @@ export class CallBuilder< } /** - * @private - * @returns {void} - */ + * @internal + * @returns */ private checkFilter(): void { if (this.filter.length >= 2) { throw new BadRequestError("Too many filters specified", this.filter); @@ -323,11 +321,11 @@ export class CallBuilder< /** * Convert a link object to a function that fetches that link. - * @private - * @param {object} link A link object - * @param {boolean} link.href the URI of the link - * @param {boolean} [link.templated] Whether the link is templated - * @returns {Function} A function that requests the link + * @internal + * @param link - A link object + * - `href`: the URI of the link + * - `templated` (optional): Whether the link is templated + * @returns A function that requests the link */ private _requestFnForLink( link: HorizonApi.ResponseLink, @@ -349,9 +347,9 @@ export class CallBuilder< /** * Given the json response, find and convert each link into a function that * calls that link. - * @private - * @param {object} json JSON response - * @returns {object} JSON response with string links replaced with functions + * @internal + * @param json - JSON response + * @returns JSON response with string links replaced with functions */ private _parseRecord(json: any): any { if (!json._links) { @@ -401,9 +399,9 @@ export class CallBuilder< } /** - * @private - * @param {object} json Response object - * @returns {object} Extended response + * @internal + * @param json - Response object + * @returns Extended response */ private _parseResponse(json: any) { if (json._embedded && json._embedded.records) { @@ -413,9 +411,9 @@ export class CallBuilder< } /** - * @private - * @param {object} json Response object - * @returns {object} Extended response object + * @internal + * @param json - Response object + * @returns Extended response object */ private _toCollectionPage(json: any): any { for (let i = 0; i < json._embedded.records.length; i += 1) { @@ -439,9 +437,9 @@ export class CallBuilder< } /** - * @private - * @param {object} error Network error object - * @returns {Promise} Promise that rejects with a human-readable error + * @internal + * @param error - Network error object + * @returns Promise that rejects with a human-readable error */ private async _handleNetworkError(error: NetworkError): Promise { if (error.response && error.response.status) { diff --git a/src/horizon/claimable_balances_call_builder.ts b/src/horizon/claimable_balances_call_builder.ts index 9d5ef0e7a..d06e883d7 100644 --- a/src/horizon/claimable_balances_call_builder.ts +++ b/src/horizon/claimable_balances_call_builder.ts @@ -6,14 +6,12 @@ import type { HttpClient } from "../http-client/index.js"; /** * Creates a new {@link ClaimableBalanceCallBuilder} pointed to server defined by serverUrl. * - * Do not create this object directly, use {@link Horizon.Server#claimableBalances}. + * Do not create this object directly, use {@link Horizon.Server.claimableBalances}. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/claimablebalances|Claimable Balances} + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/claimablebalances | Claimable Balances} * - * @augments CallBuilder - * @private - * @class - * @param {string} serverUrl Horizon server URL. + * @internal + * @param serverUrl - Horizon server URL. */ export class ClaimableBalanceCallBuilder extends CallBuilder< ServerApi.CollectionPage @@ -26,9 +24,9 @@ export class ClaimableBalanceCallBuilder extends CallBuilder< /** * The claimable balance details endpoint provides information on a single claimable balance. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-claimable-balance|Claimable Balance Details} - * @param {string} claimableBalanceId Claimable balance ID - * @returns {CallBuilder} CallBuilder OperationCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-claimable-balance | Claimable Balance Details} + * @param claimableBalanceId - Claimable balance ID + * @returns `CallBuilder` OperationCallBuilder instance */ public claimableBalance( claimableBalanceId: string, @@ -44,9 +42,9 @@ export class ClaimableBalanceCallBuilder extends CallBuilder< /** * Returns all claimable balances which are sponsored by the given account ID. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-claimable-balances|Claimable Balances} - * @param {string} sponsor For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` - * @returns {ClaimableBalanceCallBuilder} current ClaimableBalanceCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-claimable-balances | Claimable Balances} + * @param sponsor - For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` + * @returns current ClaimableBalanceCallBuilder instance */ public sponsor(sponsor: string): this { this.url.searchParams.set("sponsor", sponsor); @@ -56,9 +54,9 @@ export class ClaimableBalanceCallBuilder extends CallBuilder< /** * Returns all claimable balances which can be claimed by the given account ID. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-claimable-balances|Claimable Balances} - * @param {string} claimant For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` - * @returns {ClaimableBalanceCallBuilder} current ClaimableBalanceCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-claimable-balances | Claimable Balances} + * @param claimant - For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` + * @returns current ClaimableBalanceCallBuilder instance */ public claimant(claimant: string): this { this.url.searchParams.set("claimant", claimant); @@ -68,9 +66,9 @@ export class ClaimableBalanceCallBuilder extends CallBuilder< /** * Returns all claimable balances which provide a balance for the given asset. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-claimable-balances|Claimable Balances} - * @param {Asset} asset The Asset held by the claimable balance - * @returns {ClaimableBalanceCallBuilder} current ClaimableBalanceCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-claimable-balances | Claimable Balances} + * @param asset - The Asset held by the claimable balance + * @returns current ClaimableBalanceCallBuilder instance */ public asset(asset: Asset): this { this.url.searchParams.set("asset", asset.toString()); diff --git a/src/horizon/effect_call_builder.ts b/src/horizon/effect_call_builder.ts index 88fbca831..7da8cf743 100644 --- a/src/horizon/effect_call_builder.ts +++ b/src/horizon/effect_call_builder.ts @@ -4,14 +4,12 @@ import type { HttpClient } from "../http-client/index.js"; /** * Creates a new {@link EffectCallBuilder} pointed to server defined by serverUrl. - * Do not create this object directly, use {@link Horizon.Server#effects}. + * Do not create this object directly, use {@link Horizon.Server.effects}. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/effects|All Effects} + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/effects | All Effects} * - * @augments CallBuilder - * @private - * @class - * @param {string} serverUrl Horizon server URL. + * @internal + * @param serverUrl - Horizon server URL. */ export class EffectCallBuilder extends CallBuilder< ServerApi.CollectionPage @@ -23,9 +21,9 @@ export class EffectCallBuilder extends CallBuilder< /** * This endpoint represents all effects that changed a given account. It will return relevant effects from the creation of the account to the current ledger. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-effects-by-account-id|Effects for Account} - * @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` - * @returns {EffectCallBuilder} this EffectCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-effects-by-account-id | Effects for Account} + * @param accountId - For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` + * @returns this EffectCallBuilder instance */ public forAccount(accountId: string): this { return this.forEndpoint("accounts", accountId); @@ -35,9 +33,9 @@ export class EffectCallBuilder extends CallBuilder< * Effects are the specific ways that the ledger was changed by any operation. * * This endpoint represents all effects that occurred in the given ledger. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-ledgers-effects|Effects for Ledger} - * @param {number|string} sequence Ledger sequence - * @returns {EffectCallBuilder} this EffectCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-ledgers-effects | Effects for Ledger} + * @param sequence - Ledger sequence + * @returns this EffectCallBuilder instance */ public forLedger(sequence: number | string): this { return this.forEndpoint("ledgers", sequence.toString()); @@ -45,9 +43,9 @@ export class EffectCallBuilder extends CallBuilder< /** * This endpoint represents all effects that occurred as a result of a given transaction. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-transactions-effects|Effects for Transaction} - * @param {string} transactionId Transaction ID - * @returns {EffectCallBuilder} this EffectCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-transactions-effects | Effects for Transaction} + * @param transactionId - Transaction ID + * @returns this EffectCallBuilder instance */ public forTransaction(transactionId: string): this { return this.forEndpoint("transactions", transactionId); @@ -55,9 +53,9 @@ export class EffectCallBuilder extends CallBuilder< /** * This endpoint represents all effects that occurred as a result of a given operation. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-an-operations-effects|Effects for Operation} - * @param {number} operationId Operation ID - * @returns {EffectCallBuilder} this EffectCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-an-operations-effects | Effects for Operation} + * @param operationId - Operation ID + * @returns this EffectCallBuilder instance */ public forOperation(operationId: string): this { return this.forEndpoint("operations", operationId); @@ -66,8 +64,8 @@ export class EffectCallBuilder extends CallBuilder< /** * This endpoint represents all effects involving a particular liquidity pool. * - * @param {string} poolId liquidity pool ID - * @returns {EffectCallBuilder} this EffectCallBuilder instance + * @param poolId - liquidity pool ID + * @returns this EffectCallBuilder instance */ public forLiquidityPool(poolId: string): this { return this.forEndpoint("liquidity_pools", poolId); diff --git a/src/horizon/horizon_axios_client.ts b/src/horizon/horizon_axios_client.ts index 57ff7bc2b..a9c66b887 100644 --- a/src/horizon/horizon_axios_client.ts +++ b/src/horizon/horizon_axios_client.ts @@ -21,14 +21,14 @@ export interface ServerTime { * time it was recorded, ex: * * @example + * ```ts * "horizon-testnet.stellar.org": { * serverTime: 1552513039, * localTimeRecorded: 1552513052 * } + * ``` * - * @constant {Record.} - * @default {} - * @memberof module:Horizon + * @defaultValue `{}` */ export const SERVER_TIME_MAP: Record = {}; @@ -87,10 +87,9 @@ export function createHttpClient(headers?: Record): HttpClient { * Given a hostname, get the current time of that server (i.e., use the last- * recorded server time and offset it by the time since then.) If there IS no * recorded server time, or it's been 5 minutes since the last, return null. - * @memberof module:Horizon * - * @param {string} hostname Hostname of a Horizon server. - * @returns {number} The UNIX timestamp (in seconds, not milliseconds) + * @param hostname - 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. */ diff --git a/src/horizon/index.ts b/src/horizon/index.ts index dd92a8d71..c437fb2f4 100644 --- a/src/horizon/index.ts +++ b/src/horizon/index.ts @@ -1,5 +1,3 @@ -/** @module Horizon */ - // Expose all types export * from "./horizon_api.js"; export * from "./server_api.js"; diff --git a/src/horizon/ledger_call_builder.ts b/src/horizon/ledger_call_builder.ts index d3723957e..f1a7e1609 100644 --- a/src/horizon/ledger_call_builder.ts +++ b/src/horizon/ledger_call_builder.ts @@ -5,14 +5,12 @@ import type { HttpClient } from "../http-client/index.js"; /** * Creates a new {@link LedgerCallBuilder} pointed to server defined by serverUrl. * - * Do not create this object directly, use {@link Horizon.Server#ledgers}. + * Do not create this object directly, use {@link Horizon.Server.ledgers}. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-ledgers|All Ledgers} + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-ledgers | All Ledgers} * - * @augments CallBuilder - * @private - * @class - * @param {string} serverUrl Horizon server URL. + * @internal + * @param serverUrl - Horizon server URL. */ export class LedgerCallBuilder extends CallBuilder< ServerApi.CollectionPage @@ -24,8 +22,8 @@ export class LedgerCallBuilder extends CallBuilder< /** * Provides information on a single ledger. - * @param {number|string} sequence Ledger sequence - * @returns {LedgerCallBuilder} current LedgerCallBuilder instance + * @param sequence - Ledger sequence + * @returns current LedgerCallBuilder instance */ public ledger(sequence: number | string): this { this.filter.push(["ledgers", sequence.toString()]); diff --git a/src/horizon/liquidity_pool_call_builder.ts b/src/horizon/liquidity_pool_call_builder.ts index a0868e231..3be98c6ea 100644 --- a/src/horizon/liquidity_pool_call_builder.ts +++ b/src/horizon/liquidity_pool_call_builder.ts @@ -7,12 +7,10 @@ import type { HttpClient } from "../http-client/index.js"; /** * Creates a new {@link LiquidityPoolCallBuilder} pointed to server defined by serverUrl. * - * Do not create this object directly, use {@link Horizon.Server#liquidityPools}. + * Do not create this object directly, use {@link Horizon.Server.liquidityPools}. * - * @augments CallBuilder - * @private - * @class - * @param {string} serverUrl Horizon server URL. + * @internal + * @param serverUrl - Horizon server URL. */ export class LiquidityPoolCallBuilder extends CallBuilder< ServerApi.CollectionPage @@ -26,7 +24,7 @@ export class LiquidityPoolCallBuilder extends CallBuilder< * Filters out pools whose reserves don't exactly match these assets. * * @see Asset - * @returns {LiquidityPoolCallBuilder} current LiquidityPoolCallBuilder instance + * @returns current LiquidityPoolCallBuilder instance */ public forAssets(...assets: Asset[]): this { const assetList: string = assets @@ -39,8 +37,8 @@ export class LiquidityPoolCallBuilder extends CallBuilder< /** * Retrieves all pools an account is participating in. * - * @param {string} id the participant account to filter by - * @returns {LiquidityPoolCallBuilder} current LiquidityPoolCallBuilder instance + * @param id - the participant account to filter by + * @returns current LiquidityPoolCallBuilder instance */ public forAccount(id: string): this { this.url.searchParams.set("account", id); @@ -50,8 +48,8 @@ export class LiquidityPoolCallBuilder extends CallBuilder< /** * Retrieves a specific liquidity pool by ID. * - * @param {string} id the hash/ID of the liquidity pool - * @returns {CallBuilder} a new CallBuilder instance for the /liquidity_pools/:id endpoint + * @param id - the hash/ID of the liquidity pool + * @returns a new CallBuilder instance for the /liquidity_pools/:id endpoint */ public liquidityPoolId( id: string, diff --git a/src/horizon/offer_call_builder.ts b/src/horizon/offer_call_builder.ts index 7ca87a517..1e30bdc4b 100644 --- a/src/horizon/offer_call_builder.ts +++ b/src/horizon/offer_call_builder.ts @@ -6,14 +6,12 @@ import type { HttpClient } from "../http-client/index.js"; /** * Creates a new {@link OfferCallBuilder} pointed to server defined by serverUrl. * - * Do not create this object directly, use {@link Horizon.Server#offers}. + * Do not create this object directly, use {@link Horizon.Server.offers}. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/offers/|Offers} + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/offers/ | Offers} * - * @augments CallBuilder - * @private - * @class - * @param {string} serverUrl Horizon server URL. + * @internal + * @param serverUrl - Horizon server URL. */ export class OfferCallBuilder extends CallBuilder< ServerApi.CollectionPage @@ -26,9 +24,9 @@ export class OfferCallBuilder extends CallBuilder< /** * The offer details endpoint provides information on a single offer. The offer ID provided in the id * argument specifies which offer to load. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/offers/single/|Offer Details} - * @param {string} offerId Offer ID - * @returns {CallBuilder} CallBuilder OperationCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/offers/single/ | Offer Details} + * @param offerId - Offer ID + * @returns `CallBuilder` OperationCallBuilder instance */ public offer(offerId: string): CallBuilder { const builder = new CallBuilder( @@ -42,9 +40,9 @@ export class OfferCallBuilder extends CallBuilder< /** * Returns all offers where the given account is involved. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/accounts/offers/|Offers} - * @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` - * @returns {OfferCallBuilder} current OfferCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/accounts/offers/ | Offers} + * @param id - For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` + * @returns current OfferCallBuilder instance */ public forAccount(id: string): this { return this.forEndpoint("accounts", id); @@ -52,10 +50,10 @@ export class OfferCallBuilder extends CallBuilder< /** * Returns all offers buying an asset. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/offers/list/|Offers} + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/offers/list/ | Offers} * @see Asset - * @param {Asset} asset For example: `new Asset('USD','GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD')` - * @returns {OfferCallBuilder} current OfferCallBuilder instance + * @param asset - For example: `new Asset('USD','GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD')` + * @returns current OfferCallBuilder instance */ public buying(asset: Asset): this { const issuer = asset.getIssuer(); @@ -71,10 +69,10 @@ export class OfferCallBuilder extends CallBuilder< /** * Returns all offers selling an asset. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/offers/list/|Offers} + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/offers/list/ | Offers} * @see Asset - * @param {Asset} asset For example: `new Asset('EUR','GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD')` - * @returns {OfferCallBuilder} current OfferCallBuilder instance + * @param asset - For example: `new Asset('EUR','GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD')` + * @returns current OfferCallBuilder instance */ public selling(asset: Asset): this { const issuer = asset.getIssuer(); @@ -90,9 +88,9 @@ export class OfferCallBuilder extends CallBuilder< /** * This endpoint filters offers where the given account is sponsoring the offer entry. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-all-offers|Offers} - * @param {string} id For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` - * @returns {OfferCallBuilder} current OfferCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-all-offers | Offers} + * @param id - For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` + * @returns current OfferCallBuilder instance */ public sponsor(id: string): this { this.url.searchParams.set("sponsor", id); @@ -102,9 +100,9 @@ export class OfferCallBuilder extends CallBuilder< /** * This endpoint filters offers where the given account is the seller. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-all-offers|Offers} - * @param {string} seller For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` - * @returns {OfferCallBuilder} current OfferCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-all-offers | Offers} + * @param seller - For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` + * @returns current OfferCallBuilder instance */ public seller(seller: string): this { this.url.searchParams.set("seller", seller); diff --git a/src/horizon/operation_call_builder.ts b/src/horizon/operation_call_builder.ts index cacb17901..e9bc2c685 100644 --- a/src/horizon/operation_call_builder.ts +++ b/src/horizon/operation_call_builder.ts @@ -5,14 +5,12 @@ import type { HttpClient } from "../http-client/index.js"; /** * Creates a new {@link OperationCallBuilder} pointed to server defined by serverUrl. * - * Do not create this object directly, use {@link Horizon.Server#operations}. + * Do not create this object directly, use {@link Horizon.Server.operations}. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/operations|All Operations} + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/operations | All Operations} * - * @augments CallBuilder - * @private - * @class - * @param {string} serverUrl Horizon server URL. + * @internal + * @param serverUrl - Horizon server URL. */ export class OperationCallBuilder extends CallBuilder< ServerApi.CollectionPage @@ -25,9 +23,9 @@ export class OperationCallBuilder extends CallBuilder< /** * The operation details endpoint provides information on a single operation. The operation ID provided in the id * argument specifies which operation to load. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-an-operation|Operation Details} - * @param {number} operationId Operation ID - * @returns {CallBuilder} this OperationCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-an-operation | Operation Details} + * @param operationId - Operation ID + * @returns this OperationCallBuilder instance */ public operation( operationId: string, @@ -42,9 +40,9 @@ export class OperationCallBuilder extends CallBuilder< /** * This endpoint represents all operations that were included in valid transactions that affected a particular account. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-operations-by-account-id|Operations for Account} - * @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` - * @returns {OperationCallBuilder} this OperationCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-operations-by-account-id | Operations for Account} + * @param accountId - For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` + * @returns this OperationCallBuilder instance */ public forAccount(accountId: string): this { return this.forEndpoint("accounts", accountId); @@ -52,9 +50,9 @@ export class OperationCallBuilder extends CallBuilder< /** * This endpoint represents all operations that reference a given claimable_balance. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/cb-retrieve-related-operations|Operations for Claimable Balance} - * @param {string} claimableBalanceId Claimable Balance ID - * @returns {OperationCallBuilder} this OperationCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/cb-retrieve-related-operations | Operations for Claimable Balance} + * @param claimableBalanceId - Claimable Balance ID + * @returns this OperationCallBuilder instance */ public forClaimableBalance(claimableBalanceId: string): this { return this.forEndpoint("claimable_balances", claimableBalanceId); @@ -63,9 +61,9 @@ export class OperationCallBuilder extends CallBuilder< /** * This endpoint returns all operations that occurred in a given ledger. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-ledgers-operations|Operations for Ledger} - * @param {number|string} sequence Ledger sequence - * @returns {OperationCallBuilder} this OperationCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-ledgers-operations | Operations for Ledger} + * @param sequence - Ledger sequence + * @returns this OperationCallBuilder instance */ public forLedger(sequence: number | string): this { return this.forEndpoint("ledgers", sequence.toString()); @@ -73,9 +71,9 @@ export class OperationCallBuilder extends CallBuilder< /** * This endpoint represents all operations that are part of a given transaction. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-transactions-operations|Operations for Transaction} - * @param {string} transactionId Transaction ID - * @returns {OperationCallBuilder} this OperationCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-transactions-operations | Operations for Transaction} + * @param transactionId - Transaction ID + * @returns this OperationCallBuilder instance */ public forTransaction(transactionId: string): this { return this.forEndpoint("transactions", transactionId); @@ -84,8 +82,8 @@ export class OperationCallBuilder extends CallBuilder< /** * This endpoint represents all operations involving a particular liquidity pool. * - * @param {string} poolId liquidity pool ID - * @returns {OperationCallBuilder} this OperationCallBuilder instance + * @param poolId - liquidity pool ID + * @returns this OperationCallBuilder instance */ public forLiquidityPool(poolId: string): this { return this.forEndpoint("liquidity_pools", poolId); @@ -95,8 +93,8 @@ export class OperationCallBuilder extends CallBuilder< * Adds a parameter defining whether to include failed transactions. * By default, only operations of successful transactions are returned. * - * @param {boolean} value Set to `true` to include operations of failed transactions. - * @returns {OperationCallBuilder} this OperationCallBuilder instance + * @param value - Set to `true` to include operations of failed transactions. + * @returns this OperationCallBuilder instance */ public includeFailed(value: boolean): this { this.url.searchParams.set("include_failed", value.toString()); diff --git a/src/horizon/orderbook_call_builder.ts b/src/horizon/orderbook_call_builder.ts index ed0524ae6..6e5268750 100644 --- a/src/horizon/orderbook_call_builder.ts +++ b/src/horizon/orderbook_call_builder.ts @@ -6,16 +6,14 @@ import type { HttpClient } from "../http-client/index.js"; /** * Creates a new {@link OrderbookCallBuilder} pointed to server defined by serverUrl. * - * Do not create this object directly, use {@link Horizon.Server#orderbook}. + * Do not create this object directly, use {@link Horizon.Server.orderbook}. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/order-books|Orderbook Details} + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/order-books | Orderbook Details} * - * @augments CallBuilder - * @private - * @class - * @param {string} serverUrl serverUrl Horizon server URL. - * @param {Asset} selling Asset being sold - * @param {Asset} buying Asset being bought + * @internal + * @param serverUrl - serverUrl Horizon server URL. + * @param selling - Asset being sold + * @param buying - Asset being bought */ export class OrderbookCallBuilder extends CallBuilder { constructor( diff --git a/src/horizon/path_call_builder.ts b/src/horizon/path_call_builder.ts index 6a3a4e1f6..16c809c26 100644 --- a/src/horizon/path_call_builder.ts +++ b/src/horizon/path_call_builder.ts @@ -18,19 +18,17 @@ import type { HttpClient } from "../http-client/index.js"; * payment paths from those source assets to the desired destination asset. The search's amount parameter will be * used to determine if there a given path can satisfy a payment of the desired amount. * - * Do not create this object directly, use {@link Horizon.Server#paths}. + * Do not create this object directly, use {@link Horizon.Server.paths}. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/paths|Find Payment Paths} + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/paths | Find Payment Paths} * - * @augments CallBuilder - * @private - * @class + * @internal * - * @param {string} serverUrl Horizon server URL. - * @param {string} source The sender's account ID. Any returned path must use a source that the sender can hold. - * @param {string} destination The destination account ID that any returned path should use. - * @param {Asset} destinationAsset The destination asset. - * @param {string} destinationAmount The amount, denominated in the destination asset, that any returned path should be able to satisfy. + * @param serverUrl - Horizon server URL. + * @param source - The sender's account ID. Any returned path must use a source that the sender can hold. + * @param destination - The destination account ID that any returned path should use. + * @param destinationAsset - The destination asset. + * @param destinationAmount - The amount, denominated in the destination asset, that any returned path should be able to satisfy. */ export class PathCallBuilder extends CallBuilder< ServerApi.CollectionPage diff --git a/src/horizon/payment_call_builder.ts b/src/horizon/payment_call_builder.ts index 93b68b64b..1f7d38319 100644 --- a/src/horizon/payment_call_builder.ts +++ b/src/horizon/payment_call_builder.ts @@ -5,15 +5,13 @@ import type { HttpClient } from "../http-client/index.js"; /** * Creates a new {@link PaymentCallBuilder} pointed to server defined by serverUrl. * - * Do not create this object directly, use {@link Horizon.Server#payments}. + * Do not create this object directly, use {@link Horizon.Server.payments}. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/horizon/resources/list-all-payments/|All Payments} + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/horizon/resources/list-all-payments/ | All Payments} * - * @augments CallBuilder - * @private - * @class + * @internal * - * @param {string} serverUrl Horizon server URL. + * @param serverUrl - Horizon server URL. */ export class PaymentCallBuilder extends CallBuilder< ServerApi.CollectionPage< @@ -32,9 +30,9 @@ export class PaymentCallBuilder extends CallBuilder< /** * This endpoint responds with a collection of Payment operations where the given account was either the sender or receiver. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/horizon/resources/get-payments-by-account-id|Payments for Account} - * @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` - * @returns {PaymentCallBuilder} this PaymentCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/horizon/resources/get-payments-by-account-id | Payments for Account} + * @param accountId - For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` + * @returns this PaymentCallBuilder instance */ public forAccount(accountId: string): this { return this.forEndpoint("accounts", accountId); @@ -42,9 +40,9 @@ export class PaymentCallBuilder extends CallBuilder< /** * This endpoint represents all payment operations that are part of a valid transactions in a given ledger. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/horizon/resources/retrieve-a-ledgers-payments|Payments for Ledger} - * @param {number|string} sequence Ledger sequence - * @returns {PaymentCallBuilder} this PaymentCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/horizon/resources/retrieve-a-ledgers-payments | Payments for Ledger} + * @param sequence - Ledger sequence + * @returns this PaymentCallBuilder instance */ public forLedger(sequence: number | string): this { return this.forEndpoint("ledgers", sequence.toString()); @@ -52,9 +50,9 @@ export class PaymentCallBuilder extends CallBuilder< /** * This endpoint represents all payment operations that are part of a given transaction. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/transactions/payments/|Payments for Transaction} - * @param {string} transactionId Transaction ID - * @returns {PaymentCallBuilder} this PaymentCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/transactions/payments/ | Payments for Transaction} + * @param transactionId - Transaction ID + * @returns this PaymentCallBuilder instance */ public forTransaction(transactionId: string): this { return this.forEndpoint("transactions", transactionId); @@ -64,8 +62,8 @@ export class PaymentCallBuilder extends CallBuilder< * Adds a parameter defining whether to include failed transactions. * By default, only operations of successful transactions are returned. * - * @param {boolean} value Set to `true` to include operations of failed transactions. - * @returns {PaymentCallBuilder} this PaymentCallBuilder instance + * @param value - Set to `true` to include operations of failed transactions. + * @returns this PaymentCallBuilder instance */ public includeFailed(value: boolean): this { this.url.searchParams.set("include_failed", value.toString()); diff --git a/src/horizon/server.ts b/src/horizon/server.ts index 50db9da3d..153be9fa9 100644 --- a/src/horizon/server.ts +++ b/src/horizon/server.ts @@ -46,9 +46,7 @@ import type { HttpClient } from "../http-client/index.js"; /** * Default transaction submission timeout for Horizon requests, in milliseconds - * @constant {number} - * @default 60000 - * @memberof module:Horizon.Server + * @defaultValue 60000 */ export const SUBMIT_TRANSACTION_TIMEOUT: number = 60 * 1000; @@ -65,18 +63,15 @@ function getAmountInLumens(amt: BigNumber) { /** * Server handles the network connection to a [Horizon](https://developers.stellar.org/docs/data/horizon) * instance and exposes an interface for requests to that instance. - * @class - * @alias module:Horizon.Server - * @memberof module:Horizon * - * @param {string} serverURL Horizon Server URL (ex. `https://horizon-testnet.stellar.org`). - * @param {module:Horizon.Server.Options} [opts] Options object + * @param serverURL - Horizon Server URL (ex. `https://horizon-testnet.stellar.org`). + * @param opts - (optional) Options object */ export class HorizonServer { /** * Horizon Server URL (ex. `https://horizon-testnet.stellar.org`) * - * @todo Solve `this.serverURL`. + * TODO: Solve `this.serverURL`. */ public readonly serverURL: URL; @@ -85,6 +80,7 @@ export class HorizonServer { * Exposes interceptors, defaults, and other configuration options. * * @example + * ```ts * // Add authentication header * server.httpClient.defaults.headers['Authorization'] = 'Bearer token'; * @@ -93,6 +89,7 @@ export class HorizonServer { * console.log('Request:', config.url); * return config; * }); + * ``` */ public readonly httpClient: HttpClient; constructor(serverURL: string, opts: HorizonServer.Options = {}) { @@ -138,6 +135,7 @@ export class HorizonServer { * the transaction built and signed before submitting. * * @example + * ```ts * const transaction = new StellarSdk.TransactionBuilder(accountId, { * fee: await StellarSdk.Server.fetchBaseFee(), * timebounds: await StellarSdk.Server.fetchTimebounds(100) @@ -146,11 +144,12 @@ export class HorizonServer { * // normally we would need to call setTimeout here, but setting timebounds * // earlier does the trick! * .build(); + * ``` * - * @param {number} seconds Number of seconds past the current time to wait. - * @param {boolean} [_isRetry] True if this is a retry. Only set this internally! + * @param seconds - Number of seconds past the current time to wait. + * @param _isRetry - (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} Promise that resolves a `Timebounds` object + * @returns Promise that resolves a `Timebounds` object * (with the shape `{ minTime: 0, maxTime: N }`) that you can set the `timebounds` option to. */ public async fetchTimebounds( @@ -189,7 +188,7 @@ export class HorizonServer { * 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! - * @returns {Promise} Promise that resolves to the base fee. + * @returns Promise that resolves to the base fee. */ public async fetchBaseFee(): Promise { const response = await this.feeStats(); @@ -199,8 +198,8 @@ export class HorizonServer { /** * Fetch the fee stats endpoint. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/fee-stats|Fee Stats} - * @returns {Promise} Promise that resolves to the fee stats returned by Horizon. + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/fee-stats | Fee Stats} + * @returns Promise that resolves to the fee stats returned by Horizon. */ public async feeStats(): Promise { const cb = new CallBuilder( @@ -213,7 +212,7 @@ export class HorizonServer { /** * Fetch the Horizon server's root endpoint. - * @returns {Promise} Promise that resolves to the root endpoint returned by Horizon. + * @returns Promise that resolves to the root endpoint returned by Horizon. */ public async root(): Promise { const cb = new CallBuilder( @@ -226,7 +225,7 @@ export class HorizonServer { /** * Submits a transaction to the network. * - * By default this function calls {@link Horizon.Server#checkMemoRequired}, you can + * By default this function calls {@link Horizon.Server.checkMemoRequired}, you can * skip this check by setting the option `skipMemoRequiredCheck` to `true`. * * If you submit any number of `manageOffer` operations, this will add an @@ -247,6 +246,7 @@ export class HorizonServer { * `amountBought` or `amountSold` have already been transferred. * * @example + * ```ts * const res = { * ...response, * offerResults: [ @@ -314,14 +314,15 @@ export class HorizonServer { * } * ] * } + * ``` * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/submit-a-transaction|Submit a Transaction} - * @param {Transaction|FeeBumpTransaction} transaction - The transaction to submit. - * @param {object} [opts] Options object - * @param {boolean} [opts.skipMemoRequiredCheck] - Allow skipping memo + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/submit-a-transaction | Submit a Transaction} + * @param transaction - The transaction to submit. + * @param opts - (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} Promise that resolves or rejects with response from + * @returns Promise that resolves or rejects with response from * horizon. */ public async submitTransaction( @@ -543,16 +544,16 @@ export class HorizonServer { * and waits for the transaction to be ingested in Horizon, this endpoint relays the response from * core directly back to the user. * - * By default, this function calls {@link HorizonServer#checkMemoRequired}, you can + * By default, this function calls {@link HorizonServer.checkMemoRequired}, you can * skip this check by setting the option `skipMemoRequiredCheck` to `true`. * * @see [Submit-Async-Transaction](https://developers.stellar.org/docs/data/horizon/api-reference/resources/submit-async-transaction) - * @param {Transaction|FeeBumpTransaction} transaction - The transaction to submit. - * @param {object} [opts] Options object - * @param {boolean} [opts.skipMemoRequiredCheck] - Allow skipping memo + * @param transaction - The transaction to submit. + * @param opts - (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} Promise that resolves or rejects with response from + * @returns Promise that resolves or rejects with response from * horizon. */ public async submitAsyncTransaction( @@ -595,28 +596,28 @@ export class HorizonServer { } /** - * @returns {AccountCallBuilder} New {@link AccountCallBuilder} object configured by a current Horizon server configuration. + * @returns New {@link AccountCallBuilder} object configured by a current Horizon server configuration. */ public accounts(): AccountCallBuilder { return new AccountCallBuilder(this.serverURL, this.httpClient); } /** - * @returns {ClaimableBalanceCallBuilder} New {@link ClaimableBalanceCallBuilder} object configured by a current Horizon server configuration. + * @returns New {@link ClaimableBalanceCallBuilder} object configured by a current Horizon server configuration. */ public claimableBalances(): ClaimableBalanceCallBuilder { return new ClaimableBalanceCallBuilder(this.serverURL, this.httpClient); } /** - * @returns {LedgerCallBuilder} New {@link LedgerCallBuilder} object configured by a current Horizon server configuration. + * @returns New {@link LedgerCallBuilder} object configured by a current Horizon server configuration. */ public ledgers(): LedgerCallBuilder { return new LedgerCallBuilder(this.serverURL, this.httpClient); } /** - * @returns {TransactionCallBuilder} New {@link TransactionCallBuilder} object configured by a current Horizon server configuration. + * @returns New {@link TransactionCallBuilder} object configured by a current Horizon server configuration. */ public transactions(): TransactionCallBuilder { return new TransactionCallBuilder(this.serverURL, this.httpClient); @@ -628,22 +629,24 @@ export class HorizonServer { * You can query all offers for account using the function `.accountId`. * * @example + * ```ts * server.offers() * .forAccount(accountId).call() * .then(function(offers) { * console.log(offers); * }); + * ``` * - * @returns {OfferCallBuilder} New {@link OfferCallBuilder} object + * @returns New {@link OfferCallBuilder} object */ public offers(): OfferCallBuilder { return new OfferCallBuilder(this.serverURL, this.httpClient); } /** - * @param {Asset} selling Asset being sold - * @param {Asset} buying Asset being bought - * @returns {OrderbookCallBuilder} New {@link OrderbookCallBuilder} object configured by a current Horizon server configuration. + * @param selling - Asset being sold + * @param buying - Asset being bought + * @returns New {@link OrderbookCallBuilder} object configured by a current Horizon server configuration. */ public orderbook(selling: Asset, buying: Asset): OrderbookCallBuilder { return new OrderbookCallBuilder( @@ -657,21 +660,21 @@ export class HorizonServer { /** * Returns - * @returns {TradesCallBuilder} New {@link TradesCallBuilder} object configured by a current Horizon server configuration. + * @returns New {@link TradesCallBuilder} object configured by a current Horizon server configuration. */ public trades(): TradesCallBuilder { return new TradesCallBuilder(this.serverURL, this.httpClient); } /** - * @returns {OperationCallBuilder} New {@link OperationCallBuilder} object configured by a current Horizon server configuration. + * @returns New {@link OperationCallBuilder} object configured by a current Horizon server configuration. */ public operations(): OperationCallBuilder { return new OperationCallBuilder(this.serverURL, this.httpClient); } /** - * @returns {LiquidityPoolCallBuilder} New {@link LiquidityPoolCallBuilder} + * @returns New {@link LiquidityPoolCallBuilder} * object configured to the current Horizon server settings. */ public liquidityPools(): LiquidityPoolCallBuilder { @@ -699,10 +702,10 @@ export class HorizonServer { * 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. * - * @param {string|Asset[]} source The sender's account ID or a list of assets. Any returned path will use a source that the sender can hold. - * @param {Asset} destinationAsset The destination asset. - * @param {string} destinationAmount The amount, denominated in the destination asset, that any returned path should be able to satisfy. - * @returns {StrictReceivePathCallBuilder} New {@link StrictReceivePathCallBuilder} object configured with the current Horizon server configuration. + * @param source - The sender's account ID or a list of assets. Any returned path will use a source that the sender can hold. + * @param destinationAsset - The destination asset. + * @param destinationAmount - The amount, denominated in the destination asset, that any returned path should be able to satisfy. + * @returns New {@link StrictReceivePathCallBuilder} object configured with the current Horizon server configuration. */ public strictReceivePaths( source: string | Asset[], @@ -728,10 +731,10 @@ export class HorizonServer { * The asset and amount that is being sent. * The destination account or the destination assets. * - * @param {Asset} sourceAsset The asset to be sent. - * @param {string} sourceAmount The amount, denominated in the source asset, that any returned path should be able to satisfy. - * @param {string|Asset[]} destination The destination account or the destination assets. - * @returns {StrictSendPathCallBuilder} New {@link StrictSendPathCallBuilder} object configured with the current Horizon server configuration. + * @param sourceAsset - The asset to be sent. + * @param sourceAmount - The amount, denominated in the source asset, that any returned path should be able to satisfy. + * @param destination - The destination account or the destination assets. + * @returns New {@link StrictSendPathCallBuilder} object configured with the current Horizon server configuration. */ public strictSendPaths( sourceAsset: Asset, @@ -748,7 +751,7 @@ export class HorizonServer { } /** - * @returns {PaymentCallBuilder} New {@link PaymentCallBuilder} instance configured with the current + * @returns New {@link PaymentCallBuilder} instance configured with the current * Horizon server configuration. */ public payments(): PaymentCallBuilder { @@ -756,7 +759,7 @@ export class HorizonServer { } /** - * @returns {EffectCallBuilder} New {@link EffectCallBuilder} instance configured with the current + * @returns New {@link EffectCallBuilder} instance configured with the current * Horizon server configuration */ public effects(): EffectCallBuilder { @@ -764,10 +767,10 @@ export class HorizonServer { } /** - * @param {string} address The Stellar ID that you want Friendbot to send lumens to - * @returns {FriendbotBuilder} New {@link FriendbotBuilder} instance configured with the current + * @param address - The Stellar ID that you want Friendbot to send lumens to + * @returns New {@link FriendbotBuilder} instance configured with the current * Horizon server configuration - * @private + * @internal */ public friendbot(address: string): FriendbotBuilder { return new FriendbotBuilder(this.serverURL, this.httpClient, address); @@ -776,7 +779,7 @@ export class HorizonServer { /** * Get a new {@link AssetsCallBuilder} instance configured with the current * Horizon server configuration. - * @returns {AssetsCallBuilder} New AssetsCallBuilder instance + * @returns New AssetsCallBuilder instance */ public assets(): AssetsCallBuilder { return new AssetsCallBuilder(this.serverURL, this.httpClient); @@ -786,9 +789,9 @@ export class HorizonServer { * Fetches an account's most current state in the ledger, then creates and * returns an {@link AccountResponse} object. * - * @param {string} accountId - The account to load. + * @param accountId - The account to load. * - * @returns {Promise} Returns a promise to the {@link AccountResponse} object + * @returns Returns a promise to the {@link AccountResponse} object * with populated sequence number. */ public async loadAccount(accountId: string): Promise { @@ -799,14 +802,14 @@ export class HorizonServer { /** * - * @param {Asset} base base asset - * @param {Asset} counter counter asset - * @param {number} start_time lower time boundary represented as millis since epoch - * @param {number} end_time upper time boundary represented as millis since epoch - * @param {number} resolution 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). - * @param {number} offset 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. + * @param base - base asset + * @param counter - counter asset + * @param start_time - lower time boundary represented as millis since epoch + * @param end_time - upper time boundary represented as millis since epoch + * @param resolution - 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). + * @param offset - 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 {@link TradeAggregationCallBuilder} object configured with the current Horizon server configuration. - * @returns {TradeAggregationCallBuilder} New TradeAggregationCallBuilder instance + * @returns New TradeAggregationCallBuilder instance */ public tradeAggregation( base: Asset, @@ -839,12 +842,11 @@ export class HorizonServer { * Each account is checked sequentially instead of loading multiple accounts * at the same time from Horizon. * - * @see {@link https://stellar.org/protocol/sep-29|SEP-29: Account Memo Requirements} - * @param {Transaction} transaction - The transaction to check. - * @returns {Promise} - If any of the destination account + * @see {@link https://stellar.org/protocol/sep-29 | SEP-29: Account Memo Requirements} + * @param transaction - The transaction to check. + * @returns - If any of the destination account * requires a memo, the promise will throw {@link AccountRequiresMemoError}. - * @throws {AccountRequiresMemoError} - */ + * @throws */ public async checkMemoRequired( transaction: Transaction | FeeBumpTransaction, ): Promise { @@ -911,16 +913,15 @@ export class HorizonServer { export namespace HorizonServer { /** * Options for configuring connections to Horizon servers. - * @memberof module:Horizon.Server - * @property {boolean} [allowHttp] Allow connecting to http servers, default: `false`. This must be set to false in production deployments! You can also use {@link Config} class to set this globally. - * @property {string} [appName] Allow set custom header `X-App-Name`, default: `undefined`. - * @property {string} [appVersion] Allow set custom header `X-App-Version`, default: `undefined`. - * @property {string} [authToken] Allow set custom header `X-Auth-Token`, default: `undefined`. */ export interface Options { + /** Allow connecting to http servers, default: `false`. This must be set to false in production deployments! You can also use {@link Config} class to set this globally. */ allowHttp?: boolean; + /** Allow set custom header `X-App-Name`, default: `undefined`. */ appName?: string; + /** Allow set custom header `X-App-Version`, default: `undefined`. */ appVersion?: string; + /** Allow set custom header `X-Auth-Token`, default: `undefined`. */ authToken?: string; headers?: Record; } diff --git a/src/horizon/strict_receive_path_call_builder.ts b/src/horizon/strict_receive_path_call_builder.ts index ae2907476..0b324731a 100644 --- a/src/horizon/strict_receive_path_call_builder.ts +++ b/src/horizon/strict_receive_path_call_builder.ts @@ -22,18 +22,16 @@ import type { HttpClient } from "../http-client/index.js"; * If a list of assets is passed as the source, horizon will find any payment * paths from those source assets to the desired destination asset. * - * Do not create this object directly, use {@link Horizon.Server#strictReceivePaths}. + * Do not create this object directly, use {@link Horizon.Server.strictReceivePaths}. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/paths|Find Payment Paths} + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/paths | Find Payment Paths} * - * @augments CallBuilder - * @private - * @class + * @internal * - * @param {string} serverUrl Horizon server URL. - * @param {string|Asset[]} source The sender's account ID or a list of Assets. Any returned path must use a source that the sender can hold. - * @param {Asset} destinationAsset The destination asset. - * @param {string} destinationAmount The amount, denominated in the destination asset, that any returned path should be able to satisfy. + * @param serverUrl - Horizon server URL. + * @param source - The sender's account ID or a list of Assets. Any returned path must use a source that the sender can hold. + * @param destinationAsset - The destination asset. + * @param destinationAmount - The amount, denominated in the destination asset, that any returned path should be able to satisfy. */ export class StrictReceivePathCallBuilder extends CallBuilder< ServerApi.CollectionPage diff --git a/src/horizon/strict_send_path_call_builder.ts b/src/horizon/strict_send_path_call_builder.ts index 71daa9958..ed3be00b7 100644 --- a/src/horizon/strict_send_path_call_builder.ts +++ b/src/horizon/strict_send_path_call_builder.ts @@ -21,18 +21,16 @@ import type { HttpClient } from "../http-client/index.js"; * used to determine if there a given path can satisfy a payment of the desired * amount. * - * Do not create this object directly, use {@link Horizon.Server#strictSendPaths}. + * Do not create this object directly, use {@link Horizon.Server.strictSendPaths}. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/paths|Find Payment Paths} + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/aggregations/paths | Find Payment Paths} * - * @augments CallBuilder - * @private - * @class + * @internal * - * @param {string} serverUrl Horizon server URL. - * @param {Asset} sourceAsset The asset to be sent. - * @param {string} sourceAmount The amount, denominated in the source asset, that any returned path should be able to satisfy. - * @param {string|Asset[]} destination The destination account or the destination assets. + * @param serverUrl - Horizon server URL. + * @param sourceAsset - The asset to be sent. + * @param sourceAmount - The amount, denominated in the source asset, that any returned path should be able to satisfy. + * @param destination - The destination account or the destination assets. * */ export class StrictSendPathCallBuilder extends CallBuilder< diff --git a/src/horizon/trade_aggregation_call_builder.ts b/src/horizon/trade_aggregation_call_builder.ts index 9f24bd162..9bcd9ec39 100644 --- a/src/horizon/trade_aggregation_call_builder.ts +++ b/src/horizon/trade_aggregation_call_builder.ts @@ -13,19 +13,17 @@ const allowedResolutions = [ /** * Trade Aggregations facilitate efficient gathering of historical trade data. * - * Do not create this object directly, use {@link Horizon.Server#tradeAggregation}. + * Do not create this object directly, use {@link Horizon.Server.tradeAggregation}. * - * @augments CallBuilder - * @private - * @class + * @internal * - * @param {string} serverUrl serverUrl Horizon server URL. - * @param {Asset} base base asset - * @param {Asset} counter counter asset - * @param {number} start_time lower time boundary represented as millis since epoch - * @param {number} end_time upper time boundary represented as millis since epoch - * @param {number} resolution segment duration as millis since epoch. *Supported values are 1 minute (60000), 5 minutes (300000), 15 minutes (900000), 1 hour (3600000), 1 day (86400000) and 1 week (604800000). - * @param {number} offset 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. + * @param serverUrl - serverUrl Horizon server URL. + * @param base - base asset + * @param counter - counter asset + * @param start_time - lower time boundary represented as millis since epoch + * @param end_time - upper time boundary represented as millis since epoch + * @param resolution - segment duration as millis since epoch. *Supported values are 1 minute (60000), 5 minutes (300000), 15 minutes (900000), 1 hour (3600000), 1 day (86400000) and 1 week (604800000). + * @param offset - 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. */ export class TradeAggregationCallBuilder extends CallBuilder< ServerApi.CollectionPage @@ -77,19 +75,19 @@ export class TradeAggregationCallBuilder extends CallBuilder< } /** - * @private - * @param {number} resolution Trade data resolution in milliseconds - * @returns {boolean} true if the resolution is allowed + * @internal + * @param resolution - Trade data resolution in milliseconds + * @returns true if the resolution is allowed */ private isValidResolution(resolution: number): boolean { return allowedResolutions.some((allowed) => allowed === resolution); } /** - * @private - * @param {number} offset Time offset in milliseconds - * @param {number} resolution Trade data resolution in milliseconds - * @returns {boolean} true if the offset is valid + * @internal + * @param offset - Time offset in milliseconds + * @param resolution - Trade data resolution in milliseconds + * @returns true if the offset is valid */ private isValidOffset(offset: number, resolution: number): boolean { const hour = 3600000; diff --git a/src/horizon/trades_call_builder.ts b/src/horizon/trades_call_builder.ts index 43fb570fc..fb59cb44a 100644 --- a/src/horizon/trades_call_builder.ts +++ b/src/horizon/trades_call_builder.ts @@ -6,15 +6,13 @@ import type { HttpClient } from "../http-client/index.js"; /** * Creates a new {@link TradesCallBuilder} pointed to server defined by serverUrl. * - * Do not create this object directly, use {@link Horizon.Server#trades}. + * Do not create this object directly, use {@link Horizon.Server.trades}. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/trades|Trades} + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/trades | Trades} * - * @augments CallBuilder - * @private - * @class + * @internal * - * @param {string} serverUrl serverUrl Horizon server URL. + * @param serverUrl - serverUrl Horizon server URL. */ export class TradesCallBuilder extends CallBuilder< ServerApi.CollectionPage @@ -26,9 +24,9 @@ export class TradesCallBuilder extends CallBuilder< /** * Filter trades for a specific asset pair (orderbook) - * @param {Asset} base asset - * @param {Asset} counter asset - * @returns {TradesCallBuilder} current TradesCallBuilder instance + * @param base - asset + * @param counter - asset + * @returns current TradesCallBuilder instance */ public forAssetPair(base: Asset, counter: Asset): this { const baseIssuer = base.getIssuer(); @@ -52,8 +50,8 @@ export class TradesCallBuilder extends CallBuilder< /** * Filter trades for a specific offer - * @param {string} offerId ID of the offer - * @returns {TradesCallBuilder} current TradesCallBuilder instance + * @param offerId - ID of the offer + * @returns current TradesCallBuilder instance */ public forOffer(offerId: string): this { this.url.searchParams.set("offer_id", offerId); @@ -62,8 +60,8 @@ export class TradesCallBuilder extends CallBuilder< /** * Filter trades by a specific type. - * @param {ServerApi.TradeType} tradeType the trade type to filter by. - * @returns {TradesCallBuilder} current TradesCallBuilder instance. + * @param tradeType - the trade type to filter by. + * @returns current TradesCallBuilder instance. */ public forType(tradeType: ServerApi.TradeType): this { this.url.searchParams.set("trade_type", tradeType); @@ -72,9 +70,9 @@ export class TradesCallBuilder extends CallBuilder< /** * Filter trades for a specific account - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-trades-by-account-id|Trades for Account} - * @param {string} accountId For example: `GBYTR4MC5JAX4ALGUBJD7EIKZVM7CUGWKXIUJMRSMK573XH2O7VAK3SR` - * @returns {TradesCallBuilder} current TradesCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-trades-by-account-id | Trades for Account} + * @param accountId - For example: `GBYTR4MC5JAX4ALGUBJD7EIKZVM7CUGWKXIUJMRSMK573XH2O7VAK3SR` + * @returns current TradesCallBuilder instance */ public forAccount(accountId: string): this { return this.forEndpoint("accounts", accountId); @@ -82,9 +80,9 @@ export class TradesCallBuilder extends CallBuilder< /** * Filter trades for a specific liquidity pool - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-related-trades|Trades for Liquidity Pool} - * @param {string} liquidityPoolId For example: `3b476aff8a406a6ec3b61d5c038009cef85f2ddfaf616822dc4fec92845149b4` - * @returns {TradesCallBuilder} current TradesCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-related-trades | Trades for Liquidity Pool} + * @param liquidityPoolId - For example: `3b476aff8a406a6ec3b61d5c038009cef85f2ddfaf616822dc4fec92845149b4` + * @returns current TradesCallBuilder instance */ public forLiquidityPool(liquidityPoolId: string): this { return this.forEndpoint("liquidity_pools", liquidityPoolId); diff --git a/src/horizon/transaction_call_builder.ts b/src/horizon/transaction_call_builder.ts index 9e60a6778..224d46b42 100644 --- a/src/horizon/transaction_call_builder.ts +++ b/src/horizon/transaction_call_builder.ts @@ -5,15 +5,13 @@ import type { HttpClient } from "../http-client/index.js"; /** * Creates a new {@link TransactionCallBuilder} pointed to server defined by serverUrl. * - * Do not create this object directly, use {@link Horizon.Server#transactions}. + * Do not create this object directly, use {@link Horizon.Server.transactions}. * - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-transactions|All Transactions} + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/list-all-transactions | All Transactions} * - * @augments CallBuilder - * @private - * @class + * @internal * - * @param {string} serverUrl Horizon server URL. + * @param serverUrl - Horizon server URL. */ export class TransactionCallBuilder extends CallBuilder< ServerApi.CollectionPage @@ -25,9 +23,9 @@ export class TransactionCallBuilder extends CallBuilder< /** * The transaction details endpoint provides information on a single transaction. The transaction hash provided in the hash argument specifies which transaction to load. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-transaction|Transaction Details} - * @param {string} transactionId Transaction ID - * @returns {CallBuilder} a CallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-transaction | Transaction Details} + * @param transactionId - Transaction ID + * @returns a CallBuilder instance */ public transaction( transactionId: string, @@ -42,9 +40,9 @@ export class TransactionCallBuilder extends CallBuilder< /** * This endpoint represents all transactions that affected a given account. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-transactions-by-account-id|Transactions for Account} - * @param {string} accountId For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` - * @returns {TransactionCallBuilder} current TransactionCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/get-transactions-by-account-id | Transactions for Account} + * @param accountId - For example: `GDGQVOKHW4VEJRU2TETD6DBRKEO5ERCNF353LW5WBFW3JJWQ2BRQ6KDD` + * @returns current TransactionCallBuilder instance */ public forAccount(accountId: string): this { return this.forEndpoint("accounts", accountId); @@ -52,9 +50,9 @@ export class TransactionCallBuilder extends CallBuilder< /** * This endpoint represents all transactions that reference a given claimable_balance. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/cb-retrieve-related-transactions|Transactions for Claimable Balance} - * @param {string} claimableBalanceId Claimable Balance ID - * @returns {TransactionCallBuilder} this TransactionCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/cb-retrieve-related-transactions | Transactions for Claimable Balance} + * @param claimableBalanceId - Claimable Balance ID + * @returns this TransactionCallBuilder instance */ public forClaimableBalance(claimableBalanceId: string): this { return this.forEndpoint("claimable_balances", claimableBalanceId); @@ -62,9 +60,9 @@ export class TransactionCallBuilder extends CallBuilder< /** * This endpoint represents all transactions in a given ledger. - * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-ledgers-transactions|Transactions for Ledger} - * @param {number|string} sequence Ledger sequence - * @returns {TransactionCallBuilder} current TransactionCallBuilder instance + * @see {@link https://developers.stellar.org/docs/data/horizon/api-reference/resources/retrieve-a-ledgers-transactions | Transactions for Ledger} + * @param sequence - Ledger sequence + * @returns current TransactionCallBuilder instance */ public forLedger(sequence: number | string): this { return this.forEndpoint("ledgers", sequence.toString()); @@ -73,8 +71,8 @@ export class TransactionCallBuilder extends CallBuilder< /** * This endpoint represents all transactions involving a particular liquidity pool. * - * @param {string} poolId liquidity pool ID - * @returns {TransactionCallBuilder} this TransactionCallBuilder instance + * @param poolId - liquidity pool ID + * @returns this TransactionCallBuilder instance */ public forLiquidityPool(poolId: string): this { return this.forEndpoint("liquidity_pools", poolId); @@ -83,8 +81,8 @@ export class TransactionCallBuilder extends CallBuilder< /** * Adds a parameter defining whether to include failed transactions. By default only successful transactions are * returned. - * @param {boolean} value Set to `true` to include failed transactions. - * @returns {TransactionCallBuilder} current TransactionCallBuilder instance + * @param value - Set to `true` to include failed transactions. + * @returns current TransactionCallBuilder instance */ public includeFailed(value: boolean): this { this.url.searchParams.set("include_failed", value.toString()); diff --git a/src/index.ts b/src/index.ts index 4ad9531bb..290322cfc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -19,7 +19,9 @@ export * as Horizon from "./horizon/index.js"; * `/rpc` entrypoint, if your version of Node and your TypeScript configuration * allow it: * @example + * ```ts * import { Server } from '@stellar/stellar-sdk/rpc'; + * ``` */ export * as rpc from "./rpc/index.js"; @@ -29,7 +31,9 @@ export * as rpc from "./rpc/index.js"; * entrypoint, if your version of Node and your TypeScript configuration allow * it: * @example + * ```ts * import { Client } from '@stellar/stellar-sdk/contract'; + * ``` */ export * as contract from "./contract/index.js"; export { BindingGenerator } from "./bindings/index.js"; diff --git a/src/rpc/api.ts b/src/rpc/api.ts index b63390a95..a19efa088 100644 --- a/src/rpc/api.ts +++ b/src/rpc/api.ts @@ -29,7 +29,7 @@ export namespace Api { liveUntilLedgerSeq?: number; } - /** An XDR-parsed version of {@link this.RawLedgerEntryResult} */ + /** An XDR-parsed version of {@link RawLedgerEntryResult} */ export interface GetLedgerEntriesResponse { entries: LedgerEntryResult[]; latestLedger: number; @@ -246,6 +246,7 @@ export namespace Api { * - **Cursor pagination mode**: Use `cursor` (startLedger and endLedger must be omitted) * * @example + * ```ts * // ✅ Correct: Ledger range mode * const rangeRequest: GetEventsRequest = { * filters: [], @@ -253,16 +254,20 @@ export namespace Api { * 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: [], @@ -271,6 +276,7 @@ export namespace Api { * cursor: "cursor", // ❌ Cannot use with ledger range * limit: 100 * }; + * ``` * * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getEvents | getEvents API reference} */ @@ -456,7 +462,7 @@ export namespace Api { /** * Checks if a simulation response indicates an error. - * @param sim The simulation response to check. + * @param sim - The simulation response to check. * @returns True if the response indicates an error, false otherwise. */ export function isSimulationError( @@ -467,7 +473,7 @@ export namespace Api { /** * Checks if a simulation response indicates success. - * @param sim The simulation response to check. + * @param sim - The simulation response to check. * @returns True if the response indicates success, false otherwise. */ export function isSimulationSuccess( @@ -478,7 +484,7 @@ export namespace Api { /** * Checks if a simulation response indicates that a restoration is needed. - * @param sim The simulation response to check. + * @param sim - The simulation response to check. * @returns True if the response indicates a restoration is needed, false otherwise. */ export function isSimulationRestore( @@ -493,7 +499,7 @@ export namespace Api { /** * Checks if a simulation response is in raw (unparsed) form. - * @param sim The simulation response to check. + * @param sim - The simulation response to check. * @returns True if the response is raw, false otherwise. */ export function isSimulationRaw( @@ -600,17 +606,8 @@ export namespace Api { * - **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 * - * @typedef {object} GetLedgersRequest - * @property {number} [startLedger] - Ledger sequence number to start fetching from (inclusive). - * Must be omitted if cursor is provided. Cannot be less than the oldest ledger or greater - * than the latest ledger stored on the RPC node. - * @property {object} [pagination] - Pagination configuration for the request. - * @property {string} [pagination.cursor] - Page cursor for continuing pagination from a previous - * response. Must be omitted if startLedger is provided. - * @property {number} [pagination.limit=100] - Maximum number of ledgers to return per page. - * Valid range: 1-10000. Defaults to 100 if not specified. - * * @example + * ```ts * // Ledger-based pagination - start from specific ledger * const ledgerRequest: GetLedgersRequest = { * startLedger: 36233, @@ -618,8 +615,10 @@ export namespace Api { * limit: 10 * } * }; + * ``` * * @example + * ```ts * // Cursor-based pagination - continue from previous response * const cursorRequest: GetLedgersRequest = { * pagination: { @@ -627,21 +626,41 @@ export namespace Api { * limit: 5 * } * }; + * ``` * * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgers | getLedgers API reference} */ export type GetLedgersRequest = | { + /** + * Ledger sequence number to start fetching from (inclusive). + * Must be omitted if cursor is provided. Cannot be less than the oldest ledger or greater + * than the latest ledger stored on the RPC node. + */ startLedger: number; + /** Pagination configuration for the request. */ pagination?: { cursor?: never; + /** + * Maximum number of ledgers to return per page. + * Valid range: 1-10000. Defaults to 100 if not specified. + */ limit?: number; }; } | { startLedger?: never; + /** Pagination configuration for the request. */ pagination: { + /** + * Page cursor for continuing pagination from a previous + * response. Must be omitted if startLedger is provided. + */ cursor: string; + /** + * Maximum number of ledgers to return per page. + * Valid range: 1-10000. Defaults to 100 if not specified. + */ limit?: number; }; }; diff --git a/src/rpc/index.ts b/src/rpc/index.ts index 165f463d9..0702cfc65 100644 --- a/src/rpc/index.ts +++ b/src/rpc/index.ts @@ -1,5 +1,3 @@ -/** @module rpc */ - // Expose all types export * from "./api.js"; diff --git a/src/rpc/jsonrpc.ts b/src/rpc/jsonrpc.ts index 68b9af868..04b049993 100644 --- a/src/rpc/jsonrpc.ts +++ b/src/rpc/jsonrpc.ts @@ -38,12 +38,12 @@ function hasOwnProperty( /** * Sends the jsonrpc 'params' as a single 'param' object (no array support). * - * @param {HttpClient} client HttpClient instance to use for the request - * @param {string} url URL to the RPC instance - * @param {string} method RPC method name that should be called - * @param {(any | null)} [param=null] params that should be supplied to the method - * @returns {Promise} Promise that resolves to the result of type T - * @private + * @param client - HttpClient instance to use for the request + * @param url - URL to the RPC instance + * @param method - RPC method name that should be called + * @param param - (optional) params that should be supplied to the method + * @returns Promise that resolves to the result of type T + * @internal */ export async function postObject( client: HttpClient, diff --git a/src/rpc/parsers.ts b/src/rpc/parsers.ts index 6529f6aa0..1f4e48677 100644 --- a/src/rpc/parsers.ts +++ b/src/rpc/parsers.ts @@ -3,11 +3,10 @@ import { Api } from "./api.js"; /** * Parse the response from invoking the `submitTransaction` method of a RPC server. - * @memberof module:rpc - * @private + * @internal * - * @param {Api.RawSendTransactionResponse} raw the raw `submitTransaction` response from the RPC server to parse - * @returns {Api.SendTransactionResponse} transaction response parsed from the RPC server's response + * @param raw - the raw `submitTransaction` response from the RPC server to parse + * @returns transaction response parsed from the RPC server's response */ export function parseRawSendTransaction( raw: Api.RawSendTransactionResponse, @@ -88,11 +87,10 @@ export function parseRawTransactions( /** * Parse and return the retrieved events, if any, from a raw response from a * RPC server. - * @memberof module:rpc * - * @param {Api.RawGetEventsResponse} raw the raw `getEvents` response from the + * @param raw - the raw `getEvents` response from the * RPC server to parse - * @returns {Api.GetEventsResponse} events parsed from the RPC server's + * @returns events parsed from the RPC server's * response */ export function parseRawEvents( @@ -127,12 +125,11 @@ export function parseRawEvents( /** * Parse and return the retrieved ledger entries, if any, from a raw response * from a RPC server. - * @memberof module:rpc - * @private + * @internal * - * @param {Api.RawGetLedgerEntriesResponse} raw the raw `getLedgerEntries` + * @param raw - the raw `getLedgerEntries` * response from the RPC server to parse - * @returns {Api.GetLedgerEntriesResponse} ledger entries parsed from the + * @returns ledger entries parsed from the * RPC server's response */ export function parseRawLedgerEntries( @@ -162,18 +159,15 @@ export function parseRawLedgerEntries( /** * Parse whether or not the transaction simulation was successful, returning the * relevant response. - * @memberof module:rpc - * @private + * @internal * - * @param {Api.RawSimulateTransactionResponse} sim a raw response from the + * @param sim - a raw response from the * `simulateTransaction` method of the RPC server to parse - * @param {Api.BaseSimulateTransactionResponse} partial a partially built + * @param partial - a partially built * simulate transaction response that will be used to build the return * response - * @returns {Api.SimulateTransactionRestoreResponse | - * Api.SimulateTransactionSuccessResponse} Either a simulation response - * indicating what ledger entries should be restored, or if the simulation - * was successful. + * @returns Either a simulation response indicating what ledger entries + * should be restored, or if the simulation was successful. */ function parseSuccessful( sim: Api.RawSimulateTransactionResponse, @@ -232,12 +226,12 @@ function parseSuccessful( /** * Converts a raw response schema into one with parsed XDR fields and a simplified interface. - * @warning This API is only exported for testing purposes and should not be relied on or considered "stable". - * @memberof module:rpc * - * @param {Api.SimulateTransactionResponse | Api.RawSimulateTransactionResponse} sim the raw response schema (parsed ones are allowed, best-effort + * **Warning:** This API is only exported for testing purposes and should not be relied on or considered "stable". + * + * @param sim - the raw response schema (parsed ones are allowed, best-effort * detected, and returned untouched) - * @returns {Api.SimulateTransactionResponse} the original parameter (if already parsed), parsed otherwise + * @returns the original parameter (if already parsed), parsed otherwise */ export function parseRawSimulation( sim: Api.SimulateTransactionResponse | Api.RawSimulateTransactionResponse, diff --git a/src/rpc/server.ts b/src/rpc/server.ts index 63d4d45f2..118dcb591 100644 --- a/src/rpc/server.ts +++ b/src/rpc/server.ts @@ -35,16 +35,12 @@ import type { HttpClient } from "../http-client/index.js"; /** * Default transaction submission timeout for RPC requests, in milliseconds - * @constant {number} - * @default 60000 - * @memberof module:rpc.Server + * @defaultValue 60000 */ export const SUBMIT_TRANSACTION_TIMEOUT = 60 * 1000; /** * Specifies the durability namespace of contract-related ledger entries. - * @enum {('temporary' | 'persistent')} - * @memberof module:rpc * * @see {@link https://developers.stellar.org/docs/learn/smart-contract-internals/state-archival | State Archival docs} * @see {@link https://docs.rs/soroban-sdk/latest/soroban_sdk/storage/struct.Storage.html | Rust SDK Storage docs} @@ -54,20 +50,6 @@ export enum Durability { Persistent = "persistent", } -/** - * @typedef {object} ResourceLeeway Describes additional resource leeways for transaction simulation. - * @property {number} cpuInstructions Simulate the transaction with more CPU instructions available. - * @memberof module:rpc.Server - */ - -/** - * @typedef {object} Options Options for configuring connections to RPC servers. - * @property {boolean} [allowHttp=false] Allow connecting to http servers, default: `false`. This must be set to false in production deployments! - * @property {number} [timeout=0] Allow a timeout, default: 0. Allows user to avoid nasty lag. You can also use {@link Config} class to set this globally. - * @property {Record} [headers] Additional headers that should be added to any requests to the RPC server. - * @memberof module:rpc.Server - */ - export namespace RpcServer { /** * @deprecated Use `Api.GetEventsRequest` instead. @@ -82,26 +64,21 @@ export namespace RpcServer { /** * Describes additional resource leeways for transaction simulation. - * @property {number} cpuInstructions Simulate the transaction with more CPU instructions available. - * @memberof module:rpc.Server */ export interface ResourceLeeway { + /** Simulate the transaction with more CPU instructions available. */ cpuInstructions: number; } /** * Options for configuring connections to RPC servers. - * - * @property {boolean} allowHttp - Allow connecting to http servers, default: `false`. This must be set to false in production deployments! - * @property {number} timeout - Allow a timeout, default: 0. Allows user to avoid nasty lag. - * @property {Record} headers - Additional headers that should be added to any requests to the RPC server. - * - * @alias module:rpc.Server.Options - * @memberof module:rpc.Server */ export interface Options { + /** Allow connecting to http servers, default: `false`. This must be set to false in production deployments! */ allowHttp?: boolean; + /** Allow a timeout, default: 0. Allows user to avoid nasty lag. */ timeout?: number; + /** Additional headers that should be added to any requests to the RPC server. */ headers?: Record; } } @@ -157,20 +134,17 @@ function findCreatedAccountSequenceInTransactionMeta( throw new Error("No account created in transaction"); } -/* eslint-disable jsdoc/no-undefined-types */ /** * Handles the network connection to a Soroban RPC instance, exposing an * interface for requests to that instance. * - * @alias module:rpc.Server - * @memberof module:rpc * - * @param {string} serverURL Soroban-RPC Server URL (ex. `http://localhost:8000/soroban/rpc`). - * @param {module:rpc.Server.Options} [opts] Options object - * @param {boolean} [opts.allowHttp] Allows connecting to insecure http servers + * @param serverURL - Soroban-RPC Server URL (ex. `http://localhost:8000/soroban/rpc`). + * @param opts - (optional) Options object + * - `allowHttp` (optional): Allows connecting to insecure http servers * (default: `false`). This must be set to false in production deployments! * You can also use {@link Config} class to set this globally. - * @param {Record} [opts.headers] Allows setting custom headers + * - `headers` (optional): Allows setting custom headers * * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods | API reference docs} */ @@ -181,6 +155,7 @@ export class RpcServer { * Exposes interceptors, defaults, and other configuration options. * * @example + * ```ts * // Add authentication header * server.httpClient.defaults.headers['Authorization'] = 'Bearer token'; * @@ -189,12 +164,12 @@ export class RpcServer { * console.log('Request:', config.url); * return config; * }); + * ``` */ public readonly httpClient: HttpClient; constructor(serverURL: string, opts: RpcServer.Options = {}) { /** * RPC Server URL (ex. `http://localhost:8000/soroban/rpc`). - * @member {URL} */ this.serverURL = new URL(serverURL); this.httpClient = createHttpClient(opts.headers); @@ -211,17 +186,19 @@ export class RpcServer { * Needed to get the current sequence number for the account so you can build * a successful transaction with {@link TransactionBuilder}. * - * @param {string} address The public address of the account to load. - * @returns {Promise} A promise which resolves to the {@link Account} + * @param address - The public address of the account to load. + * @returns A promise which resolves to the {@link Account} * object with a populated sequence number * * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgerEntries | getLedgerEntries docs} * * @example + * ```ts * const accountId = "GBZC6Y2Y7Q3ZQ2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4"; * server.getAccount(accountId).then((account) => { * console.log("sequence:", account.sequence); * }); + * ``` */ public async getAccount(address: string): Promise { const entry = await this.getAccountEntry(address); @@ -231,18 +208,20 @@ export class RpcServer { /** * Fetch the full account entry for a Stellar account. * - * @param {string} address The public address of the account to load. - * @returns {Promise} Resolves to the full on-chain account + * @param address - The public address of the account to load. + * @returns Resolves to the full on-chain account * entry * * @see * {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgerEntries | getLedgerEntries docs} * * @example + * ```ts * const accountId = "GBZC6Y2Y7Q3ZQ2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4"; * server.getAccountEntry(accountId).then((account) => { * console.log("sequence:", account.balance().toString()); * }); + * ``` */ public async getAccountEntry(address: string): Promise { const ledgerKey = xdr.LedgerKey.account( @@ -262,9 +241,9 @@ export class RpcServer { /** * Fetch the full trustline entry for a Stellar account. * - * @param {string} account The public address of the account whose trustline it is - * @param {string} asset The trustline's asset - * @returns {Promise} Resolves to the full on-chain trustline + * @param account - The public address of the account whose trustline it is + * @param asset - The trustline's asset + * @returns Resolves to the full on-chain trustline * entry * * @see @@ -272,6 +251,7 @@ export class RpcServer { * * @deprecated Use {@link getAssetBalance}, instead * @example + * ```ts * const accountId = "GBZC6Y2Y7Q3ZQ2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4"; * const asset = new Asset( * "USDC", @@ -280,6 +260,7 @@ export class RpcServer { * server.getTrustline(accountId, asset).then((entry) => { * console.log(`{asset.toString()} balance for ${accountId}:", entry.balance().toString()); * }); + * ``` */ public async getTrustline( account: string, @@ -305,22 +286,24 @@ export class RpcServer { /** * Fetch the full claimable balance entry for a Stellar account. * - * @param {string} id The strkey (`B...`) or hex (`00000000abcde...`) (both + * @param id - The strkey (`B...`) or hex (`00000000abcde...`) (both * IDs with and without the 000... version prefix are accepted) of the * claimable balance to load - * @returns {Promise} Resolves to the full on-chain + * @returns Resolves to the full on-chain * claimable balance entry * * @see * {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgerEntries | getLedgerEntries docs} * * @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()}`; * }); + * ``` */ public async getClaimableBalance( id: string, @@ -365,28 +348,30 @@ export class RpcServer { * The `address` argument may be provided as a string (as a {@link StrKey}), * {@link Address}, or {@link Contract}. * - * @param {string|Address|Contract} address The account or contract whose + * @param address - The account or contract whose * balance should be fetched. - * @param {Asset} asset The asset whose balance you want to inspect. - * @param {string} [networkPassphrase] optionally, when requesting the + * @param asset - The asset whose balance you want to inspect. + * @param networkPassphrase - (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 {@link getNetwork}), since contract IDs for assets are * specific to a network. You can refer to {@link Networks} for a list of * built-in passphrases, e.g., `Networks.TESTNET`. - * @returns {Promise} Resolves with balance entry details + * @returns Resolves with balance entry details * when available. * - * @throws {Error} If the supplied `address` is not a valid account or + * @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); + * ``` */ public async getAssetBalance( address: string | Address | Contract, @@ -433,16 +418,18 @@ export class RpcServer { /** * General node health check. * - * @returns {Promise} A promise which resolves to the + * @returns A promise which resolves to the * {@link Api.GetHealthResponse} object with the status of the * server (e.g. "healthy"). * * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getHealth | getLedgerEntries docs} * * @example + * ```ts * server.getHealth().then((health) => { * console.log("status:", health.status); * }); + * ``` */ public async getHealth(): Promise { @@ -458,23 +445,24 @@ export class RpcServer { * * Allows you to directly inspect the current state of a contract. This is a * backup way to access your contract data which may not be available via - * events or {@link module:rpc.Server#simulateTransaction}. + * events or {@link rpc.Server.simulateTransaction}. * - * @param {string|Address|Contract} contract The contract ID containing the + * @param contract - The contract ID containing the * data to load as a strkey (`C...` form), a {@link Contract}, or an * {@link Address} instance - * @param {xdr.ScVal} key The key of the contract data to load - * @param {module:rpc.Durability} [durability=Durability.Persistent] The "durability + * @param key - The key of the contract data to load + * @param durability - (optional) The "durability * keyspace" that this ledger key belongs to, which is either 'temporary' - * or 'persistent' (the default), see {@link module:rpc.Durability}. - * @returns {Promise} The current data value + * or 'persistent' (the default), see {@link 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. + * **Warning:** If the data entry in question is a 'temporary' entry, it's + * entirely possible that it has expired out of existence. * * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgerEntries | getLedgerEntries docs} * * @example + * ```ts * const contractId = "CCJZ5DGASBWQXR5MPFCJXMBI333XE5U3FSJTNQU7RIKE3P5GN2K2WYD5"; * const key = xdr.ScVal.scvSymbol("counter"); * server.getContractData(contractId, key, Durability.Temporary).then(data => { @@ -483,6 +471,7 @@ export class RpcServer { * console.log("lastModified:", data.lastModifiedLedgerSeq); * console.log("latestLedger:", data.latestLedger); * }); + * ``` */ public async getContractData( @@ -543,12 +532,13 @@ export class RpcServer { * deployed on the Soroban network. The WASM bytecode represents the executable * code of the contract. * - * @param {string} contractId The contract ID containing the WASM bytecode to retrieve - * @returns {Promise} A Buffer containing the WASM bytecode - * @throws {Error} If the contract or its associated WASM bytecode cannot be + * @param contractId - 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); @@ -556,6 +546,7 @@ export class RpcServer { * }).catch(err => { * console.error("Error fetching WASM bytecode:", err); * }); + * ``` */ public async getContractWasmByContractId( contractId: string, @@ -586,12 +577,13 @@ export class RpcServer { * deployed on the Soroban network using the contract's WASM hash. The WASM bytecode * represents the executable code of the contract. * - * @param {Buffer} wasmHash The WASM hash of the contract - * @returns {Promise} A Buffer containing the WASM bytecode - * @throws {Error} If the contract or its associated WASM bytecode cannot be + * @param wasmHash - The WASM hash of the contract + * @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); @@ -599,6 +591,7 @@ export class RpcServer { * }).catch(err => { * console.error("Error fetching WASM bytecode:", err); * }); + * ``` */ public async getContractWasmByHash( wasmHash: Buffer | string, @@ -637,13 +630,14 @@ export class RpcServer { * {@link xdr.LedgerKeyContractCode} ledger entry key (or see * {@link Contract.getFootprint}). * - * @param {xdr.ScVal[]} keys One or more ledger entry keys to load - * @returns {Promise} The current on-chain + * @param keys - One or more ledger entry keys to load + * @returns The current on-chain * values for the given ledger keys * * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgerEntries | getLedgerEntries docs} * @see RpcServer._getLedgerEntries * @example + * ```ts * const contractId = "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM"; * const key = xdr.LedgerKey.contractData(new xdr.LedgerKeyContractData({ * contractId: StrKey.decodeContract(contractId), @@ -658,6 +652,7 @@ export class RpcServer { * console.log("lastModified:", ledgerData.lastModifiedLedgerSeq); * console.log("latestLedger:", response.latestLedger); * }); + * ``` */ public getLedgerEntries(...keys: xdr.LedgerKey[]) { return this._getLedgerEntries(...keys).then(parseRawLedgerEntries); @@ -690,25 +685,27 @@ export class RpcServer { * After submitting a transaction, clients can use this to poll for * transaction completion and return a definitive state of success or failure. * - * @param {string} hash the transaction you're polling for - * @param {RpcServer.PollingOptions} [opts] polling options - * @param {number} [opts.attempts] (optional) the number of attempts to make + * @param hash - the transaction you're polling for + * @param opts - (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. - * @param {SleepStrategy} [opts.sleepStrategy] (optional) the amount of time + * - `sleepStrategy` (optional): (optional) the amount of time * to wait for between each attempt. By default, sleep for 1 second between * each attempt. * - * @returns {Promise} the response after a "found" + * @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 + * ``` */ public async pollTransaction( hash: string, @@ -738,14 +735,15 @@ export class RpcServer { * After submitting a transaction, clients should poll this to tell when the * transaction has completed. * - * @param {string} hash Hex-encoded hash of the transaction to check - * @returns {Promise} The status, result, and + * @param hash - Hex-encoded hash of the transaction to check + * @returns The status, result, and * other details about the transaction * * @see * {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getTransaction | getTransaction docs} * * @example + * ```ts * const transactionHash = "c4515e3bdc0897f21cc5dbec8c82cf0a936d4741cb74a8e158eb51b9fb00411a"; * server.getTransaction(transactionHash).then((tx) => { * console.log("status:", tx.status); @@ -753,6 +751,7 @@ export class RpcServer { * console.log("resultMetaXdr:", tx.resultMetaXdr); * console.log("resultXdr:", tx.resultXdr); * }); + * ``` */ public async getTransaction( @@ -799,11 +798,12 @@ export class RpcServer { * Fetch transactions starting from a given start ledger or a cursor. The end ledger is the latest ledger * in that RPC instance. * - * @param {Api.GetTransactionsRequest} request - The request parameters. - * @returns {Promise} - A promise that resolves to the transactions response. + * @param request - The request parameters. + * @returns - A promise that resolves to the transactions response. * * @see https://developers.stellar.org/docs/data/rpc/api-reference/methods/getTransactions * @example + * ```ts * server.getTransactions({ * startLedger: 10000, * limit: 10, @@ -812,6 +812,7 @@ export class RpcServer { * console.log("Latest Ledger:", response.latestLedger); * console.log("Cursor:", response.cursor); * }); + * ``` */ public async getTransactions( request: Api.GetTransactionsRequest, @@ -852,13 +853,14 @@ export class RpcServer { * To page through events, use the `pagingToken` field on the relevant * {@link Api.EventResponse} object to set the `cursor` parameter. * - * @param {Api.GetEventsRequest} request Event filters {@link Api.GetEventsRequest}, - * @returns {Promise} A paginatable set of the events + * @param request - Event filters {@link Api.GetEventsRequest}, + * @returns A paginatable set of the events * matching the given event filters * * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getEvents | getEvents docs} * * @example + * ```ts * * server.getEvents({ * startLedger: 1000, @@ -882,6 +884,7 @@ export class RpcServer { * ], * limit: 10, * }); + * ``` */ public async getEvents( @@ -916,17 +919,19 @@ export class RpcServer { /** * Fetch metadata about the network this Soroban RPC server is connected to. * - * @returns {Promise} Metadata about the current + * @returns Metadata about the current * network this RPC server is connected to * * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getNetwork | getNetwork docs} * * @example + * ```ts * server.getNetwork().then((network) => { * console.log("friendbotUrl:", network.friendbotUrl); * console.log("passphrase:", network.passphrase); * console.log("protocolVersion:", network.protocolVersion); * }); + * ``` */ public async getNetwork(): Promise { @@ -941,17 +946,19 @@ export class RpcServer { * Fetch the latest ledger meta info from network which this Soroban RPC * server is connected to. * - * @returns {Promise} metadata about the + * @returns metadata about the * latest ledger on the network that this RPC server is connected to * * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLatestLedger | getLatestLedger docs} * * @example + * ```ts * server.getLatestLedger().then((response) => { * console.log("hash:", response.id); * console.log("sequence:", response.sequence); * console.log("protocolVersion:", response.protocolVersion); * }); + * ``` */ public async getLatestLedger(): Promise { return this._getLatestLedger().then(parseRawLatestLedger); @@ -969,20 +976,20 @@ export class RpcServer { * Submit a trial contract invocation to get back return values, expected * ledger footprint, expected authorizations, and expected costs. * - * @param {Transaction | FeeBumpTransaction} tx the transaction to simulate, + * @param tx - the transaction to simulate, * which should include exactly one operation (one of - * {@link xdr.InvokeHostFunctionOp}, {@link xdr.ExtendFootprintTTLOp}, or + * {@link xdr.InvokeHostFunctionOp}, {@link xdr.ExtendFootprintTtlOp}, or * {@link xdr.RestoreFootprintOp}). Any provided footprint or auth * information will be ignored. - * @param {RpcServer.ResourceLeeway} [addlResources] any additional resources + * @param addlResources - (optional) any additional resources * to add to the simulation-provided ones, for example if you know you will * need extra CPU instructions - * @param {Api.SimulationAuthMode} [authMode] optionally, specify the type of + * @param authMode - (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 {Promise} An object with the + * @returns An object with the * cost, footprint, result/auth requirements (if applicable), and error of * the transaction * @@ -996,6 +1003,7 @@ export class RpcServer { * @see module:rpc.assembleTransaction * * @example + * ```ts * const contractId = 'CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE'; * const contract = new StellarSdk.Contract(contractId); * @@ -1017,6 +1025,7 @@ export class RpcServer { * console.log("error:", sim.error); * console.log("latestLedger:", sim.latestLedger); * }); + * ``` */ public async simulateTransaction( @@ -1063,14 +1072,14 @@ export class RpcServer { * and validate or take appropriate measures for interaction with user to * confirm it is acceptable. * - * You can call the {@link module:rpc.Server#simulateTransaction} method + * You can call the {@link rpc.Server.simulateTransaction} method * directly first if you want to inspect estimated fees for a given * transaction in detail first, then re-assemble it manually or via - * {@link module:rpc.assembleTransaction}. + * {@link rpc.assembleTransaction}. * - * @param {Transaction | FeeBumpTransaction} tx the transaction to + * @param tx - the transaction to * prepare. It should include exactly one operation, which must be one of - * {@link xdr.InvokeHostFunctionOp}, {@link xdr.ExtendFootprintTTLOp}, + * {@link xdr.InvokeHostFunctionOp}, {@link xdr.ExtendFootprintTtlOp}, * or {@link xdr.RestoreFootprintOp}. * * Any provided footprint will be overwritten. However, if your operation @@ -1078,18 +1087,18 @@ export class RpcServer { * from the simulation. In other words, if you include auth entries, you * don't care about the auth returned from the simulation. Other fields * (footprint, etc.) will be filled as normal. - * @returns {Promise} A copy of the + * @returns 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 {jsonrpc.Error|Error|Api.SimulateTransactionErrorResponse} - * If simulation fails + * @throws * If simulation fails * * @see module:rpc.assembleTransaction * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/simulateTransaction | simulateTransaction docs} * * @example + * ```ts * const contractId = 'CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE'; * const contract = new StellarSdk.Contract(contractId); * @@ -1119,6 +1128,7 @@ export class RpcServer { * console.log("status:", result.status); * console.log("errorResultXdr:", result.errorResultXdr); * }); + * ``` */ public async prepareTransaction(tx: Transaction | FeeBumpTransaction) { const simResponse = await this.simulateTransaction(tx); @@ -1134,17 +1144,18 @@ export class RpcServer { * * Unlike Horizon, RPC does not wait for transaction completion. It * simply validates the transaction and enqueues it. Clients should call - * {@link module:rpc.Server#getTransaction} to learn about transaction + * {@link rpc.Server.getTransaction} to learn about transaction * success/failure. * - * @param {Transaction | FeeBumpTransaction} transaction to submit - * @returns {Promise} the + * @param transaction - to submit + * @returns the * transaction id, status, and any error if available * * @see {@link https://developers.stellar.org/docs/learn/fundamentals/stellar-data-structures/operations-and-transactions | transaction docs} * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/sendTransaction | sendTransaction docs} * * @example + * ```ts * const contractId = 'CA3D5KRYM6CB7OWQ6TWYRR3Z4T7GNZLKERYNZGGA5SOAOPIFY6YQGAXE'; * const contract = new StellarSdk.Contract(contractId); * @@ -1172,6 +1183,7 @@ export class RpcServer { * console.log("status:", result.status); * console.log("errorResultXdr:", result.errorResultXdr); * }); + * ``` */ public async sendTransaction( transaction: Transaction | FeeBumpTransaction, @@ -1195,25 +1207,26 @@ export class RpcServer { /** * Fund a new account using the network's Friendbot faucet, if any. * - * @param {string | Account} address The address or account instance that we + * @param address - The address or account instance that we * want to create and fund with Friendbot - * @param {string} [friendbotUrl] Optionally, an explicit address for + * @param friendbotUrl - (optional) Optionally, an explicit address for * friendbot (by default: this calls the Soroban RPC - * {@link module:rpc.Server#getNetwork | getNetwork} method to try to + * {@link rpc.Server.getNetwork | getNetwork} method to try to * discover this network's Friendbot url). - * @returns {Promise} An {@link Account} object for the created + * @returns An {@link Account} object for the created * account, or the existing account if it's already funded with the * populated sequence number (note that the account will not be "topped * off" if it already exists) - * @throws {Error} If Friendbot is not configured on this network or request failure + * @throws If Friendbot is not configured on this network or request failure * * @see {@link https://developers.stellar.org/docs/learn/fundamentals/networks#friendbot | Friendbot docs} - * @see {@link module:Friendbot.Api.Response} + * @see {@link Friendbot.Api.Response} * * @deprecated Use {@link Server.fundAddress} instead, which supports both * account (G...) and contract (C...) addresses. * * @example + * ```ts * server * .requestAirdrop("GBZC6Y2Y7Q3ZQ2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4QZJ2XZ3Z5YXZ6Z7Z2Y4") * .then((accountCreated) => { @@ -1221,6 +1234,7 @@ export class RpcServer { * }).catch((error) => { * console.error("error:", error); * }); + * ``` */ public async requestAirdrop( address: string | Pick, @@ -1271,30 +1285,34 @@ export class RpcServer { * * This method supports both account (G...) and contract (C...) addresses. * - * @param {string} address The address to fund. Can be either a Stellar + * @param address - The address to fund. Can be either a Stellar * account (G...) or contract (C...) address. - * @param {string} [friendbotUrl] Optionally, an explicit Friendbot URL + * @param friendbotUrl - (optional) Optionally, an explicit Friendbot URL * (by default: this calls the Stellar RPC - * {@link module:rpc.Server#getNetwork | getNetwork} method to try to + * {@link rpc.Server.getNetwork | getNetwork} method to try to * discover this network's Friendbot url). - * @returns {Promise} The transaction + * @returns The transaction * response from the Friendbot funding transaction. - * @throws {Error} If Friendbot is not configured on this network or the + * @throws If Friendbot is not configured on this network or the * funding transaction fails. * * @see {@link https://developers.stellar.org/docs/learn/fundamentals/networks#friendbot | Friendbot docs} * * @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); + * ``` */ public async fundAddress( address: string, @@ -1339,7 +1357,7 @@ export class RpcServer { * Provides an analysis of the recent fee stats for regular and smart * contract operations. * - * @returns {Promise} the fee stats + * @returns the fee stats * @see https://developers.stellar.org/docs/data/rpc/api-reference/methods/getFeeStats */ public async getFeeStats(): Promise { @@ -1353,7 +1371,7 @@ export class RpcServer { /** * Provides information about the current version details of the Soroban RPC and captive-core * - * @returns {Promise} the version info + * @returns the version info * @see https://developers.stellar.org/docs/data/rpc/api-reference/methods/getVersionInfo */ public async getVersionInfo(): Promise { @@ -1369,27 +1387,28 @@ export class RpcServer { * * This is a convenience wrapper around {@link Server.getLedgerEntries}. * - * @param {string} address the contract (string `C...`) whose balance of + * @param address - the contract (string `C...`) whose balance of * `sac` you want to know - * @param {Asset} sac the built-in SAC token (e.g. `USDC:GABC...`) that + * @param sac - the built-in SAC token (e.g. `USDC:GABC...`) that * you are querying from the given `contract`. - * @param {string} [networkPassphrase] optionally, the network passphrase to + * @param networkPassphrase - (optional) optionally, the network passphrase to * which this token applies. If omitted, a request about network * information will be made (see {@link getNetwork}), since contract IDs * for assets are specific to a network. You can refer to {@link Networks} * for a list of built-in passphrases, e.g., `Networks.TESTNET`. * - * @returns {Promise}, which will contain the balance + * @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 {TypeError} If `address` is not a valid contract ID (C...). + * @throws If `address` is not a valid contract ID (C...). * * @see getLedgerEntries * @see https://developers.stellar.org/docs/tokens/stellar-asset-contract * * @deprecated Use {@link getAssetBalance}, instead * @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( @@ -1403,6 +1422,7 @@ export class RpcServer { * entry.balanceEntry ? * BigInt(entry.balanceEntry.amount) : * "Address has no XLM"); + * ``` */ public async getSACBalance( address: string | Address, @@ -1476,16 +1496,17 @@ export class RpcServer { * Returns ledger data with support for pagination as long as the requested * pages fall within the history retention of the RPC provider. * - * @param {Api.GetLedgersRequest} request - The request parameters for fetching ledgers. {@link Api.GetLedgersRequest} - * @returns {Promise} A promise that resolves to the + * @param request - The request parameters for fetching ledgers. {@link Api.GetLedgersRequest} + * @returns A promise that resolves to the * ledgers response containing an array of ledger data and pagination info. {@link Api.GetLedgersResponse} * - * @throws {Error} If startLedger is less than the oldest ledger stored in this + * @throws If startLedger is less than the oldest ledger stored in this * node, or greater than the latest ledger seen by this node. * * @see {@link https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgers | getLedgers docs} * * @example + * ```ts * // Fetch ledgers starting from a specific sequence number * server.getLedgers({ * startLedger: 36233, @@ -1497,8 +1518,10 @@ export class RpcServer { * 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, @@ -1513,6 +1536,7 @@ export class RpcServer { * limit: 5 * } * }); + * ``` */ public async getLedgers( diff --git a/src/rpc/transaction.ts b/src/rpc/transaction.ts index 3f96f5a0d..7cd787940 100644 --- a/src/rpc/transaction.ts +++ b/src/rpc/transaction.ts @@ -34,13 +34,12 @@ function isSorobanTransaction(tx: Transaction): boolean { * invocation (see {@link Operation.invokeHostFunction}), **the simulation * entries are ignored**. * - * @param {Transaction|FeeBumpTransaction} raw the initial transaction, w/o simulation applied - * @param {Api.SimulateTransactionResponse|Api.RawSimulateTransactionResponse} simulation the Soroban RPC simulation result (see {@link module:rpc.Server#simulateTransaction}) - * @returns {TransactionBuilder} a new, cloned transaction with the proper auth and resource (fee, footprint) simulation data applied + * @param raw - the initial transaction, w/o simulation applied + * @param simulation - the Soroban RPC simulation result (see {@link rpc.Server.simulateTransaction}) + * @returns a new, cloned transaction with the proper auth and resource (fee, footprint) simulation data applied * - * @memberof module:rpc - * @see {@link module:rpc.Server#simulateTransaction} - * @see {@link module:rpc.Server#prepareTransaction} + * @see {@link rpc.Server.simulateTransaction} + * @see {@link rpc.Server.prepareTransaction} */ export function assembleTransaction( raw: Transaction | FeeBumpTransaction, diff --git a/src/starlightComponents/Head.astro b/src/starlightComponents/Head.astro new file mode 100644 index 000000000..d7427c9b5 --- /dev/null +++ b/src/starlightComponents/Head.astro @@ -0,0 +1,8 @@ +--- +import Default from "@astrojs/starlight/components/Head.astro"; +import { Font } from "astro:assets"; +--- + + + + diff --git a/src/starlightComponents/PageTitle.astro b/src/starlightComponents/PageTitle.astro new file mode 100644 index 000000000..6bb9eaba7 --- /dev/null +++ b/src/starlightComponents/PageTitle.astro @@ -0,0 +1,7 @@ +--- +// Replaces Starlight's

. Each markdown file owns its visible H1 in the +// body, so the frontmatter title would otherwise produce a duplicate. Keep +// the #_top anchor here so SkipLink.astro's "skip to content" link still +// has a focus target. +--- +
diff --git a/src/stellartoml/index.ts b/src/stellartoml/index.ts index 6aa2691d9..d85e9fd9a 100644 --- a/src/stellartoml/index.ts +++ b/src/stellartoml/index.ts @@ -4,32 +4,28 @@ import { httpClient } from "../http-client/index.js"; import { Config } from "../config.js"; -/** @module StellarToml */ - /** * The maximum size of stellar.toml file, in bytes - * @constant {number} - * @default 102400 + * @defaultValue 102400 */ export const STELLAR_TOML_MAX_SIZE = 100 * 1024; /** * Resolver allows resolving `stellar.toml` files. - * @memberof module:StellarToml - * @hideconstructor */ export class Resolver { /** * Returns a parsed `stellar.toml` file for a given domain. * @see {@link https://developers.stellar.org/docs/tokens/publishing-asset-info | Stellar.toml doc} * - * @param {string} domain Domain to get stellar.toml file for - * @param {object} [opts] Options object - * @param {boolean} [opts.allowHttp=false] - Allow connecting to http servers. This must be set to false in production deployments! - * @param {number} [opts.timeout=0] - Allow a timeout. Allows user to avoid nasty lag due to TOML resolve issue. - * @returns {Promise} A `Promise` that resolves to the parsed stellar.toml object + * @param domain - Domain to get stellar.toml file for + * @param opts - (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. @@ -37,6 +33,7 @@ export class Resolver { * .catch(error => { * // stellar.toml does not exist or is invalid * }); + * ``` */ public static async resolve( domain: string, diff --git a/src/styles/overrides.css b/src/styles/overrides.css new file mode 100644 index 000000000..55c4c5128 --- /dev/null +++ b/src/styles/overrides.css @@ -0,0 +1,92 @@ +/* Fonts. Loaded via Astro's `fonts` API in astro.config.mjs and injected + into by src/starlightComponents/Head.astro. */ +:root { + --sl-font: var(--font-inter); + --sl-font-mono: var(--font-inconsolata); +} + +/* Dark mode colors. */ +:root { + --sl-color-accent-low: #5842c3; + --sl-color-accent: #f1eefe; + --sl-color-accent-high: #b3a3fd; + --sl-color-white: #ededed; + --sl-color-gray-1: #eceef2; + --sl-color-gray-2: #c0c2c7; + --sl-color-gray-3: #888b96; + --sl-color-gray-4: #545861; + --sl-color-gray-5: #353841; + --sl-color-gray-6: #343434; + --sl-color-black: #1c1c1c; + + --stellar-link-bg: #2c2250; + --stellar-link-text: #9e8cfc; +} +/* Light mode colors. */ +:root[data-theme="light"] { + --sl-color-accent-low: #aa99ec; + --sl-color-accent: #5746af; + --sl-color-accent-high: #20134b; + --sl-color-white: #171717; + --sl-color-gray-1: #24272f; + --sl-color-gray-2: #353841; + --sl-color-gray-3: #545861; + --sl-color-gray-4: #888b96; + --sl-color-gray-5: #c0c2c7; + --sl-color-gray-6: #e2e2e2; + --sl-color-gray-7: #f5f6f8; + --sl-color-black: #fcfcfc; + + --stellar-link-bg: #ede9fe; + --stellar-link-text: #5746af; +} + +/* Theme overrides */ +header.header { + background-color: var(--sl-color-black); + border-bottom-color: var(--sl-color-gray-6); +} + +.sidebar-content .top-level li a[aria-current="page"] { + background-color: var(--stellar-link-bg); + color: var(--stellar-link-text); +} + +.right-sidebar-panel li a[aria-current="true"] { + font-weight: 600; +} + +@media (min-width: 50rem) { + .sidebar-pane { + background-color: var(--sl-color-black); + border-inline-end-color: var(--sl-color-gray-6); + } +} + +/* Collapse Starlight's first content panel when it contains only our skip-link + anchor — i.e. on normal pages where PageTitle.astro emits nothing else. + When DraftContentNotice or FallbackContentNotice render, #_top is no longer + :only-child, so the selector doesn't match and the panel keeps its normal + padding for those notices. */ +main > .content-panel:has(> .sl-container > #_top:only-child) { + padding: 0; +} + +/* ContentPanel.astro adds a hairline border between sibling panels. Suppress + it above the body content when the preceding panel was collapsed above. */ +main > .content-panel:has(> .sl-container > #_top:only-child) + .content-panel { + border-top: none; +} + +/* Homepage badge row (npm version, downloads, CI status, DeepWiki, etc.). + Source lives in README.md, synced into docs/index.md by build-llms.ts. */ +.badges { + display: flex; + flex-wrap: wrap; + gap: 0.5rem; + align-items: center; + margin-block: 1rem; +} +.badges img { + vertical-align: middle; +} diff --git a/src/utils.ts b/src/utils.ts index a52cd6b2b..bee4f5a28 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -3,18 +3,16 @@ import { Transaction } from "./base/index.js"; /** * Miscellaneous utilities. * - * @hideconstructor */ export class Utils { /** * Verifies if the current date is within the transaction's timebounds * - * @param {Transaction} transaction The transaction whose timebounds will be validated. - * @param {number} [gracePeriod=0] An additional window of time that should be considered valid on either end of the transaction's time range. + * @param transaction - The transaction whose timebounds will be validated. + * @param gracePeriod - (optional) An additional window of time that should be considered valid on either end of the transaction's time range. * - * @returns {boolean} Returns true if the current time is within the transaction's [minTime, maxTime] range. + * @returns Returns true if the current time is within the transaction's [minTime, maxTime] range. * - * @static */ static validateTimebounds( transaction: Transaction, diff --git a/src/webauth/challenge_transaction.ts b/src/webauth/challenge_transaction.ts index f1ebcb7b9..e666e36f9 100644 --- a/src/webauth/challenge_transaction.ts +++ b/src/webauth/challenge_transaction.ts @@ -21,33 +21,34 @@ import { uint8ArrayToBase64 } from "uint8array-extras"; /** * Returns a valid {@link https://stellar.org/protocol/sep-10 | SEP-10} * challenge transaction which you can use for Stellar Web Authentication. - * @param serverKeypair Keypair for server's signing account. - * @param clientAccountID The stellar account (G...) or muxed account + * @param serverKeypair - Keypair for server's signing account. + * @param clientAccountID - The stellar account (G...) or muxed account * (M...) that the wallet wishes to authenticate with the server. - * @param homeDomain The fully qualified domain name of the service + * @param homeDomain - The fully qualified domain name of the service * requiring authentication - * @param timeout Challenge duration (default to 5 minutes). - * @param networkPassphrase The network passphrase. If you pass this + * @param timeout - Challenge duration (default to 5 minutes). + * @param networkPassphrase - The network passphrase. If you pass this * argument then timeout is required. - * @param webAuthDomain The fully qualified domain name of the service + * @param webAuthDomain - The fully qualified domain name of the service * issuing the challenge. - * @param memo The memo to attach to the challenge transaction. The + * @param memo - 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. - * @param clientDomain The fully qualified domain of the client + * @param clientDomain - The fully qualified domain of the client * requesting the challenge. Only necessary when the 'client_domain' * parameter is passed. - * @param clientSigningKey The public key assigned to the SIGNING_KEY + * @param clientSigningKey - The public key assigned to the SIGNING_KEY * attribute specified on the stellar.toml hosted on the client domain. Only * necessary when the 'client_domain' parameter is passed. * @returns A base64 encoded string of the raw TransactionEnvelope xdr * struct for the transaction. - * @throws {Error} Will throw if `clientAccountID is a muxed account, and `memo` + * @throws Will throw if `clientAccountID` is a muxed account, and `memo` * is present. - * @throws {Error} Will throw if `clientDomain` is provided, but + * @throws Will throw if `clientDomain` is provided, but * `clientSigningKey` is missing * @see {@link https://stellar.org/protocol/sep-10 | SEP-10: Stellar Web Auth} * @example + * ```ts * import { Keypair, Networks, WebAuth } from 'stellar-sdk' * * let serverKeyPair = Keypair.fromSecret("server-secret") @@ -57,6 +58,7 @@ import { uint8ArrayToBase64 } from "uint8array-extras"; * "stellar.org", * 300, * Networks.TESTNET); + * ``` */ export function buildChallengeTx( serverKeypair: Keypair, @@ -140,16 +142,16 @@ export function buildChallengeTx( * any signatures other than the server's on the transaction are valid. Use one * of the following functions to completely verify the transaction: * - * - {@link module:WebAuth~verifyChallengeTxThreshold} - * - {@link module:WebAuth~verifyChallengeTxSigners} - * @param challengeTx SEP0010 challenge transaction in base64. - * @param serverAccountID The server's stellar account (public key). - * @param networkPassphrase The network passphrase, e.g.: 'Test SDF + * - {@link WebAuth.verifyChallengeTxThreshold} + * - {@link WebAuth.verifyChallengeTxSigners} + * @param challengeTx - SEP0010 challenge transaction in base64. + * @param serverAccountID - The server's stellar account (public key). + * @param networkPassphrase - The network passphrase, e.g.: 'Test SDF * Network ; September 2015' (see {@link Networks}) - * @param homeDomains The home domain that is expected + * @param homeDomains - The home domain that is expected * to be included in the first Manage Data operation's string key. If an * array is provided, one of the domain names in the array must match. - * @param webAuthDomain The home domain that is expected to be included + * @param webAuthDomain - The home domain that is expected to be included * as the value of the Manage Data operation with the 'web_auth_domain' key. * If no such operation is included, this parameter is not used. * @returns The actual transaction and the @@ -358,26 +360,27 @@ export function readChallengeTx( * * Errors will be raised if: * - The transaction is invalid according to - * {@link module:WebAuth~readChallengeTx}. + * {@link 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. - * @param challengeTx SEP0010 challenge transaction in base64. - * @param serverAccountID The server's stellar account (public key). - * @param networkPassphrase The network passphrase, e.g.: 'Test SDF + * @param challengeTx - SEP0010 challenge transaction in base64. + * @param serverAccountID - The server's stellar account (public key). + * @param networkPassphrase - The network passphrase, e.g.: 'Test SDF * Network ; September 2015' (see {@link Networks}). - * @param signers The signers public keys. This list should + * @param signers - The signers public keys. This list should * contain the public keys for all signers that have signed the transaction. - * @param homeDomains The home domain(s) that should + * @param homeDomains - The home domain(s) that should * be included in the first Manage Data operation's string key. Required in * readChallengeTx(). - * @param webAuthDomain The home domain that is expected to be included + * @param webAuthDomain - The home domain that is expected to be included * as the value of the Manage Data operation with the 'web_auth_domain' key, * if present. Used in readChallengeTx(). * @returns The list of signers public keys that have signed * the transaction, excluding the server account ID. - * @see {@link https://stellar.org/protocol/sep-10|SEP-10: Stellar Web Auth} + * @see {@link https://stellar.org/protocol/sep-10 | SEP-10: Stellar Web Auth} * @example + * ```ts * import { Networks, TransactionBuilder, WebAuth } from 'stellar-sdk'; * * const serverKP = Keypair.random(); @@ -411,6 +414,7 @@ export function readChallengeTx( * threshold, * [clientKP1.publicKey(), clientKP2.publicKey()] * ); + * ``` */ export function verifyChallengeTxSigners( challengeTx: string, @@ -561,34 +565,35 @@ export function verifyChallengeTxSigners( * * Errors will be raised if: * - The transaction is invalid according to - * {@link module:WebAuth~readChallengeTx}. + * {@link 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. - * @param challengeTx SEP0010 challenge transaction in base64. - * @param serverAccountID The server's stellar account (public key). - * @param networkPassphrase The network passphrase, e.g.: 'Test SDF + * @param challengeTx - SEP0010 challenge transaction in base64. + * @param serverAccountID - The server's stellar account (public key). + * @param networkPassphrase - The network passphrase, e.g.: 'Test SDF * Network ; September 2015' (see {@link Networks}). - * @param threshold The required signatures threshold for verifying + * @param threshold - The required signatures threshold for verifying * this transaction. - * @param signerSummary a map of all + * @param signerSummary - a map of all * authorized signers to their weights. It's used to validate if the * transaction signatures have met the given threshold. - * @param homeDomains The home domain(s) that should + * @param homeDomains - The home domain(s) that should * be included in the first Manage Data operation's string key. Required in - * verifyChallengeTxSigners() => readChallengeTx(). - * @param webAuthDomain The home domain that is expected to be included + * `verifyChallengeTxSigners() => readChallengeTx()`. + * @param webAuthDomain - The home domain that is expected to be included * as the value of the Manage Data operation with the 'web_auth_domain' key, - * if present. Used in verifyChallengeTxSigners() => readChallengeTx(). + * 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 {module:WebAuth.InvalidChallengeError} Will throw if the collective + * @throws Will throw if the collective * weight of the transaction's signers does not meet the necessary threshold * to verify this transaction. * @see {@link https://stellar.org/protocol/sep-10 | SEP-10: Stellar Web Auth} * @example + * ```ts * import { Networks, TransactionBuilder, WebAuth } from 'stellar-sdk'; * * const serverKP = Keypair.random(); @@ -635,6 +640,7 @@ export function verifyChallengeTxSigners( * threshold, * signerSummary * ); + * ``` */ export function verifyChallengeTxThreshold( challengeTx: string, diff --git a/src/webauth/errors.ts b/src/webauth/errors.ts index 95882c2c2..0a53998af 100644 --- a/src/webauth/errors.ts +++ b/src/webauth/errors.ts @@ -2,9 +2,7 @@ * InvalidChallengeError is raised when a challenge transaction does not meet * the requirements for a SEP-10 challenge transaction (for example, a non-zero * sequence number). - * @memberof module:WebAuth - * @category Errors * - * @param {string} message Human-readable error message. + * @param message - Human-readable error message. */ export class InvalidChallengeError extends Error {} diff --git a/src/webauth/utils.ts b/src/webauth/utils.ts index fb07059e4..be536b5aa 100644 --- a/src/webauth/utils.ts +++ b/src/webauth/utils.ts @@ -1,6 +1,5 @@ /** * Stellar Web Authentication - * @module WebAuth * @see {@link https://stellar.org/protocol-10 | SEP-10 Specification} */ @@ -11,12 +10,13 @@ import { InvalidChallengeError } from "./errors.js"; * returning a list of non-repeated signers that were found to have signed the * given transaction. * - * @param {Transaction | FeeBumpTransaction} transaction The signed transaction. - * @param {Array.} signers The signer's public keys. - * @returns {Array.} A list of signers that were found to have signed + * @param transaction - The signed transaction. + * @param signers - 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"); @@ -27,6 +27,7 @@ import { InvalidChallengeError } from "./errors.js"; * * transaction.sign(keypair1, keypair2) * WebAuth.gatherTxSigners(transaction, [keypair1.publicKey(), keypair2.publicKey()]) + * ``` */ export function gatherTxSigners( transaction: FeeBumpTransaction | Transaction, @@ -72,12 +73,13 @@ export function gatherTxSigners( /** * Verifies if a transaction was signed by the given account id. * - * @param {Transaction | FeeBumpTransaction} transaction The signed transaction. - * @param {string} accountID The signer's public key. - * @returns {boolean} Whether or not `accountID` was found to have signed the + * @param transaction - The signed transaction. + * @param accountID - 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"); * @@ -87,6 +89,7 @@ export function gatherTxSigners( * * transaction.sign(keypair) * WebAuth.verifyTxSignedBy(transaction, keypair.publicKey()) + * ``` */ export function verifyTxSignedBy( transaction: FeeBumpTransaction | Transaction, diff --git a/tsconfig.json b/tsconfig.json index 9489e7251..1d90010d9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,6 +5,8 @@ "emitDeclarationOnly": true, "declarationDir": "lib/esm", "removeComments": false, + "noUnusedLocals": true, + "noUnusedParameters": true, "lib": ["ES2022", "DOM"], "module": "Node20", "moduleResolution": "node16", @@ -17,6 +19,8 @@ "include": ["src"], "exclude": [ "src/base/generated/curr_generated.js", - "src/base/generated/next_generated.js" + "src/base/generated/next_generated.js", + "src/content.config.ts", + "src/content/**" ] } diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 000000000..dfab0d4be --- /dev/null +++ b/typedoc.json @@ -0,0 +1,64 @@ +{ + "entryPoints": ["src/index.ts"], + "entryPointStrategy": "expand", + "tsconfig": "tsconfig.json", + "exclude": ["src/base/generated/**"], + "blockTags": [ + "@defaultValue", "@deprecated", "@example", "@jsx", "@param", + "@privateRemarks", "@remarks", "@returns", "@see", "@throws", + "@typeParam", "@author", "@callback", "@category", + "@categoryDescription", "@default", "@document", "@extends", + "@augments", "@yields", "@group", "@groupDescription", "@import", + "@inheritDoc", "@license", "@module", "@mergeModuleWith", "@prop", + "@property", "@return", "@satisfies", "@since", "@sortStrategy", + "@template", "@this", "@type", "@typedef", "@summary", + "@preventInline", "@inlineType", "@preventExpand", "@expandType" + ], + "validation": { + "invalidLink": true, + "notExported": false, + "notDocumented": false + }, + "externalSymbolLinkMappings": { + "@stellar/stellar-sdk": { + "AccountCallBuilder": "#", + "AccountResponse": "#", + "AssetsCallBuilder": "#", + "ClaimableBalanceCallBuilder": "#", + "EffectCallBuilder": "#", + "LedgerCallBuilder": "#", + "LiquidityPoolCallBuilder": "#", + "OfferCallBuilder": "#", + "OperationCallBuilder": "#", + "OrderbookCallBuilder": "#", + "PaymentCallBuilder": "#", + "StrictReceivePathCallBuilder": "#", + "StrictSendPathCallBuilder": "#", + "TradeAggregationCallBuilder": "#", + "TradesCallBuilder": "#", + "TransactionBuilderOptions": "#", + "TransactionCallBuilder": "#", + "xdr.DiagnosticEvent": "#", + "xdr.ExtendFootprintTtlOp": "#", + "xdr.HashIdPreimageSorobanAuthorization": "#", + "xdr.InvokeHostFunctionOp": "#", + "xdr.LedgerCloseMeta": "#", + "xdr.LedgerEntryData": "#", + "xdr.LedgerHeader": "#", + "xdr.LedgerHeaderHistoryEntry": "#", + "xdr.LedgerKey": "#", + "xdr.LedgerKeyContractCode": "#", + "xdr.MuxedAccount": "#", + "xdr.RestoreFootprintOp": "#", + "xdr.ScVal": "#", + "xdr.SorobanAuthorizationEntry": "#", + "xdr.SorobanAuthorizedInvocation": "#", + "xdr.SorobanResources": "#", + "xdr.SorobanTransactionData": "#", + "xdr.TransactionResult": "#" + } + }, + "treatWarningsAsErrors": true, + "out": "tmp/typedoc-json/", + "json": "tmp/typedoc-json/api.json" +} \ No newline at end of file diff --git a/website/README.md b/website/README.md deleted file mode 100644 index cce257c61..000000000 --- a/website/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# Publish the website -We use jsdoc to generate a static doc website for this project. As of 5/26/15 we're -using the master branch of jsdoc to generate the static doc page, as it has the only -support for ES6 classes that we need. -We use github pages to host the static site. For the publish script to work, you need to have a folder at the same level as ```js-stellar-lib``` called ```js-stellar-lib-gh-pages````. - -Assuming you're in this folder on the command line, follow these steps: - -``` -cd ../../ -git clone git@github.com:stellar/js-stellar-lib.git js-stellar-lib-gh-pages -cd js-stellar-lib-gh-pages -git checkout origin/gh-pages -git checkout -b gh-pages -git push --set-upstream origin gh-pages -cd ../js-stellar-lib/website -``` - -Then, run the publish script to build the static site and publish it to the gh-pages branch. - -``` -./publish.sh -``` \ No newline at end of file diff --git a/website/package.json b/website/package.json deleted file mode 100644 index 1f48adf7d..000000000 --- a/website/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "scripts": { - "docs": "./node_modules/.bin/jsdoc ../src/ -d docs/ -r ../docs/readme.md" - }, - "dependencies": { - "jsdoc": "jsdoc3/jsdoc#master" - } -} diff --git a/website/publish.sh b/website/publish.sh deleted file mode 100755 index b4c59c1a5..000000000 --- a/website/publish.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -set -e - -cd ../../js-stellar-lib-gh-pages -git checkout -- . -git clean -dfx -git fetch -git rebase -rm -Rf * -cd ../js-stellar-lib/website -npm run-script docs -cp -R docs/* ../../js-stellar-lib-gh-pages/ -rm -Rf docs/ -cd ../../js-stellar-lib-gh-pages -git add --all -git commit -m "update website" -git push -cd ../js-stellar-lib/website \ No newline at end of file diff --git a/website/setup.sh b/website/setup.sh deleted file mode 100755 index cd7038a9a..000000000 --- a/website/setup.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -cd ../../ -if [ "$TRAVIS" ]; then - git clone "https://stellar-jenkins@github.com/stellar/js-stellar-lib.git" js-stellar-lib-gh-pages -else - git clone git@github.com:stellar/js-stellar-lib.git js-stellar-lib-gh-pages -fi -cd js-stellar-lib-gh-pages -git checkout origin/gh-pages -git checkout -b gh-pages -git branch --set-upstream-to=origin/gh-pages -cd ../js-stellar-lib/website