diff --git a/openapi.yaml b/openapi.yaml index e4560e96..490b989d 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -105,6 +105,7 @@ components: - addrs - spr - announceAddresses + - libp2pPubKey - table - storage properties: @@ -116,10 +117,18 @@ components: $ref: "#/components/schemas/MultiAddress" spr: $ref: "#/components/schemas/SPR" + providerRecord: + $ref: "#/components/schemas/SPR" announceAddresses: type: array items: $ref: "#/components/schemas/MultiAddress" + libp2pPubKey: + type: string + description: Hex-encoded libp2p public key of the node + mixPubKey: + type: string + description: Hex-encoded mix public key (present only for nodes that support mix) table: $ref: "#/components/schemas/PeersTable" storage: diff --git a/storage/rest/json.nim b/storage/rest/json.nim index e2277a98..e35aa688 100644 --- a/storage/rest/json.nim +++ b/storage/rest/json.nim @@ -6,6 +6,7 @@ import pkg/libp2p_mix import pkg/libp2p_mix/curve25519 import pkg/codexdht/discv5/node as dn import pkg/codexdht/discv5/routing_table as rt +import pkg/stew/byteutils import ../node import ../conf import ../utils/json @@ -108,7 +109,7 @@ proc init*(_: type DebugInfo, node: StorageNodeRef): DebugInfo = peerId = peerInfo.peerId libp2pPubKeyBytes = peerInfo.publicKey.getBytes() - # Cause there's no cannonical way to get your own key from MixProtocol + # Cause there's no canonical way to get your own key from MixProtocol # that I'm aware of. privateAccess(MixProtocol)