Skip to content

Commit

Permalink
Merge branch '437-last-call-for-api-documentation-update' into 'dev'
Browse files Browse the repository at this point in the history
Resolve "last call for api documentation update"

Closes #437

See merge request massalabs/massa!400
  • Loading branch information
damip committed Nov 3, 2021
2 parents e6919e7 + 327cf2d commit 79284b3
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ slot, timestamp), clique count, connected nodes count.
"final_operation_count": Number,
"stale_block_count": Number,
"clique_count": Number,
"staker_count": Number, // current number of active stakers
},
"pool_stats": {
"operation_count": Number,
Expand Down Expand Up @@ -99,11 +100,7 @@ Returns the active stakers and their roll counts for the current cycle.
- Return:

```javascript
[Address: {
"active_rolls": Number, // rolls that are taken in account right now
"final_rolls": Number, // rolls according to last final blocks
"candidate_rolls": Number, // rolls acccording to last blocks
}, ... ]
{Address: Number, ... } // Dictionnary associating staker addresses to their active roll counts
```

### `get_operations`
Expand All @@ -130,6 +127,7 @@ Returns operations information associated to a given list of operations' IDs.
"fee": Number, // in coins
"expire_period": Number,
"op": OperationType, // TODO not sure how this go in JSON

}
"signature": String,
}
Expand Down Expand Up @@ -163,7 +161,7 @@ Get endorsements (not yet implemented)
}
"signature": String
}
}, ... ]
}, ... ] // TODO
```

### `get_blocks`
Expand Down Expand Up @@ -200,7 +198,7 @@ Get information on a block given its hash.
"endorsed_block": String // BlockId,
}
"signature": String
}, ... ],
}, ... ], // TODO
},
"signature": Signature,
},
Expand All @@ -212,10 +210,10 @@ Get information on a block given its hash.
"op": OperationType, // TODO not sure how this go in JSON
}
"signature": String,
}, ... ],
}, ... ], // TODO
},
},
}, ... ]
}, ... ] // TODO
```

### `get_graph_interval`
Expand All @@ -242,7 +240,7 @@ Get the block graph within the specified time interval.
"slot": {"period": Number, "thread", Number},
"creator": String // Address,
"parents": [String] // BlockId,
}, ... ]
}, ... ] // TODO
```

### `get_addresses`
Expand Down Expand Up @@ -277,7 +275,7 @@ Get addresses.
"involved_in_endorsements": [String], // Endorsement ids,
"involved_in_operations": [String], // Operation ids,
"is_staking": bool,
}, ... ]
}, ... ] // TODO
```

### `send_operations`
Expand All @@ -296,7 +294,7 @@ pool.
"op": OperationType, // TODO not sure how this go in JSON
}
"signature": String,
}, ... ]
}, ... ] // TODO
```

- Return:
Expand All @@ -313,7 +311,7 @@ Gracefully stop the node.

- No parameters.

- No return.
- No return.

### `node_sign_message`

Expand All @@ -332,7 +330,7 @@ Sign message with node's key.
```

Where public_key is the public key used to sign the input and signature,
the resulting signature.
the resulting signature.

### `add_staking_private_keys`

Expand All @@ -346,7 +344,7 @@ Add a vec of new private keys for the node to use to stake.

The strings must be private keys.

- No return.
- No return.

### `remove_staking_addresses`

Expand All @@ -360,7 +358,7 @@ Remove a vec of addresses used to stake.

The strings must be addresses.

- No return.
- No return.

### `get_staking_addresses`

Expand All @@ -374,7 +372,7 @@ Return hashset of staking addresses.
[String]
```

The strings are addresses.
The strings are addresses.

### `ban`

Expand All @@ -388,7 +386,7 @@ Bans given IP addresses.

The strings must be ip addresses.

- No return.
- No return.

### `unban`

Expand Down

0 comments on commit 79284b3

Please sign in to comment.