Last active
July 11, 2018 12:15
-
-
Save planethouki/46fc031b3dbd8095e2ae15b8ef563950 to your computer and use it in GitHub Desktop.
nem catapult.server 実行3 catapult.restの実行 ref: https://qiita.com/planethouki/items/066f65fcdeaf4bf68126
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rm -r data/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cp ../resources/* resources/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# apt-get install mongodb | |
# systemctl start mongodb | |
# systemctl enable mongodb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cd bin | |
# ./catapult.server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# git clone https://github.com/nemtech/catapult-rest.git | |
# cd catapult-rest | |
# ./yarn-setup.sh | |
# cd rest | |
# yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vi resources/rest.json | |
"clientPrivateKey": "DD67B12B3BF019390B8589428F8F1365080AC5B7F3E3A25B8840B3A1DFED9AF2", | |
"apiNode": { | |
"host": "127.0.0.1", | |
"port": 7900, | |
"publicKey": "0032A2CE81728DDFB0E7874AF8B98EC040418195721C1AEE2DD82776CCEC4551" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd _build | |
node index.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2018-05-22T13:35:25.161Z - info: connecting to mongodb://localhost:27017/ (database:catapult) | |
2018-05-22T13:35:25.195Z - verbose: connected to mongo at mongodb://localhost:27017/catapult | |
2018-05-22T13:35:25.196Z - info: registering routes | |
2018-05-22T13:35:25.223Z - info: listening on port 3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# curl http://localhost:3000/block/1 | |
{ | |
"meta": { | |
"hash": "6F4460D29E34A22B7760C7D78E822ACAF7B18BF5D697443C4C261377D45107F9", | |
"generationHash": "57F7DA205008026C776CB6AED843393F04CD458E0AA2D9F1D5F31A402072B2D6", | |
"totalFee": [ | |
0, | |
0 | |
], | |
"numTransactions": 25, | |
"merkleTree": [ | |
"FkTnEqnhg8WDl7d5AlO4lx0ydIEe2C5DJnLIqCHs9iE=", | |
(中略) | |
"AvlwrC+BEk2ZRqIh6VpKPN/rxWHI7KnXeMQsf8aYAaY=" | |
] | |
}, | |
"block": { | |
"signature": "C192053F939515322D9690F56636ED2F5FF6EDD59C73F17A2F27884030095119F05542B148B5FF36CA9D387EA1F2CF0FBE37E5FBD3F93BA3E882A8909C61230C", | |
"signer": "B4F12E7C9F6946091E2CB8B6D3A12B50D17CCBBF646386EA27CE2946A7423DCF", | |
"version": 36867, | |
"type": 32835, | |
"height": [ | |
1, | |
0 | |
], | |
"timestamp": [ | |
0, | |
0 | |
], | |
"difficulty": [ | |
276447232, | |
23283 | |
], | |
"previousBlockHash": "0000000000000000000000000000000000000000000000000000000000000000", | |
"blockTransactionsHash": "02F970AC2F81124D9946A221E95A4A3CDFEBC561C8ECA9D778C42C7FC69801A6" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bin/catapult.tools.address -g 10 --network mijin-test | |
--- generating 10 keys --- | |
private key: 6C07F78D8C932626F6550FB114C26EFAFE2EC40220E44E1EF0180D9FB89A0AF0 | |
public key: 8C2C06CCCDDFBC964345C051B3A94906813DCB198BA8A56378DA6ED1D2E99B58 | |
address (mijin-test): SCIXWKDPLL7L7IQO6LWN2HJXHYUV3F7ZQX3NUKM3 | |
private key: B14D75EADBB5C3DEE376E332FCD4AEB829A0F0A8DEE8933AA59B1FA13A7FE852 | |
public key: 0032A2CE81728DDFB0E7874AF8B98EC040418195721C1AEE2DD82776CCEC4551 | |
address (mijin-test): SCESGGNSG2VAT6QXXFDS57Z7VYFFY63MYJWEF7PD | |
...続く |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cp ../tools/nemgen/resources/mijin-test.properties resources/ | |
# vi resources/mijin-test.properties | |
cppFile = ../seed/mijin-test/MockMemoryBasedStorage_data.h | |
[distribution>nem:xem] | |
SCIXWKDPLL7L7IQO6LWN2HJXHYUV3F7ZQX3NUKM3 = 409'090'909'000'000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mkdir -p seed/mijin-test/0000 | |
# echo -n 6b23c0d5f35d1b11f9b683f0b0a617355deb11277d91ae091d399c655b87940d3f39d5c348e5b79d06e842c114e6cc571583bbf44e4b0ebfda1a01ec05745d43 > seed/mijin-test/00000/hashes.dat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ./bin/catapult.tools.nemgen ./resources/mijin-test.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mkdir -p data/00000 | |
# cp seed/mijin-test/00000/* data/00000/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vi resources/config-harvesting.properties | |
[harvesting] | |
harvestKey = 6C07F78D8C932626F6550FB114C26EFAFE2EC40220E44E1EF0180D9FB89A0AF0 | |
isAutoHarvestingEnabled = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vi resources/config-user.properties | |
[account] | |
bootKey = B14D75EADBB5C3DEE376E332FCD4AEB829A0F0A8DEE8933AA59B1FA13A7FE852 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vi resources/config-node.properties | |
[localnode] | |
roles = Api | |
[extensions] | |
extension.mongo = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment