/build/rpc / cosign / bulletin_board
cosign.init_bb
- workflowspot-trade·step 1 of 9Workflow: spot-trade · step 1 of 9
cosign.init_bb ( ["url",...] "nostr_key_path" ) Initialize bulletin board connection (Nostr relays). Offers will be compartmentalized by the current chain (main/signet/testnet3/regtest). Arguments: 1. relays (json array, optional) List of Nostr relay URLs [ "url", (string) Relay WebSocket URL (wss://...) ... ] 2. nostr_key_path (string, optional) Path to Nostr key file (default: ~/.tensorcash/nostr_keys) Result: { (json object) "success" : true|false, (boolean) Whether initialization succeeded "pubkey" : "hex", (string) Nostr public key (hex) "relays" : [ (json array) Connected relay URLs "str", (string) Relay URL ... ], "network" : "str" (string) Bitcoin network (main, signet, testnet3, regtest) } Examples: > bitcoin-cli cosign.init_bb > bitcoin-cli cosign.init_bb '["wss://relay.damus.io","wss://nos.lol"]' > curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "cosign.init_bb", "params": []}' -H 'content-type: application/json' http://127.0.0.1:8332/
Signature
cosign.init_bb(relays?: array, nostr_key_path?: string) → any Code samples
curl --user "$RPC_USER:$RPC_PASS" \
--data-binary '{"jsonrpc":"1.0","id":"docs","method":"cosign.init_bb","params":[[],"\"<nostr_key_path>\""]}' \
-H 'content-type: text/plain;' \
http://127.0.0.1:8332/ Parameters
| Name | Type | Req. | Description |
|---|---|---|---|
| relays | any[] | — | List of Nostr relay URLs [ "url", (string) Relay WebSocket URL (wss://...) ... ] |
| nostr_key_path | string | — | Path to Nostr key file (default: ~/.tensorcash/nostr_keys) |
Result
Type: any
{ (json object) "success" : true|false, (boolean) Whether initialization succeeded "pubkey" : "hex", (string) Nostr public key (hex) "relays" : [ (json array) Connected relay URLs "str", (string) Relay URL ... ], "network" : "str" (string) Bitcoin network (main, signet, testnet3, regtest) }
Source: services/core-node/bcore/src/rpc/cosign.cpp:1730
C++ symbol: cosign_init_bb