Home

Utility Chain API

Deploying a Smart Contract#

Deploy a Smart Contract on Dijets Using Remix and MetaMask

Ethereum APIs#

Endpoints#

JSON-RPC Endpoints

To interact with Utility Chain via the JSON-RPC endpoint:


_10
/ext/bc/C/rpc

To interact with other instances of the EVM via the JSON-RPC endpoint:


_10
/ext/bc/blockchainID/rpc

where blockchainID is the ID of the blockchain running the EVM.

WebSocket Endpoints

To interact with Utility Chain via the websocket endpoint:


_10
/ext/bc/C/ws

For example, to interact with the Utility Chain's Ethereum APIs via websocket on localhost you can use:


_10
ws://127.0.0.1:9650/ext/bc/C/ws

To interact with other instances of the EVM via the websocket endpoint:


_10
/ext/bc/blockchainID/ws

where blockchainID is the ID of the blockchain running the EVM.

Standard Ethereum APIs#

Dijets offers an API interface identical to Geth's API except that it only supports the following services:

  • web3_
  • net_
  • eth_
  • personal_
  • txpool_
  • debug_ (note: this is turned off on the public API node.)

You can interact with these services the same exact way you’d interact with Geth. See the Ethereum Wiki’s JSON-RPC Documentation and Geth’s JSON-RPC Documentation for a full description of this API.

eth_getAssetBalance#

In addition to the standard Ethereum APIs, Dijets offers eth_getAssetBalance to retrieve the balance of first class Dijets Native Tokens on the Utility Chain (excluding DJT, which must be fetched with eth_getBalance).

Signature:


_10
eth_getAssetBalance({
_10
address: string,
_10
blk: BlkNrOrHash,
_10
assetID: string,
_10
}) -> {balance: int}

  • address owner of the asset
  • blk is the block number or hash at which to retrieve the balance
  • assetID id of the asset for which the balance is requested

Example Call:


_10
curl -X POST --data '{
_10
"jsonrpc": "2.0",
_10
"method": "eth_getAssetBalance",
_10
"params": [
_10
"0x8723e5773847A4Eb5FeEDabD9320802c5c812F46",
_10
"latest",
_10
"3RvKBAmQnfYionFXMfW5P8TDZgZiogKbHjM8cjpu16LKAgF5T"
_10
],
_10
"id": 1
_10
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/rpc

Example Response:


_10
{
_10
"jsonrpc": "2.0",
_10
"id": 1,
_10
"result": "0x1388"
_10
}

eth_baseFee#

Get the base fee for the next block.

Signature:


_10
eth_baseFee() -> {}

result is the hex value of the base fee for the next block.

Example Call:


_10
curl -X POST --data '{
_10
"jsonrpc":"2.0",
_10
"id" :1,
_10
"method" :"eth_baseFee",
_10
"params" :[]
_10
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/rpc

Example Response:


_10
{
_10
"jsonrpc": "2.0",
_10
"id": 1,
_10
"result": "0x34630b8a00"
_10
}

eth_maxPriorityFeePerGas#

Get the priority fee needed to be included in a block.

Signature:


_10
eth_maxPriorityFeePerGas() -> {}

result is hex value of the priority fee needed to be included in a block.

Example Call:


_10
curl -X POST --data '{
_10
"jsonrpc":"2.0",
_10
"id" :1,
_10
"method" :"eth_maxPriorityFeePerGas",
_10
"params" :[]
_10
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/rpc

Example Response:


_10
{
_10
"jsonrpc": "2.0",
_10
"id": 1,
_10
"result": "0x2540be400"
_10
}

For more information on dynamic fees see the Utility Chain section of the transaction fee documentation.

eth_getChainConfig#

eth_getChainConfig returns chain config. This API is enabled by default with internal-eth namespace.

Signature:


_10
eth_getChainConfig({}) -> {chainConfig: json}

Example Call:


_10
curl -X POST --data '{
_10
"jsonrpc":"2.0",
_10
"id" :1,
_10
"method" :"eth_getChainConfig",
_10
"params" :[]
_10
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/rpc

Example Response:


_24
{
_24
"jsonrpc": "2.0",
_24
"id": 1,
_24
"result": {
_24
"chainId": 98200,
_24
"homesteadBlock": 0,
_24
"daoForkBlock": 0,
_24
"daoForkSupport": true,
_24
"eip150Block": 0,
_24
"eip150Hash": "0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0",
_24
"eip155Block": 0,
_24
"eip158Block": 0,
_24
"byzantiumBlock": 0,
_24
"constantinopleBlock": 0,
_24
"petersburgBlock": 0,
_24
"istanbulBlock": 0,
_24
"muirGlacierBlock": 0,
_24
"apricotPhase1BlockTimestamp": 0,
_24
"apricotPhase2BlockTimestamp": 0,
_24
"apricotPhase3BlockTimestamp": 0,
_24
"apricotPhase4BlockTimestamp": 0,
_24
"apricotPhase5BlockTimestamp": 0
_24
}
_24
}

Dijets Specific APIs#

To interact with the djtx specific RPC calls on the Utility Chain:


_10
/ext/bc/C/djtx

To interact with other instances of the EVM DJT endpoints:


_10
/ext/bc/blockchainID/djtx

djtx.export#

Export an asset from the Utility Chain to Value Chain or Method Chain. After calling this method, you must call the Value Chain's avm.import or Method Chain's platform.import.

Signature:


_10
djtx.export({
_10
to: string,
_10
amount: int,
_10
assetID: string,
_10
baseFee: int,
_10
username: string,
_10
password:string,
_10
}) -> {txID: string}

  • to is the Value Chain or Method Chain address the asset is sent to.
  • amount is the amount of the asset to send.
  • assetID is the ID of the asset. To export DJT use "DJT" as the assetID.
  • baseFee is the base fee that should be used when creating the transaction. If omitted, a suggested fee will be used.
  • username is the user that controls the address that transaction will be sent from.
  • password is username‘s password.

Example Call:


_12
curl -X POST --data '{
_12
"jsonrpc":"2.0",
_12
"id" :1,
_12
"method" :"djtx.export",
_12
"params" :{
_12
"to":"X-dijets18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5",
_12
"amount": 500,
_12
"assetID": "2nzgmhZLuVq8jc7NNu2eahkKwoJcbFWXWJCxHBVWAJEZkhquoK",
_12
"username":"myUsername",
_12
"password":"myPassword"
_12
}
_12
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/djtx

Example Response:


_10
{
_10
"jsonrpc": "2.0",
_10
"result": {
_10
"txID": "2W5JuFENitZKTpJsy9igBpTcEeBKxBHHGAUkgsSUnkjVVGQ9i8"
_10
},
_10
"id": 1
_10
}

djtx.exportDJT#

Send DJT from the Utility Chain to Value Chain or Method Chain. After calling this method, you must call the Value Chain's avm.import or Method Chain's platform.import with assetID DJT on the Value Chain to complete the transfer.

Signature:


_10
djtx.exportDJT({
_10
to: string,
_10
amount: int,
_10
baseFee: int,
_10
username: string,
_10
password:string,
_10
}) -> {txID: string}

Request:

  • to is Value Chain or Method Chain address the asset is sent to.
  • amount is the amount of the asset to send.
  • baseFee is the base fee that should be used when creating the transaction. If omitted, a suggested fee will be used.
  • username is the user that controls the address that transaction will be sent from.
  • password is username‘s password.

Response:

  • txID is the TXID of the completed ExportTx.

Example Call:


_13
curl -X POST --data '{
_13
"jsonrpc":"2.0",
_13
"id" :1,
_13
"method" :"djtx.exportDJT",
_13
"params" :{
_13
"from": ["0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC"],
_13
"to":"X-dijets18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5",
_13
"amount": 500,
_13
"changeAddr": "0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC",
_13
"username":"myUsername",
_13
"password":"myPassword"
_13
}
_13
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/djtx

Example Response:


_10
{
_10
"jsonrpc": "2.0",
_10
"result": {
_10
"txID": "2ffcxdkiKXXA4JdyRoS38dd7zoThkapNPeZuGPmmLBbiuBBHDa"
_10
},
_10
"id": 1
_10
}

djtx.exportKey#

Get the private key that controls a given address. The returned private key can be added to a user with djtx.importKey.

Signature:


_10
djtx.exportKey({
_10
username: string,
_10
password:string,
_10
address:string
_10
}) -> {privateKey: string}

Request:

  • username must control address.
  • address is the address for which you want to export the corresponding private key. It should be in hex format.

Response:

  • privateKey is the CB58 encoded string representation of the private key that controls address. It has a PrivateKey- prefix and can be used to import a key via djtx.importKey.
  • privateKeyHex is the hex string representation of the private key that controls address. It can be used to import an account into MetaMask.

Example Call:


_10
curl -X POST --data '{
_10
"jsonrpc":"2.0",
_10
"id" :1,
_10
"method" :"djtx.exportKey",
_10
"params" :{
_10
"username" :"myUsername",
_10
"password":"myPassword",
_10
"address": "0xc876DF0F099b3eb32cBB78820d39F5813f73E18C"
_10
}
_10
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/djtx

Example Response:


_10
{
_10
"jsonrpc": "2.0",
_10
"result": {
_10
"privateKey": "PrivateKey-2o2uPgTSf3aR5nW6yLHjBEAiatAFKEhApvYzsjvAJKRXVWCYkE",
_10
"privateKeyHex": "0xec381fb8d32168be4cf7f8d4ce9d8ca892d77ba574264f3665ad5edb89710157"
_10
},
_10
"id": 1
_10
}

djtx.getAtomicTx#

Gets a transaction by its ID. Optional encoding parameter to specify the format for the returned transaction. Can only be hex when a value is provided.

Signature:


_10
djtx.getAtomicTx({
_10
txID: string,
_10
encoding: string, //optional
_10
}) -> {
_10
tx: string,
_10
encoding: string,
_10
blockHeight: string
_10
}

Request:

  • txID is the transaction ID. It should be in cb58 format.
  • encoding is the encoding format to use. Can only be hex when a value is provided.

Response:

  • tx is the transaction encoded to encoding.
  • encoding is the encoding.
  • blockHeight is the height of the block which the transaction was included in.

Example Call:


_10
curl -X POST --data '{
_10
"jsonrpc":"2.0",
_10
"id" :1,
_10
"method" :"djtx.getAtomicTx",
_10
"params" :{
_10
"txID":"2GD5SRYJQr2kw5jE73trBFiAgVQyrCaeg223TaTyJFYXf2kPty",
_10
"encoding": "hex"
_10
}
_10
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/djtx

Example Response:


_10
{
_10
"jsonrpc": "2.0",
_10
"result": {
_10
"tx": "0x000000000000000030399d0775f450604bd2fbc49ce0c5c1c6dfeb2dc2acb8c92c26eeae6e6df4502b19d891ad56056d9c01f18f43f58b5c784ad07a4a49cf3d1f11623804b5cba2c6bf000000018212d6807a0ec9c1b26321418fe7a548180b5be728ce53fe7e98ab5755ed316100000001dbcf890f77f49b96857648b72b77f9f82937f28a68704af05da0dc12ba53f2db00000005000003a352a382400000000100000000000000018db97c7cece249c2b98bdc0226cc4c2a57bf52fc000003a3529edd17dbcf890f77f49b96857648b72b77f9f82937f28a68704af05da0dc12ba53f2db000000010000000900000001ead19377f015422fbb8731204fcf6d6879dd05146c2d5b5594e2fea2cb420b2f40bd457b71e279e547790b28fe5482f278c76cf39b2dce5c2e6c53352fe6827d002cc7d20d",
_10
"encoding": "hex",
_10
"blockHeight": "1"
_10
},
_10
"id": 1
_10
}

djtx.getAtomicTxStatus#

Get the status of an atomic transaction sent to the network.

Signature:


_10
djtx.getAtomicTxStatus({txID: string}) -> {
_10
status: string,
_10
blockHeight: string // returned when status is Accepted
_10
}

status is one of:

  • Accepted: The transaction is (or will be) accepted by every node. Check the blockHeight property
  • Processing: The transaction is being voted on by this node
  • Dropped: The transaction was dropped by this node because it thought the transaction invalid
  • Unknown: The transaction hasn’t been seen by this node

Example Call:


_10
curl -X POST --data '{
_10
"jsonrpc":"2.0",
_10
"id" :1,
_10
"method" :"djtx.getAtomicTxStatus",
_10
"params" :{
_10
"txID":"2QouvFWUbjuySRxeX5xMbNCuAaKWfbk5FeEa2JmoF85RKLk2dD"
_10
}
_10
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/djtx

Example Response:


_10
{
_10
"jsonrpc": "2.0",
_10
"id": 1,
_10
"result": {
_10
"status": "Accepted",
_10
"blockHeight": "1"
_10
}
_10
}

djtx.getUTXOs#

Gets the UTXOs that reference a given address.

Signature:


_20
djtx.getUTXOs(
_20
{
_20
addresses: string,
_20
limit: int, //optional
_20
startIndex: { //optional
_20
address: string,
_20
utxo: string
_20
},
_20
sourceChain: string,
_20
encoding: string, //optional
_20
},
_20
) ->
_20
{
_20
numFetched: int,
_20
utxos: []string,
_20
endIndex: {
_20
address: string,
_20
utxo: string
_20
}
_20
}

  • utxos is a list of UTXOs such that each UTXO references at least one address in addresses.
  • At most limit UTXOs are returned. If limit is omitted or greater than 1024, it is set to 1024.
  • This method supports pagination. endIndex denotes the last UTXO returned. To get the next set of UTXOs, use the value of endIndex as startIndex in the next call.
  • If startIndex is omitted, will fetch all UTXOs up to limit.
  • When using pagination (that is when startIndex is provided), UTXOs are not guaranteed to be unique across multiple calls. That is, a UTXO may appear in the result of the first call, and then again in the second call.
  • When using pagination, consistency is not guaranteed across multiple calls. That is, the UTXO set of the addresses may have changed between calls.
  • encoding sets the format for the returned UTXOs. Can only be hex when a value is provided.

Example

Suppose we want all UTXOs that reference at least one of C-dijets18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5.


_14
curl -X POST --data '{
_14
"jsonrpc":"2.0",
_14
"id" :1,
_14
"method" :"djtx.getUTXOs",
_14
"params" :{
_14
"addresses":["C-dijets18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5"],
_14
"sourceChain": "X",
_14
"startIndex": {
_14
"address": "C-dijets18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5",
_14
"utxo": "22RXW7SWjBrrxu2vzDkd8uza7fuEmNpgbj58CxBob9UbP37HSB"
_14
},
_14
"encoding": "hex"
_14
}
_14
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/djtx

This gives response:


_17
{
_17
"jsonrpc": "2.0",
_17
"result": {
_17
"numFetched": "3",
_17
"utxos": [
_17
"0x0000a799e7448acf74ca9223159a04f93b948f99cf28509f908839532b2f85baffc300000001dbcf890f77f49b96857648b72b77f9f82937f28a68704af05da0dc12ba53f2db00000007000003a352a38240000000000000000000000001000000013cb7d3842e8cee6a0ebd09f1fe884f6861e1b29c22d23171",
_17
"0x00006385c683d43bdbe754c224be36c5004ea7ce49c0849cadeaea6af93dae18cc7700000001dbcf890f77f49b96857648b72b77f9f82937f28a68704af05da0dc12ba53f2db00000007000003a352a38240000000000000000000000001000000013cb7d3842e8cee6a0ebd09f1fe884f6861e1b29cb81cc877",
_17
"0x000038137283c94582351b86c3e90808312636769e3f5c14fbf1152d6634f770695c00000001dbcf890f77f49b96857648b72b77f9f82937f28a68704af05da0dc12ba53f2db00000007000003a352a38240000000000000000000000001000000013cb7d3842e8cee6a0ebd09f1fe884f6861e1b29c7412490e"
_17
],
_17
"endIndex": {
_17
"address": "C-dijets18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5",
_17
"utxo": "0x9333ef8a05f26acf2d8766f94723f749870fa2ca80c19c33cc945d79013d7c50fd023beb"
_17
},
_17
"encoding": "hex"
_17
},
_17
"id": 1
_17
}

djtx.import#

Finalize the transfer of a non-DJT or DJT from Value Chain or Method Chain to the Utility Chain. Before this method is called, you must call the Value Chain’s avm.export or Method Chain’s platform.exportDJT with assetID DJT to initiate the transfer.

Signature:


_10
djtx.import({
_10
to: string,
_10
sourceChain: string,
_10
baseFee: int, // optional
_10
username: string,
_10
password:string,
_10
}) -> {txID: string}

Request:

  • to is the address the asset is sent to. This must be the same as the to argument in the corresponding call to the Value Chain's or Method Chain's export.
  • sourceChain is the ID or alias of the chain the asset is being imported from. To import funds from the Value Chain, use "X"; for the Method Chain, use "P".
  • baseFee is the base fee that should be used when creating the transaction. If omitted, a suggested fee will be used.
  • username is the user that controls the address that transaction will be sent from.
  • password is username‘s password.

Response:

  • txID is the ID of the completed ImportTx.

Example Call:


_11
curl -X POST --data '{
_11
"jsonrpc":"2.0",
_11
"id" :1,
_11
"method" :"djtx.import",
_11
"params" :{
_11
"to":"0x4b879aff6b3d24352Ac1985c1F45BA4c3493A398",
_11
"sourceChain":"X",
_11
"username":"myUsername",
_11
"password":"myPassword"
_11
}
_11
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/djtx

Example Response:


_10
{
_10
"jsonrpc": "2.0",
_10
"result": {
_10
"txID": "6bJq9dbqhiQvoshT3uSUbg9oB24n7Ei6MLnxvrdmao78oHR9t"
_10
},
_10
"id": 1
_10
}

djtx.importDJT#

Finalize a transfer of DJT from the Value Chain or Method Chain to the Utility Chain. Before this method is called, you must call the Value Chain’s avm.export or Method Chain’s platform.exportDJT with assetID DJT to initiate the transfer.

Signature:


_10
djtx.importDJT({
_10
to: string,
_10
sourceChain: string,
_10
baseFee: int, // optional
_10
username: string,
_10
password:string,
_10
}) -> {txID: string}

Request:

  • to is the address the DJT is sent to. It should be in hex format.
  • sourceChain is the ID or alias of the chain the DJT is being imported from. To import funds from the Value Chain, use "X"; for the Method Chain, use "P".
  • baseFee is the base fee that should be used when creating the transaction. If omitted, a suggested fee will be used.
  • username is the user that controls the address that transaction will be sent from.
  • password is username‘s password.

Response:

  • txID is the ID of the completed ImportTx.

Example Call:


_11
curl -X POST --data '{
_11
"jsonrpc":"2.0",
_11
"id" :1,
_11
"method" :"djtx.importDJT",
_11
"params" :{
_11
"to":"0x4b879aff6b3d24352Ac1985c1F45BA4c3493A398",
_11
"sourceChain":"X",
_11
"username":"myUsername",
_11
"password":"myPassword"
_11
}
_11
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/djtx

Example Response:


_10
{
_10
"jsonrpc": "2.0",
_10
"result": {
_10
"txID": "LWTRsiKnEUJC58y8ezAk6hhzmSMUCtemLvm3LZFw8fxDQpns3"
_10
},
_10
"id": 1
_10
}

djtx.importKey#

Give a user control over an address by providing the private key that controls the address.

Signature:


_10
djtx.importKey({
_10
username: string,
_10
password:string,
_10
privateKey:string
_10
}) -> {address: string}

Request:

  • Add privateKey to username's set of private keys.

Response:

  • address is the address username now controls with the private key. It will be in hex format.

Example Call to run:


_10
curl -X POST --data '{
_10
"jsonrpc":"2.0",
_10
"id" :1,
_10
"method" :"djtx.importKey",
_10
"params" :{
_10
"username" :"myUsername",
_10
"password":"myPassword",
_10
"privateKey":"PrivateKey-2o2uPgTSf3aR5nW6yLHjBEAiatAFKEhApvYzsjvAJKRXVWCYkE"
_10
}
_10
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/djtx

Example Response:


_10
{
_10
"jsonrpc": "2.0",
_10
"result": {
_10
"address": "0xc876DF0F099b3eb32cBB78820d39F5813f73E18C"
_10
},
_10
"id": 1
_10
}

djtx.issueTx#

Send a signed transaction to the network. encoding specifies the format of the signed transaction. Can only be hex when a value is provided.

Signature:


_10
djtx.issueTx({
_10
tx: string,
_10
encoding: string, //optional
_10
}) -> {
_10
txID: string
_10
}

Example Call:


_10
curl -X POST --data '{
_10
"jsonrpc":"2.0",
_10
"id" : 1,
_10
"method" :"djtx.issueTx",
_10
"params" :{
_10
"tx":"0x00000009de31b4d8b22991d51aa6aa1fc733f23a851a8c9400000000000186a0000000005f041280000000005f9ca900000030390000000000000001fceda8f90fcb5d30614b99d79fc4baa29307762668f16eb0259a57c2d3b78c875c86ec2045792d4df2d926c40f829196e0bb97ee697af71f5b0a966dabff749634c8b729855e937715b0e44303fd1014daedc752006011b730",
_10
"encoding": "hex"
_10
_10
}
_10
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/djtx

Example Response:


_10
{
_10
"jsonrpc": "2.0",
_10
"id": 1,
_10
"result": {
_10
"txID": "NUPLwbt2hsYxpQg4H2o451hmTWQ4JZx2zMzM4SinwtHgAdX1JLPHXvWSXEnpecStLj"
_10
}
_10
}

Admin API#

This API can be used for debugging. Note that the Admin API is disabled by default. To run a node with the Admin API enabled, use Utility Chain config flag--coreth-admin-api-enabled:true.

Endpoint#


_10
/ext/bc/C/admin

admin.setLogLevel#

Sets the log level of the Utility Chain.

Signature:


_10
admin.setLogLevel({level:string}) -> {}

  • level is the log level to be set.

Example Call:


_10
curl -X POST --data '{
_10
"jsonrpc":"2.0",
_10
"id" :1,
_10
"method" :"admin.setLogLevel",
_10
"params": {
_10
"level":"info"
_10
}
_10
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/admin

Example Response:


_10
{
_10
"jsonrpc": "2.0",
_10
"id": 1,
_10
"result": {}
_10
}

admin.startCPUProfiler#

Starts a CPU profile.

Signature:


_10
admin.startCPUProfiler() -> {}

Example Call:


_10
curl -X POST --data '{
_10
"jsonrpc":"2.0",
_10
"id" :1,
_10
"method" :"admin.startCPUProfiler",
_10
"params": {}
_10
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/admin

Example Response:


_10
{
_10
"jsonrpc": "2.0",
_10
"id": 1,
_10
"result": {}
_10
}

admin.stopCPUProfiler#

Stops and writes a CPU profile.

Signature:


_10
admin.stopCPUProfiler() -> {}

Example Call:


_10
curl -X POST --data '{
_10
"jsonrpc":"2.0",
_10
"id" :1,
_10
"method" :"admin.stopCPUProfiler",
_10
"params": {}
_10
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/admin

Example Response:


_10
{
_10
"jsonrpc": "2.0",
_10
"id": 1,
_10
"result": {}
_10
}

admin.memoryProfile#

Runs and writes a memory profile.

Signature:


_10
admin.memoryProfile() -> {}

Example Call:


_10
curl -X POST --data '{
_10
"jsonrpc":"2.0",
_10
"id" :1,
_10
"method" :"admin.memoryProfile",
_10
"params": {}
_10
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/admin

Example Response:


_10
{
_10
"jsonrpc": "2.0",
_10
"id": 1,
_10
"result": {}
_10
}

admin.lockProfile#

Runs a mutex profile writing to the coreth_performance_c directory.

Signature:


_10
admin.lockProfile() -> {}

Example Call:


_10
curl -X POST --data '{
_10
"jsonrpc":"2.0",
_10
"id" :1,
_10
"method" :"admin.lockProfile",
_10
"params": {}
_10
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/C/admin

Example Response:


_10
{
_10
"jsonrpc": "2.0",
_10
"id": 1,
_10
"result": {}
_10
}