Saltar al contenido principal

Lista de Operaciones

Las operaciones son objetos que representan un cambio deseado en el ledger y se envían a la red agrupadas en una transacción. Para cada operación, hay un tipo de resultado exitoso o fallido. En caso de éxito, el usuario puede reunir información sobre el efecto de la operación. En caso de fallo, el usuario puede aprender más sobre el error.

Aprende más sobre transacciones y operaciones en nuestra sección de Operaciones y Transacciones.

Actualmente hay 26 operaciones que puedes utilizar en la red Stellar, estas operaciones, sus definiciones, SDKs, umbrales, parámetros y errores se enumeran a continuación.

Crear cuenta

Crea y financia una nueva cuenta con el saldo inicial especificado

SDKs: JavaScript | Java | Go
Umbral: Medio
Resultado: CreateAccountResult
Parámetros:

ParámetroTipoDescripción
DestinoID de cuentaDirección de cuenta que se crea y se financia.
Saldo inicialenteroCantidad de XLM a enviar a la cuenta recién creada. Este XLM proviene de la cuenta fuente.

Posibles errores:

ErrorCódigoDescripción
CREAR_CUENTA_MALFORMADA-1El destino es inválido.
CREAR_CUENTA_SIN_FONDOS-2La cuenta fuente que realiza el comando no tiene suficientes fondos para darle al destino el saldo inicial de XLM y todavía mantener su reserva mínima de XLM más satisfacer sus obligaciones de venta de XLM.
CREAR_CUENTA_BAJA_RESERVA-3Esta operación crearía una cuenta con menos del número mínimo de XLM que una cuenta debe mantener.
CREAR_CUENTA_YA_EXISTE-4La cuenta destino ya existe.

Pago

Envía una cantidad en un activo específico a una cuenta de destino

SDKs: JavaScript | Java | Go
Umbral: Medio
Resultado: PaymentResult
Parámetros:

ParámetrosTipoDescripción
DestinoID de cuentaDirección de cuenta que recibe el pago.
ActivoactivoActivo a enviar a la cuenta de destino.
CantidadenteroCantidad del activo mencionado a enviar.

Posibles errores:

ErrorCódigoDescripción
PAGO_MALFORMADO-1La entrada para el pago es inválida.
PAGO_SIN_FONDOS-2La cuenta fuente (remitente) no tiene suficientes fondos para enviar cantidad y todavía satisfacer sus obligaciones de venta. Ten en cuenta que si envías XLM, entonces el remitente debe además mantener su reserva mínima de XLM. Ten en cuenta que este error no se devolverá si la cuenta receptora es el emisor de activo.
PAGO_SRC_NO_CONFIANZA-3La cuenta fuente no confía en el emisor del activo que está tratando de enviar.
PAGO_SRC_NO_AUTORIZADO-4La cuenta fuente no está autorizada para enviar este pago.
PAGO_SIN_DESTINO-5La cuenta receptora no existe. Ten en cuenta que este error no se devolverá si la cuenta receptora es el emisor del activo.
PAGO_SIN_CONFIANZA-6El receptor no confía en el emisor del activo que se envía. Para más información, consulta la sección de Activos.
PAGO_NO_AUTORIZADO-7La cuenta de destino no está autorizada por el emisor del activo para mantener el activo.
PAGO_LINEA_LLENA-8La cuenta de destino (receptora) no tiene suficientes límites para recibir cantidad y aún satisfacer sus obligaciones de compra.

Pago estricto de ruta

Un pago en el que el activo enviado puede ser diferente del activo recibido; permite al usuario especificar la cantidad del activo a enviar

Aprende más sobre pagos de ruta: Entrada de Enciclopedia de Pagos de Ruta

SDKs: JavaScript | Java | Go
Umbral: Medio
Resultado: PathPaymentStrictSendResult
Parámetros:

ParámetrosTipoDescripción
Enviar activoactivoEl activo descontado de la cuenta del remitente.
Enviar cantidadenteroLa cantidad de enviar activo a descontar (excluyendo tarifas).
DestinoID de cuentaID de cuenta del destinatario.
Activo de destinoactivoEl activo que recibe la cuenta de destino.
Mínimo de destinoenteroLa cantidad mínima de activo de destino que la cuenta de destino puede recibir.
Rutalista de activosLos activos (además de enviar activo y activo de destino) involucrados en las ofertas que toma la ruta. Por ejemplo, si solo puedes encontrar una ruta de USD a EUR a través de XLM y BTC, la ruta sería USD -> XLM -> BTC -> EUR y el campo ruta contendría XLM y BTC.

Posibles errores:

ErrorCódigoDescripción
RUTA_PAGO_ESTRICTO_ENVIAR_MALFORMADO-1La entrada a este pago de ruta es inválida.
RUTA_PAGO_ESTRICTO_ENVIAR_SIN_FONDOS-2La cuenta fuente (remitente) no tiene suficientes fondos para enviar y aún satisfacer sus obligaciones de venta. Ten en cuenta que si envías XLM, entonces el remitente debe además mantener su reserva mínima de XLM. Ten en cuenta que si envías XLM, entonces el remitente debe además mantener su reserva mínima de XLM.
RUTA_PAGO_ESTRICTO_SRC_NO_CONFIANZA-3La cuenta fuente no confía en el emisor del activo que está tratando de enviar.
RUTA_PAGO_ESTRICTO_SRC_NO_AUTORIZADO-4La cuenta fuente no está autorizada para enviar este pago.
RUTA_PAGO_ESTRICTO_SIN_DESTINO-5La cuenta de destino no existe.
RUTA_PAGO_ESTRICTO_SIN_CONFIANZA-6La cuenta de destino no confía en el emisor del activo que se envía. Para más información, consulta la sección de Activos.
RUTA_PAGO_ESTRICTO_NO_AUTORIZADO-7La cuenta de destino no está autorizada por el emisor del activo para mantener el activo.
RUTA_PAGO_ESTRICTO_LINEA_LLENA-8La cuenta de destino no tiene límites suficientes para recibir importe de destino y aún satisfacer sus obligaciones de compra.
RUTA_PAGO_ESTRICTO_MUY_POCAS_OFERTAS-10No hay una ruta de ofertas conectando el enviar activo y el activo de destino. Stellar solo considera rutas de longitud 5 o más cortas.
RUTA_PAGO_ESTRICTO_OFERTA_CRUZAR_AUTOS-11El pago cruzaría una de sus propias ofertas.
RUTA_PAGO_ESTRICTO_ENVIAR_BAJO_DESTMIN-12Las rutas que podrían enviar importe de destino de activo de destino serían insuficientes para mínimo de destino.

Pago estricto de ruta recibir

Un pago en el que el activo recibido puede ser diferente del activo enviado; permite al usuario especificar la cantidad del activo recibido

Aprende más sobre pagos de ruta: Entrada de Enciclopedia de Pagos de Ruta

SDKs: JavaScript | Java | Go
Umbral: Medio
Resultado: PathPaymentStrictReceiveResult
Parámetros:

ParámetrosTipoDescripción
Enviar activoactivoEl activo descontado de la cuenta del remitente.
Enviar máximoenteroLa cantidad máxima de enviar activo a descontar (excluyendo tarifas).
DestinoID de cuentaID de cuenta del destinatario.
Activo de destinoactivoEl activo que recibe la cuenta de destino.
Cantidad de destinoenteroThe 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 {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_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 {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_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 {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_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-4Esta cuenta no tiene suficiente XLM para satisfacer el aumento de la reserva mínima de XLM causado por la adición de una subentrada y aún así satisfacer sus responsabilidades de venta de XLM. Por cada nueva línea de confianza agregada a una cuenta, la reserva mínima de XLM que esa cuenta debe mantener aumenta.
CAMBIO_DE_CONFIANZA_NO_PERMITIDO_PARA_SÍ-5La cuenta de origen intentó crear una línea de confianza para sí misma, lo cual no está permitido.
CAMBIO_DE_CONFIANZA_LÍNEA_DE_CONFIANZA_FALTANTE-6Falta la línea de confianza del activo para el fondo de liquidez.
CAMBIO_DE_CONFIANZA_NO_SE_PUEDE_ELIMINAR-7La línea de confianza del activo todavía está referenciada por un fondo de liquidez.
CAMBIO_DE_CONFIANZA_NO_AUTORIZADO_MANTENER_LIABILIDADES-8La línea de confianza del activo está desautorizada.

Permitir confianza

Actualiza la bandera autorizada de una línea de confianza existente

Esta operación está en desuso desde el Protocolo 17; preferir SetTrustlineFlags en su lugar

SDKs: JavaScript | Java | Go
Umbral: Bajo
Resultado: AllowTrustResult
Parámetros:

ParámetrosTipoDescripción
ConfiadorID de cuentaLa cuenta del destinatario de la línea de confianza.
Tipocódigo de activoEl código de activo de un máximo de 4 o 12 caracteres de la línea de confianza que la cuenta de origen está autorizando. Por ejemplo, si una cuenta emisora quiere permitir que otra cuenta mantenga su crédito en USD, el tipo es USD.
AutorizarenteroBandera que indica si la línea de confianza está autorizada. 1 si la cuenta está autorizada para transaccionar con el activo. 2 si la cuenta está autorizada para mantener ofertas, pero no para realizar otras transacciones

Posibles errores:

ErrorCódigoDescripción
PERMITIR_CONFIANZA_MALFORMADO-1El activo especificado en tipo no es válido. Además, este error ocurre cuando se especifica el activo nativo.
PERMITIR_CONFIANZA_SIN_LÍNEA_DE_CONFIANZA-2El confiador no tiene una línea de confianza con el emisor que realiza esta operación.
PERMITIR_CONFIANZA_NO_REQUERIDO-3La cuenta de origen (emisor que realiza esta operación) no requiere confianza. En otras palabras, no tiene la bandera AUTH_REQUIRED_FLAG establecida.
PERMITIR_CONFIANZA_NO_SE_PUEDE_REVOKAR-4La cuenta de origen está intentando revocar la línea de confianza del confiador, pero no puede hacerlo.
PERMITIR_CONFIANZA_NO_PERMITIDO_PARA_SÍ-5La cuenta de origen intentó permitir una línea de confianza para sí misma, lo cual no está permitido porque una cuenta no puede crear una línea de confianza consigo misma.
PERMITIR_CONFIANZA_BAJO_RESERVA-6Los saldos reclamables no pueden ser creados tras la revocación de líneas de confianza de activos (o acciones de fondos) asociadas con un fondo de liquidez debido a reservas bajas.

Fusión de cuentas

Transfiere el saldo de XLM de una cuenta a otra cuenta y elimina la cuenta de origen del ledger.

SDKs: JavaScript | Java | Go
Umbral: Alto
Resultado: AccountMergeResult
Parámetros:

ParámetrosTipoDescripción
DestinoID de cuentaLa cuenta que recibe el saldo restante de XLM de la cuenta de origen.

Posibles errores:

ErrorCódigoDescripción
CUENTA_MERGE_MALFORMADO-1La operación está malformada porque la cuenta de origen no puede fusionarse consigo misma. La destino debe ser una cuenta diferente. El destino debe ser una cuenta diferente.
CUENTA_MERGE_NO_CUENTA-2La cuenta destino no existe.
CUENTA_MERGE_CONJUNTO_INMUTABLE-3La cuenta de origen tiene la bandera AUTH_IMMUTABLE establecida.
CUENTA_MERGE_TIENDE_SUB_ENTRADAS-4La cuenta de origen tiene líneas de confianza/ofertas.
CUENTA_MERGE_NUMERO_DE_SECUENCIA_MUY_ALTO-5El número de secuencia de la cuenta de origen es demasiado alto. Debe ser menor que (ledgerSeq << 32) = (ledgerSeq * 0x100000000).
CUENTA_MERGE_DESTINO_LLENO-6La cuenta destino no puede recibir el saldo de la cuenta de origen y aún así satisfacer sus responsabilidades de compra de lumen.
CUENTA_MERGE_ES_PATROCINADOR-7La cuenta de origen es un patrocinador.

Administrar datos

Establece, modifica o elimina una entrada de datos (par nombre/valor) que está adjunta a una cuenta.

Aprende más sobre entradas y subentradas: Sección de cuentas

SDKs: JavaScript | Java | Go
Umbral: Medio
Resultado: ManageDataResult
Parámetros:

ParámetrosTipoDescripción
NombrecadenaCadena de hasta 64 bytes de longitud. Si este es un nuevo nombre, se añadirá el par nombre/valor dado a la cuenta. Si este nombre ya está presente, entonces el valor asociado será modificado.
Valordatos binarios(opcional) Si no está presente, entonces el nombre existente será eliminado. Si está presente, entonces este valor será establecido en la entrada de datos. De hasta 64 bytes de longitud.

Posibles errores:

ErrorCódigoDescripción
GESTIONAR_DATOS_NO_SOPORTADO_AÚN-1La red aún no ha cambiado a este cambio de protocolo. Este error significa que la red no soporta esta función todavía.
GESTIONAR_DATOS_NOMBRE_NO_ENCONTRADO-2Intentando eliminar una entrada de datos que no está allí. Esto sucederá si el nombre está establecido (y el valor no) pero la cuenta no tiene una entrada de datos con ese nombre.
GESTIONAR_DATOS_BAJO_RESERVA-3Esta cuenta no tiene suficiente XLM para satisfacer el aumento de la reserva mínima de XLM causado por la adición de una subentrada y aún así satisfacer sus responsabilidades de venta de XLM. Por cada nueva entrada de datos agregada a una cuenta, la reserva mínima de XLM que esa cuenta debe mantener aumenta.
GESTIONAR_DATOS_NOMBRE_NO_VÁLIDO-4Nombre no es una cadena válida.

Aumentar secuencia

Aumenta hacia adelante el número de secuencia de la cuenta de origen al número de secuencia dado, invalidando cualquier transacción con un número de secuencia más pequeño.

SDKs: JavaScript | Java | Go
Umbral: Bajo
Resultado: BumpSequenceResult
Parámetros:

ParámetrosTipoDescripción
bumpToNúmero de secuenciavalor deseado para el número de secuencia de la cuenta de origen de la operación.

Posibles errores:

ErrorCódigoDescripción
BUMP_SEQUENCE_MALFORMADO-1El número de secuencia bumpTo especificado no es un número de secuencia válido. Debe estar entre 0 y INT64_MAX (9223372036854775807 o 0x7fffffffffffffff).

Crear saldo reclamable

Mueve una cantidad de activo de la cuenta fuente de la operación a una nueva ClaimableBalanceEntry.

Aprende más sobre saldos reclamables: Entrada de enciclopedia de saldos reclamables

SDKs: Java
Umbral: Medio
Resultado: CreateClaimableBalanceResult
Parámetros:

ParámetrosTipoDescripción
ActivoactivoActivo que se mantendrá en la ClaimableBalanceEntry en la forma asset_code:issuing_address o native (XLM).
CantidadenteroCantidad de activo almacenada en la ClaimableBalanceEntry.
Reclamanteslista de reclamantesLista de reclamantes (dirección de la cuenta y par ClaimPredicate) que pueden reclamar esta ClaimableBalanceEntry.

Posibles errores:

ErrorCódigoDescripción
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:

ParametersTipoDescripción
Función del HostFunciónDelHostLa función del host a invocar
AutenticaciónEntrada de Autorización de SorobanAutorizaciones por dirección para esta función del host.

Errores posibles:

ErrorCódigoDescripción
INVOKE_HOST_FUNCTION_MALFORMADO-1Uno o más de los inputs de la operación estaban malformados.
INVOKE_HOST_FUNCTION_TRAPPING-2La invocación de la función se atrapó en la ejecución de Soroban.
INVOKE_HOST_FUNCTION_LIMITE_RECURSOS_EXCEDIDO-3La invocación de la función no pudo completarse dentro de las restricciones de recursos actualmente configuradas de la red.
INVOKE_HOST_FUNCTION_ENTRADA_ARCHIVADA-4Una entrada de ledger requerida para la huella de esta función está en estado archivado y debe ser restaurada.
INVOKE_HOST_FUNCTION_TARIFA_REEMBOLSABLE_INSUFICIENTE-5La tarifa reembolsable de Soroban proporcionada no fue suficiente para pagar por los recursos computacionales requeridos por esta invocación de función.

Extender TTL de Huella

Extender el tiempo de vida (TTL) de las entradas para contratos inteligentes de Soroban con la ExtendFootprintTTLOp. Esta operación extiende el TTL de las entradas especificadas en la huella readOnly de la transacción para que vivan al menos hasta que se alcance el número de secuencia del ledger extendTo.

Ten en cuenta que las transacciones de Soroban solo pueden contener una operación por transacción.

Aprende más en la sección de Archivo de Estado.

SDKs: Java
Umbral: Medio
Resultado: ExtendFootprintTTLResult
Parámetros:

ParámetrosTipoDescripción
ExtPunto de ExtensiónReservado para uso futuro.
Extender HastaenteroEl número de secuencia del ledger hasta el que las entradas vivirán.

Errores posibles:

ErrorCódigoDescripción
EXTEND_FOOTPRINT_TTL_MALFORMED-1Uno o más de los inputs de la operación estaban malformados.
EXTEND_FOOTPRINT_TTL_LIMITE_RECURSOS_EXCEDIDO-2La extensión TTL no pudo completarse dentro de las restricciones de recursos actualmente configuradas de la red.
EXTEND_FOOTPRINT_TTL_TARIFA_REEMBOLSABLE_INSUFICIENTE-3La tarifa reembolsable de Soroban proporcionada no fue suficiente para pagar por la extensión TTL de las entradas del ledger especificadas.

Restaurar Huella

Hacer que las entradas archivadas de contratos inteligentes de Soroban sean accesibles nuevamente restaurándolas con RestoreFootprintOp. Esta operación restaura las entradas archivadas especificadas en la huella readWrite.

Ten en cuenta que las transacciones de Soroban solo pueden contener una operación por transacción.

Aprende más en la sección de Archivo de Estado.

SDKs: JavaScript | Java
Umbral: Medio
Resultado: RestoreFootprintResult
Parámetros:

ParámetrosTipoDescripción
ExtPunto de ExtensiónReservado para uso futuro.

Errores posibles:

ErrorCódigoDescripción
RESTORE_FOOTPRINT_MALFORMED-1Uno o más de los inputs de la operación estaban malformados.
RESTORE_FOOTPRINT_LIMITE_RECURSOS_EXCEDIDO-2La restauración del archivo no pudo completarse dentro de las restricciones de recursos actualmente configuradas de la red.
RESTORE_FOOTPRINT_TARIFA_REEMBOLSABLE_INSUFICIENTE-3La tarifa reembolsable de Soroban proporcionada no fue suficiente para pagar por la restauración del archivo de las entradas del ledger especificadas.