dashhive / crowdnode.js

CrowdNode SDK for Node.js
https://github.com/dashhive/crowdnode.js
MIT License
5 stars 3 forks source link

Request API from CrowdNode #3

Open coolaj86 opened 2 years ago

coolaj86 commented 2 years ago

Re: https://discord.com/channels/484546513507188745/501115691634786339/986453482343125004

Plain Text

curl -X GET https://test.crowdnode.io/odata/apifundings/HotWallet \
    -H 'Accept: text/plain'
yMY5bqWcknGy5xYBHSsh2xvHZiJsRucjuy

JSON

curl -X GET https://test.crowdnode.io/odata/apifundings/HotWallet \
    -H 'Accept: application/json'
{ "PubKeyHash": "yMY5bqWcknGy5xYBHSsh2xvHZiJsRucjuy" }

Alternate

coolaj86 commented 2 years ago

Also, let's get the API in... the API:

https://test.crowdnode.io/odata/apifundings/BlockChainAPI

{
  "offset": 20000,
  "requests": {
    "acceptTerms": 65536,
    "signupForApi": 131072,
    "toggleInstantPayout": 4096,
    "withdrawMin": 1,
    "withdrawMax": 1000,
    "depositMin": 1001
  },
  "responses": {
    "2": "PleaseAcceptTerms",
    "4": "WelcomeToCrowdNodeBlockChainAPI",
    "8": "DepositReceived",
    "16": "WithdrawalQueued",
    "32": "WithdrawalFailed", // Most likely too small amount requested for withdrawal.
    "64": "AutoWithdrawalEnabled",
    "128": "AutoWithdrawalDisabled"
  }
}