Generate a new HMAC API key
nickname for the newly created key
Permissions document to use with this key
Create (or overwrite) a binance wallet/network for interchain use
The port being used to hit the API endpoints (i.e. 1169)
The name of the network to update
The endpoint of the binance node to use (i.e. http://my.node.address)
The base64 or hex encoded private key (or mnemonic) to use. Will automatically generate a random one if not provided
The port being used to hit the RPC endpoints (i.e. 27147)
Whether or not this is a testnet wallet/address. Defaults to True.
Create (or overwrite) a bitcoin wallet/network for interchain use
The name of the network to update
The base64 encoded private key, or WIF for the desired wallet
The endpoint of the bitcoin core RPC node to use (i.e. http://my-node:8332)
The base64-encoded username:password for the rpc node. For example, user: a pass: b would be 'YTpi' (base64("a:b"))
Whether or not this is a testnet wallet/address (not required if providing privateKey as WIF)
Whether or not to force a utxo-rescan for the address. If using a new private key for an existing wallet with funds, this must be true to use its existing funds
!This method is deprecated and should not be used! Backwards compatibility will exist for legacy chains, but will not work on new chains. signBitcoinTransaction should be used instead
Sign a transaction for a bitcoin network
Change address to use for this transaction. If not supplied, this will be the source address
String data to embed in the transaction as null-data output type
The bitcoin network that the transaction is for (mainnet or testnet)
The desired bitcoin outputs to create for this transaction
The desired fee in satoshis/byte. Must be an integer
If not supplied, an estimate will be automatically generated
Create a bulk transaction to send many transactions to a chain with only a single call
Create (or overwrite) an ethereum wallet/network for interchain use
The ethereum chain id to use. Will automatically derive this if providing a custom rpcAddress. This should be an integer. Without providing a custom rpcAddress, Dragonchain manages and supports: 1=ETH Mainnet|3=ETH Ropsten|61=ETC Mainnet
The name of the network to update
The base64 or hex encoded private key to use. Will automatically generate a random one if not provided
The endpoint of the ethereum RPC node to use (i.e. http://my-node:8545)
!This method is deprecated and should not be used! Backwards compatibility will exist for legacy chains, but will not work on new chains. signEthereumTransaction should be used instead
Sign a transaction for an ethereum network
The (hex-encoded) string of extra data to include with this transaction
The (hex-encoded) gas limit for this transaction. If not supplied, this will be estimated automatically
The (hex-encoded) gas price in gwei to pay. If not supplied, this will be estimated automatically
The ethereum network that the transaction is for (ETH/ETC mainnet or testnet)
The (hex-encoded) address to send the transaction to
The (hex-encoded) number of wei to send with this transaction
Create a new Smart Contract on your Dragonchain
The list of arguments to use in conjunction with cmd
The command to run in your docker container for your application
Schedule a smart contract to be automatically executed on a cadence via a cron expression
Note: This is a mutually exclusive parameter with scheduleIntervalInSeconds
The custom indexes that should be associated with the transaction type for this smart contract
JSON object key-value pairs of strings for environments variables provided to the smart contract on execution
The execution of the smart contract, can be serial
or parallel
. Will default to parallel
If running in serial, the contract will be queued and executed in order, only one at a time
If running in parallel, the contract will be executed as soon as possible after invocation, potentially out of order, and many at a time
Docker image to use with the smart contract. Should be in the form registry/image:tag (or just image:tag if it's a docker hub image)
The basic-auth credentials necessary to pull the docker container.
This should be a base64-encoded string of username:password
for the docker registry
Schedule a smart contract to be automatically executed every x
seconds
For example: if 10
is supplied, then this contract will be automatically invoked and create a transaction once every 10 seconds
This value should be a whole integer, and not a decimal
Note: This is a mutually exclusive parameter with cronExpression
JSON object key-value pairs of strings for secrets provided to the smart contract on execution
These are more securely stored than environment variables, and can be accessed during execution the smart contract by using the getSmartContractSecret
method of the sdk
Transaction type to assign to this new smart contract
Must not already exist as a transaction type on the chain
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 transaction_id
returned from this function can be used for checking the status of this transaction, including the block in which it was included.
URL to callback when this transaction is processed
Payload of the transaction. Must be a utf-8 encodable string, or any json object
Tag of the transaction which gets indexed and can be searched on for queries
The transaction type to use for this new transaction. This transaction type must already exist on the chain (via createTransactionType
)
Create a new transaction type for ledgering transactions
The custom indexes that should be associated with this transaction type
The string of the transaction type to create
Delete an existing HMAC API key
the key id of the key to delete
Delete an interchain network/wallet from the chain
The blockchain type to delete (i.e. 'bitcoin', 'ethereum')
The name of that blockchain's network (set when creating the network)
Deletes a deployed smart contract
The id of the smart contract to delete. Should be a guid
Transaction type of the smart contract, mutually exclusive with smartContractId
Deletes an existing registered transaction type
The name of the transaction type to delete
Get metadata about an existing HMAC API key
the key id of the key to get
Get a single block by ID
ID of the block to fetch
Get the set default interchain network for this chain (L5 Only)
Get a configured interchain network/wallet from the chain
The blockchain type to get (i.e. 'bitcoin', 'ethereum')
The name of that blockchain's network (set when creating the network)
Get chain ids for the pending verifications for a block. Note that this is only relevant for level 1 chains.
The block ID to retrieve pending verifications for
!This method is deprecated and should not be used! Backwards compatibility will exist for legacy chains, but will not work on new chains. listInterchainNetworks should be used instead
Gets a list of the chain's interchain addresses
Get a single smart contract by one of id or transaction type
Contract id to get, mutually exclusive with transactionType
Transaction id of smart contract to get, mutually exclusive with smartContractId
Get a single smart contract by one of id or transaction type
RFC3339 timestamp string. Returns all logs since this datetime string
Contract id to get logs from
Tail, the maximum number of logs to return (unsigned integer)
Get an object from the smart contract heap. This is used for getting stateful data set by the outputs of smart contracts
Key of the object to retrieve
Smart contract to get the object from
When running from within a smart contract, this is provided via the SMART_CONTRACT_ID environment variable, and doesn't need to be explicitly provided
Reads secrets provided to a smart contract
Note: This will only work when running within a smart contract, given that the smart contract was created/updated with secrets
the name of the secret to retrieve for smart contract
Get the status of your dragonchain
Get a transaction by id
the transaction id of the transaction to get
Gets an existing transaction type from the chain
The name of the transaction type to get
Get verifications for a block. Note that this is only relevant for level 1 chains
The block ID to retrieve verifications for
The level of verifications to retrieve (2-5). If not supplied, all levels are returned
List HMAC API key IDs and their associated metadata
List all the interchain network/wallets for a blockchain type
The blockchain type to get (i.e. 'bitcoin', 'ethereum')
List objects from a folder within the heap of a smart contract
The folder to list from the heap. Please note this CANNOT end in a '/'
If nothing is provided, it will list at the root of the heap
Smart contract to list the objects from
When running from within a smart contract, this is provided via the SMART_CONTRACT_ID environment variable, and doesn't need to be explicitly provided
Get all smart contracts on a chain
Lists currently created transaction types
Publish an interchain transaction that's already been signed
The blockchain type to set (i.e. 'bitcoin', 'ethereum')
The name of that blockchain's network to use (set when creating the network)
Signed transaction string (return from sign
Query transactions using Redisearch query-string syntax
For more information on how to use the Redisearch query-string syntax checkout their documentation: https://oss.redislabs.com/redisearch/Query_Syntax.html
Note that blocks have the following fields: block_id - sortable Numeric field timestamp - sortable Numeric field prev_id - sortable Numeric field
If true, rather than an array of block objects, it will return an array of block id strings instead
Pagination limit (default 10) Must be an integer
Pagination offset of query (default 0) Must be an integer
Redisearch query syntax string to search with https://oss.redislabs.com/redisearch/Query_Syntax.html
If sortBy is set, this sorts the results by that field in ascending order (descending if false)
The name of the field to sort by
Query transactions using Redisearch query-string syntax
For more information on how to use the Redisearch query-string syntax checkout their documentation: https://oss.redislabs.com/redisearch/Query_Syntax.html
Note that transactions have the following fields: timestamp - sortable Numeric field block_id - sortable Numeric field tag - Text field
Transaction types can also have additional custom fields if specified when creating the relevant transaction type/smart contract
If true, rather than an array of transaction objects, it will return an array of transaction id strings instead
Pagination limit (default 10) Must be an integer
Pagination offset of query (default 0) Must be an integer
Redisearch query syntax string to search with https://oss.redislabs.com/redisearch/Query_Syntax.html
If sortBy is set, this sorts the results by that field in ascending order (descending if false)
The name of the field to sort by
The single transaction type to query
Whether or not to use redisearch's VERBATIM (if true, no stemming occurs on the query)
Set the default interchain network for the chain to use (L5 Only)
The blockchain type to set (i.e. 'bitcoin', 'ethereum')
The name of that blockchain's network to use (set when creating the network)
Create and sign a binance transaction using your chain's interchain network
the amount of token to send with this transaction
string of data to publish in the transaction (defaults to "")
The name of the binance network to use for signing
the exchange symbol for the token (defaults to BNB)
The (hex-encoded) address to send the transaction to
Sign a transaction for a bitcoin network on the chain
Change address to use for this transaction. If not supplied, this will be the source address
String data to embed in the transaction as null-data output type
The name of the bitcoin network to use for signing
The desired bitcoin outputs to create for this transaction
The desired fee in satoshis/byte. Must be an integer
If not supplied, an estimate will be automatically generated
Create and sign an ethereum transaction using your chain's interchain network
The (hex-encoded) string of extra data to include with this transaction
The (hex-encoded) gas limit for this transaction. If not supplied, this will be estimated automatically
The (hex-encoded) gas price in gwei to pay. If not supplied, this will be estimated automatically
The name of the ethereum network to use for signing
The (hex-encoded) nonce for this transaction. If not supplied, it will be fetched automatically
The (hex-encoded) address to send the transaction to
The (hex-encoded) number of wei to send with this transaction
Update nickname of existing HMAC API key
Key ID to modify
New nickname to set for key
New permissions document to assign to this key
Update an existing binance wallet/network for interchain use
The port being used to hit the API endpoints (i.e. 1169)
The name of the network to update
The endpoint of the binance node to use (i.e. http://my.node.address)
The base64 or hex encoded private key to use. Will automatically generate a random one if not provided
The port being used to hit the RPC endpoints (i.e. 27147)
Whether or not this is a testnet wallet/address. Defaults to True.
Update an existing bitcoin wallet/network for interchain use. Will only update the provided fields
The name of the network to update
The base64 encoded private key, or WIF for the desired wallet
The endpoint of the bitcoin core RPC node to use (i.e. http://my-node:8332)
The base64-encoded username:password for the rpc node. For example, user: a pass: b would be 'YTpi' (base64("a:b"))
Whether or not this is a testnet wallet/address (not required if providing privateKey as WIF)
Whether or not to force a utxo-rescan for the address. If using a new private key for an existing wallet with funds, this must be true to use its existing funds
Update an existing ethereum wallet/network for interchain use
The ethereum chain id to use. Will automatically derive this if providing a custom rpcAddress. This should be an integer. Without providing a custom rpcAddress, Dragonchain manages and supports: 1=ETH Mainnet|3=ETH Ropsten|61=ETC Mainnet
The name of the network to update
The base64 or hex encoded private key to use. Will automatically generate a random one if not provided
The endpoint of the ethereum RPC node to use (i.e. http://my-node:8545)
Update an existing Smart Contract on your Dragonchain
Note that all parameters (aside from contract id) are optional, and only supplied parameters will be updated
The list of arguments to use in conjunction with cmd
The command to run in your docker container for your application
Schedule a smart contract to be automatically executed on a cadence via a cron expression
Note: This is a mutually exclusive parameter with scheduleIntervalInSeconds
Set true to remove the existing scheduleIntervalInSeconds or cronExpression from the contract
Boolean whether or not the contract should be enabled, and able to be invoked
JSON object key-value pairs of strings for environments variables provided to the smart contract on execution
The execution of the smart contract, can be serial
or parallel
. Will default to parallel
If running in serial, the contract will be queued and executed in order, only one at a time
If running in parallel, the contract will be executed as soon as possible after invocation, potentially out of order, and many at a time
Docker image to use with the smart contract. Should be in the form registry/image:tag (or just image:tag if it's a docker hub image)
The basic-auth credentials necessary to pull the docker container.
This should be a base64-encoded string of username:password
for the docker registry
Schedule a smart contract to be automatically executed every x
seconds
For example, if 10
is supplied, then this contract will be automatically invoked and create a transaction once every 10 seconds
This value should be a whole integer, and not a decimal
Note: This is a mutually exclusive parameter with cronExpression
JSON object key-value pairs of strings for secrets provided to the smart contract on execution
These are more securely stored than environment variables, and can be accessed during execution the smart contract by using the getSmartContractSecret
method of the sdk
Smart contract id of which to update. Should be a guid
HTTP Client that interfaces with the dragonchain api