API EndPoints

FieldEndpointDescriptionSample Request
Deploy Smart Contract/api/deploy-smart-contractThis API will deploy smart contract Tokencurl --header "Content-Type: application/json" --request POST 'http://localhost:20000/api/deploy-smart-contract' --data '{ "smartContractToken": "your_token", "deployerAddr": "your_address", "rbtAmount": 100, "quorumType": 2, "comment": "your_comment" }'
Generate Smart Contract/api/generate-smart-contractThis API will Generate smart contract Tokencurl --location --request POST 'http://localhost:20000/api/generate-smart-contract' --form 'did="your_did"' --form 'binaryCodePath=@"path_to_binary_code"' --form 'rawCodePath=@"path_to_raw_code"' --form 'schemaFilePath=@"path_to_schema"'
Fetch Smart Contract/api/fetch-smart-contractThis API will Fetch smart contractcurl --header "Content-Type: application/json" --request POST 'http://localhost:20000/api/fetch-smart-contract' --data '{ "smart_contract_token": "your_token" }'
Publish Smart Contract/api/publish-contractThis API endpoint publishes a smart contract.curl --header "Content-Type: application/json" --request POST 'http://localhost:20000/api/publish-contract' --data '{ "contract": "your_contract", "did": "your_did", "contract_block_hash": "your_hash" }'
Subscribe to Smart Contract/api/subscribe-contractThis API endpoint allows subscribing to a smart contract.curl --header "Content-Type: application/json" --request POST 'http://localhost:20000/api/subscribe-contract' --data '{ "contract": "your_contract" }'
Execute Smart Contract/api/execute-smart-contractThis API will Execute smart contract Tokencurl --header "Content-Type: application/json" --request POST 'http://localhost:20000/api/execute-smart-contract' --data '{ "smartContractToken": "your_token", "executorAddr": "your_address", "quorumType": 2, "comment": "your_comment", "smartContractData": "your_data" }'

Note: The default port is 20000. If you are using a different port, please modify the sample requests accordingly.