# VaultSet [[Source]](https://github.com/Bronek/rippled/blob/vault/src/xrpld/app/tx/detail/VaultSet.cpp) Attention Lending Protocol and Single Asset Vaults are disabled on Devnet. You have two options for testing these features: 1. Run `rippled` in [stand-alone mode](https://xrpl.org/docs/concepts/networks-and-servers/rippled-server-modes#stand-alone-mode) and enable `LendingProtocol` and `SingleAssetVault` in the [rippled.cfg file](https://xrpl.org/docs/infrastructure/testing-and-auditing/test-amendments). 2. Connect to the Lending Protocol-specific Devnet at `https://lend.devnet.rippletest.net:51234/`. 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](/docs/xls-65d-single-asset-vault/reference/vault#vault-flags) flag determines this status, and once set, it cannot be updated. *(Requires the [Single Asset Vault amendment](https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0065-single-asset-vault) )* ## Example JSON ```json { "TransactionType": "VaultSet", "Account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", "Fee": "12", "Flags": 0, "LastLedgerSequence": 7108682, "Sequence": 8, "VaultID": "77D6234D074E505024D39C04C3F262997B773719AB29ACFA83119E4210328776", "Data": "5468697320697320617262697472617279206D657461646174612061626F757420746865207661756C742E", "AssetsMaximum": 5, "DomainID": "77D6234D074E505024D39C04C3F262997B773719AB29ACFA83119E4210328776" } ``` ## Fields In addition to the [common fields](https://xrpl.org/docs/references/protocol/transactions/common-fields#transaction-common-fields), transactions use the following fields: | Field Name | JSON Type | Internal Type | Required? | Description | | --- | --- | --- | --- | --- | | `VaultID` | String | Hash256 | Yes | The unique identifier of the vault that needs to be updated. | | `Data` | String | Blob | No | Arbitrary vault metadata, limited to 256 bytes. | | `AssetsMaximum` | Number | UInt64 | No | The maximum asset amount that can be held in a vault. The value cannot be lower than the current `AssetsTotal`, unless the value is 0. | | `DomainID` | String | Hash256 | No | The [PermissionedDomain](https://github.com/XRPLF/XRPL-Standards/blob/master/XLS-0080-permissioned-domains/) object ID associated with the shares of this vault. The `DomainID` is only required when updating a private vault. | ## Flags There are no flags defined for transactions. ## Error Cases Besides errors that can occur for all transactions, transactions can result in the following [transaction result codes](https://xrpl.org/docs/references/protocol/transactions/transaction-results): | Error Code | Description | | --- | --- | | `tecNO_ENTRY` | The transaction attempted to modify a vault that does not exist. Check the `VaultID` field of the transaction. | | `tecOBJECT_NOT_FOUND` | The `PermissionedDomain` object with the provided `DomainID` does not exist. | | `tecNO_PERMISSION` | The account submitting the transaction is not the `Owner` of the vault, or is trying to set a `DomainID` for a public vault. | | `temMALFORMED` | The transaction was not validly formatted. For example, the `Data` field is larger than 256 bytes. | | `tecLIMIT_EXCEEDED` | The *new* `AssetsMaximum` value is **lower** than the vault's *current* `AssetsTotal`. | | `temDISABLED` | Either the Single Asset Vault amendment is not enabled, or a `DomainID` is provided and the Permissioned Domains amendment is not enabled. |