Update to latest lightwalletd service definition.
Updated to the latest service.proto file to utilize the new t-addr endpoints. This closes https://github.com/zcash/zcash-android-wallet-sdk/issues/176.
This commit is contained in:
parent
a285c69449
commit
4087bc65bc
|
@ -113,7 +113,7 @@ class LightWalletGrpcService private constructor(
|
||||||
if (blockHeightRange.isEmpty() || tAddress.isBlank()) return listOf()
|
if (blockHeightRange.isEmpty() || tAddress.isBlank()) return listOf()
|
||||||
|
|
||||||
channel.resetConnectBackoff()
|
channel.resetConnectBackoff()
|
||||||
val result = channel.createStub().getAddressTxids(
|
val result = channel.createStub().getTaddressTxids(
|
||||||
Service.TransparentAddressBlockFilter.newBuilder().setAddress(tAddress)
|
Service.TransparentAddressBlockFilter.newBuilder().setAddress(tAddress)
|
||||||
.setRange(blockHeightRange.toBlockRange()).build()
|
.setRange(blockHeightRange.toBlockRange()).build()
|
||||||
)
|
)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
package cash.z.wallet.sdk.rpc;
|
package cash.z.wallet.sdk.rpc;
|
||||||
option go_package = "walletrpc";
|
option go_package = ".;walletrpc";
|
||||||
option swift_prefix = "";
|
option swift_prefix = "";
|
||||||
import "compact_formats.proto";
|
import "compact_formats.proto";
|
||||||
|
|
||||||
|
@ -62,6 +62,10 @@ message LightdInfo {
|
||||||
uint64 saplingActivationHeight = 5; // depends on mainnet or testnet
|
uint64 saplingActivationHeight = 5; // depends on mainnet or testnet
|
||||||
string consensusBranchId = 6; // protocol identifier, see consensus/upgrades.cpp
|
string consensusBranchId = 6; // protocol identifier, see consensus/upgrades.cpp
|
||||||
uint64 blockHeight = 7; // latest block on the best chain
|
uint64 blockHeight = 7; // latest block on the best chain
|
||||||
|
string gitCommit = 8;
|
||||||
|
string branch = 9;
|
||||||
|
string buildDate = 10;
|
||||||
|
string buildUser = 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TransparentAddressBlockFilter restricts the results to the given address
|
// TransparentAddressBlockFilter restricts the results to the given address
|
||||||
|
@ -86,6 +90,45 @@ message PingResponse {
|
||||||
int64 exit = 2;
|
int64 exit = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message Address {
|
||||||
|
string address = 1;
|
||||||
|
}
|
||||||
|
message AddressList {
|
||||||
|
repeated string addresses = 1;
|
||||||
|
}
|
||||||
|
message Balance {
|
||||||
|
int64 valueZat = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message Exclude {
|
||||||
|
repeated bytes txid = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// The TreeState is derived from the zcash z_gettreestate rpc.
|
||||||
|
message TreeState {
|
||||||
|
string network = 1; // "main" or "test"
|
||||||
|
uint64 height = 2;
|
||||||
|
string hash = 3; // block id
|
||||||
|
uint32 time = 4; // Unix epoch time when the block was mined
|
||||||
|
string tree = 5; // sapling commitment tree state
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetAddressUtxosArg {
|
||||||
|
string address = 1;
|
||||||
|
uint64 startHeight = 2;
|
||||||
|
uint32 maxEntries = 3; // zero means unlimited
|
||||||
|
}
|
||||||
|
message GetAddressUtxosReply {
|
||||||
|
bytes txid = 1;
|
||||||
|
int32 index = 2;
|
||||||
|
bytes script = 3;
|
||||||
|
int64 valueZat = 4;
|
||||||
|
uint64 height = 5;
|
||||||
|
}
|
||||||
|
message GetAddressUtxosReplyList {
|
||||||
|
repeated GetAddressUtxosReply addressUtxos = 1;
|
||||||
|
}
|
||||||
|
|
||||||
service CompactTxStreamer {
|
service CompactTxStreamer {
|
||||||
// Return the height of the tip of the best chain
|
// Return the height of the tip of the best chain
|
||||||
rpc GetLatestBlock(ChainSpec) returns (BlockID) {}
|
rpc GetLatestBlock(ChainSpec) returns (BlockID) {}
|
||||||
|
@ -100,7 +143,29 @@ service CompactTxStreamer {
|
||||||
rpc SendTransaction(RawTransaction) returns (SendResponse) {}
|
rpc SendTransaction(RawTransaction) returns (SendResponse) {}
|
||||||
|
|
||||||
// Return the txids corresponding to the given t-address within the given block range
|
// Return the txids corresponding to the given t-address within the given block range
|
||||||
rpc GetAddressTxids(TransparentAddressBlockFilter) returns (stream RawTransaction) {}
|
rpc GetTaddressTxids(TransparentAddressBlockFilter) returns (stream RawTransaction) {}
|
||||||
|
rpc GetTaddressBalance(AddressList) returns (Balance) {}
|
||||||
|
rpc GetTaddressBalanceStream(stream Address) returns (Balance) {}
|
||||||
|
|
||||||
|
// Return the compact transactions currently in the mempool; the results
|
||||||
|
// can be a few seconds out of date. If the Exclude list is empty, return
|
||||||
|
// all transactions; otherwise return all *except* those in the Exclude list
|
||||||
|
// (if any); this allows the client to avoid receiving transactions that it
|
||||||
|
// already has (from an earlier call to this rpc). The transaction IDs in the
|
||||||
|
// Exclude list can be shortened to any number of bytes to make the request
|
||||||
|
// more bandwidth-efficient; if two or more transactions in the mempool
|
||||||
|
// match a shortened txid, they are all sent (none is excluded). Transactions
|
||||||
|
// in the exclude list that don't exist in the mempool are ignored.
|
||||||
|
rpc GetMempoolTx(Exclude) returns (stream CompactTx) {}
|
||||||
|
|
||||||
|
// GetTreeState returns the note commitment tree state corresponding to the given block.
|
||||||
|
// See section 3.7 of the zcash protocol specification. It returns several other useful
|
||||||
|
// values also (even though they can be obtained using GetBlock).
|
||||||
|
// The block can be specified by either height or hash.
|
||||||
|
rpc GetTreeState(BlockID) returns (TreeState) {}
|
||||||
|
|
||||||
|
rpc GetAddressUtxos(GetAddressUtxosArg) returns (GetAddressUtxosReplyList) {}
|
||||||
|
rpc GetAddressUtxosStream(GetAddressUtxosArg) returns (stream GetAddressUtxosReply) {}
|
||||||
|
|
||||||
// Return information about this lightwalletd instance and the blockchain
|
// Return information about this lightwalletd instance and the blockchain
|
||||||
rpc GetLightdInfo(Empty) returns (LightdInfo) {}
|
rpc GetLightdInfo(Empty) returns (LightdInfo) {}
|
||||||
|
|
Loading…
Reference in New Issue