github.com/RobustRoundRobin/quorum@v20.10.0+incompatible/private/engine/tessera/model.go (about) 1 package tessera 2 3 import "github.com/ethereum/go-ethereum/private/engine" 4 5 // request object for /send API 6 type sendRequest struct { 7 Payload []byte `json:"payload"` 8 9 // base64-encoded 10 From string `json:"from,omitempty"` 11 12 To []string `json:"to"` 13 14 // Transactions' encrypted payload hashes for affected contracts 15 AffectedContractTransactions []string `json:"affectedContractTransactions"` 16 17 // Merkle root for affected contracts 18 ExecHash string `json:"execHash,omitempty"` 19 20 PrivacyFlag engine.PrivacyFlagType `json:"privacyFlag"` 21 } 22 23 // request object for /send API 24 type storerawRequest struct { 25 Payload []byte `json:"payload"` 26 27 // base64-encoded 28 From string `json:"from,omitempty"` 29 } 30 31 // response object for /send API 32 type sendResponse struct { 33 // Base64-encoded 34 Key string `json:"key"` 35 } 36 37 type receiveResponse struct { 38 Payload []byte `json:"payload"` 39 40 // Transactions' encrypted payload hashes for affected contracts 41 AffectedContractTransactions []string `json:"affectedContractTransactions"` 42 43 // Merkle root for affected contracts 44 ExecHash string `json:"execHash"` 45 46 PrivacyFlag engine.PrivacyFlagType `json:"privacyFlag"` 47 } 48 49 type sendSignedTxRequest struct { 50 Hash []byte `json:"hash"` 51 To []string `json:"to"` 52 // Transactions' encrypted payload hashes for affected contracts 53 AffectedContractTransactions []string `json:"affectedContractTransactions"` 54 // Merkle root for affected contracts 55 ExecHash string `json:"execHash,omitempty"` 56 57 PrivacyFlag engine.PrivacyFlagType `json:"privacyFlag"` 58 } 59 60 type sendSignedTxResponse struct { 61 // Base64-encoded 62 Key string `json:"key"` 63 } 64 65 type encryptPayloadResponse struct { 66 SenderKey []byte `json:"senderKey"` 67 CipherText []byte `json:"cipherText"` 68 CipherTextNonce []byte `json:"cipherTextNonce"` 69 RecipientBoxes []string `json:"recipientBoxes"` 70 RecipientNonce []byte `json:"recipientNonce"` 71 RecipientKeys []string `json:"recipientKeys"` 72 } 73 74 type decryptPayloadRequest struct { 75 SenderKey []byte `json:"senderKey"` 76 CipherText []byte `json:"cipherText"` 77 CipherTextNonce []byte `json:"cipherTextNonce"` 78 RecipientBoxes []string `json:"recipientBoxes"` 79 RecipientNonce []byte `json:"recipientNonce"` 80 RecipientKeys []string `json:"recipientKeys"` 81 }