avax.export
Export an asset from the C-Chain to X-Chain or P-Chain. If exporting to the X-Chain, you must call the X-Chain's avm.import
.
Method: POST
Copy https://avax.nownodes.io/ext/bc/C/avax
Example body (raw )
Copy {
"jsonrpc" : "2.0" ,
"id" : 1 ,
"method" : "avax.export" ,
"params" : {
"to" : "X-avax18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5" ,
"amount" : 500 ,
"assetID" : "2nzgmhZLuVq8jc7NNu2eahkKwoJcbFWXWJCxHBVWAJEZkhquoK" ,
"username" : "myUsername" ,
"password" : "myPassword"
}
}
Example response: 200
Copy {
"jsonrpc" : "2.0" ,
"error" : {
"code" : -32000 ,
"message" : "problem retrieving user 'myUsername': incorrect password: user \"myUsername\"" ,
"data" : null
} ,
"id" : 1
}
avax.exportKey
Get the private key that controls a given address. The returned private key can be added to a user with avax.importKey
.
Method: POST
Copy https://avax.nownodes.io/ext/bc/C/avax
Example body (raw )
Copy {
"jsonrpc" : "2.0" ,
"id" : 1 ,
"method" : "avax.exportKey" ,
"params" : {
"username" : "myUsername" ,
"password" : "myPassword" ,
"address" : "0xc876DF0F099b3eb32cBB78820d39F5813f73E18C"
}
}
Example response: 200
Copy {
"jsonrpc" : "2.0" ,
"error" : {
"code" : -32000 ,
"message" : "problem retrieving user 'myUsername': incorrect password: user \"myUsername\"" ,
"data" : null
} ,
"id" : 1
}
avax.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.
Method: POST
Copy https://avax.nownodes.io/ext/bc/C/avax
Example body (raw )
Copy {
"jsonrpc" : "2.0" ,
"id" : 1 ,
"method" : "avax.getAtomicTx" ,
"params" : {
"txID" : "2GD5SRYJQr2kw5jE73trBFiAgVQyrCaeg223TaTyJFYXf2kPty" ,
"encoding" : "hex"
}
}
Example response: 200
Copy {
"jsonrpc" : "2.0" ,
"error" : {
"code" : -32000 ,
"message" : "could not find tx 2GD5SRYJQr2kw5jE73trBFiAgVQyrCaeg223TaTyJFYXf2kPty" ,
"data" : null
} ,
"id" : 1
}
avax.getAtomicTxStatus
Get the status of an atomic transaction sent to the network.
Method: POST
Copy https://avax.nownodes.io/ext/bc/C/avax
Example body (raw )
Copy {
"jsonrpc" : "2.0" ,
"id" : 1 ,
"method" : "avax.getAtomicTxStatus" ,
"params" : {
"txID" : "2QouvFWUbjuySRxeX5xMbNCuAaKWfbk5FeEa2JmoF85RKLk2dD"
}
}
Example response: 200
Copy {
"jsonrpc" : "2.0" ,
"result" : {
"status" : "Unknown"
} ,
"id" : 1
}
avax.getUTXOs
Gets the UTXOs that reference a given address.
Method: POST
Copy https://avax.nownodes.io/ext/bc/C/avax
Example body (raw )
Copy {
"jsonrpc" : "2.0" ,
"id" : 1 ,
"method" : "avax.getUTXOs" ,
"params" : {
"addresses" : [ "C-avax18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5" ] ,
"sourceChain" : "X" ,
"startIndex" : {
"address" : "C-avax18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5" ,
"utxo" : "22RXW7SWjBrrxu2vzDkd8uza7fuEmNpgbj58CxBob9UbP37HSB"
} ,
"encoding" : "hex"
}
}
Example response: 200
Copy {
"jsonrpc" : "2.0" ,
"result" : {
"numFetched" : "0" ,
"utxos" : [] ,
"endIndex" : {
"address" : "C-avax18jma8ppw3nhx5r4ap8clazz0dps7rv5ukulre5" ,
"utxo" : "22RXW7SWjBrrxu2vzDkd8uza7fuEmNpgbj58CxBob9UbP37HSB"
} ,
"encoding" : "hex"
} ,
"id" : 1
}
avax.import
Finalize the transfer of a non-AVAX or AVAX from X-Chain or P-Chain to the C-Chain.
Method: POST
Copy https://avax.nownodes.io/ext/bc/C/avax
Example body (raw )
Copy {
"jsonrpc" : "2.0" ,
"id" : 1 ,
"method" : "avax.import" ,
"params" : {
"to" : "0x4b879aff6b3d24352Ac1985c1F45BA4c3493A398" ,
"sourceChain" : "X" ,
"username" : "myUsername" ,
"password" : "myPassword"
}
}
Example response: 200
Copy {
"jsonrpc" : "2.0" ,
"error" : {
"code" : -32000 ,
"message" : "couldn't get user 'myUsername': incorrect password: user \"myUsername\"" ,
"data" : null
} ,
"id" : 1
}
avax.importKey
Give a user control over an address by providing the private key that controls the address.
Method: POST
Copy https://avax.nownodes.io/ext/bc/C/avax
Example body (raw )
Copy {
"jsonrpc" : "2.0" ,
"id" : 1 ,
"method" : "avax.importKey" ,
"params" : {
"username" : "myUsername" ,
"password" : "myPassword" ,
"privateKey" : "PrivateKey-2o2uPgTSf3aR5nW6yLHjBEAiatAFKEhApvYzsjvAJKRXVWCYkE"
}
}
Example response: 200
Copy {
"jsonrpc" : "2.0" ,
"error" : {
"code" : -32000 ,
"message" : "problem retrieving data: incorrect password: user \"myUsername\"" ,
"data" : null
} ,
"id" : 1
}
avax.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.
Method: POST
Copy https://avax.nownodes.io/ext/bc/C/avax
Example body (raw )
Copy {
"jsonrpc" : "2.0" ,
"id" : 1 ,
"method" : "avax.issueTx" ,
"params" : {
"tx" : "0x00000009de31b4d8b22991d51aa6aa1fc733f23a851a8c9400000000000186a0000000005f041280000000005f9ca900000030390000000000000001fceda8f90fcb5d30614b99d79fc4baa29307762668f16eb0259a57c2d3b78c875c86ec2045792d4df2d926c40f829196e0bb97ee697af71f5b0a966dabff749634c8b729855e937715b0e44303fd1014daedc752006011b730" ,
"encoding" : "hex"
}
}
Example response: 200
Copy {
"jsonrpc" : "2.0" ,
"error" : {
"code" : -32000 ,
"message" : "problem parsing transaction: couldn't unmarshal interface: unknown type ID 646705" ,
"data" : null
} ,
"id" : 1
}
avax.
Method: POST
Copy https://avax.nownodes.io/ext/bc/C/avax
Example body (raw )
Example response: 200
avax.
Method: POST
Copy https://avax.nownodes.io/ext/bc/C/avax
Example body (raw )
Example response: 200
avax.
Method: POST
Copy https://avax.nownodes.io/ext/bc/C/avax
Example body (raw )
Example response: 200
avax.
Method: POST
Copy https://avax.nownodes.io/ext/bc/C/avax
Example body (raw )
Example response: 200
Last updated 8 months ago