Xahau Network
Testnet FaucetExplorerHooks API Docs
Xahau Network
Xahau Network
  • 🪝Xahau Documentation
    • XRPL/Xahau: What is Different?
  • 🪝Hooks
  • 🚨Concepts
    • Introduction
      • Example Usage
      • Xahau Testnet
      • Xahau Testnet Explorer
      • Examples (source code)
      • Blogs (concepts)
    • Terminology
    • Loops and Guarding
    • Compiling Hooks
    • Chaining
    • Weak and Strong
    • Collect Call
    • SetHook Transaction
    • Parameters
    • Namespaces
    • Grants
    • HookOn Field
    • Reference Counted Hook Definitions
    • Hook Fees
    • Execution Metadata
    • Debugging Hooks
    • State Management
    • Slots and Keylets
    • Floating Point Numbers (XFL)
    • Emitted Transactions
    • Serialized Objects
  • Features
    • Public Nodes (RPC)
    • Amendments
    • Transaction Signing
      • Transaction Fees
    • Developer Tooling
      • Curated Tooling
      • Client Libraries
      • Developer Tricks
    • HTTP / WebSocket APIs
      • Request Formatting Guide
      • Response Formatting Guide
      • Considerations
      • Public API Methods
      • Admin API Methods
    • Network Features
      • Account Managment
      • Balance Rewards
      • Check
      • Escrow
      • Hooks
      • Offer
      • Payments
      • URIToken
    • Faucet & Explorers
    • Data API's
  • Infrastructure
    • Node Requirements
    • Running a Node
      • Running a Mainnet Node
      • Running a Testnet Node
    • Building Xahau (Dev)
      • Ubuntu - 22.04
      • Mac OS - 15.3.2 (24D81)
  • Technical
    • 📐Hooks Functions
      • Overview
        • Hook API Conventions
        • Return Codes
      • Developer Defined
        • hook
        • cbak / Callback
      • Control
        • accept
        • rollback
      • Utilities
        • util_raddr
        • util_accid
        • util_verify
        • util_sha512h
        • util_keylet
      • Serialization
        • sto_subfield
        • sto_to_json
        • sto_from_json
        • sto_subarray
        • sto_emplace
        • sto_erase
        • sto_validate
      • Emitted Transaction
        • etxn_burden
        • etxn_details
        • etxn_fee_base
        • etxn_nonce
        • etxn_reserve
        • etxn_generation
        • prepare
        • emit
      • Float
        • float_set
        • float_multiply
        • float_mulratio
        • float_negate
        • float_compare
        • float_sum
        • float_sto
        • float_sto_set
        • float_invert
        • float_divide
        • float_one
        • float_exponent
        • float_mantissa
        • float_sign
        • float_int
        • float_root
        • float_log
      • Ledger
        • fee_base
        • ledger_seq
        • ledger_last_hash
        • ledger_last_time
        • ledger_nonce
        • ledger_keylet
      • Hook Context
        • hook_account
        • hook_hash
        • hook_param
        • hook_param_set
        • hook_skip
        • hook_pos
        • hook_again
      • Slot
        • slot
        • slot_clear
        • slot_count
        • slot_set
        • slot_size
        • slot_subarray
        • slot_subfield
        • slot_type
        • xpop_slot
        • slot_float
      • State
        • state
        • state_set
        • state_foreign
        • state_foreign_set
      • Trace (Debug)
        • trace
        • trace_num
        • trace_float
      • Originating Transaction
        • otxn_burden
        • otxn_field
        • otxn_generation
        • otxn_id
        • otxn_type
        • otxn_slot
        • otxn_param
        • otxn_json
        • meta_slot
      • Websocket APIs
        • account_info
        • account_namespace
    • Protocol Reference
      • Transactions
        • Transaction Common Fields
        • Transaction Types
          • AccountDelete
          • AccountSet
          • CheckCancel
          • CheckCash
          • CheckCreate
          • ClaimReward
          • DepositPreauth
          • EscrowCancel
          • EscrowCreate
          • EscrowFinish
          • GenesisMint - (Emitted Txn)
          • Import
          • Invoke
          • OfferCancel
          • OfferCreate
          • Payment
          • PaymentChannelClaim
          • PaymentChannelCreate
          • PaymentChannelFund
          • Remit
          • SetHook
          • SetRegularKey
          • SetRemarks
          • SignerListSet
          • TicketCreate
          • TrustSet
          • URITokenBurn
          • URITokenBuy
          • URITokenCancelSellOffer
          • URITokenCreateSellOffer
          • URITokenMint
        • Pseudo Transaction Types
          • EmitFailure
          • UNLReport
          • UNLModify
          • SetFee
          • EnableAmendment
        • Transaction Results
          • TES Codes
          • TER Codes
          • TEM Codes
          • TEL Codes
          • TEF Codes
          • TEC Codes
        • Transaction Metadata
      • Ledger Data
        • Ledger Objects Types
          • AccountRoot
          • Amendments
          • Check
          • Deposit Pre Auth
          • Directory Node
          • Emitted Txn
          • Escrow
          • Fee Settings
          • Hook
          • Hook Definition
          • Hook State
          • Import VL Sequence
          • Ledger Hashes
          • Negative UNL
          • Offer
          • Pay Channel
          • Ripple State
          • Signers List
          • Ticket
          • UNL Report
          • URIToken
        • Ledger Header
        • Ledger Object IDs
      • Data Types
        • Currency Formats
        • Base 58 Encodings
      • Binary Format
    • Balance Adjustments
    • Governance Game
    • Burn 2 Mint (B2M)
    • Versioning Process
  • Compliance
    • Security Audits
      • Responsible Disclosure
  • Support
    • Help Us
Powered by GitBook
On this page
  • Example
  • SetRemarks Flags
  • Remarks Format
  • Supported Objects and Permissions
  • Limits
  • Special Transaction Cost
  • Error Cases

Was this helpful?

Edit on GitHub
Export as PDF
  1. Technical
  2. Protocol Reference
  3. Transactions
  4. Transaction Types

SetRemarks

The SetRemarks transaction enables accounts to attach, update, or remove arbitrary remarks (key-value pairs) on supported ledger objects.

Last updated 2 days ago

Was this helpful?

[]

(Added by the [Remarks amendment][].)

Example

{
  "TransactionType": "SetRemarks",
  "Account": "rWYkbWkCeg8dP6rXALnjgZSjjLyih5NXm",
  "Flags": 0,
  "ObjectID": "AABBCCDDEEFF00112233445566778899AABBCCDDEEFF00112233445566778899",
  "Remarks": [
    {
      "Remark": {
        "RemarkName": "CAFE",
        "RemarkValue": "DEADBEEF",
        "Flags": 0
      }
    }
  ]
}
Field
JSON Type
Internal Type
Description

Account

String

AccountID

The address of the account submitting the transaction (must be the owner/issuer of the object)

ObjectID

String

Hash256

The ledger object ID to which the remarks are attached (see Supported Objects)

Remarks

Array

Array

Array of remark objects to set, update, or delete (see Remarks Format)

SetRemarks Flags

Flag Name
Hex Value
Decimal Value
Description

tfImmutable

0x00000001

1

Marks the remark as immutable (cannot change or delete)

Remarks Format

Each entry in the Remarks array is an object with a single Remark field, which itself is an object with the following fields:

Field
JSON Type
Internal Type
Required
Description

RemarkName

String

Blob

Yes

The name/key of the remark (1–256 bytes, must be unique per object)

RemarkValue

String

Blob

No

The value of the remark (1–256 bytes). Omit to delete the remark.

Flags

Number

UInt32

No

Set to 1 (tfImmutable) to make the remark immutable. Default is 0.

Supported Objects and Permissions

Remarks can be attached to the following ledger object types. Only the specified party (owner or issuer) may create, update, or delete remarks on each object:

Ledger Object Type
Who Can Set Remarks?
Notes

AccountRoot

Owner

The account itself (the address in the object)

Offer

Owner

The account that created the offer

Escrow

Owner

The account that created the escrow

Ticket

Owner

The account that created the ticket

PayChannel

Owner

The account that created the payment channel

Check

Owner

The account that created the check

DepositPreauth

Owner

The account that created the deposit preauthorization

URI Token

Issuer

The account that issued the URI token (field sfIssuer)

Trustline (RippleState)

Issuer

Only the issuer side of the trustline (the account that issued the IOU) can set remarks.

Limits

  • Maximum 32 remarks per object.

  • Each RemarkName and RemarkValue must be 1–256 bytes.

  • Each RemarkName must be unique per object.

  • Once a remark is marked as immutable (Flags: 1), it cannot be changed or deleted.

Special Transaction Cost

The base transaction cost is increased by 1 drop per byte of all RemarkName and RemarkValue fields in the transaction.

Error Cases

Error Code
Description

temDISABLED

The Remarks amendment is not enabled.

temINVALID_FLAG

Invalid flags set on the transaction.

temMALFORMED

The transaction is malformed (e.g., too many remarks, duplicate names, invalid field sizes).

terNO_ACCOUNT

The sending account does not exist.

tecNO_TARGET

The target object does not exist.

tecNO_PERMISSION

The sender is not the owner/issuer of the object.

tecIMMUTABLE

Attempted to modify or delete an immutable remark.

tecTOO_MANY_REMARKS

The number of remarks on the object would exceed the limit of 32.

Source