1. init a MySQL database with this [schema](./federation.sql);
2. run a `bytomd` node;
3. run a `vapord` node and import the federation private key;
-4. and last but not least, run a `fedd` node with a `fed_cfg.json`.
+4. and last but not least, run a `fedd` node with a `fed_cfg.json` and it will listen at 9886 port.
A `fed_cfg.json` would look like this:
```json
{
"api" : {
- "listening_port" : 3000,
"is_release_mode": false
},
"mysql" : {
},
"log_mode" : true
},
- "warders" : [
- {
- "position" : 1,
- "xpub" : "50ef22b3a3fca7bc08916187cc9ec2f4005c9c6b1353aa1decbd4be3f3bb0fbe1967589f0d9dec13a388c0412002d2c267bdf3b920864e1ddc50581be5604ce1"
- }
- ],
- "quorum": 1,
+ "network" : "testnet",
+ "federation_prog" : "0020305dc12c0dbec0c1dc1f30e835034c1f19094c06afb0eb953a6d1af42222a721",
"mainchain" : {
- "name" : "bytom",
+ "name" : "btm",
"confirmations" : 10,
"upstream" : "http://127.0.0.1:9888",
"sync_seconds" : 150
```js
// Request
-curl -X POST 127.0.0.1:3000/api/v1/federation/list-crosschain-txs -d '{}'
+curl -X POST 127.0.0.1:9886/api/v1/federation/list-crosschain-txs -d '{}'
// Result
{