github.com/mavryk-network/mvgo@v1.19.9/micheline/sapling.go (about)

     1  // Copyright (c) 2020-2021 Blockwatch Data Inc.
     2  // Author: alex@blockwatch.cc
     3  
     4  package micheline
     5  
     6  // "bytes"
     7  // "encoding/binary"
     8  // "encoding/hex"
     9  // "encoding/json"
    10  // "fmt"
    11  // "math/big"
    12  // "github.com/mavryk-network/mvgo/mavryk"
    13  
    14  type SaplingDiffElem struct {
    15  	Action   DiffAction    `json:"action"`
    16  	Updates  SaplingUpdate `json:"updates"`
    17  	MemoSize int           `json:"memo_size"`
    18  }
    19  
    20  type SaplingUpdate struct {
    21  	Commitments [][]byte     `json:"commitments"`
    22  	Ciphertexts []Ciphertext `json:"ciphertexts"`
    23  	Nullifiers  [][]byte     `json:"nullifiers"`
    24  }
    25  
    26  type Ciphertext struct {
    27  	Cv         []byte
    28  	Epk        []byte
    29  	PayloadEnc []byte
    30  	NonceEnc   []byte
    31  	PayloadOut []byte
    32  	NonceOut   []byte
    33  }
    34  
    35  // TODO
    36  func (c Ciphertext) MarshalJSON() ([]byte, error) {
    37  	return []byte{}, nil
    38  }
    39  
    40  func (c *Ciphertext) UnmarshalJSON(data []byte) error {
    41  	return nil
    42  }