Skip to content

These new docs are in beta. Please submit bugs to GitHub issues.


List of Operations

This is the canonical list of Stellar operations, which lists every Stellar operation along with parameters, error codes, and links to relevant documentation for key SDKs.

For a description of how operations work in Stellar, see Operations.

For the protocol specification, see stellar-transactions.x.

Create Account

JavaScript | Java | Go

Creates and funds a new account with the specified starting balance.

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

JavaScript | Java | Go

Sends an amount in a specific asset to a destination account.

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.
PAYMENT_NO_TRUST-6The receiver does not trust the issuer of the asset being sent. For more information, see the assets doc.
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.
PAYMENT_NO_ISSUER-9The issuer of the asset does not exist.

Path Payment Strict Send

JavaScript | Java | Go

A path payment sends an amount of a specific asset to a destination account through a path of offers. Since the asset sent (e.g., 450 XLM) can be different from the asset received (e.g, 6 BTC), path payments allow for the simultaneous transfer and conversion of currencies.

A Path Payment Strict Send allows a user to specify the amount of the asset to send. The amount received will vary based on offers in the order books. If you would like to instead specify the amount received, use the Path Payment Strict Receive operation.

A few things to note:

  • path payments don’t allow intermediate offers to be from the source account as this would yield a worse exchange rate. You’ll need to either split the path payment into two smaller path payments, or ensure that the source account’s offers are not at the top of the order book.
  • balances are settled at the very end of the operation
    • this is especially important when (Destination, Destination Asset) == (Source, Send Asset) as this provides a functionality equivalent to getting a no interest loan for the duration of the operation.
  • Destination min is a protective measure: it allows you to specify a lower bound for an acceptable conversion. If offers in the order books are not favorable enough for the operation to deliver that amount, the operation will fail.

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 doc.
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_NO_ISSUER-9The issuer of one of the assets is missing.
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

JavaScript | Java | Go

A path payment sends an amount of a specific asset to a destination account through a path of offers. Since the asset sent (e.g., 450 XLM) can be different from the asset received (e.g, 6 BTC), path payments allow for the simultaneous transfer and conversion of currencies.

A Path Payment Strict Receive allows a user to specify the amount of the asset received. The amount sent varies based on offers in the order books. If you would like to instead specify the amount sent, use the Path Payment Strict Send operation.

A few things to note:

  • path payment doesn’t allow intermediate offers to be from the source account as this would yield a worse exchange rate. You’ll need to either split the path payment into two smaller path payments, or ensure that the source account’s offers are not at the top of the order book.
  • balances are settled at the very end of the operation
    • this is especially important when (Destination, Destination Asset) == (Source, Send Asset) as this provides a functionality equivalent to getting a no interest loan for the duration of the operation.
  • Send max is a protective measure: it allows you to specify an upper bound for an acceptable conversion. If offers in the order books are not favorable enough for the operation to succeed for less than Send max, the operation will fail.

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 doc.
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_NO_ISSUER-9The issuer of one the of assets is missing.
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

JavaScript | Java | Go

Creates, updates, or deletes an offer to buy one asset for another, otherwise known as a “bid” order on a traditional orderbook.

If you want to create a new offer set Offer ID to 0.

If you want to update an existing offer set Offer ID to existing offer ID.

If you want to delete an existing offer set Offer ID to existing offer ID and set Amount to 0.

Threshold: Medium

Result: ManageBuyOfferResult

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 {5,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_SELL_NO_ISSUER-9The issuer of selling asset does not exist.
MANAGE_BUY_OFFER_BUY_NO_ISSUER-10The issuer of buying asset does not exist.
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

JavaScript | Java | Go

Creates, updates, or deletes an offer to sell one asset for another, otherwise known as a “ask” order or “offer” on a traditional orderbook.

If you want to create a new offer set Offer ID to 0.

If you want to update an existing offer set Offer ID to existing offer ID.

If you want to delete an existing offer set Offer ID to existing offer ID and set Amount to 0.

Threshold: Medium

Result: ManageSellOfferResult

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 {5,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_SELL_NO_ISSUER-9The issuer of selling asset does not exist.
MANAGE_SELL_OFFER_BUY_NO_ISSUER-10The issuer of buying asset does not exist.
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

JavaScript | Java | Go

Creates, updates, or deletes an offer to sell one asset for another, otherwise known as a “ask” order or “offer” on a traditional orderbook, without taking a reverse offer of equal price.

A passive sell offer is an offer that does not act on and take a reverse offer of equal price. Instead, they only take offers of lesser price. For example, if an offer exists to buy 5 BTC for 30 XLM, and you make a passive offer to buy 30 XLM for 5 BTC, your passive offer does not take the first offer. Passive offers in Stellar are always expressed as “ask” or “offer” orders in a traditional orderbook.

Note that regular offers made later than your passive offer can act on and take your passive offer, even if the regular offer is of the same price as your passive offer.

Passive offers allow market makers to have zero spread. If you want to trade EUR for USD at 1:1 price and USD for EUR also at 1:1, you can create two passive offers so the two offers don’t immediately act on each other.

Once the passive offer is created, you can manage it like any other offer using the manage sell offer operation.

Threshold: Medium

Result: ManageSellOfferResult

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 {5,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_SELL_NO_ISSUER-9The issuer of selling asset does not exist.
MANAGE_SELL_OFFER_BUY_NO_ISSUER-10The issuer of buying asset does not exist.
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

JavaScript | Java | Go

Sets options for an account, such as setting the inflation destination or adding an additional signer on an account.

Allows you to set multiple options on an account in a single operation, such as changing an operation threshold and setting the flags on an account at the same time.

For more information on the options related to signing, see our docs on multi-sig.

When updating signers or other thresholds, the threshold of this operation is High.

Threshold: Medium or High

Result: SetOptionsResult

Parameters:

ParametersTypeDescription
Inflation Destinationaccount IDAccount of the inflation destination.
Clear flagsintegerIndicates which flags to clear. For details about the flags, please refer to the accounts doc. 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 flags to set. For details about the flags, please refer to the accounts doc. 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

JavaScript | Java | Go

Creates, updates, or deletes a trustline. For more on trustlines, please refer to the assets documentation.

To delete an existing trustline, set Line to the asset of the trustline, and Limit to 0.

Threshold: Medium

Result: ChangeTrustResult

ParametersTypeDescription
LineassetThe 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.
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.

Allow Trust

JavaScript | Java | Go

Updates the authorized flag of an existing trustline.

This can only be called by the issuer of a trustline’s asset, and only when AUTHORIZATION REQUIRED has been set on the issuer’s account.

There are two different kinds of asset authorization: complete authorization, which allows an account to transact with an asset (by making payments, creating offers, etc.) and limited authorization, which allows an account to maintain and reduce current offers, but not to perform other operations with the asset.

The issuer can only change a flag from complete to limited authorization or clear the authorized flag if the issuer has the AUTH_REVOCABLE_FLAG set. Otherwise, the issuer can only set the authorized flag. For more on what toggling between authorization states allows an issuer to do, see the Control Access to an Asset doc.

If the issuer clears the authorized flag, all offers owned by the trustor that are either selling type or buying type will be deleted.

Threshold: Low

Result: AllowTrustResult

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.

Account Merge

JavaScript | Java | Go

Transfers the native balance (the amount of XLM an account holds) to another account and removes the source account from the ledger.

Threshold: High

Result: AccountMergeResult

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 trust lines/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.

Manage Data

JavaScript | Java | Go

Sets, modifies, or deletes a data entry (name/value pair) that is attached to a particular account.

An account can have a large amount of data entries attached to it (subject to sub-entry limits for an account). Each data entry increases the minimum balance (via the base reserve) needed to be held by the account.

Data entries can be used for storing application-specific data on the Stellar Network. They are not used by the core Stellar Protocol.

Threshold: Medium

Result: ManageDataResult

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

JavaScript | Java | Go

Bumps forward the sequence number of the source account to the given sequence number.

This operation invalidates any transactions with a smaller sequence number, and is often utilized in complex contracting scenarios.

If the specified bumpTo sequence number is greater than the source account’s sequence number, the account’s sequence number is updated with that value, otherwise it’s not modified.

Threshold: Low

Result: BumpSequenceResult

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).

Last updated Sep. 23, 2020

Page Outline