EndPoints

User communicates with the node thats running in the background via REST APIs and CLI. Below listed are the Endpoints with which user can able to view information, transfer tokens and so on.

FieldSample UsageDescriptionFlags
Run Rubix node./rubixgoplatform run -p node1 -n 0 -s -grpcPort 10500Creates a unique Decentralized IDentityThis following options are used to run the Rubix node

-c string
Configuration file for the core (default “api_config.json”)
-k string
Config file encryption key (default “TestKeyBasic#2022”)
-n uint
Node number
-p string
Working directory path (default “./")

-s
Start the core
-testNet
Run as test net
-testNetKey stringTest net key (default “testswarm.key”)
Create DID./rubixgoplatform createdidThis command is used for creating a Decentralized IDentity (DID).-addr string
Server/Host Address (default “localhost”)
-port string
Server/Host port (default “20000”)
-didType int
DID type (0-Basic Mode, 1-Standard Mode, 2-Wallet Mode) (default 0)
-didSecret string
DID secret (default “My DID Secret”)
-privPWD string
Private key password (default “mypassword”)
-quorumPWD string
Quroum key password (default “mypassword”)
-imgFile string
Image file to create DID (Must be 256x256 PNG image) (default “image.png”)
-didImgFile string
DID image file name (default “did.png”)
-privImgFile string
DID private share image file name (default “pvtShare.png”)
-pubImgFile string
DID public share image file name (default “pubShare.png”)
-privKeyFile string
DID private key file name (default “pvtKey.pem”)
-pubKeyFile string
DID public key file name (default “pubKey.pem”)
Add Bootstrap./rubixgoplatform addbootstrap -peers /ip4/103.60.213.76/tcp/4001/p2p/QmR1VH6SsEN1wf4EmstxXtNMvR35KEetbBetiGWWKWavJ6This command is used to add bootstrap peers.-addr string
Server/Host Address (default “localhost”)
-peers string
Bootstrap peers, multiple peers will be separated by a comma
-port string
Server/Host port (default “20000”)
Remove Bootstrap./rubixgoplatform removebootstrap -peers /ip4/103.60.213.76/tcp/4001/p2p/QmR1VH6SsEN1wf4EmstxXtNMvR35KEetbBetiGWWKWavJ6This command is used for removing bootstrap peers.-addr string
Server/Host Address (default “localhost”)
-peers string
Bootstrap peers, multiple peers will be separated by a comma
-port string
Server/Host port (default “20000”)
Remove All Bootstrap./rubixgoplatform removeallbootstrapThis command is used for removing all bootstrap peers.-addr string
Server/Host Address (default “localhost”)
-port string
Server/Host port (default “20000”)
Get All Bootstrap./rubixgoplatform getallbootstrapThis command is used for retrieving all bootstrap peers.-addr string
Server/Host Address (default “localhost”)
-port string
Server/Host port (default “20000”)
Get All DID./rubixgoplatform getalldidThis command is used for retrieving all Decentralized IDentities (DIDs).-addr string
Server/Host Address (default “localhost”)
-port string
Server/Host port (default “20000”)
Add Quorum./rubixgoplatform addquorumThis command is used for adding a quorum.-addr string
Server/Host Address (default “localhost”)
-port string
Server/Host port (default “20000”)
-quorumList string
Quorum list file name (default “quorumlist.json”)
Get All Quorum./rubixgoplatform getallquorumThis command is used for retrieving all quorum details.-addr string
Server/Host Address (default “localhost”)
-port string
Server/Host port (default “20000”)
Remove All Quorum./rubixgoplatform removeallquorumUse this command to remove all quorum lists.-addr string
Server/Host Address (default “localhost”)
-port string
Server/Host port (default “20000”)
Setup Quorum./rubixgoplatform setupquorumUse this command to set up a quorum, providing a quorum private key password.-addr string
Server/Host Address (default “localhost”)
-port string
Server/Host port (default “20000”)
-quorumPWD string
Quorum key password (default “mypassword”)
Get Account Info./rubixgoplatform getaccountinfoUse this command to get account information on the node.-addr string
Server/Host Address (default “localhost”)
-port string
Server/Host port (default “20000”)
-did string
DID address (default “")
Dump Token Chain./rubixgoplatform dumptokenchainUse this command to dump the token chain on the node.-addr string
Server/Host Address (default “localhost”)
-port string
Server/Host port (default “20000”)
-token string
Token address (default “")
Setup Service./rubixgoplatform setupserviceUse this command to set up a service.-addr string
Server/Host Address (default “localhost”)
-port string
Server/Host port (default “20000”)
-srvName string
Service name (default “explorer_service”)
-dbAddress string
Database address (default “localhost”)
-dbName string
Explorer database name (default “ExplorerDB”)
-dbPassword string
Database password (default “password”)
-dbPort string
Database port number (default “1433”)
-dbType string
DB Type (default “SQLServer”)
-dbUsername string
Database username (default “sa”)

*Note: For nodes running in port other than 20000, you need to explicilty mention the port using the flag -port <port number> to all the commands

CommandSample UsageDescriptionOptions
Transfer RBT./rubixgoplatform transferrbtUse this command to transfer RBT (Rubix Tokens).-addr string
Server/Host Address (default “localhost”)
-port string
Server/Host port (default “20000”)
-senderAddr string
Sender address (default “")
-receiverAddr string
Receiver address (default “")
-rbtAmount float
RBT amount to be transferred (default 0.0)
-transComment string
Transfer comment (default “Test transaction”)
-transType int
Transaction type (default 2)
-fp
Force password to be entered on the terminal
-privPWD string
Private key password (default “mypassword”)
-privImgFile string
DID private share image file name (default “pvtShare.png”)
-privKeyFile string
DID private key file name (default “pvtKey.pem”)
FieldEndpointDescriptionSample Request
Transfer Tokensapi/initiate-rbt-transferTransfers token(s) from one wallet address to anothercurl -X 'POST' 'http://localhost:20000/api/initiate-rbt-transfer' -H 'accept: application/json' -H 'Content-Type: application/json' \-d '{"comment": "string","receiver": "string","sender": "string","tokenCOunt": 0,"type": 0}'
Provide Signature/api/signature-responseSupply the password for the node along with the ID generated when Initiate RBT transfer is called.curl -X 'POST' 'http://localhost:20000/api/signature-response' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"id": "string","mode": 0,"password": "string"}'
FieldEndpointDescriptionSample Request
Account Information/api/get-account-infoRetrieves the user account detailscurl -X 'GET' 'http://localhost:20000/api/get-account-info?did=<did>' -H 'accept: application/json'
Get Transaction Details with transcation IDapi/get-by-txnIdRetrieves the details of the transactions for the given IDcurl -X 'GET' 'http://localhost:20000/api/get-by-txnId?txnID=<Transaction ID' -H 'accept: application/json'
Get Transaction Details with Comment/api/get-by-commentRetrieves the details of all the transactions committed with the specified comment.curl -X 'GET' 'http://localhost:20000/api/get-by-comment?Comment=<Comment>' -H 'accept: application/json'
Get Transaction Details with User’s DIDapi/get-by-didRetrieves all the transactions made with the input DIDcurl -X 'GET' 'http://localhost:20000/api/get-by-did?DID=<DID>&Role=<Sender/Receiver>' -H 'accept: application/json'