Skip to content

ConfidentialMPTSend

[Source]

Send MPT tokens to another account while keeping the transfer amount hidden. The transferred amount is credited to the receiver's confidential inbox balance to avoid proof staleness. The receiver can later merge these funds into the spending balance via the ConfidentialMPTMergeInbox transaction.

Confidential sends respect the same authorization requirements as standard MPT payments, including Deposit Authorization and Credential requirements.

(Requires the ConfidentialTransfers amendment )

Example ConfidentialMPTSend JSON

{
  "TransactionType": "ConfidentialMPTSend",
  "Account": "rSenderAccount...",
  "Destination": "rReceiverAccount...",
  "MPTokenIssuanceID": "610F33B8EBF7EC795F822A454FB852156AEFE50BE0CB8326338A81CD74801864",
  "SenderEncryptedAmount": "AD3F...",
  "DestinationEncryptedAmount": "DF4E...",
  "IssuerEncryptedAmount": "BC2E...",
  "ZKProof": "84af...",
  "AmountCommitment": "038A...",
  "BalanceCommitment": "02F1...",
  "Fee": "12",
  "Sequence": 2470665,
  "Flags": 2147483648
}

ConfidentialMPTSend Fields

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

FieldJSON TypeInternal TypeRequired?Description
DestinationStringAccountIDYesThe receiver's account.
MPTokenIssuanceIDStringUInt192YesIdentifier of the MPT issuance being transferred.
SenderEncryptedAmountStringBlobYesCiphertext used to homomorphically debit the sender's spending balance.
DestinationEncryptedAmountStringBlobYesCiphertext credited to the receiver's inbox balance.
IssuerEncryptedAmountStringBlobYesCiphertext used to update the issuer mirror balance.
ZKProofStringBlobYesZKP bundle establishing equality, linkage, and range sufficiency.
AmountCommitmentStringBlobYesA cryptographic commitment to the amount being transferred.
BalanceCommitmentStringBlobYesA cryptographic commitment to the user's confidential spending balance.
AuditorEncryptedAmountStringBlobNoCiphertext for the auditor. Required if sfAuditorEncryptionKey is present on the issuance.
CredentialIDsArrayVector256NoArray of Credential IDs. If present, the transaction can only succeed if the sender is authorized by credentials that match these IDs.

Error Cases

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

Error CodeDescription
temDISABLEDThe ConfidentialTransfer amendment is not enabled.
temMALFORMEDThe sender is the issuer, or the account attempts to send to itself.
temBAD_CIPHERTEXTThe AuditorEncryptedAmount, if present, has invalid length or represents an invalid elliptic curve point.
tecNO_TARGETThe destination account does not exist.
tecNO_AUTHThe issuance does not have the Can Transfer flag enabled.
tecNO_PERMISSIONThe transaction lacks required permissions. This can occur if:
  • The issuance does not have the Can Confidential Amount flag enabled.
  • One of the participating accounts lacks a registered ElGamal public key or required confidential fields.
  • The destination account has Deposit Authorization enabled and the sender is not preauthorized.
  • The destination account requires credentials, but the transaction does not include valid matching credentials in the CredentialIDs field.
tecNO_ENTRYA credential ID specified in CredentialIDs does not exist on the ledger.
tecEXPIREDA credential specified in CredentialIDs has expired.
terFROZENEither the sender or receiver's balance is currently frozen.
tecBAD_PROOFThe provided Zero-Knowledge Proof fails to verify equality or range constraints. This can occur if the proof was generated with an outdated ConfidentialBalanceVersion.