post https://api.uniblock.dev/uni/v1/json-rpc#55
Finalize the transfer of a non-AVAX or AVAX from X-Chain or P-Chain to the C-Chain.
Not recommended for use on Mainnet.
Description
Finalize the transfer of a non-AVAX or AVAX from X-Chain or P-Chain to the C-Chain. Before this method is called, you must call the X-Chain’s avm.export
or P-Chain’s platform.exportAVAX
with assetID AVAX
to initiate the transfer.
Signature:
avax.import({
to: string,
sourceChain: string,
baseFee: int, // optional
username: string,
password:string,
}) -> {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 X-Chain's or P-Chain'sexport
.sourceChain
is the ID or alias of the chain the asset is being imported from. To import funds from the X-Chain, use"X"
; for the P-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
isusername
‘s password.
Response:
txID
is the ID of the completedImportTx
.