DepositPreauth
Added by the DepositPreauth amendment.
A DepositPreauth transaction grants preauthorization to deliver payments to your account. This is only useful if you are using (or plan to use) Deposit Authorization.
Example DepositPreauth JSON
DepositPreauth Fields
In addition to the common fields, DepositPreauth transactions use the following fields:
Field | JSON Type | Internal Type | Required? | Description |
---|---|---|---|---|
Authorize | String - Address | AccountID | No | An account to preauthorize. |
AuthorizeCredentials | Array | STArray | No | A set of credentials to authorize. (Requires the Credentials amendment. ) |
Unauthorize | String | AccountID | No | An account whose preauthorization should be revoked. |
UnauthorizeCredentials | Array | STArray | No | A set of credentials whose preauthorization should be revoked. (Requires the Credentials amendment. ) |
You must provide exactly one of Authorize
, AuthorizeCredentials
, Unauthorize
, or UnauthorizeCredentials
.
If this transaction is successful, it creates or removes a DepositPreauth entry in the ledger, based on the field provided.
AuthorizeCredentials Objects
If provided, each member of the AuthorizeCredentials
field or UnauthorizeCredentials
field must be an inner object with the following fields:
Field | JSON Type | Internal Type | Required? | Description |
---|---|---|---|---|
Issuer | String - Address | AccountID | Yes | The issuer of the credential. |
CredentialType | String - Hexadecimal | Blob | Yes | The credential type of the credential. |
Error Cases
In addition to error types that can occur for all transactions, DepositPreauth transactions can result in the following error codes:
Error Code | Description |
---|---|
tecDUPLICATE | The transaction would create a preauthorization that already exists. |
tecINSUFFICIENT_RESERVE | The sender would not meet the reserve requirement after adding another entry to the ledger. (A DepositPreauth entry counts as one item towards the authorizer's owner reserve.) |
tecNO_ENTRY | The transaction tried to revoke a preauthorization that does not exist in the ledger. |
tecNO_ISSUER | One or more specified credential issuers does not exist in the ledger. |
tecNO_TARGET | The transaction tried to authorize an account that is not a funded account in the ledger. |
temCANNOT_PREAUTH_SELF | The address in the Authorize field is the sender of the transaction. You cannot preauthorize yourself. |
temDISABLED | A required amendment is not enabled. |