Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
e9e31f64
Commit
e9e31f64
authored
Sep 17, 2021
by
mdj33
Committed by
vipwzw
Sep 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve proto and readme
parent
adb1932c
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
4839 additions
and
404 deletions
+4839
-404
testcase.sh
plugin/dapp/mix/cmd/build/testcase.sh
+7
-7
mix.go
plugin/dapp/mix/commands/mix.go
+16
-28
mix.md
plugin/dapp/mix/mix.md
+23
-6
cryptokey.proto
plugin/dapp/mix/proto/cryptokey.proto
+76
-0
merkletree.proto
plugin/dapp/mix/proto/merkletree.proto
+106
-0
mix.proto
plugin/dapp/mix/proto/mix.proto
+1
-347
wallet.proto
plugin/dapp/mix/proto/wallet.proto
+181
-0
cryptokey.pb.go
plugin/dapp/mix/types/cryptokey.pb.go
+829
-0
merkletree.pb.go
plugin/dapp/mix/types/merkletree.pb.go
+1407
-0
mix.pb.go
plugin/dapp/mix/types/mix.pb.go
+0
-0
wallet.pb.go
plugin/dapp/mix/types/wallet.pb.go
+2180
-0
cryptokey.go
plugin/dapp/mix/wallet/cryptokey.go
+6
-5
exec.go
plugin/dapp/mix/wallet/exec.go
+4
-8
mixbizdb.go
plugin/dapp/mix/wallet/mixbizdb.go
+1
-1
util.go
plugin/dapp/mix/wallet/util.go
+2
-2
No files found.
plugin/dapp/mix/cmd/build/testcase.sh
View file @
e9e31f64
...
...
@@ -108,7 +108,7 @@ function mix_transfer() {
}
function
mix_deposit
()
{
hash
=
$(${
CLI
}
send mix deposit
-m
1000000000
-p
./gnark/
-
w
""
-
v
true
-t
1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k
-a
1JRNjdEqp4LJ5fqycUBm9ayCKSeeskgMKR
-r
1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4
-e
coins
-s
bty
-k
4257D8692EF7FE13C68B65D6A52F03933DB2FA5CE8FAF210B5B8B80C721CED01
)
hash
=
$(${
CLI
}
send mix deposit
-m
1000000000
-p
./gnark/
-v
true
-t
1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k
-a
1JRNjdEqp4LJ5fqycUBm9ayCKSeeskgMKR
-r
1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4
-e
coins
-s
bty
-k
4257D8692EF7FE13C68B65D6A52F03933DB2FA5CE8FAF210B5B8B80C721CED01
)
echo
"
${
hash
}
"
query_tx
"
${
CLI
}
"
"
${
hash
}
"
...
...
@@ -120,7 +120,7 @@ function mix_deposit() {
authHash
=
$(${
MIX_CLI32
}
mix wallet notes
-a
1JRNjdEqp4LJ5fqycUBm9ayCKSeeskgMKR
-s
3 | jq
-r
".notes[0].noteHash"
)
authKey
=
$(${
MIX_CLI32
}
mix wallet notes
-a
1JRNjdEqp4LJ5fqycUBm9ayCKSeeskgMKR
-s
3 | jq
-r
".notes[0].secret.returnKey"
)
echo
"authHash=
$authHash
,authKey=
$authKey
"
rawData
=
$(${
MIX_CLI32
}
mix auth
-n
"
$authHash
"
-a
"
$authKey
"
-p
./gnark/
-
w
""
-
v
true
-e
coins
-s
bty
)
rawData
=
$(${
MIX_CLI32
}
mix auth
-n
"
$authHash
"
-a
"
$authKey
"
-p
./gnark/
-v
true
-e
coins
-s
bty
)
signData
=
$(${
CLI
}
wallet sign
-d
"
$rawData
"
-k
4257D8692EF7FE13C68B65D6A52F03933DB2FA5CE8FAF210B5B8B80C721CED01
)
hash
=
$(${
CLI
}
wallet send
-d
"
$signData
"
)
echo
"
${
hash
}
"
...
...
@@ -130,7 +130,7 @@ function mix_deposit() {
echo
"transfer to 1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k"
transHash
=
$(${
MIX_CLI31
}
mix wallet notes
-a
1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4
-s
1 | jq
-r
".notes[0].noteHash"
)
rawData
=
$(${
MIX_CLI31
}
mix transfer
-m
600000000
-n
"
$transHash
"
-t
1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k
-p
./gnark/
-
w
""
-
v
true
-e
coins
-s
bty
)
rawData
=
$(${
MIX_CLI31
}
mix transfer
-m
600000000
-n
"
$transHash
"
-t
1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k
-p
./gnark/
-v
true
-e
coins
-s
bty
)
signData
=
$(${
CLI
}
wallet sign
-d
"
$rawData
"
-k
4257D8692EF7FE13C68B65D6A52F03933DB2FA5CE8FAF210B5B8B80C721CED01
)
hash
=
$(${
CLI
}
wallet send
-d
"
$signData
"
)
echo
"
${
hash
}
"
...
...
@@ -140,7 +140,7 @@ function mix_deposit() {
echo
"withdraw"
withdrawHash
=
$(${
MIX_CLI30
}
mix wallet notes
-a
1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k
-s
1 | jq
-r
".notes[0].noteHash"
)
rawData
=
$(${
MIX_CLI30
}
mix withdraw
-m
600000000
-n
"
$withdrawHash
"
-p
./gnark/
-
w
""
-
v
true
-e
coins
-s
bty
)
rawData
=
$(${
MIX_CLI30
}
mix withdraw
-m
600000000
-n
"
$withdrawHash
"
-p
./gnark/
-v
true
-e
coins
-s
bty
)
signData
=
$(${
CLI
}
wallet sign
-d
"
$rawData
"
-k
0x7a80a1f75d7360c6123c32a78ecf978c1ac55636f87892df38d8b85a9aeff115
)
hash
=
$(${
CLI
}
wallet send
-d
"
$signData
"
)
...
...
@@ -189,14 +189,14 @@ function mix_token_test() {
query_tx
"
${
CLI
}
"
"
${
hash
}
"
echo
"mix deposit"
hash
=
$(${
CLI
}
send mix deposit
-m
1000000000
-p
./gnark/
-
w
""
-
v
true
-t
1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k
-e
token
-s
GD
-k
4257D8692EF7FE13C68B65D6A52F03933DB2FA5CE8FAF210B5B8B80C721CED01
)
hash
=
$(${
CLI
}
send mix deposit
-m
1000000000
-p
./gnark/
-v
true
-t
1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k
-e
token
-s
GD
-k
4257D8692EF7FE13C68B65D6A52F03933DB2FA5CE8FAF210B5B8B80C721CED01
)
echo
"
${
hash
}
"
query_tx
"
${
CLI
}
"
"
${
hash
}
"
query_note
"
${
MIX_CLI30
}
"
1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k 1
echo
"transfer to 1MCftFynyvG2F4ED5mdHYgziDxx6vDrScs"
transHash
=
$(${
MIX_CLI30
}
mix wallet notes
-a
1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k
-s
1 | jq
-r
".notes[0].noteHash"
)
rawData
=
$(${
MIX_CLI30
}
mix transfer
-m
600000000
-n
"
$transHash
"
-t
1MCftFynyvG2F4ED5mdHYgziDxx6vDrScs
-p
./gnark/
-
w
""
-
v
true
-e
token
-s
GD
)
rawData
=
$(${
MIX_CLI30
}
mix transfer
-m
600000000
-n
"
$transHash
"
-t
1MCftFynyvG2F4ED5mdHYgziDxx6vDrScs
-p
./gnark/
-v
true
-e
token
-s
GD
)
signData
=
$(${
CLI
}
wallet sign
-d
"
$rawData
"
-k
4257D8692EF7FE13C68B65D6A52F03933DB2FA5CE8FAF210B5B8B80C721CED01
)
hash
=
$(${
CLI
}
wallet send
-d
"
$signData
"
)
echo
"
${
hash
}
"
...
...
@@ -206,7 +206,7 @@ function mix_token_test() {
echo
"withdraw token GD"
withdrawHash
=
$(${
MIX_CLI30
}
mix wallet notes
-a
1MCftFynyvG2F4ED5mdHYgziDxx6vDrScs
-s
1 | jq
-r
".notes[0].noteHash"
)
rawData
=
$(${
MIX_CLI30
}
mix withdraw
-m
600000000
-n
"
$withdrawHash
"
-p
./gnark/
-
w
""
-
v
true
-e
token
-s
GD
)
rawData
=
$(${
MIX_CLI30
}
mix withdraw
-m
600000000
-n
"
$withdrawHash
"
-p
./gnark/
-v
true
-e
token
-s
GD
)
signData
=
$(${
CLI
}
wallet sign
-d
"
$rawData
"
-k
0xcacb1f5d51700aea07fca2246ab43b0917d70405c65edea9b5063d72eb5c6b71
)
hash
=
$(${
CLI
}
wallet send
-d
"
$signData
"
)
echo
"
${
hash
}
"
...
...
plugin/dapp/mix/commands/mix.go
View file @
e9e31f64
...
...
@@ -584,7 +584,7 @@ func accountPrivacyCmdFlags(cmd *cobra.Command) {
cmd
.
Flags
()
.
StringP
(
"priv"
,
"p"
,
""
,
"user wallet addr's privacy key,option"
)
cmd
.
Flags
()
.
Uint32P
(
"detail"
,
"d"
,
0
,
"if get keys' privacy keys,option"
)
cmd
.
Flags
()
.
BoolP
(
"detail"
,
"d"
,
false
,
"if get keys' privacy keys,option"
)
}
...
...
@@ -592,7 +592,7 @@ func accountPrivacy(cmd *cobra.Command, args []string) {
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
priv
,
_
:=
cmd
.
Flags
()
.
GetString
(
"priv"
)
addr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"addr"
)
detail
,
_
:=
cmd
.
Flags
()
.
Get
Uint32
(
"detail"
)
detail
,
_
:=
cmd
.
Flags
()
.
Get
Bool
(
"detail"
)
if
len
(
priv
)
==
0
&&
len
(
addr
)
==
0
{
fmt
.
Println
(
"err: one of addr or priv should be fill"
)
...
...
@@ -600,7 +600,7 @@ func accountPrivacy(cmd *cobra.Command, args []string) {
}
var
res
mixTy
.
WalletAddrPrivacy
ctx
:=
jsonclient
.
NewRPCCtx
(
rpcLaddr
,
"mix.ShowAccountPrivacyInfo"
,
&
mixTy
.
PaymentKeysReq
{
PrivKey
:
priv
,
Addr
:
addr
,
Detail
:
int32
(
detail
)
},
&
res
)
ctx
:=
jsonclient
.
NewRPCCtx
(
rpcLaddr
,
"mix.ShowAccountPrivacyInfo"
,
&
mixTy
.
PaymentKeysReq
{
PrivKey
:
priv
,
Addr
:
addr
,
Detail
:
detail
},
&
res
)
ctx
.
Run
()
}
...
...
@@ -831,7 +831,7 @@ func decodeSecret(cmd *cobra.Command, args []string) {
fmt
.
Println
(
string
(
rst
))
}
//
ShowAccountPrivacyInfo get para chain status by height
//
EncryptSecretDataCmd encrypt secret data
func
EncryptSecretDataCmd
()
*
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"encrypt"
,
...
...
@@ -846,19 +846,19 @@ func encryptSecrettCmdFlags(cmd *cobra.Command) {
cmd
.
Flags
()
.
StringP
(
"secret"
,
"s"
,
""
,
"raw secret data"
)
cmd
.
MarkFlagRequired
(
"secret"
)
cmd
.
Flags
()
.
StringP
(
"peer
Key"
,
"a"
,
""
,
"peer
pub key "
)
cmd
.
MarkFlagRequired
(
"peerKey"
)
cmd
.
Flags
()
.
StringP
(
"peer
PubKey"
,
"u"
,
""
,
"peer secret
pub key "
)
cmd
.
MarkFlagRequired
(
"peer
Pub
Key"
)
}
func
encryptSecret
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
secret
,
_
:=
cmd
.
Flags
()
.
GetString
(
"secret"
)
peer
Key
,
_
:=
cmd
.
Flags
()
.
GetString
(
"peer
Key"
)
peer
PubKey
,
_
:=
cmd
.
Flags
()
.
GetString
(
"peerPub
Key"
)
req
:=
mixTy
.
EncryptSecretData
{
Secret
:
secret
,
Peer
Key
:
peer
Key
,
Secret
:
secret
,
Peer
SecretPubKey
:
peerPub
Key
,
}
var
res
mixTy
.
DHSecret
...
...
@@ -881,11 +881,11 @@ func decryptSecrettCmdFlags(cmd *cobra.Command) {
cmd
.
Flags
()
.
StringP
(
"secret"
,
"s"
,
""
,
"raw secret data"
)
cmd
.
MarkFlagRequired
(
"secret"
)
cmd
.
Flags
()
.
StringP
(
"pri"
,
"p"
,
""
,
"
receiving pri
key"
)
cmd
.
Flags
()
.
StringP
(
"pri"
,
"p"
,
""
,
"
self secret private
key"
)
cmd
.
MarkFlagRequired
(
"pri"
)
cmd
.
Flags
()
.
StringP
(
"
peerKey"
,
"a"
,
""
,
"ephemeral pub key X
"
)
cmd
.
MarkFlagRequired
(
"
peer
Key"
)
cmd
.
Flags
()
.
StringP
(
"
oneTimePubKey"
,
"u"
,
""
,
"peer one time pub key
"
)
cmd
.
MarkFlagRequired
(
"
oneTimePub
Key"
)
}
...
...
@@ -893,12 +893,12 @@ func decryptSecret(cmd *cobra.Command, args []string) {
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
secret
,
_
:=
cmd
.
Flags
()
.
GetString
(
"secret"
)
pri
,
_
:=
cmd
.
Flags
()
.
GetString
(
"pri"
)
peerKey
,
_
:=
cmd
.
Flags
()
.
GetString
(
"peer
Key"
)
oneTimePubKey
,
_
:=
cmd
.
Flags
()
.
GetString
(
"oneTimePub
Key"
)
req
:=
mixTy
.
DecryptSecretData
{
Secret
:
secret
,
PeerKey
:
peer
Key
,
PriKey
:
pri
,
Secret
:
secret
,
OneTimePubKey
:
oneTimePub
Key
,
Secret
PriKey
:
pri
,
}
var
res
mixTy
.
SecretData
...
...
@@ -951,7 +951,6 @@ func depositSecretCmdFlags(cmd *cobra.Command) {
cmd
.
Flags
()
.
StringP
(
"path"
,
"p"
,
""
,
"deposit circuit path"
)
cmd
.
MarkFlagRequired
(
"path"
)
cmd
.
Flags
()
.
StringP
(
"proof"
,
"w"
,
""
,
"proof string to test"
)
cmd
.
Flags
()
.
BoolP
(
"verify"
,
"v"
,
false
,
"verify on chain:true on local:false "
)
}
...
...
@@ -967,7 +966,6 @@ func depositSecret(cmd *cobra.Command, args []string) {
symbol
,
_
:=
cmd
.
Flags
()
.
GetString
(
"symbol"
)
path
,
_
:=
cmd
.
Flags
()
.
GetString
(
"path"
)
proof
,
_
:=
cmd
.
Flags
()
.
GetString
(
"proof"
)
verify
,
_
:=
cmd
.
Flags
()
.
GetBool
(
"verify"
)
deposit
:=
&
mixTy
.
DepositInfo
{
...
...
@@ -988,7 +986,6 @@ func depositSecret(cmd *cobra.Command, args []string) {
AssetExec
:
assetExec
,
AssetSymbol
:
symbol
,
Title
:
paraName
,
ZkProof
:
proof
,
VerifyOnChain
:
verify
,
}
...
...
@@ -1029,7 +1026,6 @@ func transferSecretCmdFlags(cmd *cobra.Command) {
cmd
.
Flags
()
.
StringP
(
"path"
,
"p"
,
""
,
"input path "
)
cmd
.
MarkFlagRequired
(
"path"
)
cmd
.
Flags
()
.
StringP
(
"proof"
,
"w"
,
""
,
"proof string to test"
)
cmd
.
Flags
()
.
BoolP
(
"verify"
,
"v"
,
false
,
"verify on chain:true on local:false, default false "
)
}
...
...
@@ -1048,7 +1044,6 @@ func transferSecret(cmd *cobra.Command, args []string) {
assetExec
,
_
:=
cmd
.
Flags
()
.
GetString
(
"exec"
)
symbol
,
_
:=
cmd
.
Flags
()
.
GetString
(
"symbol"
)
proof
,
_
:=
cmd
.
Flags
()
.
GetString
(
"proof"
)
verify
,
_
:=
cmd
.
Flags
()
.
GetBool
(
"verify"
)
input
:=
&
mixTy
.
TransferInputTxReq
{
...
...
@@ -1078,7 +1073,6 @@ func transferSecret(cmd *cobra.Command, args []string) {
AssetExec
:
assetExec
,
AssetSymbol
:
symbol
,
Title
:
paraName
,
ZkProof
:
proof
,
VerifyOnChain
:
verify
,
}
...
...
@@ -1112,7 +1106,6 @@ func withdrawSecretCmdFlags(cmd *cobra.Command) {
cmd
.
Flags
()
.
StringP
(
"path"
,
"p"
,
""
,
"withdraw pk file "
)
cmd
.
MarkFlagRequired
(
"path"
)
cmd
.
Flags
()
.
StringP
(
"proof"
,
"w"
,
""
,
"proof string to test"
)
cmd
.
Flags
()
.
BoolP
(
"verify"
,
"v"
,
false
,
"verify on chain:true on local:false, default false "
)
}
...
...
@@ -1127,7 +1120,6 @@ func withdrawSecret(cmd *cobra.Command, args []string) {
symbol
,
_
:=
cmd
.
Flags
()
.
GetString
(
"symbol"
)
path
,
_
:=
cmd
.
Flags
()
.
GetString
(
"path"
)
proof
,
_
:=
cmd
.
Flags
()
.
GetString
(
"proof"
)
verify
,
_
:=
cmd
.
Flags
()
.
GetBool
(
"verify"
)
req
:=
&
mixTy
.
WithdrawTxReq
{
...
...
@@ -1142,7 +1134,6 @@ func withdrawSecret(cmd *cobra.Command, args []string) {
AssetExec
:
assetExec
,
AssetSymbol
:
symbol
,
Title
:
paraName
,
ZkProof
:
proof
,
VerifyOnChain
:
verify
,
}
...
...
@@ -1176,7 +1167,6 @@ func authSecretCmdFlags(cmd *cobra.Command) {
cmd
.
Flags
()
.
StringP
(
"path"
,
"p"
,
""
,
"auth path file "
)
cmd
.
MarkFlagRequired
(
"path"
)
cmd
.
Flags
()
.
StringP
(
"proof"
,
"w"
,
""
,
"proof string to test"
)
cmd
.
Flags
()
.
BoolP
(
"verify"
,
"v"
,
false
,
"verify on chain:true on local:false, default false "
)
}
...
...
@@ -1192,7 +1182,6 @@ func authSecret(cmd *cobra.Command, args []string) {
path
,
_
:=
cmd
.
Flags
()
.
GetString
(
"path"
)
proof
,
_
:=
cmd
.
Flags
()
.
GetString
(
"proof"
)
verify
,
_
:=
cmd
.
Flags
()
.
GetBool
(
"verify"
)
req
:=
&
mixTy
.
AuthTxReq
{
...
...
@@ -1207,7 +1196,6 @@ func authSecret(cmd *cobra.Command, args []string) {
AssetExec
:
assetExec
,
AssetSymbol
:
symbol
,
Title
:
paraName
,
ZkProof
:
proof
,
VerifyOnChain
:
verify
,
}
...
...
plugin/dapp/mix/mix.md
View file @
e9e31f64
# mix
执行器 零知识证明隐私
# mix
执行器 基于零知识证明的混币隐私合约
## 场景
1.
存款,公转私,支持一次存入多个目标账户,目标账户隐藏,转账金额公开(需要验证金额足够)
1.
转账,私对私,花费某个支票,转账给目标账户,多出部分找零给自己,目标账户和金额全隐藏
1.
提款,私对公,花费某些支票,统一转出给签名地址,转账金额公开(验证),签名地址和支票账户不一定对应,也就是任何知道支票密码的人都可以提款
1.
存款,公转私,支持一次存入一个或多个目标账户,目标账户隐藏(自己或对方账户),转账金额公开(需要验证金额足够),生成未花费支票
1.
转账,私对私,花费某个支票,生成新支票即转账给目标账户,多出部分找零给自己,花费、目标和找零金额全隐藏
1.
提款,私对公,花费某些支票,统一转出给签名地址,转账金额公开(验证)
1.
授权,私对私,授权账户对某一请求其授权的转账支票授权,接收者或发送者都可看到支票在自己名下,但是锁定状态,
授权者授权接收者或者发送者为可花费用户,可花费用户才能花费此支票。
## 介绍
1.
任一希望接收支票的用户需要先注册支票接收账号和秘密加密公钥
1.
1 支票账号分为接收key和花费key,花费key为用户链钱包账号私钥在c25519曲线上的公钥同时,花费key作为支票私钥,
计算hash值生成支票接收key。发送者使用对方的钱包地址即可检索其支票接收key,构建发送交易
1.
2 为发送加密消息,接收者需要注册其加密公钥,发送者使用临时私钥和对方加密公钥生成密码,对消息对称加密
1.
支票有接收key,发送key,授权key,还有支票随机数等构成计算其hash,存到merkle树上。知道hash秘密数字的所有者
即可通过构建零知识证明,花费此支票。花费支票需要提供花费key,发送者虽然知道秘密数字也无法花费此支票。
1.
发送者用接收者的加密公钥和一次性临时私钥把支票私密数据进行加密,一次性临时公钥和秘密消息发送到链上,接收者可使用其加密私钥解密消息
1.
接收者需要使用加密私钥逐一检索尝试解密任一新的加密消息,解密成功即是发送给自己的加密消息
1.
对于需要授权的支票,发送者,授权者,接收者均可看到此支票,处于锁定状态,不能花费,只有授权者授权后,被授权方才可花费
##授权
1.
授权账户可以是任意账户,不需要注册公共授权账户,存款方需要自己保证授权地址ok,否则接收方和返回方都不能花费
plugin/dapp/mix/proto/cryptokey.proto
0 → 100644
View file @
e9e31f64
syntax
=
"proto3"
;
package
types
;
option
go_package
=
"../types"
;
//DH one time pubkey with secret
message
DHSecret
{
string
oneTimePubKey
=
1
;
string
secret
=
2
;
}
//Diff-Helman 加密group, for spender, returner, authorizer to decrypt
message
DHSecretGroup
{
string
receiver
=
1
;
string
returner
=
2
;
string
authorize
=
3
;
}
// note payment account
// receiveKey = hash(spendKey)
message
NoteKeyPair
{
string
receiveKey
=
1
;
string
spendKey
=
2
;
}
// diff-hellman crypto key pair
// secretPrivKey = wallet private key * G_25519
// secretPubKey = secretPrivKey * G_25519
message
EncryptSecretKeyPair
{
string
secretPrivKey
=
1
;
string
secretPubKey
=
2
;
}
//spend pair for note proof
//crypt pair for DH crypt/decrypt
message
AccountPrivacyKey
{
NoteKeyPair
paymentKey
=
1
;
EncryptSecretKeyPair
secretKey
=
2
;
}
message
WalletAddrPrivacy
{
AccountPrivacyKey
privacy
=
1
;
string
addr
=
2
;
}
message
SecretData
{
string
receiverKey
=
1
;
string
returnKey
=
2
;
string
authorizeKey
=
3
;
string
amount
=
4
;
string
noteRandom
=
5
;
string
assetExec
=
6
;
string
assetSymbol
=
7
;
}
message
EncryptSecretData
{
string
secret
=
1
;
string
peerSecretPubKey
=
2
;
}
message
DecryptSecretData
{
string
secret
=
1
;
string
secretPriKey
=
2
;
string
oneTimePubKey
=
3
;
}
plugin/dapp/mix/proto/merkletree.proto
0 → 100644
View file @
e9e31f64
syntax
=
"proto3"
;
package
types
;
option
go_package
=
"../types"
;
//子树用高度和hash描述,2^10=1024个叶子节点,子树高度不会超过10
message
CommitSubTree
{
int32
height
=
1
;
bytes
hash
=
2
;
}
//merkel tree由子树和叶子组成,三种场景:1,初始只一个叶子, 2,全是子树, 3,子树加一个叶子,不会有两个叶子,两个叶子一定构成子树
message
CommitSubTrees
{
repeated
CommitSubTree
subTrees
=
1
;
}
//描述当前commitTree的状态
//一颗merkel树1024叶子,考虑数据库读取原因,每个叶子都会存到相应seq db,待第1024次时候归档,重新开始新的merkle树,
message
CommitTreeStatus
{
CommitSubTrees
subTrees
=
1
;
//1~1024叶子的归档
int32
subLeavesSeq
=
2
;
//root的归档 从1开始,数据库占位,不然全空会往前搜索
uint64
archiveRootsSeq
=
3
;
string
assetExec
=
4
;
string
assetSymbol
=
5
;
}
message
ReceiptCommitTreeStatus
{
CommitTreeStatus
prev
=
1
;
CommitTreeStatus
current
=
2
;
}
message
ReceiptCommitSubLeaves
{
int32
seq
=
1
;
string
leaf
=
2
;
}
message
ReceiptCommitSubRoots
{
int32
seq
=
1
;
string
root
=
2
;
}
message
ReceiptArchiveLeaves
{
int32
count
=
1
;
string
rootHash
=
2
;
string
lastLeaf
=
3
;
}
message
ReceiptArchiveTreeRoot
{
uint64
seq
=
1
;
string
rootHash
=
2
;
}
message
CommitTreeLeaves
{
repeated
bytes
leaves
=
1
;
}
message
CommitTreeRoots
{
repeated
bytes
roots
=
1
;
}
message
CommitTreeProve
{
string
rootHash
=
1
;
repeated
string
proofSet
=
2
;
uint32
proofIndex
=
3
;
uint32
numLeaves
=
4
;
repeated
uint32
helpers
=
5
;
}
message
TreeInfoReq
{
string
rootHash
=
1
;
string
leafHash
=
2
;
string
assetExec
=
3
;
string
assetSymbol
=
4
;
uint64
rootHeight
=
5
;
}
message
TreeListResp
{
repeated
string
leaves
=
1
;
}
message
RootListResp
{
repeated
string
roots
=
1
;
}
message
SubTreeResp
{
int32
height
=
1
;
string
hash
=
2
;
}
message
TreeStatusResp
{
int32
subLeavesSeq
=
1
;
uint64
archiveRootsSeq
=
2
;
repeated
SubTreeResp
subTrees
=
3
;
}
message
TreePathProof
{
string
treeRootHash
=
1
;
repeated
string
treePath
=
2
;
repeated
uint32
helpers
=
3
;
}
plugin/dapp/mix/proto/mix.proto
View file @
e9e31f64
syntax
=
"proto3"
;
import
"common.proto"
;
import
"transaction.proto"
;
import
"cryptokey.proto"
;
package
types
;
option
go_package
=
"../types"
;
...
...
@@ -74,18 +73,7 @@ message MixConfigAction {
}
}
//DH one time pubkey with secret
message
DHSecret
{
string
oneTimePubKey
=
1
;
string
secret
=
2
;
}
//Diff-Helman 加密group, for spender, returner, authorizer to decrypt
message
DHSecretGroup
{
string
receiver
=
1
;
string
returner
=
2
;
string
authorize
=
3
;
}
message
ZkProofInfo
{
string
proof
=
1
;
...
...
@@ -153,319 +141,6 @@ message ExistValue {
}
//子树用高度和hash描述,2^10=1024个叶子节点,子树高度不会超过10
message
CommitSubTree
{
int32
height
=
1
;
bytes
hash
=
2
;
}
//merkel tree由子树和叶子组成,三种场景:1,初始只一个叶子, 2,全是子树, 3,子树加一个叶子,不会有两个叶子,两个叶子一定构成子树
message
CommitSubTrees
{
repeated
CommitSubTree
subTrees
=
1
;
}
//描述当前commitTree的状态
//一颗merkel树1024叶子,考虑数据库读取原因,每个叶子都会存到相应seq db,待第1024次时候归档,重新开始新的merkle树,
message
CommitTreeStatus
{
CommitSubTrees
subTrees
=
1
;
//1~1024叶子的归档
int32
subLeavesSeq
=
2
;
//root的归档 从1开始,数据库占位,不然全空会往前搜索
uint64
archiveRootsSeq
=
3
;
string
assetExec
=
4
;
string
assetSymbol
=
5
;
}
message
ReceiptCommitTreeStatus
{
CommitTreeStatus
prev
=
1
;
CommitTreeStatus
current
=
2
;
}
message
ReceiptCommitSubLeaves
{
int32
seq
=
1
;
string
leaf
=
2
;
}
message
ReceiptCommitSubRoots
{
int32
seq
=
1
;
string
root
=
2
;
}
message
ReceiptArchiveLeaves
{
int32
count
=
1
;
string
rootHash
=
2
;
string
lastLeaf
=
3
;
}
message
ReceiptArchiveTreeRoot
{
uint64
seq
=
1
;
string
rootHash
=
2
;
}
message
CommitTreeLeaves
{
repeated
bytes
leaves
=
1
;
}
message
CommitTreeRoots
{
repeated
bytes
roots
=
1
;
}
message
CommitTreeProve
{
string
rootHash
=
1
;
repeated
string
proofSet
=
2
;
uint32
proofIndex
=
3
;
uint32
numLeaves
=
4
;
repeated
uint32
helpers
=
5
;
}
message
TreeInfoReq
{
string
rootHash
=
1
;
string
leafHash
=
2
;
string
assetExec
=
3
;
string
assetSymbol
=
4
;
uint64
rootHeight
=
5
;
}
message
TreeListResp
{
repeated
string
leaves
=
1
;
}
message
RootListResp
{
repeated
string
roots
=
1
;
}
message
SubTreeResp
{
int32
height
=
1
;
string
hash
=
2
;
}
message
TreeStatusResp
{
int32
subLeavesSeq
=
1
;
uint64
archiveRootsSeq
=
2
;
repeated
SubTreeResp
subTrees
=
3
;
}
// mix wallet part
// receiverPubKey = hash(spendPriKey) for zk-snark note spend
message
PaymentKeyPair
{
string
receiveKey
=
1
;
string
spendKey
=
2
;
}
// pub = priv*G for diff-helman crypto
// out: take spender's tempPrikey*pubkey as password, tempPubkey show in note
// spender: take self prikey*tempPubkey as password to decode
message
EncryptKeyPair
{
string
privKey
=
1
;
string
pubKey
=
2
;
}
//spend pair for note proof
//crypt pair for DH crypt/decrypt
message
AccountPrivacyKey
{
PaymentKeyPair
paymentKey
=
1
;
EncryptKeyPair
encryptKey
=
2
;
}
message
WalletAddrPrivacy
{
AccountPrivacyKey
privacy
=
1
;
string
addr
=
2
;
}
message
SecretData
{
string
receiverKey
=
1
;
string
returnKey
=
2
;
string
authorizeKey
=
3
;
string
amount
=
4
;
string
noteRandom
=
5
;
string
assetExec
=
6
;
string
assetSymbol
=
7
;
}
message
EncryptSecretData
{
string
secret
=
1
;
string
peerKey
=
2
;
}
message
DecryptSecretData
{
string
secret
=
1
;
string
priKey
=
2
;
string
peerKey
=
3
;
}
//支持同时存入多个地址,多个地址具有相同的returnAddr和AuthorizeAddr,如果不同,则单个来存
message
DepositInfo
{
string
receiverAddrs
=
1
;
string
returnAddr
=
2
;
string
authorizeAddr
=
3
;
string
amounts
=
4
;
}
//钱包生成deposit tx
message
DepositTxReq
{
DepositInfo
deposit
=
1
;
string
zkPath
=
2
;
}
message
DepositProofResp
{
string
noteHash
=
1
;
SecretData
proof
=
2
;
DHSecretGroup
secrets
=
3
;
}
message
TreePathProof
{
string
treeRootHash
=
1
;
repeated
string
treePath
=
2
;
repeated
uint32
helpers
=
3
;
}
//可withdraw 多个note
message
WithdrawTxReq
{
uint64
totalAmount
=
1
;
string
noteHashs
=
2
;
// seperate by ","
string
zkPath
=
3
;
}
//只授权一个note,超过一个,toAddr不好设置
message
AuthTxReq
{
string
noteHash
=
1
;
string
authorizeToAddr
=
3
;
string
zkPath
=
4
;
}
message
TransferInputTxReq
{
string
noteHashs
=
1
;
}
message
TransferOutputTxReq
{
DepositInfo
deposit
=
1
;
}
message
TransferTxReq
{
TransferInputTxReq
input
=
1
;
TransferOutputTxReq
output
=
2
;
string
zkPath
=
3
;
}
message
CreateZkKeyFileReq
{
int32
ty
=
1
;
string
savePath
=
2
;
}
//加密了的input/output amount
message
ShieldAmount
{
string
X
=
1
;
string
Y
=
2
;
}
message
ShieldAmountRst
{
repeated
string
inputRandoms
=
1
;
string
outputRandom
=
2
;
string
changeRandom
=
3
;
repeated
ShieldAmount
inputs
=
4
;
ShieldAmount
output
=
5
;
ShieldAmount
change
=
6
;
}
message
CreateRawTxReq
{
int32
actionTy
=
1
;
bytes
data
=
4
;
string
assetExec
=
2
;
string
assetSymbol
=
3
;
string
title
=
6
;
//平行链名字
string
zkProof
=
7
;
//输入证明内容,方便测试,空:读pk文件产生proof
bool
verifyOnChain
=
8
;
//true:链上验证,false:本地验证
}
message
PaymentKeysReq
{
string
privKey
=
1
;
//user wallet priv key
string
addr
=
2
;
//user addr
int32
detail
=
3
;
//获取私钥信息
}
enum
NoteStatus
{
UNDEF
=
0
;
VALID
=
1
;
//已授权可使用 相对消费者
USED
=
2
;
//已使用
FROZEN
=
3
;
//未授权
UNFROZEN
=
4
;
//已授权 相对授权者
}
message
WalletNoteInfo
{
string
noteHash
=
1
;
string
nullifier
=
2
;
string
authorizeSpendHash
=
3
;
string
authorizeHash
=
4
;
string
account
=
5
;
//账户地址
NoteStatus
status
=
6
;
SecretData
secret
=
7
;
}
message
WalletDbMixInfo
{
WalletNoteInfo
info
=
1
;
string
txIndex
=
2
;
}
message
WalletMixIndexReq
{
string
noteHash
=
1
;
string
nullifier
=
2
;
string
authorizeSpendHash
=
3
;
string
authorizeHash
=
4
;
string
account
=
5
;
int32
status
=
6
;
int32
count
=
7
;
int32
direction
=
8
;
}
message
WalletNoteResp
{
repeated
WalletNoteInfo
notes
=
1
;
}
message
WalletEnablePrivacyRst
{
string
addr
=
1
;
bool
isOK
=
2
;
string
msg
=
3
;
}
message
WalletEnablePrivacyResp
{
repeated
WalletEnablePrivacyRst
resps
=
1
;
}
enum
MixWalletRescanStatus
{
IDLE
=
0
;
SCANNING
=
1
;
FINISHED
=
2
;
}
///////localdb index query
message
LocalMixTx
{
...
...
@@ -487,23 +162,3 @@ message MixTxListReq{
message
MixTxListResp
{
repeated
LocalMixTx
txs
=
1
;
}
message
PrivacyAddrResult
{
string
addr
=
1
;
bool
isOK
=
2
;
string
msg
=
3
;
}
message
ReqEnablePrivacyRst
{
repeated
PrivacyAddrResult
results
=
1
;
}
service
mixPrivacy
{
// 扫描UTXO以及获取扫描UTXO后的状态
rpc
GetRescanStatus
(
ReqNil
)
returns
(
ReqString
)
{}
// 使能隐私账户
rpc
RescanNotes
(
ReqNil
)
returns
(
ReqString
)
{}
// 创建隐私交易
rpc
EnablePrivacy
(
ReqAddrs
)
returns
(
ReqEnablePrivacyRst
)
{}
}
\ No newline at end of file
plugin/dapp/mix/proto/wallet.proto
0 → 100644
View file @
e9e31f64
syntax
=
"proto3"
;
import
"common.proto"
;
import
"transaction.proto"
;
import
"cryptokey.proto"
;
package
types
;
option
go_package
=
"../types"
;
//支持同时存入多个地址,多个地址具有相同的returnAddr和AuthorizeAddr,如果不同,则单个来存
message
DepositInfo
{
string
receiverAddrs
=
1
;
string
returnAddr
=
2
;
string
authorizeAddr
=
3
;
string
amounts
=
4
;
}
//钱包生成deposit tx
message
DepositTxReq
{
DepositInfo
deposit
=
1
;
string
zkPath
=
2
;
}
message
DepositProofResp
{
string
noteHash
=
1
;
SecretData
proof
=
2
;
DHSecretGroup
secrets
=
3
;
}
//可withdraw 多个note
message
WithdrawTxReq
{
uint64
totalAmount
=
1
;
string
noteHashs
=
2
;
// seperate by ","
string
zkPath
=
3
;
}
//只授权一个note,超过一个,toAddr不好设置
message
AuthTxReq
{
string
noteHash
=
1
;
string
authorizeToAddr
=
2
;
string
zkPath
=
3
;
}
message
TransferInputTxReq
{
string
noteHashs
=
1
;
}
message
TransferOutputTxReq
{
DepositInfo
deposit
=
1
;
}
message
TransferTxReq
{
TransferInputTxReq
input
=
1
;
TransferOutputTxReq
output
=
2
;
string
zkPath
=
3
;
}
message
CreateZkKeyFileReq
{
int32
ty
=
1
;
string
savePath
=
2
;
}
//加密了的input/output amount
message
ShieldAmount
{
string
X
=
1
;
string
Y
=
2
;
}
message
ShieldAmountRst
{
repeated
string
inputRandoms
=
1
;
string
outputRandom
=
2
;
string
changeRandom
=
3
;
repeated
ShieldAmount
inputs
=
4
;
ShieldAmount
output
=
5
;
ShieldAmount
change
=
6
;
}
message
CreateRawTxReq
{
int32
actionTy
=
1
;
bytes
data
=
4
;
string
assetExec
=
2
;
string
assetSymbol
=
3
;
string
title
=
6
;
//平行链名字
bool
verifyOnChain
=
7
;
//true:链上验证,false:本地验证
}
message
PaymentKeysReq
{
string
privKey
=
1
;
//user wallet priv key
string
addr
=
2
;
//user addr
bool
detail
=
3
;
//获取私钥信息
}
enum
NoteStatus
{
UNDEF
=
0
;
VALID
=
1
;
//已授权可使用 相对消费者
USED
=
2
;
//已使用
FROZEN
=
3
;
//未授权
UNFROZEN
=
4
;
//已授权 相对授权者
}
message
WalletNoteInfo
{
string
noteHash
=
1
;
string
nullifier
=
2
;
string
authorizeSpendHash
=
3
;
string
authorizeHash
=
4
;
string
account
=
5
;
//账户地址
NoteStatus
status
=
6
;
SecretData
secret
=
7
;
}
message
WalletDbMixInfo
{
WalletNoteInfo
info
=
1
;
string
txIndex
=
2
;
}
message
WalletMixIndexReq
{
string
noteHash
=
1
;
string
nullifier
=
2
;
string
authorizeSpendHash
=
3
;
string
authorizeHash
=
4
;
string
account
=
5
;
int32
status
=
6
;
int32
count
=
7
;
int32
direction
=
8
;
}
message
WalletNoteResp
{
repeated
WalletNoteInfo
notes
=
1
;
}
message
WalletEnablePrivacyRst
{
string
addr
=
1
;
bool
isOK
=
2
;
string
msg
=
3
;
}
message
WalletEnablePrivacyResp
{
repeated
WalletEnablePrivacyRst
resps
=
1
;
}
enum
MixWalletRescanStatus
{
IDLE
=
0
;
SCANNING
=
1
;
FINISHED
=
2
;
}
message
PrivacyAddrResult
{
string
addr
=
1
;
bool
isOK
=
2
;
string
msg
=
3
;
}
message
ReqEnablePrivacyRst
{
repeated
PrivacyAddrResult
results
=
1
;
}
service
mixPrivacy
{
// 扫描UTXO以及获取扫描UTXO后的状态
rpc
GetRescanStatus
(
ReqNil
)
returns
(
ReqString
)
{}
// 使能隐私账户
rpc
RescanNotes
(
ReqNil
)
returns
(
ReqString
)
{}
// 创建隐私交易
rpc
EnablePrivacy
(
ReqAddrs
)
returns
(
ReqEnablePrivacyRst
)
{}
}
\ No newline at end of file
plugin/dapp/mix/types/cryptokey.pb.go
0 → 100644
View file @
e9e31f64
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.9.1
// source: cryptokey.proto
package
types
import
(
reflect
"reflect"
sync
"sync"
proto
"github.com/golang/protobuf/proto"
protoreflect
"google.golang.org/protobuf/reflect/protoreflect"
protoimpl
"google.golang.org/protobuf/runtime/protoimpl"
)
const
(
// Verify that this generated code is sufficiently up-to-date.
_
=
protoimpl
.
EnforceVersion
(
20
-
protoimpl
.
MinVersion
)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_
=
protoimpl
.
EnforceVersion
(
protoimpl
.
MaxVersion
-
20
)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const
_
=
proto
.
ProtoPackageIsVersion4
//DH one time pubkey with secret
type
DHSecret
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
OneTimePubKey
string
`protobuf:"bytes,1,opt,name=oneTimePubKey,proto3" json:"oneTimePubKey,omitempty"`
Secret
string
`protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"`
}
func
(
x
*
DHSecret
)
Reset
()
{
*
x
=
DHSecret
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_cryptokey_proto_msgTypes
[
0
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
DHSecret
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
DHSecret
)
ProtoMessage
()
{}
func
(
x
*
DHSecret
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_cryptokey_proto_msgTypes
[
0
]
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 DHSecret.ProtoReflect.Descriptor instead.
func
(
*
DHSecret
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_cryptokey_proto_rawDescGZIP
(),
[]
int
{
0
}
}
func
(
x
*
DHSecret
)
GetOneTimePubKey
()
string
{
if
x
!=
nil
{
return
x
.
OneTimePubKey
}
return
""
}
func
(
x
*
DHSecret
)
GetSecret
()
string
{
if
x
!=
nil
{
return
x
.
Secret
}
return
""
}
//Diff-Helman 加密group, for spender, returner, authorizer to decrypt
type
DHSecretGroup
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Receiver
string
`protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"`
Returner
string
`protobuf:"bytes,2,opt,name=returner,proto3" json:"returner,omitempty"`
Authorize
string
`protobuf:"bytes,3,opt,name=authorize,proto3" json:"authorize,omitempty"`
}
func
(
x
*
DHSecretGroup
)
Reset
()
{
*
x
=
DHSecretGroup
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_cryptokey_proto_msgTypes
[
1
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
DHSecretGroup
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
DHSecretGroup
)
ProtoMessage
()
{}
func
(
x
*
DHSecretGroup
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_cryptokey_proto_msgTypes
[
1
]
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 DHSecretGroup.ProtoReflect.Descriptor instead.
func
(
*
DHSecretGroup
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_cryptokey_proto_rawDescGZIP
(),
[]
int
{
1
}
}
func
(
x
*
DHSecretGroup
)
GetReceiver
()
string
{
if
x
!=
nil
{
return
x
.
Receiver
}
return
""
}
func
(
x
*
DHSecretGroup
)
GetReturner
()
string
{
if
x
!=
nil
{
return
x
.
Returner
}
return
""
}
func
(
x
*
DHSecretGroup
)
GetAuthorize
()
string
{
if
x
!=
nil
{
return
x
.
Authorize
}
return
""
}
// note payment account
// receiveKey = hash(spendKey)
type
NoteKeyPair
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
ReceiveKey
string
`protobuf:"bytes,1,opt,name=receiveKey,proto3" json:"receiveKey,omitempty"`
SpendKey
string
`protobuf:"bytes,2,opt,name=spendKey,proto3" json:"spendKey,omitempty"`
}
func
(
x
*
NoteKeyPair
)
Reset
()
{
*
x
=
NoteKeyPair
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_cryptokey_proto_msgTypes
[
2
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
NoteKeyPair
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
NoteKeyPair
)
ProtoMessage
()
{}
func
(
x
*
NoteKeyPair
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_cryptokey_proto_msgTypes
[
2
]
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 NoteKeyPair.ProtoReflect.Descriptor instead.
func
(
*
NoteKeyPair
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_cryptokey_proto_rawDescGZIP
(),
[]
int
{
2
}
}
func
(
x
*
NoteKeyPair
)
GetReceiveKey
()
string
{
if
x
!=
nil
{
return
x
.
ReceiveKey
}
return
""
}
func
(
x
*
NoteKeyPair
)
GetSpendKey
()
string
{
if
x
!=
nil
{
return
x
.
SpendKey
}
return
""
}
// diff-hellman crypto key pair
// secretPrivKey = wallet private key * G_25519
// secretPubKey = secretPrivKey * G_25519
type
EncryptSecretKeyPair
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
SecretPrivKey
string
`protobuf:"bytes,1,opt,name=secretPrivKey,proto3" json:"secretPrivKey,omitempty"`
SecretPubKey
string
`protobuf:"bytes,2,opt,name=secretPubKey,proto3" json:"secretPubKey,omitempty"`
}
func
(
x
*
EncryptSecretKeyPair
)
Reset
()
{
*
x
=
EncryptSecretKeyPair
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_cryptokey_proto_msgTypes
[
3
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
EncryptSecretKeyPair
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
EncryptSecretKeyPair
)
ProtoMessage
()
{}
func
(
x
*
EncryptSecretKeyPair
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_cryptokey_proto_msgTypes
[
3
]
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 EncryptSecretKeyPair.ProtoReflect.Descriptor instead.
func
(
*
EncryptSecretKeyPair
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_cryptokey_proto_rawDescGZIP
(),
[]
int
{
3
}
}
func
(
x
*
EncryptSecretKeyPair
)
GetSecretPrivKey
()
string
{
if
x
!=
nil
{
return
x
.
SecretPrivKey
}
return
""
}
func
(
x
*
EncryptSecretKeyPair
)
GetSecretPubKey
()
string
{
if
x
!=
nil
{
return
x
.
SecretPubKey
}
return
""
}
//spend pair for note proof
//crypt pair for DH crypt/decrypt
type
AccountPrivacyKey
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
PaymentKey
*
NoteKeyPair
`protobuf:"bytes,1,opt,name=paymentKey,proto3" json:"paymentKey,omitempty"`
SecretKey
*
EncryptSecretKeyPair
`protobuf:"bytes,2,opt,name=secretKey,proto3" json:"secretKey,omitempty"`
}
func
(
x
*
AccountPrivacyKey
)
Reset
()
{
*
x
=
AccountPrivacyKey
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_cryptokey_proto_msgTypes
[
4
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
AccountPrivacyKey
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
AccountPrivacyKey
)
ProtoMessage
()
{}
func
(
x
*
AccountPrivacyKey
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_cryptokey_proto_msgTypes
[
4
]
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 AccountPrivacyKey.ProtoReflect.Descriptor instead.
func
(
*
AccountPrivacyKey
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_cryptokey_proto_rawDescGZIP
(),
[]
int
{
4
}
}
func
(
x
*
AccountPrivacyKey
)
GetPaymentKey
()
*
NoteKeyPair
{
if
x
!=
nil
{
return
x
.
PaymentKey
}
return
nil
}
func
(
x
*
AccountPrivacyKey
)
GetSecretKey
()
*
EncryptSecretKeyPair
{
if
x
!=
nil
{
return
x
.
SecretKey
}
return
nil
}
type
WalletAddrPrivacy
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Privacy
*
AccountPrivacyKey
`protobuf:"bytes,1,opt,name=privacy,proto3" json:"privacy,omitempty"`
Addr
string
`protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
}
func
(
x
*
WalletAddrPrivacy
)
Reset
()
{
*
x
=
WalletAddrPrivacy
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_cryptokey_proto_msgTypes
[
5
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
WalletAddrPrivacy
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
WalletAddrPrivacy
)
ProtoMessage
()
{}
func
(
x
*
WalletAddrPrivacy
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_cryptokey_proto_msgTypes
[
5
]
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 WalletAddrPrivacy.ProtoReflect.Descriptor instead.
func
(
*
WalletAddrPrivacy
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_cryptokey_proto_rawDescGZIP
(),
[]
int
{
5
}
}
func
(
x
*
WalletAddrPrivacy
)
GetPrivacy
()
*
AccountPrivacyKey
{
if
x
!=
nil
{
return
x
.
Privacy
}
return
nil
}
func
(
x
*
WalletAddrPrivacy
)
GetAddr
()
string
{
if
x
!=
nil
{
return
x
.
Addr
}
return
""
}
type
SecretData
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
ReceiverKey
string
`protobuf:"bytes,1,opt,name=receiverKey,proto3" json:"receiverKey,omitempty"`
ReturnKey
string
`protobuf:"bytes,2,opt,name=returnKey,proto3" json:"returnKey,omitempty"`
AuthorizeKey
string
`protobuf:"bytes,3,opt,name=authorizeKey,proto3" json:"authorizeKey,omitempty"`
Amount
string
`protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"`
NoteRandom
string
`protobuf:"bytes,5,opt,name=noteRandom,proto3" json:"noteRandom,omitempty"`
AssetExec
string
`protobuf:"bytes,6,opt,name=assetExec,proto3" json:"assetExec,omitempty"`
AssetSymbol
string
`protobuf:"bytes,7,opt,name=assetSymbol,proto3" json:"assetSymbol,omitempty"`
}
func
(
x
*
SecretData
)
Reset
()
{
*
x
=
SecretData
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_cryptokey_proto_msgTypes
[
6
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
SecretData
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
SecretData
)
ProtoMessage
()
{}
func
(
x
*
SecretData
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_cryptokey_proto_msgTypes
[
6
]
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 SecretData.ProtoReflect.Descriptor instead.
func
(
*
SecretData
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_cryptokey_proto_rawDescGZIP
(),
[]
int
{
6
}
}
func
(
x
*
SecretData
)
GetReceiverKey
()
string
{
if
x
!=
nil
{
return
x
.
ReceiverKey
}
return
""
}
func
(
x
*
SecretData
)
GetReturnKey
()
string
{
if
x
!=
nil
{
return
x
.
ReturnKey
}
return
""
}
func
(
x
*
SecretData
)
GetAuthorizeKey
()
string
{
if
x
!=
nil
{
return
x
.
AuthorizeKey
}
return
""
}
func
(
x
*
SecretData
)
GetAmount
()
string
{
if
x
!=
nil
{
return
x
.
Amount
}
return
""
}
func
(
x
*
SecretData
)
GetNoteRandom
()
string
{
if
x
!=
nil
{
return
x
.
NoteRandom
}
return
""
}
func
(
x
*
SecretData
)
GetAssetExec
()
string
{
if
x
!=
nil
{
return
x
.
AssetExec
}
return
""
}
func
(
x
*
SecretData
)
GetAssetSymbol
()
string
{
if
x
!=
nil
{
return
x
.
AssetSymbol
}
return
""
}
type
EncryptSecretData
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Secret
string
`protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"`
PeerSecretPubKey
string
`protobuf:"bytes,2,opt,name=peerSecretPubKey,proto3" json:"peerSecretPubKey,omitempty"`
}
func
(
x
*
EncryptSecretData
)
Reset
()
{
*
x
=
EncryptSecretData
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_cryptokey_proto_msgTypes
[
7
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
EncryptSecretData
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
EncryptSecretData
)
ProtoMessage
()
{}
func
(
x
*
EncryptSecretData
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_cryptokey_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 EncryptSecretData.ProtoReflect.Descriptor instead.
func
(
*
EncryptSecretData
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_cryptokey_proto_rawDescGZIP
(),
[]
int
{
7
}
}
func
(
x
*
EncryptSecretData
)
GetSecret
()
string
{
if
x
!=
nil
{
return
x
.
Secret
}
return
""
}
func
(
x
*
EncryptSecretData
)
GetPeerSecretPubKey
()
string
{
if
x
!=
nil
{
return
x
.
PeerSecretPubKey
}
return
""
}
type
DecryptSecretData
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Secret
string
`protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"`
SecretPriKey
string
`protobuf:"bytes,2,opt,name=secretPriKey,proto3" json:"secretPriKey,omitempty"`
OneTimePubKey
string
`protobuf:"bytes,3,opt,name=oneTimePubKey,proto3" json:"oneTimePubKey,omitempty"`
}
func
(
x
*
DecryptSecretData
)
Reset
()
{
*
x
=
DecryptSecretData
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_cryptokey_proto_msgTypes
[
8
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
DecryptSecretData
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
DecryptSecretData
)
ProtoMessage
()
{}
func
(
x
*
DecryptSecretData
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_cryptokey_proto_msgTypes
[
8
]
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 DecryptSecretData.ProtoReflect.Descriptor instead.
func
(
*
DecryptSecretData
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_cryptokey_proto_rawDescGZIP
(),
[]
int
{
8
}
}
func
(
x
*
DecryptSecretData
)
GetSecret
()
string
{
if
x
!=
nil
{
return
x
.
Secret
}
return
""
}
func
(
x
*
DecryptSecretData
)
GetSecretPriKey
()
string
{
if
x
!=
nil
{
return
x
.
SecretPriKey
}
return
""
}
func
(
x
*
DecryptSecretData
)
GetOneTimePubKey
()
string
{
if
x
!=
nil
{
return
x
.
OneTimePubKey
}
return
""
}
var
File_cryptokey_proto
protoreflect
.
FileDescriptor
var
file_cryptokey_proto_rawDesc
=
[]
byte
{
0x0a
,
0x0f
,
0x63
,
0x72
,
0x79
,
0x70
,
0x74
,
0x6f
,
0x6b
,
0x65
,
0x79
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x12
,
0x05
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x22
,
0x48
,
0x0a
,
0x08
,
0x44
,
0x48
,
0x53
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x12
,
0x24
,
0x0a
,
0x0d
,
0x6f
,
0x6e
,
0x65
,
0x54
,
0x69
,
0x6d
,
0x65
,
0x50
,
0x75
,
0x62
,
0x4b
,
0x65
,
0x79
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0d
,
0x6f
,
0x6e
,
0x65
,
0x54
,
0x69
,
0x6d
,
0x65
,
0x50
,
0x75
,
0x62
,
0x4b
,
0x65
,
0x79
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x73
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x73
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x22
,
0x65
,
0x0a
,
0x0d
,
0x44
,
0x48
,
0x53
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x47
,
0x72
,
0x6f
,
0x75
,
0x70
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x72
,
0x65
,
0x63
,
0x65
,
0x69
,
0x76
,
0x65
,
0x72
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x08
,
0x72
,
0x65
,
0x63
,
0x65
,
0x69
,
0x76
,
0x65
,
0x72
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x72
,
0x65
,
0x74
,
0x75
,
0x72
,
0x6e
,
0x65
,
0x72
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x08
,
0x72
,
0x65
,
0x74
,
0x75
,
0x72
,
0x6e
,
0x65
,
0x72
,
0x12
,
0x1c
,
0x0a
,
0x09
,
0x61
,
0x75
,
0x74
,
0x68
,
0x6f
,
0x72
,
0x69
,
0x7a
,
0x65
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x09
,
0x61
,
0x75
,
0x74
,
0x68
,
0x6f
,
0x72
,
0x69
,
0x7a
,
0x65
,
0x22
,
0x49
,
0x0a
,
0x0b
,
0x4e
,
0x6f
,
0x74
,
0x65
,
0x4b
,
0x65
,
0x79
,
0x50
,
0x61
,
0x69
,
0x72
,
0x12
,
0x1e
,
0x0a
,
0x0a
,
0x72
,
0x65
,
0x63
,
0x65
,
0x69
,
0x76
,
0x65
,
0x4b
,
0x65
,
0x79
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0a
,
0x72
,
0x65
,
0x63
,
0x65
,
0x69
,
0x76
,
0x65
,
0x4b
,
0x65
,
0x79
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x73
,
0x70
,
0x65
,
0x6e
,
0x64
,
0x4b
,
0x65
,
0x79
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x08
,
0x73
,
0x70
,
0x65
,
0x6e
,
0x64
,
0x4b
,
0x65
,
0x79
,
0x22
,
0x60
,
0x0a
,
0x14
,
0x45
,
0x6e
,
0x63
,
0x72
,
0x79
,
0x70
,
0x74
,
0x53
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x4b
,
0x65
,
0x79
,
0x50
,
0x61
,
0x69
,
0x72
,
0x12
,
0x24
,
0x0a
,
0x0d
,
0x73
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x50
,
0x72
,
0x69
,
0x76
,
0x4b
,
0x65
,
0x79
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0d
,
0x73
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x50
,
0x72
,
0x69
,
0x76
,
0x4b
,
0x65
,
0x79
,
0x12
,
0x22
,
0x0a
,
0x0c
,
0x73
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x50
,
0x75
,
0x62
,
0x4b
,
0x65
,
0x79
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0c
,
0x73
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x50
,
0x75
,
0x62
,
0x4b
,
0x65
,
0x79
,
0x22
,
0x82
,
0x01
,
0x0a
,
0x11
,
0x41
,
0x63
,
0x63
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x50
,
0x72
,
0x69
,
0x76
,
0x61
,
0x63
,
0x79
,
0x4b
,
0x65
,
0x79
,
0x12
,
0x32
,
0x0a
,
0x0a
,
0x70
,
0x61
,
0x79
,
0x6d
,
0x65
,
0x6e
,
0x74
,
0x4b
,
0x65
,
0x79
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x12
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x4e
,
0x6f
,
0x74
,
0x65
,
0x4b
,
0x65
,
0x79
,
0x50
,
0x61
,
0x69
,
0x72
,
0x52
,
0x0a
,
0x70
,
0x61
,
0x79
,
0x6d
,
0x65
,
0x6e
,
0x74
,
0x4b
,
0x65
,
0x79
,
0x12
,
0x39
,
0x0a
,
0x09
,
0x73
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x4b
,
0x65
,
0x79
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x1b
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x45
,
0x6e
,
0x63
,
0x72
,
0x79
,
0x70
,
0x74
,
0x53
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x4b
,
0x65
,
0x79
,
0x50
,
0x61
,
0x69
,
0x72
,
0x52
,
0x09
,
0x73
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x4b
,
0x65
,
0x79
,
0x22
,
0x5b
,
0x0a
,
0x11
,
0x57
,
0x61
,
0x6c
,
0x6c
,
0x65
,
0x74
,
0x41
,
0x64
,
0x64
,
0x72
,
0x50
,
0x72
,
0x69
,
0x76
,
0x61
,
0x63
,
0x79
,
0x12
,
0x32
,
0x0a
,
0x07
,
0x70
,
0x72
,
0x69
,
0x76
,
0x61
,
0x63
,
0x79
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x18
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x41
,
0x63
,
0x63
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x50
,
0x72
,
0x69
,
0x76
,
0x61
,
0x63
,
0x79
,
0x4b
,
0x65
,
0x79
,
0x52
,
0x07
,
0x70
,
0x72
,
0x69
,
0x76
,
0x61
,
0x63
,
0x79
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x61
,
0x64
,
0x64
,
0x72
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x61
,
0x64
,
0x64
,
0x72
,
0x22
,
0xe8
,
0x01
,
0x0a
,
0x0a
,
0x53
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x44
,
0x61
,
0x74
,
0x61
,
0x12
,
0x20
,
0x0a
,
0x0b
,
0x72
,
0x65
,
0x63
,
0x65
,
0x69
,
0x76
,
0x65
,
0x72
,
0x4b
,
0x65
,
0x79
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0b
,
0x72
,
0x65
,
0x63
,
0x65
,
0x69
,
0x76
,
0x65
,
0x72
,
0x4b
,
0x65
,
0x79
,
0x12
,
0x1c
,
0x0a
,
0x09
,
0x72
,
0x65
,
0x74
,
0x75
,
0x72
,
0x6e
,
0x4b
,
0x65
,
0x79
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x09
,
0x72
,
0x65
,
0x74
,
0x75
,
0x72
,
0x6e
,
0x4b
,
0x65
,
0x79
,
0x12
,
0x22
,
0x0a
,
0x0c
,
0x61
,
0x75
,
0x74
,
0x68
,
0x6f
,
0x72
,
0x69
,
0x7a
,
0x65
,
0x4b
,
0x65
,
0x79
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0c
,
0x61
,
0x75
,
0x74
,
0x68
,
0x6f
,
0x72
,
0x69
,
0x7a
,
0x65
,
0x4b
,
0x65
,
0x79
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x61
,
0x6d
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x18
,
0x04
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x61
,
0x6d
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x12
,
0x1e
,
0x0a
,
0x0a
,
0x6e
,
0x6f
,
0x74
,
0x65
,
0x52
,
0x61
,
0x6e
,
0x64
,
0x6f
,
0x6d
,
0x18
,
0x05
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0a
,
0x6e
,
0x6f
,
0x74
,
0x65
,
0x52
,
0x61
,
0x6e
,
0x64
,
0x6f
,
0x6d
,
0x12
,
0x1c
,
0x0a
,
0x09
,
0x61
,
0x73
,
0x73
,
0x65
,
0x74
,
0x45
,
0x78
,
0x65
,
0x63
,
0x18
,
0x06
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x09
,
0x61
,
0x73
,
0x73
,
0x65
,
0x74
,
0x45
,
0x78
,
0x65
,
0x63
,
0x12
,
0x20
,
0x0a
,
0x0b
,
0x61
,
0x73
,
0x73
,
0x65
,
0x74
,
0x53
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x18
,
0x07
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0b
,
0x61
,
0x73
,
0x73
,
0x65
,
0x74
,
0x53
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x22
,
0x57
,
0x0a
,
0x11
,
0x45
,
0x6e
,
0x63
,
0x72
,
0x79
,
0x70
,
0x74
,
0x53
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x44
,
0x61
,
0x74
,
0x61
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x73
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x73
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x12
,
0x2a
,
0x0a
,
0x10
,
0x70
,
0x65
,
0x65
,
0x72
,
0x53
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x50
,
0x75
,
0x62
,
0x4b
,
0x65
,
0x79
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x10
,
0x70
,
0x65
,
0x65
,
0x72
,
0x53
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x50
,
0x75
,
0x62
,
0x4b
,
0x65
,
0x79
,
0x22
,
0x75
,
0x0a
,
0x11
,
0x44
,
0x65
,
0x63
,
0x72
,
0x79
,
0x70
,
0x74
,
0x53
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x44
,
0x61
,
0x74
,
0x61
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x73
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x73
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x12
,
0x22
,
0x0a
,
0x0c
,
0x73
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x50
,
0x72
,
0x69
,
0x4b
,
0x65
,
0x79
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0c
,
0x73
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x50
,
0x72
,
0x69
,
0x4b
,
0x65
,
0x79
,
0x12
,
0x24
,
0x0a
,
0x0d
,
0x6f
,
0x6e
,
0x65
,
0x54
,
0x69
,
0x6d
,
0x65
,
0x50
,
0x75
,
0x62
,
0x4b
,
0x65
,
0x79
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0d
,
0x6f
,
0x6e
,
0x65
,
0x54
,
0x69
,
0x6d
,
0x65
,
0x50
,
0x75
,
0x62
,
0x4b
,
0x65
,
0x79
,
0x42
,
0x0a
,
0x5a
,
0x08
,
0x2e
,
0x2e
,
0x2f
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
}
var
(
file_cryptokey_proto_rawDescOnce
sync
.
Once
file_cryptokey_proto_rawDescData
=
file_cryptokey_proto_rawDesc
)
func
file_cryptokey_proto_rawDescGZIP
()
[]
byte
{
file_cryptokey_proto_rawDescOnce
.
Do
(
func
()
{
file_cryptokey_proto_rawDescData
=
protoimpl
.
X
.
CompressGZIP
(
file_cryptokey_proto_rawDescData
)
})
return
file_cryptokey_proto_rawDescData
}
var
file_cryptokey_proto_msgTypes
=
make
([]
protoimpl
.
MessageInfo
,
9
)
var
file_cryptokey_proto_goTypes
=
[]
interface
{}{
(
*
DHSecret
)(
nil
),
// 0: types.DHSecret
(
*
DHSecretGroup
)(
nil
),
// 1: types.DHSecretGroup
(
*
NoteKeyPair
)(
nil
),
// 2: types.NoteKeyPair
(
*
EncryptSecretKeyPair
)(
nil
),
// 3: types.EncryptSecretKeyPair
(
*
AccountPrivacyKey
)(
nil
),
// 4: types.AccountPrivacyKey
(
*
WalletAddrPrivacy
)(
nil
),
// 5: types.WalletAddrPrivacy
(
*
SecretData
)(
nil
),
// 6: types.SecretData
(
*
EncryptSecretData
)(
nil
),
// 7: types.EncryptSecretData
(
*
DecryptSecretData
)(
nil
),
// 8: types.DecryptSecretData
}
var
file_cryptokey_proto_depIdxs
=
[]
int32
{
2
,
// 0: types.AccountPrivacyKey.paymentKey:type_name -> types.NoteKeyPair
3
,
// 1: types.AccountPrivacyKey.secretKey:type_name -> types.EncryptSecretKeyPair
4
,
// 2: types.WalletAddrPrivacy.privacy:type_name -> types.AccountPrivacyKey
3
,
// [3:3] is the sub-list for method output_type
3
,
// [3:3] is the sub-list for method input_type
3
,
// [3:3] is the sub-list for extension type_name
3
,
// [3:3] is the sub-list for extension extendee
0
,
// [0:3] is the sub-list for field type_name
}
func
init
()
{
file_cryptokey_proto_init
()
}
func
file_cryptokey_proto_init
()
{
if
File_cryptokey_proto
!=
nil
{
return
}
if
!
protoimpl
.
UnsafeEnabled
{
file_cryptokey_proto_msgTypes
[
0
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
DHSecret
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_cryptokey_proto_msgTypes
[
1
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
DHSecretGroup
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_cryptokey_proto_msgTypes
[
2
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
NoteKeyPair
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_cryptokey_proto_msgTypes
[
3
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
EncryptSecretKeyPair
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_cryptokey_proto_msgTypes
[
4
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
AccountPrivacyKey
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_cryptokey_proto_msgTypes
[
5
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
WalletAddrPrivacy
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_cryptokey_proto_msgTypes
[
6
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
SecretData
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_cryptokey_proto_msgTypes
[
7
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
EncryptSecretData
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_cryptokey_proto_msgTypes
[
8
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
DecryptSecretData
);
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
:
file_cryptokey_proto_rawDesc
,
NumEnums
:
0
,
NumMessages
:
9
,
NumExtensions
:
0
,
NumServices
:
0
,
},
GoTypes
:
file_cryptokey_proto_goTypes
,
DependencyIndexes
:
file_cryptokey_proto_depIdxs
,
MessageInfos
:
file_cryptokey_proto_msgTypes
,
}
.
Build
()
File_cryptokey_proto
=
out
.
File
file_cryptokey_proto_rawDesc
=
nil
file_cryptokey_proto_goTypes
=
nil
file_cryptokey_proto_depIdxs
=
nil
}
plugin/dapp/mix/types/merkletree.pb.go
0 → 100644
View file @
e9e31f64
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.9.1
// source: merkletree.proto
package
types
import
(
reflect
"reflect"
sync
"sync"
proto
"github.com/golang/protobuf/proto"
protoreflect
"google.golang.org/protobuf/reflect/protoreflect"
protoimpl
"google.golang.org/protobuf/runtime/protoimpl"
)
const
(
// Verify that this generated code is sufficiently up-to-date.
_
=
protoimpl
.
EnforceVersion
(
20
-
protoimpl
.
MinVersion
)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_
=
protoimpl
.
EnforceVersion
(
protoimpl
.
MaxVersion
-
20
)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const
_
=
proto
.
ProtoPackageIsVersion4
//子树用高度和hash描述,2^10=1024个叶子节点,子树高度不会超过10
type
CommitSubTree
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Height
int32
`protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
Hash
[]
byte
`protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
}
func
(
x
*
CommitSubTree
)
Reset
()
{
*
x
=
CommitSubTree
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_merkletree_proto_msgTypes
[
0
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
CommitSubTree
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
CommitSubTree
)
ProtoMessage
()
{}
func
(
x
*
CommitSubTree
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_merkletree_proto_msgTypes
[
0
]
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 CommitSubTree.ProtoReflect.Descriptor instead.
func
(
*
CommitSubTree
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_merkletree_proto_rawDescGZIP
(),
[]
int
{
0
}
}
func
(
x
*
CommitSubTree
)
GetHeight
()
int32
{
if
x
!=
nil
{
return
x
.
Height
}
return
0
}
func
(
x
*
CommitSubTree
)
GetHash
()
[]
byte
{
if
x
!=
nil
{
return
x
.
Hash
}
return
nil
}
//merkel tree由子树和叶子组成,三种场景:1,初始只一个叶子, 2,全是子树, 3,子树加一个叶子,不会有两个叶子,两个叶子一定构成子树
type
CommitSubTrees
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
SubTrees
[]
*
CommitSubTree
`protobuf:"bytes,1,rep,name=subTrees,proto3" json:"subTrees,omitempty"`
}
func
(
x
*
CommitSubTrees
)
Reset
()
{
*
x
=
CommitSubTrees
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_merkletree_proto_msgTypes
[
1
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
CommitSubTrees
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
CommitSubTrees
)
ProtoMessage
()
{}
func
(
x
*
CommitSubTrees
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_merkletree_proto_msgTypes
[
1
]
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 CommitSubTrees.ProtoReflect.Descriptor instead.
func
(
*
CommitSubTrees
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_merkletree_proto_rawDescGZIP
(),
[]
int
{
1
}
}
func
(
x
*
CommitSubTrees
)
GetSubTrees
()
[]
*
CommitSubTree
{
if
x
!=
nil
{
return
x
.
SubTrees
}
return
nil
}
//描述当前commitTree的状态
//一颗merkel树1024叶子,考虑数据库读取原因,每个叶子都会存到相应seq db,待第1024次时候归档,重新开始新的merkle树,
type
CommitTreeStatus
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
SubTrees
*
CommitSubTrees
`protobuf:"bytes,1,opt,name=subTrees,proto3" json:"subTrees,omitempty"`
//1~1024叶子的归档
SubLeavesSeq
int32
`protobuf:"varint,2,opt,name=subLeavesSeq,proto3" json:"subLeavesSeq,omitempty"`
//root的归档 从1开始,数据库占位,不然全空会往前搜索
ArchiveRootsSeq
uint64
`protobuf:"varint,3,opt,name=archiveRootsSeq,proto3" json:"archiveRootsSeq,omitempty"`
AssetExec
string
`protobuf:"bytes,4,opt,name=assetExec,proto3" json:"assetExec,omitempty"`
AssetSymbol
string
`protobuf:"bytes,5,opt,name=assetSymbol,proto3" json:"assetSymbol,omitempty"`
}
func
(
x
*
CommitTreeStatus
)
Reset
()
{
*
x
=
CommitTreeStatus
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_merkletree_proto_msgTypes
[
2
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
CommitTreeStatus
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
CommitTreeStatus
)
ProtoMessage
()
{}
func
(
x
*
CommitTreeStatus
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_merkletree_proto_msgTypes
[
2
]
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 CommitTreeStatus.ProtoReflect.Descriptor instead.
func
(
*
CommitTreeStatus
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_merkletree_proto_rawDescGZIP
(),
[]
int
{
2
}
}
func
(
x
*
CommitTreeStatus
)
GetSubTrees
()
*
CommitSubTrees
{
if
x
!=
nil
{
return
x
.
SubTrees
}
return
nil
}
func
(
x
*
CommitTreeStatus
)
GetSubLeavesSeq
()
int32
{
if
x
!=
nil
{
return
x
.
SubLeavesSeq
}
return
0
}
func
(
x
*
CommitTreeStatus
)
GetArchiveRootsSeq
()
uint64
{
if
x
!=
nil
{
return
x
.
ArchiveRootsSeq
}
return
0
}
func
(
x
*
CommitTreeStatus
)
GetAssetExec
()
string
{
if
x
!=
nil
{
return
x
.
AssetExec
}
return
""
}
func
(
x
*
CommitTreeStatus
)
GetAssetSymbol
()
string
{
if
x
!=
nil
{
return
x
.
AssetSymbol
}
return
""
}
type
ReceiptCommitTreeStatus
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Prev
*
CommitTreeStatus
`protobuf:"bytes,1,opt,name=prev,proto3" json:"prev,omitempty"`
Current
*
CommitTreeStatus
`protobuf:"bytes,2,opt,name=current,proto3" json:"current,omitempty"`
}
func
(
x
*
ReceiptCommitTreeStatus
)
Reset
()
{
*
x
=
ReceiptCommitTreeStatus
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_merkletree_proto_msgTypes
[
3
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
ReceiptCommitTreeStatus
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
ReceiptCommitTreeStatus
)
ProtoMessage
()
{}
func
(
x
*
ReceiptCommitTreeStatus
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_merkletree_proto_msgTypes
[
3
]
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 ReceiptCommitTreeStatus.ProtoReflect.Descriptor instead.
func
(
*
ReceiptCommitTreeStatus
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_merkletree_proto_rawDescGZIP
(),
[]
int
{
3
}
}
func
(
x
*
ReceiptCommitTreeStatus
)
GetPrev
()
*
CommitTreeStatus
{
if
x
!=
nil
{
return
x
.
Prev
}
return
nil
}
func
(
x
*
ReceiptCommitTreeStatus
)
GetCurrent
()
*
CommitTreeStatus
{
if
x
!=
nil
{
return
x
.
Current
}
return
nil
}
type
ReceiptCommitSubLeaves
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Seq
int32
`protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"`
Leaf
string
`protobuf:"bytes,2,opt,name=leaf,proto3" json:"leaf,omitempty"`
}
func
(
x
*
ReceiptCommitSubLeaves
)
Reset
()
{
*
x
=
ReceiptCommitSubLeaves
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_merkletree_proto_msgTypes
[
4
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
ReceiptCommitSubLeaves
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
ReceiptCommitSubLeaves
)
ProtoMessage
()
{}
func
(
x
*
ReceiptCommitSubLeaves
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_merkletree_proto_msgTypes
[
4
]
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 ReceiptCommitSubLeaves.ProtoReflect.Descriptor instead.
func
(
*
ReceiptCommitSubLeaves
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_merkletree_proto_rawDescGZIP
(),
[]
int
{
4
}
}
func
(
x
*
ReceiptCommitSubLeaves
)
GetSeq
()
int32
{
if
x
!=
nil
{
return
x
.
Seq
}
return
0
}
func
(
x
*
ReceiptCommitSubLeaves
)
GetLeaf
()
string
{
if
x
!=
nil
{
return
x
.
Leaf
}
return
""
}
type
ReceiptCommitSubRoots
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Seq
int32
`protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"`
Root
string
`protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"`
}
func
(
x
*
ReceiptCommitSubRoots
)
Reset
()
{
*
x
=
ReceiptCommitSubRoots
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_merkletree_proto_msgTypes
[
5
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
ReceiptCommitSubRoots
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
ReceiptCommitSubRoots
)
ProtoMessage
()
{}
func
(
x
*
ReceiptCommitSubRoots
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_merkletree_proto_msgTypes
[
5
]
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 ReceiptCommitSubRoots.ProtoReflect.Descriptor instead.
func
(
*
ReceiptCommitSubRoots
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_merkletree_proto_rawDescGZIP
(),
[]
int
{
5
}
}
func
(
x
*
ReceiptCommitSubRoots
)
GetSeq
()
int32
{
if
x
!=
nil
{
return
x
.
Seq
}
return
0
}
func
(
x
*
ReceiptCommitSubRoots
)
GetRoot
()
string
{
if
x
!=
nil
{
return
x
.
Root
}
return
""
}
type
ReceiptArchiveLeaves
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Count
int32
`protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
RootHash
string
`protobuf:"bytes,2,opt,name=rootHash,proto3" json:"rootHash,omitempty"`
LastLeaf
string
`protobuf:"bytes,3,opt,name=lastLeaf,proto3" json:"lastLeaf,omitempty"`
}
func
(
x
*
ReceiptArchiveLeaves
)
Reset
()
{
*
x
=
ReceiptArchiveLeaves
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_merkletree_proto_msgTypes
[
6
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
ReceiptArchiveLeaves
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
ReceiptArchiveLeaves
)
ProtoMessage
()
{}
func
(
x
*
ReceiptArchiveLeaves
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_merkletree_proto_msgTypes
[
6
]
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 ReceiptArchiveLeaves.ProtoReflect.Descriptor instead.
func
(
*
ReceiptArchiveLeaves
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_merkletree_proto_rawDescGZIP
(),
[]
int
{
6
}
}
func
(
x
*
ReceiptArchiveLeaves
)
GetCount
()
int32
{
if
x
!=
nil
{
return
x
.
Count
}
return
0
}
func
(
x
*
ReceiptArchiveLeaves
)
GetRootHash
()
string
{
if
x
!=
nil
{
return
x
.
RootHash
}
return
""
}
func
(
x
*
ReceiptArchiveLeaves
)
GetLastLeaf
()
string
{
if
x
!=
nil
{
return
x
.
LastLeaf
}
return
""
}
type
ReceiptArchiveTreeRoot
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Seq
uint64
`protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"`
RootHash
string
`protobuf:"bytes,2,opt,name=rootHash,proto3" json:"rootHash,omitempty"`
}
func
(
x
*
ReceiptArchiveTreeRoot
)
Reset
()
{
*
x
=
ReceiptArchiveTreeRoot
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_merkletree_proto_msgTypes
[
7
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
ReceiptArchiveTreeRoot
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
ReceiptArchiveTreeRoot
)
ProtoMessage
()
{}
func
(
x
*
ReceiptArchiveTreeRoot
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_merkletree_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 ReceiptArchiveTreeRoot.ProtoReflect.Descriptor instead.
func
(
*
ReceiptArchiveTreeRoot
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_merkletree_proto_rawDescGZIP
(),
[]
int
{
7
}
}
func
(
x
*
ReceiptArchiveTreeRoot
)
GetSeq
()
uint64
{
if
x
!=
nil
{
return
x
.
Seq
}
return
0
}
func
(
x
*
ReceiptArchiveTreeRoot
)
GetRootHash
()
string
{
if
x
!=
nil
{
return
x
.
RootHash
}
return
""
}
type
CommitTreeLeaves
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Leaves
[][]
byte
`protobuf:"bytes,1,rep,name=leaves,proto3" json:"leaves,omitempty"`
}
func
(
x
*
CommitTreeLeaves
)
Reset
()
{
*
x
=
CommitTreeLeaves
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_merkletree_proto_msgTypes
[
8
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
CommitTreeLeaves
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
CommitTreeLeaves
)
ProtoMessage
()
{}
func
(
x
*
CommitTreeLeaves
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_merkletree_proto_msgTypes
[
8
]
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 CommitTreeLeaves.ProtoReflect.Descriptor instead.
func
(
*
CommitTreeLeaves
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_merkletree_proto_rawDescGZIP
(),
[]
int
{
8
}
}
func
(
x
*
CommitTreeLeaves
)
GetLeaves
()
[][]
byte
{
if
x
!=
nil
{
return
x
.
Leaves
}
return
nil
}
type
CommitTreeRoots
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Roots
[][]
byte
`protobuf:"bytes,1,rep,name=roots,proto3" json:"roots,omitempty"`
}
func
(
x
*
CommitTreeRoots
)
Reset
()
{
*
x
=
CommitTreeRoots
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_merkletree_proto_msgTypes
[
9
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
CommitTreeRoots
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
CommitTreeRoots
)
ProtoMessage
()
{}
func
(
x
*
CommitTreeRoots
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_merkletree_proto_msgTypes
[
9
]
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 CommitTreeRoots.ProtoReflect.Descriptor instead.
func
(
*
CommitTreeRoots
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_merkletree_proto_rawDescGZIP
(),
[]
int
{
9
}
}
func
(
x
*
CommitTreeRoots
)
GetRoots
()
[][]
byte
{
if
x
!=
nil
{
return
x
.
Roots
}
return
nil
}
type
CommitTreeProve
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
RootHash
string
`protobuf:"bytes,1,opt,name=rootHash,proto3" json:"rootHash,omitempty"`
ProofSet
[]
string
`protobuf:"bytes,2,rep,name=proofSet,proto3" json:"proofSet,omitempty"`
ProofIndex
uint32
`protobuf:"varint,3,opt,name=proofIndex,proto3" json:"proofIndex,omitempty"`
NumLeaves
uint32
`protobuf:"varint,4,opt,name=numLeaves,proto3" json:"numLeaves,omitempty"`
Helpers
[]
uint32
`protobuf:"varint,5,rep,packed,name=helpers,proto3" json:"helpers,omitempty"`
}
func
(
x
*
CommitTreeProve
)
Reset
()
{
*
x
=
CommitTreeProve
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_merkletree_proto_msgTypes
[
10
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
CommitTreeProve
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
CommitTreeProve
)
ProtoMessage
()
{}
func
(
x
*
CommitTreeProve
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_merkletree_proto_msgTypes
[
10
]
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 CommitTreeProve.ProtoReflect.Descriptor instead.
func
(
*
CommitTreeProve
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_merkletree_proto_rawDescGZIP
(),
[]
int
{
10
}
}
func
(
x
*
CommitTreeProve
)
GetRootHash
()
string
{
if
x
!=
nil
{
return
x
.
RootHash
}
return
""
}
func
(
x
*
CommitTreeProve
)
GetProofSet
()
[]
string
{
if
x
!=
nil
{
return
x
.
ProofSet
}
return
nil
}
func
(
x
*
CommitTreeProve
)
GetProofIndex
()
uint32
{
if
x
!=
nil
{
return
x
.
ProofIndex
}
return
0
}
func
(
x
*
CommitTreeProve
)
GetNumLeaves
()
uint32
{
if
x
!=
nil
{
return
x
.
NumLeaves
}
return
0
}
func
(
x
*
CommitTreeProve
)
GetHelpers
()
[]
uint32
{
if
x
!=
nil
{
return
x
.
Helpers
}
return
nil
}
type
TreeInfoReq
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
RootHash
string
`protobuf:"bytes,1,opt,name=rootHash,proto3" json:"rootHash,omitempty"`
LeafHash
string
`protobuf:"bytes,2,opt,name=leafHash,proto3" json:"leafHash,omitempty"`
AssetExec
string
`protobuf:"bytes,3,opt,name=assetExec,proto3" json:"assetExec,omitempty"`
AssetSymbol
string
`protobuf:"bytes,4,opt,name=assetSymbol,proto3" json:"assetSymbol,omitempty"`
RootHeight
uint64
`protobuf:"varint,5,opt,name=rootHeight,proto3" json:"rootHeight,omitempty"`
}
func
(
x
*
TreeInfoReq
)
Reset
()
{
*
x
=
TreeInfoReq
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_merkletree_proto_msgTypes
[
11
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
TreeInfoReq
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
TreeInfoReq
)
ProtoMessage
()
{}
func
(
x
*
TreeInfoReq
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_merkletree_proto_msgTypes
[
11
]
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 TreeInfoReq.ProtoReflect.Descriptor instead.
func
(
*
TreeInfoReq
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_merkletree_proto_rawDescGZIP
(),
[]
int
{
11
}
}
func
(
x
*
TreeInfoReq
)
GetRootHash
()
string
{
if
x
!=
nil
{
return
x
.
RootHash
}
return
""
}
func
(
x
*
TreeInfoReq
)
GetLeafHash
()
string
{
if
x
!=
nil
{
return
x
.
LeafHash
}
return
""
}
func
(
x
*
TreeInfoReq
)
GetAssetExec
()
string
{
if
x
!=
nil
{
return
x
.
AssetExec
}
return
""
}
func
(
x
*
TreeInfoReq
)
GetAssetSymbol
()
string
{
if
x
!=
nil
{
return
x
.
AssetSymbol
}
return
""
}
func
(
x
*
TreeInfoReq
)
GetRootHeight
()
uint64
{
if
x
!=
nil
{
return
x
.
RootHeight
}
return
0
}
type
TreeListResp
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Leaves
[]
string
`protobuf:"bytes,1,rep,name=leaves,proto3" json:"leaves,omitempty"`
}
func
(
x
*
TreeListResp
)
Reset
()
{
*
x
=
TreeListResp
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_merkletree_proto_msgTypes
[
12
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
TreeListResp
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
TreeListResp
)
ProtoMessage
()
{}
func
(
x
*
TreeListResp
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_merkletree_proto_msgTypes
[
12
]
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 TreeListResp.ProtoReflect.Descriptor instead.
func
(
*
TreeListResp
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_merkletree_proto_rawDescGZIP
(),
[]
int
{
12
}
}
func
(
x
*
TreeListResp
)
GetLeaves
()
[]
string
{
if
x
!=
nil
{
return
x
.
Leaves
}
return
nil
}
type
RootListResp
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Roots
[]
string
`protobuf:"bytes,1,rep,name=roots,proto3" json:"roots,omitempty"`
}
func
(
x
*
RootListResp
)
Reset
()
{
*
x
=
RootListResp
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_merkletree_proto_msgTypes
[
13
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
RootListResp
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
RootListResp
)
ProtoMessage
()
{}
func
(
x
*
RootListResp
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_merkletree_proto_msgTypes
[
13
]
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 RootListResp.ProtoReflect.Descriptor instead.
func
(
*
RootListResp
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_merkletree_proto_rawDescGZIP
(),
[]
int
{
13
}
}
func
(
x
*
RootListResp
)
GetRoots
()
[]
string
{
if
x
!=
nil
{
return
x
.
Roots
}
return
nil
}
type
SubTreeResp
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Height
int32
`protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
Hash
string
`protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
}
func
(
x
*
SubTreeResp
)
Reset
()
{
*
x
=
SubTreeResp
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_merkletree_proto_msgTypes
[
14
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
SubTreeResp
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
SubTreeResp
)
ProtoMessage
()
{}
func
(
x
*
SubTreeResp
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_merkletree_proto_msgTypes
[
14
]
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 SubTreeResp.ProtoReflect.Descriptor instead.
func
(
*
SubTreeResp
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_merkletree_proto_rawDescGZIP
(),
[]
int
{
14
}
}
func
(
x
*
SubTreeResp
)
GetHeight
()
int32
{
if
x
!=
nil
{
return
x
.
Height
}
return
0
}
func
(
x
*
SubTreeResp
)
GetHash
()
string
{
if
x
!=
nil
{
return
x
.
Hash
}
return
""
}
type
TreeStatusResp
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
SubLeavesSeq
int32
`protobuf:"varint,1,opt,name=subLeavesSeq,proto3" json:"subLeavesSeq,omitempty"`
ArchiveRootsSeq
uint64
`protobuf:"varint,2,opt,name=archiveRootsSeq,proto3" json:"archiveRootsSeq,omitempty"`
SubTrees
[]
*
SubTreeResp
`protobuf:"bytes,3,rep,name=subTrees,proto3" json:"subTrees,omitempty"`
}
func
(
x
*
TreeStatusResp
)
Reset
()
{
*
x
=
TreeStatusResp
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_merkletree_proto_msgTypes
[
15
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
TreeStatusResp
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
TreeStatusResp
)
ProtoMessage
()
{}
func
(
x
*
TreeStatusResp
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_merkletree_proto_msgTypes
[
15
]
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 TreeStatusResp.ProtoReflect.Descriptor instead.
func
(
*
TreeStatusResp
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_merkletree_proto_rawDescGZIP
(),
[]
int
{
15
}
}
func
(
x
*
TreeStatusResp
)
GetSubLeavesSeq
()
int32
{
if
x
!=
nil
{
return
x
.
SubLeavesSeq
}
return
0
}
func
(
x
*
TreeStatusResp
)
GetArchiveRootsSeq
()
uint64
{
if
x
!=
nil
{
return
x
.
ArchiveRootsSeq
}
return
0
}
func
(
x
*
TreeStatusResp
)
GetSubTrees
()
[]
*
SubTreeResp
{
if
x
!=
nil
{
return
x
.
SubTrees
}
return
nil
}
type
TreePathProof
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
TreeRootHash
string
`protobuf:"bytes,1,opt,name=treeRootHash,proto3" json:"treeRootHash,omitempty"`
TreePath
[]
string
`protobuf:"bytes,2,rep,name=treePath,proto3" json:"treePath,omitempty"`
Helpers
[]
uint32
`protobuf:"varint,3,rep,packed,name=helpers,proto3" json:"helpers,omitempty"`
}
func
(
x
*
TreePathProof
)
Reset
()
{
*
x
=
TreePathProof
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_merkletree_proto_msgTypes
[
16
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
TreePathProof
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
TreePathProof
)
ProtoMessage
()
{}
func
(
x
*
TreePathProof
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_merkletree_proto_msgTypes
[
16
]
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 TreePathProof.ProtoReflect.Descriptor instead.
func
(
*
TreePathProof
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_merkletree_proto_rawDescGZIP
(),
[]
int
{
16
}
}
func
(
x
*
TreePathProof
)
GetTreeRootHash
()
string
{
if
x
!=
nil
{
return
x
.
TreeRootHash
}
return
""
}
func
(
x
*
TreePathProof
)
GetTreePath
()
[]
string
{
if
x
!=
nil
{
return
x
.
TreePath
}
return
nil
}
func
(
x
*
TreePathProof
)
GetHelpers
()
[]
uint32
{
if
x
!=
nil
{
return
x
.
Helpers
}
return
nil
}
var
File_merkletree_proto
protoreflect
.
FileDescriptor
var
file_merkletree_proto_rawDesc
=
[]
byte
{
0x0a
,
0x10
,
0x6d
,
0x65
,
0x72
,
0x6b
,
0x6c
,
0x65
,
0x74
,
0x72
,
0x65
,
0x65
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x12
,
0x05
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x22
,
0x3b
,
0x0a
,
0x0d
,
0x43
,
0x6f
,
0x6d
,
0x6d
,
0x69
,
0x74
,
0x53
,
0x75
,
0x62
,
0x54
,
0x72
,
0x65
,
0x65
,
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
,
0x12
,
0x0a
,
0x04
,
0x68
,
0x61
,
0x73
,
0x68
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x0c
,
0x52
,
0x04
,
0x68
,
0x61
,
0x73
,
0x68
,
0x22
,
0x42
,
0x0a
,
0x0e
,
0x43
,
0x6f
,
0x6d
,
0x6d
,
0x69
,
0x74
,
0x53
,
0x75
,
0x62
,
0x54
,
0x72
,
0x65
,
0x65
,
0x73
,
0x12
,
0x30
,
0x0a
,
0x08
,
0x73
,
0x75
,
0x62
,
0x54
,
0x72
,
0x65
,
0x65
,
0x73
,
0x18
,
0x01
,
0x20
,
0x03
,
0x28
,
0x0b
,
0x32
,
0x14
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x43
,
0x6f
,
0x6d
,
0x6d
,
0x69
,
0x74
,
0x53
,
0x75
,
0x62
,
0x54
,
0x72
,
0x65
,
0x65
,
0x52
,
0x08
,
0x73
,
0x75
,
0x62
,
0x54
,
0x72
,
0x65
,
0x65
,
0x73
,
0x22
,
0xd3
,
0x01
,
0x0a
,
0x10
,
0x43
,
0x6f
,
0x6d
,
0x6d
,
0x69
,
0x74
,
0x54
,
0x72
,
0x65
,
0x65
,
0x53
,
0x74
,
0x61
,
0x74
,
0x75
,
0x73
,
0x12
,
0x31
,
0x0a
,
0x08
,
0x73
,
0x75
,
0x62
,
0x54
,
0x72
,
0x65
,
0x65
,
0x73
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x15
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x43
,
0x6f
,
0x6d
,
0x6d
,
0x69
,
0x74
,
0x53
,
0x75
,
0x62
,
0x54
,
0x72
,
0x65
,
0x65
,
0x73
,
0x52
,
0x08
,
0x73
,
0x75
,
0x62
,
0x54
,
0x72
,
0x65
,
0x65
,
0x73
,
0x12
,
0x22
,
0x0a
,
0x0c
,
0x73
,
0x75
,
0x62
,
0x4c
,
0x65
,
0x61
,
0x76
,
0x65
,
0x73
,
0x53
,
0x65
,
0x71
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x05
,
0x52
,
0x0c
,
0x73
,
0x75
,
0x62
,
0x4c
,
0x65
,
0x61
,
0x76
,
0x65
,
0x73
,
0x53
,
0x65
,
0x71
,
0x12
,
0x28
,
0x0a
,
0x0f
,
0x61
,
0x72
,
0x63
,
0x68
,
0x69
,
0x76
,
0x65
,
0x52
,
0x6f
,
0x6f
,
0x74
,
0x73
,
0x53
,
0x65
,
0x71
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x04
,
0x52
,
0x0f
,
0x61
,
0x72
,
0x63
,
0x68
,
0x69
,
0x76
,
0x65
,
0x52
,
0x6f
,
0x6f
,
0x74
,
0x73
,
0x53
,
0x65
,
0x71
,
0x12
,
0x1c
,
0x0a
,
0x09
,
0x61
,
0x73
,
0x73
,
0x65
,
0x74
,
0x45
,
0x78
,
0x65
,
0x63
,
0x18
,
0x04
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x09
,
0x61
,
0x73
,
0x73
,
0x65
,
0x74
,
0x45
,
0x78
,
0x65
,
0x63
,
0x12
,
0x20
,
0x0a
,
0x0b
,
0x61
,
0x73
,
0x73
,
0x65
,
0x74
,
0x53
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x18
,
0x05
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0b
,
0x61
,
0x73
,
0x73
,
0x65
,
0x74
,
0x53
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x22
,
0x79
,
0x0a
,
0x17
,
0x52
,
0x65
,
0x63
,
0x65
,
0x69
,
0x70
,
0x74
,
0x43
,
0x6f
,
0x6d
,
0x6d
,
0x69
,
0x74
,
0x54
,
0x72
,
0x65
,
0x65
,
0x53
,
0x74
,
0x61
,
0x74
,
0x75
,
0x73
,
0x12
,
0x2b
,
0x0a
,
0x04
,
0x70
,
0x72
,
0x65
,
0x76
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x17
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x43
,
0x6f
,
0x6d
,
0x6d
,
0x69
,
0x74
,
0x54
,
0x72
,
0x65
,
0x65
,
0x53
,
0x74
,
0x61
,
0x74
,
0x75
,
0x73
,
0x52
,
0x04
,
0x70
,
0x72
,
0x65
,
0x76
,
0x12
,
0x31
,
0x0a
,
0x07
,
0x63
,
0x75
,
0x72
,
0x72
,
0x65
,
0x6e
,
0x74
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x17
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x43
,
0x6f
,
0x6d
,
0x6d
,
0x69
,
0x74
,
0x54
,
0x72
,
0x65
,
0x65
,
0x53
,
0x74
,
0x61
,
0x74
,
0x75
,
0x73
,
0x52
,
0x07
,
0x63
,
0x75
,
0x72
,
0x72
,
0x65
,
0x6e
,
0x74
,
0x22
,
0x3e
,
0x0a
,
0x16
,
0x52
,
0x65
,
0x63
,
0x65
,
0x69
,
0x70
,
0x74
,
0x43
,
0x6f
,
0x6d
,
0x6d
,
0x69
,
0x74
,
0x53
,
0x75
,
0x62
,
0x4c
,
0x65
,
0x61
,
0x76
,
0x65
,
0x73
,
0x12
,
0x10
,
0x0a
,
0x03
,
0x73
,
0x65
,
0x71
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x05
,
0x52
,
0x03
,
0x73
,
0x65
,
0x71
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x6c
,
0x65
,
0x61
,
0x66
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x6c
,
0x65
,
0x61
,
0x66
,
0x22
,
0x3d
,
0x0a
,
0x15
,
0x52
,
0x65
,
0x63
,
0x65
,
0x69
,
0x70
,
0x74
,
0x43
,
0x6f
,
0x6d
,
0x6d
,
0x69
,
0x74
,
0x53
,
0x75
,
0x62
,
0x52
,
0x6f
,
0x6f
,
0x74
,
0x73
,
0x12
,
0x10
,
0x0a
,
0x03
,
0x73
,
0x65
,
0x71
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x05
,
0x52
,
0x03
,
0x73
,
0x65
,
0x71
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x72
,
0x6f
,
0x6f
,
0x74
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x72
,
0x6f
,
0x6f
,
0x74
,
0x22
,
0x64
,
0x0a
,
0x14
,
0x52
,
0x65
,
0x63
,
0x65
,
0x69
,
0x70
,
0x74
,
0x41
,
0x72
,
0x63
,
0x68
,
0x69
,
0x76
,
0x65
,
0x4c
,
0x65
,
0x61
,
0x76
,
0x65
,
0x73
,
0x12
,
0x14
,
0x0a
,
0x05
,
0x63
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x05
,
0x52
,
0x05
,
0x63
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x72
,
0x6f
,
0x6f
,
0x74
,
0x48
,
0x61
,
0x73
,
0x68
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x08
,
0x72
,
0x6f
,
0x6f
,
0x74
,
0x48
,
0x61
,
0x73
,
0x68
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x6c
,
0x61
,
0x73
,
0x74
,
0x4c
,
0x65
,
0x61
,
0x66
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x08
,
0x6c
,
0x61
,
0x73
,
0x74
,
0x4c
,
0x65
,
0x61
,
0x66
,
0x22
,
0x46
,
0x0a
,
0x16
,
0x52
,
0x65
,
0x63
,
0x65
,
0x69
,
0x70
,
0x74
,
0x41
,
0x72
,
0x63
,
0x68
,
0x69
,
0x76
,
0x65
,
0x54
,
0x72
,
0x65
,
0x65
,
0x52
,
0x6f
,
0x6f
,
0x74
,
0x12
,
0x10
,
0x0a
,
0x03
,
0x73
,
0x65
,
0x71
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x04
,
0x52
,
0x03
,
0x73
,
0x65
,
0x71
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x72
,
0x6f
,
0x6f
,
0x74
,
0x48
,
0x61
,
0x73
,
0x68
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x08
,
0x72
,
0x6f
,
0x6f
,
0x74
,
0x48
,
0x61
,
0x73
,
0x68
,
0x22
,
0x2a
,
0x0a
,
0x10
,
0x43
,
0x6f
,
0x6d
,
0x6d
,
0x69
,
0x74
,
0x54
,
0x72
,
0x65
,
0x65
,
0x4c
,
0x65
,
0x61
,
0x76
,
0x65
,
0x73
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x6c
,
0x65
,
0x61
,
0x76
,
0x65
,
0x73
,
0x18
,
0x01
,
0x20
,
0x03
,
0x28
,
0x0c
,
0x52
,
0x06
,
0x6c
,
0x65
,
0x61
,
0x76
,
0x65
,
0x73
,
0x22
,
0x27
,
0x0a
,
0x0f
,
0x43
,
0x6f
,
0x6d
,
0x6d
,
0x69
,
0x74
,
0x54
,
0x72
,
0x65
,
0x65
,
0x52
,
0x6f
,
0x6f
,
0x74
,
0x73
,
0x12
,
0x14
,
0x0a
,
0x05
,
0x72
,
0x6f
,
0x6f
,
0x74
,
0x73
,
0x18
,
0x01
,
0x20
,
0x03
,
0x28
,
0x0c
,
0x52
,
0x05
,
0x72
,
0x6f
,
0x6f
,
0x74
,
0x73
,
0x22
,
0xa1
,
0x01
,
0x0a
,
0x0f
,
0x43
,
0x6f
,
0x6d
,
0x6d
,
0x69
,
0x74
,
0x54
,
0x72
,
0x65
,
0x65
,
0x50
,
0x72
,
0x6f
,
0x76
,
0x65
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x72
,
0x6f
,
0x6f
,
0x74
,
0x48
,
0x61
,
0x73
,
0x68
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x08
,
0x72
,
0x6f
,
0x6f
,
0x74
,
0x48
,
0x61
,
0x73
,
0x68
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x70
,
0x72
,
0x6f
,
0x6f
,
0x66
,
0x53
,
0x65
,
0x74
,
0x18
,
0x02
,
0x20
,
0x03
,
0x28
,
0x09
,
0x52
,
0x08
,
0x70
,
0x72
,
0x6f
,
0x6f
,
0x66
,
0x53
,
0x65
,
0x74
,
0x12
,
0x1e
,
0x0a
,
0x0a
,
0x70
,
0x72
,
0x6f
,
0x6f
,
0x66
,
0x49
,
0x6e
,
0x64
,
0x65
,
0x78
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x0d
,
0x52
,
0x0a
,
0x70
,
0x72
,
0x6f
,
0x6f
,
0x66
,
0x49
,
0x6e
,
0x64
,
0x65
,
0x78
,
0x12
,
0x1c
,
0x0a
,
0x09
,
0x6e
,
0x75
,
0x6d
,
0x4c
,
0x65
,
0x61
,
0x76
,
0x65
,
0x73
,
0x18
,
0x04
,
0x20
,
0x01
,
0x28
,
0x0d
,
0x52
,
0x09
,
0x6e
,
0x75
,
0x6d
,
0x4c
,
0x65
,
0x61
,
0x76
,
0x65
,
0x73
,
0x12
,
0x18
,
0x0a
,
0x07
,
0x68
,
0x65
,
0x6c
,
0x70
,
0x65
,
0x72
,
0x73
,
0x18
,
0x05
,
0x20
,
0x03
,
0x28
,
0x0d
,
0x52
,
0x07
,
0x68
,
0x65
,
0x6c
,
0x70
,
0x65
,
0x72
,
0x73
,
0x22
,
0xa5
,
0x01
,
0x0a
,
0x0b
,
0x54
,
0x72
,
0x65
,
0x65
,
0x49
,
0x6e
,
0x66
,
0x6f
,
0x52
,
0x65
,
0x71
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x72
,
0x6f
,
0x6f
,
0x74
,
0x48
,
0x61
,
0x73
,
0x68
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x08
,
0x72
,
0x6f
,
0x6f
,
0x74
,
0x48
,
0x61
,
0x73
,
0x68
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x6c
,
0x65
,
0x61
,
0x66
,
0x48
,
0x61
,
0x73
,
0x68
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x08
,
0x6c
,
0x65
,
0x61
,
0x66
,
0x48
,
0x61
,
0x73
,
0x68
,
0x12
,
0x1c
,
0x0a
,
0x09
,
0x61
,
0x73
,
0x73
,
0x65
,
0x74
,
0x45
,
0x78
,
0x65
,
0x63
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x09
,
0x61
,
0x73
,
0x73
,
0x65
,
0x74
,
0x45
,
0x78
,
0x65
,
0x63
,
0x12
,
0x20
,
0x0a
,
0x0b
,
0x61
,
0x73
,
0x73
,
0x65
,
0x74
,
0x53
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x18
,
0x04
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0b
,
0x61
,
0x73
,
0x73
,
0x65
,
0x74
,
0x53
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x12
,
0x1e
,
0x0a
,
0x0a
,
0x72
,
0x6f
,
0x6f
,
0x74
,
0x48
,
0x65
,
0x69
,
0x67
,
0x68
,
0x74
,
0x18
,
0x05
,
0x20
,
0x01
,
0x28
,
0x04
,
0x52
,
0x0a
,
0x72
,
0x6f
,
0x6f
,
0x74
,
0x48
,
0x65
,
0x69
,
0x67
,
0x68
,
0x74
,
0x22
,
0x26
,
0x0a
,
0x0c
,
0x54
,
0x72
,
0x65
,
0x65
,
0x4c
,
0x69
,
0x73
,
0x74
,
0x52
,
0x65
,
0x73
,
0x70
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x6c
,
0x65
,
0x61
,
0x76
,
0x65
,
0x73
,
0x18
,
0x01
,
0x20
,
0x03
,
0x28
,
0x09
,
0x52
,
0x06
,
0x6c
,
0x65
,
0x61
,
0x76
,
0x65
,
0x73
,
0x22
,
0x24
,
0x0a
,
0x0c
,
0x52
,
0x6f
,
0x6f
,
0x74
,
0x4c
,
0x69
,
0x73
,
0x74
,
0x52
,
0x65
,
0x73
,
0x70
,
0x12
,
0x14
,
0x0a
,
0x05
,
0x72
,
0x6f
,
0x6f
,
0x74
,
0x73
,
0x18
,
0x01
,
0x20
,
0x03
,
0x28
,
0x09
,
0x52
,
0x05
,
0x72
,
0x6f
,
0x6f
,
0x74
,
0x73
,
0x22
,
0x39
,
0x0a
,
0x0b
,
0x53
,
0x75
,
0x62
,
0x54
,
0x72
,
0x65
,
0x65
,
0x52
,
0x65
,
0x73
,
0x70
,
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
,
0x12
,
0x0a
,
0x04
,
0x68
,
0x61
,
0x73
,
0x68
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x68
,
0x61
,
0x73
,
0x68
,
0x22
,
0x8e
,
0x01
,
0x0a
,
0x0e
,
0x54
,
0x72
,
0x65
,
0x65
,
0x53
,
0x74
,
0x61
,
0x74
,
0x75
,
0x73
,
0x52
,
0x65
,
0x73
,
0x70
,
0x12
,
0x22
,
0x0a
,
0x0c
,
0x73
,
0x75
,
0x62
,
0x4c
,
0x65
,
0x61
,
0x76
,
0x65
,
0x73
,
0x53
,
0x65
,
0x71
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x05
,
0x52
,
0x0c
,
0x73
,
0x75
,
0x62
,
0x4c
,
0x65
,
0x61
,
0x76
,
0x65
,
0x73
,
0x53
,
0x65
,
0x71
,
0x12
,
0x28
,
0x0a
,
0x0f
,
0x61
,
0x72
,
0x63
,
0x68
,
0x69
,
0x76
,
0x65
,
0x52
,
0x6f
,
0x6f
,
0x74
,
0x73
,
0x53
,
0x65
,
0x71
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x04
,
0x52
,
0x0f
,
0x61
,
0x72
,
0x63
,
0x68
,
0x69
,
0x76
,
0x65
,
0x52
,
0x6f
,
0x6f
,
0x74
,
0x73
,
0x53
,
0x65
,
0x71
,
0x12
,
0x2e
,
0x0a
,
0x08
,
0x73
,
0x75
,
0x62
,
0x54
,
0x72
,
0x65
,
0x65
,
0x73
,
0x18
,
0x03
,
0x20
,
0x03
,
0x28
,
0x0b
,
0x32
,
0x12
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x53
,
0x75
,
0x62
,
0x54
,
0x72
,
0x65
,
0x65
,
0x52
,
0x65
,
0x73
,
0x70
,
0x52
,
0x08
,
0x73
,
0x75
,
0x62
,
0x54
,
0x72
,
0x65
,
0x65
,
0x73
,
0x22
,
0x69
,
0x0a
,
0x0d
,
0x54
,
0x72
,
0x65
,
0x65
,
0x50
,
0x61
,
0x74
,
0x68
,
0x50
,
0x72
,
0x6f
,
0x6f
,
0x66
,
0x12
,
0x22
,
0x0a
,
0x0c
,
0x74
,
0x72
,
0x65
,
0x65
,
0x52
,
0x6f
,
0x6f
,
0x74
,
0x48
,
0x61
,
0x73
,
0x68
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0c
,
0x74
,
0x72
,
0x65
,
0x65
,
0x52
,
0x6f
,
0x6f
,
0x74
,
0x48
,
0x61
,
0x73
,
0x68
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x74
,
0x72
,
0x65
,
0x65
,
0x50
,
0x61
,
0x74
,
0x68
,
0x18
,
0x02
,
0x20
,
0x03
,
0x28
,
0x09
,
0x52
,
0x08
,
0x74
,
0x72
,
0x65
,
0x65
,
0x50
,
0x61
,
0x74
,
0x68
,
0x12
,
0x18
,
0x0a
,
0x07
,
0x68
,
0x65
,
0x6c
,
0x70
,
0x65
,
0x72
,
0x73
,
0x18
,
0x03
,
0x20
,
0x03
,
0x28
,
0x0d
,
0x52
,
0x07
,
0x68
,
0x65
,
0x6c
,
0x70
,
0x65
,
0x72
,
0x73
,
0x42
,
0x0a
,
0x5a
,
0x08
,
0x2e
,
0x2e
,
0x2f
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
}
var
(
file_merkletree_proto_rawDescOnce
sync
.
Once
file_merkletree_proto_rawDescData
=
file_merkletree_proto_rawDesc
)
func
file_merkletree_proto_rawDescGZIP
()
[]
byte
{
file_merkletree_proto_rawDescOnce
.
Do
(
func
()
{
file_merkletree_proto_rawDescData
=
protoimpl
.
X
.
CompressGZIP
(
file_merkletree_proto_rawDescData
)
})
return
file_merkletree_proto_rawDescData
}
var
file_merkletree_proto_msgTypes
=
make
([]
protoimpl
.
MessageInfo
,
17
)
var
file_merkletree_proto_goTypes
=
[]
interface
{}{
(
*
CommitSubTree
)(
nil
),
// 0: types.CommitSubTree
(
*
CommitSubTrees
)(
nil
),
// 1: types.CommitSubTrees
(
*
CommitTreeStatus
)(
nil
),
// 2: types.CommitTreeStatus
(
*
ReceiptCommitTreeStatus
)(
nil
),
// 3: types.ReceiptCommitTreeStatus
(
*
ReceiptCommitSubLeaves
)(
nil
),
// 4: types.ReceiptCommitSubLeaves
(
*
ReceiptCommitSubRoots
)(
nil
),
// 5: types.ReceiptCommitSubRoots
(
*
ReceiptArchiveLeaves
)(
nil
),
// 6: types.ReceiptArchiveLeaves
(
*
ReceiptArchiveTreeRoot
)(
nil
),
// 7: types.ReceiptArchiveTreeRoot
(
*
CommitTreeLeaves
)(
nil
),
// 8: types.CommitTreeLeaves
(
*
CommitTreeRoots
)(
nil
),
// 9: types.CommitTreeRoots
(
*
CommitTreeProve
)(
nil
),
// 10: types.CommitTreeProve
(
*
TreeInfoReq
)(
nil
),
// 11: types.TreeInfoReq
(
*
TreeListResp
)(
nil
),
// 12: types.TreeListResp
(
*
RootListResp
)(
nil
),
// 13: types.RootListResp
(
*
SubTreeResp
)(
nil
),
// 14: types.SubTreeResp
(
*
TreeStatusResp
)(
nil
),
// 15: types.TreeStatusResp
(
*
TreePathProof
)(
nil
),
// 16: types.TreePathProof
}
var
file_merkletree_proto_depIdxs
=
[]
int32
{
0
,
// 0: types.CommitSubTrees.subTrees:type_name -> types.CommitSubTree
1
,
// 1: types.CommitTreeStatus.subTrees:type_name -> types.CommitSubTrees
2
,
// 2: types.ReceiptCommitTreeStatus.prev:type_name -> types.CommitTreeStatus
2
,
// 3: types.ReceiptCommitTreeStatus.current:type_name -> types.CommitTreeStatus
14
,
// 4: types.TreeStatusResp.subTrees:type_name -> types.SubTreeResp
5
,
// [5:5] is the sub-list for method output_type
5
,
// [5:5] is the sub-list for method input_type
5
,
// [5:5] is the sub-list for extension type_name
5
,
// [5:5] is the sub-list for extension extendee
0
,
// [0:5] is the sub-list for field type_name
}
func
init
()
{
file_merkletree_proto_init
()
}
func
file_merkletree_proto_init
()
{
if
File_merkletree_proto
!=
nil
{
return
}
if
!
protoimpl
.
UnsafeEnabled
{
file_merkletree_proto_msgTypes
[
0
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
CommitSubTree
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_merkletree_proto_msgTypes
[
1
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
CommitSubTrees
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_merkletree_proto_msgTypes
[
2
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
CommitTreeStatus
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_merkletree_proto_msgTypes
[
3
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
ReceiptCommitTreeStatus
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_merkletree_proto_msgTypes
[
4
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
ReceiptCommitSubLeaves
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_merkletree_proto_msgTypes
[
5
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
ReceiptCommitSubRoots
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_merkletree_proto_msgTypes
[
6
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
ReceiptArchiveLeaves
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_merkletree_proto_msgTypes
[
7
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
ReceiptArchiveTreeRoot
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_merkletree_proto_msgTypes
[
8
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
CommitTreeLeaves
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_merkletree_proto_msgTypes
[
9
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
CommitTreeRoots
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_merkletree_proto_msgTypes
[
10
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
CommitTreeProve
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_merkletree_proto_msgTypes
[
11
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
TreeInfoReq
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_merkletree_proto_msgTypes
[
12
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
TreeListResp
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_merkletree_proto_msgTypes
[
13
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
RootListResp
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_merkletree_proto_msgTypes
[
14
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
SubTreeResp
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_merkletree_proto_msgTypes
[
15
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
TreeStatusResp
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_merkletree_proto_msgTypes
[
16
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
TreePathProof
);
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
:
file_merkletree_proto_rawDesc
,
NumEnums
:
0
,
NumMessages
:
17
,
NumExtensions
:
0
,
NumServices
:
0
,
},
GoTypes
:
file_merkletree_proto_goTypes
,
DependencyIndexes
:
file_merkletree_proto_depIdxs
,
MessageInfos
:
file_merkletree_proto_msgTypes
,
}
.
Build
()
File_merkletree_proto
=
out
.
File
file_merkletree_proto_rawDesc
=
nil
file_merkletree_proto_goTypes
=
nil
file_merkletree_proto_depIdxs
=
nil
}
plugin/dapp/mix/types/mix.pb.go
View file @
e9e31f64
This source diff could not be displayed because it is too large. You can
view the blob
instead.
plugin/dapp/mix/types/wallet.pb.go
0 → 100644
View file @
e9e31f64
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.23.0
// protoc v3.9.1
// source: wallet.proto
package
types
import
(
context
"context"
reflect
"reflect"
sync
"sync"
types
"github.com/33cn/chain33/types"
proto
"github.com/golang/protobuf/proto"
grpc
"google.golang.org/grpc"
codes
"google.golang.org/grpc/codes"
status
"google.golang.org/grpc/status"
protoreflect
"google.golang.org/protobuf/reflect/protoreflect"
protoimpl
"google.golang.org/protobuf/runtime/protoimpl"
)
const
(
// Verify that this generated code is sufficiently up-to-date.
_
=
protoimpl
.
EnforceVersion
(
20
-
protoimpl
.
MinVersion
)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_
=
protoimpl
.
EnforceVersion
(
protoimpl
.
MaxVersion
-
20
)
)
// This is a compile-time assertion that a sufficiently up-to-date version
// of the legacy proto package is being used.
const
_
=
proto
.
ProtoPackageIsVersion4
type
NoteStatus
int32
const
(
NoteStatus_UNDEF
NoteStatus
=
0
NoteStatus_VALID
NoteStatus
=
1
//已授权可使用 相对消费者
NoteStatus_USED
NoteStatus
=
2
//已使用
NoteStatus_FROZEN
NoteStatus
=
3
//未授权
NoteStatus_UNFROZEN
NoteStatus
=
4
//已授权 相对授权者
)
// Enum value maps for NoteStatus.
var
(
NoteStatus_name
=
map
[
int32
]
string
{
0
:
"UNDEF"
,
1
:
"VALID"
,
2
:
"USED"
,
3
:
"FROZEN"
,
4
:
"UNFROZEN"
,
}
NoteStatus_value
=
map
[
string
]
int32
{
"UNDEF"
:
0
,
"VALID"
:
1
,
"USED"
:
2
,
"FROZEN"
:
3
,
"UNFROZEN"
:
4
,
}
)
func
(
x
NoteStatus
)
Enum
()
*
NoteStatus
{
p
:=
new
(
NoteStatus
)
*
p
=
x
return
p
}
func
(
x
NoteStatus
)
String
()
string
{
return
protoimpl
.
X
.
EnumStringOf
(
x
.
Descriptor
(),
protoreflect
.
EnumNumber
(
x
))
}
func
(
NoteStatus
)
Descriptor
()
protoreflect
.
EnumDescriptor
{
return
file_wallet_proto_enumTypes
[
0
]
.
Descriptor
()
}
func
(
NoteStatus
)
Type
()
protoreflect
.
EnumType
{
return
&
file_wallet_proto_enumTypes
[
0
]
}
func
(
x
NoteStatus
)
Number
()
protoreflect
.
EnumNumber
{
return
protoreflect
.
EnumNumber
(
x
)
}
// Deprecated: Use NoteStatus.Descriptor instead.
func
(
NoteStatus
)
EnumDescriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
0
}
}
type
MixWalletRescanStatus
int32
const
(
MixWalletRescanStatus_IDLE
MixWalletRescanStatus
=
0
MixWalletRescanStatus_SCANNING
MixWalletRescanStatus
=
1
MixWalletRescanStatus_FINISHED
MixWalletRescanStatus
=
2
)
// Enum value maps for MixWalletRescanStatus.
var
(
MixWalletRescanStatus_name
=
map
[
int32
]
string
{
0
:
"IDLE"
,
1
:
"SCANNING"
,
2
:
"FINISHED"
,
}
MixWalletRescanStatus_value
=
map
[
string
]
int32
{
"IDLE"
:
0
,
"SCANNING"
:
1
,
"FINISHED"
:
2
,
}
)
func
(
x
MixWalletRescanStatus
)
Enum
()
*
MixWalletRescanStatus
{
p
:=
new
(
MixWalletRescanStatus
)
*
p
=
x
return
p
}
func
(
x
MixWalletRescanStatus
)
String
()
string
{
return
protoimpl
.
X
.
EnumStringOf
(
x
.
Descriptor
(),
protoreflect
.
EnumNumber
(
x
))
}
func
(
MixWalletRescanStatus
)
Descriptor
()
protoreflect
.
EnumDescriptor
{
return
file_wallet_proto_enumTypes
[
1
]
.
Descriptor
()
}
func
(
MixWalletRescanStatus
)
Type
()
protoreflect
.
EnumType
{
return
&
file_wallet_proto_enumTypes
[
1
]
}
func
(
x
MixWalletRescanStatus
)
Number
()
protoreflect
.
EnumNumber
{
return
protoreflect
.
EnumNumber
(
x
)
}
// Deprecated: Use MixWalletRescanStatus.Descriptor instead.
func
(
MixWalletRescanStatus
)
EnumDescriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
1
}
}
//支持同时存入多个地址,多个地址具有相同的returnAddr和AuthorizeAddr,如果不同,则单个来存
type
DepositInfo
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
ReceiverAddrs
string
`protobuf:"bytes,1,opt,name=receiverAddrs,proto3" json:"receiverAddrs,omitempty"`
ReturnAddr
string
`protobuf:"bytes,2,opt,name=returnAddr,proto3" json:"returnAddr,omitempty"`
AuthorizeAddr
string
`protobuf:"bytes,3,opt,name=authorizeAddr,proto3" json:"authorizeAddr,omitempty"`
Amounts
string
`protobuf:"bytes,4,opt,name=amounts,proto3" json:"amounts,omitempty"`
}
func
(
x
*
DepositInfo
)
Reset
()
{
*
x
=
DepositInfo
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
0
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
DepositInfo
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
DepositInfo
)
ProtoMessage
()
{}
func
(
x
*
DepositInfo
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
0
]
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 DepositInfo.ProtoReflect.Descriptor instead.
func
(
*
DepositInfo
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
0
}
}
func
(
x
*
DepositInfo
)
GetReceiverAddrs
()
string
{
if
x
!=
nil
{
return
x
.
ReceiverAddrs
}
return
""
}
func
(
x
*
DepositInfo
)
GetReturnAddr
()
string
{
if
x
!=
nil
{
return
x
.
ReturnAddr
}
return
""
}
func
(
x
*
DepositInfo
)
GetAuthorizeAddr
()
string
{
if
x
!=
nil
{
return
x
.
AuthorizeAddr
}
return
""
}
func
(
x
*
DepositInfo
)
GetAmounts
()
string
{
if
x
!=
nil
{
return
x
.
Amounts
}
return
""
}
//钱包生成deposit tx
type
DepositTxReq
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Deposit
*
DepositInfo
`protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"`
ZkPath
string
`protobuf:"bytes,2,opt,name=zkPath,proto3" json:"zkPath,omitempty"`
}
func
(
x
*
DepositTxReq
)
Reset
()
{
*
x
=
DepositTxReq
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
1
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
DepositTxReq
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
DepositTxReq
)
ProtoMessage
()
{}
func
(
x
*
DepositTxReq
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
1
]
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 DepositTxReq.ProtoReflect.Descriptor instead.
func
(
*
DepositTxReq
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
1
}
}
func
(
x
*
DepositTxReq
)
GetDeposit
()
*
DepositInfo
{
if
x
!=
nil
{
return
x
.
Deposit
}
return
nil
}
func
(
x
*
DepositTxReq
)
GetZkPath
()
string
{
if
x
!=
nil
{
return
x
.
ZkPath
}
return
""
}
type
DepositProofResp
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
NoteHash
string
`protobuf:"bytes,1,opt,name=noteHash,proto3" json:"noteHash,omitempty"`
Proof
*
SecretData
`protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"`
Secrets
*
DHSecretGroup
`protobuf:"bytes,3,opt,name=secrets,proto3" json:"secrets,omitempty"`
}
func
(
x
*
DepositProofResp
)
Reset
()
{
*
x
=
DepositProofResp
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
2
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
DepositProofResp
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
DepositProofResp
)
ProtoMessage
()
{}
func
(
x
*
DepositProofResp
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
2
]
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 DepositProofResp.ProtoReflect.Descriptor instead.
func
(
*
DepositProofResp
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
2
}
}
func
(
x
*
DepositProofResp
)
GetNoteHash
()
string
{
if
x
!=
nil
{
return
x
.
NoteHash
}
return
""
}
func
(
x
*
DepositProofResp
)
GetProof
()
*
SecretData
{
if
x
!=
nil
{
return
x
.
Proof
}
return
nil
}
func
(
x
*
DepositProofResp
)
GetSecrets
()
*
DHSecretGroup
{
if
x
!=
nil
{
return
x
.
Secrets
}
return
nil
}
//可withdraw 多个note
type
WithdrawTxReq
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
TotalAmount
uint64
`protobuf:"varint,1,opt,name=totalAmount,proto3" json:"totalAmount,omitempty"`
NoteHashs
string
`protobuf:"bytes,2,opt,name=noteHashs,proto3" json:"noteHashs,omitempty"`
// seperate by ","
ZkPath
string
`protobuf:"bytes,3,opt,name=zkPath,proto3" json:"zkPath,omitempty"`
}
func
(
x
*
WithdrawTxReq
)
Reset
()
{
*
x
=
WithdrawTxReq
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
3
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
WithdrawTxReq
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
WithdrawTxReq
)
ProtoMessage
()
{}
func
(
x
*
WithdrawTxReq
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
3
]
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 WithdrawTxReq.ProtoReflect.Descriptor instead.
func
(
*
WithdrawTxReq
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
3
}
}
func
(
x
*
WithdrawTxReq
)
GetTotalAmount
()
uint64
{
if
x
!=
nil
{
return
x
.
TotalAmount
}
return
0
}
func
(
x
*
WithdrawTxReq
)
GetNoteHashs
()
string
{
if
x
!=
nil
{
return
x
.
NoteHashs
}
return
""
}
func
(
x
*
WithdrawTxReq
)
GetZkPath
()
string
{
if
x
!=
nil
{
return
x
.
ZkPath
}
return
""
}
//只授权一个note,超过一个,toAddr不好设置
type
AuthTxReq
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
NoteHash
string
`protobuf:"bytes,1,opt,name=noteHash,proto3" json:"noteHash,omitempty"`
AuthorizeToAddr
string
`protobuf:"bytes,2,opt,name=authorizeToAddr,proto3" json:"authorizeToAddr,omitempty"`
ZkPath
string
`protobuf:"bytes,3,opt,name=zkPath,proto3" json:"zkPath,omitempty"`
}
func
(
x
*
AuthTxReq
)
Reset
()
{
*
x
=
AuthTxReq
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
4
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
AuthTxReq
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
AuthTxReq
)
ProtoMessage
()
{}
func
(
x
*
AuthTxReq
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
4
]
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 AuthTxReq.ProtoReflect.Descriptor instead.
func
(
*
AuthTxReq
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
4
}
}
func
(
x
*
AuthTxReq
)
GetNoteHash
()
string
{
if
x
!=
nil
{
return
x
.
NoteHash
}
return
""
}
func
(
x
*
AuthTxReq
)
GetAuthorizeToAddr
()
string
{
if
x
!=
nil
{
return
x
.
AuthorizeToAddr
}
return
""
}
func
(
x
*
AuthTxReq
)
GetZkPath
()
string
{
if
x
!=
nil
{
return
x
.
ZkPath
}
return
""
}
type
TransferInputTxReq
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
NoteHashs
string
`protobuf:"bytes,1,opt,name=noteHashs,proto3" json:"noteHashs,omitempty"`
}
func
(
x
*
TransferInputTxReq
)
Reset
()
{
*
x
=
TransferInputTxReq
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
5
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
TransferInputTxReq
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
TransferInputTxReq
)
ProtoMessage
()
{}
func
(
x
*
TransferInputTxReq
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
5
]
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 TransferInputTxReq.ProtoReflect.Descriptor instead.
func
(
*
TransferInputTxReq
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
5
}
}
func
(
x
*
TransferInputTxReq
)
GetNoteHashs
()
string
{
if
x
!=
nil
{
return
x
.
NoteHashs
}
return
""
}
type
TransferOutputTxReq
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Deposit
*
DepositInfo
`protobuf:"bytes,1,opt,name=deposit,proto3" json:"deposit,omitempty"`
}
func
(
x
*
TransferOutputTxReq
)
Reset
()
{
*
x
=
TransferOutputTxReq
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
6
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
TransferOutputTxReq
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
TransferOutputTxReq
)
ProtoMessage
()
{}
func
(
x
*
TransferOutputTxReq
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
6
]
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 TransferOutputTxReq.ProtoReflect.Descriptor instead.
func
(
*
TransferOutputTxReq
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
6
}
}
func
(
x
*
TransferOutputTxReq
)
GetDeposit
()
*
DepositInfo
{
if
x
!=
nil
{
return
x
.
Deposit
}
return
nil
}
type
TransferTxReq
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Input
*
TransferInputTxReq
`protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"`
Output
*
TransferOutputTxReq
`protobuf:"bytes,2,opt,name=output,proto3" json:"output,omitempty"`
ZkPath
string
`protobuf:"bytes,3,opt,name=zkPath,proto3" json:"zkPath,omitempty"`
}
func
(
x
*
TransferTxReq
)
Reset
()
{
*
x
=
TransferTxReq
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
7
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
TransferTxReq
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
TransferTxReq
)
ProtoMessage
()
{}
func
(
x
*
TransferTxReq
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_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 TransferTxReq.ProtoReflect.Descriptor instead.
func
(
*
TransferTxReq
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
7
}
}
func
(
x
*
TransferTxReq
)
GetInput
()
*
TransferInputTxReq
{
if
x
!=
nil
{
return
x
.
Input
}
return
nil
}
func
(
x
*
TransferTxReq
)
GetOutput
()
*
TransferOutputTxReq
{
if
x
!=
nil
{
return
x
.
Output
}
return
nil
}
func
(
x
*
TransferTxReq
)
GetZkPath
()
string
{
if
x
!=
nil
{
return
x
.
ZkPath
}
return
""
}
type
CreateZkKeyFileReq
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Ty
int32
`protobuf:"varint,1,opt,name=ty,proto3" json:"ty,omitempty"`
SavePath
string
`protobuf:"bytes,2,opt,name=savePath,proto3" json:"savePath,omitempty"`
}
func
(
x
*
CreateZkKeyFileReq
)
Reset
()
{
*
x
=
CreateZkKeyFileReq
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
8
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
CreateZkKeyFileReq
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
CreateZkKeyFileReq
)
ProtoMessage
()
{}
func
(
x
*
CreateZkKeyFileReq
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
8
]
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 CreateZkKeyFileReq.ProtoReflect.Descriptor instead.
func
(
*
CreateZkKeyFileReq
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
8
}
}
func
(
x
*
CreateZkKeyFileReq
)
GetTy
()
int32
{
if
x
!=
nil
{
return
x
.
Ty
}
return
0
}
func
(
x
*
CreateZkKeyFileReq
)
GetSavePath
()
string
{
if
x
!=
nil
{
return
x
.
SavePath
}
return
""
}
//加密了的input/output amount
type
ShieldAmount
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
X
string
`protobuf:"bytes,1,opt,name=X,proto3" json:"X,omitempty"`
Y
string
`protobuf:"bytes,2,opt,name=Y,proto3" json:"Y,omitempty"`
}
func
(
x
*
ShieldAmount
)
Reset
()
{
*
x
=
ShieldAmount
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
9
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
ShieldAmount
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
ShieldAmount
)
ProtoMessage
()
{}
func
(
x
*
ShieldAmount
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
9
]
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 ShieldAmount.ProtoReflect.Descriptor instead.
func
(
*
ShieldAmount
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
9
}
}
func
(
x
*
ShieldAmount
)
GetX
()
string
{
if
x
!=
nil
{
return
x
.
X
}
return
""
}
func
(
x
*
ShieldAmount
)
GetY
()
string
{
if
x
!=
nil
{
return
x
.
Y
}
return
""
}
type
ShieldAmountRst
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
InputRandoms
[]
string
`protobuf:"bytes,1,rep,name=inputRandoms,proto3" json:"inputRandoms,omitempty"`
OutputRandom
string
`protobuf:"bytes,2,opt,name=outputRandom,proto3" json:"outputRandom,omitempty"`
ChangeRandom
string
`protobuf:"bytes,3,opt,name=changeRandom,proto3" json:"changeRandom,omitempty"`
Inputs
[]
*
ShieldAmount
`protobuf:"bytes,4,rep,name=inputs,proto3" json:"inputs,omitempty"`
Output
*
ShieldAmount
`protobuf:"bytes,5,opt,name=output,proto3" json:"output,omitempty"`
Change
*
ShieldAmount
`protobuf:"bytes,6,opt,name=change,proto3" json:"change,omitempty"`
}
func
(
x
*
ShieldAmountRst
)
Reset
()
{
*
x
=
ShieldAmountRst
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
10
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
ShieldAmountRst
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
ShieldAmountRst
)
ProtoMessage
()
{}
func
(
x
*
ShieldAmountRst
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
10
]
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 ShieldAmountRst.ProtoReflect.Descriptor instead.
func
(
*
ShieldAmountRst
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
10
}
}
func
(
x
*
ShieldAmountRst
)
GetInputRandoms
()
[]
string
{
if
x
!=
nil
{
return
x
.
InputRandoms
}
return
nil
}
func
(
x
*
ShieldAmountRst
)
GetOutputRandom
()
string
{
if
x
!=
nil
{
return
x
.
OutputRandom
}
return
""
}
func
(
x
*
ShieldAmountRst
)
GetChangeRandom
()
string
{
if
x
!=
nil
{
return
x
.
ChangeRandom
}
return
""
}
func
(
x
*
ShieldAmountRst
)
GetInputs
()
[]
*
ShieldAmount
{
if
x
!=
nil
{
return
x
.
Inputs
}
return
nil
}
func
(
x
*
ShieldAmountRst
)
GetOutput
()
*
ShieldAmount
{
if
x
!=
nil
{
return
x
.
Output
}
return
nil
}
func
(
x
*
ShieldAmountRst
)
GetChange
()
*
ShieldAmount
{
if
x
!=
nil
{
return
x
.
Change
}
return
nil
}
type
CreateRawTxReq
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
ActionTy
int32
`protobuf:"varint,1,opt,name=actionTy,proto3" json:"actionTy,omitempty"`
Data
[]
byte
`protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
AssetExec
string
`protobuf:"bytes,2,opt,name=assetExec,proto3" json:"assetExec,omitempty"`
AssetSymbol
string
`protobuf:"bytes,3,opt,name=assetSymbol,proto3" json:"assetSymbol,omitempty"`
Title
string
`protobuf:"bytes,6,opt,name=title,proto3" json:"title,omitempty"`
//平行链名字
VerifyOnChain
bool
`protobuf:"varint,7,opt,name=verifyOnChain,proto3" json:"verifyOnChain,omitempty"`
//true:链上验证,false:本地验证
}
func
(
x
*
CreateRawTxReq
)
Reset
()
{
*
x
=
CreateRawTxReq
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
11
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
CreateRawTxReq
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
CreateRawTxReq
)
ProtoMessage
()
{}
func
(
x
*
CreateRawTxReq
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
11
]
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 CreateRawTxReq.ProtoReflect.Descriptor instead.
func
(
*
CreateRawTxReq
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
11
}
}
func
(
x
*
CreateRawTxReq
)
GetActionTy
()
int32
{
if
x
!=
nil
{
return
x
.
ActionTy
}
return
0
}
func
(
x
*
CreateRawTxReq
)
GetData
()
[]
byte
{
if
x
!=
nil
{
return
x
.
Data
}
return
nil
}
func
(
x
*
CreateRawTxReq
)
GetAssetExec
()
string
{
if
x
!=
nil
{
return
x
.
AssetExec
}
return
""
}
func
(
x
*
CreateRawTxReq
)
GetAssetSymbol
()
string
{
if
x
!=
nil
{
return
x
.
AssetSymbol
}
return
""
}
func
(
x
*
CreateRawTxReq
)
GetTitle
()
string
{
if
x
!=
nil
{
return
x
.
Title
}
return
""
}
func
(
x
*
CreateRawTxReq
)
GetVerifyOnChain
()
bool
{
if
x
!=
nil
{
return
x
.
VerifyOnChain
}
return
false
}
type
PaymentKeysReq
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
PrivKey
string
`protobuf:"bytes,1,opt,name=privKey,proto3" json:"privKey,omitempty"`
//user wallet priv key
Addr
string
`protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
//user addr
Detail
bool
`protobuf:"varint,3,opt,name=detail,proto3" json:"detail,omitempty"`
//获取私钥信息
}
func
(
x
*
PaymentKeysReq
)
Reset
()
{
*
x
=
PaymentKeysReq
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
12
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
PaymentKeysReq
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
PaymentKeysReq
)
ProtoMessage
()
{}
func
(
x
*
PaymentKeysReq
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
12
]
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 PaymentKeysReq.ProtoReflect.Descriptor instead.
func
(
*
PaymentKeysReq
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
12
}
}
func
(
x
*
PaymentKeysReq
)
GetPrivKey
()
string
{
if
x
!=
nil
{
return
x
.
PrivKey
}
return
""
}
func
(
x
*
PaymentKeysReq
)
GetAddr
()
string
{
if
x
!=
nil
{
return
x
.
Addr
}
return
""
}
func
(
x
*
PaymentKeysReq
)
GetDetail
()
bool
{
if
x
!=
nil
{
return
x
.
Detail
}
return
false
}
type
WalletNoteInfo
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
NoteHash
string
`protobuf:"bytes,1,opt,name=noteHash,proto3" json:"noteHash,omitempty"`
Nullifier
string
`protobuf:"bytes,2,opt,name=nullifier,proto3" json:"nullifier,omitempty"`
AuthorizeSpendHash
string
`protobuf:"bytes,3,opt,name=authorizeSpendHash,proto3" json:"authorizeSpendHash,omitempty"`
AuthorizeHash
string
`protobuf:"bytes,4,opt,name=authorizeHash,proto3" json:"authorizeHash,omitempty"`
Account
string
`protobuf:"bytes,5,opt,name=account,proto3" json:"account,omitempty"`
//账户地址
Status
NoteStatus
`protobuf:"varint,6,opt,name=status,proto3,enum=types.NoteStatus" json:"status,omitempty"`
Secret
*
SecretData
`protobuf:"bytes,7,opt,name=secret,proto3" json:"secret,omitempty"`
}
func
(
x
*
WalletNoteInfo
)
Reset
()
{
*
x
=
WalletNoteInfo
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
13
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
WalletNoteInfo
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
WalletNoteInfo
)
ProtoMessage
()
{}
func
(
x
*
WalletNoteInfo
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
13
]
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 WalletNoteInfo.ProtoReflect.Descriptor instead.
func
(
*
WalletNoteInfo
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
13
}
}
func
(
x
*
WalletNoteInfo
)
GetNoteHash
()
string
{
if
x
!=
nil
{
return
x
.
NoteHash
}
return
""
}
func
(
x
*
WalletNoteInfo
)
GetNullifier
()
string
{
if
x
!=
nil
{
return
x
.
Nullifier
}
return
""
}
func
(
x
*
WalletNoteInfo
)
GetAuthorizeSpendHash
()
string
{
if
x
!=
nil
{
return
x
.
AuthorizeSpendHash
}
return
""
}
func
(
x
*
WalletNoteInfo
)
GetAuthorizeHash
()
string
{
if
x
!=
nil
{
return
x
.
AuthorizeHash
}
return
""
}
func
(
x
*
WalletNoteInfo
)
GetAccount
()
string
{
if
x
!=
nil
{
return
x
.
Account
}
return
""
}
func
(
x
*
WalletNoteInfo
)
GetStatus
()
NoteStatus
{
if
x
!=
nil
{
return
x
.
Status
}
return
NoteStatus_UNDEF
}
func
(
x
*
WalletNoteInfo
)
GetSecret
()
*
SecretData
{
if
x
!=
nil
{
return
x
.
Secret
}
return
nil
}
type
WalletDbMixInfo
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Info
*
WalletNoteInfo
`protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
TxIndex
string
`protobuf:"bytes,2,opt,name=txIndex,proto3" json:"txIndex,omitempty"`
}
func
(
x
*
WalletDbMixInfo
)
Reset
()
{
*
x
=
WalletDbMixInfo
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
14
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
WalletDbMixInfo
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
WalletDbMixInfo
)
ProtoMessage
()
{}
func
(
x
*
WalletDbMixInfo
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
14
]
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 WalletDbMixInfo.ProtoReflect.Descriptor instead.
func
(
*
WalletDbMixInfo
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
14
}
}
func
(
x
*
WalletDbMixInfo
)
GetInfo
()
*
WalletNoteInfo
{
if
x
!=
nil
{
return
x
.
Info
}
return
nil
}
func
(
x
*
WalletDbMixInfo
)
GetTxIndex
()
string
{
if
x
!=
nil
{
return
x
.
TxIndex
}
return
""
}
type
WalletMixIndexReq
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
NoteHash
string
`protobuf:"bytes,1,opt,name=noteHash,proto3" json:"noteHash,omitempty"`
Nullifier
string
`protobuf:"bytes,2,opt,name=nullifier,proto3" json:"nullifier,omitempty"`
AuthorizeSpendHash
string
`protobuf:"bytes,3,opt,name=authorizeSpendHash,proto3" json:"authorizeSpendHash,omitempty"`
AuthorizeHash
string
`protobuf:"bytes,4,opt,name=authorizeHash,proto3" json:"authorizeHash,omitempty"`
Account
string
`protobuf:"bytes,5,opt,name=account,proto3" json:"account,omitempty"`
Status
int32
`protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"`
Count
int32
`protobuf:"varint,7,opt,name=count,proto3" json:"count,omitempty"`
Direction
int32
`protobuf:"varint,8,opt,name=direction,proto3" json:"direction,omitempty"`
}
func
(
x
*
WalletMixIndexReq
)
Reset
()
{
*
x
=
WalletMixIndexReq
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
15
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
WalletMixIndexReq
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
WalletMixIndexReq
)
ProtoMessage
()
{}
func
(
x
*
WalletMixIndexReq
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
15
]
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 WalletMixIndexReq.ProtoReflect.Descriptor instead.
func
(
*
WalletMixIndexReq
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
15
}
}
func
(
x
*
WalletMixIndexReq
)
GetNoteHash
()
string
{
if
x
!=
nil
{
return
x
.
NoteHash
}
return
""
}
func
(
x
*
WalletMixIndexReq
)
GetNullifier
()
string
{
if
x
!=
nil
{
return
x
.
Nullifier
}
return
""
}
func
(
x
*
WalletMixIndexReq
)
GetAuthorizeSpendHash
()
string
{
if
x
!=
nil
{
return
x
.
AuthorizeSpendHash
}
return
""
}
func
(
x
*
WalletMixIndexReq
)
GetAuthorizeHash
()
string
{
if
x
!=
nil
{
return
x
.
AuthorizeHash
}
return
""
}
func
(
x
*
WalletMixIndexReq
)
GetAccount
()
string
{
if
x
!=
nil
{
return
x
.
Account
}
return
""
}
func
(
x
*
WalletMixIndexReq
)
GetStatus
()
int32
{
if
x
!=
nil
{
return
x
.
Status
}
return
0
}
func
(
x
*
WalletMixIndexReq
)
GetCount
()
int32
{
if
x
!=
nil
{
return
x
.
Count
}
return
0
}
func
(
x
*
WalletMixIndexReq
)
GetDirection
()
int32
{
if
x
!=
nil
{
return
x
.
Direction
}
return
0
}
type
WalletNoteResp
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Notes
[]
*
WalletNoteInfo
`protobuf:"bytes,1,rep,name=notes,proto3" json:"notes,omitempty"`
}
func
(
x
*
WalletNoteResp
)
Reset
()
{
*
x
=
WalletNoteResp
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
16
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
WalletNoteResp
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
WalletNoteResp
)
ProtoMessage
()
{}
func
(
x
*
WalletNoteResp
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
16
]
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 WalletNoteResp.ProtoReflect.Descriptor instead.
func
(
*
WalletNoteResp
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
16
}
}
func
(
x
*
WalletNoteResp
)
GetNotes
()
[]
*
WalletNoteInfo
{
if
x
!=
nil
{
return
x
.
Notes
}
return
nil
}
type
WalletEnablePrivacyRst
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Addr
string
`protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
IsOK
bool
`protobuf:"varint,2,opt,name=isOK,proto3" json:"isOK,omitempty"`
Msg
string
`protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"`
}
func
(
x
*
WalletEnablePrivacyRst
)
Reset
()
{
*
x
=
WalletEnablePrivacyRst
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
17
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
WalletEnablePrivacyRst
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
WalletEnablePrivacyRst
)
ProtoMessage
()
{}
func
(
x
*
WalletEnablePrivacyRst
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
17
]
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 WalletEnablePrivacyRst.ProtoReflect.Descriptor instead.
func
(
*
WalletEnablePrivacyRst
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
17
}
}
func
(
x
*
WalletEnablePrivacyRst
)
GetAddr
()
string
{
if
x
!=
nil
{
return
x
.
Addr
}
return
""
}
func
(
x
*
WalletEnablePrivacyRst
)
GetIsOK
()
bool
{
if
x
!=
nil
{
return
x
.
IsOK
}
return
false
}
func
(
x
*
WalletEnablePrivacyRst
)
GetMsg
()
string
{
if
x
!=
nil
{
return
x
.
Msg
}
return
""
}
type
WalletEnablePrivacyResp
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Resps
[]
*
WalletEnablePrivacyRst
`protobuf:"bytes,1,rep,name=resps,proto3" json:"resps,omitempty"`
}
func
(
x
*
WalletEnablePrivacyResp
)
Reset
()
{
*
x
=
WalletEnablePrivacyResp
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
18
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
WalletEnablePrivacyResp
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
WalletEnablePrivacyResp
)
ProtoMessage
()
{}
func
(
x
*
WalletEnablePrivacyResp
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
18
]
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 WalletEnablePrivacyResp.ProtoReflect.Descriptor instead.
func
(
*
WalletEnablePrivacyResp
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
18
}
}
func
(
x
*
WalletEnablePrivacyResp
)
GetResps
()
[]
*
WalletEnablePrivacyRst
{
if
x
!=
nil
{
return
x
.
Resps
}
return
nil
}
type
PrivacyAddrResult
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Addr
string
`protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
IsOK
bool
`protobuf:"varint,2,opt,name=isOK,proto3" json:"isOK,omitempty"`
Msg
string
`protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"`
}
func
(
x
*
PrivacyAddrResult
)
Reset
()
{
*
x
=
PrivacyAddrResult
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
19
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
PrivacyAddrResult
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
PrivacyAddrResult
)
ProtoMessage
()
{}
func
(
x
*
PrivacyAddrResult
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
19
]
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 PrivacyAddrResult.ProtoReflect.Descriptor instead.
func
(
*
PrivacyAddrResult
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
19
}
}
func
(
x
*
PrivacyAddrResult
)
GetAddr
()
string
{
if
x
!=
nil
{
return
x
.
Addr
}
return
""
}
func
(
x
*
PrivacyAddrResult
)
GetIsOK
()
bool
{
if
x
!=
nil
{
return
x
.
IsOK
}
return
false
}
func
(
x
*
PrivacyAddrResult
)
GetMsg
()
string
{
if
x
!=
nil
{
return
x
.
Msg
}
return
""
}
type
ReqEnablePrivacyRst
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
Results
[]
*
PrivacyAddrResult
`protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
}
func
(
x
*
ReqEnablePrivacyRst
)
Reset
()
{
*
x
=
ReqEnablePrivacyRst
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_wallet_proto_msgTypes
[
20
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
ReqEnablePrivacyRst
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
ReqEnablePrivacyRst
)
ProtoMessage
()
{}
func
(
x
*
ReqEnablePrivacyRst
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_wallet_proto_msgTypes
[
20
]
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 ReqEnablePrivacyRst.ProtoReflect.Descriptor instead.
func
(
*
ReqEnablePrivacyRst
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_wallet_proto_rawDescGZIP
(),
[]
int
{
20
}
}
func
(
x
*
ReqEnablePrivacyRst
)
GetResults
()
[]
*
PrivacyAddrResult
{
if
x
!=
nil
{
return
x
.
Results
}
return
nil
}
var
File_wallet_proto
protoreflect
.
FileDescriptor
var
file_wallet_proto_rawDesc
=
[]
byte
{
0x0a
,
0x0c
,
0x77
,
0x61
,
0x6c
,
0x6c
,
0x65
,
0x74
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x12
,
0x05
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x1a
,
0x0c
,
0x63
,
0x6f
,
0x6d
,
0x6d
,
0x6f
,
0x6e
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x1a
,
0x11
,
0x74
,
0x72
,
0x61
,
0x6e
,
0x73
,
0x61
,
0x63
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x1a
,
0x0f
,
0x63
,
0x72
,
0x79
,
0x70
,
0x74
,
0x6f
,
0x6b
,
0x65
,
0x79
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x22
,
0x93
,
0x01
,
0x0a
,
0x0b
,
0x44
,
0x65
,
0x70
,
0x6f
,
0x73
,
0x69
,
0x74
,
0x49
,
0x6e
,
0x66
,
0x6f
,
0x12
,
0x24
,
0x0a
,
0x0d
,
0x72
,
0x65
,
0x63
,
0x65
,
0x69
,
0x76
,
0x65
,
0x72
,
0x41
,
0x64
,
0x64
,
0x72
,
0x73
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0d
,
0x72
,
0x65
,
0x63
,
0x65
,
0x69
,
0x76
,
0x65
,
0x72
,
0x41
,
0x64
,
0x64
,
0x72
,
0x73
,
0x12
,
0x1e
,
0x0a
,
0x0a
,
0x72
,
0x65
,
0x74
,
0x75
,
0x72
,
0x6e
,
0x41
,
0x64
,
0x64
,
0x72
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0a
,
0x72
,
0x65
,
0x74
,
0x75
,
0x72
,
0x6e
,
0x41
,
0x64
,
0x64
,
0x72
,
0x12
,
0x24
,
0x0a
,
0x0d
,
0x61
,
0x75
,
0x74
,
0x68
,
0x6f
,
0x72
,
0x69
,
0x7a
,
0x65
,
0x41
,
0x64
,
0x64
,
0x72
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0d
,
0x61
,
0x75
,
0x74
,
0x68
,
0x6f
,
0x72
,
0x69
,
0x7a
,
0x65
,
0x41
,
0x64
,
0x64
,
0x72
,
0x12
,
0x18
,
0x0a
,
0x07
,
0x61
,
0x6d
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x73
,
0x18
,
0x04
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x07
,
0x61
,
0x6d
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x73
,
0x22
,
0x54
,
0x0a
,
0x0c
,
0x44
,
0x65
,
0x70
,
0x6f
,
0x73
,
0x69
,
0x74
,
0x54
,
0x78
,
0x52
,
0x65
,
0x71
,
0x12
,
0x2c
,
0x0a
,
0x07
,
0x64
,
0x65
,
0x70
,
0x6f
,
0x73
,
0x69
,
0x74
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x12
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x44
,
0x65
,
0x70
,
0x6f
,
0x73
,
0x69
,
0x74
,
0x49
,
0x6e
,
0x66
,
0x6f
,
0x52
,
0x07
,
0x64
,
0x65
,
0x70
,
0x6f
,
0x73
,
0x69
,
0x74
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x7a
,
0x6b
,
0x50
,
0x61
,
0x74
,
0x68
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x7a
,
0x6b
,
0x50
,
0x61
,
0x74
,
0x68
,
0x22
,
0x87
,
0x01
,
0x0a
,
0x10
,
0x44
,
0x65
,
0x70
,
0x6f
,
0x73
,
0x69
,
0x74
,
0x50
,
0x72
,
0x6f
,
0x6f
,
0x66
,
0x52
,
0x65
,
0x73
,
0x70
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x6e
,
0x6f
,
0x74
,
0x65
,
0x48
,
0x61
,
0x73
,
0x68
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x08
,
0x6e
,
0x6f
,
0x74
,
0x65
,
0x48
,
0x61
,
0x73
,
0x68
,
0x12
,
0x27
,
0x0a
,
0x05
,
0x70
,
0x72
,
0x6f
,
0x6f
,
0x66
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x11
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x53
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x44
,
0x61
,
0x74
,
0x61
,
0x52
,
0x05
,
0x70
,
0x72
,
0x6f
,
0x6f
,
0x66
,
0x12
,
0x2e
,
0x0a
,
0x07
,
0x73
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x73
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x14
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x44
,
0x48
,
0x53
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x47
,
0x72
,
0x6f
,
0x75
,
0x70
,
0x52
,
0x07
,
0x73
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x73
,
0x22
,
0x67
,
0x0a
,
0x0d
,
0x57
,
0x69
,
0x74
,
0x68
,
0x64
,
0x72
,
0x61
,
0x77
,
0x54
,
0x78
,
0x52
,
0x65
,
0x71
,
0x12
,
0x20
,
0x0a
,
0x0b
,
0x74
,
0x6f
,
0x74
,
0x61
,
0x6c
,
0x41
,
0x6d
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x04
,
0x52
,
0x0b
,
0x74
,
0x6f
,
0x74
,
0x61
,
0x6c
,
0x41
,
0x6d
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x12
,
0x1c
,
0x0a
,
0x09
,
0x6e
,
0x6f
,
0x74
,
0x65
,
0x48
,
0x61
,
0x73
,
0x68
,
0x73
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x09
,
0x6e
,
0x6f
,
0x74
,
0x65
,
0x48
,
0x61
,
0x73
,
0x68
,
0x73
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x7a
,
0x6b
,
0x50
,
0x61
,
0x74
,
0x68
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x7a
,
0x6b
,
0x50
,
0x61
,
0x74
,
0x68
,
0x22
,
0x69
,
0x0a
,
0x09
,
0x41
,
0x75
,
0x74
,
0x68
,
0x54
,
0x78
,
0x52
,
0x65
,
0x71
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x6e
,
0x6f
,
0x74
,
0x65
,
0x48
,
0x61
,
0x73
,
0x68
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x08
,
0x6e
,
0x6f
,
0x74
,
0x65
,
0x48
,
0x61
,
0x73
,
0x68
,
0x12
,
0x28
,
0x0a
,
0x0f
,
0x61
,
0x75
,
0x74
,
0x68
,
0x6f
,
0x72
,
0x69
,
0x7a
,
0x65
,
0x54
,
0x6f
,
0x41
,
0x64
,
0x64
,
0x72
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0f
,
0x61
,
0x75
,
0x74
,
0x68
,
0x6f
,
0x72
,
0x69
,
0x7a
,
0x65
,
0x54
,
0x6f
,
0x41
,
0x64
,
0x64
,
0x72
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x7a
,
0x6b
,
0x50
,
0x61
,
0x74
,
0x68
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x7a
,
0x6b
,
0x50
,
0x61
,
0x74
,
0x68
,
0x22
,
0x32
,
0x0a
,
0x12
,
0x54
,
0x72
,
0x61
,
0x6e
,
0x73
,
0x66
,
0x65
,
0x72
,
0x49
,
0x6e
,
0x70
,
0x75
,
0x74
,
0x54
,
0x78
,
0x52
,
0x65
,
0x71
,
0x12
,
0x1c
,
0x0a
,
0x09
,
0x6e
,
0x6f
,
0x74
,
0x65
,
0x48
,
0x61
,
0x73
,
0x68
,
0x73
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x09
,
0x6e
,
0x6f
,
0x74
,
0x65
,
0x48
,
0x61
,
0x73
,
0x68
,
0x73
,
0x22
,
0x43
,
0x0a
,
0x13
,
0x54
,
0x72
,
0x61
,
0x6e
,
0x73
,
0x66
,
0x65
,
0x72
,
0x4f
,
0x75
,
0x74
,
0x70
,
0x75
,
0x74
,
0x54
,
0x78
,
0x52
,
0x65
,
0x71
,
0x12
,
0x2c
,
0x0a
,
0x07
,
0x64
,
0x65
,
0x70
,
0x6f
,
0x73
,
0x69
,
0x74
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x12
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x44
,
0x65
,
0x70
,
0x6f
,
0x73
,
0x69
,
0x74
,
0x49
,
0x6e
,
0x66
,
0x6f
,
0x52
,
0x07
,
0x64
,
0x65
,
0x70
,
0x6f
,
0x73
,
0x69
,
0x74
,
0x22
,
0x8c
,
0x01
,
0x0a
,
0x0d
,
0x54
,
0x72
,
0x61
,
0x6e
,
0x73
,
0x66
,
0x65
,
0x72
,
0x54
,
0x78
,
0x52
,
0x65
,
0x71
,
0x12
,
0x2f
,
0x0a
,
0x05
,
0x69
,
0x6e
,
0x70
,
0x75
,
0x74
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x19
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x54
,
0x72
,
0x61
,
0x6e
,
0x73
,
0x66
,
0x65
,
0x72
,
0x49
,
0x6e
,
0x70
,
0x75
,
0x74
,
0x54
,
0x78
,
0x52
,
0x65
,
0x71
,
0x52
,
0x05
,
0x69
,
0x6e
,
0x70
,
0x75
,
0x74
,
0x12
,
0x32
,
0x0a
,
0x06
,
0x6f
,
0x75
,
0x74
,
0x70
,
0x75
,
0x74
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x1a
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x54
,
0x72
,
0x61
,
0x6e
,
0x73
,
0x66
,
0x65
,
0x72
,
0x4f
,
0x75
,
0x74
,
0x70
,
0x75
,
0x74
,
0x54
,
0x78
,
0x52
,
0x65
,
0x71
,
0x52
,
0x06
,
0x6f
,
0x75
,
0x74
,
0x70
,
0x75
,
0x74
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x7a
,
0x6b
,
0x50
,
0x61
,
0x74
,
0x68
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x06
,
0x7a
,
0x6b
,
0x50
,
0x61
,
0x74
,
0x68
,
0x22
,
0x40
,
0x0a
,
0x12
,
0x43
,
0x72
,
0x65
,
0x61
,
0x74
,
0x65
,
0x5a
,
0x6b
,
0x4b
,
0x65
,
0x79
,
0x46
,
0x69
,
0x6c
,
0x65
,
0x52
,
0x65
,
0x71
,
0x12
,
0x0e
,
0x0a
,
0x02
,
0x74
,
0x79
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x05
,
0x52
,
0x02
,
0x74
,
0x79
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x73
,
0x61
,
0x76
,
0x65
,
0x50
,
0x61
,
0x74
,
0x68
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x08
,
0x73
,
0x61
,
0x76
,
0x65
,
0x50
,
0x61
,
0x74
,
0x68
,
0x22
,
0x2a
,
0x0a
,
0x0c
,
0x53
,
0x68
,
0x69
,
0x65
,
0x6c
,
0x64
,
0x41
,
0x6d
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x12
,
0x0c
,
0x0a
,
0x01
,
0x58
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x01
,
0x58
,
0x12
,
0x0c
,
0x0a
,
0x01
,
0x59
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x01
,
0x59
,
0x22
,
0x84
,
0x02
,
0x0a
,
0x0f
,
0x53
,
0x68
,
0x69
,
0x65
,
0x6c
,
0x64
,
0x41
,
0x6d
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x52
,
0x73
,
0x74
,
0x12
,
0x22
,
0x0a
,
0x0c
,
0x69
,
0x6e
,
0x70
,
0x75
,
0x74
,
0x52
,
0x61
,
0x6e
,
0x64
,
0x6f
,
0x6d
,
0x73
,
0x18
,
0x01
,
0x20
,
0x03
,
0x28
,
0x09
,
0x52
,
0x0c
,
0x69
,
0x6e
,
0x70
,
0x75
,
0x74
,
0x52
,
0x61
,
0x6e
,
0x64
,
0x6f
,
0x6d
,
0x73
,
0x12
,
0x22
,
0x0a
,
0x0c
,
0x6f
,
0x75
,
0x74
,
0x70
,
0x75
,
0x74
,
0x52
,
0x61
,
0x6e
,
0x64
,
0x6f
,
0x6d
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0c
,
0x6f
,
0x75
,
0x74
,
0x70
,
0x75
,
0x74
,
0x52
,
0x61
,
0x6e
,
0x64
,
0x6f
,
0x6d
,
0x12
,
0x22
,
0x0a
,
0x0c
,
0x63
,
0x68
,
0x61
,
0x6e
,
0x67
,
0x65
,
0x52
,
0x61
,
0x6e
,
0x64
,
0x6f
,
0x6d
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0c
,
0x63
,
0x68
,
0x61
,
0x6e
,
0x67
,
0x65
,
0x52
,
0x61
,
0x6e
,
0x64
,
0x6f
,
0x6d
,
0x12
,
0x2b
,
0x0a
,
0x06
,
0x69
,
0x6e
,
0x70
,
0x75
,
0x74
,
0x73
,
0x18
,
0x04
,
0x20
,
0x03
,
0x28
,
0x0b
,
0x32
,
0x13
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x53
,
0x68
,
0x69
,
0x65
,
0x6c
,
0x64
,
0x41
,
0x6d
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x52
,
0x06
,
0x69
,
0x6e
,
0x70
,
0x75
,
0x74
,
0x73
,
0x12
,
0x2b
,
0x0a
,
0x06
,
0x6f
,
0x75
,
0x74
,
0x70
,
0x75
,
0x74
,
0x18
,
0x05
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x13
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x53
,
0x68
,
0x69
,
0x65
,
0x6c
,
0x64
,
0x41
,
0x6d
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x52
,
0x06
,
0x6f
,
0x75
,
0x74
,
0x70
,
0x75
,
0x74
,
0x12
,
0x2b
,
0x0a
,
0x06
,
0x63
,
0x68
,
0x61
,
0x6e
,
0x67
,
0x65
,
0x18
,
0x06
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x13
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x53
,
0x68
,
0x69
,
0x65
,
0x6c
,
0x64
,
0x41
,
0x6d
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x52
,
0x06
,
0x63
,
0x68
,
0x61
,
0x6e
,
0x67
,
0x65
,
0x22
,
0xbc
,
0x01
,
0x0a
,
0x0e
,
0x43
,
0x72
,
0x65
,
0x61
,
0x74
,
0x65
,
0x52
,
0x61
,
0x77
,
0x54
,
0x78
,
0x52
,
0x65
,
0x71
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x61
,
0x63
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x54
,
0x79
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x05
,
0x52
,
0x08
,
0x61
,
0x63
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x54
,
0x79
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x64
,
0x61
,
0x74
,
0x61
,
0x18
,
0x04
,
0x20
,
0x01
,
0x28
,
0x0c
,
0x52
,
0x04
,
0x64
,
0x61
,
0x74
,
0x61
,
0x12
,
0x1c
,
0x0a
,
0x09
,
0x61
,
0x73
,
0x73
,
0x65
,
0x74
,
0x45
,
0x78
,
0x65
,
0x63
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x09
,
0x61
,
0x73
,
0x73
,
0x65
,
0x74
,
0x45
,
0x78
,
0x65
,
0x63
,
0x12
,
0x20
,
0x0a
,
0x0b
,
0x61
,
0x73
,
0x73
,
0x65
,
0x74
,
0x53
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0b
,
0x61
,
0x73
,
0x73
,
0x65
,
0x74
,
0x53
,
0x79
,
0x6d
,
0x62
,
0x6f
,
0x6c
,
0x12
,
0x14
,
0x0a
,
0x05
,
0x74
,
0x69
,
0x74
,
0x6c
,
0x65
,
0x18
,
0x06
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x05
,
0x74
,
0x69
,
0x74
,
0x6c
,
0x65
,
0x12
,
0x24
,
0x0a
,
0x0d
,
0x76
,
0x65
,
0x72
,
0x69
,
0x66
,
0x79
,
0x4f
,
0x6e
,
0x43
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x18
,
0x07
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x0d
,
0x76
,
0x65
,
0x72
,
0x69
,
0x66
,
0x79
,
0x4f
,
0x6e
,
0x43
,
0x68
,
0x61
,
0x69
,
0x6e
,
0x22
,
0x56
,
0x0a
,
0x0e
,
0x50
,
0x61
,
0x79
,
0x6d
,
0x65
,
0x6e
,
0x74
,
0x4b
,
0x65
,
0x79
,
0x73
,
0x52
,
0x65
,
0x71
,
0x12
,
0x18
,
0x0a
,
0x07
,
0x70
,
0x72
,
0x69
,
0x76
,
0x4b
,
0x65
,
0x79
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x07
,
0x70
,
0x72
,
0x69
,
0x76
,
0x4b
,
0x65
,
0x79
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x61
,
0x64
,
0x64
,
0x72
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x61
,
0x64
,
0x64
,
0x72
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x64
,
0x65
,
0x74
,
0x61
,
0x69
,
0x6c
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x06
,
0x64
,
0x65
,
0x74
,
0x61
,
0x69
,
0x6c
,
0x22
,
0x90
,
0x02
,
0x0a
,
0x0e
,
0x57
,
0x61
,
0x6c
,
0x6c
,
0x65
,
0x74
,
0x4e
,
0x6f
,
0x74
,
0x65
,
0x49
,
0x6e
,
0x66
,
0x6f
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x6e
,
0x6f
,
0x74
,
0x65
,
0x48
,
0x61
,
0x73
,
0x68
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x08
,
0x6e
,
0x6f
,
0x74
,
0x65
,
0x48
,
0x61
,
0x73
,
0x68
,
0x12
,
0x1c
,
0x0a
,
0x09
,
0x6e
,
0x75
,
0x6c
,
0x6c
,
0x69
,
0x66
,
0x69
,
0x65
,
0x72
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x09
,
0x6e
,
0x75
,
0x6c
,
0x6c
,
0x69
,
0x66
,
0x69
,
0x65
,
0x72
,
0x12
,
0x2e
,
0x0a
,
0x12
,
0x61
,
0x75
,
0x74
,
0x68
,
0x6f
,
0x72
,
0x69
,
0x7a
,
0x65
,
0x53
,
0x70
,
0x65
,
0x6e
,
0x64
,
0x48
,
0x61
,
0x73
,
0x68
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x12
,
0x61
,
0x75
,
0x74
,
0x68
,
0x6f
,
0x72
,
0x69
,
0x7a
,
0x65
,
0x53
,
0x70
,
0x65
,
0x6e
,
0x64
,
0x48
,
0x61
,
0x73
,
0x68
,
0x12
,
0x24
,
0x0a
,
0x0d
,
0x61
,
0x75
,
0x74
,
0x68
,
0x6f
,
0x72
,
0x69
,
0x7a
,
0x65
,
0x48
,
0x61
,
0x73
,
0x68
,
0x18
,
0x04
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0d
,
0x61
,
0x75
,
0x74
,
0x68
,
0x6f
,
0x72
,
0x69
,
0x7a
,
0x65
,
0x48
,
0x61
,
0x73
,
0x68
,
0x12
,
0x18
,
0x0a
,
0x07
,
0x61
,
0x63
,
0x63
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x18
,
0x05
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x07
,
0x61
,
0x63
,
0x63
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x12
,
0x29
,
0x0a
,
0x06
,
0x73
,
0x74
,
0x61
,
0x74
,
0x75
,
0x73
,
0x18
,
0x06
,
0x20
,
0x01
,
0x28
,
0x0e
,
0x32
,
0x11
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x4e
,
0x6f
,
0x74
,
0x65
,
0x53
,
0x74
,
0x61
,
0x74
,
0x75
,
0x73
,
0x52
,
0x06
,
0x73
,
0x74
,
0x61
,
0x74
,
0x75
,
0x73
,
0x12
,
0x29
,
0x0a
,
0x06
,
0x73
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x18
,
0x07
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x11
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x53
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x44
,
0x61
,
0x74
,
0x61
,
0x52
,
0x06
,
0x73
,
0x65
,
0x63
,
0x72
,
0x65
,
0x74
,
0x22
,
0x56
,
0x0a
,
0x0f
,
0x57
,
0x61
,
0x6c
,
0x6c
,
0x65
,
0x74
,
0x44
,
0x62
,
0x4d
,
0x69
,
0x78
,
0x49
,
0x6e
,
0x66
,
0x6f
,
0x12
,
0x29
,
0x0a
,
0x04
,
0x69
,
0x6e
,
0x66
,
0x6f
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x15
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x57
,
0x61
,
0x6c
,
0x6c
,
0x65
,
0x74
,
0x4e
,
0x6f
,
0x74
,
0x65
,
0x49
,
0x6e
,
0x66
,
0x6f
,
0x52
,
0x04
,
0x69
,
0x6e
,
0x66
,
0x6f
,
0x12
,
0x18
,
0x0a
,
0x07
,
0x74
,
0x78
,
0x49
,
0x6e
,
0x64
,
0x65
,
0x78
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x07
,
0x74
,
0x78
,
0x49
,
0x6e
,
0x64
,
0x65
,
0x78
,
0x22
,
0x89
,
0x02
,
0x0a
,
0x11
,
0x57
,
0x61
,
0x6c
,
0x6c
,
0x65
,
0x74
,
0x4d
,
0x69
,
0x78
,
0x49
,
0x6e
,
0x64
,
0x65
,
0x78
,
0x52
,
0x65
,
0x71
,
0x12
,
0x1a
,
0x0a
,
0x08
,
0x6e
,
0x6f
,
0x74
,
0x65
,
0x48
,
0x61
,
0x73
,
0x68
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x08
,
0x6e
,
0x6f
,
0x74
,
0x65
,
0x48
,
0x61
,
0x73
,
0x68
,
0x12
,
0x1c
,
0x0a
,
0x09
,
0x6e
,
0x75
,
0x6c
,
0x6c
,
0x69
,
0x66
,
0x69
,
0x65
,
0x72
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x09
,
0x6e
,
0x75
,
0x6c
,
0x6c
,
0x69
,
0x66
,
0x69
,
0x65
,
0x72
,
0x12
,
0x2e
,
0x0a
,
0x12
,
0x61
,
0x75
,
0x74
,
0x68
,
0x6f
,
0x72
,
0x69
,
0x7a
,
0x65
,
0x53
,
0x70
,
0x65
,
0x6e
,
0x64
,
0x48
,
0x61
,
0x73
,
0x68
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x12
,
0x61
,
0x75
,
0x74
,
0x68
,
0x6f
,
0x72
,
0x69
,
0x7a
,
0x65
,
0x53
,
0x70
,
0x65
,
0x6e
,
0x64
,
0x48
,
0x61
,
0x73
,
0x68
,
0x12
,
0x24
,
0x0a
,
0x0d
,
0x61
,
0x75
,
0x74
,
0x68
,
0x6f
,
0x72
,
0x69
,
0x7a
,
0x65
,
0x48
,
0x61
,
0x73
,
0x68
,
0x18
,
0x04
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0d
,
0x61
,
0x75
,
0x74
,
0x68
,
0x6f
,
0x72
,
0x69
,
0x7a
,
0x65
,
0x48
,
0x61
,
0x73
,
0x68
,
0x12
,
0x18
,
0x0a
,
0x07
,
0x61
,
0x63
,
0x63
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x18
,
0x05
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x07
,
0x61
,
0x63
,
0x63
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x12
,
0x16
,
0x0a
,
0x06
,
0x73
,
0x74
,
0x61
,
0x74
,
0x75
,
0x73
,
0x18
,
0x06
,
0x20
,
0x01
,
0x28
,
0x05
,
0x52
,
0x06
,
0x73
,
0x74
,
0x61
,
0x74
,
0x75
,
0x73
,
0x12
,
0x14
,
0x0a
,
0x05
,
0x63
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x18
,
0x07
,
0x20
,
0x01
,
0x28
,
0x05
,
0x52
,
0x05
,
0x63
,
0x6f
,
0x75
,
0x6e
,
0x74
,
0x12
,
0x1c
,
0x0a
,
0x09
,
0x64
,
0x69
,
0x72
,
0x65
,
0x63
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x18
,
0x08
,
0x20
,
0x01
,
0x28
,
0x05
,
0x52
,
0x09
,
0x64
,
0x69
,
0x72
,
0x65
,
0x63
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x22
,
0x3d
,
0x0a
,
0x0e
,
0x57
,
0x61
,
0x6c
,
0x6c
,
0x65
,
0x74
,
0x4e
,
0x6f
,
0x74
,
0x65
,
0x52
,
0x65
,
0x73
,
0x70
,
0x12
,
0x2b
,
0x0a
,
0x05
,
0x6e
,
0x6f
,
0x74
,
0x65
,
0x73
,
0x18
,
0x01
,
0x20
,
0x03
,
0x28
,
0x0b
,
0x32
,
0x15
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x57
,
0x61
,
0x6c
,
0x6c
,
0x65
,
0x74
,
0x4e
,
0x6f
,
0x74
,
0x65
,
0x49
,
0x6e
,
0x66
,
0x6f
,
0x52
,
0x05
,
0x6e
,
0x6f
,
0x74
,
0x65
,
0x73
,
0x22
,
0x52
,
0x0a
,
0x16
,
0x57
,
0x61
,
0x6c
,
0x6c
,
0x65
,
0x74
,
0x45
,
0x6e
,
0x61
,
0x62
,
0x6c
,
0x65
,
0x50
,
0x72
,
0x69
,
0x76
,
0x61
,
0x63
,
0x79
,
0x52
,
0x73
,
0x74
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x61
,
0x64
,
0x64
,
0x72
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x61
,
0x64
,
0x64
,
0x72
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x69
,
0x73
,
0x4f
,
0x4b
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x04
,
0x69
,
0x73
,
0x4f
,
0x4b
,
0x12
,
0x10
,
0x0a
,
0x03
,
0x6d
,
0x73
,
0x67
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x03
,
0x6d
,
0x73
,
0x67
,
0x22
,
0x4e
,
0x0a
,
0x17
,
0x57
,
0x61
,
0x6c
,
0x6c
,
0x65
,
0x74
,
0x45
,
0x6e
,
0x61
,
0x62
,
0x6c
,
0x65
,
0x50
,
0x72
,
0x69
,
0x76
,
0x61
,
0x63
,
0x79
,
0x52
,
0x65
,
0x73
,
0x70
,
0x12
,
0x33
,
0x0a
,
0x05
,
0x72
,
0x65
,
0x73
,
0x70
,
0x73
,
0x18
,
0x01
,
0x20
,
0x03
,
0x28
,
0x0b
,
0x32
,
0x1d
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x57
,
0x61
,
0x6c
,
0x6c
,
0x65
,
0x74
,
0x45
,
0x6e
,
0x61
,
0x62
,
0x6c
,
0x65
,
0x50
,
0x72
,
0x69
,
0x76
,
0x61
,
0x63
,
0x79
,
0x52
,
0x73
,
0x74
,
0x52
,
0x05
,
0x72
,
0x65
,
0x73
,
0x70
,
0x73
,
0x22
,
0x4d
,
0x0a
,
0x11
,
0x50
,
0x72
,
0x69
,
0x76
,
0x61
,
0x63
,
0x79
,
0x41
,
0x64
,
0x64
,
0x72
,
0x52
,
0x65
,
0x73
,
0x75
,
0x6c
,
0x74
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x61
,
0x64
,
0x64
,
0x72
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x04
,
0x61
,
0x64
,
0x64
,
0x72
,
0x12
,
0x12
,
0x0a
,
0x04
,
0x69
,
0x73
,
0x4f
,
0x4b
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x04
,
0x69
,
0x73
,
0x4f
,
0x4b
,
0x12
,
0x10
,
0x0a
,
0x03
,
0x6d
,
0x73
,
0x67
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x03
,
0x6d
,
0x73
,
0x67
,
0x22
,
0x49
,
0x0a
,
0x13
,
0x52
,
0x65
,
0x71
,
0x45
,
0x6e
,
0x61
,
0x62
,
0x6c
,
0x65
,
0x50
,
0x72
,
0x69
,
0x76
,
0x61
,
0x63
,
0x79
,
0x52
,
0x73
,
0x74
,
0x12
,
0x32
,
0x0a
,
0x07
,
0x72
,
0x65
,
0x73
,
0x75
,
0x6c
,
0x74
,
0x73
,
0x18
,
0x01
,
0x20
,
0x03
,
0x28
,
0x0b
,
0x32
,
0x18
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x50
,
0x72
,
0x69
,
0x76
,
0x61
,
0x63
,
0x79
,
0x41
,
0x64
,
0x64
,
0x72
,
0x52
,
0x65
,
0x73
,
0x75
,
0x6c
,
0x74
,
0x52
,
0x07
,
0x72
,
0x65
,
0x73
,
0x75
,
0x6c
,
0x74
,
0x73
,
0x2a
,
0x46
,
0x0a
,
0x0a
,
0x4e
,
0x6f
,
0x74
,
0x65
,
0x53
,
0x74
,
0x61
,
0x74
,
0x75
,
0x73
,
0x12
,
0x09
,
0x0a
,
0x05
,
0x55
,
0x4e
,
0x44
,
0x45
,
0x46
,
0x10
,
0x00
,
0x12
,
0x09
,
0x0a
,
0x05
,
0x56
,
0x41
,
0x4c
,
0x49
,
0x44
,
0x10
,
0x01
,
0x12
,
0x08
,
0x0a
,
0x04
,
0x55
,
0x53
,
0x45
,
0x44
,
0x10
,
0x02
,
0x12
,
0x0a
,
0x0a
,
0x06
,
0x46
,
0x52
,
0x4f
,
0x5a
,
0x45
,
0x4e
,
0x10
,
0x03
,
0x12
,
0x0c
,
0x0a
,
0x08
,
0x55
,
0x4e
,
0x46
,
0x52
,
0x4f
,
0x5a
,
0x45
,
0x4e
,
0x10
,
0x04
,
0x2a
,
0x3d
,
0x0a
,
0x15
,
0x4d
,
0x69
,
0x78
,
0x57
,
0x61
,
0x6c
,
0x6c
,
0x65
,
0x74
,
0x52
,
0x65
,
0x73
,
0x63
,
0x61
,
0x6e
,
0x53
,
0x74
,
0x61
,
0x74
,
0x75
,
0x73
,
0x12
,
0x08
,
0x0a
,
0x04
,
0x49
,
0x44
,
0x4c
,
0x45
,
0x10
,
0x00
,
0x12
,
0x0c
,
0x0a
,
0x08
,
0x53
,
0x43
,
0x41
,
0x4e
,
0x4e
,
0x49
,
0x4e
,
0x47
,
0x10
,
0x01
,
0x12
,
0x0c
,
0x0a
,
0x08
,
0x46
,
0x49
,
0x4e
,
0x49
,
0x53
,
0x48
,
0x45
,
0x44
,
0x10
,
0x02
,
0x32
,
0xb4
,
0x01
,
0x0a
,
0x0a
,
0x6d
,
0x69
,
0x78
,
0x50
,
0x72
,
0x69
,
0x76
,
0x61
,
0x63
,
0x79
,
0x12
,
0x34
,
0x0a
,
0x0f
,
0x47
,
0x65
,
0x74
,
0x52
,
0x65
,
0x73
,
0x63
,
0x61
,
0x6e
,
0x53
,
0x74
,
0x61
,
0x74
,
0x75
,
0x73
,
0x12
,
0x0d
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x52
,
0x65
,
0x71
,
0x4e
,
0x69
,
0x6c
,
0x1a
,
0x10
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x52
,
0x65
,
0x71
,
0x53
,
0x74
,
0x72
,
0x69
,
0x6e
,
0x67
,
0x22
,
0x00
,
0x12
,
0x30
,
0x0a
,
0x0b
,
0x52
,
0x65
,
0x73
,
0x63
,
0x61
,
0x6e
,
0x4e
,
0x6f
,
0x74
,
0x65
,
0x73
,
0x12
,
0x0d
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x52
,
0x65
,
0x71
,
0x4e
,
0x69
,
0x6c
,
0x1a
,
0x10
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x52
,
0x65
,
0x71
,
0x53
,
0x74
,
0x72
,
0x69
,
0x6e
,
0x67
,
0x22
,
0x00
,
0x12
,
0x3e
,
0x0a
,
0x0d
,
0x45
,
0x6e
,
0x61
,
0x62
,
0x6c
,
0x65
,
0x50
,
0x72
,
0x69
,
0x76
,
0x61
,
0x63
,
0x79
,
0x12
,
0x0f
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x52
,
0x65
,
0x71
,
0x41
,
0x64
,
0x64
,
0x72
,
0x73
,
0x1a
,
0x1a
,
0x2e
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x2e
,
0x52
,
0x65
,
0x71
,
0x45
,
0x6e
,
0x61
,
0x62
,
0x6c
,
0x65
,
0x50
,
0x72
,
0x69
,
0x76
,
0x61
,
0x63
,
0x79
,
0x52
,
0x73
,
0x74
,
0x22
,
0x00
,
0x42
,
0x0a
,
0x5a
,
0x08
,
0x2e
,
0x2e
,
0x2f
,
0x74
,
0x79
,
0x70
,
0x65
,
0x73
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
}
var
(
file_wallet_proto_rawDescOnce
sync
.
Once
file_wallet_proto_rawDescData
=
file_wallet_proto_rawDesc
)
func
file_wallet_proto_rawDescGZIP
()
[]
byte
{
file_wallet_proto_rawDescOnce
.
Do
(
func
()
{
file_wallet_proto_rawDescData
=
protoimpl
.
X
.
CompressGZIP
(
file_wallet_proto_rawDescData
)
})
return
file_wallet_proto_rawDescData
}
var
file_wallet_proto_enumTypes
=
make
([]
protoimpl
.
EnumInfo
,
2
)
var
file_wallet_proto_msgTypes
=
make
([]
protoimpl
.
MessageInfo
,
21
)
var
file_wallet_proto_goTypes
=
[]
interface
{}{
(
NoteStatus
)(
0
),
// 0: types.NoteStatus
(
MixWalletRescanStatus
)(
0
),
// 1: types.MixWalletRescanStatus
(
*
DepositInfo
)(
nil
),
// 2: types.DepositInfo
(
*
DepositTxReq
)(
nil
),
// 3: types.DepositTxReq
(
*
DepositProofResp
)(
nil
),
// 4: types.DepositProofResp
(
*
WithdrawTxReq
)(
nil
),
// 5: types.WithdrawTxReq
(
*
AuthTxReq
)(
nil
),
// 6: types.AuthTxReq
(
*
TransferInputTxReq
)(
nil
),
// 7: types.TransferInputTxReq
(
*
TransferOutputTxReq
)(
nil
),
// 8: types.TransferOutputTxReq
(
*
TransferTxReq
)(
nil
),
// 9: types.TransferTxReq
(
*
CreateZkKeyFileReq
)(
nil
),
// 10: types.CreateZkKeyFileReq
(
*
ShieldAmount
)(
nil
),
// 11: types.ShieldAmount
(
*
ShieldAmountRst
)(
nil
),
// 12: types.ShieldAmountRst
(
*
CreateRawTxReq
)(
nil
),
// 13: types.CreateRawTxReq
(
*
PaymentKeysReq
)(
nil
),
// 14: types.PaymentKeysReq
(
*
WalletNoteInfo
)(
nil
),
// 15: types.WalletNoteInfo
(
*
WalletDbMixInfo
)(
nil
),
// 16: types.WalletDbMixInfo
(
*
WalletMixIndexReq
)(
nil
),
// 17: types.WalletMixIndexReq
(
*
WalletNoteResp
)(
nil
),
// 18: types.WalletNoteResp
(
*
WalletEnablePrivacyRst
)(
nil
),
// 19: types.WalletEnablePrivacyRst
(
*
WalletEnablePrivacyResp
)(
nil
),
// 20: types.WalletEnablePrivacyResp
(
*
PrivacyAddrResult
)(
nil
),
// 21: types.PrivacyAddrResult
(
*
ReqEnablePrivacyRst
)(
nil
),
// 22: types.ReqEnablePrivacyRst
(
*
SecretData
)(
nil
),
// 23: types.SecretData
(
*
DHSecretGroup
)(
nil
),
// 24: types.DHSecretGroup
(
*
types
.
ReqNil
)(
nil
),
// 25: types.ReqNil
(
*
types
.
ReqAddrs
)(
nil
),
// 26: types.ReqAddrs
(
*
types
.
ReqString
)(
nil
),
// 27: types.ReqString
}
var
file_wallet_proto_depIdxs
=
[]
int32
{
2
,
// 0: types.DepositTxReq.deposit:type_name -> types.DepositInfo
23
,
// 1: types.DepositProofResp.proof:type_name -> types.SecretData
24
,
// 2: types.DepositProofResp.secrets:type_name -> types.DHSecretGroup
2
,
// 3: types.TransferOutputTxReq.deposit:type_name -> types.DepositInfo
7
,
// 4: types.TransferTxReq.input:type_name -> types.TransferInputTxReq
8
,
// 5: types.TransferTxReq.output:type_name -> types.TransferOutputTxReq
11
,
// 6: types.ShieldAmountRst.inputs:type_name -> types.ShieldAmount
11
,
// 7: types.ShieldAmountRst.output:type_name -> types.ShieldAmount
11
,
// 8: types.ShieldAmountRst.change:type_name -> types.ShieldAmount
0
,
// 9: types.WalletNoteInfo.status:type_name -> types.NoteStatus
23
,
// 10: types.WalletNoteInfo.secret:type_name -> types.SecretData
15
,
// 11: types.WalletDbMixInfo.info:type_name -> types.WalletNoteInfo
15
,
// 12: types.WalletNoteResp.notes:type_name -> types.WalletNoteInfo
19
,
// 13: types.WalletEnablePrivacyResp.resps:type_name -> types.WalletEnablePrivacyRst
21
,
// 14: types.ReqEnablePrivacyRst.results:type_name -> types.PrivacyAddrResult
25
,
// 15: types.mixPrivacy.GetRescanStatus:input_type -> types.ReqNil
25
,
// 16: types.mixPrivacy.RescanNotes:input_type -> types.ReqNil
26
,
// 17: types.mixPrivacy.EnablePrivacy:input_type -> types.ReqAddrs
27
,
// 18: types.mixPrivacy.GetRescanStatus:output_type -> types.ReqString
27
,
// 19: types.mixPrivacy.RescanNotes:output_type -> types.ReqString
22
,
// 20: types.mixPrivacy.EnablePrivacy:output_type -> types.ReqEnablePrivacyRst
18
,
// [18:21] is the sub-list for method output_type
15
,
// [15:18] is the sub-list for method input_type
15
,
// [15:15] is the sub-list for extension type_name
15
,
// [15:15] is the sub-list for extension extendee
0
,
// [0:15] is the sub-list for field type_name
}
func
init
()
{
file_wallet_proto_init
()
}
func
file_wallet_proto_init
()
{
if
File_wallet_proto
!=
nil
{
return
}
file_cryptokey_proto_init
()
if
!
protoimpl
.
UnsafeEnabled
{
file_wallet_proto_msgTypes
[
0
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
DepositInfo
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
1
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
DepositTxReq
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
2
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
DepositProofResp
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
3
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
WithdrawTxReq
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
4
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
AuthTxReq
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
5
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
TransferInputTxReq
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
6
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
TransferOutputTxReq
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
7
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
TransferTxReq
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
8
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
CreateZkKeyFileReq
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
9
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
ShieldAmount
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
10
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
ShieldAmountRst
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
11
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
CreateRawTxReq
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
12
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
PaymentKeysReq
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
13
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
WalletNoteInfo
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
14
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
WalletDbMixInfo
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
15
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
WalletMixIndexReq
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
16
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
WalletNoteResp
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
17
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
WalletEnablePrivacyRst
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
18
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
WalletEnablePrivacyResp
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
19
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
PrivacyAddrResult
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_wallet_proto_msgTypes
[
20
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
ReqEnablePrivacyRst
);
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
:
file_wallet_proto_rawDesc
,
NumEnums
:
2
,
NumMessages
:
21
,
NumExtensions
:
0
,
NumServices
:
1
,
},
GoTypes
:
file_wallet_proto_goTypes
,
DependencyIndexes
:
file_wallet_proto_depIdxs
,
EnumInfos
:
file_wallet_proto_enumTypes
,
MessageInfos
:
file_wallet_proto_msgTypes
,
}
.
Build
()
File_wallet_proto
=
out
.
File
file_wallet_proto_rawDesc
=
nil
file_wallet_proto_goTypes
=
nil
file_wallet_proto_depIdxs
=
nil
}
// Reference imports to suppress errors if they are not otherwise used.
var
_
context
.
Context
var
_
grpc
.
ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const
_
=
grpc
.
SupportPackageIsVersion6
// MixPrivacyClient is the client API for MixPrivacy service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type
MixPrivacyClient
interface
{
// 扫描UTXO以及获取扫描UTXO后的状态
GetRescanStatus
(
ctx
context
.
Context
,
in
*
types
.
ReqNil
,
opts
...
grpc
.
CallOption
)
(
*
types
.
ReqString
,
error
)
// 使能隐私账户
RescanNotes
(
ctx
context
.
Context
,
in
*
types
.
ReqNil
,
opts
...
grpc
.
CallOption
)
(
*
types
.
ReqString
,
error
)
// 创建隐私交易
EnablePrivacy
(
ctx
context
.
Context
,
in
*
types
.
ReqAddrs
,
opts
...
grpc
.
CallOption
)
(
*
ReqEnablePrivacyRst
,
error
)
}
type
mixPrivacyClient
struct
{
cc
grpc
.
ClientConnInterface
}
func
NewMixPrivacyClient
(
cc
grpc
.
ClientConnInterface
)
MixPrivacyClient
{
return
&
mixPrivacyClient
{
cc
}
}
func
(
c
*
mixPrivacyClient
)
GetRescanStatus
(
ctx
context
.
Context
,
in
*
types
.
ReqNil
,
opts
...
grpc
.
CallOption
)
(
*
types
.
ReqString
,
error
)
{
out
:=
new
(
types
.
ReqString
)
err
:=
c
.
cc
.
Invoke
(
ctx
,
"/types.mixPrivacy/GetRescanStatus"
,
in
,
out
,
opts
...
)
if
err
!=
nil
{
return
nil
,
err
}
return
out
,
nil
}
func
(
c
*
mixPrivacyClient
)
RescanNotes
(
ctx
context
.
Context
,
in
*
types
.
ReqNil
,
opts
...
grpc
.
CallOption
)
(
*
types
.
ReqString
,
error
)
{
out
:=
new
(
types
.
ReqString
)
err
:=
c
.
cc
.
Invoke
(
ctx
,
"/types.mixPrivacy/RescanNotes"
,
in
,
out
,
opts
...
)
if
err
!=
nil
{
return
nil
,
err
}
return
out
,
nil
}
func
(
c
*
mixPrivacyClient
)
EnablePrivacy
(
ctx
context
.
Context
,
in
*
types
.
ReqAddrs
,
opts
...
grpc
.
CallOption
)
(
*
ReqEnablePrivacyRst
,
error
)
{
out
:=
new
(
ReqEnablePrivacyRst
)
err
:=
c
.
cc
.
Invoke
(
ctx
,
"/types.mixPrivacy/EnablePrivacy"
,
in
,
out
,
opts
...
)
if
err
!=
nil
{
return
nil
,
err
}
return
out
,
nil
}
// MixPrivacyServer is the server API for MixPrivacy service.
type
MixPrivacyServer
interface
{
// 扫描UTXO以及获取扫描UTXO后的状态
GetRescanStatus
(
context
.
Context
,
*
types
.
ReqNil
)
(
*
types
.
ReqString
,
error
)
// 使能隐私账户
RescanNotes
(
context
.
Context
,
*
types
.
ReqNil
)
(
*
types
.
ReqString
,
error
)
// 创建隐私交易
EnablePrivacy
(
context
.
Context
,
*
types
.
ReqAddrs
)
(
*
ReqEnablePrivacyRst
,
error
)
}
// UnimplementedMixPrivacyServer can be embedded to have forward compatible implementations.
type
UnimplementedMixPrivacyServer
struct
{
}
func
(
*
UnimplementedMixPrivacyServer
)
GetRescanStatus
(
context
.
Context
,
*
types
.
ReqNil
)
(
*
types
.
ReqString
,
error
)
{
return
nil
,
status
.
Errorf
(
codes
.
Unimplemented
,
"method GetRescanStatus not implemented"
)
}
func
(
*
UnimplementedMixPrivacyServer
)
RescanNotes
(
context
.
Context
,
*
types
.
ReqNil
)
(
*
types
.
ReqString
,
error
)
{
return
nil
,
status
.
Errorf
(
codes
.
Unimplemented
,
"method RescanNotes not implemented"
)
}
func
(
*
UnimplementedMixPrivacyServer
)
EnablePrivacy
(
context
.
Context
,
*
types
.
ReqAddrs
)
(
*
ReqEnablePrivacyRst
,
error
)
{
return
nil
,
status
.
Errorf
(
codes
.
Unimplemented
,
"method EnablePrivacy not implemented"
)
}
func
RegisterMixPrivacyServer
(
s
*
grpc
.
Server
,
srv
MixPrivacyServer
)
{
s
.
RegisterService
(
&
_MixPrivacy_serviceDesc
,
srv
)
}
func
_MixPrivacy_GetRescanStatus_Handler
(
srv
interface
{},
ctx
context
.
Context
,
dec
func
(
interface
{})
error
,
interceptor
grpc
.
UnaryServerInterceptor
)
(
interface
{},
error
)
{
in
:=
new
(
types
.
ReqNil
)
if
err
:=
dec
(
in
);
err
!=
nil
{
return
nil
,
err
}
if
interceptor
==
nil
{
return
srv
.
(
MixPrivacyServer
)
.
GetRescanStatus
(
ctx
,
in
)
}
info
:=
&
grpc
.
UnaryServerInfo
{
Server
:
srv
,
FullMethod
:
"/types.mixPrivacy/GetRescanStatus"
,
}
handler
:=
func
(
ctx
context
.
Context
,
req
interface
{})
(
interface
{},
error
)
{
return
srv
.
(
MixPrivacyServer
)
.
GetRescanStatus
(
ctx
,
req
.
(
*
types
.
ReqNil
))
}
return
interceptor
(
ctx
,
in
,
info
,
handler
)
}
func
_MixPrivacy_RescanNotes_Handler
(
srv
interface
{},
ctx
context
.
Context
,
dec
func
(
interface
{})
error
,
interceptor
grpc
.
UnaryServerInterceptor
)
(
interface
{},
error
)
{
in
:=
new
(
types
.
ReqNil
)
if
err
:=
dec
(
in
);
err
!=
nil
{
return
nil
,
err
}
if
interceptor
==
nil
{
return
srv
.
(
MixPrivacyServer
)
.
RescanNotes
(
ctx
,
in
)
}
info
:=
&
grpc
.
UnaryServerInfo
{
Server
:
srv
,
FullMethod
:
"/types.mixPrivacy/RescanNotes"
,
}
handler
:=
func
(
ctx
context
.
Context
,
req
interface
{})
(
interface
{},
error
)
{
return
srv
.
(
MixPrivacyServer
)
.
RescanNotes
(
ctx
,
req
.
(
*
types
.
ReqNil
))
}
return
interceptor
(
ctx
,
in
,
info
,
handler
)
}
func
_MixPrivacy_EnablePrivacy_Handler
(
srv
interface
{},
ctx
context
.
Context
,
dec
func
(
interface
{})
error
,
interceptor
grpc
.
UnaryServerInterceptor
)
(
interface
{},
error
)
{
in
:=
new
(
types
.
ReqAddrs
)
if
err
:=
dec
(
in
);
err
!=
nil
{
return
nil
,
err
}
if
interceptor
==
nil
{
return
srv
.
(
MixPrivacyServer
)
.
EnablePrivacy
(
ctx
,
in
)
}
info
:=
&
grpc
.
UnaryServerInfo
{
Server
:
srv
,
FullMethod
:
"/types.mixPrivacy/EnablePrivacy"
,
}
handler
:=
func
(
ctx
context
.
Context
,
req
interface
{})
(
interface
{},
error
)
{
return
srv
.
(
MixPrivacyServer
)
.
EnablePrivacy
(
ctx
,
req
.
(
*
types
.
ReqAddrs
))
}
return
interceptor
(
ctx
,
in
,
info
,
handler
)
}
var
_MixPrivacy_serviceDesc
=
grpc
.
ServiceDesc
{
ServiceName
:
"types.mixPrivacy"
,
HandlerType
:
(
*
MixPrivacyServer
)(
nil
),
Methods
:
[]
grpc
.
MethodDesc
{
{
MethodName
:
"GetRescanStatus"
,
Handler
:
_MixPrivacy_GetRescanStatus_Handler
,
},
{
MethodName
:
"RescanNotes"
,
Handler
:
_MixPrivacy_RescanNotes_Handler
,
},
{
MethodName
:
"EnablePrivacy"
,
Handler
:
_MixPrivacy_EnablePrivacy_Handler
,
},
},
Streams
:
[]
grpc
.
StreamDesc
{},
Metadata
:
"wallet.proto"
,
}
plugin/dapp/mix/wallet/cryptokey.go
View file @
e9e31f64
...
...
@@ -24,6 +24,7 @@ const CECBLOCKSIZE = 32
从secp256k1根私钥创建支票需要的私钥和公钥
payPrivKey = rootPrivKey *G_X25519 这样很难泄露rootPrivKey
支票花费key: payPrivKey
支票收款key: ReceiveKey= hash(payPrivKey) --或者*G的X坐标值, 看哪个电路少?
DH加解密key: encryptPubKey= payPrivKey *G_X25519, 也是很安全的,只是电路里面目前不支持x25519
*/
...
...
@@ -35,20 +36,20 @@ func newPrivacyKey(rootPrivKey []byte) *mixTy.AccountPrivacyKey {
//payPrivKey := mimcHashByte([][]byte{rootPrivKey})
//payPrivKey 可能超出fr的模,spendKey是payPrivKey对fr取的模,有可能和payPrivKey不相等,这里用spendKey取hash
//mimcHashByte 会对输入参数对fr取模,在电路上不会影响ReceiveKey
paymentKey
:=
&
mixTy
.
Payment
KeyPair
{}
paymentKey
:=
&
mixTy
.
Note
KeyPair
{}
paymentKey
.
SpendKey
=
mixTy
.
Byte2Str
(
payPrivKey
[
:
])
paymentKey
.
ReceiveKey
=
mixTy
.
Byte2Str
(
mimcHashByte
([][]
byte
{
mixTy
.
Str2Byte
(
paymentKey
.
SpendKey
)}))
encryptKeyPair
:=
&
mixTy
.
EncryptKeyPair
{}
encryptKeyPair
:=
&
mixTy
.
Encrypt
Secret
KeyPair
{}
pubkey
:=
ecdh
.
PublicKey
(
payPrivKey
)
//加解密是在x25519域,需要Hex编码,不要使用fr.string, 模范围不同
encryptKeyPair
.
PrivKey
=
hex
.
EncodeToString
(
payPrivKey
[
:
])
encryptKeyPair
.
Secret
PrivKey
=
hex
.
EncodeToString
(
payPrivKey
[
:
])
pubData
:=
pubkey
.
([
32
]
byte
)
encryptKeyPair
.
PubKey
=
hex
.
EncodeToString
(
pubData
[
:
])
encryptKeyPair
.
Secret
PubKey
=
hex
.
EncodeToString
(
pubData
[
:
])
privacy
:=
&
mixTy
.
AccountPrivacyKey
{}
privacy
.
PaymentKey
=
paymentKey
privacy
.
Encryp
tKey
=
encryptKeyPair
privacy
.
Secre
tKey
=
encryptKeyPair
return
privacy
}
...
...
plugin/dapp/mix/wallet/exec.go
View file @
e9e31f64
...
...
@@ -24,8 +24,8 @@ func (p *mixPolicy) On_ShowAccountPrivacyInfo(req *mixTy.PaymentKeysReq) (types.
}
var
ret
mixTy
.
WalletAddrPrivacy
ret
.
Privacy
=
newPrivacyKey
(
prikeybyte
)
if
req
.
Detail
<=
0
{
ret
.
Privacy
.
EncryptKey
.
PrivKey
=
""
if
!
req
.
Detail
{
ret
.
Privacy
.
SecretKey
.
Secret
PrivKey
=
""
ret
.
Privacy
.
PaymentKey
.
SpendKey
=
""
}
return
&
ret
,
nil
...
...
@@ -36,8 +36,8 @@ func (p *mixPolicy) On_ShowAccountPrivacyInfo(req *mixTy.PaymentKeysReq) (types.
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"get account =%s privacy key"
,
req
.
Addr
)
}
if
req
.
Detail
<=
0
{
keys
.
Privacy
.
EncryptKey
.
PrivKey
=
""
if
!
req
.
Detail
{
keys
.
Privacy
.
SecretKey
.
Secret
PrivKey
=
""
keys
.
Privacy
.
PaymentKey
.
SpendKey
=
""
}
return
keys
,
nil
...
...
@@ -65,10 +65,6 @@ func (p *mixPolicy) On_EnablePrivacy(req *types.ReqAddrs) (types.Message, error)
return
p
.
enablePrivacy
(
req
.
Addrs
)
}
//func (p *mixPolicy) On_EncodeSecretData(req *mixTy.SecretData) (types.Message, error) {
// return encodeSecretData(req)
//}
func
(
p
*
mixPolicy
)
On_EncryptSecretData
(
req
*
mixTy
.
EncryptSecretData
)
(
types
.
Message
,
error
)
{
return
encryptSecretData
(
req
)
}
...
...
plugin/dapp/mix/wallet/mixbizdb.go
View file @
e9e31f64
...
...
@@ -358,7 +358,7 @@ func (p *mixPolicy) decodeSecret(noteHash string, secretData string, privacyKeys
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"decode for notehash=%s,crypt=%s"
,
noteHash
,
dhSecret
.
Secret
)
}
decryptData
,
err
:=
decryptData
(
key
.
Privacy
.
EncryptKey
.
PrivKey
,
dhSecret
.
OneTimePubKey
,
cryptData
)
decryptData
,
err
:=
decryptData
(
key
.
Privacy
.
SecretKey
.
Secret
PrivKey
,
dhSecret
.
OneTimePubKey
,
cryptData
)
if
err
!=
nil
{
bizlog
.
Debug
(
"processSecret.decryptData fail"
,
"decrypt for notehash"
,
noteHash
,
"secret"
,
secretData
,
"addr"
,
key
.
Addr
,
"err"
,
err
)
continue
...
...
plugin/dapp/mix/wallet/util.go
View file @
e9e31f64
...
...
@@ -37,7 +37,7 @@ func encryptSecretData(req *mixTy.EncryptSecretData) (*mixTy.DHSecret, error) {
return
nil
,
errors
.
Wrap
(
err
,
"decode secret"
)
}
return
encryptData
(
req
.
PeerKey
,
secret
)
return
encryptData
(
req
.
Peer
SecretPub
Key
,
secret
)
}
func
decryptSecretData
(
req
*
mixTy
.
DecryptSecretData
)
(
*
mixTy
.
SecretData
,
error
)
{
...
...
@@ -45,7 +45,7 @@ func decryptSecretData(req *mixTy.DecryptSecretData) (*mixTy.SecretData, error)
if
err
!=
nil
{
return
nil
,
errors
.
Wrap
(
err
,
"decode req.secret"
)
}
decrypt
,
err
:=
decryptData
(
req
.
PriKey
,
req
.
Peer
Key
,
secret
)
decrypt
,
err
:=
decryptData
(
req
.
SecretPriKey
,
req
.
OneTimePub
Key
,
secret
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrap
(
err
,
"decrypt secret"
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment