7.4 Off-BSN system Access Guide
7.4.1 Overview
BSN provides shared or dedicated public chain nodes for public chain application developers. Developers can quickly access all public chain networks by accessing the gateway of the public city node.
After developers select the public chain framework (netcode) in the BSN portal to create the public chain project, they will get the gateway’s domain name address (url), project number (id), project key (key), public chain supportive protocol {protocol}
and public chain gateway API address.
The developer accessing the PCN gateway via HTTP should concatenate the request address in "https://{url}/api/{id}/{netcode}/{protocol}/{subUrl}"
format. If project key is enabled, "x-APi-key:{key}"
should be added to the request header. If the public chain nodes provide multiple components, they should add {subUrl}
; If the Nervos CKB has an Indexer component service in addition to the RPC service, "{subUrl}"
should fill the indexer value, {subUrl}
is optional.
The developer accessing the node gateway via WebSocket, should concatenate the Key and SubUrl to the path address of the target machine and concatenate to the format of {url}/api/{id}/{key}/{netcode}/{subUrl}
. If the project key is not enabled, then the {key}
filed should be null. If there is no subUrl, this field can be null. That is, developers can think of the content after/API as the method name of a target machine.