Cross-chain Metaspace Interface
Import Public Chain MnemonicTry API
POST
chain_dexSwap
(Import Public Chain Mnemonic)
description:When importing a local address for the corresponding public chain, an existing local address will be overwritten. Before importing, check whether the current public-chain address exists; if it does, the exchange should ask the user for a second confirmation.
Parameters
chain: chainname
content: base64encodedprivate key
Example Code
{
"jsonrpc": "3.0",
"method": "chain_dexSwap",
"params": [
"opcode=Key&subcode=Import&chain=ETH&content=",
"encryp=none"
],
"id": "ae47754298cdd62834b33af8"
}{
"jsonrpc": "3.0",
"id": "cc9d882509dd9ccea764434a",
"result": {
"ret": "0",
"err": "",
"content": {
"chain": "ETH",
"address": "0x75d812e4423cc57a3c70dffa52b3ec53d55ce951"
}
}
}