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
8c429796
Commit
8c429796
authored
Jan 24, 2019
by
linj
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into trade-localdb
parents
57c2349e
12653f8f
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
391 additions
and
1394 deletions
+391
-1394
guess.go
plugin/dapp/guess/executor/guess.go
+1
-9
guessdb.go
plugin/dapp/guess/executor/guessdb.go
+5
-68
testcase.sh
plugin/dapp/paracross/cmd/build/testcase.sh
+1
-1
privacy.toml
plugin/dapp/privacy/autotest/privacy.toml
+16
-16
privacy.go
plugin/dapp/privacy/commands/privacy.go
+79
-91
ring_signature_crypto.go
plugin/dapp/privacy/crypto/ring_signature_crypto.go
+2
-1
exec.go
plugin/dapp/privacy/executor/exec.go
+1
-1
privacy.go
plugin/dapp/privacy/executor/privacy.go
+13
-9
privacy.proto
plugin/dapp/privacy/proto/privacy.proto
+1
-49
rpc.go
plugin/dapp/privacy/rpc/rpc.go
+0
-62
rpc_channel_test.go
plugin/dapp/privacy/rpc/rpc_channel_test.go
+0
-49
privacy.pb.go
plugin/dapp/privacy/types/privacy.pb.go
+184
-565
exec.go
plugin/dapp/privacy/wallet/exec.go
+0
-30
privacy.go
plugin/dapp/privacy/wallet/privacy.go
+25
-293
privacybizpolicy_test.go
plugin/dapp/privacy/wallet/privacybizpolicy_test.go
+0
-111
ticket.go
plugin/dapp/ticket/commands/ticket.go
+2
-9
types.go
plugin/dapp/ticket/commands/types.go
+0
-9
jrpc_channel_test.go
plugin/dapp/ticket/rpc/jrpc_channel_test.go
+4
-4
rpc.go
plugin/dapp/ticket/rpc/rpc.go
+1
-3
rpc_real_test.go
plugin/dapp/ticket/rpc/rpc_real_test.go
+9
-0
gitlab-ci-autotest.sh
...3cn/chain33/build/autotest/gitlabci/gitlab-ci-autotest.sh
+1
-1
jerkins-ci-autotest.sh
...n/chain33/build/autotest/jerkinsci/jerkins-ci-autotest.sh
+1
-1
local-autotest.sh
...b.com/33cn/chain33/build/autotest/local/local-autotest.sh
+1
-1
black_list.sh
vendor/github.com/33cn/chain33/build/util/black_list.sh
+2
-2
manage.sh
vendor/github.com/33cn/chain33/build/util/manage.sh
+1
-1
manage_list.sh
vendor/github.com/33cn/chain33/build/util/manage_list.sh
+2
-2
allow.go
vendor/github.com/33cn/chain33/executor/allow.go
+2
-2
executor_test.go
vendor/github.com/33cn/chain33/executor/executor_test.go
+2
-0
api_test.go
vendor/github.com/33cn/chain33/rpc/grpcclient/api_test.go
+31
-0
resolver.go
vendor/github.com/33cn/chain33/rpc/grpcclient/resolver.go
+1
-1
config.go
...ub.com/33cn/chain33/system/dapp/manage/commands/config.go
+3
-3
No files found.
plugin/dapp/guess/executor/guess.go
View file @
8c429796
...
@@ -20,21 +20,13 @@ func init() {
...
@@ -20,21 +20,13 @@ func init() {
ety
.
InitFuncList
(
types
.
ListMethod
(
&
Guess
{}))
ety
.
InitFuncList
(
types
.
ListMethod
(
&
Guess
{}))
}
}
type
subConfig
struct
{
ParaRemoteGrpcClient
string
`json:"paraRemoteGrpcClient"`
}
var
cfg
subConfig
// Init Guess
// Init Guess
func
Init
(
name
string
,
sub
[]
byte
)
{
func
Init
(
name
string
,
sub
[]
byte
)
{
driverName
:=
GetName
()
driverName
:=
GetName
()
if
name
!=
driverName
{
if
name
!=
driverName
{
panic
(
"system dapp can't be rename"
)
panic
(
"system dapp can't be rename"
)
}
}
if
sub
!=
nil
{
types
.
MustDecode
(
sub
,
&
cfg
)
}
drivers
.
Register
(
driverName
,
newGuessGame
,
types
.
GetDappFork
(
driverName
,
"Enable"
))
drivers
.
Register
(
driverName
,
newGuessGame
,
types
.
GetDappFork
(
driverName
,
"Enable"
))
}
}
...
...
plugin/dapp/guess/executor/guessdb.go
View file @
8c429796
...
@@ -5,17 +5,12 @@
...
@@ -5,17 +5,12 @@
package
executor
package
executor
import
(
import
(
"context"
"fmt"
"fmt"
"strings"
"strings"
"time"
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/common/db"
"github.com/33cn/chain33/common/db/table"
"github.com/33cn/chain33/common/db/table"
"github.com/33cn/chain33/client"
"google.golang.org/grpc"
"github.com/33cn/chain33/account"
"github.com/33cn/chain33/account"
"github.com/33cn/chain33/common"
"github.com/33cn/chain33/common"
dbm
"github.com/33cn/chain33/common/db"
dbm
"github.com/33cn/chain33/common/db"
...
@@ -48,12 +43,6 @@ const (
...
@@ -48,12 +43,6 @@ const (
//MaxExpireHeight 距离游戏创建区块的最大过期高度差
//MaxExpireHeight 距离游戏创建区块的最大过期高度差
MaxExpireHeight
=
1000000
MaxExpireHeight
=
1000000
//grpcRecSize 接收缓冲大小
grpcRecSize
int
=
30
*
1024
*
1024
//retryNum 失败时的重试次数
retryNum
=
10
)
)
//Action 具体动作执行
//Action 具体动作执行
...
@@ -67,9 +56,7 @@ type Action struct {
...
@@ -67,9 +56,7 @@ type Action struct {
execaddr
string
execaddr
string
localDB
dbm
.
KVDB
localDB
dbm
.
KVDB
index
int
index
int
api
client
.
QueueProtocolAPI
mainHeight
int64
conn
*
grpc
.
ClientConn
grpcClient
types
.
Chain33Client
}
}
//NewAction 生成Action对象
//NewAction 生成Action对象
...
@@ -77,19 +64,6 @@ func NewAction(guess *Guess, tx *types.Transaction, index int) *Action {
...
@@ -77,19 +64,6 @@ func NewAction(guess *Guess, tx *types.Transaction, index int) *Action {
hash
:=
tx
.
Hash
()
hash
:=
tx
.
Hash
()
fromAddr
:=
tx
.
From
()
fromAddr
:=
tx
.
From
()
msgRecvOp
:=
grpc
.
WithMaxMsgSize
(
grpcRecSize
)
paraRemoteGrpcClient
:=
types
.
Conf
(
"config.consensus"
)
.
GStr
(
"ParaRemoteGrpcClient"
)
if
types
.
IsPara
()
&&
paraRemoteGrpcClient
==
""
{
panic
(
"ParaRemoteGrpcClient error"
)
}
conn
,
err
:=
grpc
.
Dial
(
paraRemoteGrpcClient
,
grpc
.
WithInsecure
(),
msgRecvOp
)
if
err
!=
nil
{
panic
(
err
)
}
grpcClient
:=
types
.
NewChain33Client
(
conn
)
return
&
Action
{
return
&
Action
{
coinsAccount
:
guess
.
GetCoinsAccount
(),
coinsAccount
:
guess
.
GetCoinsAccount
(),
db
:
guess
.
GetStateDB
(),
db
:
guess
.
GetStateDB
(),
...
@@ -100,9 +74,7 @@ func NewAction(guess *Guess, tx *types.Transaction, index int) *Action {
...
@@ -100,9 +74,7 @@ func NewAction(guess *Guess, tx *types.Transaction, index int) *Action {
execaddr
:
dapp
.
ExecAddress
(
string
(
tx
.
Execer
)),
execaddr
:
dapp
.
ExecAddress
(
string
(
tx
.
Execer
)),
localDB
:
guess
.
GetLocalDB
(),
localDB
:
guess
.
GetLocalDB
(),
index
:
index
,
index
:
index
,
api
:
guess
.
GetAPI
(),
mainHeight
:
guess
.
GetMainHeight
(),
conn
:
conn
,
grpcClient
:
grpcClient
,
}
}
}
}
...
@@ -299,7 +271,7 @@ func (action *Action) readGame(id string) (*gty.GuessGame, error) {
...
@@ -299,7 +271,7 @@ func (action *Action) readGame(id string) (*gty.GuessGame, error) {
func
(
action
*
Action
)
newGame
(
gameID
string
,
start
*
gty
.
GuessGameStart
)
(
*
gty
.
GuessGame
,
error
)
{
func
(
action
*
Action
)
newGame
(
gameID
string
,
start
*
gty
.
GuessGameStart
)
(
*
gty
.
GuessGame
,
error
)
{
game
:=
&
gty
.
GuessGame
{
game
:=
&
gty
.
GuessGame
{
GameID
:
gameID
,
GameID
:
gameID
,
Status
:
gty
.
GuessGame
Action
Start
,
Status
:
gty
.
GuessGame
Status
Start
,
//StartTime: action.blocktime,
//StartTime: action.blocktime,
StartTxHash
:
gameID
,
StartTxHash
:
gameID
,
Topic
:
start
.
Topic
,
Topic
:
start
.
Topic
,
...
@@ -375,16 +347,7 @@ func (action *Action) GameStart(start *gty.GuessGameStart) (*types.Receipt, erro
...
@@ -375,16 +347,7 @@ func (action *Action) GameStart(start *gty.GuessGameStart) (*types.Receipt, erro
gameID
:=
common
.
ToHex
(
action
.
txhash
)
gameID
:=
common
.
ToHex
(
action
.
txhash
)
game
,
_
:=
action
.
newGame
(
gameID
,
start
)
game
,
_
:=
action
.
newGame
(
gameID
,
start
)
game
.
StartTime
=
action
.
blocktime
game
.
StartTime
=
action
.
blocktime
if
types
.
IsPara
()
{
game
.
StartHeight
=
action
.
mainHeight
mainHeight
:=
action
.
GetMainHeightByTxHash
(
action
.
txhash
)
if
mainHeight
<
0
{
logger
.
Error
(
"GameStart"
,
"mainHeight"
,
mainHeight
)
return
nil
,
gty
.
ErrGuessStatus
}
game
.
StartHeight
=
mainHeight
}
else
{
game
.
StartHeight
=
action
.
height
}
game
.
AdminAddr
=
action
.
fromaddr
game
.
AdminAddr
=
action
.
fromaddr
game
.
PreIndex
=
0
game
.
PreIndex
=
0
game
.
Index
=
action
.
getIndex
()
game
.
Index
=
action
.
getIndex
()
...
@@ -831,18 +794,7 @@ func (action *Action) changeAllAddrIndex(game *gty.GuessGame) {
...
@@ -831,18 +794,7 @@ func (action *Action) changeAllAddrIndex(game *gty.GuessGame) {
//refreshStatusByTime 检测游戏是否过期,是否可以下注
//refreshStatusByTime 检测游戏是否过期,是否可以下注
func
(
action
*
Action
)
refreshStatusByTime
(
game
*
gty
.
GuessGame
)
(
canBet
bool
)
{
func
(
action
*
Action
)
refreshStatusByTime
(
game
*
gty
.
GuessGame
)
(
canBet
bool
)
{
mainHeight
:=
action
.
mainHeight
var
mainHeight
int64
if
types
.
IsPara
()
{
mainHeight
=
action
.
GetMainHeightByTxHash
(
action
.
txhash
)
if
mainHeight
<
0
{
logger
.
Error
(
"RefreshStatusByTime"
,
"mainHeight err"
,
mainHeight
)
return
true
}
}
else
{
mainHeight
=
action
.
height
}
//如果完全由管理员驱动状态变化,则除了保护性过期判断外,不需要做其他判断。
//如果完全由管理员驱动状态变化,则除了保护性过期判断外,不需要做其他判断。
if
game
.
DrivenByAdmin
{
if
game
.
DrivenByAdmin
{
...
@@ -899,18 +851,3 @@ func (action *Action) checkTime(start *gty.GuessGameStart) bool {
...
@@ -899,18 +851,3 @@ func (action *Action) checkTime(start *gty.GuessGameStart) bool {
return
false
return
false
}
}
// GetMainHeightByTxHash get Block height
func
(
action
*
Action
)
GetMainHeightByTxHash
(
txHash
[]
byte
)
int64
{
for
i
:=
0
;
i
<
retryNum
;
i
++
{
req
:=
&
types
.
ReqHash
{
Hash
:
txHash
}
txDetail
,
err
:=
action
.
grpcClient
.
QueryTransaction
(
context
.
Background
(),
req
)
if
err
!=
nil
{
time
.
Sleep
(
time
.
Second
)
}
else
{
return
txDetail
.
GetHeight
()
}
}
return
-
1
}
plugin/dapp/paracross/cmd/build/testcase.sh
View file @
8c429796
...
@@ -107,7 +107,7 @@ function para_transfer2account() {
...
@@ -107,7 +107,7 @@ function para_transfer2account() {
}
}
function
para_configkey
()
{
function
para_configkey
()
{
tx
=
$(${
1
}
config config_tx
-o
add
-
k
"
${
2
}
"
-v
"
${
3
}
"
)
tx
=
$(${
1
}
config config_tx
-o
add
-
c
"
${
2
}
"
-v
"
${
3
}
"
)
sign
=
$(${
CLI
}
wallet sign
-k
0xc34b5d9d44ac7b754806f761d3d4d2c4fe5214f6b074c19f069c4f5c2a29c8cc
-d
"
${
tx
}
"
)
sign
=
$(${
CLI
}
wallet sign
-k
0xc34b5d9d44ac7b754806f761d3d4d2c4fe5214f6b074c19f069c4f5c2a29c8cc
-d
"
${
tx
}
"
)
send
=
$(${
CLI
}
wallet send
-d
"
${
sign
}
"
)
send
=
$(${
CLI
}
wallet send
-d
"
${
sign
}
"
)
echo
"
${
send
}
"
echo
"
${
send
}
"
...
...
plugin/dapp/privacy/autotest/privacy.toml
View file @
8c429796
...
@@ -10,7 +10,7 @@ dep = ["import1", "import2", "import3"]
...
@@ -10,7 +10,7 @@ dep = ["import1", "import2", "import3"]
id
=
"import1"
id
=
"import1"
command
=
"account import_key -k 0x88b2fb90411935872f0501dd13345aba19b5fac9b00eb0dddd7df977d4d5477e -l privacy_test1"
command
=
"account import_key -k 0x88b2fb90411935872f0501dd13345aba19b5fac9b00eb0dddd7df977d4d5477e -l privacy_test1"
#import privacy test addr,17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT
#import privacy test addr,
17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT
[[SimpleCase]]
[[SimpleCase]]
id
=
"import2"
id
=
"import2"
command
=
"account import_key -k 0xa0c6f46de8d275ce21e935afa5363e9b8a087fe604e05f7a9eef1258dc781c3a -l privacy_test2"
command
=
"account import_key -k 0xa0c6f46de8d275ce21e935afa5363e9b8a087fe604e05f7a9eef1258dc781c3a -l privacy_test2"
...
@@ -63,7 +63,7 @@ dep = ["enablePrivacy"]
...
@@ -63,7 +63,7 @@ dep = ["enablePrivacy"]
#pub2priv
#pub2priv
[[PubToPrivCase]]
[[PubToPrivCase]]
id
=
"pub2priv1"
id
=
"pub2priv1"
command
=
"
privacy pub2priv -a 99 -f 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -p d736dcff89c2e588d1fc3d44ba956af4d15d0a01eb1aedaf58fcbc2bdd09591fec9fd83ea6eee18c5a0fd8f1d167b1f8b020d8a6203be49f0bf3f410473fc534
"
command
=
"
send privacy pub2priv -a 99 -p d736dcff89c2e588d1fc3d44ba956af4d15d0a01eb1aedaf58fcbc2bdd09591fec9fd83ea6eee18c5a0fd8f1d167b1f8b020d8a6203be49f0bf3f410473fc534 -k 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv
"
from
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
from
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
to
=
"17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT"
to
=
"17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT"
amount
=
"99"
amount
=
"99"
...
@@ -73,7 +73,7 @@ dep = ["trans1"]
...
@@ -73,7 +73,7 @@ dep = ["trans1"]
[[PubToPrivCase]]
[[PubToPrivCase]]
id
=
"pub2priv2"
id
=
"pub2priv2"
command
=
"
privacy pub2priv -a 99 -f 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -p d45063357ab3454cfb7ee87db8f9ca2772d11bd82d4f681ce00ae44fe5929e8fd964867dae1b19b265b7f68d4ad965cfd4a0aaf71580344adf9fce28cfebadab
"
command
=
"
send privacy pub2priv -a 99 -p d45063357ab3454cfb7ee87db8f9ca2772d11bd82d4f681ce00ae44fe5929e8fd964867dae1b19b265b7f68d4ad965cfd4a0aaf71580344adf9fce28cfebadab -k 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv
"
from
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
from
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
to
=
"1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt"
to
=
"1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt"
amount
=
"99"
amount
=
"99"
...
@@ -83,7 +83,7 @@ dep = ["trans1"]
...
@@ -83,7 +83,7 @@ dep = ["trans1"]
[[PubToPrivCase]]
[[PubToPrivCase]]
id
=
"pub2priv3"
id
=
"pub2priv3"
command
=
"
privacy pub2priv -a 199 -f 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -p dda1ae3184c1f4faca5b4e4be3dfea1c5026338764aca1d2c3e8e3c0b0001f4f4d5eb1761cd27dcbf36e2559c66173bc0d46ecc4feb72dee9e60896a696a5a06
"
command
=
"
send privacy pub2priv -a 199 -p dda1ae3184c1f4faca5b4e4be3dfea1c5026338764aca1d2c3e8e3c0b0001f4f4d5eb1761cd27dcbf36e2559c66173bc0d46ecc4feb72dee9e60896a696a5a06 -k 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv
"
from
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
from
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
to
=
"12HKLEn6g4FH39yUbHh4EVJWcFo5CXg22d"
to
=
"12HKLEn6g4FH39yUbHh4EVJWcFo5CXg22d"
amount
=
"199"
amount
=
"199"
...
@@ -94,7 +94,7 @@ dep = ["trans1"]
...
@@ -94,7 +94,7 @@ dep = ["trans1"]
#failpub2priv
#failpub2priv
[[PubToPrivCase]]
[[PubToPrivCase]]
id
=
"failpub2priv1"
id
=
"failpub2priv1"
command
=
"privacy pub2priv -a 1000 -
f 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -p d736dcff89c2e588d1fc3d44ba956af4d15d0a01eb1aedaf58fcbc2bdd09591fec9fd83ea6eee18c5a0fd8f1d167b1f8b020d8a6203be49f0bf3f410473fc534
"
command
=
"privacy pub2priv -a 1000 -
p d736dcff89c2e588d1fc3d44ba956af4d15d0a01eb1aedaf58fcbc2bdd09591fec9fd83ea6eee18c5a0fd8f1d167b1f8b020d8a6203be49f0bf3f410473fc534 -k 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv
"
from
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
from
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
to
=
"17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT"
to
=
"17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT"
amount
=
"1000"
amount
=
"1000"
...
@@ -105,7 +105,7 @@ fail = true
...
@@ -105,7 +105,7 @@ fail = true
[[PubToPrivCase]]
[[PubToPrivCase]]
id
=
"failpub2priv2"
id
=
"failpub2priv2"
command
=
"privacy pub2priv -a 603 -
f 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -p d45063357ab3454cfb7ee87db8f9ca2772d11bd82d4f681ce00ae44fe5929e8fd964867dae1b19b265b7f68d4ad965cfd4a0aaf71580344adf9fce28cfebadab
"
command
=
"privacy pub2priv -a 603 -
p d45063357ab3454cfb7ee87db8f9ca2772d11bd82d4f681ce00ae44fe5929e8fd964867dae1b19b265b7f68d4ad965cfd4a0aaf71580344adf9fce28cfebadab -k 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv
"
from
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
from
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
to
=
"1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt"
to
=
"1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt"
amount
=
"603"
amount
=
"603"
...
@@ -118,7 +118,7 @@ fail = true
...
@@ -118,7 +118,7 @@ fail = true
[[PrivToPrivCase]]
[[PrivToPrivCase]]
id
=
"priv2priv1"
id
=
"priv2priv1"
command
=
"
privacy priv2priv -a 39 -f 17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT -p 0a9d212b2505aefaa8da370319088bbccfac097b007f52ed71d8133456c8185823c8eac43c5e937953d7b6c8e68b0db1f4f03df4946a29f524875118960a35fb
"
command
=
"
send privacy priv2priv -a 39 -f 17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT -p 0a9d212b2505aefaa8da370319088bbccfac097b007f52ed71d8133456c8185823c8eac43c5e937953d7b6c8e68b0db1f4f03df4946a29f524875118960a35fb -k 17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT
"
from
=
"17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT"
from
=
"17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
amount
=
"39"
amount
=
"39"
...
@@ -128,7 +128,7 @@ dep = ["pub2priv1"]
...
@@ -128,7 +128,7 @@ dep = ["pub2priv1"]
[[PrivToPrivCase]]
[[PrivToPrivCase]]
id
=
"priv2priv2"
id
=
"priv2priv2"
command
=
"
privacy priv2priv -a 49 -f 1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt -p 0a9d212b2505aefaa8da370319088bbccfac097b007f52ed71d8133456c8185823c8eac43c5e937953d7b6c8e68b0db1f4f03df4946a29f524875118960a35fb
"
command
=
"
send privacy priv2priv -a 49 -f 1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt -p 0a9d212b2505aefaa8da370319088bbccfac097b007f52ed71d8133456c8185823c8eac43c5e937953d7b6c8e68b0db1f4f03df4946a29f524875118960a35fb -k 1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt
"
from
=
"1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt"
from
=
"1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
amount
=
"49"
amount
=
"49"
...
@@ -138,7 +138,7 @@ dep = ["pub2priv2"]
...
@@ -138,7 +138,7 @@ dep = ["pub2priv2"]
[[PrivToPrivCase]]
[[PrivToPrivCase]]
id
=
"priv2priv3"
id
=
"priv2priv3"
command
=
"
privacy priv2priv -a 69 -f 12HKLEn6g4FH39yUbHh4EVJWcFo5CXg22d -p 0a9d212b2505aefaa8da370319088bbccfac097b007f52ed71d8133456c8185823c8eac43c5e937953d7b6c8e68b0db1f4f03df4946a29f524875118960a35fb
"
command
=
"
send privacy priv2priv -a 69 -f 12HKLEn6g4FH39yUbHh4EVJWcFo5CXg22d -p 0a9d212b2505aefaa8da370319088bbccfac097b007f52ed71d8133456c8185823c8eac43c5e937953d7b6c8e68b0db1f4f03df4946a29f524875118960a35fb -k 12HKLEn6g4FH39yUbHh4EVJWcFo5CXg22d
"
from
=
"12HKLEn6g4FH39yUbHh4EVJWcFo5CXg22d"
from
=
"12HKLEn6g4FH39yUbHh4EVJWcFo5CXg22d"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
amount
=
"69"
amount
=
"69"
...
@@ -150,7 +150,7 @@ dep = ["pub2priv3"]
...
@@ -150,7 +150,7 @@ dep = ["pub2priv3"]
[[PrivToPrivCase]]
[[PrivToPrivCase]]
id
=
"failpriv2priv1"
id
=
"failpriv2priv1"
command
=
"
privacy priv2priv -a 100 -f 17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT -p 0a9d212b2505aefaa8da370319088bbccfac097b007f52ed71d8133456c8185823c8eac43c5e937953d7b6c8e68b0db1f4f03df4946a29f524875118960a35fb
"
command
=
"
send privacy priv2priv -a 100 -f 17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT -p 0a9d212b2505aefaa8da370319088bbccfac097b007f52ed71d8133456c8185823c8eac43c5e937953d7b6c8e68b0db1f4f03df4946a29f524875118960a35fb -k 17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT
"
from
=
"17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT"
from
=
"17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
amount
=
"100"
amount
=
"100"
...
@@ -161,7 +161,7 @@ fail = true
...
@@ -161,7 +161,7 @@ fail = true
[[PrivToPrivCase]]
[[PrivToPrivCase]]
id
=
"failpriv2priv2"
id
=
"failpriv2priv2"
command
=
"
privacy priv2priv -a 51 -f 1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt -p 0a9d212b2505aefaa8da370319088bbccfac097b007f52ed71d8133456c8185823c8eac43c5e937953d7b6c8e68b0db1f4f03df4946a29f524875118960a35fb
"
command
=
"
send privacy priv2priv -a 51 -f 1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt -p 0a9d212b2505aefaa8da370319088bbccfac097b007f52ed71d8133456c8185823c8eac43c5e937953d7b6c8e68b0db1f4f03df4946a29f524875118960a35fb -k 1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt
"
from
=
"1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt"
from
=
"1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
amount
=
"51"
amount
=
"51"
...
@@ -174,7 +174,7 @@ fail = true
...
@@ -174,7 +174,7 @@ fail = true
[[PrivToPubCase]]
[[PrivToPubCase]]
id
=
"priv2pub1"
id
=
"priv2pub1"
command
=
"
privacy priv2pub -a 48 -f 17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT -t 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv
"
command
=
"
send privacy priv2pub -a 48 -f 17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT -t 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -k 17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT
"
from
=
"17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT"
from
=
"17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
amount
=
"48"
amount
=
"48"
...
@@ -184,7 +184,7 @@ dep = ["priv2priv1"]
...
@@ -184,7 +184,7 @@ dep = ["priv2priv1"]
[[PrivToPubCase]]
[[PrivToPubCase]]
id
=
"priv2pub2"
id
=
"priv2pub2"
command
=
"
privacy priv2pub -a 48 -f 1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt -t 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv
"
command
=
"
send privacy priv2pub -a 48 -f 1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt -t 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -k 1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt
"
from
=
"1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt"
from
=
"1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
amount
=
"48"
amount
=
"48"
...
@@ -194,7 +194,7 @@ dep = ["priv2priv2"]
...
@@ -194,7 +194,7 @@ dep = ["priv2priv2"]
[[PrivToPubCase]]
[[PrivToPubCase]]
id
=
"priv2pub3"
id
=
"priv2pub3"
command
=
"
privacy priv2pub -a 69 -f 12HKLEn6g4FH39yUbHh4EVJWcFo5CXg22d -t 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv
"
command
=
"
send privacy priv2pub -a 69 -f 12HKLEn6g4FH39yUbHh4EVJWcFo5CXg22d -t 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -k 12HKLEn6g4FH39yUbHh4EVJWcFo5CXg22d
"
from
=
"12HKLEn6g4FH39yUbHh4EVJWcFo5CXg22d"
from
=
"12HKLEn6g4FH39yUbHh4EVJWcFo5CXg22d"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
amount
=
"69"
amount
=
"69"
...
@@ -206,7 +206,7 @@ dep = ["priv2priv3"]
...
@@ -206,7 +206,7 @@ dep = ["priv2priv3"]
[[PrivToPubCase]]
[[PrivToPubCase]]
id
=
"failpriv2pub1"
id
=
"failpriv2pub1"
command
=
"
privacy priv2pub -a 100 -f 17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT -t 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv
"
command
=
"
send privacy priv2pub -a 100 -f 17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT -t 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -k 17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT
"
from
=
"17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT"
from
=
"17UZr5eJVxDRW1gs7rausQwaSUPtvcpxGT"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
amount
=
"100"
amount
=
"100"
...
@@ -217,7 +217,7 @@ fail = true
...
@@ -217,7 +217,7 @@ fail = true
[[PrivToPubCase]]
[[PrivToPubCase]]
id
=
"failpriv2pub2"
id
=
"failpriv2pub2"
command
=
"
privacy priv2pub -a 3 -f 1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt -t 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv
"
command
=
"
send privacy priv2pub -a 3 -f 1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt -t 12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv -k 1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt
"
from
=
"1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt"
from
=
"1D9xKRnLvV2zMtSxSx33ow1GF4pcbLcNRt"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
to
=
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
amount
=
"3"
amount
=
"3"
...
...
plugin/dapp/privacy/commands/privacy.go
View file @
8c429796
...
@@ -36,9 +36,9 @@ func PrivacyCmd() *cobra.Command {
...
@@ -36,9 +36,9 @@ func PrivacyCmd() *cobra.Command {
cmd
.
AddCommand
(
cmd
.
AddCommand
(
showPrivacyKeyCmd
(),
showPrivacyKeyCmd
(),
showPrivacyAccountSpendCmd
(),
showPrivacyAccountSpendCmd
(),
public2Privacy
Cmd
(),
createPub2PrivTx
Cmd
(),
privacy2Privacy
Cmd
(),
createPriv2PrivTx
Cmd
(),
privacy2Public
Cmd
(),
createPriv2PubTx
Cmd
(),
showAmountsOfUTXOCmd
(),
showAmountsOfUTXOCmd
(),
showUTXOs4SpecifiedAmountCmd
(),
showUTXOs4SpecifiedAmountCmd
(),
createUTXOsCmd
(),
createUTXOsCmd
(),
...
@@ -79,38 +79,34 @@ func showPrivacyKey(cmd *cobra.Command, args []string) {
...
@@ -79,38 +79,34 @@ func showPrivacyKey(cmd *cobra.Command, args []string) {
ctx
.
Run
()
ctx
.
Run
()
}
}
//
public2PrivacyCmd public address to privacy address
//
CreatePub2PrivTxCmd create a public to privacy transaction
func
public2Privacy
Cmd
()
*
cobra
.
Command
{
func
createPub2PrivTx
Cmd
()
*
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"pub2priv"
,
Use
:
"pub2priv"
,
Short
:
"
Public to privacy from pubkeypair amout note
"
,
Short
:
"
Create a public to privacy transaction
"
,
Run
:
public2Privacy
,
Run
:
createPub2PrivTx
,
}
}
public2PrivacyFlag
(
cmd
)
createPub2PrivTxFlags
(
cmd
)
return
cmd
return
cmd
}
}
func
public2PrivacyFlag
(
cmd
*
cobra
.
Command
)
{
func
createPub2PrivTxFlags
(
cmd
*
cobra
.
Command
)
{
cmd
.
Flags
()
.
StringP
(
"from"
,
"f"
,
""
,
"from account address"
)
cmd
.
Flags
()
.
StringP
(
"pubkeypair"
,
"p"
,
""
,
"public key pair"
)
cmd
.
MarkFlagRequired
(
"from"
)
cmd
.
Flags
()
.
StringP
(
"pubkeypair"
,
"p"
,
""
,
"to view spend public key pair"
)
cmd
.
MarkFlagRequired
(
"pubkeypair"
)
cmd
.
MarkFlagRequired
(
"pubkeypair"
)
cmd
.
Flags
()
.
Float64P
(
"amount"
,
"a"
,
0.0
,
"transfer amount, at most 4 decimal places"
)
cmd
.
Flags
()
.
Float64P
(
"amount"
,
"a"
,
0
,
"transfer amount"
)
cmd
.
MarkFlagRequired
(
"amount"
)
cmd
.
MarkFlagRequired
(
"amount"
)
cmd
.
Flags
()
.
StringP
(
"note"
,
"n"
,
""
,
"transfer note"
)
cmd
.
Flags
()
.
StringP
(
"symbol"
,
"s"
,
"BTY"
,
"token symbol"
)
cmd
.
Flags
()
.
StringP
(
"note"
,
"n"
,
""
,
"note for transaction"
)
cmd
.
Flags
()
.
Int64P
(
"expire"
,
""
,
0
,
"transfer expire, default one hour"
)
cmd
.
Flags
()
.
Int64P
(
"expire"
,
""
,
0
,
"transfer expire, default one hour"
)
cmd
.
Flags
()
.
IntP
(
"expiretype"
,
""
,
1
,
"0: height 1: time default is 1"
)
cmd
.
Flags
()
.
IntP
(
"expiretype"
,
""
,
1
,
"0: height 1: time default is 1"
)
}
}
func
public2Privacy
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
func
createPub2PrivTx
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
from
,
_
:=
cmd
.
Flags
()
.
GetString
(
"from"
)
pubkeypair
,
_
:=
cmd
.
Flags
()
.
GetString
(
"pubkeypair"
)
pubkeypair
,
_
:=
cmd
.
Flags
()
.
GetString
(
"pubkeypair"
)
amount
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"amount"
)
amount
:=
cmdtypes
.
GetAmountValue
(
cmd
,
"amount"
)
tokenname
,
_
:=
cmd
.
Flags
()
.
GetString
(
"symbol"
)
note
,
_
:=
cmd
.
Flags
()
.
GetString
(
"note"
)
note
,
_
:=
cmd
.
Flags
()
.
GetString
(
"note"
)
expire
,
_
:=
cmd
.
Flags
()
.
GetInt64
(
"expire"
)
expire
,
_
:=
cmd
.
Flags
()
.
GetInt64
(
"expire"
)
expiretype
,
_
:=
cmd
.
Flags
()
.
GetInt
(
"expiretype"
)
expiretype
,
_
:=
cmd
.
Flags
()
.
GetInt
(
"expiretype"
)
...
@@ -121,62 +117,59 @@ func public2Privacy(cmd *cobra.Command, args []string) {
...
@@ -121,62 +117,59 @@ func public2Privacy(cmd *cobra.Command, args []string) {
}
}
}
else
if
expiretype
==
1
{
}
else
if
expiretype
==
1
{
if
expire
<=
0
{
if
expire
<=
0
{
expire
=
int64
(
time
.
Hour
)
expire
=
int64
(
time
.
Hour
/
time
.
Second
)
}
}
}
else
{
}
else
{
fmt
.
Println
(
"Invalid expiretype"
,
expiretype
)
fmt
.
Println
(
"Invalid expiretype"
,
expiretype
)
return
return
}
}
amountInt64
:=
int64
(
amount
*
types
.
InputPrecision
)
*
types
.
Multiple1E4
//支持4位小数输入,多余的输入将被截断
params
:=
types
.
ReqCreateTransaction
{
params
:=
pty
.
ReqPub2Pri
{
Tokenname
:
tokenname
,
Sender
:
from
,
Type
:
types
.
PrivacyTypePublic2Privacy
,
Pubkeypair
:
pubkeypair
,
Amount
:
amount
,
Amount
:
amountInt64
,
Note
:
note
,
Note
:
note
,
Tokenname
:
types
.
BTY
,
Pubkeypair
:
pubkeypair
,
Expire
:
expire
,
Expire
:
expire
,
}
}
ctx
:=
jsonclient
.
NewRPCCtx
(
rpcLaddr
,
"privacy.CreateRawTransaction"
,
params
,
nil
)
var
res
rpctypes
.
ReplyHash
ctx
.
RunWithoutMarshal
()
ctx
:=
jsonclient
.
NewRPCCtx
(
rpcLaddr
,
"privacy.MakeTxPublic2privacy"
,
params
,
&
res
)
ctx
.
Run
()
}
}
//
privacy address to privacy address
//
CreatePriv2PrivTxCmd create a privacy to privacy transaction
func
privacy2Privacy
Cmd
()
*
cobra
.
Command
{
func
createPriv2PrivTx
Cmd
()
*
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"priv2priv"
,
Use
:
"priv2priv"
,
Short
:
"
Privacy to privacy from toviewpubkey tospendpubkey amout note
"
,
Short
:
"
Create a privacy to privacy transaction
"
,
Run
:
privacy2Privacy
,
Run
:
createPriv2PrivTx
,
}
}
privacy2PrivacyFlag
(
cmd
)
createPriv2PrivTxFlags
(
cmd
)
return
cmd
return
cmd
}
}
func
privacy2PrivacyFlag
(
cmd
*
cobra
.
Command
)
{
func
createPriv2PrivTxFlags
(
cmd
*
cobra
.
Command
)
{
cmd
.
Flags
()
.
StringP
(
"from"
,
"f"
,
""
,
"from account address"
)
cmd
.
Flags
()
.
StringP
(
"pubkeypair"
,
"p"
,
""
,
"public key pair"
)
cmd
.
MarkFlagRequired
(
"from"
)
cmd
.
Flags
()
.
StringP
(
"pubkeypair"
,
"p"
,
""
,
"to view spend public key pair"
)
cmd
.
MarkFlagRequired
(
"pubkeypair"
)
cmd
.
MarkFlagRequired
(
"pubkeypair"
)
cmd
.
Flags
()
.
Float64P
(
"amount"
,
"a"
,
0.0
,
"transfer amount, at most 4 decimal places"
)
cmd
.
Flags
()
.
Float64P
(
"amount"
,
"a"
,
0.0
,
"transfer amount"
)
cmd
.
MarkFlagRequired
(
"amount"
)
cmd
.
MarkFlagRequired
(
"amount"
)
cmd
.
Flags
()
.
StringP
(
"from"
,
"f"
,
""
,
"from address"
)
cmd
.
MarkFlagRequired
(
"from"
)
cmd
.
Flags
()
.
StringP
(
"note"
,
"n"
,
""
,
"transfer note"
)
cmd
.
Flags
()
.
Int32P
(
"mixcount"
,
"m"
,
defMixCount
,
"utxo mix count"
)
cmd
.
Flags
()
.
Int32P
(
"mixcount"
,
"m"
,
defMixCount
,
"transfer note"
)
cmd
.
Flags
()
.
StringP
(
"symbol"
,
"s"
,
"BTY"
,
"token symbol"
)
cmd
.
Flags
()
.
StringP
(
"note"
,
"n"
,
""
,
"note for transaction"
)
cmd
.
Flags
()
.
Int64P
(
"expire"
,
""
,
0
,
"transfer expire, default one hour"
)
cmd
.
Flags
()
.
Int64P
(
"expire"
,
""
,
0
,
"transfer expire, default one hour"
)
cmd
.
Flags
()
.
IntP
(
"expiretype"
,
""
,
1
,
"0: height 1: time default is 1"
)
cmd
.
Flags
()
.
IntP
(
"expiretype"
,
""
,
1
,
"0: height 1: time default is 1"
)
}
}
func
privacy2Privacy
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
func
createPriv2PrivTx
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
from
,
_
:=
cmd
.
Flags
()
.
GetString
(
"from"
)
pubkeypair
,
_
:=
cmd
.
Flags
()
.
GetString
(
"pubkeypair"
)
pubkeypair
,
_
:=
cmd
.
Flags
()
.
GetString
(
"pubkeypair"
)
amount
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"amount"
)
amount
:=
cmdtypes
.
GetAmountValue
(
cmd
,
"amount"
)
mixcount
,
_
:=
cmd
.
Flags
()
.
GetInt32
(
"mixcount"
)
mixCount
,
_
:=
cmd
.
Flags
()
.
GetInt32
(
"mixcount"
)
tokenname
,
_
:=
cmd
.
Flags
()
.
GetString
(
"symbol"
)
note
,
_
:=
cmd
.
Flags
()
.
GetString
(
"note"
)
note
,
_
:=
cmd
.
Flags
()
.
GetString
(
"note"
)
sender
,
_
:=
cmd
.
Flags
()
.
GetString
(
"from"
)
expire
,
_
:=
cmd
.
Flags
()
.
GetInt64
(
"expire"
)
expire
,
_
:=
cmd
.
Flags
()
.
GetInt64
(
"expire"
)
expiretype
,
_
:=
cmd
.
Flags
()
.
GetInt
(
"expiretype"
)
expiretype
,
_
:=
cmd
.
Flags
()
.
GetInt
(
"expiretype"
)
if
expiretype
==
0
{
if
expiretype
==
0
{
...
@@ -186,63 +179,60 @@ func privacy2Privacy(cmd *cobra.Command, args []string) {
...
@@ -186,63 +179,60 @@ func privacy2Privacy(cmd *cobra.Command, args []string) {
}
}
}
else
if
expiretype
==
1
{
}
else
if
expiretype
==
1
{
if
expire
<=
0
{
if
expire
<=
0
{
expire
=
int64
(
time
.
Hour
)
expire
=
int64
(
time
.
Hour
/
time
.
Second
)
}
}
}
else
{
}
else
{
fmt
.
Println
(
"Invalid expiretype"
,
expiretype
)
fmt
.
Println
(
"Invalid expiretype"
,
expiretype
)
return
return
}
}
amountInt64
:=
int64
(
amount
*
types
.
InputPrecision
)
*
types
.
Multiple1E4
//支持4位小数输入,多余的输入将被截断
params
:=
types
.
ReqCreateTransaction
{
params
:=
pty
.
ReqPri2Pri
{
Tokenname
:
tokenname
,
Sender
:
from
,
Type
:
types
.
PrivacyTypePrivacy2Privacy
,
Pubkeypair
:
pubkeypair
,
Amount
:
amount
,
Amount
:
amountInt64
,
Mixin
:
mixcount
,
Note
:
note
,
Note
:
note
,
Tokenname
:
types
.
BTY
,
Pubkeypair
:
pubkeypair
,
From
:
sender
,
Mixcount
:
mixCount
,
Expire
:
expire
,
Expire
:
expire
,
}
}
ctx
:=
jsonclient
.
NewRPCCtx
(
rpcLaddr
,
"privacy.CreateRawTransaction"
,
params
,
nil
)
var
res
rpctypes
.
ReplyHash
ctx
.
RunWithoutMarshal
()
ctx
:=
jsonclient
.
NewRPCCtx
(
rpcLaddr
,
"privacy.MakeTxPrivacy2privacy"
,
params
,
&
res
)
ctx
.
Run
()
}
}
//
privacy address to public address
//
CreatePriv2PubTxCmd create a privacy to public transaction
func
privacy2Public
Cmd
()
*
cobra
.
Command
{
func
createPriv2PubTx
Cmd
()
*
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"priv2pub"
,
Use
:
"priv2pub"
,
Short
:
"
Public to privacy from toviewpubkey tospendpubkey amout note
"
,
Short
:
"
Create a privacy to public transaction
"
,
Run
:
privacy2Public
,
Run
:
createPriv2PubTx
,
}
}
privacy2Publiclag
(
cmd
)
createPriv2PubTxFlags
(
cmd
)
return
cmd
return
cmd
}
}
func
privacy2Publiclag
(
cmd
*
cobra
.
Command
)
{
func
createPriv2PubTxFlags
(
cmd
*
cobra
.
Command
)
{
cmd
.
Flags
()
.
StringP
(
"from"
,
"f"
,
""
,
"from account address"
)
cmd
.
Flags
()
.
Float64P
(
"amount"
,
"a"
,
0.0
,
"transfer amount, at most 4 decimal places"
)
cmd
.
MarkFlagRequired
(
"amount"
)
cmd
.
Flags
()
.
StringP
(
"from"
,
"f"
,
""
,
"from address"
)
cmd
.
MarkFlagRequired
(
"from"
)
cmd
.
MarkFlagRequired
(
"from"
)
cmd
.
Flags
()
.
StringP
(
"to"
,
"t"
,
""
,
"to address"
)
cmd
.
Flags
()
.
StringP
(
"to"
,
"t"
,
""
,
"to account address"
)
cmd
.
MarkFlagRequired
(
"to"
)
cmd
.
MarkFlagRequired
(
"to"
)
cmd
.
Flags
()
.
Float64P
(
"amount"
,
"a"
,
0.0
,
"transfer amount"
)
cmd
.
Flags
()
.
Int32P
(
"mixcount"
,
"m"
,
defMixCount
,
"utxo mix count"
)
cmd
.
MarkFlagRequired
(
"amount"
)
cmd
.
Flags
()
.
StringP
(
"symbol"
,
"s"
,
"BTY"
,
"token symbol"
)
cmd
.
Flags
()
.
StringP
(
"note"
,
"n"
,
""
,
"note for transaction"
)
cmd
.
Flags
()
.
StringP
(
"note"
,
"n"
,
""
,
"transfer note"
)
cmd
.
Flags
()
.
Int32P
(
"mixcount"
,
"m"
,
defMixCount
,
"transfer note"
)
cmd
.
Flags
()
.
Int64P
(
"expire"
,
""
,
0
,
"transfer expire, default one hour"
)
cmd
.
Flags
()
.
Int64P
(
"expire"
,
""
,
0
,
"transfer expire, default one hour"
)
cmd
.
Flags
()
.
IntP
(
"expiretype"
,
""
,
1
,
"0: height 1: time default is 1"
)
cmd
.
Flags
()
.
IntP
(
"expiretype"
,
""
,
1
,
"0: height 1: time default is 1"
)
}
}
func
privacy2Public
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
func
createPriv2PubTx
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
amount
:=
cmdtypes
.
GetAmountValue
(
cmd
,
"amount"
)
mixCount
,
_
:=
cmd
.
Flags
()
.
GetInt32
(
"mixcount"
)
tokenname
,
_
:=
cmd
.
Flags
()
.
GetString
(
"symbol"
)
from
,
_
:=
cmd
.
Flags
()
.
GetString
(
"from"
)
from
,
_
:=
cmd
.
Flags
()
.
GetString
(
"from"
)
to
,
_
:=
cmd
.
Flags
()
.
GetString
(
"to"
)
to
,
_
:=
cmd
.
Flags
()
.
GetString
(
"to"
)
amount
,
_
:=
cmd
.
Flags
()
.
GetFloat64
(
"amount"
)
mixcount
,
_
:=
cmd
.
Flags
()
.
GetInt32
(
"mixcount"
)
note
,
_
:=
cmd
.
Flags
()
.
GetString
(
"note"
)
note
,
_
:=
cmd
.
Flags
()
.
GetString
(
"note"
)
expire
,
_
:=
cmd
.
Flags
()
.
GetInt64
(
"expire"
)
expire
,
_
:=
cmd
.
Flags
()
.
GetInt64
(
"expire"
)
expiretype
,
_
:=
cmd
.
Flags
()
.
GetInt
(
"expiretype"
)
expiretype
,
_
:=
cmd
.
Flags
()
.
GetInt
(
"expiretype"
)
...
@@ -253,27 +243,25 @@ func privacy2Public(cmd *cobra.Command, args []string) {
...
@@ -253,27 +243,25 @@ func privacy2Public(cmd *cobra.Command, args []string) {
}
}
}
else
if
expiretype
==
1
{
}
else
if
expiretype
==
1
{
if
expire
<=
0
{
if
expire
<=
0
{
expire
=
int64
(
time
.
Hour
)
expire
=
int64
(
time
.
Hour
/
time
.
Second
)
}
}
}
else
{
}
else
{
fmt
.
Println
(
"Invalid expiretype"
,
expiretype
)
fmt
.
Println
(
"Invalid expiretype"
,
expiretype
)
return
return
}
}
amountInt64
:=
int64
(
amount
*
types
.
InputPrecision
)
*
types
.
Multiple1E4
//支持4位小数输入,多余的输入将被截断
params
:=
types
.
ReqCreateTransaction
{
params
:=
pty
.
ReqPri2Pub
{
Tokenname
:
tokenname
,
Sender
:
from
,
Type
:
types
.
PrivacyTypePrivacy2Public
,
Receiver
:
to
,
Amount
:
amount
,
Amount
:
amountInt64
,
Note
:
note
,
Note
:
note
,
Tokenname
:
types
.
BTY
,
From
:
from
,
Mixin
:
mixcount
,
To
:
to
,
Mixcount
:
mixCount
,
Expire
:
expire
,
Expire
:
expire
,
}
}
ctx
:=
jsonclient
.
NewRPCCtx
(
rpcLaddr
,
"privacy.CreateRawTransaction"
,
params
,
nil
)
var
res
rpctypes
.
ReplyHash
ctx
.
RunWithoutMarshal
()
ctx
:=
jsonclient
.
NewRPCCtx
(
rpcLaddr
,
"privacy.MakeTxPrivacy2public"
,
params
,
&
res
)
ctx
.
Run
()
}
}
func
showPrivacyAccountSpendCmd
()
*
cobra
.
Command
{
func
showPrivacyAccountSpendCmd
()
*
cobra
.
Command
{
...
...
plugin/dapp/privacy/crypto/ring_signature_crypto.go
View file @
8c429796
...
@@ -22,6 +22,7 @@ import (
...
@@ -22,6 +22,7 @@ import (
func
init
()
{
func
init
()
{
crypto
.
Register
(
privacytypes
.
SignNameRing
,
&
RingSignED25519
{})
crypto
.
Register
(
privacytypes
.
SignNameRing
,
&
RingSignED25519
{})
crypto
.
RegisterType
(
privacytypes
.
SignNameRing
,
privacytypes
.
RingBaseonED25519
)
}
}
// RingSignature 环签名中对于crypto.Signature接口实现
// RingSignature 环签名中对于crypto.Signature接口实现
...
@@ -156,7 +157,7 @@ func (pubkey *RingSignPublicKey) VerifyBytes(msg []byte, sign crypto.Signature)
...
@@ -156,7 +157,7 @@ func (pubkey *RingSignPublicKey) VerifyBytes(msg []byte, sign crypto.Signature)
return
false
return
false
}
}
tx
:=
new
(
types
.
Transaction
)
tx
:=
new
(
types
.
Transaction
)
if
err
:=
types
.
Decode
(
msg
,
tx
);
err
!=
nil
||
!
bytes
.
Equal
([]
byte
(
privacytypes
.
PrivacyX
),
t
x
.
Execer
)
{
if
err
:=
types
.
Decode
(
msg
,
tx
);
err
!=
nil
||
!
bytes
.
Equal
([]
byte
(
privacytypes
.
PrivacyX
),
t
ypes
.
GetRealExecName
(
tx
.
Execer
)
)
{
// 目前只有隐私交易用到了环签名
// 目前只有隐私交易用到了环签名
return
false
return
false
}
}
...
...
plugin/dapp/privacy/executor/exec.go
View file @
8c429796
...
@@ -102,7 +102,7 @@ func (p *privacy) Exec_Privacy2Public(payload *ty.Privacy2Public, tx *types.Tran
...
@@ -102,7 +102,7 @@ func (p *privacy) Exec_Privacy2Public(payload *ty.Privacy2Public, tx *types.Tran
}
}
txhashstr
:=
hex
.
EncodeToString
(
tx
.
Hash
())
txhashstr
:=
hex
.
EncodeToString
(
tx
.
Hash
())
coinsAccount
:=
p
.
GetCoinsAccount
()
coinsAccount
:=
p
.
GetCoinsAccount
()
receipt
,
err
:=
coinsAccount
.
ExecDeposit
(
tx
.
To
,
address
.
ExecAddress
(
string
(
tx
.
Execer
)),
payload
.
Amount
)
receipt
,
err
:=
coinsAccount
.
ExecDeposit
(
payload
.
To
,
address
.
ExecAddress
(
string
(
tx
.
Execer
)),
payload
.
Amount
)
if
err
!=
nil
{
if
err
!=
nil
{
privacylog
.
Error
(
"PrivacyTrading Exec"
,
"ActionPrivacy2Public txhash"
,
txhashstr
,
"ExecDeposit error "
,
err
)
privacylog
.
Error
(
"PrivacyTrading Exec"
,
"ActionPrivacy2Public txhash"
,
txhashstr
,
"ExecDeposit error "
,
err
)
return
nil
,
err
return
nil
,
err
...
...
plugin/dapp/privacy/executor/privacy.go
View file @
8c429796
...
@@ -273,16 +273,20 @@ func (p *privacy) CheckTx(tx *types.Transaction, index int) error {
...
@@ -273,16 +273,20 @@ func (p *privacy) CheckTx(tx *types.Transaction, index int) error {
totalOutput
+=
output
.
Amount
totalOutput
+=
output
.
Amount
}
}
var
feeAmount
int64
//平行链下的隐私交易,utxo不需要燃烧,fee只收取主链的bty,和utxo无关联
if
action
.
Ty
==
pty
.
ActionPrivacy2Privacy
{
if
!
types
.
IsPara
()
{
feeAmount
=
totalInput
-
totalOutput
}
else
{
var
feeAmount
int64
feeAmount
=
totalInput
-
totalOutput
-
amount
if
action
.
Ty
==
pty
.
ActionPrivacy2Privacy
{
}
feeAmount
=
totalInput
-
totalOutput
}
else
{
feeAmount
=
totalInput
-
totalOutput
-
amount
}
if
feeAmount
<
pty
.
PrivacyTxFee
{
if
feeAmount
<
pty
.
PrivacyTxFee
{
privacylog
.
Error
(
"PrivacyTrading CheckTx"
,
"txhash"
,
txhashstr
,
"fee available:"
,
feeAmount
,
"required:"
,
pty
.
PrivacyTxFee
)
privacylog
.
Error
(
"PrivacyTrading CheckTx"
,
"txhash"
,
txhashstr
,
"fee available:"
,
feeAmount
,
"required:"
,
pty
.
PrivacyTxFee
)
return
pty
.
ErrPrivacyTxFeeNotEnough
return
pty
.
ErrPrivacyTxFeeNotEnough
}
}
}
return
nil
return
nil
}
}
...
...
plugin/dapp/privacy/proto/privacy.proto
View file @
8c429796
...
@@ -38,6 +38,7 @@ message Privacy2Public {
...
@@ -38,6 +38,7 @@ message Privacy2Public {
string
tokenname
=
1
;
string
tokenname
=
1
;
int64
amount
=
2
;
int64
amount
=
2
;
string
note
=
3
;
string
note
=
3
;
string
to
=
6
;
PrivacyInput
input
=
4
;
PrivacyInput
input
=
4
;
PrivacyOutput
output
=
5
;
PrivacyOutput
output
=
5
;
}
}
...
@@ -193,49 +194,6 @@ message PrivacyAction4Print {
...
@@ -193,49 +194,6 @@ message PrivacyAction4Print {
int32
ty
=
4
;
int32
ty
=
4
;
}
}
message
ReqPub2Pri
{
//接收人可见公钥A
// string viewPublic = 1;
//接收人花费公钥B
// string spendPublic = 2;
string
tokenname
=
3
;
int64
amount
=
4
;
string
note
=
5
;
//发送人地址
string
sender
=
6
;
int32
mixin
=
7
;
string
pubkeypair
=
8
;
int64
expire
=
9
;
}
message
ReqPri2Pri
{
//接收人可见公钥A
// string viewPublic = 1; //A
//接收人花费公钥B
// string spendPublic = 2; //B
string
tokenname
=
3
;
int64
amount
=
4
;
string
note
=
5
;
//隐私交易发起人地址
string
sender
=
6
;
int32
mixin
=
7
;
// string txhash = 7;
string
pubkeypair
=
8
;
int64
expire
=
9
;
}
message
ReqPri2Pub
{
string
receiver
=
1
;
string
tokenname
=
2
;
int64
amount
=
3
;
string
note
=
4
;
//隐私交易发起人地址
string
sender
=
5
;
int32
mixin
=
6
;
// string txhash = 6;
int64
expire
=
7
;
}
message
ReqCreateUTXOs
{
message
ReqCreateUTXOs
{
// string viewPublic = 1; //接收人可见公钥A
// string viewPublic = 1; //接收人可见公钥A
// string spendPublic = 2; //接收人花费公钥B
// string spendPublic = 2; //接收人花费公钥B
...
@@ -456,12 +414,6 @@ service privacy {
...
@@ -456,12 +414,6 @@ service privacy {
rpc
ShowPrivacyKey
(
ReqString
)
returns
(
ReplyPrivacyPkPair
)
{}
rpc
ShowPrivacyKey
(
ReqString
)
returns
(
ReplyPrivacyPkPair
)
{}
// 创建一系列UTXO
// 创建一系列UTXO
rpc
CreateUTXOs
(
ReqCreateUTXOs
)
returns
(
Reply
)
{}
rpc
CreateUTXOs
(
ReqCreateUTXOs
)
returns
(
Reply
)
{}
// 将资金从公开到隐私转移
rpc
MakeTxPublic2Privacy
(
ReqPub2Pri
)
returns
(
Reply
)
{}
// 将资产从隐私到隐私进行转移
rpc
MakeTxPrivacy2Privacy
(
ReqPri2Pri
)
returns
(
Reply
)
{}
// 将资产从隐私到公开进行转移
rpc
MakeTxPrivacy2Public
(
ReqPri2Pub
)
returns
(
Reply
)
{}
// 扫描UTXO以及获取扫描UTXO后的状态
// 扫描UTXO以及获取扫描UTXO后的状态
rpc
RescanUtxos
(
ReqRescanUtxos
)
returns
(
RepRescanUtxos
)
{}
rpc
RescanUtxos
(
ReqRescanUtxos
)
returns
(
RepRescanUtxos
)
{}
// 使能隐私账户
// 使能隐私账户
...
...
plugin/dapp/privacy/rpc/rpc.go
View file @
8c429796
...
@@ -33,33 +33,6 @@ func (g *channelClient) CreateUTXOs(ctx context.Context, in *pty.ReqCreateUTXOs)
...
@@ -33,33 +33,6 @@ func (g *channelClient) CreateUTXOs(ctx context.Context, in *pty.ReqCreateUTXOs)
return
data
.
(
*
types
.
Reply
),
nil
return
data
.
(
*
types
.
Reply
),
nil
}
}
// 将资金从公开到隐私转移
func
(
g
*
channelClient
)
MakeTxPublic2Privacy
(
ctx
context
.
Context
,
in
*
pty
.
ReqPub2Pri
)
(
*
types
.
Reply
,
error
)
{
data
,
err
:=
g
.
ExecWalletFunc
(
pty
.
PrivacyX
,
"Public2Privacy"
,
in
)
if
err
!=
nil
{
return
nil
,
err
}
return
data
.
(
*
types
.
Reply
),
nil
}
// 将资产从隐私到隐私进行转移
func
(
g
*
channelClient
)
MakeTxPrivacy2Privacy
(
ctx
context
.
Context
,
in
*
pty
.
ReqPri2Pri
)
(
*
types
.
Reply
,
error
)
{
data
,
err
:=
g
.
ExecWalletFunc
(
pty
.
PrivacyX
,
"Privacy2Privacy"
,
in
)
if
err
!=
nil
{
return
nil
,
err
}
return
data
.
(
*
types
.
Reply
),
nil
}
// 将资产从隐私到公开进行转移
func
(
g
*
channelClient
)
MakeTxPrivacy2Public
(
ctx
context
.
Context
,
in
*
pty
.
ReqPri2Pub
)
(
*
types
.
Reply
,
error
)
{
data
,
err
:=
g
.
ExecWalletFunc
(
pty
.
PrivacyX
,
"Privacy2Public"
,
in
)
if
err
!=
nil
{
return
nil
,
err
}
return
data
.
(
*
types
.
Reply
),
nil
}
// 扫描UTXO以及获取扫描UTXO后的状态
// 扫描UTXO以及获取扫描UTXO后的状态
func
(
g
*
channelClient
)
RescanUtxos
(
ctx
context
.
Context
,
in
*
pty
.
ReqRescanUtxos
)
(
*
pty
.
RepRescanUtxos
,
error
)
{
func
(
g
*
channelClient
)
RescanUtxos
(
ctx
context
.
Context
,
in
*
pty
.
ReqRescanUtxos
)
(
*
pty
.
RepRescanUtxos
,
error
)
{
data
,
err
:=
g
.
ExecWalletFunc
(
pty
.
PrivacyX
,
"RescanUtxos"
,
in
)
data
,
err
:=
g
.
ExecWalletFunc
(
pty
.
PrivacyX
,
"RescanUtxos"
,
in
)
...
@@ -122,41 +95,6 @@ func (c *Jrpc) ShowPrivacykey(in *types.ReqString, result *json.RawMessage) erro
...
@@ -122,41 +95,6 @@ func (c *Jrpc) ShowPrivacykey(in *types.ReqString, result *json.RawMessage) erro
return
err
return
err
}
}
// MakeTxPublic2privacy create public to privacy trasaction for json rpc
func
(
c
*
Jrpc
)
MakeTxPublic2privacy
(
in
*
pty
.
ReqPub2Pri
,
result
*
interface
{})
error
{
reply
,
err
:=
c
.
cli
.
MakeTxPublic2Privacy
(
context
.
Background
(),
in
)
if
err
!=
nil
{
return
err
}
*
result
=
rpctypes
.
ReplyHash
{
Hash
:
common
.
ToHex
(
reply
.
GetMsg
())}
return
nil
}
// MakeTxPrivacy2privacy create privacy to privacy transaction
func
(
c
*
Jrpc
)
MakeTxPrivacy2privacy
(
in
*
pty
.
ReqPri2Pri
,
result
*
interface
{})
error
{
reply
,
err
:=
c
.
cli
.
MakeTxPrivacy2Privacy
(
context
.
Background
(),
in
)
if
err
!=
nil
{
return
err
}
*
result
=
rpctypes
.
ReplyHash
{
Hash
:
common
.
ToHex
(
reply
.
GetMsg
())}
return
nil
}
// MakeTxPrivacy2public make privacy to public trasaction
func
(
c
*
Jrpc
)
MakeTxPrivacy2public
(
in
*
pty
.
ReqPri2Pub
,
result
*
interface
{})
error
{
reply
,
err
:=
c
.
cli
.
MakeTxPrivacy2Public
(
context
.
Background
(),
in
)
if
err
!=
nil
{
return
err
}
*
result
=
rpctypes
.
ReplyHash
{
Hash
:
common
.
ToHex
(
reply
.
GetMsg
())}
return
nil
}
// CreateUTXOs create utxos for json rpc
// CreateUTXOs create utxos for json rpc
func
(
c
*
Jrpc
)
CreateUTXOs
(
in
*
pty
.
ReqCreateUTXOs
,
result
*
interface
{})
error
{
func
(
c
*
Jrpc
)
CreateUTXOs
(
in
*
pty
.
ReqCreateUTXOs
,
result
*
interface
{})
error
{
...
...
plugin/dapp/privacy/rpc/rpc_channel_test.go
View file @
8c429796
...
@@ -45,10 +45,6 @@ func TestRPCChannel(t *testing.T) {
...
@@ -45,10 +45,6 @@ func TestRPCChannel(t *testing.T) {
{
fn
:
testShowPrivacyKey
},
{
fn
:
testShowPrivacyKey
},
{
fn
:
testShowPrivacyAccountInfo
},
{
fn
:
testShowPrivacyAccountInfo
},
{
fn
:
testShowPrivacyAccountSpend
},
{
fn
:
testShowPrivacyAccountSpend
},
{
fn
:
testPublic2Privacy
},
{
fn
:
testPrivacy2Privacy
},
{
fn
:
testPrivacy2Public
},
{
fn
:
testPrivacy2Public
},
{
fn
:
testShowAmountsOfUTXO
},
{
fn
:
testShowAmountsOfUTXO
},
{
fn
:
testShowUTXOs4SpecifiedAmount
},
{
fn
:
testShowUTXOs4SpecifiedAmount
},
{
fn
:
testCreateUTXOs
},
{
fn
:
testCreateUTXOs
},
...
@@ -98,51 +94,6 @@ func testShowPrivacyAccountSpend(t *testing.T, jrpc *jsonclient.JSONClient) erro
...
@@ -98,51 +94,6 @@ func testShowPrivacyAccountSpend(t *testing.T, jrpc *jsonclient.JSONClient) erro
return
err
return
err
}
}
func
testPublic2Privacy
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
params
:=
pty
.
ReqPub2Pri
{
Sender
:
"13cS5G1BDN2YfGudsxRxr7X25yu6ZdgxMU"
,
Pubkeypair
:
"92fe6cfec2e19cd15f203f83b5d440ddb63d0cb71559f96dc81208d819fea85886b08f6e874fca15108d244b40f9086d8c03260d4b954a40dfb3cbe41ebc7389"
,
Amount
:
1234
,
Note
:
"for test"
,
Tokenname
:
types
.
BTY
,
Expire
:
int64
(
time
.
Hour
),
}
var
res
rpctypes
.
ReplyHash
err
:=
jrpc
.
Call
(
"privacy.MakeTxPublic2privacy"
,
params
,
&
res
)
return
err
}
func
testPrivacy2Privacy
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
params
:=
pty
.
ReqPri2Pri
{
Sender
:
"13cS5G1BDN2YfGudsxRxr7X25yu6ZdgxMU"
,
Pubkeypair
:
"92fe6cfec2e19cd15f203f83b5d440ddb63d0cb71559f96dc81208d819fea85886b08f6e874fca15108d244b40f9086d8c03260d4b954a40dfb3cbe41ebc7389"
,
Amount
:
234567
,
Mixin
:
16
,
Note
:
"for test"
,
Tokenname
:
types
.
BTY
,
Expire
:
int64
(
time
.
Hour
),
}
var
res
rpctypes
.
ReplyHash
err
:=
jrpc
.
Call
(
"privacy.MakeTxPrivacy2privacy"
,
params
,
&
res
)
return
err
}
func
testPrivacy2Public
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
params
:=
pty
.
ReqPri2Pub
{
Sender
:
"13cS5G1BDN2YfGudsxRxr7X25yu6ZdgxMU"
,
Receiver
:
"1EDDghAtgBsamrNEtNmYdQzC1QEhLkr87t"
,
Amount
:
123456
,
Note
:
"for test"
,
Tokenname
:
types
.
BTY
,
Mixin
:
16
,
Expire
:
int64
(
time
.
Hour
),
}
var
res
rpctypes
.
ReplyHash
err
:=
jrpc
.
Call
(
"privacy.MakeTxPrivacy2public"
,
params
,
&
res
)
return
err
}
func
testShowAmountsOfUTXO
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
func
testShowAmountsOfUTXO
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
reqPrivacyToken
:=
pty
.
ReqPrivacyToken
{
Token
:
types
.
BTY
}
reqPrivacyToken
:=
pty
.
ReqPrivacyToken
{
Token
:
types
.
BTY
}
var
params
rpctypes
.
Query4Jrpc
var
params
rpctypes
.
Query4Jrpc
...
...
plugin/dapp/privacy/types/privacy.pb.go
View file @
8c429796
...
@@ -353,6 +353,7 @@ type Privacy2Public struct {
...
@@ -353,6 +353,7 @@ type Privacy2Public struct {
Tokenname
string
`protobuf:"bytes,1,opt,name=tokenname,proto3" json:"tokenname,omitempty"`
Tokenname
string
`protobuf:"bytes,1,opt,name=tokenname,proto3" json:"tokenname,omitempty"`
Amount
int64
`protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
Amount
int64
`protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
Note
string
`protobuf:"bytes,3,opt,name=note,proto3" json:"note,omitempty"`
Note
string
`protobuf:"bytes,3,opt,name=note,proto3" json:"note,omitempty"`
To
string
`protobuf:"bytes,6,opt,name=to,proto3" json:"to,omitempty"`
Input
*
PrivacyInput
`protobuf:"bytes,4,opt,name=input,proto3" json:"input,omitempty"`
Input
*
PrivacyInput
`protobuf:"bytes,4,opt,name=input,proto3" json:"input,omitempty"`
Output
*
PrivacyOutput
`protobuf:"bytes,5,opt,name=output,proto3" json:"output,omitempty"`
Output
*
PrivacyOutput
`protobuf:"bytes,5,opt,name=output,proto3" json:"output,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
...
@@ -406,6 +407,13 @@ func (m *Privacy2Public) GetNote() string {
...
@@ -406,6 +407,13 @@ func (m *Privacy2Public) GetNote() string {
return
""
return
""
}
}
func
(
m
*
Privacy2Public
)
GetTo
()
string
{
if
m
!=
nil
{
return
m
.
To
}
return
""
}
func
(
m
*
Privacy2Public
)
GetInput
()
*
PrivacyInput
{
func
(
m
*
Privacy2Public
)
GetInput
()
*
PrivacyInput
{
if
m
!=
nil
{
if
m
!=
nil
{
return
m
.
Input
return
m
.
Input
...
@@ -1877,280 +1885,6 @@ func _PrivacyAction4Print_OneofSizer(msg proto.Message) (n int) {
...
@@ -1877,280 +1885,6 @@ func _PrivacyAction4Print_OneofSizer(msg proto.Message) (n int) {
return
n
return
n
}
}
type
ReqPub2Pri
struct
{
//接收人可见公钥A
// string viewPublic = 1;
//接收人花费公钥B
// string spendPublic = 2;
Tokenname
string
`protobuf:"bytes,3,opt,name=tokenname,proto3" json:"tokenname,omitempty"`
Amount
int64
`protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"`
Note
string
`protobuf:"bytes,5,opt,name=note,proto3" json:"note,omitempty"`
//发送人地址
Sender
string
`protobuf:"bytes,6,opt,name=sender,proto3" json:"sender,omitempty"`
Mixin
int32
`protobuf:"varint,7,opt,name=mixin,proto3" json:"mixin,omitempty"`
Pubkeypair
string
`protobuf:"bytes,8,opt,name=pubkeypair,proto3" json:"pubkeypair,omitempty"`
Expire
int64
`protobuf:"varint,9,opt,name=expire,proto3" json:"expire,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
ReqPub2Pri
)
Reset
()
{
*
m
=
ReqPub2Pri
{}
}
func
(
m
*
ReqPub2Pri
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqPub2Pri
)
ProtoMessage
()
{}
func
(
*
ReqPub2Pri
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
31
}
}
func
(
m
*
ReqPub2Pri
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReqPub2Pri
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
ReqPub2Pri
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReqPub2Pri
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
ReqPub2Pri
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReqPub2Pri
.
Merge
(
m
,
src
)
}
func
(
m
*
ReqPub2Pri
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReqPub2Pri
.
Size
(
m
)
}
func
(
m
*
ReqPub2Pri
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReqPub2Pri
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_ReqPub2Pri
proto
.
InternalMessageInfo
func
(
m
*
ReqPub2Pri
)
GetTokenname
()
string
{
if
m
!=
nil
{
return
m
.
Tokenname
}
return
""
}
func
(
m
*
ReqPub2Pri
)
GetAmount
()
int64
{
if
m
!=
nil
{
return
m
.
Amount
}
return
0
}
func
(
m
*
ReqPub2Pri
)
GetNote
()
string
{
if
m
!=
nil
{
return
m
.
Note
}
return
""
}
func
(
m
*
ReqPub2Pri
)
GetSender
()
string
{
if
m
!=
nil
{
return
m
.
Sender
}
return
""
}
func
(
m
*
ReqPub2Pri
)
GetMixin
()
int32
{
if
m
!=
nil
{
return
m
.
Mixin
}
return
0
}
func
(
m
*
ReqPub2Pri
)
GetPubkeypair
()
string
{
if
m
!=
nil
{
return
m
.
Pubkeypair
}
return
""
}
func
(
m
*
ReqPub2Pri
)
GetExpire
()
int64
{
if
m
!=
nil
{
return
m
.
Expire
}
return
0
}
type
ReqPri2Pri
struct
{
//接收人可见公钥A
// string viewPublic = 1; //A
//接收人花费公钥B
// string spendPublic = 2; //B
Tokenname
string
`protobuf:"bytes,3,opt,name=tokenname,proto3" json:"tokenname,omitempty"`
Amount
int64
`protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"`
Note
string
`protobuf:"bytes,5,opt,name=note,proto3" json:"note,omitempty"`
//隐私交易发起人地址
Sender
string
`protobuf:"bytes,6,opt,name=sender,proto3" json:"sender,omitempty"`
Mixin
int32
`protobuf:"varint,7,opt,name=mixin,proto3" json:"mixin,omitempty"`
// string txhash = 7;
Pubkeypair
string
`protobuf:"bytes,8,opt,name=pubkeypair,proto3" json:"pubkeypair,omitempty"`
Expire
int64
`protobuf:"varint,9,opt,name=expire,proto3" json:"expire,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
ReqPri2Pri
)
Reset
()
{
*
m
=
ReqPri2Pri
{}
}
func
(
m
*
ReqPri2Pri
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqPri2Pri
)
ProtoMessage
()
{}
func
(
*
ReqPri2Pri
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
32
}
}
func
(
m
*
ReqPri2Pri
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReqPri2Pri
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
ReqPri2Pri
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReqPri2Pri
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
ReqPri2Pri
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReqPri2Pri
.
Merge
(
m
,
src
)
}
func
(
m
*
ReqPri2Pri
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReqPri2Pri
.
Size
(
m
)
}
func
(
m
*
ReqPri2Pri
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReqPri2Pri
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_ReqPri2Pri
proto
.
InternalMessageInfo
func
(
m
*
ReqPri2Pri
)
GetTokenname
()
string
{
if
m
!=
nil
{
return
m
.
Tokenname
}
return
""
}
func
(
m
*
ReqPri2Pri
)
GetAmount
()
int64
{
if
m
!=
nil
{
return
m
.
Amount
}
return
0
}
func
(
m
*
ReqPri2Pri
)
GetNote
()
string
{
if
m
!=
nil
{
return
m
.
Note
}
return
""
}
func
(
m
*
ReqPri2Pri
)
GetSender
()
string
{
if
m
!=
nil
{
return
m
.
Sender
}
return
""
}
func
(
m
*
ReqPri2Pri
)
GetMixin
()
int32
{
if
m
!=
nil
{
return
m
.
Mixin
}
return
0
}
func
(
m
*
ReqPri2Pri
)
GetPubkeypair
()
string
{
if
m
!=
nil
{
return
m
.
Pubkeypair
}
return
""
}
func
(
m
*
ReqPri2Pri
)
GetExpire
()
int64
{
if
m
!=
nil
{
return
m
.
Expire
}
return
0
}
type
ReqPri2Pub
struct
{
Receiver
string
`protobuf:"bytes,1,opt,name=receiver,proto3" json:"receiver,omitempty"`
Tokenname
string
`protobuf:"bytes,2,opt,name=tokenname,proto3" json:"tokenname,omitempty"`
Amount
int64
`protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
Note
string
`protobuf:"bytes,4,opt,name=note,proto3" json:"note,omitempty"`
//隐私交易发起人地址
Sender
string
`protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty"`
Mixin
int32
`protobuf:"varint,6,opt,name=mixin,proto3" json:"mixin,omitempty"`
// string txhash = 6;
Expire
int64
`protobuf:"varint,7,opt,name=expire,proto3" json:"expire,omitempty"`
XXX_NoUnkeyedLiteral
struct
{}
`json:"-"`
XXX_unrecognized
[]
byte
`json:"-"`
XXX_sizecache
int32
`json:"-"`
}
func
(
m
*
ReqPri2Pub
)
Reset
()
{
*
m
=
ReqPri2Pub
{}
}
func
(
m
*
ReqPri2Pub
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqPri2Pub
)
ProtoMessage
()
{}
func
(
*
ReqPri2Pub
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
33
}
}
func
(
m
*
ReqPri2Pub
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
return
xxx_messageInfo_ReqPri2Pub
.
Unmarshal
(
m
,
b
)
}
func
(
m
*
ReqPri2Pub
)
XXX_Marshal
(
b
[]
byte
,
deterministic
bool
)
([]
byte
,
error
)
{
return
xxx_messageInfo_ReqPri2Pub
.
Marshal
(
b
,
m
,
deterministic
)
}
func
(
m
*
ReqPri2Pub
)
XXX_Merge
(
src
proto
.
Message
)
{
xxx_messageInfo_ReqPri2Pub
.
Merge
(
m
,
src
)
}
func
(
m
*
ReqPri2Pub
)
XXX_Size
()
int
{
return
xxx_messageInfo_ReqPri2Pub
.
Size
(
m
)
}
func
(
m
*
ReqPri2Pub
)
XXX_DiscardUnknown
()
{
xxx_messageInfo_ReqPri2Pub
.
DiscardUnknown
(
m
)
}
var
xxx_messageInfo_ReqPri2Pub
proto
.
InternalMessageInfo
func
(
m
*
ReqPri2Pub
)
GetReceiver
()
string
{
if
m
!=
nil
{
return
m
.
Receiver
}
return
""
}
func
(
m
*
ReqPri2Pub
)
GetTokenname
()
string
{
if
m
!=
nil
{
return
m
.
Tokenname
}
return
""
}
func
(
m
*
ReqPri2Pub
)
GetAmount
()
int64
{
if
m
!=
nil
{
return
m
.
Amount
}
return
0
}
func
(
m
*
ReqPri2Pub
)
GetNote
()
string
{
if
m
!=
nil
{
return
m
.
Note
}
return
""
}
func
(
m
*
ReqPri2Pub
)
GetSender
()
string
{
if
m
!=
nil
{
return
m
.
Sender
}
return
""
}
func
(
m
*
ReqPri2Pub
)
GetMixin
()
int32
{
if
m
!=
nil
{
return
m
.
Mixin
}
return
0
}
func
(
m
*
ReqPri2Pub
)
GetExpire
()
int64
{
if
m
!=
nil
{
return
m
.
Expire
}
return
0
}
type
ReqCreateUTXOs
struct
{
type
ReqCreateUTXOs
struct
{
// string viewPublic = 1; //接收人可见公钥A
// string viewPublic = 1; //接收人可见公钥A
// string spendPublic = 2; //接收人花费公钥B
// string spendPublic = 2; //接收人花费公钥B
...
@@ -2170,7 +1904,7 @@ func (m *ReqCreateUTXOs) Reset() { *m = ReqCreateUTXOs{} }
...
@@ -2170,7 +1904,7 @@ func (m *ReqCreateUTXOs) Reset() { *m = ReqCreateUTXOs{} }
func
(
m
*
ReqCreateUTXOs
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ReqCreateUTXOs
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqCreateUTXOs
)
ProtoMessage
()
{}
func
(
*
ReqCreateUTXOs
)
ProtoMessage
()
{}
func
(
*
ReqCreateUTXOs
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ReqCreateUTXOs
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
3
4
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
3
1
}
}
}
func
(
m
*
ReqCreateUTXOs
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ReqCreateUTXOs
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -2254,7 +1988,7 @@ func (m *ReplyPrivacyPkPair) Reset() { *m = ReplyPrivacyPkPair{} }
...
@@ -2254,7 +1988,7 @@ func (m *ReplyPrivacyPkPair) Reset() { *m = ReplyPrivacyPkPair{} }
func
(
m
*
ReplyPrivacyPkPair
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ReplyPrivacyPkPair
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReplyPrivacyPkPair
)
ProtoMessage
()
{}
func
(
*
ReplyPrivacyPkPair
)
ProtoMessage
()
{}
func
(
*
ReplyPrivacyPkPair
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ReplyPrivacyPkPair
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
3
5
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
3
2
}
}
}
func
(
m
*
ReplyPrivacyPkPair
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ReplyPrivacyPkPair
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -2301,7 +2035,7 @@ func (m *ReqPrivBal4AddrToken) Reset() { *m = ReqPrivBal4AddrToken{} }
...
@@ -2301,7 +2035,7 @@ func (m *ReqPrivBal4AddrToken) Reset() { *m = ReqPrivBal4AddrToken{} }
func
(
m
*
ReqPrivBal4AddrToken
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ReqPrivBal4AddrToken
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqPrivBal4AddrToken
)
ProtoMessage
()
{}
func
(
*
ReqPrivBal4AddrToken
)
ProtoMessage
()
{}
func
(
*
ReqPrivBal4AddrToken
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ReqPrivBal4AddrToken
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
3
6
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
3
3
}
}
}
func
(
m
*
ReqPrivBal4AddrToken
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ReqPrivBal4AddrToken
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -2348,7 +2082,7 @@ func (m *ReplyPrivacyBalance) Reset() { *m = ReplyPrivacyBalance{} }
...
@@ -2348,7 +2082,7 @@ func (m *ReplyPrivacyBalance) Reset() { *m = ReplyPrivacyBalance{} }
func
(
m
*
ReplyPrivacyBalance
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ReplyPrivacyBalance
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReplyPrivacyBalance
)
ProtoMessage
()
{}
func
(
*
ReplyPrivacyBalance
)
ProtoMessage
()
{}
func
(
*
ReplyPrivacyBalance
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ReplyPrivacyBalance
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
3
7
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
3
4
}
}
}
func
(
m
*
ReplyPrivacyBalance
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ReplyPrivacyBalance
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -2403,7 +2137,7 @@ func (m *PrivacyDBStore) Reset() { *m = PrivacyDBStore{} }
...
@@ -2403,7 +2137,7 @@ func (m *PrivacyDBStore) Reset() { *m = PrivacyDBStore{} }
func
(
m
*
PrivacyDBStore
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
PrivacyDBStore
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
PrivacyDBStore
)
ProtoMessage
()
{}
func
(
*
PrivacyDBStore
)
ProtoMessage
()
{}
func
(
*
PrivacyDBStore
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
PrivacyDBStore
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
3
8
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
3
5
}
}
}
func
(
m
*
PrivacyDBStore
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
PrivacyDBStore
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -2506,7 +2240,7 @@ func (m *UTXO) Reset() { *m = UTXO{} }
...
@@ -2506,7 +2240,7 @@ func (m *UTXO) Reset() { *m = UTXO{} }
func
(
m
*
UTXO
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
UTXO
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
UTXO
)
ProtoMessage
()
{}
func
(
*
UTXO
)
ProtoMessage
()
{}
func
(
*
UTXO
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
UTXO
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
3
9
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
3
6
}
}
}
func
(
m
*
UTXO
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
UTXO
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -2554,7 +2288,7 @@ func (m *UTXOHaveTxHash) Reset() { *m = UTXOHaveTxHash{} }
...
@@ -2554,7 +2288,7 @@ func (m *UTXOHaveTxHash) Reset() { *m = UTXOHaveTxHash{} }
func
(
m
*
UTXOHaveTxHash
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
UTXOHaveTxHash
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
UTXOHaveTxHash
)
ProtoMessage
()
{}
func
(
*
UTXOHaveTxHash
)
ProtoMessage
()
{}
func
(
*
UTXOHaveTxHash
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
UTXOHaveTxHash
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
40
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
37
}
}
}
func
(
m
*
UTXOHaveTxHash
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
UTXOHaveTxHash
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -2607,7 +2341,7 @@ func (m *UTXOs) Reset() { *m = UTXOs{} }
...
@@ -2607,7 +2341,7 @@ func (m *UTXOs) Reset() { *m = UTXOs{} }
func
(
m
*
UTXOs
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
UTXOs
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
UTXOs
)
ProtoMessage
()
{}
func
(
*
UTXOs
)
ProtoMessage
()
{}
func
(
*
UTXOs
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
UTXOs
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
41
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
38
}
}
}
func
(
m
*
UTXOs
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
UTXOs
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -2646,7 +2380,7 @@ func (m *UTXOHaveTxHashs) Reset() { *m = UTXOHaveTxHashs{} }
...
@@ -2646,7 +2380,7 @@ func (m *UTXOHaveTxHashs) Reset() { *m = UTXOHaveTxHashs{} }
func
(
m
*
UTXOHaveTxHashs
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
UTXOHaveTxHashs
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
UTXOHaveTxHashs
)
ProtoMessage
()
{}
func
(
*
UTXOHaveTxHashs
)
ProtoMessage
()
{}
func
(
*
UTXOHaveTxHashs
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
UTXOHaveTxHashs
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
42
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
39
}
}
}
func
(
m
*
UTXOHaveTxHashs
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
UTXOHaveTxHashs
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -2687,7 +2421,7 @@ func (m *ReqUTXOGlobalIndex) Reset() { *m = ReqUTXOGlobalIndex{} }
...
@@ -2687,7 +2421,7 @@ func (m *ReqUTXOGlobalIndex) Reset() { *m = ReqUTXOGlobalIndex{} }
func
(
m
*
ReqUTXOGlobalIndex
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ReqUTXOGlobalIndex
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqUTXOGlobalIndex
)
ProtoMessage
()
{}
func
(
*
ReqUTXOGlobalIndex
)
ProtoMessage
()
{}
func
(
*
ReqUTXOGlobalIndex
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ReqUTXOGlobalIndex
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
4
3
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
4
0
}
}
}
func
(
m
*
ReqUTXOGlobalIndex
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ReqUTXOGlobalIndex
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -2741,7 +2475,7 @@ func (m *UTXOBasic) Reset() { *m = UTXOBasic{} }
...
@@ -2741,7 +2475,7 @@ func (m *UTXOBasic) Reset() { *m = UTXOBasic{} }
func
(
m
*
UTXOBasic
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
UTXOBasic
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
UTXOBasic
)
ProtoMessage
()
{}
func
(
*
UTXOBasic
)
ProtoMessage
()
{}
func
(
*
UTXOBasic
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
UTXOBasic
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
4
4
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
4
1
}
}
}
func
(
m
*
UTXOBasic
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
UTXOBasic
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -2788,7 +2522,7 @@ func (m *UTXOIndex4Amount) Reset() { *m = UTXOIndex4Amount{} }
...
@@ -2788,7 +2522,7 @@ func (m *UTXOIndex4Amount) Reset() { *m = UTXOIndex4Amount{} }
func
(
m
*
UTXOIndex4Amount
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
UTXOIndex4Amount
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
UTXOIndex4Amount
)
ProtoMessage
()
{}
func
(
*
UTXOIndex4Amount
)
ProtoMessage
()
{}
func
(
*
UTXOIndex4Amount
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
UTXOIndex4Amount
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
4
5
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
4
2
}
}
}
func
(
m
*
UTXOIndex4Amount
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
UTXOIndex4Amount
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -2836,7 +2570,7 @@ func (m *ResUTXOGlobalIndex) Reset() { *m = ResUTXOGlobalIndex{} }
...
@@ -2836,7 +2570,7 @@ func (m *ResUTXOGlobalIndex) Reset() { *m = ResUTXOGlobalIndex{} }
func
(
m
*
ResUTXOGlobalIndex
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ResUTXOGlobalIndex
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ResUTXOGlobalIndex
)
ProtoMessage
()
{}
func
(
*
ResUTXOGlobalIndex
)
ProtoMessage
()
{}
func
(
*
ResUTXOGlobalIndex
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ResUTXOGlobalIndex
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
4
6
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
4
3
}
}
}
func
(
m
*
ResUTXOGlobalIndex
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ResUTXOGlobalIndex
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -2894,7 +2628,7 @@ func (m *FTXOsSTXOsInOneTx) Reset() { *m = FTXOsSTXOsInOneTx{} }
...
@@ -2894,7 +2628,7 @@ func (m *FTXOsSTXOsInOneTx) Reset() { *m = FTXOsSTXOsInOneTx{} }
func
(
m
*
FTXOsSTXOsInOneTx
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
FTXOsSTXOsInOneTx
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
FTXOsSTXOsInOneTx
)
ProtoMessage
()
{}
func
(
*
FTXOsSTXOsInOneTx
)
ProtoMessage
()
{}
func
(
*
FTXOsSTXOsInOneTx
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
FTXOsSTXOsInOneTx
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
4
7
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
4
4
}
}
}
func
(
m
*
FTXOsSTXOsInOneTx
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
FTXOsSTXOsInOneTx
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -2962,7 +2696,7 @@ func (m *RealKeyInput) Reset() { *m = RealKeyInput{} }
...
@@ -2962,7 +2696,7 @@ func (m *RealKeyInput) Reset() { *m = RealKeyInput{} }
func
(
m
*
RealKeyInput
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
RealKeyInput
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
RealKeyInput
)
ProtoMessage
()
{}
func
(
*
RealKeyInput
)
ProtoMessage
()
{}
func
(
*
RealKeyInput
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
RealKeyInput
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
4
8
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
4
5
}
}
}
func
(
m
*
RealKeyInput
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
RealKeyInput
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -3008,7 +2742,7 @@ func (m *UTXOBasics) Reset() { *m = UTXOBasics{} }
...
@@ -3008,7 +2742,7 @@ func (m *UTXOBasics) Reset() { *m = UTXOBasics{} }
func
(
m
*
UTXOBasics
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
UTXOBasics
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
UTXOBasics
)
ProtoMessage
()
{}
func
(
*
UTXOBasics
)
ProtoMessage
()
{}
func
(
*
UTXOBasics
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
UTXOBasics
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
4
9
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
4
6
}
}
}
func
(
m
*
UTXOBasics
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
UTXOBasics
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -3061,7 +2795,7 @@ func (m *CreateTransactionCache) Reset() { *m = CreateTransactionCache{}
...
@@ -3061,7 +2795,7 @@ func (m *CreateTransactionCache) Reset() { *m = CreateTransactionCache{}
func
(
m
*
CreateTransactionCache
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
CreateTransactionCache
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
CreateTransactionCache
)
ProtoMessage
()
{}
func
(
*
CreateTransactionCache
)
ProtoMessage
()
{}
func
(
*
CreateTransactionCache
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
CreateTransactionCache
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
50
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
47
}
}
}
func
(
m
*
CreateTransactionCache
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
CreateTransactionCache
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -3157,7 +2891,7 @@ func (m *ReqCacheTxList) Reset() { *m = ReqCacheTxList{} }
...
@@ -3157,7 +2891,7 @@ func (m *ReqCacheTxList) Reset() { *m = ReqCacheTxList{} }
func
(
m
*
ReqCacheTxList
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ReqCacheTxList
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqCacheTxList
)
ProtoMessage
()
{}
func
(
*
ReqCacheTxList
)
ProtoMessage
()
{}
func
(
*
ReqCacheTxList
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ReqCacheTxList
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
51
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
48
}
}
}
func
(
m
*
ReqCacheTxList
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ReqCacheTxList
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -3203,7 +2937,7 @@ func (m *ReplyCacheTxList) Reset() { *m = ReplyCacheTxList{} }
...
@@ -3203,7 +2937,7 @@ func (m *ReplyCacheTxList) Reset() { *m = ReplyCacheTxList{} }
func
(
m
*
ReplyCacheTxList
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ReplyCacheTxList
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReplyCacheTxList
)
ProtoMessage
()
{}
func
(
*
ReplyCacheTxList
)
ProtoMessage
()
{}
func
(
*
ReplyCacheTxList
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ReplyCacheTxList
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
52
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
49
}
}
}
func
(
m
*
ReplyCacheTxList
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ReplyCacheTxList
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -3243,7 +2977,7 @@ func (m *ReqPrivacyAccount) Reset() { *m = ReqPrivacyAccount{} }
...
@@ -3243,7 +2977,7 @@ func (m *ReqPrivacyAccount) Reset() { *m = ReqPrivacyAccount{} }
func
(
m
*
ReqPrivacyAccount
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ReqPrivacyAccount
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqPrivacyAccount
)
ProtoMessage
()
{}
func
(
*
ReqPrivacyAccount
)
ProtoMessage
()
{}
func
(
*
ReqPrivacyAccount
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ReqPrivacyAccount
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
5
3
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
5
0
}
}
}
func
(
m
*
ReqPrivacyAccount
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ReqPrivacyAccount
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -3296,7 +3030,7 @@ func (m *ReqPPrivacyAccount) Reset() { *m = ReqPPrivacyAccount{} }
...
@@ -3296,7 +3030,7 @@ func (m *ReqPPrivacyAccount) Reset() { *m = ReqPPrivacyAccount{} }
func
(
m
*
ReqPPrivacyAccount
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ReqPPrivacyAccount
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqPPrivacyAccount
)
ProtoMessage
()
{}
func
(
*
ReqPPrivacyAccount
)
ProtoMessage
()
{}
func
(
*
ReqPPrivacyAccount
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ReqPPrivacyAccount
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
5
4
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
5
1
}
}
}
func
(
m
*
ReqPPrivacyAccount
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ReqPPrivacyAccount
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -3354,7 +3088,7 @@ func (m *ReplyPrivacyAccount) Reset() { *m = ReplyPrivacyAccount{} }
...
@@ -3354,7 +3088,7 @@ func (m *ReplyPrivacyAccount) Reset() { *m = ReplyPrivacyAccount{} }
func
(
m
*
ReplyPrivacyAccount
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ReplyPrivacyAccount
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReplyPrivacyAccount
)
ProtoMessage
()
{}
func
(
*
ReplyPrivacyAccount
)
ProtoMessage
()
{}
func
(
*
ReplyPrivacyAccount
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ReplyPrivacyAccount
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
5
5
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
5
2
}
}
}
func
(
m
*
ReplyPrivacyAccount
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ReplyPrivacyAccount
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -3408,7 +3142,7 @@ func (m *ReqCreateCacheTxKey) Reset() { *m = ReqCreateCacheTxKey{} }
...
@@ -3408,7 +3142,7 @@ func (m *ReqCreateCacheTxKey) Reset() { *m = ReqCreateCacheTxKey{} }
func
(
m
*
ReqCreateCacheTxKey
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ReqCreateCacheTxKey
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqCreateCacheTxKey
)
ProtoMessage
()
{}
func
(
*
ReqCreateCacheTxKey
)
ProtoMessage
()
{}
func
(
*
ReqCreateCacheTxKey
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ReqCreateCacheTxKey
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
5
6
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
5
3
}
}
}
func
(
m
*
ReqCreateCacheTxKey
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ReqCreateCacheTxKey
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -3463,7 +3197,7 @@ func (m *ReqPrivacyTransactionList) Reset() { *m = ReqPrivacyTransaction
...
@@ -3463,7 +3197,7 @@ func (m *ReqPrivacyTransactionList) Reset() { *m = ReqPrivacyTransaction
func
(
m
*
ReqPrivacyTransactionList
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ReqPrivacyTransactionList
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqPrivacyTransactionList
)
ProtoMessage
()
{}
func
(
*
ReqPrivacyTransactionList
)
ProtoMessage
()
{}
func
(
*
ReqPrivacyTransactionList
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ReqPrivacyTransactionList
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
5
7
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
5
4
}
}
}
func
(
m
*
ReqPrivacyTransactionList
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ReqPrivacyTransactionList
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -3545,7 +3279,7 @@ func (m *ReqRescanUtxos) Reset() { *m = ReqRescanUtxos{} }
...
@@ -3545,7 +3279,7 @@ func (m *ReqRescanUtxos) Reset() { *m = ReqRescanUtxos{} }
func
(
m
*
ReqRescanUtxos
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ReqRescanUtxos
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqRescanUtxos
)
ProtoMessage
()
{}
func
(
*
ReqRescanUtxos
)
ProtoMessage
()
{}
func
(
*
ReqRescanUtxos
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ReqRescanUtxos
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
5
8
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
5
5
}
}
}
func
(
m
*
ReqRescanUtxos
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ReqRescanUtxos
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -3592,7 +3326,7 @@ func (m *RepRescanResult) Reset() { *m = RepRescanResult{} }
...
@@ -3592,7 +3326,7 @@ func (m *RepRescanResult) Reset() { *m = RepRescanResult{} }
func
(
m
*
RepRescanResult
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
RepRescanResult
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
RepRescanResult
)
ProtoMessage
()
{}
func
(
*
RepRescanResult
)
ProtoMessage
()
{}
func
(
*
RepRescanResult
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
RepRescanResult
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
5
9
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
5
6
}
}
}
func
(
m
*
RepRescanResult
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
RepRescanResult
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -3639,7 +3373,7 @@ func (m *RepRescanUtxos) Reset() { *m = RepRescanUtxos{} }
...
@@ -3639,7 +3373,7 @@ func (m *RepRescanUtxos) Reset() { *m = RepRescanUtxos{} }
func
(
m
*
RepRescanUtxos
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
RepRescanUtxos
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
RepRescanUtxos
)
ProtoMessage
()
{}
func
(
*
RepRescanUtxos
)
ProtoMessage
()
{}
func
(
*
RepRescanUtxos
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
RepRescanUtxos
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
60
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
57
}
}
}
func
(
m
*
RepRescanUtxos
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
RepRescanUtxos
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -3685,7 +3419,7 @@ func (m *ReqEnablePrivacy) Reset() { *m = ReqEnablePrivacy{} }
...
@@ -3685,7 +3419,7 @@ func (m *ReqEnablePrivacy) Reset() { *m = ReqEnablePrivacy{} }
func
(
m
*
ReqEnablePrivacy
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
ReqEnablePrivacy
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
ReqEnablePrivacy
)
ProtoMessage
()
{}
func
(
*
ReqEnablePrivacy
)
ProtoMessage
()
{}
func
(
*
ReqEnablePrivacy
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
ReqEnablePrivacy
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
61
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
58
}
}
}
func
(
m
*
ReqEnablePrivacy
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
ReqEnablePrivacy
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -3726,7 +3460,7 @@ func (m *PriAddrResult) Reset() { *m = PriAddrResult{} }
...
@@ -3726,7 +3460,7 @@ func (m *PriAddrResult) Reset() { *m = PriAddrResult{} }
func
(
m
*
PriAddrResult
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
PriAddrResult
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
PriAddrResult
)
ProtoMessage
()
{}
func
(
*
PriAddrResult
)
ProtoMessage
()
{}
func
(
*
PriAddrResult
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
PriAddrResult
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
62
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
59
}
}
}
func
(
m
*
PriAddrResult
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
PriAddrResult
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -3779,7 +3513,7 @@ func (m *RepEnablePrivacy) Reset() { *m = RepEnablePrivacy{} }
...
@@ -3779,7 +3513,7 @@ func (m *RepEnablePrivacy) Reset() { *m = RepEnablePrivacy{} }
func
(
m
*
RepEnablePrivacy
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
RepEnablePrivacy
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
RepEnablePrivacy
)
ProtoMessage
()
{}
func
(
*
RepEnablePrivacy
)
ProtoMessage
()
{}
func
(
*
RepEnablePrivacy
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
RepEnablePrivacy
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
6
3
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
6
0
}
}
}
func
(
m
*
RepEnablePrivacy
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
RepEnablePrivacy
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -3821,7 +3555,7 @@ func (m *PrivacySignatureParam) Reset() { *m = PrivacySignatureParam{} }
...
@@ -3821,7 +3555,7 @@ func (m *PrivacySignatureParam) Reset() { *m = PrivacySignatureParam{} }
func
(
m
*
PrivacySignatureParam
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
PrivacySignatureParam
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
PrivacySignatureParam
)
ProtoMessage
()
{}
func
(
*
PrivacySignatureParam
)
ProtoMessage
()
{}
func
(
*
PrivacySignatureParam
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
PrivacySignatureParam
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
6
4
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
6
1
}
}
}
func
(
m
*
PrivacySignatureParam
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
PrivacySignatureParam
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -3877,7 +3611,7 @@ func (m *WalletAccountPrivacy) Reset() { *m = WalletAccountPrivacy{} }
...
@@ -3877,7 +3611,7 @@ func (m *WalletAccountPrivacy) Reset() { *m = WalletAccountPrivacy{} }
func
(
m
*
WalletAccountPrivacy
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
m
*
WalletAccountPrivacy
)
String
()
string
{
return
proto
.
CompactTextString
(
m
)
}
func
(
*
WalletAccountPrivacy
)
ProtoMessage
()
{}
func
(
*
WalletAccountPrivacy
)
ProtoMessage
()
{}
func
(
*
WalletAccountPrivacy
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
WalletAccountPrivacy
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
6
5
}
return
fileDescriptor_dde03d4df7a6e99a
,
[]
int
{
6
2
}
}
}
func
(
m
*
WalletAccountPrivacy
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
func
(
m
*
WalletAccountPrivacy
)
XXX_Unmarshal
(
b
[]
byte
)
error
{
...
@@ -3960,9 +3694,6 @@ func init() {
...
@@ -3960,9 +3694,6 @@ func init() {
proto
.
RegisterType
((
*
Privacy2Privacy4Print
)(
nil
),
"types.Privacy2Privacy4Print"
)
proto
.
RegisterType
((
*
Privacy2Privacy4Print
)(
nil
),
"types.Privacy2Privacy4Print"
)
proto
.
RegisterType
((
*
Privacy2Public4Print
)(
nil
),
"types.Privacy2Public4Print"
)
proto
.
RegisterType
((
*
Privacy2Public4Print
)(
nil
),
"types.Privacy2Public4Print"
)
proto
.
RegisterType
((
*
PrivacyAction4Print
)(
nil
),
"types.PrivacyAction4Print"
)
proto
.
RegisterType
((
*
PrivacyAction4Print
)(
nil
),
"types.PrivacyAction4Print"
)
proto
.
RegisterType
((
*
ReqPub2Pri
)(
nil
),
"types.ReqPub2Pri"
)
proto
.
RegisterType
((
*
ReqPri2Pri
)(
nil
),
"types.ReqPri2Pri"
)
proto
.
RegisterType
((
*
ReqPri2Pub
)(
nil
),
"types.ReqPri2Pub"
)
proto
.
RegisterType
((
*
ReqCreateUTXOs
)(
nil
),
"types.ReqCreateUTXOs"
)
proto
.
RegisterType
((
*
ReqCreateUTXOs
)(
nil
),
"types.ReqCreateUTXOs"
)
proto
.
RegisterType
((
*
ReplyPrivacyPkPair
)(
nil
),
"types.ReplyPrivacyPkPair"
)
proto
.
RegisterType
((
*
ReplyPrivacyPkPair
)(
nil
),
"types.ReplyPrivacyPkPair"
)
proto
.
RegisterType
((
*
ReqPrivBal4AddrToken
)(
nil
),
"types.ReqPrivBal4AddrToken"
)
proto
.
RegisterType
((
*
ReqPrivBal4AddrToken
)(
nil
),
"types.ReqPrivBal4AddrToken"
)
...
@@ -4000,157 +3731,150 @@ func init() {
...
@@ -4000,157 +3731,150 @@ func init() {
func
init
()
{
proto
.
RegisterFile
(
"privacy.proto"
,
fileDescriptor_dde03d4df7a6e99a
)
}
func
init
()
{
proto
.
RegisterFile
(
"privacy.proto"
,
fileDescriptor_dde03d4df7a6e99a
)
}
var
fileDescriptor_dde03d4df7a6e99a
=
[]
byte
{
var
fileDescriptor_dde03d4df7a6e99a
=
[]
byte
{
// 2393 bytes of a gzipped FileDescriptorProto
// 2284 bytes of a gzipped FileDescriptorProto
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0xd4
,
0x5a
,
0x4f
,
0x6f
,
0x1c
,
0x49
,
0x1f
,
0x8b
,
0x08
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x02
,
0xff
,
0xb4
,
0x39
,
0x4d
,
0x6f
,
0x1c
,
0x49
,
0x15
,
0x77
,
0xcf
,
0x1f
,
0xdb
,
0xfd
,
0x3c
,
0xb6
,
0x27
,
0x9d
,
0xb1
,
0x77
,
0x32
,
0x89
,
0xa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,
0x97
,
0xaf
,
0x20
,
0x53
,
0x4b
,
0x9f
,
0xc0
,
0x9a
,
0x5c
,
0x6a
,
0x7c
,
0x55
,
0x56
,
0xd7
,
0x8a
,
0x27
,
0x88
,
0x4b
,
0xb6
,
0xd5
,
0x3f
,
0xed
,
0x9a
,
0x4b
,
0x47
,
0xbd
,
0xa9
,
0xa5
,
0xdf
,
0x81
,
0x25
,
0x35
,
0x3a
,
0x15
,
0x3d
,
0x15
,
0x72
,
0x6b
,
0xcd
,
0x0c
,
0x43
,
0x4e
,
0x46
,
0x73
,
0xce
,
0x0e
,
0x2c
,
0xeb
,
0xde
,
0xff
,
0x5e
,
0x2e
,
0x40
,
0x9b
,
0x68
,
0xe5
,
0x13
,
0x7a
,
0xbc
,
0xa0
,
0x39
,
0xa7
,
0x03
,
0x0d
,
0x61
,
0x54
,
0x4c
,
0x2e
,
0x94
,
0xdc
,
0xeb
,
0xdc
,
0x35
,
0x8d
,
0xae
,
0x4c
,
0xb6
,
0x0a
,
0x2e
,
0x51
,
0x34
,
0xd7
,
0x9b
,
0xe7
,
0xff
,
0x19
,
0xf1
,
0xad
,
0x7f
,
0x07
,
0x00
,
0x00
,
0xff
,
0xff
,
0xe2
,
0x8f
,
0xf6
,
0xab
,
0x60
,
0x21
,
0x00
,
0x00
,
}
}
// Reference imports to suppress errors if they are not otherwise used.
// Reference imports to suppress errors if they are not otherwise used.
...
@@ -4170,12 +3894,6 @@ type PrivacyClient interface {
...
@@ -4170,12 +3894,6 @@ type PrivacyClient interface {
ShowPrivacyKey
(
ctx
context
.
Context
,
in
*
types
.
ReqString
,
opts
...
grpc
.
CallOption
)
(
*
ReplyPrivacyPkPair
,
error
)
ShowPrivacyKey
(
ctx
context
.
Context
,
in
*
types
.
ReqString
,
opts
...
grpc
.
CallOption
)
(
*
ReplyPrivacyPkPair
,
error
)
// 创建一系列UTXO
// 创建一系列UTXO
CreateUTXOs
(
ctx
context
.
Context
,
in
*
ReqCreateUTXOs
,
opts
...
grpc
.
CallOption
)
(
*
types
.
Reply
,
error
)
CreateUTXOs
(
ctx
context
.
Context
,
in
*
ReqCreateUTXOs
,
opts
...
grpc
.
CallOption
)
(
*
types
.
Reply
,
error
)
// 将资金从公开到隐私转移
MakeTxPublic2Privacy
(
ctx
context
.
Context
,
in
*
ReqPub2Pri
,
opts
...
grpc
.
CallOption
)
(
*
types
.
Reply
,
error
)
// 将资产从隐私到隐私进行转移
MakeTxPrivacy2Privacy
(
ctx
context
.
Context
,
in
*
ReqPri2Pri
,
opts
...
grpc
.
CallOption
)
(
*
types
.
Reply
,
error
)
// 将资产从隐私到公开进行转移
MakeTxPrivacy2Public
(
ctx
context
.
Context
,
in
*
ReqPri2Pub
,
opts
...
grpc
.
CallOption
)
(
*
types
.
Reply
,
error
)
// 扫描UTXO以及获取扫描UTXO后的状态
// 扫描UTXO以及获取扫描UTXO后的状态
RescanUtxos
(
ctx
context
.
Context
,
in
*
ReqRescanUtxos
,
opts
...
grpc
.
CallOption
)
(
*
RepRescanUtxos
,
error
)
RescanUtxos
(
ctx
context
.
Context
,
in
*
ReqRescanUtxos
,
opts
...
grpc
.
CallOption
)
(
*
RepRescanUtxos
,
error
)
// 使能隐私账户
// 使能隐私账户
...
@@ -4210,33 +3928,6 @@ func (c *privacyClient) CreateUTXOs(ctx context.Context, in *ReqCreateUTXOs, opt
...
@@ -4210,33 +3928,6 @@ func (c *privacyClient) CreateUTXOs(ctx context.Context, in *ReqCreateUTXOs, opt
return
out
,
nil
return
out
,
nil
}
}
func
(
c
*
privacyClient
)
MakeTxPublic2Privacy
(
ctx
context
.
Context
,
in
*
ReqPub2Pri
,
opts
...
grpc
.
CallOption
)
(
*
types
.
Reply
,
error
)
{
out
:=
new
(
types
.
Reply
)
err
:=
c
.
cc
.
Invoke
(
ctx
,
"/types.privacy/MakeTxPublic2Privacy"
,
in
,
out
,
opts
...
)
if
err
!=
nil
{
return
nil
,
err
}
return
out
,
nil
}
func
(
c
*
privacyClient
)
MakeTxPrivacy2Privacy
(
ctx
context
.
Context
,
in
*
ReqPri2Pri
,
opts
...
grpc
.
CallOption
)
(
*
types
.
Reply
,
error
)
{
out
:=
new
(
types
.
Reply
)
err
:=
c
.
cc
.
Invoke
(
ctx
,
"/types.privacy/MakeTxPrivacy2Privacy"
,
in
,
out
,
opts
...
)
if
err
!=
nil
{
return
nil
,
err
}
return
out
,
nil
}
func
(
c
*
privacyClient
)
MakeTxPrivacy2Public
(
ctx
context
.
Context
,
in
*
ReqPri2Pub
,
opts
...
grpc
.
CallOption
)
(
*
types
.
Reply
,
error
)
{
out
:=
new
(
types
.
Reply
)
err
:=
c
.
cc
.
Invoke
(
ctx
,
"/types.privacy/MakeTxPrivacy2Public"
,
in
,
out
,
opts
...
)
if
err
!=
nil
{
return
nil
,
err
}
return
out
,
nil
}
func
(
c
*
privacyClient
)
RescanUtxos
(
ctx
context
.
Context
,
in
*
ReqRescanUtxos
,
opts
...
grpc
.
CallOption
)
(
*
RepRescanUtxos
,
error
)
{
func
(
c
*
privacyClient
)
RescanUtxos
(
ctx
context
.
Context
,
in
*
ReqRescanUtxos
,
opts
...
grpc
.
CallOption
)
(
*
RepRescanUtxos
,
error
)
{
out
:=
new
(
RepRescanUtxos
)
out
:=
new
(
RepRescanUtxos
)
err
:=
c
.
cc
.
Invoke
(
ctx
,
"/types.privacy/RescanUtxos"
,
in
,
out
,
opts
...
)
err
:=
c
.
cc
.
Invoke
(
ctx
,
"/types.privacy/RescanUtxos"
,
in
,
out
,
opts
...
)
...
@@ -4271,12 +3962,6 @@ type PrivacyServer interface {
...
@@ -4271,12 +3962,6 @@ type PrivacyServer interface {
ShowPrivacyKey
(
context
.
Context
,
*
types
.
ReqString
)
(
*
ReplyPrivacyPkPair
,
error
)
ShowPrivacyKey
(
context
.
Context
,
*
types
.
ReqString
)
(
*
ReplyPrivacyPkPair
,
error
)
// 创建一系列UTXO
// 创建一系列UTXO
CreateUTXOs
(
context
.
Context
,
*
ReqCreateUTXOs
)
(
*
types
.
Reply
,
error
)
CreateUTXOs
(
context
.
Context
,
*
ReqCreateUTXOs
)
(
*
types
.
Reply
,
error
)
// 将资金从公开到隐私转移
MakeTxPublic2Privacy
(
context
.
Context
,
*
ReqPub2Pri
)
(
*
types
.
Reply
,
error
)
// 将资产从隐私到隐私进行转移
MakeTxPrivacy2Privacy
(
context
.
Context
,
*
ReqPri2Pri
)
(
*
types
.
Reply
,
error
)
// 将资产从隐私到公开进行转移
MakeTxPrivacy2Public
(
context
.
Context
,
*
ReqPri2Pub
)
(
*
types
.
Reply
,
error
)
// 扫描UTXO以及获取扫描UTXO后的状态
// 扫描UTXO以及获取扫描UTXO后的状态
RescanUtxos
(
context
.
Context
,
*
ReqRescanUtxos
)
(
*
RepRescanUtxos
,
error
)
RescanUtxos
(
context
.
Context
,
*
ReqRescanUtxos
)
(
*
RepRescanUtxos
,
error
)
// 使能隐私账户
// 使能隐私账户
...
@@ -4325,60 +4010,6 @@ func _Privacy_CreateUTXOs_Handler(srv interface{}, ctx context.Context, dec func
...
@@ -4325,60 +4010,6 @@ func _Privacy_CreateUTXOs_Handler(srv interface{}, ctx context.Context, dec func
return
interceptor
(
ctx
,
in
,
info
,
handler
)
return
interceptor
(
ctx
,
in
,
info
,
handler
)
}
}
func
_Privacy_MakeTxPublic2Privacy_Handler
(
srv
interface
{},
ctx
context
.
Context
,
dec
func
(
interface
{})
error
,
interceptor
grpc
.
UnaryServerInterceptor
)
(
interface
{},
error
)
{
in
:=
new
(
ReqPub2Pri
)
if
err
:=
dec
(
in
);
err
!=
nil
{
return
nil
,
err
}
if
interceptor
==
nil
{
return
srv
.
(
PrivacyServer
)
.
MakeTxPublic2Privacy
(
ctx
,
in
)
}
info
:=
&
grpc
.
UnaryServerInfo
{
Server
:
srv
,
FullMethod
:
"/types.privacy/MakeTxPublic2Privacy"
,
}
handler
:=
func
(
ctx
context
.
Context
,
req
interface
{})
(
interface
{},
error
)
{
return
srv
.
(
PrivacyServer
)
.
MakeTxPublic2Privacy
(
ctx
,
req
.
(
*
ReqPub2Pri
))
}
return
interceptor
(
ctx
,
in
,
info
,
handler
)
}
func
_Privacy_MakeTxPrivacy2Privacy_Handler
(
srv
interface
{},
ctx
context
.
Context
,
dec
func
(
interface
{})
error
,
interceptor
grpc
.
UnaryServerInterceptor
)
(
interface
{},
error
)
{
in
:=
new
(
ReqPri2Pri
)
if
err
:=
dec
(
in
);
err
!=
nil
{
return
nil
,
err
}
if
interceptor
==
nil
{
return
srv
.
(
PrivacyServer
)
.
MakeTxPrivacy2Privacy
(
ctx
,
in
)
}
info
:=
&
grpc
.
UnaryServerInfo
{
Server
:
srv
,
FullMethod
:
"/types.privacy/MakeTxPrivacy2Privacy"
,
}
handler
:=
func
(
ctx
context
.
Context
,
req
interface
{})
(
interface
{},
error
)
{
return
srv
.
(
PrivacyServer
)
.
MakeTxPrivacy2Privacy
(
ctx
,
req
.
(
*
ReqPri2Pri
))
}
return
interceptor
(
ctx
,
in
,
info
,
handler
)
}
func
_Privacy_MakeTxPrivacy2Public_Handler
(
srv
interface
{},
ctx
context
.
Context
,
dec
func
(
interface
{})
error
,
interceptor
grpc
.
UnaryServerInterceptor
)
(
interface
{},
error
)
{
in
:=
new
(
ReqPri2Pub
)
if
err
:=
dec
(
in
);
err
!=
nil
{
return
nil
,
err
}
if
interceptor
==
nil
{
return
srv
.
(
PrivacyServer
)
.
MakeTxPrivacy2Public
(
ctx
,
in
)
}
info
:=
&
grpc
.
UnaryServerInfo
{
Server
:
srv
,
FullMethod
:
"/types.privacy/MakeTxPrivacy2Public"
,
}
handler
:=
func
(
ctx
context
.
Context
,
req
interface
{})
(
interface
{},
error
)
{
return
srv
.
(
PrivacyServer
)
.
MakeTxPrivacy2Public
(
ctx
,
req
.
(
*
ReqPri2Pub
))
}
return
interceptor
(
ctx
,
in
,
info
,
handler
)
}
func
_Privacy_RescanUtxos_Handler
(
srv
interface
{},
ctx
context
.
Context
,
dec
func
(
interface
{})
error
,
interceptor
grpc
.
UnaryServerInterceptor
)
(
interface
{},
error
)
{
func
_Privacy_RescanUtxos_Handler
(
srv
interface
{},
ctx
context
.
Context
,
dec
func
(
interface
{})
error
,
interceptor
grpc
.
UnaryServerInterceptor
)
(
interface
{},
error
)
{
in
:=
new
(
ReqRescanUtxos
)
in
:=
new
(
ReqRescanUtxos
)
if
err
:=
dec
(
in
);
err
!=
nil
{
if
err
:=
dec
(
in
);
err
!=
nil
{
...
@@ -4446,18 +4077,6 @@ var _Privacy_serviceDesc = grpc.ServiceDesc{
...
@@ -4446,18 +4077,6 @@ var _Privacy_serviceDesc = grpc.ServiceDesc{
Handler
:
_Privacy_CreateUTXOs_Handler
,
Handler
:
_Privacy_CreateUTXOs_Handler
,
},
},
{
{
MethodName
:
"MakeTxPublic2Privacy"
,
Handler
:
_Privacy_MakeTxPublic2Privacy_Handler
,
},
{
MethodName
:
"MakeTxPrivacy2Privacy"
,
Handler
:
_Privacy_MakeTxPrivacy2Privacy_Handler
,
},
{
MethodName
:
"MakeTxPrivacy2Public"
,
Handler
:
_Privacy_MakeTxPrivacy2Public_Handler
,
},
{
MethodName
:
"RescanUtxos"
,
MethodName
:
"RescanUtxos"
,
Handler
:
_Privacy_RescanUtxos_Handler
,
Handler
:
_Privacy_RescanUtxos_Handler
,
},
},
...
...
plugin/dapp/privacy/wallet/exec.go
View file @
8c429796
...
@@ -29,36 +29,6 @@ func (policy *privacyPolicy) On_ShowPrivacyKey(req *types.ReqString) (types.Mess
...
@@ -29,36 +29,6 @@ func (policy *privacyPolicy) On_ShowPrivacyKey(req *types.ReqString) (types.Mess
return
reply
,
err
return
reply
,
err
}
}
func
(
policy
*
privacyPolicy
)
On_Public2Privacy
(
req
*
privacytypes
.
ReqPub2Pri
)
(
types
.
Message
,
error
)
{
policy
.
getWalletOperate
()
.
GetMutex
()
.
Lock
()
defer
policy
.
getWalletOperate
()
.
GetMutex
()
.
Unlock
()
reply
,
err
:=
policy
.
sendPublic2PrivacyTransaction
(
req
)
if
err
!=
nil
{
bizlog
.
Error
(
"sendPublic2PrivacyTransaction"
,
"err"
,
err
.
Error
())
}
return
reply
,
err
}
func
(
policy
*
privacyPolicy
)
On_Privacy2Privacy
(
req
*
privacytypes
.
ReqPri2Pri
)
(
types
.
Message
,
error
)
{
policy
.
getWalletOperate
()
.
GetMutex
()
.
Lock
()
defer
policy
.
getWalletOperate
()
.
GetMutex
()
.
Unlock
()
reply
,
err
:=
policy
.
sendPrivacy2PrivacyTransaction
(
req
)
if
err
!=
nil
{
bizlog
.
Error
(
"sendPrivacy2PrivacyTransaction"
,
"err"
,
err
.
Error
())
}
return
reply
,
err
}
func
(
policy
*
privacyPolicy
)
On_Privacy2Public
(
req
*
privacytypes
.
ReqPri2Pub
)
(
types
.
Message
,
error
)
{
policy
.
getWalletOperate
()
.
GetMutex
()
.
Lock
()
defer
policy
.
getWalletOperate
()
.
GetMutex
()
.
Unlock
()
reply
,
err
:=
policy
.
sendPrivacy2PublicTransaction
(
req
)
if
err
!=
nil
{
bizlog
.
Error
(
"sendPrivacy2PublicTransaction"
,
"err"
,
err
.
Error
())
}
return
reply
,
err
}
func
(
policy
*
privacyPolicy
)
On_CreateUTXOs
(
req
*
privacytypes
.
ReqCreateUTXOs
)
(
types
.
Message
,
error
)
{
func
(
policy
*
privacyPolicy
)
On_CreateUTXOs
(
req
*
privacytypes
.
ReqCreateUTXOs
)
(
types
.
Message
,
error
)
{
policy
.
getWalletOperate
()
.
GetMutex
()
.
Lock
()
policy
.
getWalletOperate
()
.
GetMutex
()
.
Lock
()
defer
policy
.
getWalletOperate
()
.
GetMutex
()
.
Unlock
()
defer
policy
.
getWalletOperate
()
.
GetMutex
()
.
Unlock
()
...
...
plugin/dapp/privacy/wallet/privacy.go
View file @
8c429796
...
@@ -171,7 +171,7 @@ func (policy *privacyPolicy) createUTXOsByPub2Priv(priv crypto.PrivKey, reqCreat
...
@@ -171,7 +171,7 @@ func (policy *privacyPolicy) createUTXOsByPub2Priv(priv crypto.PrivKey, reqCreat
}
}
tx
:=
&
types
.
Transaction
{
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
"privacy"
),
Execer
:
[]
byte
(
types
.
ExecName
(
privacytypes
.
PrivacyX
)
),
Payload
:
types
.
Encode
(
action
),
Payload
:
types
.
Encode
(
action
),
Nonce
:
operater
.
Nonce
(),
Nonce
:
operater
.
Nonce
(),
To
:
address
.
ExecAddress
(
privacytypes
.
PrivacyX
),
To
:
address
.
ExecAddress
(
privacytypes
.
PrivacyX
),
...
@@ -601,10 +601,10 @@ func (policy *privacyPolicy) createPublic2PrivacyTx(req *types.ReqCreateTransact
...
@@ -601,10 +601,10 @@ func (policy *privacyPolicy) createPublic2PrivacyTx(req *types.ReqCreateTransact
Value
:
&
privacytypes
.
PrivacyAction_Public2Privacy
{
Public2Privacy
:
value
},
Value
:
&
privacytypes
.
PrivacyAction_Public2Privacy
{
Public2Privacy
:
value
},
}
}
tx
:=
&
types
.
Transaction
{
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
privacytypes
.
PrivacyX
),
Execer
:
[]
byte
(
types
.
ExecName
(
privacytypes
.
PrivacyX
)
),
Payload
:
types
.
Encode
(
action
),
Payload
:
types
.
Encode
(
action
),
Nonce
:
policy
.
getWalletOperate
()
.
Nonce
(),
Nonce
:
policy
.
getWalletOperate
()
.
Nonce
(),
To
:
address
.
ExecAddress
(
privacytypes
.
PrivacyX
),
To
:
address
.
ExecAddress
(
types
.
ExecName
(
privacytypes
.
PrivacyX
)
),
}
}
tx
.
Signature
=
&
types
.
Signature
{
tx
.
Signature
=
&
types
.
Signature
{
Signature
:
types
.
Encode
(
&
privacytypes
.
PrivacySignatureParam
{
Signature
:
types
.
Encode
(
&
privacytypes
.
PrivacySignatureParam
{
...
@@ -619,10 +619,16 @@ func (policy *privacyPolicy) createPublic2PrivacyTx(req *types.ReqCreateTransact
...
@@ -619,10 +619,16 @@ func (policy *privacyPolicy) createPublic2PrivacyTx(req *types.ReqCreateTransact
}
}
func
(
policy
*
privacyPolicy
)
createPrivacy2PrivacyTx
(
req
*
types
.
ReqCreateTransaction
)
(
*
types
.
Transaction
,
error
)
{
func
(
policy
*
privacyPolicy
)
createPrivacy2PrivacyTx
(
req
*
types
.
ReqCreateTransaction
)
(
*
types
.
Transaction
,
error
)
{
//需要燃烧的utxo
utxoBurnedAmount
:=
privacytypes
.
PrivacyTxFee
if
types
.
IsPara
()
{
utxoBurnedAmount
=
0
}
buildInfo
:=
&
buildInputInfo
{
buildInfo
:=
&
buildInputInfo
{
tokenname
:
req
.
GetTokenname
(),
tokenname
:
req
.
GetTokenname
(),
sender
:
req
.
GetFrom
(),
sender
:
req
.
GetFrom
(),
amount
:
req
.
GetAmount
()
+
privacytypes
.
PrivacyTxFee
,
amount
:
req
.
GetAmount
()
+
utxoBurnedAmount
,
mixcount
:
req
.
GetMixcount
(),
mixcount
:
req
.
GetMixcount
(),
}
}
privacyInfo
,
err
:=
policy
.
getPrivacykeyPair
(
req
.
GetFrom
())
privacyInfo
,
err
:=
policy
.
getPrivacykeyPair
(
req
.
GetFrom
())
...
@@ -653,7 +659,7 @@ func (policy *privacyPolicy) createPrivacy2PrivacyTx(req *types.ReqCreateTransac
...
@@ -653,7 +659,7 @@ func (policy *privacyPolicy) createPrivacy2PrivacyTx(req *types.ReqCreateTransac
selectedAmounTotal
+=
input
.
Amount
selectedAmounTotal
+=
input
.
Amount
}
}
//构造输出UTXO
//构造输出UTXO
privacyOutput
,
err
:=
generateOuts
(
viewPublic
,
spendPublic
,
viewPub4chgPtr
,
spendPub4chgPtr
,
req
.
GetAmount
(),
selectedAmounTotal
,
privacytypes
.
PrivacyTxFee
)
privacyOutput
,
err
:=
generateOuts
(
viewPublic
,
spendPublic
,
viewPub4chgPtr
,
spendPub4chgPtr
,
req
.
GetAmount
(),
selectedAmounTotal
,
utxoBurnedAmount
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
@@ -671,11 +677,11 @@ func (policy *privacyPolicy) createPrivacy2PrivacyTx(req *types.ReqCreateTransac
...
@@ -671,11 +677,11 @@ func (policy *privacyPolicy) createPrivacy2PrivacyTx(req *types.ReqCreateTransac
}
}
tx
:=
&
types
.
Transaction
{
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
privacytypes
.
PrivacyX
),
Execer
:
[]
byte
(
types
.
ExecName
(
privacytypes
.
PrivacyX
)
),
Payload
:
types
.
Encode
(
action
),
Payload
:
types
.
Encode
(
action
),
Fee
:
privacytypes
.
PrivacyTxFee
,
Fee
:
privacytypes
.
PrivacyTxFee
,
Nonce
:
policy
.
getWalletOperate
()
.
Nonce
(),
Nonce
:
policy
.
getWalletOperate
()
.
Nonce
(),
To
:
address
.
ExecAddress
(
privacytypes
.
PrivacyX
),
To
:
address
.
ExecAddress
(
types
.
ExecName
(
privacytypes
.
PrivacyX
)
),
}
}
// 创建交易成功,将已经使用掉的UTXO冻结
// 创建交易成功,将已经使用掉的UTXO冻结
policy
.
saveFTXOInfo
(
tx
,
req
.
GetTokenname
(),
req
.
GetFrom
(),
hex
.
EncodeToString
(
tx
.
Hash
()),
selectedUtxo
)
policy
.
saveFTXOInfo
(
tx
,
req
.
GetTokenname
(),
req
.
GetFrom
(),
hex
.
EncodeToString
(
tx
.
Hash
()),
selectedUtxo
)
...
@@ -690,10 +696,16 @@ func (policy *privacyPolicy) createPrivacy2PrivacyTx(req *types.ReqCreateTransac
...
@@ -690,10 +696,16 @@ func (policy *privacyPolicy) createPrivacy2PrivacyTx(req *types.ReqCreateTransac
}
}
func
(
policy
*
privacyPolicy
)
createPrivacy2PublicTx
(
req
*
types
.
ReqCreateTransaction
)
(
*
types
.
Transaction
,
error
)
{
func
(
policy
*
privacyPolicy
)
createPrivacy2PublicTx
(
req
*
types
.
ReqCreateTransaction
)
(
*
types
.
Transaction
,
error
)
{
//需要燃烧的utxo
utxoBurnedAmount
:=
privacytypes
.
PrivacyTxFee
if
types
.
IsPara
()
{
utxoBurnedAmount
=
0
}
buildInfo
:=
&
buildInputInfo
{
buildInfo
:=
&
buildInputInfo
{
tokenname
:
req
.
GetTokenname
(),
tokenname
:
req
.
GetTokenname
(),
sender
:
req
.
GetFrom
(),
sender
:
req
.
GetFrom
(),
amount
:
req
.
GetAmount
()
+
privacytypes
.
PrivacyTxFee
,
amount
:
req
.
GetAmount
()
+
utxoBurnedAmount
,
mixcount
:
req
.
GetMixcount
(),
mixcount
:
req
.
GetMixcount
(),
}
}
privacyInfo
,
err
:=
policy
.
getPrivacykeyPair
(
req
.
GetFrom
())
privacyInfo
,
err
:=
policy
.
getPrivacykeyPair
(
req
.
GetFrom
())
...
@@ -722,7 +734,7 @@ func (policy *privacyPolicy) createPrivacy2PublicTx(req *types.ReqCreateTransact
...
@@ -722,7 +734,7 @@ func (policy *privacyPolicy) createPrivacy2PublicTx(req *types.ReqCreateTransact
changeAmount
:=
selectedAmounTotal
-
req
.
GetAmount
()
changeAmount
:=
selectedAmounTotal
-
req
.
GetAmount
()
//step 2,generateOuts
//step 2,generateOuts
//构造输出UTXO,只生成找零的UTXO
//构造输出UTXO,只生成找零的UTXO
privacyOutput
,
err
:=
generateOuts
(
nil
,
nil
,
viewPub4chgPtr
,
spendPub4chgPtr
,
0
,
changeAmount
,
privacytypes
.
PrivacyTxFee
)
privacyOutput
,
err
:=
generateOuts
(
nil
,
nil
,
viewPub4chgPtr
,
spendPub4chgPtr
,
0
,
changeAmount
,
utxoBurnedAmount
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
@@ -733,6 +745,7 @@ func (policy *privacyPolicy) createPrivacy2PublicTx(req *types.ReqCreateTransact
...
@@ -733,6 +745,7 @@ func (policy *privacyPolicy) createPrivacy2PublicTx(req *types.ReqCreateTransact
Note
:
req
.
GetNote
(),
Note
:
req
.
GetNote
(),
Input
:
privacyInput
,
Input
:
privacyInput
,
Output
:
privacyOutput
,
Output
:
privacyOutput
,
To
:
req
.
GetTo
(),
}
}
action
:=
&
privacytypes
.
PrivacyAction
{
action
:=
&
privacytypes
.
PrivacyAction
{
Ty
:
privacytypes
.
ActionPrivacy2Public
,
Ty
:
privacytypes
.
ActionPrivacy2Public
,
...
@@ -740,11 +753,11 @@ func (policy *privacyPolicy) createPrivacy2PublicTx(req *types.ReqCreateTransact
...
@@ -740,11 +753,11 @@ func (policy *privacyPolicy) createPrivacy2PublicTx(req *types.ReqCreateTransact
}
}
tx
:=
&
types
.
Transaction
{
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
privacytypes
.
PrivacyX
),
Execer
:
[]
byte
(
types
.
ExecName
(
privacytypes
.
PrivacyX
)
),
Payload
:
types
.
Encode
(
action
),
Payload
:
types
.
Encode
(
action
),
Fee
:
privacytypes
.
PrivacyTxFee
,
Fee
:
privacytypes
.
PrivacyTxFee
,
Nonce
:
policy
.
getWalletOperate
()
.
Nonce
(),
Nonce
:
policy
.
getWalletOperate
()
.
Nonce
(),
To
:
req
.
GetTo
(
),
To
:
address
.
ExecAddress
(
types
.
ExecName
(
privacytypes
.
PrivacyX
)
),
}
}
// 创建交易成功,将已经使用掉的UTXO冻结
// 创建交易成功,将已经使用掉的UTXO冻结
policy
.
saveFTXOInfo
(
tx
,
req
.
GetTokenname
(),
req
.
GetFrom
(),
hex
.
EncodeToString
(
tx
.
Hash
()),
selectedUtxo
)
policy
.
saveFTXOInfo
(
tx
,
req
.
GetTokenname
(),
req
.
GetFrom
(),
hex
.
EncodeToString
(
tx
.
Hash
()),
selectedUtxo
)
...
@@ -959,188 +972,6 @@ func (policy *privacyPolicy) showPrivacyAccountsSpend(req *privacytypes.ReqPrivB
...
@@ -959,188 +972,6 @@ func (policy *privacyPolicy) showPrivacyAccountsSpend(req *privacytypes.ReqPrivB
return
utxoHaveTxHashs
,
nil
return
utxoHaveTxHashs
,
nil
}
}
func
(
policy
*
privacyPolicy
)
sendPublic2PrivacyTransaction
(
public2private
*
privacytypes
.
ReqPub2Pri
)
(
*
types
.
Reply
,
error
)
{
if
ok
,
err
:=
policy
.
getWalletOperate
()
.
CheckWalletStatus
();
!
ok
{
bizlog
.
Error
(
"sendPublic2PrivacyTransaction"
,
"CheckWalletStatus error"
,
err
)
return
nil
,
err
}
if
ok
,
err
:=
policy
.
isRescanUtxosFlagScaning
();
ok
{
bizlog
.
Error
(
"sendPublic2PrivacyTransaction"
,
"isRescanUtxosFlagScaning error"
,
err
)
return
nil
,
err
}
if
public2private
==
nil
{
bizlog
.
Error
(
"sendPublic2PrivacyTransaction public2private is nil"
)
return
nil
,
types
.
ErrInvalidParam
}
if
len
(
public2private
.
GetTokenname
())
<=
0
{
bizlog
.
Error
(
"sendPublic2PrivacyTransaction tokenname is nil"
)
return
nil
,
types
.
ErrInvalidParam
}
if
!
checkAmountValid
(
public2private
.
GetAmount
())
{
bizlog
.
Error
(
"sendPublic2PrivacyTransaction"
,
"invalid amount"
,
public2private
.
GetAmount
())
return
nil
,
types
.
ErrAmount
}
priv
,
err
:=
policy
.
getPrivKeyByAddr
(
public2private
.
GetSender
())
if
err
!=
nil
{
bizlog
.
Error
(
"sendPublic2PrivacyTransaction"
,
"getPrivKeyByAddr error"
,
err
)
return
nil
,
err
}
return
policy
.
transPub2PriV2
(
priv
,
public2private
)
}
//公开向隐私账户转账
func
(
policy
*
privacyPolicy
)
transPub2PriV2
(
priv
crypto
.
PrivKey
,
reqPub2Pri
*
privacytypes
.
ReqPub2Pri
)
(
*
types
.
Reply
,
error
)
{
viewPubSlice
,
spendPubSlice
,
err
:=
parseViewSpendPubKeyPair
(
reqPub2Pri
.
Pubkeypair
)
if
err
!=
nil
{
bizlog
.
Error
(
"transPub2Pri"
,
"parseViewSpendPubKeyPair error"
,
err
)
return
nil
,
err
}
viewPublic
:=
(
*
[
32
]
byte
)(
unsafe
.
Pointer
(
&
viewPubSlice
[
0
]))
spendPublic
:=
(
*
[
32
]
byte
)(
unsafe
.
Pointer
(
&
spendPubSlice
[
0
]))
//因为此时是pub2priv的交易,此时不需要构造找零的输出,同时设置fee为0,也是为了简化计算
privacyOutput
,
err
:=
generateOuts
(
viewPublic
,
spendPublic
,
nil
,
nil
,
reqPub2Pri
.
Amount
,
reqPub2Pri
.
Amount
,
0
)
if
err
!=
nil
{
bizlog
.
Error
(
"transPub2Pri"
,
"generateOuts error"
,
err
)
return
nil
,
err
}
operater
:=
policy
.
getWalletOperate
()
value
:=
&
privacytypes
.
Public2Privacy
{
Tokenname
:
reqPub2Pri
.
Tokenname
,
Amount
:
reqPub2Pri
.
Amount
,
Note
:
reqPub2Pri
.
Note
,
Output
:
privacyOutput
,
}
action
:=
&
privacytypes
.
PrivacyAction
{
Ty
:
privacytypes
.
ActionPublic2Privacy
,
Value
:
&
privacytypes
.
PrivacyAction_Public2Privacy
{
Public2Privacy
:
value
},
}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
"privacy"
),
Payload
:
types
.
Encode
(
action
),
Nonce
:
operater
.
Nonce
(),
// TODO: 采用隐私合约地址来设定目标合约接收的目标地址,让验证通过
To
:
address
.
ExecAddress
(
privacytypes
.
PrivacyX
),
}
tx
.
SetExpire
(
time
.
Duration
(
reqPub2Pri
.
GetExpire
()))
txSize
:=
types
.
Size
(
tx
)
+
types
.
SignatureSize
realFee
:=
int64
((
txSize
+
1023
)
>>
types
.
Size1Kshiftlen
)
*
types
.
GInt
(
"MinFee"
)
tx
.
Fee
=
realFee
tx
.
Sign
(
int32
(
operater
.
GetSignType
()),
priv
)
reply
,
err
:=
operater
.
GetAPI
()
.
SendTx
(
tx
)
if
err
!=
nil
{
bizlog
.
Error
(
"transPub2PriV2"
,
"Send err"
,
err
)
return
nil
,
err
}
return
reply
,
err
}
func
(
policy
*
privacyPolicy
)
sendPrivacy2PrivacyTransaction
(
privacy2privacy
*
privacytypes
.
ReqPri2Pri
)
(
*
types
.
Reply
,
error
)
{
if
ok
,
err
:=
policy
.
getWalletOperate
()
.
CheckWalletStatus
();
!
ok
{
bizlog
.
Error
(
"sendPrivacy2PrivacyTransaction"
,
"CheckWalletStatus error"
,
err
)
return
nil
,
err
}
if
ok
,
err
:=
policy
.
isRescanUtxosFlagScaning
();
ok
{
bizlog
.
Error
(
"sendPrivacy2PrivacyTransaction"
,
"isRescanUtxosFlagScaning error"
,
err
)
return
nil
,
err
}
if
privacy2privacy
==
nil
{
bizlog
.
Error
(
"sendPrivacy2PrivacyTransaction input para is nil"
)
return
nil
,
types
.
ErrInvalidParam
}
if
!
checkAmountValid
(
privacy2privacy
.
GetAmount
())
{
bizlog
.
Error
(
"sendPrivacy2PrivacyTransaction"
,
"invalid amount "
,
privacy2privacy
.
GetAmount
())
return
nil
,
types
.
ErrAmount
}
privacyInfo
,
err
:=
policy
.
getPrivacykeyPair
(
privacy2privacy
.
GetSender
())
if
err
!=
nil
{
bizlog
.
Error
(
"sendPrivacy2PrivacyTransaction"
,
"getPrivacykeyPair error "
,
err
)
return
nil
,
err
}
return
policy
.
transPri2PriV2
(
privacyInfo
,
privacy2privacy
)
}
func
(
policy
*
privacyPolicy
)
transPri2PriV2
(
privacykeyParirs
*
privacy
.
Privacy
,
reqPri2Pri
*
privacytypes
.
ReqPri2Pri
)
(
*
types
.
Reply
,
error
)
{
buildInfo
:=
&
buildInputInfo
{
tokenname
:
reqPri2Pri
.
Tokenname
,
sender
:
reqPri2Pri
.
Sender
,
amount
:
reqPri2Pri
.
Amount
+
privacytypes
.
PrivacyTxFee
,
mixcount
:
reqPri2Pri
.
Mixin
,
}
//step 1,buildInput
privacyInput
,
utxosInKeyInput
,
realkeyInputSlice
,
selectedUtxo
,
err
:=
policy
.
buildInput
(
privacykeyParirs
,
buildInfo
)
if
err
!=
nil
{
bizlog
.
Error
(
"transPri2PriV2"
,
"buildInput error"
,
err
)
return
nil
,
err
}
//step 2,generateOuts
viewPublicSlice
,
spendPublicSlice
,
err
:=
parseViewSpendPubKeyPair
(
reqPri2Pri
.
Pubkeypair
)
if
err
!=
nil
{
bizlog
.
Error
(
"transPub2Pri"
,
"parseViewSpendPubKeyPair "
,
err
)
return
nil
,
err
}
viewPub4change
,
spendPub4change
:=
privacykeyParirs
.
ViewPubkey
.
Bytes
(),
privacykeyParirs
.
SpendPubkey
.
Bytes
()
viewPublic
:=
(
*
[
32
]
byte
)(
unsafe
.
Pointer
(
&
viewPublicSlice
[
0
]))
spendPublic
:=
(
*
[
32
]
byte
)(
unsafe
.
Pointer
(
&
spendPublicSlice
[
0
]))
viewPub4chgPtr
:=
(
*
[
32
]
byte
)(
unsafe
.
Pointer
(
&
viewPub4change
[
0
]))
spendPub4chgPtr
:=
(
*
[
32
]
byte
)(
unsafe
.
Pointer
(
&
spendPub4change
[
0
]))
selectedAmounTotal
:=
int64
(
0
)
for
_
,
input
:=
range
privacyInput
.
Keyinput
{
selectedAmounTotal
+=
input
.
Amount
}
//构造输出UTXO
privacyOutput
,
err
:=
generateOuts
(
viewPublic
,
spendPublic
,
viewPub4chgPtr
,
spendPub4chgPtr
,
reqPri2Pri
.
Amount
,
selectedAmounTotal
,
privacytypes
.
PrivacyTxFee
)
if
err
!=
nil
{
bizlog
.
Error
(
"transPub2Pri"
,
"generateOuts "
,
err
)
return
nil
,
err
}
operater
:=
policy
.
getWalletOperate
()
value
:=
&
privacytypes
.
Privacy2Privacy
{
Tokenname
:
reqPri2Pri
.
Tokenname
,
Amount
:
reqPri2Pri
.
Amount
,
Note
:
reqPri2Pri
.
Note
,
Input
:
privacyInput
,
Output
:
privacyOutput
,
}
action
:=
&
privacytypes
.
PrivacyAction
{
Ty
:
privacytypes
.
ActionPrivacy2Privacy
,
Value
:
&
privacytypes
.
PrivacyAction_Privacy2Privacy
{
Privacy2Privacy
:
value
},
}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
privacytypes
.
PrivacyX
),
Payload
:
types
.
Encode
(
action
),
Fee
:
privacytypes
.
PrivacyTxFee
,
Nonce
:
operater
.
Nonce
(),
// TODO: 采用隐私合约地址来设定目标合约接收的目标地址,让验证通过
To
:
address
.
ExecAddress
(
privacytypes
.
PrivacyX
),
}
tx
.
SetExpire
(
time
.
Duration
(
reqPri2Pri
.
GetExpire
()))
//完成了input和output的添加之后,即已经完成了交易基本内容的添加,
//这时候就需要进行交易的签名了
err
=
policy
.
signatureTx
(
tx
,
privacyInput
,
utxosInKeyInput
,
realkeyInputSlice
)
if
err
!=
nil
{
return
nil
,
err
}
reply
,
err
:=
operater
.
GetAPI
()
.
SendTx
(
tx
)
if
err
!=
nil
{
bizlog
.
Error
(
"transPub2Pri"
,
"SendTx "
,
err
)
return
nil
,
err
}
policy
.
saveFTXOInfo
(
tx
,
reqPri2Pri
.
Tokenname
,
reqPri2Pri
.
Sender
,
hex
.
EncodeToString
(
tx
.
Hash
()),
selectedUtxo
)
return
reply
,
nil
}
func
(
policy
*
privacyPolicy
)
signatureTx
(
tx
*
types
.
Transaction
,
privacyInput
*
privacytypes
.
PrivacyInput
,
utxosInKeyInput
[]
*
privacytypes
.
UTXOBasics
,
realkeyInputSlice
[]
*
privacytypes
.
RealKeyInput
)
(
err
error
)
{
func
(
policy
*
privacyPolicy
)
signatureTx
(
tx
*
types
.
Transaction
,
privacyInput
*
privacytypes
.
PrivacyInput
,
utxosInKeyInput
[]
*
privacytypes
.
UTXOBasics
,
realkeyInputSlice
[]
*
privacytypes
.
RealKeyInput
)
(
err
error
)
{
tx
.
Signature
=
nil
tx
.
Signature
=
nil
data
:=
types
.
Encode
(
tx
)
data
:=
types
.
Encode
(
tx
)
...
@@ -1165,110 +996,11 @@ func (policy *privacyPolicy) signatureTx(tx *types.Transaction, privacyInput *pr
...
@@ -1165,110 +996,11 @@ func (policy *privacyPolicy) signatureTx(tx *types.Transaction, privacyInput *pr
Ty
:
privacytypes
.
RingBaseonED25519
,
Ty
:
privacytypes
.
RingBaseonED25519
,
Signature
:
ringSignData
,
Signature
:
ringSignData
,
// 这里填的是隐私合约的公钥,让框架保持一致
// 这里填的是隐私合约的公钥,让框架保持一致
Pubkey
:
address
.
ExecPubKey
(
privacytypes
.
PrivacyX
),
Pubkey
:
address
.
ExecPubKey
(
types
.
ExecName
(
privacytypes
.
PrivacyX
)
),
}
}
return
nil
return
nil
}
}
func
(
policy
*
privacyPolicy
)
sendPrivacy2PublicTransaction
(
privacy2Pub
*
privacytypes
.
ReqPri2Pub
)
(
*
types
.
Reply
,
error
)
{
if
ok
,
err
:=
policy
.
getWalletOperate
()
.
CheckWalletStatus
();
!
ok
{
bizlog
.
Error
(
"sendPrivacy2PublicTransaction"
,
"CheckWalletStatus error"
,
err
)
return
nil
,
err
}
if
ok
,
err
:=
policy
.
isRescanUtxosFlagScaning
();
ok
{
bizlog
.
Error
(
"sendPrivacy2PublicTransaction"
,
"isRescanUtxosFlagScaning error"
,
err
)
return
nil
,
err
}
if
privacy2Pub
==
nil
{
bizlog
.
Error
(
"privacy2privacy input para is nil"
)
return
nil
,
types
.
ErrInvalidParam
}
if
!
checkAmountValid
(
privacy2Pub
.
GetAmount
())
{
return
nil
,
types
.
ErrAmount
}
//get 'a'
privacyInfo
,
err
:=
policy
.
getPrivacykeyPair
(
privacy2Pub
.
GetSender
())
if
err
!=
nil
{
bizlog
.
Error
(
"sendPrivacy2PublicTransaction"
,
"getPrivacykeyPair error"
,
err
)
return
nil
,
err
}
return
policy
.
transPri2PubV2
(
privacyInfo
,
privacy2Pub
)
}
func
(
policy
*
privacyPolicy
)
transPri2PubV2
(
privacykeyParirs
*
privacy
.
Privacy
,
reqPri2Pub
*
privacytypes
.
ReqPri2Pub
)
(
*
types
.
Reply
,
error
)
{
buildInfo
:=
&
buildInputInfo
{
tokenname
:
reqPri2Pub
.
Tokenname
,
sender
:
reqPri2Pub
.
Sender
,
amount
:
reqPri2Pub
.
Amount
+
privacytypes
.
PrivacyTxFee
,
mixcount
:
reqPri2Pub
.
Mixin
,
}
//step 1,buildInput
privacyInput
,
utxosInKeyInput
,
realkeyInputSlice
,
selectedUtxo
,
err
:=
policy
.
buildInput
(
privacykeyParirs
,
buildInfo
)
if
err
!=
nil
{
bizlog
.
Error
(
"transPri2PubV2"
,
"buildInput error"
,
err
)
return
nil
,
err
}
viewPub4change
,
spendPub4change
:=
privacykeyParirs
.
ViewPubkey
.
Bytes
(),
privacykeyParirs
.
SpendPubkey
.
Bytes
()
viewPub4chgPtr
:=
(
*
[
32
]
byte
)(
unsafe
.
Pointer
(
&
viewPub4change
[
0
]))
spendPub4chgPtr
:=
(
*
[
32
]
byte
)(
unsafe
.
Pointer
(
&
spendPub4change
[
0
]))
selectedAmounTotal
:=
int64
(
0
)
for
_
,
input
:=
range
privacyInput
.
Keyinput
{
if
input
.
Amount
<=
0
{
return
nil
,
types
.
ErrAmount
}
selectedAmounTotal
+=
input
.
Amount
}
changeAmount
:=
selectedAmounTotal
-
reqPri2Pub
.
Amount
//step 2,generateOuts
//构造输出UTXO,只生成找零的UTXO
privacyOutput
,
err
:=
generateOuts
(
nil
,
nil
,
viewPub4chgPtr
,
spendPub4chgPtr
,
0
,
changeAmount
,
privacytypes
.
PrivacyTxFee
)
if
err
!=
nil
{
bizlog
.
Error
(
"transPri2PubV2"
,
"generateOuts error"
,
err
)
return
nil
,
err
}
operater
:=
policy
.
getWalletOperate
()
value
:=
&
privacytypes
.
Privacy2Public
{
Tokenname
:
reqPri2Pub
.
Tokenname
,
Amount
:
reqPri2Pub
.
Amount
,
Note
:
reqPri2Pub
.
Note
,
Input
:
privacyInput
,
Output
:
privacyOutput
,
}
action
:=
&
privacytypes
.
PrivacyAction
{
Ty
:
privacytypes
.
ActionPrivacy2Public
,
Value
:
&
privacytypes
.
PrivacyAction_Privacy2Public
{
Privacy2Public
:
value
},
}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
privacytypes
.
PrivacyX
),
Payload
:
types
.
Encode
(
action
),
Fee
:
privacytypes
.
PrivacyTxFee
,
Nonce
:
operater
.
Nonce
(),
To
:
reqPri2Pub
.
Receiver
,
}
tx
.
SetExpire
(
time
.
Duration
(
reqPri2Pub
.
GetExpire
()))
//step 3,generate ring signature
err
=
policy
.
signatureTx
(
tx
,
privacyInput
,
utxosInKeyInput
,
realkeyInputSlice
)
if
err
!=
nil
{
bizlog
.
Error
(
"transPri2PubV2"
,
"signatureTx error"
,
err
)
return
nil
,
err
}
reply
,
err
:=
operater
.
GetAPI
()
.
SendTx
(
tx
)
if
err
!=
nil
{
bizlog
.
Error
(
"transPri2PubV2"
,
"SendTx error"
,
err
)
return
nil
,
err
}
txhashstr
:=
hex
.
EncodeToString
(
tx
.
Hash
())
policy
.
saveFTXOInfo
(
tx
,
reqPri2Pub
.
Tokenname
,
reqPri2Pub
.
Sender
,
txhashstr
,
selectedUtxo
)
bizlog
.
Info
(
"transPri2PubV2"
,
"txhash"
,
txhashstr
)
return
reply
,
nil
}
func
(
policy
*
privacyPolicy
)
buildAndStoreWalletTxDetail
(
param
*
buildStoreWalletTxDetailParam
)
{
func
(
policy
*
privacyPolicy
)
buildAndStoreWalletTxDetail
(
param
*
buildStoreWalletTxDetailParam
)
{
blockheight
:=
param
.
block
.
Block
.
Height
*
maxTxNumPerBlock
+
int64
(
param
.
index
)
blockheight
:=
param
.
block
.
Block
.
Height
*
maxTxNumPerBlock
+
int64
(
param
.
index
)
heightstr
:=
fmt
.
Sprintf
(
"%018d"
,
blockheight
)
heightstr
:=
fmt
.
Sprintf
(
"%018d"
,
blockheight
)
...
...
plugin/dapp/privacy/wallet/privacybizpolicy_test.go
View file @
8c429796
...
@@ -360,117 +360,6 @@ func Test_CreateUTXOs(t *testing.T) {
...
@@ -360,117 +360,6 @@ func Test_CreateUTXOs(t *testing.T) {
}
}
}
}
func
Test_SendPublic2PrivacyTransaction
(
t
*
testing
.
T
)
{
mock
:=
&
testDataMock
{
mockMempool
:
true
}
mock
.
init
()
mock
.
enablePrivacy
()
testCases
:=
[]
struct
{
req
*
ty
.
ReqPub2Pri
needReply
*
types
.
Reply
needError
error
}{
{
needError
:
types
.
ErrInvalidParam
,
},
{
req
:
&
ty
.
ReqPub2Pri
{
Tokenname
:
types
.
BTY
,
Amount
:
10
*
types
.
Coin
,
Sender
:
testAddrs
[
0
],
Pubkeypair
:
testPubkeyPairs
[
0
],
},
needReply
:
&
types
.
Reply
{
IsOk
:
true
},
needError
:
types
.
ErrAddrNotExist
,
},
}
for
index
,
testCase
:=
range
testCases
{
_
,
getErr
:=
mock
.
wallet
.
GetAPI
()
.
ExecWalletFunc
(
ty
.
PrivacyX
,
"Public2Privacy"
,
testCase
.
req
)
require
.
Equalf
(
t
,
getErr
,
testCase
.
needError
,
"Publick2Privacy test case index %d"
,
index
)
}
}
func
Test_SendPrivacy2PrivacyTransaction
(
t
*
testing
.
T
)
{
mock
:=
&
testDataMock
{
mockMempool
:
true
,
mockBlockChain
:
true
,
}
mock
.
init
()
mock
.
enablePrivacy
()
// 创建辅助对象
privacyMock
:=
privacy
.
PrivacyMock
{}
privacyMock
.
Init
(
mock
.
wallet
,
mock
.
password
)
// 创建几条可用UTXO
privacyMock
.
CreateUTXOs
(
testAddrs
[
0
],
testPubkeyPairs
[
0
],
17
*
types
.
Coin
,
10000
,
5
)
mock
.
setBlockChainHeight
(
10020
)
testCases
:=
[]
struct
{
req
*
ty
.
ReqPri2Pri
needReply
*
types
.
Reply
needError
error
}{
{
needError
:
types
.
ErrInvalidParam
,
},
{
req
:
&
ty
.
ReqPri2Pri
{
Tokenname
:
types
.
BTY
,
Amount
:
10
*
types
.
Coin
,
Sender
:
testAddrs
[
0
],
Pubkeypair
:
testPubkeyPairs
[
1
],
},
needReply
:
&
types
.
Reply
{
IsOk
:
true
},
needError
:
types
.
ErrAddrNotExist
,
},
}
for
index
,
testCase
:=
range
testCases
{
_
,
getErr
:=
mock
.
wallet
.
GetAPI
()
.
ExecWalletFunc
(
ty
.
PrivacyX
,
"Privacy2Privacy"
,
testCase
.
req
)
require
.
Equalf
(
t
,
getErr
,
testCase
.
needError
,
"Privacy2Privacy test case index %d"
,
index
)
}
}
func
Test_SendPrivacy2PublicTransaction
(
t
*
testing
.
T
)
{
mock
:=
&
testDataMock
{
mockMempool
:
true
,
mockBlockChain
:
true
,
}
mock
.
init
()
mock
.
enablePrivacy
()
// 创建辅助对象
privacyMock
:=
privacy
.
PrivacyMock
{}
privacyMock
.
Init
(
mock
.
wallet
,
mock
.
password
)
// 创建几条可用UTXO
privacyMock
.
CreateUTXOs
(
testAddrs
[
0
],
testPubkeyPairs
[
0
],
17
*
types
.
Coin
,
10000
,
5
)
mock
.
setBlockChainHeight
(
10020
)
testCases
:=
[]
struct
{
req
*
ty
.
ReqPri2Pub
needReply
*
types
.
Reply
needError
error
}{
{
needError
:
types
.
ErrInvalidParam
,
},
{
req
:
&
ty
.
ReqPri2Pub
{
Tokenname
:
types
.
BTY
,
Amount
:
10
*
types
.
Coin
,
Sender
:
testAddrs
[
0
],
Receiver
:
testAddrs
[
0
],
},
needReply
:
&
types
.
Reply
{
IsOk
:
true
},
needError
:
types
.
ErrAddrNotExist
,
},
}
for
index
,
testCase
:=
range
testCases
{
_
,
getErr
:=
mock
.
wallet
.
GetAPI
()
.
ExecWalletFunc
(
ty
.
PrivacyX
,
"Privacy2Public"
,
testCase
.
req
)
require
.
Equalf
(
t
,
getErr
,
testCase
.
needError
,
"Privacy2Public test case index %d"
,
index
)
}
}
func
Test_CreateTransaction
(
t
*
testing
.
T
)
{
func
Test_CreateTransaction
(
t
*
testing
.
T
)
{
mock
:=
&
testDataMock
{
mock
:=
&
testDataMock
{
mockMempool
:
true
,
mockMempool
:
true
,
...
...
plugin/dapp/ticket/commands/ticket.go
View file @
8c429796
...
@@ -10,7 +10,6 @@ import (
...
@@ -10,7 +10,6 @@ import (
"fmt"
"fmt"
"os"
"os"
"github.com/33cn/chain33/common"
"github.com/33cn/chain33/rpc/jsonclient"
"github.com/33cn/chain33/rpc/jsonclient"
rpctypes
"github.com/33cn/chain33/rpc/types"
rpctypes
"github.com/33cn/chain33/rpc/types"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/types"
...
@@ -25,7 +24,6 @@ func TicketCmd() *cobra.Command {
...
@@ -25,7 +24,6 @@ func TicketCmd() *cobra.Command {
Short
:
"Ticket management"
,
Short
:
"Ticket management"
,
Args
:
cobra
.
MinimumNArgs
(
1
),
Args
:
cobra
.
MinimumNArgs
(
1
),
}
}
cmd
.
AddCommand
(
cmd
.
AddCommand
(
BindMinerCmd
(),
BindMinerCmd
(),
CountTicketCmd
(),
CountTicketCmd
(),
...
@@ -130,7 +128,7 @@ func closeTicket(cmd *cobra.Command, args []string) {
...
@@ -130,7 +128,7 @@ func closeTicket(cmd *cobra.Command, args []string) {
MinerAddress
:
bindAddr
,
MinerAddress
:
bindAddr
,
}
}
var
res
types
.
ReplyHashes
var
res
rpc
types
.
ReplyHashes
rpc
,
err
:=
jsonclient
.
NewJSONClient
(
rpcLaddr
)
rpc
,
err
:=
jsonclient
.
NewJSONClient
(
rpcLaddr
)
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Fprintln
(
os
.
Stderr
,
err
)
fmt
.
Fprintln
(
os
.
Stderr
,
err
)
...
@@ -146,12 +144,7 @@ func closeTicket(cmd *cobra.Command, args []string) {
...
@@ -146,12 +144,7 @@ func closeTicket(cmd *cobra.Command, args []string) {
return
return
}
}
var
tx
txHashes
data
,
err
:=
json
.
MarshalIndent
(
res
,
""
,
" "
)
for
_
,
hash
:=
range
res
.
Hashes
{
tx
.
Hashes
=
append
(
tx
.
Hashes
,
common
.
ToHex
(
hash
))
}
data
,
err
:=
json
.
MarshalIndent
(
tx
,
""
,
" "
)
if
err
!=
nil
{
if
err
!=
nil
{
fmt
.
Fprintln
(
os
.
Stderr
,
err
)
fmt
.
Fprintln
(
os
.
Stderr
,
err
)
return
return
...
...
plugin/dapp/ticket/commands/types.go
deleted
100644 → 0
View file @
57c2349e
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
commands
type
txHashes
struct
{
Hashes
[]
string
`json:"hashes"`
}
plugin/dapp/ticket/rpc/jrpc_channel_test.go
View file @
8c429796
...
@@ -46,13 +46,13 @@ func TestJRPCChannel(t *testing.T) {
...
@@ -46,13 +46,13 @@ func TestJRPCChannel(t *testing.T) {
}
}
func
testCountTicketCmd
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
func
testCountTicketCmd
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
var
res
types
.
ReplyHashes
var
res
int64
return
jrpc
.
Call
(
"ticket.
CloseTickets
"
,
nil
,
&
res
)
return
jrpc
.
Call
(
"ticket.
GetTicketCount
"
,
nil
,
&
res
)
}
}
func
testCloseTicketCmd
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
func
testCloseTicketCmd
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
var
res
int64
var
res
types
.
ReplyHashes
return
jrpc
.
Call
(
"ticket.
GetTicketCount
"
,
nil
,
&
res
)
return
jrpc
.
Call
(
"ticket.
CloseTickets
"
,
nil
,
&
res
)
}
}
func
testGetColdAddrByMinerCmd
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
func
testGetColdAddrByMinerCmd
(
t
*
testing
.
T
,
jrpc
*
jsonclient
.
JSONClient
)
error
{
...
...
plugin/dapp/ticket/rpc/rpc.go
View file @
8c429796
...
@@ -5,8 +5,6 @@
...
@@ -5,8 +5,6 @@
package
rpc
package
rpc
import
(
import
(
"encoding/hex"
"github.com/33cn/chain33/common"
"github.com/33cn/chain33/common"
"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/common/address"
rpctypes
"github.com/33cn/chain33/rpc/types"
rpctypes
"github.com/33cn/chain33/rpc/types"
...
@@ -115,7 +113,7 @@ func (c *Jrpc) CloseTickets(in *ty.TicketClose, result *interface{}) error {
...
@@ -115,7 +113,7 @@ func (c *Jrpc) CloseTickets(in *ty.TicketClose, result *interface{}) error {
}
}
var
hashes
rpctypes
.
ReplyHashes
var
hashes
rpctypes
.
ReplyHashes
for
_
,
has
:=
range
resp
.
Hashes
{
for
_
,
has
:=
range
resp
.
Hashes
{
hashes
.
Hashes
=
append
(
hashes
.
Hashes
,
hex
.
EncodeToString
(
has
))
hashes
.
Hashes
=
append
(
hashes
.
Hashes
,
common
.
ToHex
(
has
))
}
}
*
result
=
&
hashes
*
result
=
&
hashes
return
nil
return
nil
...
...
plugin/dapp/ticket/rpc/rpc_real_test.go
View file @
8c429796
...
@@ -8,9 +8,12 @@ package rpc_test
...
@@ -8,9 +8,12 @@ package rpc_test
import
(
import
(
"testing"
"testing"
rpctypes
"github.com/33cn/chain33/rpc/types"
_
"github.com/33cn/chain33/system"
_
"github.com/33cn/chain33/system"
"github.com/33cn/chain33/util/testnode"
"github.com/33cn/chain33/util/testnode"
_
"github.com/33cn/plugin/plugin"
_
"github.com/33cn/plugin/plugin"
ty
"github.com/33cn/plugin/plugin/dapp/ticket/types"
"github.com/stretchr/testify/assert"
)
)
func
TestNewTicket
(
t
*
testing
.
T
)
{
func
TestNewTicket
(
t
*
testing
.
T
)
{
...
@@ -19,4 +22,10 @@ func TestNewTicket(t *testing.T) {
...
@@ -19,4 +22,10 @@ func TestNewTicket(t *testing.T) {
mock33
:=
testnode
.
NewWithConfig
(
cfg
,
sub
,
nil
)
mock33
:=
testnode
.
NewWithConfig
(
cfg
,
sub
,
nil
)
defer
mock33
.
Close
()
defer
mock33
.
Close
()
mock33
.
WaitHeight
(
5
)
mock33
.
WaitHeight
(
5
)
mock33
.
Listen
()
//选票(可以用hotwallet 关闭选票)
in
:=
&
ty
.
TicketClose
{
MinerAddress
:
mock33
.
GetHotAddress
()}
var
res
rpctypes
.
ReplyHashes
err
:=
mock33
.
GetJSONC
()
.
Call
(
"ticket.CloseTickets"
,
in
,
&
res
)
assert
.
Nil
(
t
,
err
)
}
}
vendor/github.com/33cn/chain33/build/autotest/gitlabci/gitlab-ci-autotest.sh
View file @
8c429796
...
@@ -214,7 +214,7 @@ function auto_test() {
...
@@ -214,7 +214,7 @@ function auto_test() {
fi
fi
echo
"=========== #config token blacklist ============="
echo
"=========== #config token blacklist ============="
rawData
=
$(${
CLI
}
config config_tx
-
k
token-blacklist
-o
add
-v
BTC
)
rawData
=
$(${
CLI
}
config config_tx
-
c
token-blacklist
-o
add
-v
BTC
)
signData
=
$(${
CLI
}
wallet sign
-d
"
${
rawData
}
"
-k
0xc34b5d9d44ac7b754806f761d3d4d2c4fe5214f6b074c19f069c4f5c2a29c8cc
)
signData
=
$(${
CLI
}
wallet sign
-d
"
${
rawData
}
"
-k
0xc34b5d9d44ac7b754806f761d3d4d2c4fe5214f6b074c19f069c4f5c2a29c8cc
)
hash
=
$(${
CLI
}
wallet send
-d
"
${
signData
}
"
)
hash
=
$(${
CLI
}
wallet send
-d
"
${
signData
}
"
)
block_wait
"
${
CLI
}
"
2
block_wait
"
${
CLI
}
"
2
...
...
vendor/github.com/33cn/chain33/build/autotest/jerkinsci/jerkins-ci-autotest.sh
View file @
8c429796
...
@@ -130,7 +130,7 @@ function start_chain33() {
...
@@ -130,7 +130,7 @@ function start_chain33() {
fi
fi
echo
"=========== #config token blacklist ============="
echo
"=========== #config token blacklist ============="
rawData
=
$(${
CLI
}
config config_tx
-
k
token-blacklist
-o
add
-v
BTC
)
rawData
=
$(${
CLI
}
config config_tx
-
c
token-blacklist
-o
add
-v
BTC
)
signData
=
$(${
CLI
}
wallet sign
-d
"
${
rawData
}
"
-k
0xc34b5d9d44ac7b754806f761d3d4d2c4fe5214f6b074c19f069c4f5c2a29c8cc
)
signData
=
$(${
CLI
}
wallet sign
-d
"
${
rawData
}
"
-k
0xc34b5d9d44ac7b754806f761d3d4d2c4fe5214f6b074c19f069c4f5c2a29c8cc
)
hash
=
$(${
CLI
}
wallet send
-d
"
${
signData
}
"
)
hash
=
$(${
CLI
}
wallet send
-d
"
${
signData
}
"
)
...
...
vendor/github.com/33cn/chain33/build/autotest/local/local-autotest.sh
View file @
8c429796
...
@@ -143,7 +143,7 @@ function start_chain33() {
...
@@ -143,7 +143,7 @@ function start_chain33() {
fi
fi
echo
"=========== #config token blacklist ============="
echo
"=========== #config token blacklist ============="
rawData
=
$(${
CLI
}
config config_tx
-
k
token-blacklist
-o
add
-v
BTC
)
rawData
=
$(${
CLI
}
config config_tx
-
c
token-blacklist
-o
add
-v
BTC
)
signData
=
$(${
CLI
}
wallet sign
-d
"
${
rawData
}
"
-k
0xc34b5d9d44ac7b754806f761d3d4d2c4fe5214f6b074c19f069c4f5c2a29c8cc
)
signData
=
$(${
CLI
}
wallet sign
-d
"
${
rawData
}
"
-k
0xc34b5d9d44ac7b754806f761d3d4d2c4fe5214f6b074c19f069c4f5c2a29c8cc
)
hash
=
$(${
CLI
}
wallet send
-d
"
${
signData
}
"
)
hash
=
$(${
CLI
}
wallet send
-d
"
${
signData
}
"
)
...
...
vendor/github.com/33cn/chain33/build/util/black_list.sh
View file @
8c429796
#!/usr/bin/env bash
#!/usr/bin/env bash
guodun
=
"
$(
../chain33-cli config config_tx
-
k
token-blacklist
-o
add
-v
BTY
--paraName
"user.p.guodun."
)
"
guodun
=
"
$(
../chain33-cli config config_tx
-
c
token-blacklist
-o
add
-v
BTY
--paraName
"user.p.guodun."
)
"
fzmtest
=
"
$(
../chain33-cli config config_tx
-
k
token-blacklist
-o
add
-v
BTY
--paraName
"user.p.fzmtest."
)
"
fzmtest
=
"
$(
../chain33-cli config config_tx
-
c
token-blacklist
-o
add
-v
BTY
--paraName
"user.p.fzmtest."
)
"
echo
"cli wallet sign -d
$guodun
-a 1JmFaA6unrCFYEWPGRi7uuXY1KthTJxJEP -e 1h > d:/b.txt"
echo
"cli wallet sign -d
$guodun
-a 1JmFaA6unrCFYEWPGRi7uuXY1KthTJxJEP -e 1h > d:/b.txt"
echo
"cli wallet sign -d
$fzmtest
-a 1JmFaA6unrCFYEWPGRi7uuXY1KthTJxJEP -e 1h >> d:/b.txt"
echo
"cli wallet sign -d
$fzmtest
-a 1JmFaA6unrCFYEWPGRi7uuXY1KthTJxJEP -e 1h >> d:/b.txt"
vendor/github.com/33cn/chain33/build/util/manage.sh
View file @
8c429796
#!/usr/bin/env bash
#!/usr/bin/env bash
fzmtest
=
"
$(
../chain33-cli
--paraName
user.p.fzmtest. config config_tx
-
k
lottery-creator
-o
add
-v
15nn4D2ppUj8tmyHfdm8g4EvtqpBYUS7DM
)
"
fzmtest
=
"
$(
../chain33-cli
--paraName
user.p.fzmtest. config config_tx
-
c
lottery-creator
-o
add
-v
15nn4D2ppUj8tmyHfdm8g4EvtqpBYUS7DM
)
"
echo
"cli wallet sign -d
$fzmtest
-a 1JmFaA6unrCFYEWPGRi7uuXY1KthTJxJEP -e 1h >> d:/b.txt"
echo
"cli wallet sign -d
$fzmtest
-a 1JmFaA6unrCFYEWPGRi7uuXY1KthTJxJEP -e 1h >> d:/b.txt"
vendor/github.com/33cn/chain33/build/util/manage_list.sh
View file @
8c429796
#!/usr/bin/env bash
#!/usr/bin/env bash
guodun1
=
$(
../chain33-cli config config_tx
-
k
token-blacklist
-o
add
-v
BTY
--paraName
"user.p.
$2
."
)
guodun1
=
$(
../chain33-cli config config_tx
-
c
token-blacklist
-o
add
-v
BTY
--paraName
"user.p.
$2
."
)
guodun2
=
$(
../chain33-cli config config_tx
-
k
token-finisher
-o
add
-v
"
$1
"
--paraName
"user.p.
$2
."
)
guodun2
=
$(
../chain33-cli config config_tx
-
c
token-finisher
-o
add
-v
"
$1
"
--paraName
"user.p.
$2
."
)
echo
"cli wallet sign -d
$guodun1
-a 1JmFaA6unrCFYEWPGRi7uuXY1KthTJxJEP -e 1h > d:/b.txt"
echo
"cli wallet sign -d
$guodun1
-a 1JmFaA6unrCFYEWPGRi7uuXY1KthTJxJEP -e 1h > d:/b.txt"
echo
"cli wallet sign -d
$guodun2
-a 1JmFaA6unrCFYEWPGRi7uuXY1KthTJxJEP -e 1h >> d:/b.txt"
echo
"cli wallet sign -d
$guodun2
-a 1JmFaA6unrCFYEWPGRi7uuXY1KthTJxJEP -e 1h >> d:/b.txt"
vendor/github.com/33cn/chain33/executor/allow.go
View file @
8c429796
...
@@ -88,9 +88,9 @@ func isAllowLocalKey2(execer []byte, key []byte) error {
...
@@ -88,9 +88,9 @@ func isAllowLocalKey2(execer []byte, key []byte) error {
err
:=
errors
.
Wrapf
(
types
.
ErrLocalKeyLen
,
"isAllowLocalKey too short. key=%s exec=%s"
,
string
(
key
),
string
(
execer
))
err
:=
errors
.
Wrapf
(
types
.
ErrLocalKeyLen
,
"isAllowLocalKey too short. key=%s exec=%s"
,
string
(
key
),
string
(
execer
))
return
err
return
err
}
}
if
key
[
minkeylen
-
1
]
!=
'-'
{
if
key
[
minkeylen
-
1
]
!=
'-'
||
key
[
len
(
types
.
LocalPrefix
)]
!=
'-'
{
err
:=
errors
.
Wrapf
(
types
.
ErrLocalPrefix
,
err
:=
errors
.
Wrapf
(
types
.
ErrLocalPrefix
,
"isAllowLocalKey prefix last char is not '-'. key=%s exec=%s minkeylen=%d title=%s"
,
"isAllowLocalKey prefix last char
or separator
is not '-'. key=%s exec=%s minkeylen=%d title=%s"
,
string
(
key
),
string
(
execer
),
minkeylen
,
types
.
GetTitle
())
string
(
key
),
string
(
execer
),
minkeylen
,
types
.
GetTitle
())
return
err
return
err
}
}
...
...
vendor/github.com/33cn/chain33/executor/executor_test.go
View file @
8c429796
...
@@ -130,6 +130,8 @@ func TestKeyAllow_evm(t *testing.T) {
...
@@ -130,6 +130,8 @@ func TestKeyAllow_evm(t *testing.T) {
func
TestKeyLocalAllow
(
t
*
testing
.
T
)
{
func
TestKeyLocalAllow
(
t
*
testing
.
T
)
{
err
:=
isAllowLocalKey
([]
byte
(
"token"
),
[]
byte
(
"LODB-token-"
))
err
:=
isAllowLocalKey
([]
byte
(
"token"
),
[]
byte
(
"LODB-token-"
))
assert
.
Equal
(
t
,
err
,
types
.
ErrLocalKeyLen
)
assert
.
Equal
(
t
,
err
,
types
.
ErrLocalKeyLen
)
err
=
isAllowLocalKey
([]
byte
(
"token"
),
[]
byte
(
"LODB_token-a"
))
assert
.
Equal
(
t
,
err
,
types
.
ErrLocalPrefix
)
err
=
isAllowLocalKey
([]
byte
(
"token"
),
[]
byte
(
"LODB-token-a"
))
err
=
isAllowLocalKey
([]
byte
(
"token"
),
[]
byte
(
"LODB-token-a"
))
assert
.
Nil
(
t
,
err
)
assert
.
Nil
(
t
,
err
)
err
=
isAllowLocalKey
([]
byte
(
""
),
[]
byte
(
"LODB--a"
))
err
=
isAllowLocalKey
([]
byte
(
""
),
[]
byte
(
"LODB--a"
))
...
...
vendor/github.com/33cn/chain33/rpc/grpcclient/api_test.go
View file @
8c429796
...
@@ -46,6 +46,37 @@ func TestMultipleGRPC(t *testing.T) {
...
@@ -46,6 +46,37 @@ func TestMultipleGRPC(t *testing.T) {
assert
.
Equal
(
t
,
reply
.
Hash
,
[]
byte
(
"hello"
))
assert
.
Equal
(
t
,
reply
.
Hash
,
[]
byte
(
"hello"
))
}
}
func
TestMultipleGRPCLocalhost
(
t
*
testing
.
T
)
{
qapi
:=
new
(
mocks
.
QueueProtocolAPI
)
qapi
.
On
(
"Query"
,
"ticket"
,
"RandNumHash"
,
mock
.
Anything
)
.
Return
(
&
types
.
ReplyHash
{
Hash
:
[]
byte
(
"hello"
)},
nil
)
//testnode setup
rpcCfg
:=
new
(
types
.
RPC
)
rpcCfg
.
GrpcBindAddr
=
"localhost:8003"
rpcCfg
.
JrpcBindAddr
=
"localhost:8004"
rpcCfg
.
MainnetJrpcAddr
=
rpcCfg
.
JrpcBindAddr
rpcCfg
.
Whitelist
=
[]
string
{
"localhost"
,
"0.0.0.0"
}
rpcCfg
.
JrpcFuncWhitelist
=
[]
string
{
"*"
}
rpcCfg
.
GrpcFuncWhitelist
=
[]
string
{
"*"
}
rpc
.
InitCfg
(
rpcCfg
)
server
:=
rpc
.
NewGRpcServer
(
&
qmocks
.
Client
{},
qapi
)
assert
.
NotNil
(
t
,
server
)
go
server
.
Listen
()
time
.
Sleep
(
time
.
Second
)
//一个IP 有效,一个IP 无效
paraRemoteGrpcClient
:=
"localhost:8004,localhost:8003,localhost"
conn
,
err
:=
grpc
.
Dial
(
grpcclient
.
NewMultipleURL
(
paraRemoteGrpcClient
),
grpc
.
WithInsecure
())
assert
.
Nil
(
t
,
err
)
grpcClient
:=
types
.
NewChain33Client
(
conn
)
param
:=
&
types
.
ReqRandHash
{
ExecName
:
"ticket"
,
BlockNum
:
5
,
Hash
:
[]
byte
(
"hello"
),
}
reply
,
err
:=
grpcClient
.
QueryRandNum
(
context
.
Background
(),
param
)
assert
.
Nil
(
t
,
err
)
assert
.
Equal
(
t
,
reply
.
Hash
,
[]
byte
(
"hello"
))
}
func
TestNewParaClient
(
t
*
testing
.
T
)
{
func
TestNewParaClient
(
t
*
testing
.
T
)
{
qapi
:=
new
(
mocks
.
QueueProtocolAPI
)
qapi
:=
new
(
mocks
.
QueueProtocolAPI
)
qapi
.
On
(
"Query"
,
"ticket"
,
"RandNumHash"
,
mock
.
Anything
)
.
Return
(
&
types
.
ReplyHash
{
Hash
:
[]
byte
(
"hello"
)},
nil
)
qapi
.
On
(
"Query"
,
"ticket"
,
"RandNumHash"
,
mock
.
Anything
)
.
Return
(
&
types
.
ReplyHash
{
Hash
:
[]
byte
(
"hello"
)},
nil
)
...
...
vendor/github.com/33cn/chain33/rpc/grpcclient/resolver.go
View file @
8c429796
...
@@ -62,7 +62,7 @@ func (*multipleBuilder) Build(target resolver.Target, cc resolver.ClientConn, op
...
@@ -62,7 +62,7 @@ func (*multipleBuilder) Build(target resolver.Target, cc resolver.ClientConn, op
return
nil
,
err
return
nil
,
err
}
}
if
net
.
ParseIP
(
host
)
!=
nil
{
if
host
!=
""
{
r
.
addrs
=
append
(
r
.
addrs
,
resolver
.
Address
{
Addr
:
host
+
":"
+
port
})
r
.
addrs
=
append
(
r
.
addrs
,
resolver
.
Address
{
Addr
:
host
+
":"
+
port
})
}
}
}
}
...
...
vendor/github.com/33cn/chain33/system/dapp/manage/commands/config.go
View file @
8c429796
...
@@ -47,8 +47,8 @@ func ConfigTxCmd() *cobra.Command {
...
@@ -47,8 +47,8 @@ func ConfigTxCmd() *cobra.Command {
}
}
func
addConfigTxFlags
(
cmd
*
cobra
.
Command
)
{
func
addConfigTxFlags
(
cmd
*
cobra
.
Command
)
{
cmd
.
Flags
()
.
StringP
(
"
key"
,
"k"
,
""
,
"
key string"
)
cmd
.
Flags
()
.
StringP
(
"
config_key"
,
"c"
,
""
,
"config
key string"
)
cmd
.
MarkFlagRequired
(
"key"
)
cmd
.
MarkFlagRequired
(
"
config_
key"
)
cmd
.
Flags
()
.
StringP
(
"operation"
,
"o"
,
""
,
"adding or deletion operation"
)
cmd
.
Flags
()
.
StringP
(
"operation"
,
"o"
,
""
,
"adding or deletion operation"
)
cmd
.
MarkFlagRequired
(
"operation"
)
cmd
.
MarkFlagRequired
(
"operation"
)
...
@@ -60,7 +60,7 @@ func addConfigTxFlags(cmd *cobra.Command) {
...
@@ -60,7 +60,7 @@ func addConfigTxFlags(cmd *cobra.Command) {
func
configTx
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
func
configTx
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
paraName
,
_
:=
cmd
.
Flags
()
.
GetString
(
"paraName"
)
paraName
,
_
:=
cmd
.
Flags
()
.
GetString
(
"paraName"
)
key
,
_
:=
cmd
.
Flags
()
.
GetString
(
"key"
)
key
,
_
:=
cmd
.
Flags
()
.
GetString
(
"
config_
key"
)
op
,
_
:=
cmd
.
Flags
()
.
GetString
(
"operation"
)
op
,
_
:=
cmd
.
Flags
()
.
GetString
(
"operation"
)
opAddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"value"
)
opAddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"value"
)
...
...
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