From d35b141d8801e6ff251aeb906158a220ddff2201 Mon Sep 17 00:00:00 2001 From: Zaki Date: Sat, 28 Feb 2026 11:53:47 -0800 Subject: [PATCH] Implement darkside getaddresstxids support Co-Authored-By: Claude Opus 4.6 --- common/darkside.go | 57 +++- frontend/service.go | 15 + smoke-test.bash | 33 +- walletrpc/darkside.pb.go | 623 +++++++++++++++++++++++++--------- walletrpc/darkside.proto | 12 + walletrpc/darkside_grpc.pb.go | 361 ++++++++++++++------ 6 files changed, 833 insertions(+), 268 deletions(-) diff --git a/common/darkside.go b/common/darkside.go index 5544c115..d1bf863e 100644 --- a/common/darkside.go +++ b/common/darkside.go @@ -56,6 +56,9 @@ type darksideState struct { // Unordered list of replies getAddressUtxos []ZcashdRpcReplyGetaddressutxos + // List of (address, transaction, height) tuples for getaddresstxids + getAddressTransactions []*walletrpc.DarksideAddressTransaction + stagedTreeStates map[uint64]*DarksideTreeState stagedTreeStatesByHash map[string]*DarksideTreeState @@ -610,8 +613,32 @@ func darksideRawRequest(method string, params []json.RawMessage) (json.RawMessag return json.Marshal(block.GetDisplayHashString()) case "getaddresstxids": - // Not required for minimal reorg testing. - return nil, errors.New("not implemented yet") + var req ZcashdRpcRequestGetaddresstxids + err := json.Unmarshal(params[0], &req) + if err != nil { + return nil, errors.New("failed to parse getaddresstxids JSON") + } + matchingTxids := make([]string, 0) + for _, entry := range state.getAddressTransactions { + if !slices.Contains(req.Addresses, entry.Address) { + continue + } + if entry.Height < req.Start { + continue + } + if req.End > 0 && entry.Height > req.End { + continue + } + // Parse the stored transaction to compute its txid + tx := parser.NewTransaction() + _, err := tx.ParseFromSlice(entry.Data) + if err != nil { + return nil, errors.New("failed to parse stored address transaction") + } + darksideSetTxID(tx) + matchingTxids = append(matchingTxids, tx.GetDisplayHashString()) + } + return json.Marshal(matchingTxids) case "getrawtransaction": return darksideGetRawTransaction(params) @@ -824,6 +851,18 @@ func darksideGetRawTransaction(params []json.RawMessage) (json.RawMessage, error return marshalReply(tx, 0), nil } } + // Also search address transactions (added via AddAddressTransaction) + for _, entry := range state.getAddressTransactions { + tx := parser.NewTransaction() + _, err := tx.ParseFromSlice(entry.Data) + if err != nil { + continue + } + darksideSetTxID(tx) + if tx.GetDisplayHashString() == txidBigEndian { + return marshalReply(tx, int(entry.Height)), nil + } + } return nil, errors.New("-5: No information available about transaction") } @@ -908,6 +947,20 @@ func DarksideClearAddressUtxos() error { return nil } +func DarksideAddAddressTransaction(arg *walletrpc.DarksideAddressTransaction) error { + mutex.Lock() + state.getAddressTransactions = append(state.getAddressTransactions, arg) + mutex.Unlock() + return nil +} + +func DarksideClearAddressTransactions() error { + mutex.Lock() + state.getAddressTransactions = nil + mutex.Unlock() + return nil +} + func DarksideClearAllTreeStates() error { mutex.Lock() state.stagedTreeStates = make(map[uint64]*DarksideTreeState) diff --git a/frontend/service.go b/frontend/service.go index f83edf89..bc67e29f 100644 --- a/frontend/service.go +++ b/frontend/service.go @@ -1060,6 +1060,21 @@ func (s *DarksideStreamer) ClearAddressUtxo(ctx context.Context, arg *walletrpc. return &walletrpc.Empty{}, err } +// AddAddressTransaction adds a (address, transaction, height) entry returned by GetTaddressTransactions +func (s *DarksideStreamer) AddAddressTransaction(ctx context.Context, arg *walletrpc.DarksideAddressTransaction) (*walletrpc.Empty, error) { + err := common.DarksideAddAddressTransaction(arg) + if err != nil { + return nil, status.Errorf(codes.Unknown, "AddAddressTransaction failed: %s", err.Error()) + } + return &walletrpc.Empty{}, nil +} + +// ClearAddressTransactions clears the list of address transaction entries +func (s *DarksideStreamer) ClearAddressTransactions(ctx context.Context, arg *walletrpc.Empty) (*walletrpc.Empty, error) { + err := common.DarksideClearAddressTransactions() + return &walletrpc.Empty{}, err +} + // Adds a tree state to the cached tree states func (s *DarksideStreamer) AddTreeState(ctx context.Context, arg *walletrpc.TreeState) (*walletrpc.Empty, error) { tree := common.DarksideTreeState{ diff --git a/smoke-test.bash b/smoke-test.bash index c3f6a44d..f73cf699 100755 --- a/smoke-test.bash +++ b/smo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'", "height": "663195" }' compare "$expected" "$actual" @@ -454,3 +455,33 @@ expected='{ "errorMessage": "0821a89be7f2fc1311792c3fa1dd2171a8cdfb2effd98590cbd5ebcdcfcf491f" }' compare "$expected" "$actual" + +echo -n Reset to test GetTaddressTransactions ... +gt Reset '{"saplingActivation": 663150,"branchID": "bad", "chainName":"x"}' + +echo -n GetTaddressTransactions ... +gt AddAddressTransaction '{"address": "t1Yc45TyqLoNMBP1Ae4JM413ckTyvP2TUGA", "data": "'$tx'","height": 644337}' +actual=$(gp GetTaddressTransactions '{"range":{"start":{"height":644337},"end":{"height":650510}},"address":"t1Yc45TyqLoNMBP1Ae4JM413ckTyvP2TUGA"}') +expected='{ + "data": "'$tx'", + "height": "644337" +}' +compare "$expected" "$actual" + +echo GetTaddressTransactions at range end ... +actual=$(gp GetTaddressTransactions '{"range":{"start":{"height":2},"end":{"height":644337}},"address":"t1Yc45TyqLoNMBP1Ae4JM413ckTyvP2TUGA"}') +expected='{ + "data": "'$tx'", + "height": "644337" +}' +compare "$expected" "$actual" + +echo GetTaddressTransactions out of range start ... +actual=$(gp GetTaddressTransactions '{"range":{"start":{"height":644338},"end":{"height":650510}},"address":"t1Yc45TyqLoNMBP1Ae4JM413ckTyvP2TUGA"}') +expected='' +compare "$expected" "$actual" + +echo GetTaddressTransactions out of range end ... +actual=$(gp GetTaddressTransactions '{"range":{"start":{"height":2},"end":{"height":644336}},"address":"t1Yc45TyqLoNMBP1Ae4JM413ckTyvP2TUGA"}') +expected='' +compare "$expected" "$actual" diff --git a/walletrpc/darkside.pb.go b/walletrpc/darkside.pb.go index 3ea108b1..485c45dc 100644 --- a/walletrpc/darkside.pb.go +++ b/walletrpc/darkside.pb.go @@ -4,8 +4,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.36.11 -// protoc v6.33.2 +// protoc-gen-go v1.32.0 +// protoc v6.33.4 // source: darkside.proto package walletrpc @@ -15,7 +15,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - unsafe "unsafe" ) const ( @@ -26,21 +25,24 @@ const ( ) type DarksideMetaState struct { - state protoimpl.MessageState `protogen:"open.v1"` - SaplingActivation int32 `protobuf:"varint,1,opt,name=saplingActivation,proto3" json:"saplingActivation,omitempty"` - BranchID string `protobuf:"bytes,2,opt,name=branchID,proto3" json:"branchID,omitempty"` - ChainName string `protobuf:"bytes,3,opt,name=chainName,proto3" json:"chainName,omitempty"` - StartSaplingCommitmentTreeSize uint32 `protobuf:"varint,4,opt,name=startSaplingCommitmentTreeSize,proto3" json:"startSaplingCommitmentTreeSize,omitempty"` - StartOrchardCommitmentTreeSize uint32 `protobuf:"varint,5,opt,name=startOrchardCommitmentTreeSize,proto3" json:"startOrchardCommitmentTreeSize,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SaplingActivation int32 `protobuf:"varint,1,opt,name=saplingActivation,proto3" json:"saplingActivation,omitempty"` + BranchID string `protobuf:"bytes,2,opt,name=branchID,proto3" json:"branchID,omitempty"` + ChainName string `protobuf:"bytes,3,opt,name=chainName,proto3" json:"chainName,omitempty"` + StartSaplingCommitmentTreeSize uint32 `protobuf:"varint,4,opt,name=startSaplingCommitmentTreeSize,proto3" json:"startSaplingCommitmentTreeSize,omitempty"` + StartOrchardCommitmentTreeSize uint32 `protobuf:"varint,5,opt,name=startOrchardCommitmentTreeSize,proto3" json:"startOrchardCommitmentTreeSize,omitempty"` } func (x *DarksideMetaState) Reset() { *x = DarksideMetaState{} - mi := &file_darkside_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_darkside_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DarksideMetaState) String() string { @@ -51,7 +53,7 @@ func (*DarksideMetaState) ProtoMessage() {} func (x *DarksideMetaState) ProtoReflect() protoreflect.Message { mi := &file_darkside_proto_msgTypes[0] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -103,17 +105,20 @@ func (x *DarksideMetaState) GetStartOrchardCommitmentTreeSize() uint32 { // A block is a hex-encoded string. type DarksideBlock struct { - state protoimpl.MessageState `protogen:"open.v1"` - Block string `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Block string `protobuf:"bytes,1,opt,name=block,proto3" json:"block,omitempty"` } func (x *DarksideBlock) Reset() { *x = DarksideBlock{} - mi := &file_darkside_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_darkside_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DarksideBlock) String() string { @@ -124,7 +129,7 @@ func (*DarksideBlock) ProtoMessage() {} func (x *DarksideBlock) ProtoReflect() protoreflect.Message { mi := &file_darkside_proto_msgTypes[1] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -149,17 +154,20 @@ func (x *DarksideBlock) GetBlock() string { // DarksideBlocksURL is typically something like: // https://raw.githubusercontent.com/zcash-hackworks/darksidewalletd-test-data/master/basic-reorg/before-reorg.txt type DarksideBlocksURL struct { - state protoimpl.MessageState `protogen:"open.v1"` - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` } func (x *DarksideBlocksURL) Reset() { *x = DarksideBlocksURL{} - mi := &file_darkside_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_darkside_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DarksideBlocksURL) String() string { @@ -170,7 +178,7 @@ func (*DarksideBlocksURL) ProtoMessage() {} func (x *DarksideBlocksURL) ProtoReflect() protoreflect.Message { mi := &file_darkside_proto_msgTypes[2] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -196,18 +204,21 @@ func (x *DarksideBlocksURL) GetUrl() string { // of hex-encoded transactions, one per line, that are to be associated // with the given height (fake-mined into the block at that height) type DarksideTransactionsURL struct { - state protoimpl.MessageState `protogen:"open.v1"` - Height int32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Height int32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` } func (x *DarksideTransactionsURL) Reset() { *x = DarksideTransactionsURL{} - mi := &file_darkside_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_darkside_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DarksideTransactionsURL) String() string { @@ -218,7 +229,7 @@ func (*DarksideTransactionsURL) ProtoMessage() {} func (x *DarksideTransactionsURL) ProtoReflect() protoreflect.Message { mi := &file_darkside_proto_msgTypes[3] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -248,17 +259,20 @@ func (x *DarksideTransactionsURL) GetUrl() string { } type DarksideHeight struct { - state protoimpl.MessageState `protogen:"open.v1"` - Height int32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Height int32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` } func (x *DarksideHeight) Reset() { *x = DarksideHeight{} - mi := &file_darkside_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_darkside_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DarksideHeight) String() string { @@ -269,7 +283,7 @@ func (*DarksideHeight) ProtoMessage() {} func (x *DarksideHeight) ProtoReflect() protoreflect.Message { mi := &file_darkside_proto_msgTypes[4] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -292,19 +306,22 @@ func (x *DarksideHeight) GetHeight() int32 { } type DarksideEmptyBlocks struct { - state protoimpl.MessageState `protogen:"open.v1"` - Height int32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - Nonce int32 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` - Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` - unknownFields protoimpl.UnknownFields + state protoimpl.MessageState sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Height int32 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` + Nonce int32 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"` + Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` } func (x *DarksideEmptyBlocks) Reset() { *x = DarksideEmptyBlocks{} - mi := &file_darkside_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_darkside_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DarksideEmptyBlocks) String() string { @@ -315,7 +332,7 @@ func (*DarksideEmptyBlocks) ProtoMessage() {} func (x *DarksideEmptyBlocks) ProtoReflect() protoreflect.Message { mi := &file_darkside_proto_msgTypes[5] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -352,19 +369,22 @@ func (x *DarksideEmptyBlocks) GetCount() int32 { } type DarksideSubtreeRoots struct { - state protoimpl.MessageState `protogen:"open.v1"` - ShieldedProtocol ShieldedProtocol `protobuf:"varint,1,opt,name=shieldedProtocol,proto3,enum=cash.z.wallet.sdk.rpc.ShieldedProtocol" json:"shieldedProtocol,omitempty"` - StartIndex uint32 `protobuf:"varint,2,opt,name=startIndex,proto3" json:"startIndex,omitempty"` - SubtreeRoots []*SubtreeRoot `protobuf:"bytes,3,rep,name=subtreeRoots,proto3" json:"subtreeRoots,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ShieldedProtocol ShieldedProtocol `protobuf:"varint,1,opt,name=shieldedProtocol,proto3,enum=cash.z.wallet.sdk.rpc.ShieldedProtocol" json:"shieldedProtocol,omitempty"` + StartIndex uint32 `protobuf:"varint,2,opt,name=startIndex,proto3" json:"startIndex,omitempty"` + SubtreeRoots []*SubtreeRoot `protobuf:"bytes,3,rep,name=subtreeRoots,proto3" json:"subtreeRoots,omitempty"` } func (x *DarksideSubtreeRoots) Reset() { *x = DarksideSubtreeRoots{} - mi := &file_darkside_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) + if protoimpl.UnsafeEnabled { + mi := &file_darkside_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } func (x *DarksideSubtreeRoots) String() string { @@ -375,7 +395,7 @@ func (*DarksideSubtreeRoots) ProtoMessage() {} func (x *DarksideSubtreeRoots) ProtoReflect() protoreflect.Message { mi := &file_darkside_proto_msgTypes[6] - if x != nil { + if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) @@ -411,120 +431,308 @@ func (x *DarksideSubtreeRoots) GetSubtreeRoots() []*SubtreeRoot { return nil } +type DarksideAddressTransaction struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` // t-address + Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // raw transaction bytes + Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` // block height where this tx was mined +} + +func (x *DarksideAddressTransaction) Reset() { + *x = DarksideAddressTransaction{} + if protoimpl.UnsafeEnabled { + mi := &file_darkside_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DarksideAddressTransaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DarksideAddressTransaction) ProtoMessage() {} + +func (x *DarksideAddressTransaction) ProtoReflect() protoreflect.Message { + mi := &file_darkside_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DarksideAddressTransaction.ProtoReflect.Descriptor instead. +func (*DarksideAddressTransaction) Descriptor() ([]byte, []int) { + return file_darkside_proto_rawDescGZIP(), []int{7} +} + +func (x *DarksideAddressTransaction) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *DarksideAddressTransaction) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *DarksideAddressTransaction) GetHeight() uint64 { + if x != nil { + return x.Height + } + return 0 +} + var File_darkside_proto protoreflect.FileDescriptor -const file_darkside_proto_rawDesc = "" + - "\n" + - "\x0edarkside.proto\x12\x15cash.z.wallet.sdk.rpc\x1a\rservice.proto\"\x8b\x02\n" + - "\x11DarksideMetaState\x12,\n" + - "\x11saplingActivation\x18\x01 \x01(\x05R\x11saplingActivation\x12\x1a\n" + - "\bbranchID\x18\x02 \x01(\tR\bbranchID\x12\x1c\n" + - "\tchainName\x18\x03 \x01(\tR\tchainName\x12F\n" + - "\x1estartSaplingCommitmentTreeSize\x18\x04 \x01(\rR\x1estartSaplingCommitmentTreeSize\x12F\n" + - "\x1estartOrchardCommitmentTreeSize\x18\x05 \x01(\rR\x1estartOrchardCommitmentTreeSize\"%\n" + - "\rDarksideBlock\x12\x14\n" + - "\x05block\x18\x01 \x01(\tR\x05block\"%\n" + - "\x11DarksideBlocksURL\x12\x10\n" + - "\x03url\x18\x01 \x01(\tR\x03url\"C\n" + - "\x17DarksideTransactionsURL\x12\x16\n" + - "\x06height\x18\x01 \x01(\x05R\x06height\x12\x10\n" + - "\x03url\x18\x02 \x01(\tR\x03url\"(\n" + - "\x0eDarksideHeight\x12\x16\n" + - "\x06height\x18\x01 \x01(\x05R\x06height\"Y\n" + - "\x13DarksideEmptyBlocks\x12\x16\n" + - "\x06height\x18\x01 \x01(\x05R\x06height\x12\x14\n" + - "\x05nonce\x18\x02 \x01(\x05R\x05nonce\x12\x14\n" + - "\x05count\x18\x03 \x01(\x05R\x05count\"\xd3\x01\n" + - "\x14DarksideSubtreeRoots\x12S\n" + - "\x10shieldedProtocol\x18\x01 \x01(\x0e2'.cash.z.wallet.sdk.rpc.ShieldedProtocolR\x10shieldedProtocol\x12\x1e\n" + - "\n" + - "startIndex\x18\x02 \x01(\rR\n" + - "startIndex\x12F\n" + - "\fsubtreeRoots\x18\x03 \x03(\v2\".cash.z.wallet.sdk.rpc.SubtreeRootR\fsubtreeRoots2\xaa\v\n" + - "\x10DarksideStreamer\x12Q\n" + - "\x05Reset\x12(.cash.z.wallet.sdk.rpc.DarksideMetaState\x1a\x1c.cash.z.wallet.sdk.rpc.Empty\"\x00\x12[\n" + - "\x11StageBlocksStream\x12$.cash.z.wallet.sdk.rpc.DarksideBlock\x1a\x1c.cash.z.wallet.sdk.rpc.Empty\"\x00(\x01\x12W\n" + - "\vStageBlocks\x12(.cash.z.wallet.sdk.rpc.DarksideBlocksURL\x1a\x1c.cash.z.wallet.sdk.rpc.Empty\"\x00\x12_\n" + - "\x11StageBlocksCreate\x12*.cash.z.wallet.sdk.rpc.DarksideEmptyBlocks\x1a\x1c.cash.z.wallet.sdk.rpc.Empty\"\x00\x12b\n" + - "\x17StageTransactionsStream\x12%.cash.z.wallet.sdk.rpc.RawTransaction\x1a\x1c.cash.z.wallet.sdk.rpc.Empty\"\x00(\x01\x12c\n" + - "\x11StageTransactions\x12..cash.z.wallet.sdk.rpc.DarksideTransactionsURL\x1a\x1c.cash.z.wallet.sdk.rpc.Empty\"\x00\x12T\n" + - "\vApplyStaged\x12%.cash.z.wallet.sdk.rpc.DarksideHeight\x1a\x1c.cash.z.wallet.sdk.rpc.Empty\"\x00\x12b\n" + - "\x17GetIncomingTransactions\x12\x1c.cash.z.wallet.sdk.rpc.Empty\x1a%.cash.z.wallet.sdk.rpc.RawTransaction\"\x000\x01\x12Y\n" + - "\x19ClearIncomingTransactions\x12\x1c.cash.z.wallet.sdk.rpc.Empty\x1a\x1c.cash.z.wallet.sdk.rpc.Empty\"\x00\x12]\n" + - "\x0eAddAddressUtxo\x12+.cash.z.wallet.sdk.rpc.GetAddressUtxosReply\x1a\x1c.cash.z.wallet.sdk.rpc.Empty\"\x00\x12P\n" + - "\x10ClearAddressUtxo\x12\x1c.cash.z.wallet.sdk.rpc.Empty\x1a\x1c.cash.z.wallet.sdk.rpc.Empty\"\x00\x12P\n" + - "\fAddTreeState\x12 .cash.z.wallet.sdk.rpc.TreeState\x1a\x1c.cash.z.wallet.sdk.rpc.Empty\"\x00\x12Q\n" + - "\x0fRemoveTreeState\x12\x1e.cash.z.wallet.sdk.rpc.BlockID\x1a\x1c.cash.z.wallet.sdk.rpc.Empty\"\x00\x12R\n" + - "\x12ClearAllTreeStates\x12\x1c.cash.z.wallet.sdk.rpc.Empty\x1a\x1c.cash.z.wallet.sdk.rpc.Empty\"\x00\x12^\n" + - "\x0fSetSubtreeRoots\x12+.cash.z.wallet.sdk.rpc.DarksideSubtreeRoots\x1a\x1c.cash.z.wallet.sdk.rpc.Empty\"\x00\x12D\n" + - "\x04Stop\x12\x1c.cash.z.wallet.sdk.rpc.Empty\x1a\x1c.cash.z.wallet.sdk.rpc.Empty\"\x00B\x1bZ\x16lightwalletd/walletrpc\xba\x02\x00b\x06proto3" +var file_darkside_proto_rawDesc = []byte{ + 0x0a, 0x0e, 0x64, 0x61, 0x72, 0x6b, 0x73, 0x69, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x12, 0x15, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, + 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x1a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8b, 0x02, 0x0a, 0x11, 0x44, 0x61, 0x72, 0x6b, 0x73, + 0x69, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x11, + 0x73, 0x61, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x73, 0x61, 0x70, 0x6c, 0x69, 0x6e, 0x67, + 0x41, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x62, 0x72, + 0x61, 0x6e, 0x63, 0x68, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x72, + 0x61, 0x6e, 0x63, 0x68, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x1e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x61, 0x70, + 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x72, + 0x65, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x1e, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x53, 0x61, 0x70, 0x6c, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, + 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x65, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x46, 0x0a, 0x1e, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x4f, 0x72, 0x63, 0x68, 0x61, 0x72, 0x64, 0x43, 0x6f, 0x6d, 0x6d, + 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x65, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x1e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4f, 0x72, 0x63, 0x68, 0x61, + 0x72, 0x64, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x72, 0x65, 0x65, + 0x53, 0x69, 0x7a, 0x65, 0x22, 0x25, 0x0a, 0x0d, 0x44, 0x61, 0x72, 0x6b, 0x73, 0x69, 0x64, 0x65, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x25, 0x0a, 0x11, 0x44, + 0x61, 0x72, 0x6b, 0x73, 0x69, 0x64, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x55, 0x52, 0x4c, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x72, 0x6c, 0x22, 0x43, 0x0a, 0x17, 0x44, 0x61, 0x72, 0x6b, 0x73, 0x69, 0x64, 0x65, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x55, 0x52, 0x4c, 0x12, 0x16, 0x0a, + 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0x28, 0x0a, 0x0e, 0x44, 0x61, 0x72, 0x6b, 0x73, + 0x69, 0x64, 0x65, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, + 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x22, 0x59, 0x0a, 0x13, 0x44, 0x61, 0x72, 0x6b, 0x73, 0x69, 0x64, 0x65, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xd3, 0x01, 0x0a, + 0x14, 0x44, 0x61, 0x72, 0x6b, 0x73, 0x69, 0x64, 0x65, 0x53, 0x75, 0x62, 0x74, 0x72, 0x65, 0x65, + 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x53, 0x0a, 0x10, 0x73, 0x68, 0x69, 0x65, 0x6c, 0x64, 0x65, + 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x27, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, + 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x68, 0x69, 0x65, 0x6c, 0x64, 0x65, 0x64, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x10, 0x73, 0x68, 0x69, 0x65, 0x6c, 0x64, + 0x65, 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x46, 0x0a, 0x0c, 0x73, 0x75, + 0x62, 0x74, 0x72, 0x65, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x74, 0x72, 0x65, 0x65, + 0x52, 0x6f, 0x6f, 0x74, 0x52, 0x0c, 0x73, 0x75, 0x62, 0x74, 0x72, 0x65, 0x65, 0x52, 0x6f, 0x6f, + 0x74, 0x73, 0x22, 0x62, 0x0a, 0x1a, 0x44, 0x61, 0x72, 0x6b, 0x73, 0x69, 0x64, 0x65, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x16, + 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x32, 0xf0, 0x0c, 0x0a, 0x10, 0x44, 0x61, 0x72, 0x6b, 0x73, + 0x69, 0x64, 0x65, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x05, 0x52, + 0x65, 0x73, 0x65, 0x74, 0x12, 0x28, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x72, + 0x6b, 0x73, 0x69, 0x64, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x1c, + 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, + 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x5b, + 0x0a, 0x11, 0x53, 0x74, 0x61, 0x67, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x12, 0x24, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x72, 0x6b, + 0x73, 0x69, 0x64, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x1c, 0x2e, 0x63, 0x61, 0x73, 0x68, + 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, + 0x63, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x28, 0x01, 0x12, 0x57, 0x0a, 0x0b, 0x53, + 0x74, 0x61, 0x67, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x28, 0x2e, 0x63, 0x61, 0x73, + 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, + 0x70, 0x63, 0x2e, 0x44, 0x61, 0x72, 0x6b, 0x73, 0x69, 0x64, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x73, 0x55, 0x52, 0x4c, 0x1a, 0x1c, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x00, 0x12, 0x5f, 0x0a, 0x11, 0x53, 0x74, 0x61, 0x67, 0x65, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x73, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x2a, 0x2e, 0x63, 0x61, 0x73, 0x68, + 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, + 0x63, 0x2e, 0x44, 0x61, 0x72, 0x6b, 0x73, 0x69, 0x64, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x1a, 0x1c, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x67, 0x65, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, + 0x12, 0x25, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x1c, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, + 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x28, 0x01, 0x12, 0x63, 0x0a, 0x11, 0x53, 0x74, 0x61, + 0x67, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2e, + 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, + 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x72, 0x6b, 0x73, 0x69, 0x64, 0x65, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x55, 0x52, 0x4c, 0x1a, 0x1c, + 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, + 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x54, + 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x6c, 0x79, 0x53, 0x74, 0x61, 0x67, 0x65, 0x64, 0x12, 0x25, 0x2e, + 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, + 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x72, 0x6b, 0x73, 0x69, 0x64, 0x65, 0x48, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x1a, 0x1c, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x00, 0x12, 0x62, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x63, 0x6f, 0x6d, + 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x1c, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, + 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x25, 0x2e, + 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, + 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x61, 0x77, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x30, 0x01, 0x12, 0x59, 0x0a, 0x19, 0x43, 0x6c, 0x65, 0x61, + 0x72, 0x49, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x55, 0x74, 0x78, 0x6f, 0x12, 0x2b, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x55, 0x74, 0x78, 0x6f, 0x73, 0x52, 0x65, 0x70, + 0x6c, 0x79, 0x1a, 0x1c, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x00, 0x12, 0x50, 0x0a, 0x10, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x55, 0x74, 0x78, 0x6f, 0x12, 0x1c, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, + 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x15, 0x41, 0x64, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x2e, + 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, + 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x61, 0x72, 0x6b, 0x73, 0x69, 0x64, 0x65, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x1a, 0x1c, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, + 0x12, 0x58, 0x0a, 0x18, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x2e, 0x63, + 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x63, 0x61, 0x73, + 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, + 0x70, 0x63, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0c, 0x41, 0x64, + 0x64, 0x54, 0x72, 0x65, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x20, 0x2e, 0x63, 0x61, 0x73, + 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, + 0x70, 0x63, 0x2e, 0x54, 0x72, 0x65, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x1c, 0x2e, 0x63, + 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0f, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x54, 0x72, 0x65, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x1e, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, + 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x1a, + 0x1c, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, + 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, + 0x52, 0x0a, 0x12, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x41, 0x6c, 0x6c, 0x54, 0x72, 0x65, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x00, 0x12, 0x5e, 0x0a, 0x0f, 0x53, 0x65, 0x74, 0x53, 0x75, 0x62, 0x74, 0x72, 0x65, + 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x73, 0x12, 0x2b, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, + 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x44, + 0x61, 0x72, 0x6b, 0x73, 0x69, 0x64, 0x65, 0x53, 0x75, 0x62, 0x74, 0x72, 0x65, 0x65, 0x52, 0x6f, + 0x6f, 0x74, 0x73, 0x1a, 0x1c, 0x2e, 0x63, 0x61, 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x04, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x1c, 0x2e, 0x63, 0x61, + 0x73, 0x68, 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, + 0x72, 0x70, 0x63, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x63, 0x61, 0x73, 0x68, + 0x2e, 0x7a, 0x2e, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x2e, 0x73, 0x64, 0x6b, 0x2e, 0x72, 0x70, + 0x63, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x42, 0x1b, 0x5a, 0x16, 0x6c, 0x69, 0x67, + 0x68, 0x74, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x64, 0x2f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x72, 0x70, 0x63, 0xba, 0x02, 0x00, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} var ( file_darkside_proto_rawDescOnce sync.Once - file_darkside_proto_rawDescData []byte + file_darkside_proto_rawDescData = file_darkside_proto_rawDesc ) func file_darkside_proto_rawDescGZIP() []byte { file_darkside_proto_rawDescOnce.Do(func() { - file_darkside_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_darkside_proto_rawDesc), len(file_darkside_proto_rawDesc))) + file_darkside_proto_rawDescData = protoimpl.X.CompressGZIP(file_darkside_proto_rawDescData) }) return file_darkside_proto_rawDescData } -var file_darkside_proto_msgTypes = make([]protoimpl.MessageInfo, 7) -var file_darkside_proto_goTypes = []any{ - (*DarksideMetaState)(nil), // 0: cash.z.wallet.sdk.rpc.DarksideMetaState - (*DarksideBlock)(nil), // 1: cash.z.wallet.sdk.rpc.DarksideBlock - (*DarksideBlocksURL)(nil), // 2: cash.z.wallet.sdk.rpc.DarksideBlocksURL - (*DarksideTransactionsURL)(nil), // 3: cash.z.wallet.sdk.rpc.DarksideTransactionsURL - (*DarksideHeight)(nil), // 4: cash.z.wallet.sdk.rpc.DarksideHeight - (*DarksideEmptyBlocks)(nil), // 5: cash.z.wallet.sdk.rpc.DarksideEmptyBlocks - (*DarksideSubtreeRoots)(nil), // 6: cash.z.wallet.sdk.rpc.DarksideSubtreeRoots - (ShieldedProtocol)(0), // 7: cash.z.wallet.sdk.rpc.ShieldedProtocol - (*SubtreeRoot)(nil), // 8: cash.z.wallet.sdk.rpc.SubtreeRoot - (*RawTransaction)(nil), // 9: cash.z.wallet.sdk.rpc.RawTransaction - (*Empty)(nil), // 10: cash.z.wallet.sdk.rpc.Empty - (*GetAddressUtxosReply)(nil), // 11: cash.z.wallet.sdk.rpc.GetAddressUtxosReply - (*TreeState)(nil), // 12: cash.z.wallet.sdk.rpc.TreeState - (*BlockID)(nil), // 13: cash.z.wallet.sdk.rpc.BlockID +var file_darkside_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_darkside_proto_goTypes = []interface{}{ + (*DarksideMetaState)(nil), // 0: cash.z.wallet.sdk.rpc.DarksideMetaState + (*DarksideBlock)(nil), // 1: cash.z.wallet.sdk.rpc.DarksideBlock + (*DarksideBlocksURL)(nil), // 2: cash.z.wallet.sdk.rpc.DarksideBlocksURL + (*DarksideTransactionsURL)(nil), // 3: cash.z.wallet.sdk.rpc.DarksideTransactionsURL + (*DarksideHeight)(nil), // 4: cash.z.wallet.sdk.rpc.DarksideHeight + (*DarksideEmptyBlocks)(nil), // 5: cash.z.wallet.sdk.rpc.DarksideEmptyBlocks + (*DarksideSubtreeRoots)(nil), // 6: cash.z.wallet.sdk.rpc.DarksideSubtreeRoots + (*DarksideAddressTransaction)(nil), // 7: cash.z.wallet.sdk.rpc.DarksideAddressTransaction + (ShieldedProtocol)(0), // 8: cash.z.wallet.sdk.rpc.ShieldedProtocol + (*SubtreeRoot)(nil), // 9: cash.z.wallet.sdk.rpc.SubtreeRoot + (*RawTransaction)(nil), // 10: cash.z.wallet.sdk.rpc.RawTransaction + (*Empty)(nil), // 11: cash.z.wallet.sdk.rpc.Empty + (*GetAddressUtxosReply)(nil), // 12: cash.z.wallet.sdk.rpc.GetAddressUtxosReply + (*TreeState)(nil), // 13: cash.z.wallet.sdk.rpc.TreeState + (*BlockID)(nil), // 14: cash.z.wallet.sdk.rpc.BlockID } var file_darkside_proto_depIdxs = []int32{ - 7, // 0: cash.z.wallet.sdk.rpc.DarksideSubtreeRoots.shieldedProtocol:type_name -> cash.z.wallet.sdk.rpc.ShieldedProtocol - 8, // 1: cash.z.wallet.sdk.rpc.DarksideSubtreeRoots.subtreeRoots:type_name -> cash.z.wallet.sdk.rpc.SubtreeRoot + 8, // 0: cash.z.wallet.sdk.rpc.DarksideSubtreeRoots.shieldedProtocol:type_name -> cash.z.wallet.sdk.rpc.ShieldedProtocol + 9, // 1: cash.z.wallet.sdk.rpc.DarksideSubtreeRoots.subtreeRoots:type_name -> cash.z.wallet.sdk.rpc.SubtreeRoot 0, // 2: cash.z.wallet.sdk.rpc.DarksideStreamer.Reset:input_type -> cash.z.wallet.sdk.rpc.DarksideMetaState 1, // 3: cash.z.wallet.sdk.rpc.DarksideStreamer.StageBlocksStream:input_type -> cash.z.wallet.sdk.rpc.DarksideBlock 2, // 4: cash.z.wallet.sdk.rpc.DarksideStreamer.StageBlocks:input_type -> cash.z.wallet.sdk.rpc.DarksideBlocksURL 5, // 5: cash.z.wallet.sdk.rpc.DarksideStreamer.StageBlocksCreate:input_type -> cash.z.wallet.sdk.rpc.DarksideEmptyBlocks - 9, // 6: cash.z.wallet.sdk.rpc.DarksideStreamer.StageTransactionsStream:input_type -> cash.z.wallet.sdk.rpc.RawTransaction + 10, // 6: cash.z.wallet.sdk.rpc.DarksideStreamer.StageTransactionsStream:input_type -> cash.z.wallet.sdk.rpc.RawTransaction 3, // 7: cash.z.wallet.sdk.rpc.DarksideStreamer.StageTransactions:input_type -> cash.z.wallet.sdk.rpc.DarksideTransactionsURL 4, // 8: cash.z.wallet.sdk.rpc.DarksideStreamer.ApplyStaged:input_type -> cash.z.wallet.sdk.rpc.DarksideHeight - 10, // 9: cash.z.wallet.sdk.rpc.DarksideStreamer.GetIncomingTransactions:input_type -> cash.z.wallet.sdk.rpc.Empty - 10, // 10: cash.z.wallet.sdk.rpc.DarksideStreamer.ClearIncomingTransactions:input_type -> cash.z.wallet.sdk.rpc.Empty - 11, // 11: cash.z.wallet.sdk.rpc.DarksideStreamer.AddAddressUtxo:input_type -> cash.z.wallet.sdk.rpc.GetAddressUtxosReply - 10, // 12: cash.z.wallet.sdk.rpc.DarksideStreamer.ClearAddressUtxo:input_type -> cash.z.wallet.sdk.rpc.Empty - 12, // 13: cash.z.wallet.sdk.rpc.DarksideStreamer.AddTreeState:input_type -> cash.z.wallet.sdk.rpc.TreeState - 13, // 14: cash.z.wallet.sdk.rpc.DarksideStreamer.RemoveTreeState:input_type -> cash.z.wallet.sdk.rpc.BlockID - 10, // 15: cash.z.wallet.sdk.rpc.DarksideStreamer.ClearAllTreeStates:input_type -> cash.z.wallet.sdk.rpc.Empty - 6, // 16: cash.z.wallet.sdk.rpc.DarksideStreamer.SetSubtreeRoots:input_type -> cash.z.wallet.sdk.rpc.DarksideSubtreeRoots - 10, // 17: cash.z.wallet.sdk.rpc.DarksideStreamer.Stop:input_type -> cash.z.wallet.sdk.rpc.Empty - 10, // 18: cash.z.wallet.sdk.rpc.DarksideStreamer.Reset:output_type -> cash.z.wallet.sdk.rpc.Empty - 10, // 19: cash.z.wallet.sdk.rpc.DarksideStreamer.StageBlocksStream:output_type -> cash.z.wallet.sdk.rpc.Empty - 10, // 20: cash.z.wallet.sdk.rpc.DarksideStreamer.StageBlocks:output_type -> cash.z.wallet.sdk.rpc.Empty - 10, // 21: cash.z.wallet.sdk.rpc.DarksideStreamer.StageBlocksCreate:output_type -> cash.z.wallet.sdk.rpc.Empty - 10, // 22: cash.z.wallet.sdk.rpc.DarksideStreamer.StageTransactionsStream:output_type -> cash.z.wallet.sdk.rpc.Empty - 10, // 23: cash.z.wallet.sdk.rpc.DarksideStreamer.StageTransactions:output_type -> cash.z.wallet.sdk.rpc.Empty - 10, // 24: cash.z.wallet.sdk.rpc.DarksideStreamer.ApplyStaged:output_type -> cash.z.wallet.sdk.rpc.Empty - 9, // 25: cash.z.wallet.sdk.rpc.DarksideStreamer.GetIncomingTransactions:output_type -> cash.z.wallet.sdk.rpc.RawTransaction - 10, // 26: cash.z.wallet.sdk.rpc.DarksideStreamer.ClearIncomingTransactions:output_type -> cash.z.wallet.sdk.rpc.Empty - 10, // 27: cash.z.wallet.sdk.rpc.DarksideStreamer.AddAddressUtxo:output_type -> cash.z.wallet.sdk.rpc.Empty - 10, // 28: cash.z.wallet.sdk.rpc.DarksideStreamer.ClearAddressUtxo:output_type -> cash.z.wallet.sdk.rpc.Empty - 10, // 29: cash.z.wallet.sdk.rpc.DarksideStreamer.AddTreeState:output_type -> cash.z.wallet.sdk.rpc.Empty - 10, // 30: cash.z.wallet.sdk.rpc.DarksideStreamer.RemoveTreeState:output_type -> cash.z.wallet.sdk.rpc.Empty - 10, // 31: cash.z.wallet.sdk.rpc.DarksideStreamer.ClearAllTreeStates:output_type -> cash.z.wallet.sdk.rpc.Empty - 10, // 32: cash.z.wallet.sdk.rpc.DarksideStreamer.SetSubtreeRoots:output_type -> cash.z.wallet.sdk.rpc.Empty - 10, // 33: cash.z.wallet.sdk.rpc.DarksideStreamer.Stop:output_type -> cash.z.wallet.sdk.rpc.Empty - 18, // [18:34] is the sub-list for method output_type - 2, // [2:18] is the sub-list for method input_type + 11, // 9: cash.z.wallet.sdk.rpc.DarksideStreamer.GetIncomingTransactions:input_type -> cash.z.wallet.sdk.rpc.Empty + 11, // 10: cash.z.wallet.sdk.rpc.DarksideStreamer.ClearIncomingTransactions:input_type -> cash.z.wallet.sdk.rpc.Empty + 12, // 11: cash.z.wallet.sdk.rpc.DarksideStreamer.AddAddressUtxo:input_type -> cash.z.wallet.sdk.rpc.GetAddressUtxosReply + 11, // 12: cash.z.wallet.sdk.rpc.DarksideStreamer.ClearAddressUtxo:input_type -> cash.z.wallet.sdk.rpc.Empty + 7, // 13: cash.z.wallet.sdk.rpc.DarksideStreamer.AddAddressTransaction:input_type -> cash.z.wallet.sdk.rpc.DarksideAddressTransaction + 11, // 14: cash.z.wallet.sdk.rpc.DarksideStreamer.ClearAddressTransactions:input_type -> cash.z.wallet.sdk.rpc.Empty + 13, // 15: cash.z.wallet.sdk.rpc.DarksideStreamer.AddTreeState:input_type -> cash.z.wallet.sdk.rpc.TreeState + 14, // 16: cash.z.wallet.sdk.rpc.DarksideStreamer.RemoveTreeState:input_type -> cash.z.wallet.sdk.rpc.BlockID + 11, // 17: cash.z.wallet.sdk.rpc.DarksideStreamer.ClearAllTreeStates:input_type -> cash.z.wallet.sdk.rpc.Empty + 6, // 18: cash.z.wallet.sdk.rpc.DarksideStreamer.SetSubtreeRoots:input_type -> cash.z.wallet.sdk.rpc.DarksideSubtreeRoots + 11, // 19: cash.z.wallet.sdk.rpc.DarksideStreamer.Stop:input_type -> cash.z.wallet.sdk.rpc.Empty + 11, // 20: cash.z.wallet.sdk.rpc.DarksideStreamer.Reset:output_type -> cash.z.wallet.sdk.rpc.Empty + 11, // 21: cash.z.wallet.sdk.rpc.DarksideStreamer.StageBlocksStream:output_type -> cash.z.wallet.sdk.rpc.Empty + 11, // 22: cash.z.wallet.sdk.rpc.DarksideStreamer.StageBlocks:output_type -> cash.z.wallet.sdk.rpc.Empty + 11, // 23: cash.z.wallet.sdk.rpc.DarksideStreamer.StageBlocksCreate:output_type -> cash.z.wallet.sdk.rpc.Empty + 11, // 24: cash.z.wallet.sdk.rpc.DarksideStreamer.StageTransactionsStream:output_type -> cash.z.wallet.sdk.rpc.Empty + 11, // 25: cash.z.wallet.sdk.rpc.DarksideStreamer.StageTransactions:output_type -> cash.z.wallet.sdk.rpc.Empty + 11, // 26: cash.z.wallet.sdk.rpc.DarksideStreamer.ApplyStaged:output_type -> cash.z.wallet.sdk.rpc.Empty + 10, // 27: cash.z.wallet.sdk.rpc.DarksideStreamer.GetIncomingTransactions:output_type -> cash.z.wallet.sdk.rpc.RawTransaction + 11, // 28: cash.z.wallet.sdk.rpc.DarksideStreamer.ClearIncomingTransactions:output_type -> cash.z.wallet.sdk.rpc.Empty + 11, // 29: cash.z.wallet.sdk.rpc.DarksideStreamer.AddAddressUtxo:output_type -> cash.z.wallet.sdk.rpc.Empty + 11, // 30: cash.z.wallet.sdk.rpc.DarksideStreamer.ClearAddressUtxo:output_type -> cash.z.wallet.sdk.rpc.Empty + 11, // 31: cash.z.wallet.sdk.rpc.DarksideStreamer.AddAddressTransaction:output_type -> cash.z.wallet.sdk.rpc.Empty + 11, // 32: cash.z.wallet.sdk.rpc.DarksideStreamer.ClearAddressTransactions:output_type -> cash.z.wallet.sdk.rpc.Empty + 11, // 33: cash.z.wallet.sdk.rpc.DarksideStreamer.AddTreeState:output_type -> cash.z.wallet.sdk.rpc.Empty + 11, // 34: cash.z.wallet.sdk.rpc.DarksideStreamer.RemoveTreeState:output_type -> cash.z.wallet.sdk.rpc.Empty + 11, // 35: cash.z.wallet.sdk.rpc.DarksideStreamer.ClearAllTreeStates:output_type -> cash.z.wallet.sdk.rpc.Empty + 11, // 36: cash.z.wallet.sdk.rpc.DarksideStreamer.SetSubtreeRoots:output_type -> cash.z.wallet.sdk.rpc.Empty + 11, // 37: cash.z.wallet.sdk.rpc.DarksideStreamer.Stop:output_type -> cash.z.wallet.sdk.rpc.Empty + 20, // [20:38] is the sub-list for method output_type + 2, // [2:20] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name @@ -536,13 +744,111 @@ func file_darkside_proto_init() { return } file_service_proto_init() + if !protoimpl.UnsafeEnabled { + file_darkside_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DarksideMetaState); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_darkside_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DarksideBlock); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_darkside_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DarksideBlocksURL); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_darkside_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DarksideTransactionsURL); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_darkside_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DarksideHeight); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_darkside_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DarksideEmptyBlocks); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_darkside_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DarksideSubtreeRoots); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_darkside_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DarksideAddressTransaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_darkside_proto_rawDesc), len(file_darkside_proto_rawDesc)), + RawDescriptor: file_darkside_proto_rawDesc, NumEnums: 0, - NumMessages: 7, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, @@ -551,6 +857,7 @@ func file_darkside_proto_init() { MessageInfos: file_darkside_proto_msgTypes, }.Build() File_darkside_proto = out.File + file_darkside_proto_rawDesc = nil file_darkside_proto_goTypes = nil file_darkside_proto_depIdxs = nil } diff --git a/walletrpc/darkside.proto b/walletrpc/darkside.proto index 02a8855d..def599a8 100644 --- a/walletrpc/darkside.proto +++ b/walletrpc/darkside.proto @@ -51,6 +51,12 @@ message DarksideSubtreeRoots { repeated SubtreeRoot subtreeRoots = 3; } +message DarksideAddressTransaction { + string address = 1; // t-address + bytes data = 2; // raw transaction bytes + uint64 height = 3; // block height where this tx was mined +} + // Darksidewalletd maintains two staging areas, blocks and transactions. The // Stage*() gRPCs add items to the staging area; ApplyStaged() "applies" everything // in the staging area to the working (operational) state that the mock zcashd @@ -130,6 +136,12 @@ service DarksideStreamer { // Clear the list of GetAddressUtxos entries (can't fail) rpc ClearAddressUtxo(Empty) returns (Empty) {} + // Add a (address, transaction, height) entry to be returned by GetTaddressTransactions. + rpc AddAddressTransaction(DarksideAddressTransaction) returns (Empty) {} + + // Clear the list of address transaction entries (can't fail) + rpc ClearAddressTransactions(Empty) returns (Empty) {} + // Adds a GetTreeState to the tree state cache rpc AddTreeState(TreeState) returns (Empty) {} diff --git a/walletrpc/darkside_grpc.pb.go b/walletrpc/darkside_grpc.pb.go index 15adb9ea..7bcb1a1f 100644 --- a/walletrpc/darkside_grpc.pb.go +++ b/walletrpc/darkside_grpc.pb.go @@ -4,8 +4,8 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.6.0 -// - protoc v6.33.2 +// - protoc-gen-go-grpc v1.3.0 +// - protoc v6.33.4 // source: darkside.proto package walletrpc @@ -19,8 +19,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 const ( DarksideStreamer_Reset_FullMethodName = "/cash.z.wallet.sdk.rpc.DarksideStreamer/Reset" @@ -34,6 +34,8 @@ const ( DarksideStreamer_ClearIncomingTransactions_FullMethodName = "/cash.z.wallet.sdk.rpc.DarksideStreamer/ClearIncomingTransactions" DarksideStreamer_AddAddressUtxo_FullMethodName = "/cash.z.wallet.sdk.rpc.DarksideStreamer/AddAddressUtxo" DarksideStreamer_ClearAddressUtxo_FullMethodName = "/cash.z.wallet.sdk.rpc.DarksideStreamer/ClearAddressUtxo" + DarksideStreamer_AddAddressTransaction_FullMethodName = "/cash.z.wallet.sdk.rpc.DarksideStreamer/AddAddressTransaction" + DarksideStreamer_ClearAddressTransactions_FullMethodName = "/cash.z.wallet.sdk.rpc.DarksideStreamer/ClearAddressTransactions" DarksideStreamer_AddTreeState_FullMethodName = "/cash.z.wallet.sdk.rpc.DarksideStreamer/AddTreeState" DarksideStreamer_RemoveTreeState_FullMethodName = "/cash.z.wallet.sdk.rpc.DarksideStreamer/RemoveTreeState" DarksideStreamer_ClearAllTreeStates_FullMethodName = "/cash.z.wallet.sdk.rpc.DarksideStreamer/ClearAllTreeStates" @@ -44,11 +46,6 @@ const ( // DarksideStreamerClient is the client API for DarksideStreamer service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -// -// Darksidewalletd maintains two staging areas, blocks and transactions. The -// Stage*() gRPCs add items to the staging area; ApplyStaged() "applies" everything -// in the staging area to the working (operational) state that the mock zcashd -// serves; transactions are placed into their corresponding blocks (by height). type DarksideStreamerClient interface { // Reset reverts all darksidewalletd state (active block range, latest height, // staged blocks and transactions) and lightwalletd state (cache) to empty, @@ -61,7 +58,7 @@ type DarksideStreamerClient interface { // StageBlocksStream accepts a list of blocks and saves them into the blocks // staging area until ApplyStaged() is called; there is no immediate effect on // the mock zcashd. Blocks are hex-encoded. Order is important, see ApplyStaged. - StageBlocksStream(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[DarksideBlock, Empty], error) + StageBlocksStream(ctx context.Context, opts ...grpc.CallOption) (DarksideStreamer_StageBlocksStreamClient, error) // StageBlocks is the same as StageBlocksStream() except the blocks are fetched // from the given URL. Blocks are one per line, hex-encoded (not JSON). StageBlocks(ctx context.Context, in *DarksideBlocksURL, opts ...grpc.CallOption) (*Empty, error) @@ -76,7 +73,7 @@ type DarksideStreamerClient interface { // are not returned by the production GetTransaction() gRPC until they // appear in a "mined" block (contained in the active blockchain presented // by the mock zcashd). - StageTransactionsStream(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[RawTransaction, Empty], error) + StageTransactionsStream(ctx context.Context, opts ...grpc.CallOption) (DarksideStreamer_StageTransactionsStreamClient, error) // StageTransactions is the same except the transactions are fetched from // the given url. They are all staged into the block at the given height. // Staging transactions to different heights requires multiple calls. @@ -105,7 +102,7 @@ type DarksideStreamerClient interface { // been mined yet. The intention is that the transactions returned here can // then, for example, be given to StageTransactions() to get them "mined" // into a specified block on the next ApplyStaged(). - GetIncomingTransactions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[RawTransaction], error) + GetIncomingTransactions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (DarksideStreamer_GetIncomingTransactionsClient, error) // Clear the incoming transaction pool. ClearIncomingTransactions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) // Add a GetAddressUtxosReply entry to be returned by GetAddressUtxos(). @@ -113,6 +110,10 @@ type DarksideStreamerClient interface { AddAddressUtxo(ctx context.Context, in *GetAddressUtxosReply, opts ...grpc.CallOption) (*Empty, error) // Clear the list of GetAddressUtxos entries (can't fail) ClearAddressUtxo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) + // Add a (address, transaction, height) entry to be returned by GetTaddressTransactions. + AddAddressTransaction(ctx context.Context, in *DarksideAddressTransaction, opts ...grpc.CallOption) (*Empty, error) + // Clear the list of address transaction entries (can't fail) + ClearAddressTransactions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) // Adds a GetTreeState to the tree state cache AddTreeState(ctx context.Context, in *TreeState, opts ...grpc.CallOption) (*Empty, error) // Removes a GetTreeState for the given height from cache if present (can't fail) @@ -135,32 +136,51 @@ func NewDarksideStreamerClient(cc grpc.ClientConnInterface) DarksideStreamerClie } func (c *darksideStreamerClient) Reset(ctx context.Context, in *DarksideMetaState, opts ...grpc.CallOption) (*Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Empty) - err := c.cc.Invoke(ctx, DarksideStreamer_Reset_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, DarksideStreamer_Reset_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *darksideStreamerClient) StageBlocksStream(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[DarksideBlock, Empty], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &DarksideStreamer_ServiceDesc.Streams[0], DarksideStreamer_StageBlocksStream_FullMethodName, cOpts...) +func (c *darksideStreamerClient) StageBlocksStream(ctx context.Context, opts ...grpc.CallOption) (DarksideStreamer_StageBlocksStreamClient, error) { + stream, err := c.cc.NewStream(ctx, &DarksideStreamer_ServiceDesc.Streams[0], DarksideStreamer_StageBlocksStream_FullMethodName, opts...) if err != nil { return nil, err } - x := &grpc.GenericClientStream[DarksideBlock, Empty]{ClientStream: stream} + x := &darksideStreamerStageBlocksStreamClient{stream} return x, nil } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type DarksideStreamer_StageBlocksStreamClient = grpc.ClientStreamingClient[DarksideBlock, Empty] +type DarksideStreamer_StageBlocksStreamClient interface { + Send(*DarksideBlock) error + CloseAndRecv() (*Empty, error) + grpc.ClientStream +} + +type darksideStreamerStageBlocksStreamClient struct { + grpc.ClientStream +} + +func (x *darksideStreamerStageBlocksStreamClient) Send(m *DarksideBlock) error { + return x.ClientStream.SendMsg(m) +} + +func (x *darksideStreamerStageBlocksStreamClient) CloseAndRecv() (*Empty, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(Empty) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} func (c *darksideStreamerClient) StageBlocks(ctx context.Context, in *DarksideBlocksURL, opts ...grpc.CallOption) (*Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Empty) - err := c.cc.Invoke(ctx, DarksideStreamer_StageBlocks_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, DarksideStreamer_StageBlocks_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -168,32 +188,51 @@ func (c *darksideStreamerClient) StageBlocks(ctx context.Context, in *DarksideBl } func (c *darksideStreamerClient) StageBlocksCreate(ctx context.Context, in *DarksideEmptyBlocks, opts ...grpc.CallOption) (*Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Empty) - err := c.cc.Invoke(ctx, DarksideStreamer_StageBlocksCreate_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, DarksideStreamer_StageBlocksCreate_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *darksideStreamerClient) StageTransactionsStream(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[RawTransaction, Empty], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &DarksideStreamer_ServiceDesc.Streams[1], DarksideStreamer_StageTransactionsStream_FullMethodName, cOpts...) +func (c *darksideStreamerClient) StageTransactionsStream(ctx context.Context, opts ...grpc.CallOption) (DarksideStreamer_StageTransactionsStreamClient, error) { + stream, err := c.cc.NewStream(ctx, &DarksideStreamer_ServiceDesc.Streams[1], DarksideStreamer_StageTransactionsStream_FullMethodName, opts...) if err != nil { return nil, err } - x := &grpc.GenericClientStream[RawTransaction, Empty]{ClientStream: stream} + x := &darksideStreamerStageTransactionsStreamClient{stream} return x, nil } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type DarksideStreamer_StageTransactionsStreamClient = grpc.ClientStreamingClient[RawTransaction, Empty] +type DarksideStreamer_StageTransactionsStreamClient interface { + Send(*RawTransaction) error + CloseAndRecv() (*Empty, error) + grpc.ClientStream +} + +type darksideStreamerStageTransactionsStreamClient struct { + grpc.ClientStream +} + +func (x *darksideStreamerStageTransactionsStreamClient) Send(m *RawTransaction) error { + return x.ClientStream.SendMsg(m) +} + +func (x *darksideStreamerStageTransactionsStreamClient) CloseAndRecv() (*Empty, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(Empty) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} func (c *darksideStreamerClient) StageTransactions(ctx context.Context, in *DarksideTransactionsURL, opts ...grpc.CallOption) (*Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Empty) - err := c.cc.Invoke(ctx, DarksideStreamer_StageTransactions_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, DarksideStreamer_StageTransactions_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -201,22 +240,20 @@ func (c *darksideStreamerClient) StageTransactions(ctx context.Context, in *Dark } func (c *darksideStreamerClient) ApplyStaged(ctx context.Context, in *DarksideHeight, opts ...grpc.CallOption) (*Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Empty) - err := c.cc.Invoke(ctx, DarksideStreamer_ApplyStaged_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, DarksideStreamer_ApplyStaged_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *darksideStreamerClient) GetIncomingTransactions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (grpc.ServerStreamingClient[RawTransaction], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &DarksideStreamer_ServiceDesc.Streams[2], DarksideStreamer_GetIncomingTransactions_FullMethodName, cOpts...) +func (c *darksideStreamerClient) GetIncomingTransactions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (DarksideStreamer_GetIncomingTransactionsClient, error) { + stream, err := c.cc.NewStream(ctx, &DarksideStreamer_ServiceDesc.Streams[2], DarksideStreamer_GetIncomingTransactions_FullMethodName, opts...) if err != nil { return nil, err } - x := &grpc.GenericClientStream[Empty, RawTransaction]{ClientStream: stream} + x := &darksideStreamerGetIncomingTransactionsClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -226,13 +263,26 @@ func (c *darksideStreamerClient) GetIncomingTransactions(ctx context.Context, in return x, nil } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type DarksideStreamer_GetIncomingTransactionsClient = grpc.ServerStreamingClient[RawTransaction] +type DarksideStreamer_GetIncomingTransactionsClient interface { + Recv() (*RawTransaction, error) + grpc.ClientStream +} + +type darksideStreamerGetIncomingTransactionsClient struct { + grpc.ClientStream +} + +func (x *darksideStreamerGetIncomingTransactionsClient) Recv() (*RawTransaction, error) { + m := new(RawTransaction) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} func (c *darksideStreamerClient) ClearIncomingTransactions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Empty) - err := c.cc.Invoke(ctx, DarksideStreamer_ClearIncomingTransactions_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, DarksideStreamer_ClearIncomingTransactions_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -240,9 +290,8 @@ func (c *darksideStreamerClient) ClearIncomingTransactions(ctx context.Context, } func (c *darksideStreamerClient) AddAddressUtxo(ctx context.Context, in *GetAddressUtxosReply, opts ...grpc.CallOption) (*Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Empty) - err := c.cc.Invoke(ctx, DarksideStreamer_AddAddressUtxo_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, DarksideStreamer_AddAddressUtxo_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -250,9 +299,26 @@ func (c *darksideStreamerClient) AddAddressUtxo(ctx context.Context, in *GetAddr } func (c *darksideStreamerClient) ClearAddressUtxo(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Empty) - err := c.cc.Invoke(ctx, DarksideStreamer_ClearAddressUtxo_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, DarksideStreamer_ClearAddressUtxo_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *darksideStreamerClient) AddAddressTransaction(ctx context.Context, in *DarksideAddressTransaction, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, DarksideStreamer_AddAddressTransaction_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *darksideStreamerClient) ClearAddressTransactions(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { + out := new(Empty) + err := c.cc.Invoke(ctx, DarksideStreamer_ClearAddressTransactions_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -260,9 +326,8 @@ func (c *darksideStreamerClient) ClearAddressUtxo(ctx context.Context, in *Empty } func (c *darksideStreamerClient) AddTreeState(ctx context.Context, in *TreeState, opts ...grpc.CallOption) (*Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Empty) - err := c.cc.Invoke(ctx, DarksideStreamer_AddTreeState_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, DarksideStreamer_AddTreeState_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -270,9 +335,8 @@ func (c *darksideStreamerClient) AddTreeState(ctx context.Context, in *TreeState } func (c *darksideStreamerClient) RemoveTreeState(ctx context.Context, in *BlockID, opts ...grpc.CallOption) (*Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Empty) - err := c.cc.Invoke(ctx, DarksideStreamer_RemoveTreeState_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, DarksideStreamer_RemoveTreeState_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -280,9 +344,8 @@ func (c *darksideStreamerClient) RemoveTreeState(ctx context.Context, in *BlockI } func (c *darksideStreamerClient) ClearAllTreeStates(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Empty) - err := c.cc.Invoke(ctx, DarksideStreamer_ClearAllTreeStates_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, DarksideStreamer_ClearAllTreeStates_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -290,9 +353,8 @@ func (c *darksideStreamerClient) ClearAllTreeStates(ctx context.Context, in *Emp } func (c *darksideStreamerClient) SetSubtreeRoots(ctx context.Context, in *DarksideSubtreeRoots, opts ...grpc.CallOption) (*Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Empty) - err := c.cc.Invoke(ctx, DarksideStreamer_SetSubtreeRoots_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, DarksideStreamer_SetSubtreeRoots_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -300,9 +362,8 @@ func (c *darksideStreamerClient) SetSubtreeRoots(ctx context.Context, in *Darksi } func (c *darksideStreamerClient) Stop(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(Empty) - err := c.cc.Invoke(ctx, DarksideStreamer_Stop_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, DarksideStreamer_Stop_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -311,12 +372,7 @@ func (c *darksideStreamerClient) Stop(ctx context.Context, in *Empty, opts ...gr // DarksideStreamerServer is the server API for DarksideStreamer service. // All implementations must embed UnimplementedDarksideStreamerServer -// for forward compatibility. -// -// Darksidewalletd maintains two staging areas, blocks and transactions. The -// Stage*() gRPCs add items to the staging area; ApplyStaged() "applies" everything -// in the staging area to the working (operational) state that the mock zcashd -// serves; transactions are placed into their corresponding blocks (by height). +// for forward compatibility type DarksideStreamerServer interface { // Reset reverts all darksidewalletd state (active block range, latest height, // staged blocks and transactions) and lightwalletd state (cache) to empty, @@ -329,7 +385,7 @@ type DarksideStreamerServer interface { // StageBlocksStream accepts a list of blocks and saves them into the blocks // staging area until ApplyStaged() is called; there is no immediate effect on // the mock zcashd. Blocks are hex-encoded. Order is important, see ApplyStaged. - StageBlocksStream(grpc.ClientStreamingServer[DarksideBlock, Empty]) error + StageBlocksStream(DarksideStreamer_StageBlocksStreamServer) error // StageBlocks is the same as StageBlocksStream() except the blocks are fetched // from the given URL. Blocks are one per line, hex-encoded (not JSON). StageBlocks(context.Context, *DarksideBlocksURL) (*Empty, error) @@ -344,7 +400,7 @@ type DarksideStreamerServer interface { // are not returned by the production GetTransaction() gRPC until they // appear in a "mined" block (contained in the active blockchain presented // by the mock zcashd). - StageTransactionsStream(grpc.ClientStreamingServer[RawTransaction, Empty]) error + StageTransactionsStream(DarksideStreamer_StageTransactionsStreamServer) error // StageTransactions is the same except the transactions are fetched from // the given url. They are all staged into the block at the given height. // Staging transactions to different heights requires multiple calls. @@ -373,7 +429,7 @@ type DarksideStreamerServer interface { // been mined yet. The intention is that the transactions returned here can // then, for example, be given to StageTransactions() to get them "mined" // into a specified block on the next ApplyStaged(). - GetIncomingTransactions(*Empty, grpc.ServerStreamingServer[RawTransaction]) error + GetIncomingTransactions(*Empty, DarksideStreamer_GetIncomingTransactionsServer) error // Clear the incoming transaction pool. ClearIncomingTransactions(context.Context, *Empty) (*Empty, error) // Add a GetAddressUtxosReply entry to be returned by GetAddressUtxos(). @@ -381,6 +437,10 @@ type DarksideStreamerServer interface { AddAddressUtxo(context.Context, *GetAddressUtxosReply) (*Empty, error) // Clear the list of GetAddressUtxos entries (can't fail) ClearAddressUtxo(context.Context, *Empty) (*Empty, error) + // Add a (address, transaction, height) entry to be returned by GetTaddressTransactions. + AddAddressTransaction(context.Context, *DarksideAddressTransaction) (*Empty, error) + // Clear the list of address transaction entries (can't fail) + ClearAddressTransactions(context.Context, *Empty) (*Empty, error) // Adds a GetTreeState to the tree state cache AddTreeState(context.Context, *TreeState) (*Empty, error) // Removes a GetTreeState for the given height from cache if present (can't fail) @@ -395,63 +455,65 @@ type DarksideStreamerServer interface { mustEmbedUnimplementedDarksideStreamerServer() } -// UnimplementedDarksideStreamerServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedDarksideStreamerServer struct{} +// UnimplementedDarksideStreamerServer must be embedded to have forward compatible implementations. +type UnimplementedDarksideStreamerServer struct { +} func (UnimplementedDarksideStreamerServer) Reset(context.Context, *DarksideMetaState) (*Empty, error) { - return nil, status.Error(codes.Unimplemented, "method Reset not implemented") + return nil, status.Errorf(codes.Unimplemented, "method Reset not implemented") } -func (UnimplementedDarksideStreamerServer) StageBlocksStream(grpc.ClientStreamingServer[DarksideBlock, Empty]) error { - return status.Error(codes.Unimplemented, "method StageBlocksStream not implemented") +func (UnimplementedDarksideStreamerServer) StageBlocksStream(DarksideStreamer_StageBlocksStreamServer) error { + return status.Errorf(codes.Unimplemented, "method StageBlocksStream not implemented") } func (UnimplementedDarksideStreamerServer) StageBlocks(context.Context, *DarksideBlocksURL) (*Empty, error) { - return nil, status.Error(codes.Unimplemented, "method StageBlocks not implemented") + return nil, status.Errorf(codes.Unimplemented, "method StageBlocks not implemented") } func (UnimplementedDarksideStreamerServer) StageBlocksCreate(context.Context, *DarksideEmptyBlocks) (*Empty, error) { - return nil, status.Error(codes.Unimplemented, "method StageBlocksCreate not implemented") + return nil, status.Errorf(codes.Unimplemented, "method StageBlocksCreate not implemented") } -func (UnimplementedDarksideStreamerServer) StageTransactionsStream(grpc.ClientStreamingServer[RawTransaction, Empty]) error { - return status.Error(codes.Unimplemented, "method StageTransactionsStream not implemented") +func (UnimplementedDarksideStreamerServer) StageTransactionsStream(DarksideStreamer_StageTransactionsStreamServer) error { + return status.Errorf(codes.Unimplemented, "method StageTransactionsStream not implemented") } func (UnimplementedDarksideStreamerServer) StageTransactions(context.Context, *DarksideTransactionsURL) (*Empty, error) { - return nil, status.Error(codes.Unimplemented, "method StageTransactions not implemented") + return nil, status.Errorf(codes.Unimplemented, "method StageTransactions not implemented") } func (UnimplementedDarksideStreamerServer) ApplyStaged(context.Context, *DarksideHeight) (*Empty, error) { - return nil, status.Error(codes.Unimplemented, "method ApplyStaged not implemented") + return nil, status.Errorf(codes.Unimplemented, "method ApplyStaged not implemented") } -func (UnimplementedDarksideStreamerServer) GetIncomingTransactions(*Empty, grpc.ServerStreamingServer[RawTransaction]) error { - return status.Error(codes.Unimplemented, "method GetIncomingTransactions not implemented") +func (UnimplementedDarksideStreamerServer) GetIncomingTransactions(*Empty, DarksideStreamer_GetIncomingTransactionsServer) error { + return status.Errorf(codes.Unimplemented, "method GetIncomingTransactions not implemented") } func (UnimplementedDarksideStreamerServer) ClearIncomingTransactions(context.Context, *Empty) (*Empty, error) { - return nil, status.Error(codes.Unimplemented, "method ClearIncomingTransactions not implemented") + return nil, status.Errorf(codes.Unimplemented, "method ClearIncomingTransactions not implemented") } func (UnimplementedDarksideStreamerServer) AddAddressUtxo(context.Context, *GetAddressUtxosReply) (*Empty, error) { - return nil, status.Error(codes.Unimplemented, "method AddAddressUtxo not implemented") + return nil, status.Errorf(codes.Unimplemented, "method AddAddressUtxo not implemented") } func (UnimplementedDarksideStreamerServer) ClearAddressUtxo(context.Context, *Empty) (*Empty, error) { - return nil, status.Error(codes.Unimplemented, "method ClearAddressUtxo not implemented") + return nil, status.Errorf(codes.Unimplemented, "method ClearAddressUtxo not implemented") +} +func (UnimplementedDarksideStreamerServer) AddAddressTransaction(context.Context, *DarksideAddressTransaction) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddAddressTransaction not implemented") +} +func (UnimplementedDarksideStreamerServer) ClearAddressTransactions(context.Context, *Empty) (*Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClearAddressTransactions not implemented") } func (UnimplementedDarksideStreamerServer) AddTreeState(context.Context, *TreeState) (*Empty, error) { - return nil, status.Error(codes.Unimplemented, "method AddTreeState not implemented") + return nil, status.Errorf(codes.Unimplemented, "method AddTreeState not implemented") } func (UnimplementedDarksideStreamerServer) RemoveTreeState(context.Context, *BlockID) (*Empty, error) { - return nil, status.Error(codes.Unimplemented, "method RemoveTreeState not implemented") + return nil, status.Errorf(codes.Unimplemented, "method RemoveTreeState not implemented") } func (UnimplementedDarksideStreamerServer) ClearAllTreeStates(context.Context, *Empty) (*Empty, error) { - return nil, status.Error(codes.Unimplemented, "method ClearAllTreeStates not implemented") + return nil, status.Errorf(codes.Unimplemented, "method ClearAllTreeStates not implemented") } func (UnimplementedDarksideStreamerServer) SetSubtreeRoots(context.Context, *DarksideSubtreeRoots) (*Empty, error) { - return nil, status.Error(codes.Unimplemented, "method SetSubtreeRoots not implemented") + return nil, status.Errorf(codes.Unimplemented, "method SetSubtreeRoots not implemented") } func (UnimplementedDarksideStreamerServer) Stop(context.Context, *Empty) (*Empty, error) { - return nil, status.Error(codes.Unimplemented, "method Stop not implemented") + return nil, status.Errorf(codes.Unimplemented, "method Stop not implemented") } func (UnimplementedDarksideStreamerServer) mustEmbedUnimplementedDarksideStreamerServer() {} -func (UnimplementedDarksideStreamerServer) testEmbeddedByValue() {} // UnsafeDarksideStreamerServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to DarksideStreamerServer will @@ -461,13 +523,6 @@ type UnsafeDarksideStreamerServer interface { } func RegisterDarksideStreamerServer(s grpc.ServiceRegistrar, srv DarksideStreamerServer) { - // If the following call panics, it indicates UnimplementedDarksideStreamerServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&DarksideStreamer_ServiceDesc, srv) } @@ -490,11 +545,30 @@ func _DarksideStreamer_Reset_Handler(srv interface{}, ctx context.Context, dec f } func _DarksideStreamer_StageBlocksStream_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(DarksideStreamerServer).StageBlocksStream(&grpc.GenericServerStream[DarksideBlock, Empty]{ServerStream: stream}) + return srv.(DarksideStreamerServer).StageBlocksStream(&darksideStreamerStageBlocksStreamServer{stream}) } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type DarksideStreamer_StageBlocksStreamServer = grpc.ClientStreamingServer[DarksideBlock, Empty] +type DarksideStreamer_StageBlocksStreamServer interface { + SendAndClose(*Empty) error + Recv() (*DarksideBlock, error) + grpc.ServerStream +} + +type darksideStreamerStageBlocksStreamServer struct { + grpc.ServerStream +} + +func (x *darksideStreamerStageBlocksStreamServer) SendAndClose(m *Empty) error { + return x.ServerStream.SendMsg(m) +} + +func (x *darksideStreamerStageBlocksStreamServer) Recv() (*DarksideBlock, error) { + m := new(DarksideBlock) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} func _DarksideStreamer_StageBlocks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DarksideBlocksURL) @@ -533,11 +607,30 @@ func _DarksideStreamer_StageBlocksCreate_Handler(srv interface{}, ctx context.Co } func _DarksideStreamer_StageTransactionsStream_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(DarksideStreamerServer).StageTransactionsStream(&grpc.GenericServerStream[RawTransaction, Empty]{ServerStream: stream}) + return srv.(DarksideStreamerServer).StageTransactionsStream(&darksideStreamerStageTransactionsStreamServer{stream}) +} + +type DarksideStreamer_StageTransactionsStreamServer interface { + SendAndClose(*Empty) error + Recv() (*RawTransaction, error) + grpc.ServerStream } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type DarksideStreamer_StageTransactionsStreamServer = grpc.ClientStreamingServer[RawTransaction, Empty] +type darksideStreamerStageTransactionsStreamServer struct { + grpc.ServerStream +} + +func (x *darksideStreamerStageTransactionsStreamServer) SendAndClose(m *Empty) error { + return x.ServerStream.SendMsg(m) +} + +func (x *darksideStreamerStageTransactionsStreamServer) Recv() (*RawTransaction, error) { + m := new(RawTransaction) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} func _DarksideStreamer_StageTransactions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DarksideTransactionsURL) @@ -580,11 +673,21 @@ func _DarksideStreamer_GetIncomingTransactions_Handler(srv interface{}, stream g if err := stream.RecvMsg(m); err != nil { return err } - return srv.(DarksideStreamerServer).GetIncomingTransactions(m, &grpc.GenericServerStream[Empty, RawTransaction]{ServerStream: stream}) + return srv.(DarksideStreamerServer).GetIncomingTransactions(m, &darksideStreamerGetIncomingTransactionsServer{stream}) } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type DarksideStreamer_GetIncomingTransactionsServer = grpc.ServerStreamingServer[RawTransaction] +type DarksideStreamer_GetIncomingTransactionsServer interface { + Send(*RawTransaction) error + grpc.ServerStream +} + +type darksideStreamerGetIncomingTransactionsServer struct { + grpc.ServerStream +} + +func (x *darksideStreamerGetIncomingTransactionsServer) Send(m *RawTransaction) error { + return x.ServerStream.SendMsg(m) +} func _DarksideStreamer_ClearIncomingTransactions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Empty) @@ -640,6 +743,42 @@ func _DarksideStreamer_ClearAddressUtxo_Handler(srv interface{}, ctx context.Con return interceptor(ctx, in, info, handler) } +func _DarksideStreamer_AddAddressTransaction_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DarksideAddressTransaction) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DarksideStreamerServer).AddAddressTransaction(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DarksideStreamer_AddAddressTransaction_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DarksideStreamerServer).AddAddressTransaction(ctx, req.(*DarksideAddressTransaction)) + } + return interceptor(ctx, in, info, handler) +} + +func _DarksideStreamer_ClearAddressTransactions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DarksideStreamerServer).ClearAddressTransactions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: DarksideStreamer_ClearAddressTransactions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DarksideStreamerServer).ClearAddressTransactions(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + func _DarksideStreamer_AddTreeState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(TreeState) if err := dec(in); err != nil { @@ -769,6 +908,14 @@ var DarksideStreamer_ServiceDesc = grpc.ServiceDesc{ MethodName: "ClearAddressUtxo", Handler: _DarksideStreamer_ClearAddressUtxo_Handler, }, + { + MethodName: "AddAddressTransaction", + Handler: _DarksideStreamer_AddAddressTransaction_Handler, + }, + { + MethodName: "ClearAddressTransactions", + Handler: _DarksideStreamer_ClearAddressTransactions_Handler, + }, { MethodName: "AddTreeState", Handler: _DarksideStreamer_AddTreeState_Handler,