Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
test
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
谢昇
test
Commits
595b7931
Commit
595b7931
authored
Jun 20, 2022
by
谢昇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update btc脚本钱包找回.md
parent
0db70558
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
btc脚本钱包找回.md
btc脚本钱包找回.md
+6
-12
No files found.
btc脚本钱包找回.md
View file @
595b7931
# btc
script 命令总览
# btc
script 命令总览
...
@@ -23,15 +23,12 @@ Flags:
...
@@ -23,15 +23,12 @@ Flags:
`cli account dump_key -a 钱包中的地址`
`cli account dump_key -a 钱包中的地址`
通过私钥获得公钥:
通过私钥获得公钥:
`cli account pubkey -k 私钥`
`cli account pubkey -k 私钥`
获取A、B地址的公钥后,通过命令获得找回地址X:
获取A、B地址的公钥后,通过命令获得找回地址X:
`cli btcscript recovaddr -c A公钥 -r B公钥 -t 延时区块高度`
`cli btcscript recovaddr -c A公钥 -r B公钥 -t 延时区块高度`
-t的参数为正整数高度。
-t的参数为正整数高度。
后续要将需要操作的token转入X地址,使用A或B地址来进行提取操作。
后续要将需要操作的token转入X地址,使用A或B地址来进行提取操作。
# 2.btc signrecov 对btc脚本钱包找回交易签名
# 2.btc signrecov 对btc脚本钱包找回交易签名
...
@@ -51,37 +48,33 @@ Flags:
...
@@ -51,37 +48,33 @@ Flags:
```
```
对X地址的资产操作,分为使用A或B地址两种操作。控制地址A可以随时对X的资产进行提取。
对X地址的资产操作,分为使用A或B地址两种操作。控制地址A可以随时对X的资产进行提取。
## 使用控制地址A对找回地址X进行资产提取
## 使用控制地址A对找回地址X进行资产提取
首先构造交易,此处以普通转账举例:
首先构造交易,此处以普通转账举例:
`cli coins transfer -a 金额 -t 目标地址`
`cli coins transfer -a 金额 -t 目标地址`
返回hex格式的交易数据
返回hex格式的交易数据
对该hex进行签名:
对该hex进行签名:
`cli btcscript signrecov -c A公钥 -t 延时区块高度(这个高度需和获取X地址时候的高度一致) -r B公钥 -d 上一步构造交易获得的hex -a/-k(A的地址或私钥,若为地址需在钱包)`
`cli btcscript signrecov -c A公钥 -t 延时区块高度(这个高度需和获取X地址时候的高度一致) -r B公钥 -d 上一步构造交易获得的hex -a/-k(A的地址或私钥,若为地址需在钱包)`
返回hex格式的签名数据
返回hex格式的签名数据
发送该交易:
发送该交易:
`cli wallet send -d 上一步获得的hex`
`cli wallet send -d 上一步获得的hex`
返回交易哈希,可在链上查询。
返回交易哈希,可在链上查询。
## 使用备份地址B对找回地址X进行资产提取
## 使用备份地址B对找回地址X进行资产提取
首先构造交易,此处以普通转账举例:
首先构造交易,此处以普通转账举例:
`cli coins transfer -a 金额 -t 目标地址`
`cli coins transfer -a 金额 -t 目标地址`
返回hex格式的交易数据
返回hex格式的交易数据
对该hex进行签名:
对该hex进行签名:
`cli btcscript signrecov -c A公钥 -t 延时区块高度(这个高度需和获取X地址时候的高度一致) -r B公钥 -d 上一步构造交易获得的hex -a/-k(B的地址或私钥,若为地址需在钱包)`
`cli btcscript signrecov -c A公钥 -t 延时区块高度(这个高度需和获取X地址时候的高度一致) -r B公钥 -d 上一步构造交易获得的hex -a/-k(B的地址或私钥,若为地址需在钱包)`
返回hex格式的签名数据
返回hex格式的签名数据
需要基于该tx1 hex构造延时存证交易tx2:
需要基于该tx1 hex构造延时存证交易tx2:
可以直接使用send构造一步操作
可以直接使用send构造一步操作:
:
`cli send none delay -t 延时区块高度(这个高度需和获取X地址时候的高度一致) -d tx1的hex`
`cli send none delay -t 延时区块高度(这个高度需和获取X地址时候的高度一致) -d tx1的hex`
需等待-t的高度后,tx1交易会打包上链。该交易回执中可查询到tx1的交易哈希,可通过该哈希查询到tx1的交易。
需等待-t的高度后,tx1交易会打包上链。该交易回执中可查询到tx1的交易哈希,可通过该哈希查询到tx1的交易。
\ No newline at end of file
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