github.com/jpmorganchase/quorum@v21.1.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  	// Public Keys
    36  	ManagedParties []string `json:"managedParties"`
    37  	// Sender tessera public key
    38  	SenderKey string `json:"senderKey"`
    39  }
    40  
    41  type receiveResponse struct {
    42  	Payload []byte `json:"payload"`
    43  
    44  	// Transactions' encrypted payload hashes for affected contracts
    45  	AffectedContractTransactions []string `json:"affectedContractTransactions"`
    46  
    47  	// Merkle root for affected contracts
    48  	ExecHash string `json:"execHash"`
    49  
    50  	PrivacyFlag engine.PrivacyFlagType `json:"privacyFlag"`
    51  
    52  	// Public Keys
    53  	ManagedParties []string `json:"managedParties"`
    54  	// Sender tessera public key
    55  	SenderKey string `json:"senderKey"`
    56  }
    57  
    58  type sendSignedTxRequest struct {
    59  	Hash []byte   `json:"hash"`
    60  	To   []string `json:"to"`
    61  	// Transactions' encrypted payload hashes for affected contracts
    62  	AffectedContractTransactions []string `json:"affectedContractTransactions"`
    63  	// Merkle root for affected contracts
    64  	ExecHash string `json:"execHash,omitempty"`
    65  
    66  	PrivacyFlag engine.PrivacyFlagType `json:"privacyFlag"`
    67  }
    68  
    69  type sendSignedTxResponse struct {
    70  	// Base64-encoded
    71  	Key string `json:"key"`
    72  	// Public Keys
    73  	ManagedParties []string `json:"managedParties"`
    74  	// Sender tessera public key
    75  	SenderKey string `json:"senderKey"`
    76  }
    77  
    78  type encryptPayloadResponse struct {
    79  	SenderKey       []byte   `json:"senderKey"`
    80  	CipherText      []byte   `json:"cipherText"`
    81  	CipherTextNonce []byte   `json:"cipherTextNonce"`
    82  	RecipientBoxes  []string `json:"recipientBoxes"`
    83  	RecipientNonce  []byte   `json:"recipientNonce"`
    84  	RecipientKeys   []string `json:"recipientKeys"`
    85  }
    86  
    87  type decryptPayloadRequest struct {
    88  	SenderKey       []byte   `json:"senderKey"`
    89  	CipherText      []byte   `json:"cipherText"`
    90  	CipherTextNonce []byte   `json:"cipherTextNonce"`
    91  	RecipientBoxes  []string `json:"recipientBoxes"`
    92  	RecipientNonce  []byte   `json:"recipientNonce"`
    93  	RecipientKeys   []string `json:"recipientKeys"`
    94  }