` (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`](/js-stellar-sdk/reference/core-transactions/#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: TransactionSource, 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: TransactionSource;
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:153](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L153)
### `new TransactionBuilder(sourceAccount, opts)`
```ts
constructor(sourceAccount: TransactionSource, opts: TransactionBuilderOptions = ...);
```
**Parameters**
- **`sourceAccount`** — `TransactionSource` (required) — source account for this transaction
- **`opts`** — `TransactionBuilderOptions` (optional) (default: `...`) — options object (see `TransactionBuilderOptions`)
**Source:** [src/base/transaction_builder.ts:174](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L174)
### `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:1092](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L1092)
### `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:281](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L281)
### `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:1203](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L1203)
### `transactionBuilder.baseFee`
```ts
baseFee: string;
```
**Source:** [src/base/transaction_builder.ts:156](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L156)
### `transactionBuilder.extraSigners`
```ts
extraSigners: string[] | null;
```
**Source:** [src/base/transaction_builder.ts:165](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L165)
### `transactionBuilder.ledgerbounds`
```ts
ledgerbounds: { maxLedger?: number; minLedger?: number } | null;
```
**Source:** [src/base/transaction_builder.ts:161](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L161)
### `transactionBuilder.memo`
```ts
memo: Memo;
```
**Source:** [src/base/transaction_builder.ts:166](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L166)
### `transactionBuilder.minAccountSequence`
```ts
minAccountSequence: string | null;
```
**Source:** [src/base/transaction_builder.ts:162](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L162)
### `transactionBuilder.minAccountSequenceAge`
```ts
minAccountSequenceAge: bigint | null;
```
**Source:** [src/base/transaction_builder.ts:163](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L163)
### `transactionBuilder.minAccountSequenceLedgerGap`
```ts
minAccountSequenceLedgerGap: number | null;
```
**Source:** [src/base/transaction_builder.ts:164](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L164)
### `transactionBuilder.networkPassphrase`
```ts
networkPassphrase: string | null;
```
**Source:** [src/base/transaction_builder.ts:167](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L167)
### `transactionBuilder.operations`
```ts
operations: Operation2[];
```
**Source:** [src/base/transaction_builder.ts:155](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L155)
### `transactionBuilder.sorobanData`
```ts
sorobanData: SorobanTransactionData | null;
```
**Source:** [src/base/transaction_builder.ts:168](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L168)
### `transactionBuilder.source`
```ts
source: TransactionSource;
```
**Source:** [src/base/transaction_builder.ts:154](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L154)
### `transactionBuilder.timebounds`
```ts
timebounds: { maxTime?: string | number | Date; minTime?: string | number | Date } | null;
```
**Source:** [src/base/transaction_builder.ts:157](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L157)
### `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:394](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L394)
### `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:356](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L356)
### `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:367](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L367)
### `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:701](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L701)
### `transactionBuilder.build()`
Builds the transaction and increments the source account's sequence
number by 1.
```ts
build(): Transaction;
```
**Source:** [src/base/transaction_builder.ts:921](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L921)
### `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:385](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L385)
### `transactionBuilder.clearOperations()`
Removes the operations from the builder (useful when cloning).
```ts
clearOperations(): TransactionBuilder;
```
**Source:** [src/base/transaction_builder.ts:375](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L375)
### `transactionBuilder.hasV2Preconditions()`
Checks whether any v2 preconditions have been set on this builder.
```ts
hasV2Preconditions(): boolean;
```
**Source:** [src/base/transaction_builder.ts:1060](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L1060)
### `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:636](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L636)
### `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:524](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L524)
### `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:561](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L561)
### `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:583](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L583)
### `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:612](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L612)
### `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:662](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L662)
### `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:684](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L684)
### `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:475](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L475)
### `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:428](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L428)
## 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)
## Types
### 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)
### AuthFlag.clawbackEnabled
```ts
type clawbackEnabled = 8
```
**Source:** [src/base/operations/types.ts:444](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L444)
### AuthFlag.immutable
```ts
type immutable = 4
```
**Source:** [src/base/operations/types.ts:443](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L443)
### AuthFlag.required
```ts
type required = 1
```
**Source:** [src/base/operations/types.ts:441](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L441)
### AuthFlag.revocable
```ts
type revocable = 2
```
**Source:** [src/base/operations/types.ts:442](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L442)
### 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)
### 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.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:686](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L686)
### 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)
### 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:462](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L462)
### Signer.Ed25519PublicKey
```ts
interface Ed25519PublicKey {
ed25519PublicKey: string;
weight?: number;
}
```
**Source:** [src/base/operations/types.ts:463](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L463)
#### `ed25519PublicKey.ed25519PublicKey`
```ts
ed25519PublicKey: string;
```
**Source:** [src/base/operations/types.ts:464](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L464)
#### `ed25519PublicKey.weight`
```ts
weight?: number;
```
**Source:** [src/base/operations/types.ts:465](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L465)
### Signer.Ed25519SignedPayload
```ts
interface Ed25519SignedPayload {
ed25519SignedPayload: string;
weight?: number;
}
```
**Source:** [src/base/operations/types.ts:475](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L475)
#### `ed25519SignedPayload.ed25519SignedPayload`
```ts
ed25519SignedPayload: string;
```
**Source:** [src/base/operations/types.ts:476](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L476)
#### `ed25519SignedPayload.weight`
```ts
weight?: number;
```
**Source:** [src/base/operations/types.ts:477](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L477)
### Signer.PreAuthTx
```ts
interface PreAuthTx {
preAuthTx: Buffer;
weight?: number;
}
```
**Source:** [src/base/operations/types.ts:471](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L471)
#### `preAuthTx.preAuthTx`
```ts
preAuthTx: Buffer;
```
**Source:** [src/base/operations/types.ts:472](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L472)
#### `preAuthTx.weight`
```ts
weight?: number;
```
**Source:** [src/base/operations/types.ts:473](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L473)
### Signer.Sha256Hash
```ts
interface Sha256Hash {
sha256Hash: Buffer;
weight?: number;
}
```
**Source:** [src/base/operations/types.ts:467](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L467)
#### `sha256Hash.sha256Hash`
```ts
sha256Hash: Buffer;
```
**Source:** [src/base/operations/types.ts:468](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L468)
#### `sha256Hash.weight`
```ts
weight?: number;
```
**Source:** [src/base/operations/types.ts:469](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L469)
### 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:50](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L50)
#### `sorobanFees.instructions`
The number of instructions executed by the transaction.
```ts
instructions: number;
```
**Source:** [src/base/transaction_builder.ts:52](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L52)
#### `sorobanFees.readBytes`
The number of bytes read from the ledger by the transaction.
```ts
readBytes: number;
```
**Source:** [src/base/transaction_builder.ts:54](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L54)
#### `sorobanFees.resourceFee`
The fee to be paid for the transaction, in stroops.
```ts
resourceFee: bigint;
```
**Source:** [src/base/transaction_builder.ts:58](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L58)
#### `sorobanFees.writeBytes`
The number of bytes written to the ledger by the transaction.
```ts
writeBytes: number;
```
**Source:** [src/base/transaction_builder.ts:56](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_builder.ts#L56)
### TransactionSource
The contract that `TransactionBuilder` requires of a transaction's
source account: a way to read the account's address and sequence number, and
to advance the sequence number in place (the builder calls
`TransactionSource.incrementSequenceNumber` when it builds a
transaction).
Both the concrete `Account` and `MuxedAccount` classes implement
this, as does Horizon's `AccountResponse`. Implement it yourself if you manage
sequence numbers out-of-band (e.g. a server-side sequence pool) and want to
pass a custom source to `TransactionBuilder`.
This is intentionally a brand-free structural interface: assignability is by
shape, not by class identity, so any account-like object that honors the
contract is accepted.
```ts
interface TransactionSource {
accountId(): string;
incrementSequenceNumber(): void;
sequenceNumber(): string;
}
```
**Source:** [src/base/transaction_source.ts:17](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_source.ts#L17)
#### `transactionSource.accountId()`
The source account's address — a `G…` account address or, for a muxed
source, its `M…` address.
```ts
accountId(): string;
```
**Source:** [src/base/transaction_source.ts:22](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_source.ts#L22)
#### `transactionSource.incrementSequenceNumber()`
Increments the sequence number in place by one. `TransactionBuilder`
calls this when building a transaction so that the next transaction built
from the same source uses the next sequence number.
```ts
incrementSequenceNumber(): void;
```
**Source:** [src/base/transaction_source.ts:32](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_source.ts#L32)
#### `transactionSource.sequenceNumber()`
The current sequence number, as a string.
```ts
sequenceNumber(): string;
```
**Source:** [src/base/transaction_source.ts:25](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/transaction_source.ts#L25)
### TrustLineFlag
```ts
type TrustLineFlag = TrustLineFlag.authorize | TrustLineFlag.authorizeToMaintainLiabilities | TrustLineFlag.deauthorize
```
**Source:** [src/base/operations/types.ts:451](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L451)
### TrustLineFlag.authorize
```ts
type authorize = 1
```
**Source:** [src/base/operations/types.ts:453](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L453)
### TrustLineFlag.authorizeToMaintainLiabilities
```ts
type authorizeToMaintainLiabilities = 2
```
**Source:** [src/base/operations/types.ts:454](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L454)
### TrustLineFlag.deauthorize
```ts
type deauthorize = 0
```
**Source:** [src/base/operations/types.ts:452](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/operations/types.ts#L452)
# 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)
## 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)
## 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:77](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/soroban.ts#L77)
## 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)
## 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, forAddress?: 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.
- **`forAddress`** — `string` (optional) — which credential node the signature should be written
to. Only relevant for `SOROBAN_CREDENTIALS_ADDRESS_WITH_DELEGATES`, where
a single entry can be signed by the top-level account and/or any of its
(possibly nested) delegates. Per CAP-71-01 every one of these signers
signs the *same* payload (bound to the top-level address), so the
signature produced here is written to whichever node(s) carry
`forAddress`. When omitted, the signature is written to the top-level
credentials, which preserves the behavior for `SOROBAN_CREDENTIALS_ADDRESS`
/ `SOROBAN_CREDENTIALS_ADDRESS_V2` and for accounts whose signing key
differs from the credential address (e.g. multisig).
**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:134](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L134)
## authorizeInvocation
```ts
authorizeInvocation(params: AuthorizeInvocationParams): Promise
```
**Parameters**
- **`params`** — `AuthorizeInvocationParams` (required)
**Source:** [src/base/auth.ts:280](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L280)
## buildAuthorizationEntryPreimage
Builds the `xdr.HashIdPreimage` whose hash a signer must sign to
authorize `entry`. This is the low-level signature payload used by
`authorizeEntry`, exposed for callers that drive signing themselves —
most notably for `SOROBAN_CREDENTIALS_ADDRESS_WITH_DELEGATES`, where the
client (not simulation) decides which delegates sign and how.
For `SOROBAN_CREDENTIALS_ADDRESS` this is the legacy, non-address-bound
`ENVELOPE_TYPE_SOROBAN_AUTHORIZATION` preimage. For `SOROBAN_CREDENTIALS_ADDRESS_V2`
and `SOROBAN_CREDENTIALS_ADDRESS_WITH_DELEGATES` it is the address-bound
`ENVELOPE_TYPE_SOROBAN_AUTHORIZATION_WITH_ADDRESS` preimage (CAP-71). For the
delegates variant this single payload — bound to the *top-level* address — is
what the top-level account and every (nested) delegate each sign.
To get the raw bytes to sign, hash the XDR: `hash(preimage.toXDR())`.
```ts
buildAuthorizationEntryPreimage(entry: SorobanAuthorizationEntry, validUntilLedgerSeq: number, networkPassphrase: string): HashIdPreimage
```
**Parameters**
- **`entry`** — `SorobanAuthorizationEntry` (required) — the authorization entry to build the payload for
- **`validUntilLedgerSeq`** — `number` (required) — the expiration ledger committed into the payload
(must match the `signatureExpirationLedger` on the credentials you submit)
- **`networkPassphrase`** — `string` (required) — the network passphrase mixed into the payload
**Throws**
- `Error` if `entry` carries source-account or otherwise non-address
credentials
**Source:** [src/base/auth.ts:340](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L340)
## 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)
## buildWithDelegatesEntry
Builds a `SOROBAN_CREDENTIALS_ADDRESS_WITH_DELEGATES` authorization entry by
wrapping the address credentials of an existing `ADDRESS`/`ADDRESS_V2` entry
(e.g. one returned by simulation) together with a caller-provided set of
delegate signers.
Simulation never emits the delegates variant on its own — which accounts use
delegated authentication is account-specific policy known only to the client
(much like a multisig policy). This helper just assembles the wrapper XDR;
you supply the delegate tree (addresses and, optionally, signatures). To
produce the signatures, build the shared payload with
`buildAuthorizationEntryPreimage` on the returned entry and sign it,
or fill each node afterwards with `authorizeEntry` (passing the
signer's address as `forAddress`).
Each delegates array (the top-level set and every `nestedDelegates`) is
sorted by address in ascending order, and duplicate addresses within an array
are rejected, as the protocol requires (CAP-71-01) — otherwise the host
rejects the entry.
```ts
buildWithDelegatesEntry(params: BuildWithDelegatesParams): SorobanAuthorizationEntry
```
**Parameters**
- **`params`** — `BuildWithDelegatesParams` (required) — see `BuildWithDelegatesParams`
**Throws**
- `Error` if `entry` is not an `ADDRESS`/`ADDRESS_V2` entry, or if any
delegates array contains a duplicate address.
**Source:** [src/base/auth.ts:450](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L450)
## 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)
## Types
### 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:272](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L272)
#### `authorizeInvocationParams.invocation`
```ts
invocation: SorobanAuthorizedInvocation;
```
**Source:** [src/base/auth.ts:275](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L275)
#### `authorizeInvocationParams.networkPassphrase`
```ts
networkPassphrase: string;
```
**Source:** [src/base/auth.ts:276](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L276)
#### `authorizeInvocationParams.publicKey`
```ts
publicKey?: string;
```
**Source:** [src/base/auth.ts:277](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L277)
#### `authorizeInvocationParams.signer`
```ts
signer: Keypair | SigningCallback;
```
**Source:** [src/base/auth.ts:273](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L273)
#### `authorizeInvocationParams.validUntilLedgerSeq`
```ts
validUntilLedgerSeq: number;
```
**Source:** [src/base/auth.ts:274](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L274)
### BuildWithDelegatesParams
Parameters for `buildWithDelegatesEntry`.
```ts
interface BuildWithDelegatesParams {
delegates: DelegateSignature[];
entry: SorobanAuthorizationEntry;
signature?: ScVal;
validUntilLedgerSeq: number;
}
```
**Source:** [src/base/auth.ts:408](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L408)
#### `buildWithDelegatesParams.delegates`
the delegate signers to attach.
```ts
delegates: DelegateSignature[];
```
**Source:** [src/base/auth.ts:418](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L418)
#### `buildWithDelegatesParams.entry`
an existing `SOROBAN_CREDENTIALS_ADDRESS` or
`SOROBAN_CREDENTIALS_ADDRESS_V2` entry — typically one returned by
simulation — whose address credentials should be wrapped.
```ts
entry: SorobanAuthorizationEntry;
```
**Source:** [src/base/auth.ts:414](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L414)
#### `buildWithDelegatesParams.signature`
the top-level account's signature. Defaults to `scvVoid`, which is valid
for accounts that authorize purely via delegated signers (CAP-71-01).
```ts
signature?: ScVal;
```
**Source:** [src/base/auth.ts:423](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L423)
#### `buildWithDelegatesParams.validUntilLedgerSeq`
the expiration ledger sequence stored on the top-level credentials.
```ts
validUntilLedgerSeq: number;
```
**Source:** [src/base/auth.ts:416](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L416)
### 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)
### DelegateSignature
A delegate signer to attach to a
`SOROBAN_CREDENTIALS_ADDRESS_WITH_DELEGATES` entry via
`buildWithDelegatesEntry`.
```ts
interface DelegateSignature {
address: string;
nestedDelegates?: DelegateSignature[];
signature?: ScVal;
}
```
**Source:** [src/base/auth.ts:394](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L394)
#### `delegateSignature.address`
the delegate's address (`G…` account or `C…` contract).
```ts
address: string;
```
**Source:** [src/base/auth.ts:396](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L396)
#### `delegateSignature.nestedDelegates`
signers this delegate in turn delegates to (recursive).
```ts
nestedDelegates?: DelegateSignature[];
```
**Source:** [src/base/auth.ts:404](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L404)
#### `delegateSignature.signature`
the delegate's signature value. Defaults to a `scvVoid` placeholder, which
you can fill afterwards with `authorizeEntry` (passing this address
as `forAddress`) or by editing the entry directly.
```ts
signature?: ScVal;
```
**Source:** [src/base/auth.ts:402](https://github.com/stellar/js-stellar-sdk/blob/main/src/base/auth.ts#L402)
### 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)
### 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)
# Source: docs/reference/network-horizon.md
# Network / Horizon
## Horizon.AccountResponse
Do not create this object directly, use `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 `BaseAccount` object and exposes it's methods so can be used in `TransactionBuilder`.
```ts
class AccountResponse implements TransactionSource {
constructor(response: AccountRecord);
readonly account_id: string;
readonly balances: (BalanceLineNative | BalanceLineLiquidityPool | BalanceLineAsset<"credit_alphanum4"> | BalanceLineAsset<"credit_alphanum12">)[];
readonly data: (options: { value: string }) => Promise<{ value: string }>;
readonly data_attr: Record;
readonly effects: CallCollectionFunction;
readonly flags: Flags;
readonly home_domain?: string;
readonly id: string;
readonly inflation_destination?: string;
readonly last_modified_ledger: number;
readonly last_modified_time: string;
readonly num_sponsored: number;
readonly num_sponsoring: number;
readonly offers: CallCollectionFunction;
readonly operations: CallCollectionFunction;
readonly paging_token: string;
readonly payments: CallCollectionFunction;
sequence: string;
readonly sequence_ledger?: number;
readonly sequence_time?: string;
readonly signers: AccountRecordSigners[];
readonly sponsor?: string;
readonly subentry_count: number;
readonly thresholds: AccountThresholds;
readonly trades: CallCollectionFunction;
readonly transactions: CallCollectionFunction;
accountId(): string;
incrementSequenceNumber(): void;
sequenceNumber(): string;
}
```
**See also**
- `Account Details`
**Source:** [src/horizon/account_response.ts:19](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L19)
### `new AccountResponse(response)`
```ts
constructor(response: AccountRecord);
```
**Parameters**
- **`response`** — `AccountRecord` (required)
**Source:** [src/horizon/account_response.ts:50](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L50)
### `accountResponse.account_id`
```ts
readonly account_id: string;
```
**Source:** [src/horizon/account_response.ts:22](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L22)
### `accountResponse.balances`
```ts
readonly balances: (BalanceLineNative | BalanceLineLiquidityPool | BalanceLineAsset<"credit_alphanum4"> | BalanceLineAsset<"credit_alphanum12">)[];
```
**Source:** [src/horizon/account_response.ts:33](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L33)
### `accountResponse.data`
```ts
readonly data: (options: { value: string }) => Promise<{ value: string }>;
```
**Parameters**
- **`options`** — `{ value: string }` (required)
**Source:** [src/horizon/account_response.ts:38](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L38)
### `accountResponse.data_attr`
```ts
readonly data_attr: Record;
```
**Source:** [src/horizon/account_response.ts:41](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L41)
### `accountResponse.effects`
```ts
readonly effects: CallCollectionFunction;
```
**Source:** [src/horizon/account_response.ts:42](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L42)
### `accountResponse.flags`
```ts
readonly flags: Flags;
```
**Source:** [src/horizon/account_response.ts:32](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L32)
### `accountResponse.home_domain`
```ts
readonly home_domain?: string;
```
**Source:** [src/horizon/account_response.ts:27](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L27)
### `accountResponse.id`
```ts
readonly id: string;
```
**Source:** [src/horizon/account_response.ts:20](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L20)
### `accountResponse.inflation_destination`
```ts
readonly inflation_destination?: string;
```
**Source:** [src/horizon/account_response.ts:28](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L28)
### `accountResponse.last_modified_ledger`
```ts
readonly last_modified_ledger: number;
```
**Source:** [src/horizon/account_response.ts:29](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L29)
### `accountResponse.last_modified_time`
```ts
readonly last_modified_time: string;
```
**Source:** [src/horizon/account_response.ts:30](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L30)
### `accountResponse.num_sponsored`
```ts
readonly num_sponsored: number;
```
**Source:** [src/horizon/account_response.ts:36](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L36)
### `accountResponse.num_sponsoring`
```ts
readonly num_sponsoring: number;
```
**Source:** [src/horizon/account_response.ts:35](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L35)
### `accountResponse.offers`
```ts
readonly offers: CallCollectionFunction;
```
**Source:** [src/horizon/account_response.ts:43](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L43)
### `accountResponse.operations`
```ts
readonly operations: CallCollectionFunction;
```
**Source:** [src/horizon/account_response.ts:44](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L44)
### `accountResponse.paging_token`
```ts
readonly paging_token: string;
```
**Source:** [src/horizon/account_response.ts:21](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L21)
### `accountResponse.payments`
```ts
readonly payments: CallCollectionFunction;
```
**Source:** [src/horizon/account_response.ts:45](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L45)
### `accountResponse.sequence`
```ts
sequence: string;
```
**Source:** [src/horizon/account_response.ts:23](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L23)
### `accountResponse.sequence_ledger`
```ts
readonly sequence_ledger?: number;
```
**Source:** [src/horizon/account_response.ts:24](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L24)
### `accountResponse.sequence_time`
```ts
readonly sequence_time?: string;
```
**Source:** [src/horizon/account_response.ts:25](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L25)
### `accountResponse.signers`
```ts
readonly signers: AccountRecordSigners[];
```
**Source:** [src/horizon/account_response.ts:34](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L34)
### `accountResponse.sponsor`
```ts
readonly sponsor?: string;
```
**Source:** [src/horizon/account_response.ts:37](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L37)
### `accountResponse.subentry_count`
```ts
readonly subentry_count: number;
```
**Source:** [src/horizon/account_response.ts:26](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L26)
### `accountResponse.thresholds`
```ts
readonly thresholds: AccountThresholds;
```
**Source:** [src/horizon/account_response.ts:31](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L31)
### `accountResponse.trades`
```ts
readonly trades: CallCollectionFunction;
```
**Source:** [src/horizon/account_response.ts:46](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L46)
### `accountResponse.transactions`
```ts
readonly transactions: CallCollectionFunction;
```
**Source:** [src/horizon/account_response.ts:47](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L47)
### `accountResponse.accountId()`
Get Stellar account public key ex. `GB3KJPLFUYN5VL6R3GU3EGCGVCKFDSD7BEDX42HWG5BWFKB3KQGJJRMA`
```ts
accountId(): string;
```
**Returns**
accountId
**Source:** [src/horizon/account_response.ts:85](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L85)
### `accountResponse.incrementSequenceNumber()`
Increments sequence number in this object by one.
```ts
incrementSequenceNumber(): void;
```
**Source:** [src/horizon/account_response.ts:100](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L100)
### `accountResponse.sequenceNumber()`
Get the current sequence number
```ts
sequenceNumber(): string;
```
**Returns**
sequenceNumber
**Source:** [src/horizon/account_response.ts:93](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/account_response.ts#L93)
## 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;
friendbot(address: string): FriendbotBuilder;
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.
**Chainable methods**
- `accountId(id: string): CallBuilder` — Returns information and links relating to a single account.
- `call(): Promise>` — Triggers a HTTP request using this builder's current configuration.
- `cursor(cursor: string): this` — Sets `cursor` parameter for the current call.
- `forAsset(asset: Asset): this` — This endpoint filters all accounts who are trustees to an asset.
- `forLiquidityPool(id: string): this` — This endpoint filters accounts holding a trustline to the given liquidity pool.
- `forSigner(id: string): this` — This endpoint filters accounts by signer account.
- `join(include: "transactions"): this` — Sets `join` parameter for the current call.
- `limit(recordsNumber: number): this` — Sets `limit` parameter for the current call.
- `order(direction: "asc" | "desc"): this` — Sets `order` parameter for the current call.
- `sponsor(id: string): this` — This endpoint filters accounts where the given account is sponsoring the account or any of its sub-entries..
- `stream(options: EventSourceOptions = {}): () => void` — Creates an EventSource that listens for incoming messages from the server.
**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
**Chainable methods**
- `call(): Promise>` — Triggers a HTTP request using this builder's current configuration.
- `cursor(cursor: string): this` — Sets `cursor` parameter for the current call.
- `forCode(value: string): AssetsCallBuilder` — This endpoint filters all assets by the asset code.
- `forIssuer(value: string): AssetsCallBuilder` — This endpoint filters all assets by the asset issuer.
- `join(include: "transactions"): this` — Sets `join` parameter for the current call.
- `limit(recordsNumber: number): this` — Sets `limit` parameter for the current call.
- `order(direction: "asc" | "desc"): this` — Sets `order` parameter for the current call.
- `stream(options: EventSourceOptions = {}): () => void` — Creates an EventSource that listens for incoming messages from the server.
**Source:** [src/horizon/server.ts:783](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/server.ts#L783)
### `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:849](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/server.ts#L849)
### `server.claimableBalances()`
```ts
claimableBalances(): ClaimableBalanceCallBuilder;
```
**Returns**
New `ClaimableBalanceCallBuilder` object configured by a current Horizon server configuration.
**Chainable methods**
- `asset(asset: Asset): this` — Returns all claimable balances which provide a balance for the given asset.
- `call(): Promise>` — Triggers a HTTP request using this builder's current configuration.
- `claimableBalance(claimableBalanceId: string): CallBuilder` — The claimable balance details endpoint provides information on a single claimable balance.
- `claimant(claimant: string): this` — Returns all claimable balances which can be claimed by the given account ID.
- `cursor(cursor: string): this` — Sets `cursor` parameter for the current call.
- `join(include: "transactions"): this` — Sets `join` parameter for the current call.
- `limit(recordsNumber: number): this` — Sets `limit` parameter for the current call.
- `order(direction: "asc" | "desc"): this` — Sets `order` parameter for the current call.
- `sponsor(sponsor: string): this` — Returns all claimable balances which are sponsored by the given account ID.
- `stream(options: EventSourceOptions = {}): () => void` — Creates an EventSource that listens for incoming messages from the server.
**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
**Chainable methods**
- `call(): Promise>` — Triggers a HTTP request using this builder's current configuration.
- `cursor(cursor: string): this` — Sets `cursor` parameter for the current call.
- `forAccount(accountId: string): this` — This endpoint represents all effects that changed a given account.
- `forLedger(sequence: string | number): this` — Effects are the specific ways that the ledger was changed by any operation.
- `forLiquidityPool(poolId: string): this` — This endpoint represents all effects involving a particular liquidity pool.
- `forOperation(operationId: string): this` — This endpoint represents all effects that occurred as a result of a given operation.
- `forTransaction(transactionId: string): this` — This endpoint represents all effects that occurred as a result of a given transaction.
- `join(include: "transactions"): this` — Sets `join` parameter for the current call.
- `limit(recordsNumber: number): this` — Sets `limit` parameter for the current call.
- `order(direction: "asc" | "desc"): this` — Sets `order` parameter for the current call.
- `stream(options: EventSourceOptions = {}): () => void` — Creates an EventSource that listens for incoming messages from the server.
**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.friendbot(address)`
```ts
friendbot(address: string): FriendbotBuilder;
```
**Parameters**
- **`address`** — `string` (required) — The Stellar ID that you want Friendbot to send lumens to
**Returns**
New `FriendbotBuilder` instance configured with the current
Horizon server configuration
**Chainable methods**
- `call(): Promise` — Triggers a HTTP request using this builder's current configuration.
- `cursor(cursor: string): this` — Sets `cursor` parameter for the current call.
- `join(include: "transactions"): this` — Sets `join` parameter for the current call.
- `limit(recordsNumber: number): this` — Sets `limit` parameter for the current call.
- `order(direction: "asc" | "desc"): this` — Sets `order` parameter for the current call.
- `stream(options: EventSourceOptions = {}): () => void` — Creates an EventSource that listens for incoming messages from the server.
**Source:** [src/horizon/server.ts:774](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/server.ts#L774)
### `server.ledgers()`
```ts
ledgers(): LedgerCallBuilder;
```
**Returns**
New `LedgerCallBuilder` object configured by a current Horizon server configuration.
**Chainable methods**
- `call(): Promise>` — Triggers a HTTP request using this builder's current configuration.
- `cursor(cursor: string): this` — Sets `cursor` parameter for the current call.
- `join(include: "transactions"): this` — Sets `join` parameter for the current call.
- `ledger(sequence: string | number): this` — Provides information on a single ledger.
- `limit(recordsNumber: number): this` — Sets `limit` parameter for the current call.
- `order(direction: "asc" | "desc"): this` — Sets `order` parameter for the current call.
- `stream(options: EventSourceOptions = {}): () => void` — Creates an EventSource that listens for incoming messages from the server.
**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.
**Chainable methods**
- `call(): Promise>` — Triggers a HTTP request using this builder's current configuration.
- `cursor(cursor: string): this` — Sets `cursor` parameter for the current call.
- `forAccount(id: string): this` — Retrieves all pools an account is participating in.
- `forAssets(...assets: Asset[]): this` — Filters out pools whose reserves don't exactly match these assets.
- `join(include: "transactions"): this` — Sets `join` parameter for the current call.
- `limit(recordsNumber: number): this` — Sets `limit` parameter for the current call.
- `liquidityPoolId(id: string): CallBuilder` — Retrieves a specific liquidity pool by ID.
- `order(direction: "asc" | "desc"): this` — Sets `order` parameter for the current call.
- `stream(options: EventSourceOptions = {}): () => void` — Creates an EventSource that listens for incoming messages from the server.
**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:796](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/server.ts#L796)
### `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);
});
```
**Chainable methods**
- `buying(asset: Asset): this` — Returns all offers buying an asset.
- `call(): Promise>` — Triggers a HTTP request using this builder's current configuration.
- `cursor(cursor: string): this` — Sets `cursor` parameter for the current call.
- `forAccount(id: string): this` — Returns all offers where the given account is involved.
- `join(include: "transactions"): this` — Sets `join` parameter for the current call.
- `limit(recordsNumber: number): this` — Sets `limit` parameter for the current call.
- `offer(offerId: string): CallBuilder` — The offer details endpoint provides information on a single offer.
- `order(direction: "asc" | "desc"): this` — Sets `order` parameter for the current call.
- `seller(seller: string): this` — This endpoint filters offers where the given account is the seller.
- `selling(asset: Asset): this` — Returns all offers selling an asset.
- `sponsor(id: string): this` — This endpoint filters offers where the given account is sponsoring the offer entry.
- `stream(options: EventSourceOptions = {}): () => void` — Creates an EventSource that listens for incoming messages from the server.
**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.
**Chainable methods**
- `call(): Promise>` — Triggers a HTTP request using this builder's current configuration.
- `cursor(cursor: string): this` — Sets `cursor` parameter for the current call.
- `forAccount(accountId: string): this` — This endpoint represents all operations that were included in valid transactions that affected a particular account.
- `forClaimableBalance(claimableBalanceId: string): this` — This endpoint represents all operations that reference a given claimable_balance.
- `forLedger(sequence: string | number): this` — This endpoint returns all operations that occurred in a given ledger.
- `forLiquidityPool(poolId: string): this` — This endpoint represents all operations involving a particular liquidity pool.
- `forTransaction(transactionId: string): this` — This endpoint represents all operations that are part of a given transaction.
- `includeFailed(value: boolean): this` — Adds a parameter defining whether to include failed transactions.
- `join(include: "transactions"): this` — Sets `join` parameter for the current call.
- `limit(recordsNumber: number): this` — Sets `limit` parameter for the current call.
- `operation(operationId: string): CallBuilder` — The operation details endpoint provides information on a single operation.
- `order(direction: "asc" | "desc"): this` — Sets `order` parameter for the current call.
- `stream(options: EventSourceOptions = {}): () => void` — Creates an EventSource that listens for incoming messages from the server.
**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.
**Chainable methods**
- `call(): Promise` — Triggers a HTTP request using this builder's current configuration.
- `cursor(cursor: string): this` — Sets `cursor` parameter for the current call.
- `join(include: "transactions"): this` — Sets `join` parameter for the current call.
- `limit(recordsNumber: number): this` — Sets `limit` parameter for the current call.
- `order(direction: "asc" | "desc"): this` — Sets `order` parameter for the current call.
- `stream(options: EventSourceOptions = {}): () => void` — Creates an EventSource that listens for incoming messages from the server.
**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.
**Chainable methods**
- `call(): Promise>` — Triggers a HTTP request using this builder's current configuration.
- `cursor(cursor: string): this` — Sets `cursor` parameter for the current call.
- `forAccount(accountId: string): this` — This endpoint responds with a collection of Payment operations where the given account was either the sender or receiver.
- `forLedger(sequence: string | number): this` — This endpoint represents all payment operations that are part of a valid transactions in a given ledger.
- `forTransaction(transactionId: string): this` — This endpoint represents all payment operations that are part of a given transaction.
- `includeFailed(value: boolean): this` — Adds a parameter defining whether to include failed transactions.
- `join(include: "transactions"): this` — Sets `join` parameter for the current call.
- `limit(recordsNumber: number): this` — Sets `limit` parameter for the current call.
- `order(direction: "asc" | "desc"): this` — Sets `order` parameter for the current call.
- `stream(options: EventSourceOptions = {}): () => void` — Creates an EventSource that listens for incoming messages from the server.
**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.
**Chainable methods**
- `call(): Promise>` — Triggers a HTTP request using this builder's current configuration.
- `cursor(cursor: string): this` — Sets `cursor` parameter for the current call.
- `join(include: "transactions"): this` — Sets `join` parameter for the current call.
- `limit(recordsNumber: number): this` — Sets `limit` parameter for the current call.
- `order(direction: "asc" | "desc"): this` — Sets `order` parameter for the current call.
- `stream(options: EventSourceOptions = {}): () => void` — Creates an EventSource that listens for incoming messages from the server.
**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.
**Chainable methods**
- `call(): Promise>` — Triggers a HTTP request using this builder's current configuration.
- `cursor(cursor: string): this` — Sets `cursor` parameter for the current call.
- `join(include: "transactions"): this` — Sets `join` parameter for the current call.
- `limit(recordsNumber: number): this` — Sets `limit` parameter for the current call.
- `order(direction: "asc" | "desc"): this` — Sets `order` parameter for the current call.
- `stream(options: EventSourceOptions = {}): () => void` — Creates an EventSource that listens for incoming messages from the server.
**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
**Chainable methods**
- `call(): Promise>` — Triggers a HTTP request using this builder's current configuration.
- `cursor(cursor: string): this` — Sets `cursor` parameter for the current call.
- `join(include: "transactions"): this` — Sets `join` parameter for the current call.
- `limit(recordsNumber: number): this` — Sets `limit` parameter for the current call.
- `order(direction: "asc" | "desc"): this` — Sets `order` parameter for the current call.
- `stream(options: EventSourceOptions = {}): () => void` — Creates an EventSource that listens for incoming messages from the server.
**Source:** [src/horizon/server.ts:813](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/server.ts#L813)
### `server.trades()`
Returns
```ts
trades(): TradesCallBuilder;
```
**Returns**
New `TradesCallBuilder` object configured by a current Horizon server configuration.
**Chainable methods**
- `call(): Promise>` — Triggers a HTTP request using this builder's current configuration.
- `cursor(cursor: string): this` — Sets `cursor` parameter for the current call.
- `forAccount(accountId: string): this` — Filter trades for a specific account
- `forAssetPair(base: Asset, counter: Asset): this` — Filter trades for a specific asset pair (orderbook)
- `forLiquidityPool(liquidityPoolId: string): this` — Filter trades for a specific liquidity pool
- `forOffer(offerId: string): this` — Filter trades for a specific offer
- `forType(tradeType: TradeType): this` — Filter trades by a specific type.
- `join(include: "transactions"): this` — Sets `join` parameter for the current call.
- `limit(recordsNumber: number): this` — Sets `limit` parameter for the current call.
- `order(direction: "asc" | "desc"): this` — Sets `order` parameter for the current call.
- `stream(options: EventSourceOptions = {}): () => void` — Creates an EventSource that listens for incoming messages from the server.
**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.
**Chainable methods**
- `call(): Promise>` — Triggers a HTTP request using this builder's current configuration.
- `cursor(cursor: string): this` — Sets `cursor` parameter for the current call.
- `forAccount(accountId: string): this` — This endpoint represents all transactions that affected a given account.
- `forClaimableBalance(claimableBalanceId: string): this` — This endpoint represents all transactions that reference a given claimable_balance.
- `forLedger(sequence: string | number): this` — This endpoint represents all transactions in a given ledger.
- `forLiquidityPool(poolId: string): this` — This endpoint represents all transactions involving a particular liquidity pool.
- `includeFailed(value: boolean): this` — Adds a parameter defining whether to include failed transactions.
- `join(include: "transactions"): this` — Sets `join` parameter for the current call.
- `limit(recordsNumber: number): this` — Sets `limit` parameter for the current call.
- `order(direction: "asc" | "desc"): this` — Sets `order` parameter for the current call.
- `stream(options: EventSourceOptions = {}): () => void` — Creates an EventSource that listens for incoming messages from the server.
- `transaction(transactionId: string): CallBuilder` — The transaction details endpoint provides information on a single transaction.
**Source:** [src/horizon/server.ts:622](https://github.com/stellar/js-stellar-sdk/blob/main/src/horizon/server.ts#L622)
## 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.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)
## Types
### 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