Skip to content
Cross-chain Metaspace Interface

Create Public Chain Private AddressTry API

POST chain_dexSwap (Create Public Chain Private Address)

description:Executed automatically by the wallet. The wallet assigns each user a local address on the corresponding public chain as the cross-chain address for importing assets into VoidChain. Transfers in and out for that account use this address, and the address is created and stored inside the edge trust machine.

TCaccountautomaticallygenerateotherpublic chainaddresslocalmanageallis use TCuserprivate keyhashasis passwordcodetoencryptionlocalsave

For each public chain on the same edge trust machine, a TC user keeps only one address. If the address already exists when creating a public-chain address, creation is skipped to avoid overwriting an earlier address and risking asset loss.

Parameters

chain: chainname

Return Values

address:returncorrespondingpublic chainaddress

Example Code
Request
{
"jsonrpc": "3.0",
"method": "chain_dexSwap",
"params": [
  "opcode=Account&subcode=Create&chain=ETH",
  "encryp=none"
],
"id": "aa80aa0c6bb0c7d81ac7e5b3"
}
Response
{
 "jsonrpc":  "3.0",
 "id":  "0b2c7458f88bdbb586884bb9",
 "result": {
   "ret":  "0",
   "err":  "",
   "content": {
    "chain":  "ETH",
     "address":  "0x8303466791b6fc5443f3c4e099fd9cd2a702755a"
  }
}

On this page