P-Rep Tools

P-Rep tools (preptools) Tutorial

This tutorial is intended to give an introduction to using preptools. This guide will walk through the basics of setting up the development environment and the usage of preptools CLI commands.

Building from source

First, clone this project. Then go to the project directory, create a virtualenv environment, and run the build script. Then install preptools with the .whl file.
1
$ python -m venv venv # Create a virtual environment.
2
$ source venv/bin/activate # Enter the virtual environment.
3
(venv)$ ./build.sh # run build script.
4
(venv)$ ls dist # check result wheel file.
5
preptools-1.0.6-py3-none-any.whl

Installation

This chapter explains how to install P-Rep Tools on your system.

Requirements

  • OS: MacOS or Linux
  • Windows is not supported.
  • Python
    • Make a virtualenv for Python 3.6.5+ (3.7 is also supported)
    • Check your Python version
      1
      $ python3 -V

Setup

Install dependencies
Some native tools and libraries are needed to install preptools without any errors.
1
$ sudo apt-get install -y libssl-dev build-essential automake pkg-config libtool libffi-dev libgmp-dev libyaml-cpp-dev
2
$ sudo apt-get install -y python3.7-dev libsecp256k1-dev python3-pip
Install preptools
Install the preptools with the .whl file as below.
1
(venv) $ pip install dist/preptools-1.0.6-py3-none-any.whl
Install the preptools with pypi
1
(venv) $ pip install preptools

How to use P-Rep tools

Command-line Interfaces (CLIs)

Overview
preptools provides several commands. Here is the list of the available commands.
Usage
1
usage: preptools [-h]
2
...
3
4
P-Rep management command line interface v1.0.6
5
6
optional arguments:
7
-h, --help show this help message and exit
8
9
subcommands:
10
{registerPRep,unregisterPRep,setPRep,setGovernanceVariables,registerProposal,cancelProposal,voteProposal,getPRep,getPReps,getProposal,getProposals,txresult,txbyhash,keystore,genconf}
11
registerPRep Register P-Rep
12
unregisterPRep Unregister P-Rep
13
setPRep Change enrolled P-Rep information
14
setGovernanceVariables
15
Change Governance variables used in network operation
16
registerProposal Register Proposal
17
cancelProposal Cancel Proposal
18
voteProposal Vote Proposal
19
getPRep Inquire P-Rep information
20
getPReps Get live status of all registered P-Rep candidates
21
getProposal Inquire Proposal information using transaction hash
22
getProposals Inquire all of network proposal list.
23
txresult Get transaction result by hash
24
txbyhash Get transaction by hash
25
keystore Create keystore file in the specified path.
26
genconf Create config file in the specified path.
Options
shorthand, Name
default
Description
-h, --help
Show this help message and exit

Setting PRep commands

There are four commands to set up the P-Rep information: preptools registerPRep, preptools unregisterPRep, preptools setPRep, and preptools setGovernanceVariables. Whenever the commands are called, they load the configuration from preptools_config.json. In order to use other configuration file, please specify the file location with the -c option.
registerPRep
Description
Register P-Rep. There are two ways of registering a P-Rep.
  • Using command line option Input P-Rep information with --[OPT_NAME] OPT_VALUE. The order of priority is command line > json
  • Using json file Input P-Rep information with --prep-json JSON_PATH.
Usage
1
usage: preptools registerPRep [-h] [--url URL] [--nid NID] [--config CONFIG]
2
[--yes] [--verbose] [--password PASSWORD]
3
[--keystore KEYSTORE]
4
[--step-limit-s STEP_LIMIT] [--name [NAME]]
5
[--country COUNTRY] [--city CITY]
6
[--email EMAIL] [--website WEBSITE]
7
[--details DETAILS] [--p2p-endpoint P2PENDPOINT]
8
[--node-address NODEADDRESS]
9
[--prep-json [PREP_JSON]]
10
11
optional arguments:
12
-h, --help show this help message and exit
13
--url URL, -u URL node url default(http://127.0.0.1:9000/api/v3)
14
--nid NID, -n NID networkId default(3) ex) mainnet(1), testnet(2)
15
--config CONFIG, -c CONFIG
16
preptools config file path
17
--yes, -y Don't want to ask send transaction.
18
--verbose, -v Verbose mode
19
--password PASSWORD, -p PASSWORD
20
keystore password
21
--keystore KEYSTORE, -k KEYSTORE
22
keystore file path
23
--step-limit-s STEP_LIMIT
24
step limit to set
25
--name [NAME] P-Rep name
26
--country COUNTRY P-Rep's country
27
--city CITY P-Rep's city
28
--email EMAIL P-Rep's email
29
--website WEBSITE P-Rep's homepage url
30
--details DETAILS json url including P-Rep detailed information
31
--p2p-endpoint P2PENDPOINT
32
Network info used for connecting among P-Rep nodes
33
--node-address NODEADDRESS
34
PRep Node Key
35
--prep-json [PREP_JSON]
36
json file having P-Rep information
Options
shorthand, Name
default
Description
-h, --help
show this help message and exit
-u, --url
http://127.0.0.1/api/v3
node url
-n, --nid
3
network id
-c, --config
./preptools_config.json
preptools config file path
-p, --password
keystore password
-k, --keystore
keystore file path
-s, --step-limit
0x50000000
step limit to set
--name
P-Rep name
--country
P-Rep's country. This require ISO 3166-1 alpha-3 standard.
--city
P-Rep's city.
--email
P-Rep's email. ex) "[email protected]"
--website
P-Rep's homepage url. ex) "https://node.example.com/"
--details
json url including P-Rep detailed information
ex) "https://node.example.com/json"
--p2p-endpoint
Network info used for connection among P-Rep nodes.
ex) “123.45.67.89:7100” or “node.example.com:7100”
--node-address
PRep Node Key (default: Operator Key)
--prep-json
json file having P-Rep information
Examples
1
(venv) $ cat registerPRep.json
2
{
3
"name": "banana node",
4
"country": "USA",
5
"city": "New York",
6
"email": "[email protected]",
7
"website": "https://icon.banana.com",
8
"details": "https://icon.banana.com/json",
9
"p2pEndpoint": "node.example.com:7100",
10
"nodeAddress": "hxef73db5d0ad02eb1fadb37d0041be96bfa56d4e6"
11
}
12
13
(venv) $ preptools registerPRep -k test_keystore --prep-json registerPRep.json
14
> Password:
15
[Request] ======================================================================
16
{
17
"from_": "hxef73db5d0ad02eb1fadb37d0041be96bfa56d4e6",
18
"to": "cx0000000000000000000000000000000000000000",
19
"value": 2000000000000000000000,
20
"step_limit": 268435456,
21
"nid": 3,
22
"nonce": null,
23
"version": 3,
24
"timestamp": null,
25
"method": "registerPRep",
26
"data_type": "call",
27
"params": {
28
"name": "banana node",
29
"country": "USA",
30
"city": "New York",
31
"email": "[email protected]",
32
"website": "https://icon.banana.com",
33
"details": "https://icon.banana.com/json",
34
"p2pEndpoint": "node.example.com:7100",
35
"nodeAddress": "hxef73db5d0ad02eb1fadb37d0041be96bfa56d400"
36
}
37
}
38
39
> Continue? [Y/n]
40
request success.
41
[Response] =====================================================================
42
{
43
"jsonrpc": "2.0",
44
"result": "0xe667b8de967e4c5e2cc5f4fc2775766f87517935e0875a8c4d0b9c8c2ce01846",
45
"id": 1234
46
}
47
48
(venv) $ cat registerPRep.json
49
{
50
"email": "[email protected]",
51
"website": "https://icon.banana.com",
52
"details": "https://icon.banana.com/json",
53
"p2pEndpoint": "node.example.com:7100",
54
"nodeAddress": "hxef73db5d0ad02eb1fadb37d0041be96bfa56d400"
55
}
56
57
(venv) preptools registerPRep -k test_keystore --prep-json registerPRep.json --name "kokoa node"
58
> Password:
59
> country : USA
60
> city : New York
61
[Request] ======================================================================
62
{
63
"from_": "hxef73db5d0ad02eb1fadb37d0041be96bfa56d4e6",
64
"to": "cx0000000000000000000000000000000000000000",
65
"value": 2000000000000000000000,
66
"step_limit": 268435456,
67
"nid": 3,
68
"nonce": null,
69
"version": 3,
70
"timestamp": null,
71
"method": "registerPRep",
72
"data_type": "call",
73
"params": {
74
"email": "[email protected]",
75
"website": "https://icon.banana.com",
76
"details": "https://icon.banana.com/json",
77
"p2pEndpoint": "node.example.com:7100",
78
"name": "kokoa node",
79
"country": "USA",
80
"city": "New York"
81
}
82
}
83
84
> Continue? [Y/n]
85
request success.
86
[Response] =====================================================================
87
{
88
"jsonrpc": "2.0",
89
"result": "0xeb00ea0ad9ee155067f37015d2403067904649a76a35dd06197600e408d30e3e",
90
"id": 1234
91
}
unregisterPRep
Description
Unregister P-Rep.
Usage
1
usage: preptools unregisterPRep [-h] [--url URL] [--nid NID] [--config CONFIG]
2
[--yes] [--verbose] [--password PASSWORD]
3
[--keystore KEYSTORE]
4
[--step-limit-s STEP_LIMIT]
5
6
optional arguments:
7
-h, --help show this help message and exit
8
--url URL, -u URL node url default(http://127.0.0.1:9000/api/v3)
9
--nid NID, -n NID networkId default(3) ex) mainnet(1), testnet(2)
10
--config CONFIG, -c CONFIG
11
preptools config file path
12
--yes, -y Don't want to ask send transaction.
13
--verbose, -v Verbose mode
14
--password PASSWORD, -p PASSWORD
15
keystore password
16
--keystore KEYSTORE, -k KEYSTORE
17
keystore file path
18
--step-limit-s STEP_LIMIT
19
step limit to set
Options
shorthand, Name
default
Description
-h, --help
show this help message and exit
-u, --url
http://127.0.0.1/api/v3
node url
-n, --nid
3
network id
-c, --config
./preptools_config.json
preptools config file path
-p, --password
keystore password
-k, --keystore
keystore file path
-s, --step-limit
0x50000000
step limit to set
Examples
1
(venv) $ preptools unregisterPRep -k test_keystore
2
> Password:
3
[Request] ======================================================================
4
{
5
"from_": "hxef73db5d0ad02eb1fadb37d0041be96bfa56d4e6",
6
"to": "cx0000000000000000000000000000000000000000",
7
"value": 0,
8
"step_limit": 268435456,
9
"nid": 3,
10
"nonce": null,
11
"version": 3,
12
"timestamp": null,
13
"method": "unregisterPRep",
14
"data_type": "call",
15
"params": {}
16
}
17
18
> Continue? [Y/n]
19
request success.
20
[Response] =====================================================================
21
{
22
"jsonrpc": "2.0",
23
"result": "0x027038296f595aedd1bfa680de2e20c3fd133816f9c74807e440bf6c548fb9aa",
24
"id": 1234
25
}
setPRep
Description
Change enrolled P-Rep information. There are three way of set P-Rep.
  • Using command line option You can input P-Rep information with --[OPT_NAME] OPT_VALUE. The order of priority is command line > json.
  • Using json file You can input P-Rep information with --prep-json JSON_PATH.
  • Using interactive mode [--i] Activate interactive mode and input P-Rep info what you want. If you don't want to input, just enter.
Usage
1
usage: preptools setPRep [-h] [--url URL] [--nid NID] [--config CONFIG]
2
[--yes] [--verbose] [--password PASSWORD]
3
[--keystore KEYSTORE] [--step-limit-s STEP_LIMIT]
4
[-i] [--name NAME] [--country COUNTRY] [--city CITY]
5
[--email EMAIL] [--website WEBSITE]
6
[--details DETAILS] [--p2p-endpoint P2PENDPOINT]
7
[--node-address NODEADDRESS]
8
[--prep-json PREP_JSON]
9
10
optional arguments:
11
-h, --help show this help message and exit
12
--url URL, -u URL node url default(http://127.0.0.1:9000/api/v3)
13
--nid NID, -n NID networkId default(3) ex) mainnet(1), testnet(2)
14
--config CONFIG, -c CONFIG
15
preptools config file path
16
--yes, -y Don't want to ask send transaction.
17
--verbose, -v Verbose mode
18
--password PASSWORD, -p PASSWORD
19
keystore password
20
--keystore KEYSTORE, -k KEYSTORE
21
keystore file path
22
--step-limit-s STEP_LIMIT
23
step limit to set
24
-i, --interactive Activate interactive mode when prep fields are blank.
25
--name NAME PRep name
26
--country COUNTRY P-Rep's country
27
--city CITY P-Rep's city
28
--email EMAIL P-Rep's email
29
--website WEBSITE P-Rep's homepage url
30
--details DETAILS json url including P-Rep details information
31
--p2p-endpoint P2PENDPOINT
32
Network info used for connecting among P-Rep nodes
33
--node-address NODEADDRESS
34
PRep Node Key (Default: Own Address)
35
--prep-json PREP_JSON
36
json file including P-Rep information
Options
shorthand, Name
default
Description
-h, --help
show this help message and exit
-u, --url
http://127.0.0.1/api/v3
node url
-n, --nid
3
network id
-c, --config
./preptools_config.json
preptools config file path
-p, --password
keystore password
-k, --keystore
keystore file path
-s, --step-limit
0x50000000
step limit to set
-i, --interactive
Activate interactive mode when prep fields are blank.
--name
P-Rep name
--country
P-Rep's country. This require ISO 3166-1 alpha-3 standard.
--city
P-Rep's city.
--email
P-Rep's email. ex) "[email protected]"
--website
P-Rep's homepage url. ex) "https://node.example.com/"
--details
json url including P-Rep detailed information
ex) "https://node.example.com/json"
--p2p-endpoint
Network info used for connection among P-Rep nodes.
ex) “123.45.67.89:7100” or “node.example.com:7100”
--node-address
PRep Node Key (Default: Own Address)
--prep-json
json file having P-Rep information
Examples
1
(venv) $ cat setPRep.json
2
{
3
"name": "kokoa node",
4
"country": "USA",
5
"website": "https://icon.kokoa.com",
6
"details": "https://icon.kokoa.com/json",
7
"p2pEndpoint": "node.example.com:7100",
8
"nodeAddress": "hxef73db5d0ad02eb1fadb37d0041be96bfa56d400"
9
}
10
11
(venv) $ preptools setPRep -k test_keystore --prep-json setPRep.json
12
> Password:
13
[Request] ======================================================================
14
{
15
"from_": "hxef73db5d0ad02eb1fadb37d0041be96bfa56d4e6",
16
"to": "cx0000000000000000000000000000000000000000",
17
"value": 0,
18
"step_limit": 268435456,
19
"nid": 3,
20
"nonce": null,
21
"version": 3,
22
"timestamp": null,
23
"method": "setPRep",
24
"data_type": "call",
25
"params": {
26
"name": "kokoa node",
27
"country": "USA",
28
"website": "https://icon.kokoa.com",
29
"details": "https://icon.kokoa.com/json",
30
"p2pEndpoint": "node.example.com:7100",
31
"nodeAddress": "hxef73db5d0ad02eb1fadb37d0041be96bfa56d400"
32
}
33
}
34
35
> Continue? [Y/n]
36
request success.
37
[Response] =====================================================================
38
{
39
"jsonrpc": "2.0",
40
"result": "0xc8456053128897a0941dab4c79428db91dda5a2899e3813698146ac25808c4c9",
41
"id": 1234
42
}
43
44
(venv) $ preptools setPRep -k test_keystore --prep-json setPRep.json -i
45
> Password:
46
> city : New York
47
> email :
48
[Request] ======================================================================
49
{
50
"from_": "hxef73db5d0ad02eb1fadb37d0041be96bfa56d4e6",
51
"to": "cx0000000000000000000000000000000000000000",
52
"value": 0,
53
"step_limit": 268435456,
54
"nid": 3,
55
"nonce": null,
56
"version": 3,
57
"timestamp": null,
58
"method": "setPRep",
59
"data_type": "call",
60
"params": {
61
"name": "kokoa node",
62
"country": "USA",
63
"website": "https://icon.kokoa.com",
64
"details": "https://icon.kokoa.com/json",
65
"p2pEndpoint": "node.example.com:7100",
66
"city": "New York",
67
"nodeAddress": "hxef73db5d0ad02eb1fadb37d0041be96bfa56d400"
68
}
69
}
70
71
> Continue? [Y/n]
72
request success.
73
[Response] =====================================================================
74
{
75
"jsonrpc": "2.0",
76
"result": "0xff0c4b603a2ae5ba50f658e0d0188210a5afeec559e44df29b55806342fa4563",
77
"id": 1234
78
}
setGovernanceVariables
Description
Change Governance variables used in network operation. You can only change it once per term. Other items besides irep may be added later.
Usage
1
usage: preptools setGovernanceVariables [-h] [--url URL] [--nid NID]
2
[--config CONFIG] [--yes] [--verbose]
3
[--password PASSWORD]
4
[--keystore KEYSTORE]
5
[--step-limit-s STEP_LIMIT] --irep
6
IREP
7
8
optional arguments:
9
-h, --help show this help message and exit
10
--url URL, -u URL node url default(http://127.0.0.1:9000/api/v3)
11
--nid NID, -n NID networkId default(3) ex) mainnet(1), testnet(2)
12
--config CONFIG, -c CONFIG
13
preptools config file path
14
--yes, -y Don't want to ask send transaction.
15
--verbose, -v Verbose mode
16
--password PASSWORD, -p PASSWORD
17
keystore password
18
--keystore KEYSTORE, -k KEYSTORE
19
keystore file path
20
--step-limit-s STEP_LIMIT
21
step limit to set
22
--irep IREP amounts of irep
Options
shorthand, Name
default
Description
-h, --help
show this help message and exit
-u, --url
http://127.0.0.1/api/v3
node url
-n, --nid
3
network id
-c, --config
./preptools_config.json
preptools config file path
-p, --password
keystore password
-k, --keystore
keystore file path
-s, --step-limit
0x50000000
step limit to set
--irep
amounts of irep in loop
Examples
1
(venv) $ preptools setGovernanceVariables --irep 50_000_000_000_000_000_000_000
2
> Password:
3
[Request] ======================================================================
4
{
5
"from_": "hxef73db5d0ad02eb1fadb37d0041be96bfa56d4e6",
6
"to": "cx0000000000000000000000000000000000000000",
7
"value": 0,
8
"step_limit": 268435456,
9
"nid": 3,
10
"nonce": null,
11
"version": 3,
12
"timestamp": null,
13
"method": "setGovernanceVariables",
14
"data_type": "call",
15
"params": {
16
"irep": "0xa968163f0a57b400000"
17
}
18
}
19
20
> Continue? [Y/n]
21
request success.
22
[Response] =====================================================================
23
{
24
"jsonrpc": "2.0",
25
"result": "0xc15b6989cd39e01b3d4bb65b72e6f7fcbc009020779b7f9fc60d59da4df7b091",
26
"id": 1234
27
}

Preptools information commands

Commands that show the P-Rep information. There are two commands preptools getPRep and preptools getPReps.
getPRep
Description
Inquire P-Rep information
Usage
1
usage: preptools getPRep [-h] [--url URL] [--nid NID] [--config CONFIG]
2
address
3
4
positional arguments:
5
address Address of P-Rep you are looking for
6
7
optional arguments:
8
-h, --help show this help message and exit
9
--url URL, -u URL node url default(http://127.0.0.1:9000/api/v3)
10
--nid NID, -n NID networkId default(3) ex) mainnet(1), testnet(2)
11
--config CONFIG, -c CONFIG
12
preptools config file path
Options
shorthand, Name
default
Description
-h, --help
show this help message and exit
-u, --url
http://127.0.0.1/api/v3
node url
-n, --nid
3
network id
-c, --config
./preptools_config.json
preptools config file path
address
Address of P-Rep you are looking for
Examples
1
(venv) $ preptools getPRep hxef73db5d0ad02eb1fadb37d0041be96bfa56d4e6
2
[Request] ======================================================================
3
{
4
"from_": "hx1234567890123456789012345678901234567890",
5
"to": "cx0000000000000000000000000000000000000000",
6
"method": "getPRep",
7
"params": {
8
"address": "hxef73db5d0ad02eb1fadb37d0041be96bfa56d4e6"
9
}
10
}
11
12
request success.
13
[Response] =====================================================================
14
{
15
"jsonrpc": "2.0",
16
"result": {
17
"status": "0x1",
18
"grade": "0x2",
19
"name": "kokoa node",
20
"country": "USA",
21
"city": "New York",
22
"stake": "0x0",
23
"delegated": "0x0",
24
"totalBlocks": "0x0",
25
"validatedBlocks": "0x0",
26
"irep": "0xa968163f0a57b400000",
27
"irepUpdateBlockHeight": "0x58f",
28
"lastGenerateBlockHeight": "-0x1",
29
"email": "[email protected]",
30
"website": "https://icon.kokoa.com",
31
"details": "https://icon.kokoa.com/json",
32
"p2pEndpoint": "node.example.com:7100",
33
"nodeAddress": "hxef73db5d0ad02eb1fadb37d0041be96bfa56d400"
34
},
35
"id": 1234
36
}
getPReps
Description
Get live status of all registered P-Rep candidates
Usage
1
usage: preptools getPReps [-h] [--url URL] [--nid NID] [--config CONFIG]
2
[--start-ranking START_RANKING]
3
[--end-ranking END_RANKING]
4
[--block-height BLOCK_HEIGHT]
5
6
optional arguments:
7
-h, --help show this help message and exit
8
--url URL, -u URL node url default(http://127.0.0.1:9000/api/v3)
9
--nid NID, -n NID networkId default(3) ex) mainnet(1), testnet(2)
10
--config CONFIG, -c CONFIG
11
preptools config file path
12
--start-ranking START_RANKING
13
Get P-Rep list which starts from start ranking
14
--end-ranking END_RANKING
15
Get P-Rep list which ends with end ranking, inclusive
16
--block-height BLOCK_HEIGHT
17
Block height which ranking formed
Options
shorthand, Name
default
Description
-h, --help
show this help message and exit
-u, --url
http://127.0.0.1/api/v3
node url
-n, --nid
3
network id
-c, --config
./preptools_config.json
preptools config file path
--start-ranking
Get P-Rep list which starts from start ranking
--end-ranking
Get P-Rep list which ends with end ranking, inclusive
--block-height
Block height which ranking formed
Examples
1
(venv) $ preptools getPReps
2
[Request] ======================================================================
3
{
4
"from_": "hx1234567890123456789012345678901234567890",
5
"to": "cx0000000000000000000000000000000000000000",
6
"method": "getPReps",
7
"params": null
8
}
9
10
request success.
11
[Response] =====================================================================
12
{
13
"jsonrpc": "2.0",
14
"result": {
15
"blockHeight": "0x1e3f3",
16
"startRanking": "0x0",
17
"totalDelegated": "0x0",
18
"totalStake": "0x0",
19
"preps": [
20
{
21
"name": "Banana node",
22
"country": "USA",
23
"city": "New York",
24
"grade": "0x0",
25
"address": "hx8f21e5c54f006b6a5d5fe65486908592151a7c57",
26
"irep": "0xc350",
27
"irepUpdateBlockHeight": "0x1200",
28
"lastGenerateBlockHeight": "-0x1",
29
"stake": "0x21e19e0c9bab2400000",
30
"delegated": "0x204fce5e3e25026110000000",
31
"totalBlocks": "0x2710",
32
"validatedBlocks": "0x2328"
33
},
34
...
35
]
36
},
37
"id": 1234
38
}
39
40
41
(venv) $ preptools getPReps --start-ranking "0x1" --end-ranking "0x8" --block-height "0x1234"
42
[Request] ======================================================================
43
{
44
"from_": "hx1234567890123456789012345678901234567890",
45
"to": "cx0000000000000000000000000000000000000000",
46
"method": "getPReps",
47
"params": {
48
"startRanking": "0x1",
49
"endRanking": "0x8",
50
"blockHeight": "0x1234"
51
}
52
}
53
54
request success.
55
[Response] =====================================================================
56
{
57
"jsonrpc": "2.0",
58
"result": {
59
"blockHeight": "0x1e452",
60
"startRanking": "0x0",
61
"totalDelegated": "0x0",
62
"totalStake": "0x0",
63
"preps": [
64
{
65
"name": "Banana node",
66
"country": "USA",
67
"city": "New York",
68
"grade": "0x0",
69
"address": "hx8f21e5c54f006b6a5d5fe65486908592151a7c57",
70
"irep": "0xc350",
71
"irepUpdateBlockHeight": "0x1200",
72
"lastGenerateBlockHeight": "-0x1",
73
"stake": "0x21e19e0c9bab2400000",
74
"delegated": "0x204fce5e3e25026110000000",
75
"totalBlocks": "0x2710",
76
"validatedBlocks": "0x2328"
77
},
78
...
79
]
80
},
81
"id": 1234
82
}

Network Proposal commands

There are 3 commands to network-proposal: registerProposal, cancelProposal and voteProposal Whenever the commands are called, they load the configuration from preptools_config.json. In order to use other configuration file, please specify the file location with the -c option.
registerProposal
Description
Register Network-proposal
Usage
1
usage: preptools registerProposal [-h] [--url URL] [--nid NID]
2
[--config CONFIG] [--yes] [--verbose]
3
[--password PASSWORD] [--keystore KEYSTORE]
4
[--step-limit-s STEP_LIMIT] --title TITLE
5
--desc DESC --type TYPE
6
[--value-value VALUE_VALUE]
7
[--value-code VALUE_CODE]
8
[--value-name VALUE_NAME]
9
[--value-address VALUE_ADDRESS]
10
[--value-type VALUE_TYPE]
11
12
optional arguments:
13
-h, --help show this help message and exit
14
--url URL, -u URL node url default(http://127.0.0.1:9000/api/v3)
15
--nid NID, -n NID networkId default(3) ex) mainnet(1), testnet(2)
16
--config CONFIG, -c CONFIG
17
preptools config file path
18
--yes, -y Don't want to ask send transaction.
19
--verbose, -v Verbose mode
20
--password PASSWORD, -p PASSWORD
21
keystore password
22
--keystore KEYSTORE, -k KEYSTORE
23
keystore file path
24
--step-limit-s STEP_LIMIT
25
step limit to set
26
--title TITLE Proposal title
27
--desc DESC Proposal description
28
--type TYPE type of Proposal
29
--value-value VALUE_VALUE
30
type 0:text message, type 4:step price in loop
31
(required when type 0 or 4)
32
--value-code VALUE_CODE
33
revision code (required when type 1)
34
--value-name VALUE_NAME
35
icon-service version (required when type 1)
36
--value-address VALUE_ADDRESS
37
type 2: address of SCORE, type 3: address of main/sub
38
P-Rep (required when type 2 or 3)
39
--value-type VALUE_TYPE
40
0 : freeze, 1 : unfreeze (required when type 2)
Options
shorthand, Name
default
Description
-h, --help
show this help message and exit
-u, --url
http://127.0.0.1:9000/api/v3
node url
-n, --nid
3
networkId mainnet(1), testnet(2)
--config
configuration file path.
-y, --yes
Do not confirm if you want to send request
-v, --verbose
verbose mode flag
-p, --password
Keystore file's password
-k, --keystore
keystore file path
-s, --step-limit
0x50000000
step limit to set
--title
title of network-proposal
--desc
description of network-proposal
--type
type of network-proposal(0,1,2,3,4)
--value-value
value of value field
--value-code
value of code field
--value-address
value of address field
--value-type
value of type field
Examples
1
(venv)$ preptools registerProposal -c preptools_config.json -k prep_keys0 -p qwer1234% --title pro0 --desc "first proposal" --type 4 --value-value 1234
2
[Value] ========================================================================
3
{
4
"value": "1234"
5
}
6
[Request] ======================================================================
7
{
8
"from_": "hxb74e29fba1809a105fdec433040a4e713bbe91fe",
9
"to": "cx0000000000000000000000000000000000000001",
10
"value": 0,
11
"step_limit": 268435456,
12
"nid": 3,
13
"nonce": null,
14
"version": 3,
15
"timestamp": null,
16
"method": "registerProposal",
17
"data_type": "call",
18
"params": {
19
"title": "pro0",
20
"description": "first proposal",
21
"type": "0x4",
22
"value": "0x7b2276616c7565223a202231323334227d"
23
}
24
}
25
26
> Continue? [Y/n]Y
27
request success.
28
[Response] =====================================================================
29
{
30
"jsonrpc": "2.0",
31
"result": "0x02221f9346f9c9b3322ea33e67a1ca0fbe9491e0ea3aefb5154a43e2ea829fa4",
32
"id": 1234
33
}
voteProposal
Description
Vote Network-proposal
Usage
1
usage: preptools voteProposal [-h] [--url URL] [--nid NID] [--config CONFIG]
2
[--yes] [--verbose] [--password PASSWORD]
3
[--keystore KEYSTORE]
4
[--step-limit-s STEP_LIMIT] --id ID --vote VOTE
5
6
optional arguments:
7
-h, --help show this help message and exit
8
--url URL, -u URL node url default(http://127.0.0.1:9000/api/v3)
9
--nid NID, -n NID networkId default(3) ex) mainnet(1), testnet(2)
10
--config CONFIG, -c CONFIG
11
preptools config file path
12
--yes, -y Don't want to ask send transaction.
13
--verbose, -v Verbose mode
14
--password PASSWORD, -p PASSWORD
15
keystore password
16
--keystore KEYSTORE, -k KEYSTORE
17
keystore file path
18
--step-limit-s STEP_LIMIT
19
step limit to set
20
--id ID hash of registerProposal TX
21
--vote VOTE 0 : disagree, 1 : agree
Options
shorthand, Name
default
Description
-h, --help
show this help message and exit
-u, --url
http://127.0.0.1:9000/api/v3
node url
-n, --nid
3
networkId mainnet(1), testnet(2)
--config
configuration file path.
-v, --verbose
verbose mode flag
-y, --yes
Do not confirm if you want to send request
-p, --password
password of keystore file
-k, --keystore
path of keystore file
-s, --step-limit
0x50000000
step limit to set
--id
id of network-proposal to vote
--vote
voting value(0: disagree, 1: agree)
Examples
1
(venv)$ preptools voteProposal -k prep_keys1 --id 0x515d0c7470e56358a6085ca93d305c4c28d004c10d110b26570dadc34bf2e492 --vote 0
2
> Password:
3
[Request] ======================================================================
4
{
5
"from_": "hx85d62b91d70bc2390b636a8d64136a413e671e3a",
6
"to": "cx0000000000000000000000000000000000000001",
7
"value": 0,
8
"step_limit": 268435456,
9
"nid": 3,
10
"nonce": null,
11
"version": 3,
12
"timestamp": null,
13
"method": "voteProposal",
14
"data_type": "call",
15
"params": {
16
"id": "0x515d0c7470e56358a6085ca93d305c4c28d004c10d110b26570dadc34bf2e492",
17
"vote": 0
18
}
19
}
20
21
> Continue? [Y/n]Y
22
request success.
23
[Response] =====================================================================
24
{
25
"jsonrpc": "2.0",
26
"result": "0x22ca6eb228586ed2a00924f18bc57f1819214bf0d5c5d305b03d72a931360cc8",
27
"id": 1234
28
}
cancelProposal
Description
Cancel Network-proposal
Usage
1
usage: preptools cancelProposal [-h] [--url URL] [--nid NID] [--config CONFIG]
2
[--yes] [--verbose] [--password PASSWORD]
3
[--keystore KEYSTORE]
4
[--step-limit-s STEP_LIMIT] --id [ID]
5
6
optional arguments:
7
-h, --help show this help message and exit
8
--url URL, -u URL node url default(http://127.0.0.1:9000/api/v3)
9
--nid NID, -n NID networkId default(3) ex) mainnet(1), testnet(2)
10
--config CONFIG, -c CONFIG
11
preptools config file path
12
--yes, -y Don't want to ask send transaction.
13
--verbose, -v Verbose mode
14
--password PASSWORD, -p PASSWORD
15
keystore password
16
--keystore KEYSTORE, -k KEYSTORE
17
keystore file path
18
--step-limit-s STEP_LIMIT
19
step limit to set
20
--id [ID] hash of registerProposal TX
Options
shorthand, Name
default
Description
-h, --help
show this help message and exit
-u, --url
http://127.0.0.1:9000/api/v3
node url
-n, --nid
3
networkId mainnet(1), testnet(2)
--config
configuration file path.
-y, --yes
Do not confirm if you want to send request
-v, --verbose
verbose mode flag
-p, --password
password of keystore file
-k, --keystore
path of keystore file
-s, --step-limit
0x50000000
step limit to set
--id
id of network-proposal to cancel
Examples
1
(venv)$ preptools cancelProposal -k prep_keys0 --id 0x02221f9346f9c9b3322ea33e67a1ca0fbe9491e0ea3aefb5154a43e2ea829fa4
2
> Password:
3
[Request] ======================================================================
4
{
5
"from_": "hxb74e29fba1809a105fdec433040a4e713bbe91fe",
6
"to": "cx0000000000000000000000000000000000000001",
7
"value": 0,
8
"step_limit": 268435456,
9
"nid": 3,
10
"nonce": null,
11
"version": 3,
12
"timestamp": null,
13
"method": "cancelProposal",
14
"data_type": "call",
15
"params": {
16
"id": "0x02221f9346f9c9b3322ea33e67a1ca0fbe9491e0ea3aefb5154a43e2ea829fa4"
17
}
18
}
19
20
> Continue? [Y/n]Y
21
request success.
22
[Response] =====================================================================
23
{
24
"jsonrpc": "2.0",
25
"result": "0x344887e8b9b30e523991e44602eee51857fd7a55e5437b34a7e8d0f2ede8c019",
26
"id": 1234
27
}

Querying Network Proposal commands

There are 2 commands to network-proposal: getProposal and getProposals. Whenever the commands are called, they load the configuration from preptools_config.json. In order to use other configuration file, please specify the file location with the -c option.
getProposal
Description
Querying Network-proposal with given proposal-id
Usage
1
usage: preptools getProposal [-h] [--url URL] [--nid NID] [--config CONFIG]
2
[--yes] [--verbose]
3
transaction_hash
4
5
positional arguments:
6
transaction_hash hash of registerProposal transaction
7
8
optional arguments:
9
-h, --help show this help message and exit
10
--url URL, -u URL node url default(http://127.0.0.1:9000/api/v3)
11
--nid NID, -n NID networkId default(3) ex) mainnet(1), testnet(2)
12
--config CONFIG, -c CONFIG
13
preptools config file path
14
--yes, -y Don't want to ask send transaction.
15
--verbose, -v Verbose mode
Options
shorthand, Name
default
Description
-c, --config
configuration file path.
-h, --help
show this help message and exit
-u, --url
http://127.0.0.1:9000/api/v3
node url
-n, --nid
3
networkId mainnet(1), testnet(2)
-v, --verbose
verbose mode flag
examples
1
(venv)$ preptools getProposal 0x02221f9346f9c9b3322ea33e67a1ca0fbe9491e0ea3aefb5154a43e2ea829fa4
2
[Request] ======================================================================
3
{
4
"from_": "hx1234567890123456789012345678901234567890",
5
"to": "cx0000000000000000000000000000000000000001",
6
"method": "getProposal",
7
"params": {
8
"id": "0x02221f9346f9c9b3322ea33e67a1ca0fbe9491e0ea3aefb5154a43e2ea829fa4"
9
}
10
}
11
12
request success.
13
[Response] =====================================================================
14
{
15
"jsonrpc": "2.0",
16
"result": {
17
"id": "0x02221f9346f9c9b3322ea33e67a1ca0fbe9491e0ea3aefb5154a43e2ea829fa4",
18
"proposer": "hxb74e29fba1809a105fdec433040a4e713bbe91fe",
19
"proposerName": "nodehxb74e29fba1809a105fdec433040a4e713bbe91fe",
20
"status": "0x0",
21
"startBlockHeight": "0x2c",
22
"endBlockHeight": "0x2f",
23
"contents": {
24
"title": "pro0",
25
"description": "first proposal",
26
"type": "0x4",
27
"value": {
28
"value": "1234"
29
}
30
},
31
"vote": {
32
"agree": {
33
"list": [],
34
"amount": "0x0"
35
},
36
"disagree": {
37
"list": [],
38
"amount": "0x0"
39
},
40
"noVote": {
41
"list": [
42
"hxb74e29fba1809a105fdec433040a4e713bbe91fe",
43
"hx85d62b91d70bc2390b636a8d64136a413e671e3a",
44
"hxd891096dd01c1af790c29d55022a35357684643c",
45
"hx44ae89b457ccfb1bacbe35d278933ba887373b1b",
46
"hxf2c6b56e6dfcfe7c3b9fbd3d1ca1d08973b8d363",
47
"hxe54bdf4b25affa59c8963f1e4a6c45183aee167f",
48
"hx02ccb9e378a35e11a65b5c60e796fded98383b37",
49
"hx064c3d9b4982aae0253b9a8b3dd106823c107c25",
50
"hxcd294f136f39232d97081f2dfa22886c76f45afb",
51
"hxd685153db2a09347115cf0d8d1c5f9ab174bd802",
52
"hx383b555e0301b77b1c326815bccaaaf382ecd238",
53
"hxb0bfb180fb60ac68a0d3dbcadf509af07dd1f501",
54
"hxa5861173d2bd05dd9bfc5c5d74faa654f8d37c7b",
55
"hxee194a44eb4d06fb7c8a9515f74eb41735046be2",
56
"hx6e220a1b6c0fc12b2d3cc6122fccf2e9ec3d1406",
57
"hxa46f74425c0e588be8c93bbabf1be2c67da12066",
58
"hx81c5db07cd6c1c569e0a5abebdb7b108157d80b5",
59
"hx46ca63475e630e7c3a8c3f8c0e2981b675f32919",
60
"hxffa3675581c0209c2adcc598767c77d43f999a33",
61
"hx9259b69bbdea01f32e97d91401ada24d12965ae3",
62
"hx282c3778a572d4d0d1eb8e65ab53daaedea3f68e",
63
"hx25b84c8fe8bfabda4fb30523a1923a79cc304af5"
64
],
65
"amount": "0x10658da4dff32a862400000"
66
}
67
}
68
},
69
"id": 1234
70
}
getProposals
Description
Querying all Network-proposal
Usage
1
usage: preptools getProposals [-h] [--url URL] [--nid NID] [--config CONFIG]
2
[--yes] [--verbose] [--type [TYPE]]
3
[--status [STATUS]]
4
5
optional arguments:
6
-h, --help show this help message and exit
7
--url URL, -u URL node url default(http://127.0.0.1:9000/api/v3)
8
--nid NID, -n NID networkId default(3) ex) mainnet(1), testnet(2)
9
--config CONFIG, -c CONFIG
10
preptools config file path
11
--yes, -y Don't want to ask send transaction.
12
--verbose, -v Verbose mode
13
--type [TYPE] type of network proposal to filter
14
--status [STATUS] status of network proposal to filter
Options
shorthand, Name
default
Description
-c, --config
configuration file path.
-h, --help
show this help message and exit
-u, --url
http://127.0.0.1:9000/api/v3
node url
-n, --nid
3
networkId mainnet(1), testnet(2)
-v, --verbose
verbose mode flag
--type
Type of network proposal to filter
--status
Status of network proposal to filter
examples
1
(venv)$ preptools getProposals
2
[Request] ======================================================================
3
{
4
"from_": "hx1234567890123456789012345678901234567890",
5
"to": "cx0000000000000000000000000000000000000001",
6
"method": "getProposals",
7
"params": null
8
}
9
10
request success.
11
[Response] =====================================================================
12
{
13
"jsonrpc": "2.0",
14
"result": {
15
"proposals": [
16
{
17
"id": "0x02221f9346f9c9b3322ea33e67a1ca0fbe9491e0ea3aefb5154a43e2ea829fa4",
18
"proposer": "hxb74e29fba1809a105fdec433040a4e713bbe91fe",
19
"proposerName": "nodehxb74e29fba1809a105fdec433040a4e713bbe91fe",
20
"status": "0x0",
21
"startBlockHeight": "0x2c",
22
"endBlockHeight": "0x2f",
23
"contents": {
24
"title": "pro0",
25
"description": "first proposal",
26
"type": "0x4",
27
"value": {
28
"value": "1234"
29
}
30
},
31
"vote": {
32
"agree": {
33
"count": "0x0",
34
"amount": "0x0"
35
},
36
"disagree": {
37
"count": "0x0",
38
"amount": "0x0"
39
},
40
"noVote": {
41
"count": "0x16",
42
"amount": "0x10658da4dff32a862400000"
43
}
44
}
45
},
46
{
47
"id": "0x515d0c7470e56358a6085ca93d305c4c28d004c10d110b26570dadc34bf2e492",
48
"proposer": "hxb74e29fba1809a105fdec433040a4e713bbe91fe",
49
"proposerName": "nodehxb74e29fba1809a105fdec433040a4e713bbe91fe",
50
"status": "0x0",
51
"startBlockHeight": "0x2c",
52
"endBlockHeight": "0x2f",
53
"contents": {
54
"title": "pro1",
55
"description": "second proposal",
56
"type": "0x4",
57
"value": {
58
"value": "1234"
59
}
60
},
61
"vote": {
62
"agree": {
63
"count": "0x0",
64
"amount": "0x0"
65
},
66
"disagree": {
67
"count": "0x1",
68
"amount": "0xbecc41ad16b07a7600000"
69
},
70
"noVote": {
71
"count": "0x15",
72
"amount": "0xfa6c16332dc7a0bae00000"
73
}
74
}
75
}
76
]
77
},
78
"id": 1234
79
}

Preptools Common commands

Commands that generate configuration file and keystore file. There are two commands keystore and genconf.
keystore
Description
Create a keystore file in the given path.
Usage
1
usage: preptools keystore [-h] [-p PASSWORD] path
2
3
positional arguments:
4
path Path of keystore file.
5
6
optional arguments:
7
-h, --help show this help message and exit
8
-p PASSWORD, --password PASSWORD
9
Keystore file's password
Options
shorthand, Name
default
Description
path
a keystore file path that is to be generated
-h, --help
show this help message and exit
-p, --password
Keystore file's password
Examples
1
(venv) $ preptools keystore keystore_file
2
Input your keystore password:
3
Retype your keystore password:
4
Made file successfully
genconf
Description
Generate P-Rep tools config file.
1
usage: preptools genconf [-h] [--path PATH]
2
3
optional arguments:
4
-h, --help show this help message and exit
5
--path PATH Path of configue file. default(./preptools_config.json)
Options
shorthand, Name
default
Description
-h, --help
show this help message and exit
--path
preptools_config.json
Path of configue file.
Examples
1
(venv) $ preptools genconf
2
Made ./preptools_config.json successfully

Preptools Other commands

Commands that are related to transaction. There are two commands txresult and txbyhash.
txresult
Description
Get transaction result by transaction hash.
Usage
1
usage: preptools txresult [-h] [--url URL] [--nid NID] [--config CONFIG]
2
[tx_hash]
3
4
positional arguments:
5
tx_hash Enter the transaction hash
6
7
optional arguments:
8
-h, --help show this help message and exit
9
--url URL, -u URL node url default(http://127.0.0.1:9000/api/v3)
10
--nid NID, -n NID networkId default(3) ex) mainnet(1), testnet(2)
11
--config CONFIG, -c CONFIG
12
preptools config file path
Options
shorthand, Name
default
Description
tx_hash
Hash of the transaction to be queried
-h, --help
show this help message and exit
-u, --url
http://127.0.0.1:9000/api/v3
node url
-n, --nid
3
network id
-c, --config
./preptools_config.json
preptools config file path
Examples
1
(venv) $ preptools txresult 0xc8456053128897a0941dab4c79428db91dda5a2899e3813698146ac25808c4c9
2
request success.
3
[Response] =====================================================================
4
{
5
"jsonrpc": "2.0",
6
"result": {
7
"txHash": "0xc8456053128897a0941dab4c79428db91dda5a2899e3813698146ac25808c4c9",
8
"blockHeight": "0x1d980",
9
"blockHash": "0xa7354fb9427308239e56482916dd4e31988ce1f207091cdf81c656f89a066c5f",
10
"txIndex": "0x0",
11
"to": "cx0000000000000000000000000000000000000000",
12
"stepUsed": "0x21340",
13
"stepPrice": "0x2540be400",
14
"cumulativeStepUsed": "0x21340",
15
"eventLogs": [
16
{
17
"scoreAddress": "cx0000000000000000000000000000000000000000",
18
"indexed": [
19
"PRepSet(Address)"
20
],
21
"data": [
22
"hxef73db5d0ad02eb1fadb37d0041be96bfa56d4e6"
23
]
24
}
25
],
26
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000080000000000000000000000000000000000000000000000000000000000020000000000000008000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
27
"status": "0x1"
28
},
29
"id": 1234
30
}
txbyhash
Description
Get transaction by transaction hash
Usage
1
usage: preptools txbyhash [-h] [--url URL] [--nid NID] [--config CONFIG]
2
[tx_hash]
3
4
positional arguments:
5
tx_hash Enter the transaction hash
6
7
optional arguments:
8
-h, --help show this help message and exit
9
--url URL, -u URL node url default(http://127.0.0.1:9000/api/v3)
10
--nid NID, -n NID networkId default(3) ex) mainnet(1), testnet(2)
11
--config CONFIG, -c CONFIG
12
preptools config file path
Options
shorthand, Name
default
Description
tx_hash
Hash of the transaction to be queried
-h, --help
show this help message and exit
-u, --url
http://127.0.0.1:9000/api/v3
node url
-n, --nid
3
network id
-c, --config
./preptools_config.json
preptools config file path
Examples
1
(venv) $ preptools txbyhash 0xc8456053128897a0941dab4c79428db91dda5a2899e3813698146ac25808c4c9
2
request success.
3
[Response] =====================================================================
4
{
5
"jsonrpc": "2.0",
6
"result": {
7
"version": "0x3",
8
"from": "hxef73db5d0ad02eb1fadb37d0041be96bfa56d4e6",
9
"to": "cx0000000000000000000000000000000000000000",
10
"stepLimit": "0x10000000",
11
"timestamp": "0x58fa97a48ad43",
12
"nid": "0x3",
13
"value": "0x0",
14
"dataType": "call",
15
"data": {
16
"method": "setPRep",
17
"params": {
18
"name": "kokoa node",
19
"country": "USA",
20
"website": "https://icon.kokoa.com",
21
"details": "https://icon.kokoa.com/json",
22
"p2pEndpoint": "node.example.com:7100"
23
}
24
},
25
"signature": "4krblW9KtQr6KNIJOVa22B3JFDQD6vaxepDSjMET91oua3Qeiq3UFMIHiucWiIrKGt3zaSo2K+mVW7Ge5rOtPwE=",
26
"txHash": "0xc8456053128897a0941dab4c79428db91dda5a2899e3813698146ac25808c4c9",
27
"txIndex": "0x0",
28
"blockHeight": "0x1d980",
29
"blockHash": "0xa7354fb9427308239e56482916dd4e31988ce1f207091cdf81c656f89a066c5f"
30
},
31
"id": 1234
32
}

Configuration Files

preptools_config.json
For every P-Rep tools CLI commands except genconf and keystore, this file is used to configure the default parameters and initial settings.
In this configuration file, you can define default options values for some CLI commands.
1
{
2
"uri": "http://127.0.0.1:9000/api/v3",
3
"nid": 3,
4
"keyStore": null
5
}
Field
Data type
Description
uri
string
URI to send the request.
nid
int
Network ID. 3 is reserved for P-Rep tools.
keyStore
string
Keystore file path.

JSON Standard for Public Representative Detailed Information

This is the JSON standard for detailed information about the P-Rep. P-Rep can submit the url of detailed information via the registerPRep and setPRep action on the ICON Blockchain. We strongly recommend that you register this information.
1
{
2
"representative": {
3
"logo": {
4
"logo_256": "https://icon.foundation/img/img-256.png",
5
"logo_1024": "https://icon.foundation/img/img-1024.png",
6
"logo_svg": "https://icon.foundation/img/img-logo.svg"
7
},
8
"media": {
9
"steemit": "",
10
"twitter": "",
11
"youtube": "",
12
"facebook": "",
13
"github": "",
14
"reddit": "",
15
"keybase": "",
16
"telegram": "",
17
"wechat": ""
18
}
19
},
20
"server": {
21
"location": {
22
"country": "",
23
"city": ""
24
},
25
"server_type": "",
26
"api_endpoint": ""
27
}
28
}
  • representative: Basic information of Public Representative
    • logo: Logo images of P-Rep
      • logo_256: image 256x256px
      • logo_1024: image 1024x1024px
      • logo_sgv: image svg
    • media: URL and username of social media
      • steemit: Steemit URL
      • twitter: Twitter URL
      • youtube: Youtube URL
      • Facebook: Facebook URL
      • github: Github URL
      • reddit: Raddit URL
      • keybase: Username
      • telegram: Username
      • wechat: Username
  • server: Server information of Public Representative
    • location: Server location
      • name: Node location in human readable format [City, State]
      • country: Node country code [XX]
    • server_type: Type of server ‘cloud, on-premise, hybrid’
    • api_endpoint: HTTP endpoint http://host:port

How to use

Create a JSON file and upload it to your domain server. When you call the registerPRep or setPRepfunction, input the url of this file into the details field.

References

License

This project follows the Apache 2.0 License. Please refer to LICENSE for details.