Create an Instance of a DragonchainClient.
id of a target dragonchain
verify SSL Certs when talking to local dragonchains
used only for testing
Create a bulk transaction by string together a bunch of transactions as JSON objects into an array
array of transactions
Create a new Smart Contract on your Dragonchain.
Create a new Transaction on your Dragonchain.
This transaction, if properly structured, will be received by your dragonchain, hashed, and put into a queue for processing into a block.
A POST request is made to the callback URL when the transaction has settled into a block on the Blockchain.
The body of this POST request is the schema of an L1DragonchainTransactionFull.
The transaction_id
returned from this function can be used for checking the status of this transaction.
Most importantly; the block in which it has been fixated.
Deletes a smart contract
success message upon successful update
deleteTransactionType Deletes existing registered transaction type
Get a single block by ID
Reads secrets given to a smart contract
the name of the secret to retrieve for smart contract
Get a single smart contract by id
getSmartContractHeap
Get from the smart contract heap
This function, (unlike other SDK methods) returns raw utf-8 text by design.
If you expect the result to be parsed json pass true
as the jsonParse parameter.
the key under which data has been stored in heap
the name of smart contract
attempt to parse heap data as JSON. Throws JSONParse error if it fails.
get the status of your dragonchain
Get a transaction by Id.
The transaction id you are looking for.
Get all the verifications for one block_id.
listSmartcontractHeap List objects from a smart contract heap
the name of smart contract
the sub-key ('folder') to list in the SC heap (optional. Defaults to root of SC heap)
listTransactionTypes Lists current accepted transaction types for a chain
This method is used to override this SDK's attempt to automatically fetch credentials automatically with manually specified creds
Auth Key ID used in HMAC
Auth Key used in HMAC
Query blocks using ElasticSearch query-string syntax For more information on how to use the ElasticSearch query-string syntax checkout the Elastic Search documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax
Query smart contracts using ElasticSearch query-string syntax For more information on how to use the ElasticSearch query-string syntax checkout the Elastic Search documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax
Query transactions using ElasticSearch query-string syntax For more information on how to use the ElasticSearch query-string syntax checkout the Elastic Search documentation: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#query-string-syntax
registerTransactionType Registers a new transaction type
Change the dragonchainId for this DragonchainClient instance.
After using this command, subsequent requests to your dragonchain will attempt to re-locate credentials for the new dragonchain
The id of the dragonchain you want to set
Whether or not to set a new endpoint automatically (for managed chains at .api.dragonchain.com)
Change the endpoint for this DragonchainClient instance.
The endpoint of the dragonchain you want to set
Update your maximum price for each level of verification. This method is only relevant for L1 nodes.
maximum prices (0-1000) to set for each level (in DRGNs) If this number is too low, other nodes will not verify your blocks. Changing this number will affect older unverified blocks first.
Update your matchmaking data. If you are a level 2-4, you're required to update your asking price.
(0.0001-1000.0000) the price in DRGN to charge L1 nodes for your verification of their data. Setting this number too high will cause L1's to ignore you more often.
Broadcast Interval is only for level 5 chains
Updates existing contract fields
The docker image containing the smart contract logic
Entrypoint command to run in the docker container
Order of execution. Valid values 'parallel' or 'serial'
Change the state of a contract. Valid values are "active" and "inactive". You may only change the state of an active or inactive contract.
List of arguments to the cmd field
mapping of environment variables for your contract
mapping of secrets for your contract
The seconds of scheduled execution
The rate of scheduled execution specified as a cron
basic-auth for pulling docker images, base64 encoded (e.g. username:password)
updateTransactionType Updates a given transaction type structure
HTTP Client that interfaces with the dragonchain api, using credentials stored on your machine.
DragonchainClient