Skip to main content
Operations are objects that represent a desired change to the ledger and are submitted to the network grouped in a transaction. For each operation, there is a successful or failed result type. In the case of success, the user can gather information about the effect of the operation. In the case of failure, the user can learn more about the error. Learn more about transactions and operations in our Operations and Transactions section. There are currently 26 operations you can use on the Stellar network, these operations, their definitions, SDKs, thresholds, parameters, and errors are listed below.
All these operations have an optional source account parameter. If the source account parameter is omitted, the source account of the transaction is considered as the source account of the operation.

Create account

Creates and funds a new account with the specified starting balance Parameters: Possible errors:

Payment

Sends an amount in a specific asset to a destination account Parameters: Possible errors:

Path payment strict send

A payment where the asset sent can be different than the asset received; allows the user to specify the amount of the asset to send Learn more about path payments: Path Payments Guide Parameters: Possible errors:

Path payment strict receive

A payment where the asset received can be different from the asset sent; allows the user to specify the amount of the asset received Learn more about path payments: Path Payments Guide Parameters: Possible errors:

Manage buy offer

Creates, updates, or deletes an offer to buy a specific amount of an asset for another Learn more about passive sell offers: Liquidity on Stellar: SDEX and Liquidity Pools Parameters: Possible errors:

Manage sell offer

Creates, updates, or deletes an offer to sell a specific amount of an asset for another Learn more about passive sell offers: Liquidity on Stellar: SDEX and Liquidity Pools Parameters: Possible errors:

Create passive sell offer

Creates an offer to sell one asset for another without taking a reverse offer of equal price Learn more about passive sell offers: Liquidity on Stellar: SDEX and Liquidity Pools Parameters: Possible errors:

Set options

Set options for an account such as flags, inflation destination, signers, home domain, and master key weight Learn more about flags, the home domain (SEP-1), and signers and key weights.
  • SDKs: Python | JavaScript | Java | Go
  • Threshold: High (when changing the master weight, a threshold, or a signer) or Medium (when changing anything else)
  • Result: SetOptionsResult
Parameters: Possible errors:

Change trust

Creates, updates, or deletes a trustline Learn more about trustlines: Trustlines section Parameters: Possible errors:

Allow trust

Updates the authorized flag of an existing trustline. This operation can only be performed by the asset issuer
This operation is deprecated as of Protocol 17- prefer SetTrustlineFlags operation instead.
Parameters: Possible errors:

Account merge

Transfers the XLM balance of an account to another account and removes the source account from the ledger A source account can only be merged once it holds no non-signer subentries: any trustlines, offers, or data entries must be removed first. Signers are not a blocker — they (including sponsored signers) are removed automatically during the merge. Sponsorship also blocks a merge (ACCOUNT_MERGE_IS_SPONSOR), and this covers two distinct conditions with different remedies: (1) the account is already sponsoring reserves for other accounts (numSponsoring > 0) — revoke those sponsorships first; or (2) the account has an open is-sponsoring-future-reserves relationship earlier in the same transaction — that relationship must be ended (with EndSponsoringFutureReserves) before the merge, and in this case there may be no created reserve to revoke. In either case, merely being sponsored by another account does not block a merge. Parameters: Possible errors:

Manage data

Sets, modifies, or deletes a data entry (name/value pair) that is attached to an account Learn more about entries and subentries: Accounts section Parameters: Possible errors:

Bump sequence

Bumps forward the sequence number of the source account to the given sequence number, invalidating any transaction with a smaller sequence number Parameters: Possible errors:

Create claimable balance

Moves an amount of asset from the operation source account into a new ClaimableBalanceEntry Learn more about claimable balances: Claimable Balances Guide Parameters: Possible errors:

Claim claimable balance

Claims a ClaimableBalanceEntry that corresponds to the BalanceID and adds the amount of an asset on the entry to the source account Learn more about claimable balances and view more parameters: Claimable Balances Guide Parameters: Possible errors:

Begin sponsoring future reserves

Allows an account to pay the base reserves for another account; sponsoring account establishes the is-sponsoring-future-reserves relationship There must also be an end sponsoring future reserves operation in the same transaction Learn more about sponsored reserves: Sponsored Reserves Guide Parameters: Possible errors:

End sponsoring future reserves

Terminates the current is-sponsoring-future-reserves relationship in which the source account is sponsored Learn more about sponsored reserves: Sponsored Reserves Guide Parameters: Possible errors:

Revoke sponsorship

Sponsoring account can remove or transfer sponsorships of existing ledgerEntries and signers; the logic of this operation depends on the state of the source account Learn more about sponsored reserves: Sponsored Reserves Guide This operation is a union with two possible types: Or Possible errors:

Clawback

Burns an amount in a specific asset from an account. Only the issuing account for the asset can perform this operation. Learn more about clawbacks: Clawback Guide Parameters: Possible errors:

Clawback claimable balance

Claws back an unclaimed ClaimableBalanceEntry, burning the pending amount of the asset. Only the issuing account for the asset can perform this operation. Learn more about clawbacks: Clawback Guide Learn more about claimable balances: Claimable Balances Guide Parameters: Possible errors:

Set trustline flags

Allows issuing account to configure authorization and trustline flags to an asset The Asset parameter is of the TrustLineAsset type. If you are modifying a trustline to a regular asset (i.e. one in a Code:Issuer format), this is equivalent to the Asset type. If you are modifying a trustline to a pool share, however, this is composed of the liquidity pool’s unique ID. Learn more about flags: Flags Glossary Entry Parameters: Possible errors:

Liquidity pool deposit

Deposits assets into a liquidity pool, increasing the reserves of a liquidity pool in exchange for pool shares Parameters to this operation depend on the ordering of assets in the liquidity pool: “A” refers to the first asset in the liquidity pool, and “B” refers to the second asset in the liquidity pool. If the pool is empty, then this operation deposits maxAmountA of A and maxAmountB of B into the pool. If the pool is not empty, then this operation deposits at most maxAmountA of A and maxAmountB of B into the pool. The actual amounts deposited are determined using the current reserves of the pool. You can use these parameters to control a percentage of slippage. Learn more about liquidity pools: Liquidity Pools section Parameters: Possible errors:

Liquidity pool withdraw

Withdraw assets from a liquidity pool, reducing the number of pool shares in exchange for reserves of a liquidity pool The minAmountA and minAmountB parameters can be used to control a percentage of slippage from the “spot price” on the pool. Learn more about liquidity pools: Liquidity Pools section Parameters: Possible errors:

Invoke Host Function

Invoke and deploy Soroban smart contracts with InvokeHostFunctionOp. The InvokeHostFunctionOp can be used to perform the following Soroban operations:
  • Invoke contract functions: HOST_FUNCTION_TYPE_INVOKE_CONTRACT
  • Upload Wasm of the contracts: HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM
  • Deploy new contracts using the uploaded Wasm or built-in implementations: HOST_FUNCTION_TYPE_CREATE_CONTRACT
Note that Soroban transactions can only contain one operation per transaction. Learn more here. Parameters: Possible errors:

Extend Footprint TTL

Extend the time to live (TTL) of entries for Soroban smart contracts with the ExtendFootprintTTLOp. This operation extends the TTL of the entries specified in the readOnly footprint of the transaction so that they will live at least extendTo ledgers past the current ledger. Note that Soroban transactions can only contain one operation per transaction. Learn more in the State Archival section. Parameters: Possible errors:

Restore Footprint

Make archived Soroban smart contract entries accessible again by restoring them with RestoreFootprintOp. This operation restores the archived entries specified in the readWrite footprint. Note that Soroban transactions can only contain one operation per transaction. Learn more in the State Archival section. Parameters: Possible errors: