Find a P-to-X export waiting for its Avalanche import

An accepted export removes value from its source chain before an ordinary X-Chain balance reflects the transfer. Search the destination’s atomic UTXO set for the export’s output.

Query the destination with the source chain specified

POST this JSON to /ext/bc/X on the same network where the P-Chain export was accepted. Replace the placeholder with the valid X-Chain destination address. Omitting sourceChain queries ordinary X-Chain outputs and can hide the pending import.

{"jsonrpc":"2.0","id":1,"method":"avm.getUTXOs","params":{"addresses":["X-DESTINATION_ADDRESS"],"sourceChain":"P","limit":50,"encoding":"hex"}}

Match the outpoint before signing an import

Decode each returned UTXO and match the export transaction ID, output index, asset and owner condition. Follow endIndex as startIndex if the first page is full. After a successful import, that atomic output is consumed. If it is missing, inspect both the original export destination and any existing import before constructing another transfer.

Sources