A-Chain

alpha.exportKey

Get the private key that controls a given address.

Method: POST

https://odyssey.nownodes.io/ext/bc/A

Example body (raw)

{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"alpha.exportKey",
    "params" :{
        "username" :"myUsername",
        "password": "myPassword",
        "address": "A-dione167lzmht2phhkduv6284ew5025g53dmvhj3fsht"
    }
}

Example response: 200

{
    "jsonrpc": "2.0",
    "error": {
        "code": -32000,
        "message": "problem retrieving user \"myUsername\": incorrect password: user \"myUsername\"",
        "data": null
    },
    "id": 1
}

alpha.getBalance

Get the balance of AVAX controlled by a given address.

Method: POST

https://odyssey.nownodes.io/ext/bc/A

Example body (raw)

{
  "jsonrpc":"2.0",
  "id": 1,
  "method" :"alpha.getBalance",
  "params" :{
      "addresses":["A-dione167lzmht2phhkduv6284ew5025g53dmvhj3fsht"]
  }
}

Example response: 200

{
    "jsonrpc": "2.0",
    "error": {
        "code": -32000,
        "message": "problem parsing address '': couldn't parse address \"\": no separator found in address",
        "data": null
    },
    "id": 1
}

alpha.getBlock

Get a block by its ID.

Method: POST

https://odyssey.nownodes.io/ext/bc/A

Example body (raw)

{
    "jsonrpc": "2.0",
    "method": "alpha.getBlock",
    "params": {
        "blockID": "2gDq8RCsvMfEgYFhtEyckgLYfXpuGbMxp26R1gjGdaPwZSYneL",
        "encoding": "json"
    },
    "id": 1
}

Example response: 200

```json
{
    "jsonrpc": "2.0",
    "result": {
        "block": {
            "parentID": "bA8nKXNeGQQBoEfci6ovC7fs3eCJWszQGeSEHL35VCr29khmZ",
            "height": 2,
            "time": 1728544652,
            "merkleRoot": "11111111111111111111111111111111LpoYY",
            "txs": [
                {
                    "unsignedTx": {
                        "networkID": 1,
                        "blockchainID": "2YjjguzbzbhbpQYUioAcNmw5xbmiHKrae8S2HWVKLH6Ce7DiD6",
                        "outputs": [
                            {
                                "assetID": "D8mxfovjYSN6XMbpWxaRk6xqdFHCQcxwzvGP9tmTx2AsiPFUc",
                                "fxID": "spdxUxVJQbX85MGxMHbKw1sHxMnSqJ3QBzDyDYEP3h6TLuxqQ",
                                "output": {
                                    "addresses": [
                                        "A-dione167lzmht2phhkduv6284ew5025g53dmvhj3fsht"
                                    ],
                                    "amount": 707125920,
                                    "locktime": 0,
                                    "threshold": 1
                                }
                            }
                        ],
                        "inputs": [
                            {
                                "txID": "2UKBTuYdVnEsJhnpNPRTBunxmrpnT3n8Ft5FG5byNchbshRRb8",
                                "outputIndex": 0,
                                "assetID": "D8mxfovjYSN6XMbpWxaRk6xqdFHCQcxwzvGP9tmTx2AsiPFUc",
                                "fxID": "spdxUxVJQbX85MGxMHbKw1sHxMnSqJ3QBzDyDYEP3h6TLuxqQ",
                                "input": {
                                    "amount": 15000000000,
                                    "signatureIndices": [
                                        0
                                    ]
                                }
                            }
                        ],
                        "memo": "0x414c504841207574696c697479206d6574686f64206275696c644578706f7274547820746f206578706f72742044494f4e4520746f2074686520442d436861696e2066726f6d2074686520412d436861696e",
                        "destinationChain": "faqcDVftkSVcZ2nESGxGKKZbNALcaU5AUc15SwwaiTkAgy3KK",
                        "exportedOutputs": [
                            {
                                "assetID": "D8mxfovjYSN6XMbpWxaRk6xqdFHCQcxwzvGP9tmTx2AsiPFUc",
                                "fxID": "spdxUxVJQbX85MGxMHbKw1sHxMnSqJ3QBzDyDYEP3h6TLuxqQ",
                                "output": {
                                    "addresses": [
                                        "A-dione167lzmht2phhkduv6284ew5025g53dmvhj3fsht"
                                    ],
                                    "amount": 9292874080,
                                    "locktime": 0,
                                    "threshold": 1
                                }
                            }
                        ]
                    },
                    "credentials": [
                        {
                            "fxID": "spdxUxVJQbX85MGxMHbKw1sHxMnSqJ3QBzDyDYEP3h6TLuxqQ",
                            "credential": {
                                "signatures": [
                                    "0x012dcdaf6c48508b165b19abdbab28d4c1139cbdb8b9cd5b080117eed2a6ef6201a53f42ff09857fec9eb8302f2e5e972945eb6f036b7cecaf62e9bb37aca96e00"
                                ]
                            }
                        }
                    ],
                    "id": "2tNrDzNLyWJzswVQ2zy2f7rjifCCSQVRApN783SUJmUuUeLjYR"
                }
            ],
            "id": "2gDq8RCsvMfEgYFhtEyckgLYfXpuGbMxp26R1gjGdaPwZSYneL"
        },
        "encoding": "json"
    },
    "id": 1
}
```

alpha.getBlockByHeight

Get a block by its height.

Method: POST

https://odyssey.nownodes.io/ext/bc/A

Example body (raw)

{
    "jsonrpc": "2.0",
    "method": "alpha.getBlockByHeight",
    "params": {
        "height": 1,
        "encoding": "hex"
    },
    "id": 1
}

Example response: 200

{
    "jsonrpc": "2.0",
    "result": {
        "block": "0x0000000000147977c4d14cfa223f73a9fc64de112a4005cf6fa011f2eaf00a088788aea4756300000000000000010000000067077f510000000000000000000000000000000000000000000000000000000000000000000000010000000300000001cbc2297258acc4807dcce81b878a87b226d10c276c0a866c2d2a9cf8ef3ac7ca000000011b8d466639551620fe2d129737f46e1dab7a60a7d39ea2b76fcb04b98c78355b00000007000000037e11d60000000000000000000000000100000001d7be2ddd6a0def66f19a51eb9751eaa22916ed970000000000000052414c504841207574696c697479206d6574686f64206275696c64496d706f7274547820746f20696d706f72742044494f4e4520746f2074686520412d436861696e2066726f6d2074686520442d436861696e579bbdb071deb52d3aa5cf0b0e47f47b2b7481d229dd5cc908336a07eff0380300000001955c65aa0c7130c6562e3e69acd06cee25d8cc0898f68194bf54055f962ed32a000000001b8d466639551620fe2d129737f46e1dab7a60a7d39ea2b76fcb04b98c78355b0000000500000004a817c80000000001000000000000000100000009000000010aece41bdc7fb6d92105e704c259eda8147ded33798fa2c23ae635347376b9a64ad580b92d199671441930644dfdc8230dc80f59b9eb8a3d80509787500427670065450d33",
        "encoding": "hex"
    },
    "id": 1
}

alpha.getHeight

Returns the height of the last accepted block.

Method: POST

https://odyssey.nownodes.io/ext/bc/A

Example body (raw)

{
    "jsonrpc": "2.0",
    "method": "alpha.getHeight",
    "params": {},
    "id": 1
}

Example response: 200

{
    "jsonrpc": "2.0",
    "result": {
        "height": "2"
    },
    "id": 1
}

alpha.getTx

Gets a transaction by its ID. Optional encoding parameter to specify the format for the returned transaction. Can be either hex or json. Defaults to hex.

Method: POST

https://odyssey.nownodes.io/ext/bc/A

Example body (raw)

{
    "jsonrpc": "2.0",
    "method": "alpha.getTx",
    "params": {
        "txID":"2tNrDzNLyWJzswVQ2zy2f7rjifCCSQVRApN783SUJmUuUeLjYR",
        "encoding": "json"
    },
    "id": 1
}

Example response: 200

{
    "jsonrpc": "2.0",
    "result": {
        "tx": {
            "unsignedTx": {
                "networkID": 1,
                "blockchainID": "2YjjguzbzbhbpQYUioAcNmw5xbmiHKrae8S2HWVKLH6Ce7DiD6",
                "outputs": [
                    {
                        "assetID": "D8mxfovjYSN6XMbpWxaRk6xqdFHCQcxwzvGP9tmTx2AsiPFUc",
                        "fxID": "spdxUxVJQbX85MGxMHbKw1sHxMnSqJ3QBzDyDYEP3h6TLuxqQ",
                        "output": {
                            "addresses": [
                                "A-dione167lzmht2phhkduv6284ew5025g53dmvhj3fsht"
                            ],
                            "amount": 707125920,
                            "locktime": 0,
                            "threshold": 1
                        }
                    }
                ],
                "inputs": [
                    {
                        "txID": "2UKBTuYdVnEsJhnpNPRTBunxmrpnT3n8Ft5FG5byNchbshRRb8",
                        "outputIndex": 0,
                        "assetID": "D8mxfovjYSN6XMbpWxaRk6xqdFHCQcxwzvGP9tmTx2AsiPFUc",
                        "fxID": "spdxUxVJQbX85MGxMHbKw1sHxMnSqJ3QBzDyDYEP3h6TLuxqQ",
                        "input": {
                            "amount": 15000000000,
                            "signatureIndices": [
                                0
                            ]
                        }
                    }
                ],
                "memo": "0x414c504841207574696c697479206d6574686f64206275696c644578706f7274547820746f206578706f72742044494f4e4520746f2074686520442d436861696e2066726f6d2074686520412d436861696e",
                "destinationChain": "faqcDVftkSVcZ2nESGxGKKZbNALcaU5AUc15SwwaiTkAgy3KK",
                "exportedOutputs": [
                    {
                        "assetID": "D8mxfovjYSN6XMbpWxaRk6xqdFHCQcxwzvGP9tmTx2AsiPFUc",
                        "fxID": "spdxUxVJQbX85MGxMHbKw1sHxMnSqJ3QBzDyDYEP3h6TLuxqQ",
                        "output": {
                            "addresses": [
                                "A-dione167lzmht2phhkduv6284ew5025g53dmvhj3fsht"
                            ],
                            "amount": 9292874080,
                            "locktime": 0,
                            "threshold": 1
                        }
                    }
                ]
            },
            "credentials": [
                {
                    "fxID": "spdxUxVJQbX85MGxMHbKw1sHxMnSqJ3QBzDyDYEP3h6TLuxqQ",
                    "credential": {
                        "signatures": [
                            "0x012dcdaf6c48508b165b19abdbab28d4c1139cbdb8b9cd5b080117eed2a6ef6201a53f42ff09857fec9eb8302f2e5e972945eb6f036b7cecaf62e9bb37aca96e00"
                        ]
                    }
                }
            ],
            "id": "2tNrDzNLyWJzswVQ2zy2f7rjifCCSQVRApN783SUJmUuUeLjYR"
        },
        "encoding": "json"
    },
    "id": 1
}

alpha.getTxStatus

Gets a transaction’s status by its ID. If the transaction was dropped, response will include a reason field with more information why the transaction was dropped.

Method: POST

https://odyssey.nownodes.io/ext/bc/A

Example body (raw)

{
    "jsonrpc": "2.0",
    "method": "alpha.getTxStatus",
    "params": {
        "txID":"2tNrDzNLyWJzswVQ2zy2f7rjifCCSQVRApN783SUJmUuUeLjYR"
   },
    "id": 1
}

Example response: 200

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

alpha.getUTXOs

Gets the UTXOs that reference a given set of addresses.

Method: POST

https://odyssey.nownodes.io/ext/bc/A

Example body (raw)

{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"alpha.getUTXOs",
    "params" :{
        "addresses":["A-dione167lzmht2phhkduv6284ew5025g53dmvhj3fsht", "A-dione167lzmht2phhkduv6284ew5025g53dmvhj3fsht"],
        "limit":5,
        "encoding": "hex"
    }
}

Example response: 200

{
    "jsonrpc": "2.0",
    "result": {
        "numFetched": "2",
        "utxos": [
            "0x0000f85a6a1573d17722492d24795edecb27bb9f2fc92da37684dc360820061094d5000000001b8d466639551620fe2d129737f46e1dab7a60a7d39ea2b76fcb04b98c78355b00000007000000002a25e2a000000000000000000000000100000001d7be2ddd6a0def66f19a51eb9751eaa22916ed971a6ff872",
            "0x00001b8d466639551620fe2d129737f46e1dab7a60a7d39ea2b76fcb04b98c78355b000000001b8d466639551620fe2d129737f46e1dab7a60a7d39ea2b76fcb04b98c78355b0000000700000000005b8d8000000000000000000000000100000001d7be2ddd6a0def66f19a51eb9751eaa22916ed97e159cb25"
        ],
        "endIndex": {
            "address": "A-dione167lzmht2phhkduv6284ew5025g53dmvhj3fsht",
            "utxo": "yWWoLQ7VRrEcvWhoeAojJJW7TYTSumgBjnQu2KCq2Fo9HopQa"
        },
        "encoding": "hex"
    },
    "id": 1
}

alpha.listAddresses

List addresses controlled by the given user.

Method: POST

https://odyssey.nownodes.io/ext/bc/A

Example body (raw)

{
    "jsonrpc": "2.0",
    "method": "alpha.listAddresses",
    "params": {
        "username":"myUsername",
        "password":"myPassword"
    },
    "id": 1
}

Example response: 200

{
    "jsonrpc": "2.0",
    "error": {
        "code": -32000,
        "message": "problem retrieving user \"myUsername\": incorrect password: user \"myUsername\"",
        "data": null
    },
    "id": 1
}

Last updated