VaultSet

[Source]

Modifies a single asset vault that you own. This transaction allows the Vault Owner to update certain mutable fields, including vault metadata and the maximum asset amount.

Warning

Once a vault is created, its public or private status is permanent and cannot be changed. The tfVaultPrivate flag determines this status, and once set, it cannot be updated.

(Requires the Single Asset Vault amendment )

Example VaultSet JSON

{
  "TransactionType": "VaultSet",
  "Account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
  "Fee": "12",
  "Flags": 0,
  "LastLedgerSequence": 7108682,
  "Sequence": 8,
  "VaultID": "77D6234D074E505024D39C04C3F262997B773719AB29ACFA83119E4210328776",
  "Data": "5468697320697320617262697472617279206D657461646174612061626F757420746865207661756C742E",
  "AssetMaximum": 5,
  "DomainID": "77D6234D074E505024D39C04C3F262997B773719AB29ACFA83119E4210328776"
}

VaultSet Fields

In addition to the common fields, VaultSet transactions use the following fields:

Field NameJSON TypeInternal TypeRequired?Description
VaultIDStringHash256YesThe unique identifier of the vault that needs to be updated.
DataStringBlobNoArbitrary vault metadata, limited to 256 bytes.
AssetMaximumNumberUInt64NoThe maximum asset amount that can be held in a vault. The value cannot be lower than the current AssetTotal, unless the value is 0.
DomainIDStringHash256NoThe PermissionedDomain object ID associated with the shares of this vault. The DomainID is only required when updating a private vault.

VaultSet Flags

There are no flags defined for VaultSet transactions.

Error Cases

Besides errors that can occur for all transactions, VaultSet transactions can result in the following transaction result codes:

Error CodeDescription
tecOBJECT_NOT_FOUNDOccurs if the Vault object with the specified VaultID does not exist on the ledger.
tecNO_PERMISSIONOccurs if the account submitting the transaction is not the Owner of the vault.
temMALFORMEDOccurs if the Data field is larger than 256 bytes.
tecLIMIT_EXCEEDEDOccurs if the new AssetMaximum value is lower than the vault's current AssetTotal.
temDISABLEDOccurs if the Permissioned Domains amendment is disabled and a DomainID is provided.
tecINVALID_DOMAINOccurs if a transaction attempts to set DomainID on a public vault.