You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/fiber-lib/src/rpc/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -515,7 +515,7 @@ Get the node information.
515
515
516
516
*`version` - <em>`String`</em>, The version of the node software.
517
517
*`commit_hash` - <em>`String`</em>, The commit hash of the node software.
518
-
*`node_id` - <em>[Pubkey](#type-pubkey)</em>, The identity public key of this node (secp256k1 compressed, hex string).
518
+
*`pubkey` - <em>[Pubkey](#type-pubkey)</em>, The identity public key of this node (secp256k1 compressed, hex string).
519
519
This is the same value referred to as `pubkey` in `list_peers` responses.
520
520
Note: this is different from `peer_id`, which is a base58 hash derived from this key.
521
521
*`features` - <em>`Vec<String>`</em>, The features supported by the node.
@@ -1370,7 +1370,7 @@ The Node information.
1370
1370
*`version` - <em>`String`</em>, The version of the node.
1371
1371
*`addresses` - <em>`Vec<MultiAddr>`</em>, The addresses of the node.
1372
1372
*`features` - <em>`Vec<String>`</em>, The node features supported by the node.
1373
-
*`node_id` - <em>[Pubkey](#type-pubkey)</em>, The identity public key of the node (secp256k1 compressed, hex string), same as `pubkey` in `list_peers`.
1373
+
*`pubkey` - <em>[Pubkey](#type-pubkey)</em>, The identity public key of the node (secp256k1 compressed, hex string), same as `pubkey` in `list_peers`.
1374
1374
*`timestamp` - <em>`u64`</em>, The latest timestamp set by the owner for the node announcement.
1375
1375
When a Node is online this timestamp will be updated to the latest value.
1376
1376
*`chain_hash` - <em>[Hash256](#type-hash256)</em>, The chain hash of the node.
@@ -1428,7 +1428,7 @@ The information about a peer connected to the node.
1428
1428
1429
1429
#### Fields
1430
1430
1431
-
*`pubkey` - <em>[Pubkey](#type-pubkey)</em>, The identity public key of the peer (also known as `node_id`).
1431
+
*`pubkey` - <em>[Pubkey](#type-pubkey)</em>, The identity public key of the peer.
1432
1432
*`address` - <em>`MultiAddr`</em>, The multi-address associated with the connecting peer.
1433
1433
Note: this is only the address which used for connecting to the peer, not all addresses of the peer.
1434
1434
The `graph_nodes` in Graph rpc module will return all addresses of the peer.
@@ -1447,7 +1447,7 @@ A wrapper for secp256k1 secret key
1447
1447
### Type `Pubkey`
1448
1448
1449
1449
A compressed secp256k1 public key (33 bytes), used as the primary identity of a node.
1450
-
In the RPC interface this value is also referred to as `node_id`.
1450
+
In the RPC interface this value is exposed as fields such as `pubkey`.
1451
1451
It is serialized as a 66-character hex string (e.g. `"02aaaa..."`) in JSON.
1452
1452
1453
1453
Note: `Pubkey` is different from `PeerId`. A `PeerId` is derived by hashing the
Copy file name to clipboardExpand all lines: docs/glossary.md
+6-27Lines changed: 6 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,33 +44,12 @@ The "Asset Handling Fee." Intermediate nodes lock up their own liquidity to forw
44
44
## Watchtower
45
45
Your "Asset Bodyguard." Since channel asset states are stored off-chain, a dishonest partner might try to broadcast an "old agreement" to steal funds while you are offline. A Watchtower monitors the CKB chain 24/7 and automatically intercepts any cheating attempts, punishing the attacker.
46
46
47
-
## Node Identifiers: Pubkey, Node ID, and Peer ID
47
+
## Node Identifiers: Pubkey and Peer ID
48
48
49
-
A Fiber node has two forms of identity. They look different, serve different purposes, and are **not interchangeable** in RPC calls.
49
+
Fiber uses two identity forms:
50
50
51
-
### Pubkey (aka Node ID)
51
+
-**Pubkey**: a 33-byte compressed secp256k1 public key (66-char hex), e.g. `"02ab1234..."`.
52
+
-**Peer ID**: a base58 transport identifier derived from the pubkey.
52
53
53
-
A 33-byte compressed secp256k1 public key, displayed as a 66-character hex string (e.g. `"02ab1234..."`). This is the cryptographic identity of a node. In the RPC interface it appears under several field names depending on context:
All of the above are the same type (`Pubkey`) and can be used wherever a `Pubkey` is expected.
63
-
64
-
### Peer ID
65
-
66
-
A base58-encoded string (e.g. `"QmYJnK7..."`), derived by **hashing** the node's `Pubkey`. This is used by the P2P transport layer to identify network connections. The derivation is one-way: you cannot recover a `Pubkey` from a `Peer ID`.
0 commit comments