diff --git a/Avalanche.postman_collection.json b/Avalanche.postman_collection.json index d61cfb1..f52ff61 100644 --- a/Avalanche.postman_collection.json +++ b/Avalanche.postman_collection.json @@ -648,81 +648,52 @@ }, { "name": "getAssetDescription", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avm.getAssetDescription\",\n \"params\" :{\n \"assetID\" :\"{{avaxAssetId}}\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseURL}}/ext/bc/X", - "host": [ - "{{baseURL}}" - ], - "path": [ - "ext", - "bc", - "X" - ] - }, - "description": "Get information about an asset. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmgetassetdescription)" - }, - "response": [] - }, - { - "name": "getBalance - DEPRECATED", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "//Deprecated as of v1.9.12.\n\n{\n \"jsonrpc\":\"2.0\",\n \"id\" : 1,\n \"method\" :\"avm.getBalance\",\n \"params\" :{\n \"address\":\"{{xchainAddress}}\",\n \"assetID\": \"{{avaxAssetId}}\"\n }\n} ", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseURL}}/ext/bc/X", - "host": [ - "{{baseURL}}" - ], - "path": [ - "ext", - "bc", - "X" - ] - }, - "description": "Get the balance of an asset controlled by a given address. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmgetbalance)" - }, - "response": [] - }, - { - "name": "getBlock", "event": [ { "listen": "test", "script": { "exec": [ - "" + "var table = `", + " ", + "", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + "
Asset description
Asset ID: {{response.result.assetID}}
Name: {{response.result.name}}
Symbol: {{response.result.symbol}}
Denomination: {{response.result.denomination}}
", + " `;", + "", + "", + "pm.visualizer.set(table, {", + " response: pm.response.json(),", + "});" ], "type": "text/javascript" } @@ -733,7 +704,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avm.getBlock\",\n \"params\" :{\n \"blockID\": \"{{xchainBlockID}}\",\n \"encoding\": \"hex\"\n }\n}", + "raw": "{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avm.getAssetDescription\",\n \"params\" :{\n \"assetID\" :\"{{avaxAssetId}}\"\n }\n}", "options": { "raw": { "language": "json" @@ -751,12 +722,12 @@ "X" ] }, - "description": "Returns the block with the given id. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmgetblock)" + "description": "Get information about an asset. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmgetassetdescription)" }, "response": [] }, { - "name": "getBlockByHeight", + "name": "getBalance - DEPRECATED", "event": [ { "listen": "test", @@ -773,7 +744,7 @@ "header": [], "body": { "mode": "raw", - "raw": "{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avm.getBlockByHeight\",\n \"params\" :{\n \"height\": {{xhcainBlockHeight}},\n \"encoding\": \"hex\"\n }\n}", + "raw": "//Deprecated as of v1.9.12.\n\n{\n \"jsonrpc\":\"2.0\",\n \"id\" : 1,\n \"method\" :\"avm.getBalance\",\n \"params\" :{\n \"address\":\"{{xchainAddress}}\",\n \"assetID\": \"{{avaxAssetId}}\"\n }\n} ", "options": { "raw": { "language": "json" @@ -791,166 +762,2444 @@ "X" ] }, - "description": "Returns block at the given height. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmgetblockbyheight)" + "description": "Get the balance of an asset controlled by a given address. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmgetbalance)" }, "response": [] }, { - "name": "getHeight", + "name": "getBlock", "event": [ { "listen": "test", "script": { "exec": [ - "" - ], - "type": "text/javascript" - } - } - ], - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avm.getHeight\",\n \"params\" :{}\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseURL}}/ext/bc/X", - "host": [ - "{{baseURL}}" - ], - "path": [ - "ext", - "bc", - "X" - ] - }, - "description": "Returns the height of the last accepted block. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmgetheight)" - }, - "response": [] - }, - { - "name": "getTx", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avm.getTx\",\n \"params\" :{\n \"txID\":\"{{txID}}\",\n \"encoding\": \"hex\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseURL}}/ext/bc/X", - "host": [ - "{{baseURL}}" - ], - "path": [ - "ext", - "bc", - "X" - ] - }, - "description": "Returns the specified transaction [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmgettx)" - }, - "response": [] - }, - { - "name": "getTxStatus - DEPRECATED", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "//Deprecated as of v1.10.0.\n\n{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"avm.getTxStatus\",\n \"params\": {\n \"txID\": \"{{txID}}\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseURL}}/ext/bc/X", - "host": [ - "{{baseURL}}" - ], - "path": [ - "ext", - "bc", - "X" - ] - }, - "description": "Get the status of a transaction sent to the network. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmgettxstatus)" - }, - "response": [] - }, - { - "name": "getUTXOs", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avm.getUTXOs\",\n \"params\" :{\n \"addresses\":[\"{{xchainAddress}}\"],\n \"limit\": 5,\n \"sourceChain\": \"X\",\n \"encoding\": \"hex\",\n \"startIndex\": { \n \"address\": \"{{xchainAddress}}\",\n \"utxo\": \"{{utxo}}\"\n }\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseURL}}/ext/bc/X", - "host": [ - "{{baseURL}}" - ], - "path": [ - "ext", - "bc", - "X" - ] - }, - "description": "Get the UTXOs that reference a given address. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmgetutxos)" - }, - "response": [] - }, - { - "name": "import - DEPRECATED", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "//Deprecated as of v1.9.12.\n\n{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avm.import\",\n \"params\" :{\n \"username\":\"{{avalancheUsername}}\",\n \"password\":\"{{avalanchePassword}}\",\n \"sourceChain\": \"P\",\n \"to\":\"{{xchainAddress}}\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseURL}}/ext/bc/X", - "host": [ - "{{baseURL}}" - ], - "path": [ - "ext", - "bc", - "X" - ] - }, - "description": "Finalize a transfer of AVAX from either the P-Chain to the X-Chain or the C-Chain to the X-Chain.\n\nBefore this method is called, you must call either the P-Chain’s `exportAVAX` method or the C-Chain’s `exportAVAX` method to initiate the transfer. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmimport)" - }, - "response": [] - }, + "var table = `", + " ", + "", + " User Friendly View: ", + "
", + " ", + "
", + "", + " ", + "", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "
Block info
Block Hash {{response.result.block.id}}
Parent ID {{response.result.block.parentID}}
Height {{response.result.block.height}}
Time {{response.result.block.time}}
Merkle Root {{response.result.block.merkleRoot}}
", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " {{#if response.result.block.txs.0.unsignedTx.outputs}}", + " ", + " ", + " ", + " {{/if}}", + " ", + "", + " {{#each response.result.block.txs}}", + " {{#each unsignedTx.outputs}}", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " {{/each}}", + " {{/each}}", + "", + " ", + " {{#if response.result.block.txs.0.unsignedTx.inputs}}", + " ", + " ", + " ", + " {{/if}}", + " ", + "", + " {{#each response.result.block.txs}}", + " {{#each unsignedTx.inputs}}", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " {{/each}}", + " {{/each}}", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " {{#if response.result.block.txs.0.unsignedTx.destinationChain}}", + " ", + " ", + " ", + " ", + " {{/if}}", + " ", + "", + " ", + " {{#if response.result.block.txs.0.unsignedTx.exportedOutputs}}", + " ", + " ", + " ", + " {{/if}}", + " ", + " {{#each response.result.block.txs}}", + " {{#each unsignedTx.exportedOutputs}}", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " {{/each}}", + " {{/each}}", + "", + " ", + " {{#if response.result.block.txs.0.unsignedTx.sourceChain}}", + " ", + " ", + " ", + " ", + " {{/if}}", + " ", + "", + " ", + " {{#if response.result.block.txs.0.unsignedTx.importedInputs}}", + " ", + " ", + " ", + " {{/if}}", + " ", + "", + " {{#each response.result.block.txs}}", + " {{#each unsignedTx.importedInputs}}", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " {{/each}}", + " {{/each}}", + "", + " ", + " ", + " ", + " ", + "", + " {{#each response.result.block.txs}} ", + " {{#each credentials}}", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " {{/each}}", + " {{/each}}", + "
Block's transactions
Transaction ID: {{response.result.block.id}}
Unsigned Transaction
Network ID: {{response.result.block.txs.0.unsignedTx.networkID}}
Blockchain ID: {{response.result.block.txs.0.unsignedTx.blockchainID}}
Outputs:
Asset ID: {{assetID}}
Fx ID: {{fxID}}
Amount (in GWEI):
{{output.amount}}
Locktime:
Output: {{output.locktime}}
Threshold:
{{output.threshold}}
Addresses:
{{output.addresses}}
Inputs:
Transaction ID: {{txID}}
Amount (in GWEI):
Input: {{input.amount}}
Locktime:
{{input.signatureIndices}}
Memo: {{response.result.block.txs.0.unsignedTx.memo}}
Destination chain: {{response.result.block.txs.0.unsignedTx.destinationChain}}
Exported outputs:
Asset ID: {{assetID}}
Fx ID: {{fxID}}
Amount (in GWEI):
{{output.amount}}
Locktime:
Output: {{output.locktime}}
Threshold:
{{output.threshold}}
Addresses:
{{output.addresses}}
Source chain: {{response.result.block.txs.0.unsignedTx.sourceChain}}
Imported inputs:
Transaction ID: {{txID}}
Output index: {{outputIndex}}
Asset ID: {{assetID}}
Fx ID {{fxID}}
Amount (in GWEI):
Input: {{input.amount}}
Locktime:
{{input.signatureIndices}}
Creditentials
Fx ID: {{fxID}}
Creditential: Signatures: {{credential.signatures}}
", + " `;", + "", + "pm.visualizer.set(table, {", + " response: pm.response.json(),", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avm.getBlock\",\n \"params\" :{\n \"blockID\": \"{{xchainBlockID}}\",\n \"encoding\": \"json\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseURL}}/ext/bc/X", + "host": [ + "{{baseURL}}" + ], + "path": [ + "ext", + "bc", + "X" + ] + }, + "description": "Returns the block with the given id. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmgetblock)" + }, + "response": [] + }, + { + "name": "getBlockByHeight", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var table = `", + " ", + "", + " User Friendly View: ", + "
", + " ", + "
", + "", + " ", + "", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "
Block info
Block Hash {{response.result.block.id}}
Parent ID {{response.result.block.parentID}}
Height {{response.result.block.height}}
Time {{response.result.block.time}}
Merkle Root {{response.result.block.merkleRoot}}
", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " {{#if response.result.block.txs.0.unsignedTx.outputs}}", + " ", + " ", + " ", + " {{/if}}", + " ", + "", + " {{#each response.result.block.txs}}", + " {{#each unsignedTx.outputs}}", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " {{/each}}", + " {{/each}}", + "", + " ", + " {{#if response.result.block.txs.0.unsignedTx.inputs}}", + " ", + " ", + " ", + " {{/if}}", + " ", + "", + " {{#each response.result.block.txs}}", + " {{#each unsignedTx.inputs}}", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " {{/each}}", + " {{/each}}", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " {{#if response.result.block.txs.0.unsignedTx.destinationChain}}", + " ", + " ", + " ", + " ", + " {{/if}}", + " ", + "", + " ", + " {{#if response.result.block.txs.0.unsignedTx.exportedOutputs}}", + " ", + " ", + " ", + " {{/if}}", + " ", + " {{#each response.result.block.txs}}", + " {{#each unsignedTx.exportedOutputs}}", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " {{/each}}", + " {{/each}}", + "", + " ", + " {{#if response.result.block.txs.0.unsignedTx.sourceChain}}", + " ", + " ", + " ", + " ", + " {{/if}}", + " ", + "", + " ", + " {{#if response.result.block.txs.0.unsignedTx.importedInputs}}", + " ", + " ", + " ", + " {{/if}}", + " ", + "", + " {{#each response.result.block.txs}}", + " {{#each unsignedTx.importedInputs}}", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " {{/each}}", + " {{/each}}", + "", + " ", + " ", + " ", + " ", + "", + " {{#each response.result.block.txs}} ", + " {{#each credentials}}", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " {{/each}}", + " {{/each}}", + "
Block's transactions
Transaction ID: {{response.result.block.id}}
Unsigned Transaction
Network ID: {{response.result.block.txs.0.unsignedTx.networkID}}
Blockchain ID: {{response.result.block.txs.0.unsignedTx.blockchainID}}
Outputs:
Asset ID: {{assetID}}
Fx ID: {{fxID}}
Amount (in GWEI):
{{output.amount}}
Locktime:
Output: {{output.locktime}}
Threshold:
{{output.threshold}}
Addresses:
{{output.addresses}}
Inputs:
Transaction ID: {{txID}}
Amount (in GWEI):
Input: {{input.amount}}
Locktime:
{{input.signatureIndices}}
Memo: {{response.result.block.txs.0.unsignedTx.memo}}
Destination chain: {{response.result.block.txs.0.unsignedTx.destinationChain}}
Exported outputs:
Asset ID: {{assetID}}
Fx ID: {{fxID}}
Amount (in GWEI):
{{output.amount}}
Locktime:
Output: {{output.locktime}}
Threshold:
{{output.threshold}}
Addresses:
{{output.addresses}}
Source chain: {{response.result.block.txs.0.unsignedTx.sourceChain}}
Imported inputs:
Transaction ID: {{txID}}
Output index: {{outputIndex}}
Asset ID: {{assetID}}
Fx ID {{fxID}}
Amount (in GWEI):
Input: {{input.amount}}
Locktime:
{{input.signatureIndices}}
Creditentials
Fx ID: {{fxID}}
Creditential: Signatures: {{credential.signatures}}
", + " `;", + "", + "pm.visualizer.set(table, {", + " response: pm.response.json(),", + "});" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avm.getBlockByHeight\",\n \"params\" :{\n \"height\": {{xchainBlockHeight}},\n \"encoding\": \"json\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseURL}}/ext/bc/X", + "host": [ + "{{baseURL}}" + ], + "path": [ + "ext", + "bc", + "X" + ] + }, + "description": "Returns block at the given height. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmgetblockbyheight)" + }, + "response": [] + }, + { + "name": "getHeight", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avm.getHeight\",\n \"params\" :{}\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseURL}}/ext/bc/X", + "host": [ + "{{baseURL}}" + ], + "path": [ + "ext", + "bc", + "X" + ] + }, + "description": "Returns the height of the last accepted block. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmgetheight)" + }, + "response": [] + }, + { + "name": "getTx", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var table = `", + " ", + "", + " User Friendly View: ", + "
", + " ", + "
", + "", + " ", + "", + " ", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + "", + " ", + " {{#if response.result.tx.unsignedTx.outputs}}", + " ", + " ", + " ", + " {{/if}}", + " ", + "", + " {{#each response.result.tx.unsignedTx.outputs}}", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " {{/each}}", + "", + "", + " ", + " {{#if response.result.tx.unsignedTx.inputs}}", + " ", + " ", + " ", + " {{/if}}", + " ", + "", + " {{#each response.result.tx.unsignedTx.inputs}} ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " {{/each}}", + " ", + "", + " ", + " ", + " ", + " ", + " ", + " ", + "", + "", + " ", + " {{#if response.result.tx.unsignedTx.destinationChain}}", + " ", + " ", + " ", + " ", + " {{/if}}", + " ", + " ", + "", + " ", + " {{#if response.result.tx.unsignedTx.exportedOutputs}}", + " ", + " ", + " ", + " {{/if}}", + " ", + " {{#each response.result.tx.unsignedTx.exportedOutputs}}", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " {{/each}}", + "", + " ", + " {{#if response.result.tx.unsignedTx.sourceChain}}", + " ", + " ", + " ", + " ", + " {{/if}}", + " ", + "", + "", + " ", + " {{#if response.result.tx.unsignedTx.importedInputs}}", + " ", + " ", + " ", + " {{/if}}", + " ", + "", + " {{#each response.result.tx.unsignedTx.importedInputs}}", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " {{/each}}", + " ", + "", + " ", + "", + " ", + " ", + " ", + " ", + "", + " {{#each response.result.tx.credentials}} ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " {{/each}}", + "", + "
Transaction info
Transaction ID: {{response.result.tx.id}}
Unsigned Transaction
Network ID: {{response.result.tx.unsignedTx.networkID}}
Blockchain ID: {{response.result.tx.unsignedTx.blockchainID}}
Outputs:
Asset ID: {{assetID}}
Fx ID: {{fxID}}
Amount (in GWEI):
{{output.amount}}
Locktime:
Output: {{output.locktime}}
Threshold:
{{output.threshold}}
Addresses:
{{output.addresses}}
Inputs:
Transaction ID: {{txID}}
Output index: {{outputIndex}}
Asset ID: {{assetID}}
Fx ID {{fxID}}
Amount (in GWEI):
Input: {{input.amount}}
Locktime:
{{input.signatureIndices}}
Memo: {{response.result.tx.unsignedTx.memo}}
Destination chain: {{response.result.tx.unsignedTx.destinationChain}}
Exported outputs:
Asset ID: {{assetID}}
Fx ID: {{fxID}}
Amount (in GWEI):
{{output.amount}}
Locktime:
Output: {{output.locktime}}
Threshold:
{{output.threshold}}
Addresses:
{{output.addresses}}
Source chain: {{response.result.tx.unsignedTx.sourceChain}}
Imported inputs:
Transaction ID: {{txID}}
Output index: {{outputIndex}}
Asset ID: {{assetID}}
Fx ID {{fxID}}
Amount (in GWEI):
Input: {{input.amount}}
Locktime:
{{input.signatureIndices}}
Creditentials
Fx ID: {{fxID}}
Creditential: Signatures: {{credential.signatures}}
", + " `;", + "", + "", + "pm.visualizer.set(table, {", + " response: pm.response.json(),", + "});", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avm.getTx\",\n \"params\" :{\n \"txID\":\"PeMHSFukDHRV1UAhHNDfCwz5jxwbVrJLE7W9Dz32YJ2wMZBTm\",\n \"encoding\": \"json\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseURL}}/ext/bc/X", + "host": [ + "{{baseURL}}" + ], + "path": [ + "ext", + "bc", + "X" + ] + }, + "description": "Returns the specified transaction [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmgettx)" + }, + "response": [] + }, + { + "name": "getTxStatus - DEPRECATED", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "//Deprecated as of v1.10.0.\n\n{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"avm.getTxStatus\",\n \"params\": {\n \"txID\": \"{{txID}}\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseURL}}/ext/bc/X", + "host": [ + "{{baseURL}}" + ], + "path": [ + "ext", + "bc", + "X" + ] + }, + "description": "Get the status of a transaction sent to the network. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmgettxstatus)" + }, + "response": [] + }, + { + "name": "getUTXOs", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avm.getUTXOs\",\n \"params\" :{\n \"addresses\":[\"{{xchainAddress}}\"],\n \"limit\": 5,\n \"sourceChain\": \"X\",\n \"encoding\": \"hex\",\n \"startIndex\": { \n \"address\": \"{{xchainAddress}}\",\n \"utxo\": \"{{utxo}}\"\n }\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseURL}}/ext/bc/X", + "host": [ + "{{baseURL}}" + ], + "path": [ + "ext", + "bc", + "X" + ] + }, + "description": "Get the UTXOs that reference a given address. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmgetutxos)" + }, + "response": [] + }, + { + "name": "import - DEPRECATED", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "//Deprecated as of v1.9.12.\n\n{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avm.import\",\n \"params\" :{\n \"username\":\"{{avalancheUsername}}\",\n \"password\":\"{{avalanchePassword}}\",\n \"sourceChain\": \"P\",\n \"to\":\"{{xchainAddress}}\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseURL}}/ext/bc/X", + "host": [ + "{{baseURL}}" + ], + "path": [ + "ext", + "bc", + "X" + ] + }, + "description": "Finalize a transfer of AVAX from either the P-Chain to the X-Chain or the C-Chain to the X-Chain.\n\nBefore this method is called, you must call either the P-Chain’s `exportAVAX` method or the C-Chain’s `exportAVAX` method to initiate the transfer. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmimport)" + }, + "response": [] + }, { "name": "importKey - DEPRECATED", "request": { @@ -1109,30 +3358,371 @@ "language": "json" } } - }, - "url": { - "raw": "{{baseURL}}/ext/bc/X", - "host": [ - "{{baseURL}}" - ], - "path": [ - "ext", - "bc", - "X" - ] - }, - "description": "Send a quantity of an asset to an address. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmsend)" - }, - "response": [] - }, - { - "name": "sendMultiple - DEPRECATED", + }, + "url": { + "raw": "{{baseURL}}/ext/bc/X", + "host": [ + "{{baseURL}}" + ], + "path": [ + "ext", + "bc", + "X" + ] + }, + "description": "Send a quantity of an asset to an address. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmsend)" + }, + "response": [] + }, + { + "name": "sendMultiple - DEPRECATED", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "//Deprecated as of v1.9.12.\n\n{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avm.sendMultiple\",\n \"params\" :{ \n \"outputs\": [\n {\n \"assetID\" : \"{{avaxAssetId}}\",\n \"to\" : \"{{xchainAddress}}\",\n \"amount\" : 1000000000\n }\n ],\n \"from\" : [\"{{xchainAddress}}\"],\n \"changeAddr\": \"{{xchainAddress}}\",\n \"memo\" : \"{{memo}}\",\n \"username\": \"{{avalancheUsername}}\",\n \"password\": \"{{avalanchePassword}}\" \n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseURL}}/ext/bc/X", + "host": [ + "{{baseURL}}" + ], + "path": [ + "ext", + "bc", + "X" + ] + }, + "description": "Send a quantity of an asset to an address. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmsendmultiple)" + }, + "response": [] + }, + { + "name": "sendNFT - DEPRECATED", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "//Deprecated as of v1.9.12.\n\n{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avm.sendNFT\",\n \"params\" :{ \n \"assetID\" :\"2KGdt2HpFKpTH5CtGZjYt5XPWs6Pv9DLoRBhiFfntbezdRvZWP\",\n \"from\" : [\"{{xchainAddress}}\"],\n \"to\" :\"{{xchainAddress}}\",\n \"groupID\" : 0,\n \"changeAddr\": \"{{xchainAddress}}\",\n \"username\":\"{{avalancheUsername}}\",\n \"password\":\"{{avalanchePassword}}\" \n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseURL}}/ext/bc/X", + "host": [ + "{{baseURL}}" + ], + "path": [ + "ext", + "bc", + "X" + ] + }, + "description": "Send a quantity of an asset to an address. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmsendnft)" + }, + "response": [] + }, + { + "name": "wallet_issueTx", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "//Endpoint deprecated as of v1.9.12.\n\n{\n \"jsonrpc\":\"2.0\",\n \"id\" : 1,\n \"method\" :\"wallet.issueTx\",\n \"params\" :{\n \"tx\":\"0x00000009de31b4d8b22991d51aa6aa1fc733f23a851a8c9400000000000186a0000000005f041280000000005f9ca900000030390000000000000001fceda8f90fcb5d30614b99d79fc4baa29307762668f16eb0259a57c2d3b78c875c86ec2045792d4df2d926c40f829196e0bb97ee697af71f5b0a966dabff749634c8b729855e937715b0e44303fd1014daedc752006011b730\",\n \"encoding\": \"hex\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseURL}}/ext/bc/X/wallet", + "host": [ + "{{baseURL}}" + ], + "path": [ + "ext", + "bc", + "X", + "wallet" + ] + }, + "description": "Send a signed transaction to the network and assume the TX will be accepted. `encoding` specifies the format of the signed transaction. Can only be `hex` when a value is provided. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#walletissuetx)" + }, + "response": [] + }, + { + "name": "wallet_send", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"wallet.send\",\n \"params\" :{\n \"assetID\" : \"AVAX\",\n \"amount\" : 10000,\n \"to\" : \"X-avax18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5\",\n \"memo\" : \"hi, mom!\",\n \"from\" : [\"X-avax18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5\"],\n \"changeAddr\": \"X-avax1turszjwn05lflpewurw96rfrd3h6x8flgs5uf8\",\n \"username\" : \"userThatControlsAtLeast10000OfThisAsset\",\n \"password\" : \"myPassword\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseURL}}/ext/bc/X/wallet", + "host": [ + "{{baseURL}}" + ], + "path": [ + "ext", + "bc", + "X", + "wallet" + ] + }, + "description": "Send a quantity of an asset to an address and assume the TX will be accepted so that future calls can use the modified UTXO set. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#walletsend)" + }, + "response": [] + }, + { + "name": "wallet_sendMultiple", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"wallet.sendMultiple\",\n \"params\" :{\n \"outputs\": [\n {\n \"assetID\" : \"AVAX\",\n \"to\" : \"X-avax18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5\",\n \"amount\" : 1000000000\n },\n {\n \"assetID\" : \"26aqSTpZuWDAVtRmo44fjCx4zW6PDEx3zy9Qtp2ts1MuMFn9FB\",\n \"to\" : \"X-avax18knvhxx8uhc0mwlgrfyzjcm2wrd6e60w37xrjq\",\n \"amount\" : 10\n }\n ],\n \"memo\" : \"hi, mom!\",\n \"from\" : [\"X-avax18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5\"],\n \"changeAddr\": \"X-avax1turszjwn05lflpewurw96rfrd3h6x8flgs5uf8\",\n \"username\" : \"username\",\n \"password\" : \"myPassword\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseURL}}/ext/bc/X/wallet", + "host": [ + "{{baseURL}}" + ], + "path": [ + "ext", + "bc", + "X", + "wallet" + ] + }, + "description": "Send multiple transfers of `amount` of `assetID`, to a specified address from a list of owned of addresses and assume the TX will be accepted so that future calls can use the modified UTXO set. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#walletsendmultiple)" + }, + "response": [] + } + ], + "description": "The X-Chain, Avalanche’s native platform for creating and trading assets, is an instance of the Avalanche Virtual Machine (AVM). This API allows clients to create and trade assets on the X-Chain and other instances of the AVM. [More info](https://docs.avax.network/v1.0/en/api/avm)" + }, + { + "name": "EVM", + "item": [ + { + "name": "eth_baseFee", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var table = `", + "", + "", + "", + "", + " Convert to decimal: ", + "
", + " ", + "
", + "
", + "", + "", + "", + "", + "", + "", + "", + "", + "
Base fee: {{response.result}} WEI
", + "", + "Please note that 1 AVAX = 1018 WEI and 1 WEI = 109 GWEI", + "", + "`;", + "", + "pm.visualizer.set(table, {", + " response: pm.response.json(),", + "});", + "" + ], + "type": "text/javascript" + } + } + ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", - "raw": "//Deprecated as of v1.9.12.\n\n{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avm.sendMultiple\",\n \"params\" :{ \n \"outputs\": [\n {\n \"assetID\" : \"{{avaxAssetId}}\",\n \"to\" : \"{{xchainAddress}}\",\n \"amount\" : 1000000000\n }\n ],\n \"from\" : [\"{{xchainAddress}}\"],\n \"changeAddr\": \"{{xchainAddress}}\",\n \"memo\" : \"{{memo}}\",\n \"username\": \"{{avalancheUsername}}\",\n \"password\": \"{{avalanchePassword}}\" \n }\n}", + "raw": "{\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_baseFee\",\n \"params\": [],\n \"id\": 1\n}", "options": { "raw": { "language": "json" @@ -1140,57 +3730,211 @@ } }, "url": { - "raw": "{{baseURL}}/ext/bc/X", + "raw": "{{baseURL}}/ext/bc/C/rpc", "host": [ "{{baseURL}}" ], "path": [ "ext", "bc", - "X" + "C", + "rpc" ] }, - "description": "Send a quantity of an asset to an address. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmsendmultiple)" + "description": "Get the base fee for the next block. [More info](https://docs.avax.network/apis/avalanchego/apis/c-chain#eth_basefee)" }, "response": [] }, { - "name": "sendNFT - DEPRECATED", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "//Deprecated as of v1.9.12.\n\n{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"avm.sendNFT\",\n \"params\" :{ \n \"assetID\" :\"2KGdt2HpFKpTH5CtGZjYt5XPWs6Pv9DLoRBhiFfntbezdRvZWP\",\n \"from\" : [\"{{xchainAddress}}\"],\n \"to\" :\"{{xchainAddress}}\",\n \"groupID\" : 0,\n \"changeAddr\": \"{{xchainAddress}}\",\n \"username\":\"{{avalancheUsername}}\",\n \"password\":\"{{avalanchePassword}}\" \n }\n}", - "options": { - "raw": { - "language": "json" - } + "name": "eth_blockNumber", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var jsonData = JSON.parse(responseBody);", + "var hexVal = jsonData.result", + "", + "", + "", + "var table = `", + "", + "", + "", + "", + "", + " Convert to decimal: ", + "
", + " ", + "
", + "
", + "", + "", + " ", + " ", + " ", + " ", + "
Block number: {{response.result}}
", + "", + "`;", + "", + "pm.visualizer.set(table, {", + " response: pm.response.json(),", + "});" + ], + "type": "text/javascript" } - }, - "url": { - "raw": "{{baseURL}}/ext/bc/X", - "host": [ - "{{baseURL}}" - ], - "path": [ - "ext", - "bc", - "X" - ] - }, - "description": "Send a quantity of an asset to an address. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#avmsendnft)" - }, - "response": [] - }, - { - "name": "wallet_issueTx", + } + ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", - "raw": "//Endpoint deprecated as of v1.9.12.\n\n{\n \"jsonrpc\":\"2.0\",\n \"id\" : 1,\n \"method\" :\"wallet.issueTx\",\n \"params\" :{\n \"tx\":\"0x00000009de31b4d8b22991d51aa6aa1fc733f23a851a8c9400000000000186a0000000005f041280000000005f9ca900000030390000000000000001fceda8f90fcb5d30614b99d79fc4baa29307762668f16eb0259a57c2d3b78c875c86ec2045792d4df2d926c40f829196e0bb97ee697af71f5b0a966dabff749634c8b729855e937715b0e44303fd1014daedc752006011b730\",\n \"encoding\": \"hex\"\n }\n}", + "raw": "{\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_blockNumber\",\n \"params\": [],\n \"id\": 1\n}", "options": { "raw": { "language": "json" @@ -1198,29 +3942,29 @@ } }, "url": { - "raw": "{{baseURL}}/ext/bc/X/wallet", + "raw": "{{baseURL}}/ext/bc/C/rpc", "host": [ "{{baseURL}}" ], "path": [ "ext", "bc", - "X", - "wallet" + "C", + "rpc" ] }, - "description": "Send a signed transaction to the network and assume the TX will be accepted. `encoding` specifies the format of the signed transaction. Can only be `hex` when a value is provided. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#walletissuetx)" + "description": "Getting the most recent block number." }, "response": [] }, { - "name": "wallet_send", + "name": "eth_call", "request": { "method": "POST", "header": [], "body": { "mode": "raw", - "raw": "{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"wallet.send\",\n \"params\" :{\n \"assetID\" : \"AVAX\",\n \"amount\" : 10000,\n \"to\" : \"X-avax18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5\",\n \"memo\" : \"hi, mom!\",\n \"from\" : [\"X-avax18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5\"],\n \"changeAddr\": \"X-avax1turszjwn05lflpewurw96rfrd3h6x8flgs5uf8\",\n \"username\" : \"userThatControlsAtLeast10000OfThisAsset\",\n \"password\" : \"myPassword\"\n }\n}", + "raw": "{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_call\",\n \"params\": [\n {\n \"to\": \"0x197E90f9FAD81970bA7976f33CbD77088E5D7cf7\",\n \"data\": \"0xc92aecc4\"\n },\n \"latest\"\n ]\n}", "options": { "raw": { "language": "json" @@ -1228,95 +3972,206 @@ } }, "url": { - "raw": "{{baseURL}}/ext/bc/X/wallet", + "raw": "{{baseURL}}/ext/bc/C/rpc", "host": [ "{{baseURL}}" ], "path": [ "ext", "bc", - "X", - "wallet" + "C", + "rpc" ] }, - "description": "Send a quantity of an asset to an address and assume the TX will be accepted so that future calls can use the modified UTXO set. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#walletsend)" + "description": "Call a contract." }, "response": [] }, { - "name": "wallet_sendMultiple", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"wallet.sendMultiple\",\n \"params\" :{\n \"outputs\": [\n {\n \"assetID\" : \"AVAX\",\n \"to\" : \"X-avax18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5\",\n \"amount\" : 1000000000\n },\n {\n \"assetID\" : \"26aqSTpZuWDAVtRmo44fjCx4zW6PDEx3zy9Qtp2ts1MuMFn9FB\",\n \"to\" : \"X-avax18knvhxx8uhc0mwlgrfyzjcm2wrd6e60w37xrjq\",\n \"amount\" : 10\n }\n ],\n \"memo\" : \"hi, mom!\",\n \"from\" : [\"X-avax18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5\"],\n \"changeAddr\": \"X-avax1turszjwn05lflpewurw96rfrd3h6x8flgs5uf8\",\n \"username\" : \"username\",\n \"password\" : \"myPassword\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseURL}}/ext/bc/X/wallet", - "host": [ - "{{baseURL}}" - ], - "path": [ - "ext", - "bc", - "X", - "wallet" - ] - }, - "description": "Send multiple transfers of `amount` of `assetID`, to a specified address from a list of owned of addresses and assume the TX will be accepted so that future calls can use the modified UTXO set. [More info](https://docs.avax.network/apis/avalanchego/apis/x-chain#walletsendmultiple)" - }, - "response": [] - } - ], - "description": "The X-Chain, Avalanche’s native platform for creating and trading assets, is an instance of the Avalanche Virtual Machine (AVM). This API allows clients to create and trade assets on the X-Chain and other instances of the AVM. [More info](https://docs.avax.network/v1.0/en/api/avm)" - }, - { - "name": "EVM", - "item": [ - { - "name": "eth_baseFee", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_baseFee\",\n \"params\": [],\n \"id\": 1\n}", - "options": { - "raw": { - "language": "json" - } + "name": "eth_chainId", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var table = `", + "", + "", + "", + "", + "", + " Convert to decimal: ", + "
", + " ", + "
", + "
", + "", + "", + " ", + " ", + " ", + " ", + "
Chain ID: {{response.result}}
", + "", + "`;", + "", + "pm.visualizer.set(table, {", + " response: pm.response.json(),", + "});" + ], + "type": "text/javascript" } - }, - "url": { - "raw": "{{baseURL}}/ext/bc/C/rpc", - "host": [ - "{{baseURL}}" - ], - "path": [ - "ext", - "bc", - "C", - "rpc" - ] - }, - "description": "Get the base fee for the next block. [More info](https://docs.avax.network/apis/avalanchego/apis/c-chain#eth_basefee)" - }, - "response": [] - }, - { - "name": "eth_blockNumber", + } + ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", - "raw": "{\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_blockNumber\",\n \"params\": [],\n \"id\": 1\n}", + "raw": "{\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_chainId\",\n \"params\": [],\n \"id\": 1\n}", "options": { "raw": { "language": "json" @@ -1335,48 +4190,136 @@ "rpc" ] }, - "description": "Getting the most recent block number." + "description": "Not well documented in JSON-RPC references. See instead EIP694." }, "response": [] }, { - "name": "eth_call", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"id\": 1,\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_call\",\n \"params\": [\n {\n \"to\": \"0x197E90f9FAD81970bA7976f33CbD77088E5D7cf7\",\n \"data\": \"0xc92aecc4\"\n },\n \"latest\"\n ]\n}", - "options": { - "raw": { - "language": "json" - } + "name": "eth_getAssetBalance", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var table = `", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "
Balance:
hex: {{response.result}} WEI
dec: {{response.result}} AVAX
", + "", + "Please note that 1 AVAX = 1018 WEI", + "", + "`;", + "", + "pm.visualizer.set(table, {", + " response: pm.response.json(),", + "});" + ], + "type": "text/javascript" } - }, - "url": { - "raw": "{{baseURL}}/ext/bc/C/rpc", - "host": [ - "{{baseURL}}" - ], - "path": [ - "ext", - "bc", - "C", - "rpc" - ] - }, - "description": "Call a contract." - }, - "response": [] - }, - { - "name": "eth_chainId", + } + ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", - "raw": "{\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_chainId\",\n \"params\": [],\n \"id\": 1\n}", + "raw": "{\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getAssetBalance\",\n \"params\": [\n \"{{cchainAddress}}\",\n \"latest\",\n \"2W4XDTMrQJm7YALcnCL4krU7JpoGQQaDkTdn2HbzpsqombHRaB\"\n ],\n \"id\": 1\n}", "options": { "raw": { "language": "json" @@ -1395,42 +4338,130 @@ "rpc" ] }, - "description": "Not well documented in JSON-RPC references. See instead EIP694." + "description": "Getting an account’s non-AVAX balance. [More info](https://docs.avax.network/apis/avalanchego/apis/c-chain#eth_getassetbalance)" }, "response": [] }, { - "name": "eth_getAssetBalance", - "request": { - "method": "POST", - "header": [], - "body": { - "mode": "raw", - "raw": "{\n \"jsonrpc\": \"2.0\",\n \"method\": \"eth_getAssetBalance\",\n \"params\": [\n \"{{cchainAddress}}\",\n \"latest\",\n \"2W4XDTMrQJm7YALcnCL4krU7JpoGQQaDkTdn2HbzpsqombHRaB\"\n ],\n \"id\": 1\n}", - "options": { - "raw": { - "language": "json" - } + "name": "eth_getBalance", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var table = `", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "
Balance:
hex: {{response.result}} WEI
dec: {{response.result}} AVAX
", + "", + "Please note that 1 AVAX = 1018 WEI", + "", + "`;", + "", + "pm.visualizer.set(table, {", + " response: pm.response.json(),", + "});" + ], + "type": "text/javascript" } - }, - "url": { - "raw": "{{baseURL}}/ext/bc/C/rpc", - "host": [ - "{{baseURL}}" - ], - "path": [ - "ext", - "bc", - "C", - "rpc" - ] - }, - "description": "Getting an account’s non-AVAX balance. [More info](https://docs.avax.network/apis/avalanchego/apis/c-chain#eth_getassetbalance)" - }, - "response": [] - }, - { - "name": "eth_getBalance", + } + ], "request": { "method": "POST", "header": [], @@ -7529,6 +10560,35 @@ }, "response": [] }, + { + "name": "getBlockByHeight", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"jsonrpc\":\"2.0\",\n \"id\" :1,\n \"method\" :\"platform.getBlockByHeight\",\n \"params\" :{\n \"height\": 7768381,\n \"encoding\": \"json\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseURL}}/ext/bc/P", + "host": [ + "{{baseURL}}" + ], + "path": [ + "ext", + "bc", + "P" + ] + }, + "description": "Get a block by its ID. [More info](https://docs.avax.network/apis/avalanchego/apis/p-chain#platformgetblock)" + }, + "response": [] + }, { "name": "getBlockchains - DEPRECATED", "request": { @@ -7618,6 +10678,353 @@ }, { "name": "getCurrentValidators", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "var table = `", + " ", + "", + "
", + "

Loading. Please wait.

", + " ", + "", + " ", + "", + " ", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + " {{#each response.result.validators}}", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + "", + " ", + " ", + " ", + " ", + " ", + " {{/each}}", + "", + "
Validators:
Transaction ID: {{txID}}
Start time: {{startTime}}
End time: {{endTime}}
Weight: {{weight}}
Node ID: {{nodeID}}
Stake amount: {{stakeAmount}}
Reward owner:
Locktime: {{rewardOwner.locktime}}
Threshold: {{rewardOwner.threshold}}
Addresses: {{rewardOwner.addresses}}
Validation reward owner:
Locktime: {{validationRewardOwner.locktime}}
Threshold: {{validationRewardOwner.threshold}}
Addresses: {{validationRewardOwner.addresses}}
Delegation reward owner:
Locktime: {{delegationRewardOwner.locktime}}
Threshold: {{delegationRewardOwner.threshold}}
Addresses: {{delegationRewardOwner.addresses}}
Potential reward: {{potentialReward}}
Accrued delegatee reward: {{accruedDelegateeReward}}
Delegation fee: {{delegationFee}}%
Uptime: {{uptime}}%
Connected: {{connected}}
Delegator count: {{delegatorCount}}
Delegator weight: {{delegatorWeight}}
", + " `;", + "", + "pm.visualizer.set(table, {", + " response: pm.response.json(),", + "});" + ], + "type": "text/javascript" + } + } + ], "request": { "method": "POST", "header": [],