diff --git a/shared/requests/submit.yaml b/shared/requests/submit.yaml index 33079f6..5d850b1 100644 --- a/shared/requests/submit.yaml +++ b/shared/requests/submit.yaml @@ -80,6 +80,7 @@ components: AMMWithdraw: '../transactions/amm_withdraw.yaml#/components/schemas/AMMWithdrawTransaction' CredentialAccept: '../transactions/credential_accept.yaml#/components/schemas/CredentialAcceptTransaction' CredentialCreate: '../transactions/credential_create.yaml#/components/schemas/CredentialCreateTransaction' + CredentialDelete: '../transactions/credential_delete.yaml#/components/schemas/CredentialDeleteTransaction' CheckCancel: '../transactions/check_cancel.yaml#/components/schemas/CheckCancelTransaction' CheckCash: '../transactions/check_cash.yaml#/components/schemas/CheckCashTransaction' CheckCreate: '../transactions/check_create.yaml#/components/schemas/CheckCreateTransaction' @@ -126,6 +127,7 @@ components: - $ref: '../transactions/amm_withdraw.yaml#/components/schemas/AMMWithdrawTransaction' - $ref: '../transactions/credential_accept.yaml#/components/schemas/CredentialAcceptTransaction' - $ref: '../transactions/credential_create.yaml#/components/schemas/CredentialCreateTransaction' + - $ref: '../transactions/credential_delete.yaml#/components/schemas/CredentialDeleteTransaction' - $ref: '../transactions/check_cancel.yaml#/components/schemas/CheckCancelTransaction' - $ref: '../transactions/check_cash.yaml#/components/schemas/CheckCashTransaction' - $ref: '../transactions/check_create.yaml#/components/schemas/CheckCreateTransaction' @@ -187,6 +189,7 @@ components: AMMWithdraw: '../transactions/amm_withdraw.yaml#/components/schemas/AMMWithdrawTransaction' CredentialAccept: '../transactions/credential_accept.yaml#/components/schemas/CredentialAcceptTransaction' CredentialCreate: '../transactions/credential_create.yaml#/components/schemas/CredentialCreateTransaction' + CredentialDelete: '../transactions/credential_delete.yaml#/components/schemas/CredentialDeleteTransaction' CheckCancel: '../transactions/check_cancel.yaml#/components/schemas/CheckCancelTransaction' CheckCash: '../transactions/check_cash.yaml#/components/schemas/CheckCashTransaction' CheckCreate: '../transactions/check_create.yaml#/components/schemas/CheckCreateTransaction' @@ -233,6 +236,7 @@ components: - $ref: '../transactions/amm_withdraw.yaml#/components/schemas/AMMWithdrawTransaction' - $ref: '../transactions/credential_accept.yaml#/components/schemas/CredentialAcceptTransaction' - $ref: '../transactions/credential_create.yaml#/components/schemas/CredentialCreateTransaction' + - $ref: '../transactions/credential_delete.yaml#/components/schemas/CredentialDeleteTransaction' - $ref: '../transactions/check_cancel.yaml#/components/schemas/CheckCancelTransaction' - $ref: '../transactions/check_cash.yaml#/components/schemas/CheckCashTransaction' - $ref: '../transactions/check_create.yaml#/components/schemas/CheckCreateTransaction' @@ -353,6 +357,7 @@ components: AMMWithdraw: '../transactions/amm_withdraw.yaml#/components/schemas/AMMWithdrawTransaction' CredentialAccept: '../transactions/credential_accept.yaml#/components/schemas/CredentialAcceptTransaction' CredentialCreate: '../transactions/credential_create.yaml#/components/schemas/CredentialCreateTransaction' + CredentialDelete: '../transactions/credential_delete.yaml#/components/schemas/CredentialDeleteTransaction' CheckCancel: '../transactions/check_cancel.yaml#/components/schemas/CheckCancelTransaction' CheckCash: '../transactions/check_cash.yaml#/components/schemas/CheckCashTransaction' CheckCreate: '../transactions/check_create.yaml#/components/schemas/CheckCreateTransaction' @@ -400,6 +405,7 @@ components: - $ref: '../transactions/amm_withdraw.yaml#/components/schemas/AMMWithdrawTransaction' - $ref: '../transactions/credential_accept.yaml#/components/schemas/CredentialAcceptTransaction' - $ref: '../transactions/credential_create.yaml#/components/schemas/CredentialCreateTransaction' + - $ref: '../transactions/credential_delete.yaml#/components/schemas/CredentialDeleteTransaction' - $ref: '../transactions/check_cancel.yaml#/components/schemas/CheckCancelTransaction' - $ref: '../transactions/check_cash.yaml#/components/schemas/CheckCashTransaction' - $ref: '../transactions/check_create.yaml#/components/schemas/CheckCreateTransaction' @@ -456,6 +462,7 @@ components: AMMWithdraw: '../transactions/amm_withdraw.yaml#/components/schemas/AMMWithdrawTransaction' CredentialAccept: '../transactions/credential_accept.yaml#/components/schemas/CredentialAcceptTransaction' CredentialCreate: '../transactions/credential_create.yaml#/components/schemas/CredentialCreateTransaction' + CredentialDelete: '../transactions/credential_delete.yaml#/components/schemas/CredentialDeleteTransaction' CheckCancel: '../transactions/check_cancel.yaml#/components/schemas/CheckCancelTransaction' CheckCash: '../transactions/check_cash.yaml#/components/schemas/CheckCashTransaction' CheckCreate: '../transactions/check_create.yaml#/components/schemas/CheckCreateTransaction' @@ -503,6 +510,7 @@ components: - $ref: '../transactions/amm_withdraw.yaml#/components/schemas/AMMWithdrawTransaction' - $ref: '../transactions/credential_accept.yaml#/components/schemas/CredentialAcceptTransaction' - $ref: '../transactions/credential_create.yaml#/components/schemas/CredentialCreateTransaction' + - $ref: '../transactions/credential_delete.yaml#/components/schemas/CredentialDeleteTransaction' - $ref: '../transactions/check_cancel.yaml#/components/schemas/CheckCancelTransaction' - $ref: '../transactions/check_cash.yaml#/components/schemas/CheckCashTransaction' - $ref: '../transactions/check_create.yaml#/components/schemas/CheckCreateTransaction' @@ -553,6 +561,7 @@ components: - $ref: '../transactions/amm_withdraw.yaml#/components/schemas/AMMWithdrawErrorCode' - $ref: '../transactions/credential_accept.yaml#/components/schemas/CredentialAcceptErrorCode' - $ref: '../transactions/credential_create.yaml#/components/schemas/CredentialCreateErrorCode' + - $ref: '../transactions/credential_delete.yaml#/components/schemas/CredentialDeleteErrorCode' - $ref: '../transactions/check_cancel.yaml#/components/schemas/CheckCancelErrorCode' - $ref: '../transactions/check_cash.yaml#/components/schemas/CheckCashErrorCode' - $ref: '../transactions/check_create.yaml#/components/schemas/CheckCreateErrorCode' diff --git a/shared/transactions/credential_delete.yaml b/shared/transactions/credential_delete.yaml new file mode 100644 index 0000000..8414566 --- /dev/null +++ b/shared/transactions/credential_delete.yaml @@ -0,0 +1,42 @@ +components: + schemas: + CredentialDeleteTransaction: + $id: CredentialDeleteTransaction + allOf: + - $ref: '../base.yaml#/components/schemas/BaseTransaction' + type: object + description: > + A CredentialDelete transaction removes a credential from the ledger, effectively revoking it. + Users may also want to delete an unwanted credential to reduce their reserve requirement. + required: + - CredentialType + properties: + CredentialType: + type: string + description: Arbitrary data defining the type of credential to delete. The minimum length is 1 byte and the maximum length is 256 bytes. + Subject: + type: string + description: The subject of the credential to delete. If omitted, use the Account (sender of the transaction) as the subject of the credential. + Issuer: + type: string + description: The issuer of the credential to delete. If omitted, use the Account (sender of the transaction) as the issuer of the credential. + x-custom-validation: + requireOneOf: + - fields: + - Subject + - Issuer + + CredentialDeleteErrorCode: + $id: CredentialDeleteErrorCode + type: string + description: Error codes for the CredentialDelete transaction. + enum: + - temDISABLED + - temINVALID_ACCOUNT_ID + - tecNO_PERMISSION + - tecNO_ENTRY + x-enum-descriptions: + temDISABLED: The related amendment is not enabled. + temINVALID_ACCOUNT_ID: A provided Subject or Issuer field is invalid. For example, it contains ACCOUNT_ZERO. + tecNO_PERMISSION: The sender is neither the issuer nor subject of the credential, and the credential is not expired. + tecNO_ENTRY: The specified credential does not exist in the ledger.