Skip to main content

List of Operations

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.

Create account

Creates and funds a new account with the specified starting balance

SDKs: JavaScript | Java | Go
Threshold: Medium
Result: CreateAccountResult
Parameters:

ParameterTypeDescription
Destinationaccount IDAccount address that is created and funded.
Starting BalanceintegerAmount of XLM to send to the newly created account. This XLM comes from the source account.

Possible errors:

ErrorCodeDescription
CREATE_ACCOUNT_MALFORMED-1The destination is invalid.
CREATE_ACCOUNT_UNDERFUNDED-2The source account performing the command does not have enough funds to give destination the starting balance amount of XLM and still maintain its minimum XLM reserve plus satisfy its XLM selling liabilities.
CREATE_ACCOUNT_LOW_RESERVE-3This operation would create an account with fewer than the minimum number of XLM an account must hold.
CREATE_ACCOUNT_ALREADY_EXIST-4The destination account already exists.

Payment

Sends an amount in a specific asset to a destination account

SDKs: JavaScript | Java | Go
Threshold: Medium
Result: PaymentResult
Parameters:

ParametersTypeDescription
Destinationaccount IDAccount address that receives the payment.
AssetassetAsset to send to the destination account.
AmountintegerAmount of the aforementioned asset to send.

Possible errors:

ErrorCodeDescription
PAYMENT_MALFORMED-1The input to the payment is invalid.
PAYMENT_UNDERFUNDED-2The source account (sender) does not have enough funds to send amount and still satisfy its selling liabilities. Note that if sending XLM then the sender must additionally maintain its minimum XLM reserve.
PAYMENT_SRC_NO_TRUST-3The source account does not trust the issuer of the asset it is trying to send.
PAYMENT_SRC_NOT_AUTHORIZED-4The source account is not authorized to send this payment.
PAYMENT_NO_DESTINATION-5The receiving account does not exist. Note that this error will not be returned if the receiving account is the issuer of asset.
PAYMENT_NO_TRUST-6The receiver does not trust the issuer of the asset being sent. For more information, see the Assets section.
PAYMENT_NOT_AUTHORIZED-7The destination account is not authorized by the asset's issuer to hold the asset.
PAYMENT_LINE_FULL-8The destination account (receiver) does not have sufficient limits to receive amount and still satisfy its buying liabilities.

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 Encyclopedia Entry

SDKs: JavaScript | Java | Go
Threshold: Medium
Result: PathPaymentStrictSendResult
Parameters:

ParametersTypeDescription
Send assetassetThe asset deducted from the sender's account.
Send amountintegerThe amount of send asset to deduct (excluding fees).
Destinationaccount IDAccount ID of the recipient.
Destination assetassetThe asset the destination account receives.
Destination minintegerThe minimum amount of destination asset the destination account can receive.
Pathlist of assetsThe assets (other than send asset and destination asset) involved in the offers the path takes. For example, if you can only find a path from USD to EUR through XLM and BTC, the path would be USD -> XLM -> BTC -> EUR and the path field would contain XLM and BTC.

Possible errors:

ErrorCodeDescription
PATH_PAYMENT_STRICT_SEND_MALFORMED-1The input to this path payment is invalid.
PATH_PAYMENT_STRICT_SEND_UNDERFUNDED-2The source account (sender) does not have enough funds to send and still satisfy its selling liabilities. Note that if sending XLM then the sender must additionally maintain its minimum XLM reserve.
PATH_PAYMENT_STRICT_SEND_SRC_NO_TRUST-3The source account does not trust the issuer of the asset it is trying to send.
PATH_PAYMENT_STRICT_SEND_SRC_NOT_AUTHORIZED-4The source account is not authorized to send this payment.
PATH_PAYMENT_STRICT_SEND_NO_DESTINATION-5The destination account does not exist.
PATH_PAYMENT_STRICT_SEND_NO_TRUST-6The destination account does not trust the issuer of the asset being sent. For more, see the Assets section.
PATH_PAYMENT_STRICT_SEND_NOT_AUTHORIZED-7The destination account is not authorized by the asset's issuer to hold the asset.
PATH_PAYMENT_STRICT_SEND_LINE_FULL-8The destination account does not have sufficient limits to receive destination amount and still satisfy its buying liabilities.
PATH_PAYMENT_STRICT_SEND_TOO_FEW_OFFERS-10There is no path of offers connecting the send asset and destination asset. Stellar only considers paths of length 5 or shorter.
PATH_PAYMENT_STRICT_SEND_OFFER_CROSS_SELF-11The payment would cross one of its own offers.
PATH_PAYMENT_STRICT_SEND_UNDER_DESTMIN-12The paths that could send destination amount of destination asset would fall short of destination min.

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 Encyclopedia Entry

SDKs: JavaScript | Java | Go
Threshold: Medium
Result: PathPaymentStrictReceiveResult
Parameters:

ParametersTypeDescription
Send assetassetThe asset deducted from the sender's account.
Send maxintegerThe maximum amount of send asset to deduct (excluding fees).
Destinationaccount IDAccount ID of the recipient.
Destination assetassetThe asset the destination account receives.
Destination amountintegerThe amount of destination asset the destination account receives.
Pathlist of assetsThe assets (other than send asset and destination asset) involved in the offers the path takes. For example, if you can only find a path from USD to EUR through XLM and BTC, the path would be USD -> XLM -> BTC -> EUR and the path field would contain XLM and BTC.

Possible errors:

ErrorCodeDescription
PATH_PAYMENT_STRICT_RECEIVE_MALFORMED-1The input to this path payment is invalid.
PATH_PAYMENT_STRICT_RECEIVE_UNDERFUNDED-2The source account (sender) does not have enough funds to send and still satisfy its selling liabilities. Note that if sending XLM then the sender must additionally maintain its minimum XLM reserve.
PATH_PAYMENT_STRICT_RECEIVE_SRC_NO_TRUST-3The source account does not trust the issuer of the asset it is trying to send.
PATH_PAYMENT_STRICT_RECEIVE_SRC_NOT_AUTHORIZED-4The source account is not authorized to send this payment.
PATH_PAYMENT_STRICT_RECEIVE_NO_DESTINATION-5The destination account does not exist.
PATH_PAYMENT_STRICT_RECEIVE_NO_TRUST-6The destination account does not trust the issuer of the asset being sent. For more, see the Assets section.
PATH_PAYMENT_STRICT_RECEIVE_NOT_AUTHORIZED-7The destination account is not authorized by the asset's issuer to hold the asset.
PATH_PAYMENT_STRICT_RECEIVE_LINE_FULL-8The destination account does not have sufficient limits to receive destination amount and still satisfy its buying liabilities.
PATH_PAYMENT_STRICT_RECEIVE_TOO_FEW_OFFERS-10There is no path of offers connecting the send asset and destination asset. Stellar only considers paths of length 5 or shorter.
PATH_PAYMENT_STRICT_RECEIVE_OFFER_CROSS_SELF-11The payment would cross one of its own offers.
PATH_PAYMENT_STRICT_RECEIVE_OVER_SENDMAX-12The paths that could send destination amount of destination asset would exceed send max.

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

SDKs: JavaScript | Java | Go
Threshold: Medium
Result: ManageBuyOfferResult
Parameters:

ParametersTypeDescription
SellingassetAsset the offer creator is selling.
BuyingassetAsset the offer creator is buying.
AmountintegerAmount of buying being bought. Set to 0 if you want to delete an existing offer.
Price{numerator, denominator}Price of 1 unit of buying in terms of selling. For example, if you wanted to buy 30 XLM and sell 5 BTC, the price would be 30.
Offer IDunsigned integerThe ID of the offer. 0 for new offer. Set to existing offer ID to update or delete.

Possible errors:

ErrorCodeDescription
MANAGE_BUY_OFFER_MALFORMED-1The input is incorrect and would result in an invalid offer.
MANAGE_BUY_OFFER_SELL_NO_TRUST-2The account creating the offer does not have a trustline for the asset it is selling.
MANAGE_BUY_OFFER_BUY_NO_TRUST-3The account creating the offer does not have a trustline for the asset it is buying.
MANAGE_BUY_OFFER_BUY_NOT_AUTHORIZED-4The account creating the offer is not authorized to sell this asset.
MANAGE_BUY_OFFER_SELL_NOT_AUTHORIZED-5The account creating the offer is not authorized to buy this asset.
MANAGE_BUY_OFFER_LINE_FULL-6The account creating the offer does not have sufficient limits to receive buying and still satisfy its buying liabilities.
MANAGE_BUY_OFFER_UNDERFUNDED-7The account creating the offer does not have sufficient limits to send selling and still satisfy its selling liabilities. Note that if selling XLM then the account must additionally maintain its minimum XLM reserve, which is calculated assuming this offer will not completely execute immediately.
MANAGE_BUY_OFFER_CROSS_SELF-8The account has opposite offer of equal or lesser price active, so the account creating this offer would immediately cross itself.
MANAGE_BUY_OFFER_NOT_FOUND-11An offer with that offerID cannot be found.
MANAGE_BUY_OFFER_LOW_RESERVE-12The account creating this offer does not have enough XLM to satisfy the minimum XLM reserve increase caused by adding a subentry and still satisfy its XLM selling liabilities. For every offer an account creates, the minimum amount of XLM that account must hold will increase.

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

SDKs: JavaScript | Java | Go
Threshold: Medium
Result: ManageSellOfferResult
Parameters:

ParametersTypeDescription
SellingassetAsset the offer creator is selling.
BuyingassetAsset the offer creator is buying.
AmountintegerAmount of selling being sold. Set to 0 if you want to delete an existing offer.
Price{numerator, denominator}Price of 1 unit of selling in terms of buying. For example, if you wanted to sell 30 XLM and buy 5 BTC, the price would be 30.
Offer IDunsigned integerThe ID of the offer. 0 for new offer. Set to existing offer ID to update or delete.

Possible errors:

ErrorCodeDescription
MANAGE_SELL_OFFER_MALFORMED-1The input is incorrect and would result in an invalid offer.
MANAGE_SELL_OFFER_SELL_NO_TRUST-2The account creating the offer does not have a trustline for the asset it is selling.
MANAGE_SELL_OFFER_BUY_NO_TRUST-3The account creating the offer does not have a trustline for the asset it is buying.
MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED-4The account creating the offer is not authorized to sell this asset.
MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED-5The account creating the offer is not authorized to buy this asset.
MANAGE_SELL_OFFER_LINE_FULL-6The account creating the offer does not have sufficient limits to receive buying and still satisfy its buying liabilities.
MANAGE_SELL_OFFER_UNDERFUNDED-7The account creating the offer does not have sufficient limits to send selling and still satisfy its selling liabilities. Note that if selling XLM then the account must additionally maintain its minimum XLM reserve, which is calculated assuming this offer will not completely execute immediately.
MANAGE_SELL_OFFER_CROSS_SELF-8The account has opposite offer of equal or lesser price active, so the account creating this offer would immediately cross itself.
MANAGE_SELL_OFFER_NOT_FOUND-11An offer with that offerID cannot be found.
MANAGE_SELL_OFFER_LOW_RESERVE-12The account creating this offer does not have enough XLM to satisfy the minimum XLM reserve increase caused by adding a subentry and still satisfy its XLM selling liabilities. For every offer an account creates, the minimum amount of XLM that account must hold will increase.

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

SDKs: JavaScript | Java | Go
Threshold: Medium
Result: ManageSellOfferResult
Parameters:

ParametersTypeDescription
SellingassetAsset the offer creator is selling.
BuyingassetAsset the offer creator is buying.
AmountintegerAmount of selling being sold.
Price{numerator, denominator}Price of 1 unit of selling in terms of buying. For example, if you wanted to sell 30 XLM and buy 5 BTC, the price would be 30.

Possible errors:

ErrorCodeDescription
MANAGE_SELL_OFFER_MALFORMED-1The input is incorrect and would result in an invalid offer.
MANAGE_SELL_OFFER_SELL_NO_TRUST-2The account creating the offer does not have a trustline for the asset it is selling.
MANAGE_SELL_OFFER_BUY_NO_TRUST-3The account creating the offer does not have a trustline for the asset it is buying.
MANAGE_SELL_OFFER_SELL_NOT_AUTHORIZED-4The account creating the offer is not authorized to sell this asset.
MANAGE_SELL_OFFER_BUY_NOT_AUTHORIZED-5The account creating the offer is not authorized to buy this asset.
MANAGE_SELL_OFFER_LINE_FULL-6The account creating the offer does not have sufficient limits to receive buying and still satisfy its buying liabilities.
MANAGE_SELL_OFFER_UNDERFUNDED-7The account creating the offer does not have sufficient limits to send selling and still satisfy its selling liabilities. Note that if selling XLM then the account must additionally maintain its minimum XLM reserve, which is calculated assuming this offer will not completely execute immediately.
MANAGE_SELL_OFFER_CROSS_SELF-8The account has opposite offer of equal or lesser price active, so the account creating this offer would immediately cross itself.
MANAGE_SELL_OFFER_NOT_FOUND-11An offer with that offerID cannot be found.
MANAGE_SELL_OFFER_LOW_RESERVE-12The account creating this offer does not have enough XLM to satisfy the minimum XLM reserve increase caused by adding a subentry and still satisfy its XLM selling liabilities. For every offer an account creates, the minimum amount of XLM that account must hold will increase.

Set options

Set options for an account such as flags, inflation destination, signers, home domain, and master key weight

Learn more about flags: Flags Encyclopedia Entry
Learn more about the home domain: Stellar Ecosystem Proposals SEP-0001
Learn more about signers operations and key weight: Signature and Multisignature Encyclopedia Entry

SDKs: JavaScript | Java | Go
Threshold: High (when updating signers or other thresholds) or Medium (when updating everything else)
Result: SetOptionsResult
Parameters:

ParametersTypeDescription
Inflation Destinationaccount IDAccount of the inflation destination.
Clear flagsintegerIndicates which account flags to clear. These account-level flags are primarily used by asset issuers; for details about the flags, please refer to the Asset Design Considerations page. The bit mask integer subtracts from the existing flags of the account. This allows for setting specific bits without knowledge of existing flags.
Set flagsintegerIndicates which account flags to set. These account-level flags are primarily used by asset issuers; for details about the flags, please refer to the Asset Design Considerations page The bit mask integer adds onto the existing flags of the account. This allows for setting specific bits without knowledge of existing flags.
Master weightintegerA number from 0-255 (inclusive) representing the weight of the master key. If the weight of the master key is updated to 0, it is effectively disabled.
Low thresholdintegerA number from 0-255 (inclusive) representing the threshold this account sets on all operations it performs that have a low threshold.
Medium thresholdintegerA number from 0-255 (inclusive) representing the threshold this account sets on all operations it performs that have a medium threshold.
High thresholdintegerA number from 0-255 (inclusive) representing the threshold this account sets on all operations it performs that have a high threshold.
Home domainstringSets the home domain of an account. See Federation.
Signer{Public Key, weight}Add, update, or remove a signer from an account. Signer weight is a number from 0-255 (inclusive). The signer is deleted if the weight is 0.

Possible errors:

ErrorCodeDescription
SET_OPTIONS_LOW_RESERVE-1This account does not have enough XLM to satisfy the minimum XLM reserve increase caused by adding a subentry and still satisfy its XLM selling liabilities. For every new signer added to an account, the minimum reserve of XLM that account must hold increases.
SET_OPTIONS_TOO_MANY_SIGNERS-220 is the maximum number of signers an account can have, and adding another signer would exceed that.
SET_OPTIONS_BAD_FLAGS-3The flags set and/or cleared are invalid by themselves or in combination.
SET_OPTIONS_INVALID_INFLATION-4The destination account set in the inflation field does not exist.
SET_OPTIONS_CANT_CHANGE-5This account can no longer change the option it wants to change.
SET_OPTIONS_UNKNOWN_FLAG-6The account is trying to set a flag that is unknown.
SET_OPTIONS_THRESHOLD_OUT_OF_RANGE-7The value for a key weight or threshold is invalid.
SET_OPTIONS_BAD_SIGNER-8Any additional signers added to the account cannot be the master key.
SET_OPTIONS_INVALID_HOME_DOMAIN-9Home domain is malformed.

Change trust

Creates, updates, or deletes a trustline

Learn more about trustlines: Trustlines section

SDKs: JavaScript | Java | Go
Threshold: Medium
Result: ChangeTrustResult
Parameters:

ParametersTypeDescription
LineChangeTrustAssetThe asset of the trustline. For example, if a user extends a trustline of up to 200 USD to an anchor, the line is USD:anchor.
LimitintegerThe limit of the trustline. In the previous example, the limit would be 200.

Possible errors:

ErrorCodeDescription
CHANGE_TRUST_MALFORMED-1The input to this operation is invalid.
CHANGE_TRUST_NO_ISSUER-2The issuer of the asset cannot be found.
CHANGE_TRUST_INVALID_LIMIT-3The limit is not sufficient to hold the current balance of the trustline and still satisfy its buying liabilities. This error occurs when attempting to remove a trustline with a non-zero asset balance.
CHANGE_TRUST_LOW_RESERVE-4This account does not have enough XLM to satisfy the minimum XLM reserve increase caused by adding a subentry and still satisfy its XLM selling liabilities. For every new trustline added to an account, the minimum reserve of XLM that account must hold increases.
CHANGE_TRUST_SELF_NOT_ALLOWED-5The source account attempted to create a trustline for itself, which is not allowed.
CHANGE_TRUST_TRUST_LINE_MISSING-6The asset trustline is missing for the liquidity pool.
CHANGE_TRUST_CANNOT_DELETE-7The asset trustline is still referenced by a liquidity pool.
CHANGE_TRUST_NOT_AUTH_MAINTAIN_LIABILITIES-8The asset trustline is deauthorized.

Allow trust

Updates the authorized flag of an existing trustline

This operation is deprecated as of Protocol 17- prefer SetTrustlineFlags instead

SDKs: JavaScript | Java | Go
Threshold: Low
Result: AllowTrustResult
Parameters:

ParametersTypeDescription
Trustoraccount IDThe account of the recipient of the trustline.
Typeasset codeThe 4 or 12 character-maximum asset code of the trustline the source account is authorizing. For example, if an issuing account wants to allow another account to hold its USD credit, the type is USD.
AuthorizeintegerFlag indicating whether the trustline is authorized. 1 if the account is authorized to transact with the asset. 2 if the account is authorized to maintain offers, but not to perform other transactions

Possible errors:

ErrorCodeDescription
ALLOW_TRUST_MALFORMED-1The asset specified in type is invalid. In addition, this error happens when the native asset is specified.
ALLOW_TRUST_NO_TRUST_LINE-2The trustor does not have a trustline with the issuer performing this operation.
ALLOW_TRUST_TRUST_NOT_REQUIRED-3The source account (issuer performing this operation) does not require trust. In other words, it does not have the flag AUTH_REQUIRED_FLAG set.
ALLOW_TRUST_CANT_REVOKE-4The source account is trying to revoke the trustline of the trustor, but it cannot do so.
ALLOW_TRUST_SELF_NOT_ALLOWED-5The source account attempted to allow a trustline for itself, which is not allowed because an account cannot create a trustline with itself.
ALLOW_TRUST_LOW_RESERVE-6Claimable balances can't be created on revocation of asset (or pool share) trustlines associated with a liquidity pool due to low reserves.

Account merge

Transfers the XLM balance of an account to another account and removes the source account from the ledger

SDKs: JavaScript | Java | Go
Threshold: High
Result: AccountMergeResult
Parameters:

ParametersTypeDescription
Destinationaccount IDThe account that receives the remaining XLM balance of the source account.

Possible errors:

ErrorCodeDescription
ACCOUNT_MERGE_MALFORMED-1The operation is malformed because the source account cannot merge with itself. The destination must be a different account.
ACCOUNT_MERGE_NO_ACCOUNT-2The destination account does not exist.
ACCOUNT_MERGE_IMMUTABLE_SET-3The source account has AUTH_IMMUTABLE flag set.
ACCOUNT_MERGE_HAS_SUB_ENTRIES-4The source account has trustlines/offers.
ACCOUNT_MERGE_SEQNUM_TOO_FAR-5Source's account sequence number is too high. It must be less than (ledgerSeq << 32) = (ledgerSeq * 0x100000000).
ACCOUNT_MERGE_DEST_FULL-6The destination account cannot receive the balance of the source account and still satisfy its lumen buying liabilities.
ACCOUNT_MERGE_IS_SPONSOR-7The source account is a sponsor.

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

SDKs: JavaScript | Java | Go
Threshold: Medium
Result: ManageDataResult
Parameters:

ParametersTypeDescription
NamestringString up to 64 bytes long. If this is a new Name it will add the given name/value pair to the account. If this Name is already present then the associated value will be modified.
Valuebinary data(optional) If not present then the existing Name will be deleted. If present then this value will be set in the DataEntry. Up to 64 bytes long.

Possible errors:

ErrorCodeDescription
MANAGE_DATA_NOT_SUPPORTED_YET-1The network hasn't moved to this protocol change yet. This failure means the network doesn't support this feature yet.
MANAGE_DATA_NAME_NOT_FOUND-2Trying to remove a Data Entry that isn't there. This will happen if Name is set (and Value isn't) but the Account doesn't have a DataEntry with that Name.
MANAGE_DATA_LOW_RESERVE-3This account does not have enough XLM to satisfy the minimum XLM reserve increase caused by adding a subentry and still satisfy its XLM selling liabilities. For every new DataEntry added to an account, the minimum reserve of XLM that account must hold increases.
MANAGE_DATA_INVALID_NAME-4Name not a valid string.

Bump sequence

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

SDKs: JavaScript | Java | Go
Threshold: Low
Result: BumpSequenceResult
Parameters:

ParametersTypeDescription
bumpToSequenceNumberdesired value for the operation's source account sequence number.

Possible errors:

ErrorCodeDescription
BUMP_SEQUENCE_BAD_SEQ-1The specified bumpTo sequence number is not a valid sequence number. It must be between 0 and INT64_MAX (9223372036854775807 or 0x7fffffffffffffff).

Create claimable balance

Moves an amount of asset from the operation source account into a new ClaimableBalanceEntry

Learn more about claimable balances: Claimable Balances Encyclopedia Entry

SDKs: Java
Threshold: Medium
Result: CreateClaimableBalanceResult
Parameters:

ParametersTypeDescription
AssetassetAsset that will be held in the ClaimableBalanceEntry in the form asset_code:issuing_address or native (XLM).
AmountintegerAmount of asset stored in the ClaimableBalanceEntry.
Claimantslist of claimantsList of Claimants (account address and ClaimPredicate pair) that can claim this ClaimableBalanceEntry.

Possible errors:

ErrorCodeDescription
CREATE_CLAIMABLE_BALANCE_MALFORMED-1The input to this operation is invalid.
CREATE_CLAIMABLE_BALANCE_LOW_RESERVE-2The account creating this entry does not have enough XLM to satisfy the minimum XLM reserve increase caused by adding a ClaimableBalanceEntry. For every claimant in the list, the minimum amount of XLM this account must hold will increase by baseReserve.
CREATE_CLAIMABLE_BALANCE_NO_TRUST-3The source account does not trust the issuer of the asset it is trying to include in the ClaimableBalanceEntry.
CREATE_CLAIMABLE_BALANCE_NOT_AUTHORIZED-4The source account is not authorized to transfer this asset.
CREATE_CLAIMABLE_BALANCE_UNDERFUNDED-5The source account does not have enough funds to transfer amount of this asset to the ClaimableBalanceEntry.

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 Encyclopedia Entry

SDKs: Java
Threshold: Low
Result: ClaimClaimableBalanceResult
Parameters:

ParametersTypeDescription
BalanceIDclaimableBalanceIDBalanceID on the ClaimableBalanceEntry that the source account is claiming. The balanceID can be retrieved from a successful CreateClaimableBalanceResult. See Claimable Balance Encyclopedia Entry for more information.

Possible errors:

ErrorCodeDescription
CLAIM_CLAIMABLE_BALANCE_DOES_NOT_EXIST-1There is no existing ClaimableBalanceEntry that matches the input BalanceID.
CLAIM_CLAIMABLE_BALANCE_CANNOT_CLAIM-2There is no claimant that matches the source account, or the claimants predicate is not satisfied.
CLAIM_CLAIMABLE_BALANCE_LINE_FULL-3The account claiming the ClaimableBalanceEntry does not have sufficient limits to receive amount of the asset and still satisfy its buying liabilities.
CLAIM_CLAIMABLE_BALANCE_NO_TRUST-4The source account does not trust the issuer of the asset it is trying to claim in the ClaimableBalanceEntry.
CLAIM_CLAIMABLE_BALANCE_NOT_AUTHORIZED-5The source account is not authorized to claim the asset in the ClaimableBalanceEntry.

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 Encyclopedia Entry

SDKs: Java
Threshold: Medium
Result: BeginSponsoringFutureReservesResult
Parameters:

ParametersTypeDescription
SponsoredIDaccount IDAccount that will have its reserves sponsored.

Possible errors:

ErrorCodeDescription
BEGIN_SPONSORING_FUTURE_RESERVES_MALFORMED-1Source account is equal to sponsoredID.
BEGIN_SPONSORING_FUTURE_RESERVES_ALREADY_SPONSORED-2Source account is already sponsoring sponsoredID.
BEGIN_SPONSORING_FUTURE_RESERVES_RECURSIVE-3Either source account is currently being sponsored, or sponsoredID is sponsoring another account.

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 Encyclopedia Entry

SDKs: Java
Threshold: Medium
Result: EndSponsoringFutureReservesResult
Parameters:

ParametersTypeDescription
begin_sponsoraccount IDThe id of the account which initiated the sponsorship.

Possible errors:

ErrorCodeDescription
END_SPONSORING_FUTURE_RESERVES_NOT_SPONSORED-1Source account is not sponsored.

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 Encyclopedia Entry

Threshold: Medium
Result: RevokeSponsorshipResult

This operation is a union with two possible types:

Union TypeParametersTypeDescription
REVOKE_SPONSORSHIP_LEDGER_ENTRYLedgerKeyledgerKeyLedger key that holds information to identify a specific ledgerEntry that may have its sponsorship modified. See LedgerKey for more information.

Or

Union TypeParametersTypeDescription
REVOKE_SPONSORSHIP_SIGNERSigner{account ID, Signer Key}Signer that may have its sponsorship modified.

Possible errors:

ErrorCodeDescription
REVOKE_SPONSORSHIP_DOES_NOT_EXIST-1The ledgerEntry for LedgerKey doesn’t exist, the account ID on signer doesn’t exist, or the Signer Key doesn’t exist on account ID’s account.
REVOKE_SPONSORSHIP_NOT_SPONSOR-2If the ledgerEntry/signer is sponsored, then the source account must be the sponsor. If the ledgerEntry/signer is not sponsored, the source account must be the owner. This error will be thrown otherwise.
REVOKE_SPONSORSHIP_LOW_RESERVE-3The sponsored account does not have enough XLM to satisfy the minimum balance increase caused by revoking sponsorship on a ledgerEntry/signer it owns, or the sponsor of the source account doesn’t have enough XLM to satisfy the minimum balance increase caused by sponsoring a transferred ledgerEntry/signer.
REVOKE_SPONSORSHIP_ONLY_TRANSFERABLE-4Sponsorship cannot be removed from this ledgerEntry. This error will happen if the user tries to remove the sponsorship from a ClaimableBalanceEntry.
REVOKE_SPONSORSHIP_MALFORMED-5One or more of the inputs to the operation was malformed.

Clawback

Burns an amount in a specific asset from a receiving account

Learn more about clawbacks: Clawback Encyclopedia Entry

SDKs: JavaScript | Java | Go
Threshold: Medium
Result: ClawbackResult
Parameters:

ParametersTypeDescription
Fromaccount IDAccount address that receives the clawback.
AssetassetAsset held by the destination account.
AmountintegerAmount of the aforementioned asset to burn.

Possible errors:

ErrorCodeDescription
CLAWBACK_MALFORMED-1The input to the clawback is invalid.
CLAWBACK_NOT_CLAWBACK_ENABLED-2The trustline between From and the issuer account for this Asset does not have clawback enabled.
CLAWBACK_NO_TRUST-3The From account does not trust the issuer of the asset.
CLAWBACK_UNDERFUNDED-4The From account does not have a sufficient available balance of the asset (after accounting for selling liabilities).

Clawback claimable balance

Claws back an unclaimed ClaimableBalanceEntry, burning the pending amount of the asset

Learn more about clawbacks: Clawback Encyclopedia Entry

Learn more about claimable balances: Claimable Balances Encyclopedia Entry

SDKs: Java
Threshold: Medium
Result: ClaimClaimableBalanceResult
Parameters:

ParametersTypeDescription
BalanceIDclaimableBalanceIDThe BalanceID on the ClaimableBalanceEntry that the source account is claiming, which can be retrieved from a succesful CreateClaimableBalanceResult

Possible errors:

ErrorCodeDescription
CLAWBACK_CLAIMABLE_BALANCE_DOES_NOT_EXIST-1There is no existing ClaimableBalanceEntry that matches the input BalanceID.
CLAWBACK_CLAIMABLE_BALANCE_NOT_ISSUER-2The source account is not the issuer of the asset in the claimable balance.
CLAWBACK_CLAIMABLE_BALANCE_NOT_CLAWBACK_ENABLED-3The CLAIMABLE_BALANCE_CLAWBACK_ENABLED_FLAG is not set for this trustline.

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

SDKs: Java
Threshold: Low
Result: SetTrustLineFlagsResult
Parameters:

ParametersTypeDescription
Trustoraccount IDThe account that established this trustline.
AssetTrustLineAssetThe asset trustline whose flags are being modified.
SetFlagsintegerOne or more flags (combined via bitwise-OR) indicating which flags to set. Possible flags are: 1 if the trustor is authorized to transact with the asset or 2 if the trustor is authorized to maintain offers but not to perform other transactions.
ClearFlagsintegerOne or more flags (combined via bitwise OR) indicating which flags to clear. Possibilities include those for SetFlags as well as 4, which prevents the issuer from clawing back its asset (both from accounts and claimable balances).

Possible errors:

ErrorCodeDescription
SET_TRUST_LINE_FLAGS_MALFORMED-1This can happen for a number of reasons: the asset specified by AssetCode and AssetIssuer is invalid; the asset issuer isn't the source account; the Trustor is the source account; the native asset is specified; or the flags being set/cleared conflict or are otherwise invalid.
SET_TRUST_LINE_FLAGS_NO_TRUST_LINE-2The Trustor does not have a trustline with the issuer performing this operation.
SET_TRUST_LINE_FLAGS_CANT_REVOKE-3The issuer is trying to revoke the trustline authorization of Trustor, but it cannot do so because AUTH_REVOCABLE_FLAG is not set on the account.
SET_TRUST_LINE_FLAGS_INVALID_STATE-4If the final state of the trustline has both AUTHORIZED_FLAG (1) and AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG (2) set, which are mutually exclusive.
SET_TRUST_LINE_FLAGS_LOW_RESERVE-5Claimable balances can't be created on revocation of asset (or pool share) trustlines associated with a liquidity pool due to low reserves.

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 Encyclopedia Entry

SDKs: Java
Threshold: Medium
Result: LiquidityPoolDepositResult
Parameters:

ParametersTypeDescription
Liquidity Pool IDliquidityPoolIDThe PoolID for the Liquidity Pool to deposit into.
Max Amount AintegerMaximum amount of first asset to deposit.
Max Amount BintegerMaximum amount of second asset to deposit.
Min Price{numerator, denominator}Minimum depositA/depositB.
Max Price{numerator, denominator}Maximum depositA/depositB.

Possible errors:

ErrorCodeDescription
LIQUIDITY_POOL_DEPOSIT_MALFORMED-1One or more of the inputs to the operation was malformed.
LIQUIDITY_POOL_DEPOSIT_NO_TRUST-2No trustline exists for one of the assets being deposited.
LIQUIDITY_POOL_DEPOSIT_NOT_AUTHORIZED-3The account does not have authorization for one of the assets.
LIQUIDITY_POOL_DEPOSIT_UNDERFUNDED-4There is not enough balance of one of the assets to perform the deposit.
LIQUIDITY_POOL_DEPOSIT_LINE_FULL-5The pool share trustline does not have a sufficient limit.
LIQUIDITY_POOL_DEPOSIT_BAD_PRICE-6The deposit price is outside of the given bounds.
LIQUIDITY_POOL_DEPOSIT_POOL_FULL-7The liquidity pool reserves are full.

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 Encyclopedia Entry

SDKs: Java
Threshold: Medium
Result: LiquidityPoolWithdrawResult
Parameters:

ParametersTypeDescription
Liquidity Pool IDliquidityPoolIDThe PoolID for the Liquidity Pool to withdraw from.
AmountintegerAmount of pool shares to withdraw.
Min Amount AintegerMinimum amount of the first asset to withdraw.
Min Amount BintegerMinimum amount of the second asset to withdraw.

Possible errors:

ErrorCodeDescription
LIQUIDITY_POOL_WITHDRAW_MALFORMED-1One or more of the inputs to the operation was malformed.
LIQUIDITY_POOL_WITHDRAW_NO_TRUST-2There is no trustline for one of the assets.
LIQUIDITY_POOL_WITHDRAW_UNDERFUNDED-3Insufficient balance for the pool shares.
LIQUIDITY_POOL_WITHDRAW_LINE_FULL-4The withdrawal would exceed the trustline limit for one of the assets.
LIQUIDITY_POOL_WITHDRAW_UNDER_MINIMUM-5Unable to withdraw enough to satisfy the minimum price.

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.

SDKs: Java
Threshold: Medium
Result: InvokeHostFunctionResult
Parameters:

ParametersTypeDescription
Host FunctionHostFunctionThe host function to invoke
AuthSoroban Authorization EntryPer-address authorizations for this host function.

Possible errors:

ErrorCodeDescription
INVOKE_HOST_FUNCTION_MALFORMED-1One or more of the inputs to the operation was malformed.
INVOKE_HOST_FUNCTION_TRAPPED-2The function invocation trapped in the Soroban runtime.
INVOKE_HOST_FUNCTION_RESOURCE_LIMIT_EXCEEDED-3The function invocation could not complete within the currently configured resource constraints of the network.
INVOKE_HOST_FUNCTION_ENTRY_ARCHIVED-4A ledger entry required for this function's footprint is in an archived state, and must be restored.
INVOKE_HOST_FUNCTION_INSUFFICIENT_REFUNDABLE_FEE-5The refundable Soroban fee provided was not sufficient to pay for the compute resources required by this function invocation.

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 until the extendTo ledger sequence number is reached.

Note that Soroban transactions can only contain one operation per transaction.

Learn more in the State Archival section.

SDKs: Java
Threshold: Medium
Result: ExtendFootprintTTLResult
Parameters:

ParametersTypeDescription
ExtExtensionPointReserved for later use.
Extend TointegerThe ledger sequence number the entries will live until.

Possible errors:

ErrorCodeDescription
EXTEND_FOOTPRINT_TTL_MALFORMED-1One or more of the inputs to the operation was malformed.
EXTEND_FOOTPRINT_TTL_RESOURCE_LIMIT_EXCEEDED-2The TTL extension could not be completed within the currently configured resource constraints of the network.
EXTEND_FOOTPRINT_TTL_INSUFFICIENT_REFUNDABLE_FEE-3The refundable Soroban fee provided was not sufficient to pay for TTL extension of the specified ledger entries.

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.

SDKs: Java
Threshold: Medium
Result: RestoreFootprintResult
Parameters:

ParametersTypeDescription
ExtExtensionPointReserved for later use.

Possible errors:

ErrorCodeDescription
RESTORE_FOOTPRINT_MALFORMED-1One or more of the inputs to the operation was malformed.
RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED-2The archive restoration could not be completed within the currently configured resource constraints of the network.
RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE-3The refundable Soroban fee provided was not sufficient to pay for archive restoration of the specified ledger entries.