405 lines
15 KiB
Go
405 lines
15 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// source: compact_formats.proto
|
|
|
|
package walletrpc
|
|
|
|
import (
|
|
fmt "fmt"
|
|
proto "github.com/golang/protobuf/proto"
|
|
math "math"
|
|
)
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
var _ = proto.Marshal
|
|
var _ = fmt.Errorf
|
|
var _ = math.Inf
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the proto package it is being compiled against.
|
|
// A compilation error at this line likely means your copy of the
|
|
// proto package needs to be updated.
|
|
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
|
// CompactBlock is a packaging of ONLY the data from a block that's needed to:
|
|
// 1. Detect a payment to your shielded Sapling address
|
|
// 2. Detect a spend of your shielded Sapling notes
|
|
// 3. Update your witnesses to generate new Sapling spend proofs.
|
|
type CompactBlock struct {
|
|
ProtoVersion uint32 `protobuf:"varint,1,opt,name=protoVersion,proto3" json:"protoVersion,omitempty"`
|
|
Height uint64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
|
|
Hash []byte `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
|
|
PrevHash []byte `protobuf:"bytes,4,opt,name=prevHash,proto3" json:"prevHash,omitempty"`
|
|
Time uint32 `protobuf:"varint,5,opt,name=time,proto3" json:"time,omitempty"`
|
|
Header []byte `protobuf:"bytes,6,opt,name=header,proto3" json:"header,omitempty"`
|
|
Vtx []*CompactTx `protobuf:"bytes,7,rep,name=vtx,proto3" json:"vtx,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *CompactBlock) Reset() { *m = CompactBlock{} }
|
|
func (m *CompactBlock) String() string { return proto.CompactTextString(m) }
|
|
func (*CompactBlock) ProtoMessage() {}
|
|
func (*CompactBlock) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_dce29fee3ee34899, []int{0}
|
|
}
|
|
|
|
func (m *CompactBlock) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_CompactBlock.Unmarshal(m, b)
|
|
}
|
|
func (m *CompactBlock) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_CompactBlock.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *CompactBlock) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_CompactBlock.Merge(m, src)
|
|
}
|
|
func (m *CompactBlock) XXX_Size() int {
|
|
return xxx_messageInfo_CompactBlock.Size(m)
|
|
}
|
|
func (m *CompactBlock) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_CompactBlock.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_CompactBlock proto.InternalMessageInfo
|
|
|
|
func (m *CompactBlock) GetProtoVersion() uint32 {
|
|
if m != nil {
|
|
return m.ProtoVersion
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *CompactBlock) GetHeight() uint64 {
|
|
if m != nil {
|
|
return m.Height
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *CompactBlock) GetHash() []byte {
|
|
if m != nil {
|
|
return m.Hash
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *CompactBlock) GetPrevHash() []byte {
|
|
if m != nil {
|
|
return m.PrevHash
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *CompactBlock) GetTime() uint32 {
|
|
if m != nil {
|
|
return m.Time
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *CompactBlock) GetHeader() []byte {
|
|
if m != nil {
|
|
return m.Header
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *CompactBlock) GetVtx() []*CompactTx {
|
|
if m != nil {
|
|
return m.Vtx
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// CompactTx contains the minimum information for a wallet to know if this transaction
|
|
// is relevant to it (either pays to it or spends from it) via shielded elements
|
|
// only. This message will not encode a transparent-to-transparent transaction.
|
|
type CompactTx struct {
|
|
Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
|
|
Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
|
|
// The transaction fee: present if server can provide. In the case of a
|
|
// stateless server and a transaction with transparent inputs, this will be
|
|
// unset because the calculation requires reference to prior transactions.
|
|
// in a pure-Sapling context, the fee will be calculable as:
|
|
// valueBalance + (sum(vPubNew) - sum(vPubOld) - sum(tOut))
|
|
Fee uint32 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"`
|
|
Spends []*CompactSaplingSpend `protobuf:"bytes,4,rep,name=spends,proto3" json:"spends,omitempty"`
|
|
Outputs []*CompactSaplingOutput `protobuf:"bytes,5,rep,name=outputs,proto3" json:"outputs,omitempty"`
|
|
Actions []*CompactOrchardAction `protobuf:"bytes,6,rep,name=actions,proto3" json:"actions,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *CompactTx) Reset() { *m = CompactTx{} }
|
|
func (m *CompactTx) String() string { return proto.CompactTextString(m) }
|
|
func (*CompactTx) ProtoMessage() {}
|
|
func (*CompactTx) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_dce29fee3ee34899, []int{1}
|
|
}
|
|
|
|
func (m *CompactTx) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_CompactTx.Unmarshal(m, b)
|
|
}
|
|
func (m *CompactTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_CompactTx.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *CompactTx) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_CompactTx.Merge(m, src)
|
|
}
|
|
func (m *CompactTx) XXX_Size() int {
|
|
return xxx_messageInfo_CompactTx.Size(m)
|
|
}
|
|
func (m *CompactTx) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_CompactTx.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_CompactTx proto.InternalMessageInfo
|
|
|
|
func (m *CompactTx) GetIndex() uint64 {
|
|
if m != nil {
|
|
return m.Index
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *CompactTx) GetHash() []byte {
|
|
if m != nil {
|
|
return m.Hash
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *CompactTx) GetFee() uint32 {
|
|
if m != nil {
|
|
return m.Fee
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (m *CompactTx) GetSpends() []*CompactSaplingSpend {
|
|
if m != nil {
|
|
return m.Spends
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *CompactTx) GetOutputs() []*CompactSaplingOutput {
|
|
if m != nil {
|
|
return m.Outputs
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *CompactTx) GetActions() []*CompactOrchardAction {
|
|
if m != nil {
|
|
return m.Actions
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// CompactSaplingSpend is a Sapling Spend Description as described in 7.3 of the Zcash
|
|
// protocol specification.
|
|
type CompactSaplingSpend struct {
|
|
Nf []byte `protobuf:"bytes,1,opt,name=nf,proto3" json:"nf,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *CompactSaplingSpend) Reset() { *m = CompactSaplingSpend{} }
|
|
func (m *CompactSaplingSpend) String() string { return proto.CompactTextString(m) }
|
|
func (*CompactSaplingSpend) ProtoMessage() {}
|
|
func (*CompactSaplingSpend) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_dce29fee3ee34899, []int{2}
|
|
}
|
|
|
|
func (m *CompactSaplingSpend) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_CompactSaplingSpend.Unmarshal(m, b)
|
|
}
|
|
func (m *CompactSaplingSpend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_CompactSaplingSpend.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *CompactSaplingSpend) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_CompactSaplingSpend.Merge(m, src)
|
|
}
|
|
func (m *CompactSaplingSpend) XXX_Size() int {
|
|
return xxx_messageInfo_CompactSaplingSpend.Size(m)
|
|
}
|
|
func (m *CompactSaplingSpend) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_CompactSaplingSpend.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_CompactSaplingSpend proto.InternalMessageInfo
|
|
|
|
func (m *CompactSaplingSpend) GetNf() []byte {
|
|
if m != nil {
|
|
return m.Nf
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// output is a Sapling Output Description as described in section 7.4 of the
|
|
// Zcash protocol spec. Total size is 948.
|
|
type CompactSaplingOutput struct {
|
|
Cmu []byte `protobuf:"bytes,1,opt,name=cmu,proto3" json:"cmu,omitempty"`
|
|
Epk []byte `protobuf:"bytes,2,opt,name=epk,proto3" json:"epk,omitempty"`
|
|
Ciphertext []byte `protobuf:"bytes,3,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *CompactSaplingOutput) Reset() { *m = CompactSaplingOutput{} }
|
|
func (m *CompactSaplingOutput) String() string { return proto.CompactTextString(m) }
|
|
func (*CompactSaplingOutput) ProtoMessage() {}
|
|
func (*CompactSaplingOutput) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_dce29fee3ee34899, []int{3}
|
|
}
|
|
|
|
func (m *CompactSaplingOutput) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_CompactSaplingOutput.Unmarshal(m, b)
|
|
}
|
|
func (m *CompactSaplingOutput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_CompactSaplingOutput.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *CompactSaplingOutput) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_CompactSaplingOutput.Merge(m, src)
|
|
}
|
|
func (m *CompactSaplingOutput) XXX_Size() int {
|
|
return xxx_messageInfo_CompactSaplingOutput.Size(m)
|
|
}
|
|
func (m *CompactSaplingOutput) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_CompactSaplingOutput.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_CompactSaplingOutput proto.InternalMessageInfo
|
|
|
|
func (m *CompactSaplingOutput) GetCmu() []byte {
|
|
if m != nil {
|
|
return m.Cmu
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *CompactSaplingOutput) GetEpk() []byte {
|
|
if m != nil {
|
|
return m.Epk
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *CompactSaplingOutput) GetCiphertext() []byte {
|
|
if m != nil {
|
|
return m.Ciphertext
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// https://github.com/zcash/zips/blob/main/zip-0225.rst#orchard-action-description-orchardaction
|
|
// (but not all fields are needed)
|
|
type CompactOrchardAction struct {
|
|
Nullifier []byte `protobuf:"bytes,1,opt,name=nullifier,proto3" json:"nullifier,omitempty"`
|
|
Cmx []byte `protobuf:"bytes,2,opt,name=cmx,proto3" json:"cmx,omitempty"`
|
|
EphemeralKey []byte `protobuf:"bytes,3,opt,name=ephemeralKey,proto3" json:"ephemeralKey,omitempty"`
|
|
Ciphertext []byte `protobuf:"bytes,4,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"`
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
XXX_unrecognized []byte `json:"-"`
|
|
XXX_sizecache int32 `json:"-"`
|
|
}
|
|
|
|
func (m *CompactOrchardAction) Reset() { *m = CompactOrchardAction{} }
|
|
func (m *CompactOrchardAction) String() string { return proto.CompactTextString(m) }
|
|
func (*CompactOrchardAction) ProtoMessage() {}
|
|
func (*CompactOrchardAction) Descriptor() ([]byte, []int) {
|
|
return fileDescriptor_dce29fee3ee34899, []int{4}
|
|
}
|
|
|
|
func (m *CompactOrchardAction) XXX_Unmarshal(b []byte) error {
|
|
return xxx_messageInfo_CompactOrchardAction.Unmarshal(m, b)
|
|
}
|
|
func (m *CompactOrchardAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
return xxx_messageInfo_CompactOrchardAction.Marshal(b, m, deterministic)
|
|
}
|
|
func (m *CompactOrchardAction) XXX_Merge(src proto.Message) {
|
|
xxx_messageInfo_CompactOrchardAction.Merge(m, src)
|
|
}
|
|
func (m *CompactOrchardAction) XXX_Size() int {
|
|
return xxx_messageInfo_CompactOrchardAction.Size(m)
|
|
}
|
|
func (m *CompactOrchardAction) XXX_DiscardUnknown() {
|
|
xxx_messageInfo_CompactOrchardAction.DiscardUnknown(m)
|
|
}
|
|
|
|
var xxx_messageInfo_CompactOrchardAction proto.InternalMessageInfo
|
|
|
|
func (m *CompactOrchardAction) GetNullifier() []byte {
|
|
if m != nil {
|
|
return m.Nullifier
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *CompactOrchardAction) GetCmx() []byte {
|
|
if m != nil {
|
|
return m.Cmx
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *CompactOrchardAction) GetEphemeralKey() []byte {
|
|
if m != nil {
|
|
return m.EphemeralKey
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *CompactOrchardAction) GetCiphertext() []byte {
|
|
if m != nil {
|
|
return m.Ciphertext
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func init() {
|
|
proto.RegisterType((*CompactBlock)(nil), "cash.z.wallet.sdk.rpc.CompactBlock")
|
|
proto.RegisterType((*CompactTx)(nil), "cash.z.wallet.sdk.rpc.CompactTx")
|
|
proto.RegisterType((*CompactSaplingSpend)(nil), "cash.z.wallet.sdk.rpc.CompactSaplingSpend")
|
|
proto.RegisterType((*CompactSaplingOutput)(nil), "cash.z.wallet.sdk.rpc.CompactSaplingOutput")
|
|
proto.RegisterType((*CompactOrchardAction)(nil), "cash.z.wallet.sdk.rpc.CompactOrchardAction")
|
|
}
|
|
|
|
func init() { proto.RegisterFile("compact_formats.proto", fileDescriptor_dce29fee3ee34899) }
|
|
|
|
var fileDescriptor_dce29fee3ee34899 = []byte{
|
|
// 440 bytes of a gzipped FileDescriptorProto
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x52, 0xdd, 0x6a, 0x14, 0x31,
|
|
0x14, 0x76, 0x66, 0x67, 0xa7, 0xf6, 0xb8, 0x15, 0x89, 0x6d, 0x09, 0x2a, 0x32, 0x0c, 0x08, 0x8b,
|
|
0xc2, 0x08, 0xf5, 0x09, 0x5c, 0x11, 0x04, 0x2f, 0x0a, 0xa9, 0x78, 0xd1, 0x1b, 0x89, 0x99, 0x33,
|
|
0x9d, 0xb0, 0xf3, 0x13, 0x92, 0x6c, 0x1d, 0x7d, 0x04, 0xdf, 0xc0, 0x57, 0xf1, 0x51, 0x7c, 0x1a,
|
|
0x49, 0x26, 0x3b, 0x76, 0xcb, 0x22, 0xbd, 0xca, 0xc9, 0xc7, 0xf9, 0x7e, 0xce, 0xe1, 0xc0, 0x89,
|
|
0xe8, 0x5b, 0xc5, 0x85, 0xfd, 0x52, 0xf5, 0xba, 0xe5, 0xd6, 0x14, 0x4a, 0xf7, 0xb6, 0x27, 0x27,
|
|
0x82, 0x9b, 0xba, 0xf8, 0x51, 0x7c, 0xe3, 0x4d, 0x83, 0xb6, 0x30, 0xe5, 0xba, 0xd0, 0x4a, 0xe4,
|
|
0x7f, 0x22, 0x58, 0xbc, 0x1b, 0x09, 0xab, 0xa6, 0x17, 0x6b, 0x92, 0xc3, 0xc2, 0x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