-
Notifications
You must be signed in to change notification settings - Fork 259
Wallet Recovery Contract
linj edited this page Nov 23, 2022
·
1 revision
[TOC]
Request message:
request: http.post
{
"jsonrpc":"2.0",
"method":"retrieve.CreateRawRetrieveBackupTx",
"params":[{"backupAddr":"1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY","defaultAddr":"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt","delayPeriod": 61}]
}Parameter description:
| Parameter | Type | Description |
|---|---|---|
| backupAddr | string | backup address |
| defaultAddr | string | main account address |
| delayPeriod | int32 | delay period |
Response message:
response:
{
"id": int32,
"result": "string",
"error": null
}Parameter description:
| Parameter | Type | Description |
|---|---|---|
| result | string | hexadecimal encoded transaction strings |
Request message:
request: http.post
{
"jsonrpc":"2.0",
"method":"retrieve.CreateRawRetrievePrepareTx",
"params":[{"backupAddr":"1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY","defaultAddr":"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"}]
}Parameter description:
| Parameter | Type | Description |
|---|---|---|
| backupAddr | string | backup address |
| defaultAddr | string | main account address |
Response message:
response:
{
"id": int32,
"result": "string",
"error": null
}Parameter description:
| Parameter | Type | Description |
|---|---|---|
| result | string | hexadecimal encoded transaction strings |
Request message:
request: http.post
{
"jsonrpc":"2.0",
"method":"retrieve.CreateRawRetrievePerformTx",
"params":[{"backupAddr":"1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY","defaultAddr":"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"}]
}Parameter description:
| Parameter | Type | Description |
|---|---|---|
| backupAddr | string | backup address |
| defaultAddr | string | main account address |
Response message:
response:
{
"id": int32,
"result": "string",
"error": null
}Parameter description:
| Parameter | Type | Description |
|---|---|---|
| result | string | hexadecimal encoded transaction strings |
Request message:
request: http.post
{
"jsonrpc":"2.0",
"method":"retrieve.CreateRawRetrieveCancelTx",
"params":[{"backupAddr":"1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY","defaultAddr":"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"}]
}Parameter description:
| Parameter | Type | Description |
|---|---|---|
| backupAddr | string | backup address |
| defaultAddr | string | main account address |
Response message:
response:
{
"id": int32,
"result": "string",
"error": null
}Parameter description:
| Parameter | Type | Description |
|---|---|---|
| result | string | hexadecimal encoded transaction strings |
Request message:
request: http.post
requst
{
"jsonrpc":"2.0",
"method":"Chain33.Query",
"params":[
{
"execer":"retrieve",
"funcName":"GetRetrieveInfo",
"payload":{
"backupAddress":"1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY",
"defaultAddress":"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
}
}]
}Parameter description:
| Parameter | Type | Description |
|---|---|---|
| execer | string | actuators name |
| funcName | string | query function name |
| backupAddr | string | backup address |
| defaultAddr | string | main account address |
Response message:
response:
{
"id":int32,
"result":
{
"backupAddress":"1EDnnePAZN48aC2hiTDzhkczfF39g1pZZX",
"defaultAddress":"1PUiGcbsccfxW3zuvHXZBJfznziph5miAo",
"delayPeriod":"61",
"prepareTime":"0",
"remainTime":"0",
"status":3
},
"error":null
}Parameter description:
| Parameter | Type | Description |
|---|---|---|
| backupAddress | string | backup address |
| defaultAddress | string | main account address |
| delayPeriod | string | delay period |
| prepareTime | string | prepare time |
| remainTime | string | time of remaining in effect |
| status | int32 | current status (1: the address is backed up; 2: the backup address is ready to take effect; 3: the backup address is effective) |
hello world