> For the complete documentation index, see [llms.txt](https://docs.onto.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onto.app/deep-link.md).

# Deep Link

#### DApp Browser

* Url: <https://link.onto.app/open\\_url?chain=eth,polygon\\&url=https://compound.finance>
* Params:

|  name | required |                                description                                |
| :---: | :------: | :-----------------------------------------------------------------------: |
| chain |   true   | chain type,can be multiple, separated by ',', see details in `Chain Enum` |
|  url  |   true   |                                 DApp link                                 |

#### Open Token

* Url: <https://link.onto.app/open\\_token?chain=bsc\\&token=BNB>
* Params:

|  name | required |                           description                          |
| :---: | :------: | :------------------------------------------------------------: |
| chain |   true   |             chain type, see details in `Chain Enum`            |
| token |   true   | token contract address or the unique id, native token's symbol |

#### Add Token

* Url: <https://link.onto.app/add\\_token?chain=bsc\\&token=0x55d398326f99059ff775485246999027b3197955>
* Params:

|  name | required |                           description                          |
| :---: | :------: | :------------------------------------------------------------: |
| chain |   false  |             chain type, see details in `Chain Enum`            |
| token |   true   | token contract address or the unique id, native token's symbol |

#### Receive Token

* Url: <https://link.onto.app/receive?chain=bsc\\&token=0x55d398326f99059ff775485246999027b3197955\\&amount=1>
* Params:

|  name  | required |                           description                          |
| :----: | :------: | :------------------------------------------------------------: |
|  chain |   true   |             chain type, see details in `Chain Enum`            |
|  token |   true   | token contract address or the unique id, native token's symbol |
| amount |   false  |               receiving amount (without decimals)              |

#### Send Payment

* Url: <https://link.onto.app/send?chain=bsc\\&token=0x55d398326f99059ff775485246999027b3197955\\&address=0x650b5e446edabad7eba7fa7bb2f6119b2630bfbb\\&amount=1\\&memo=test>
* Params:

|   name  | required |                           description                          |
| :-----: | :------: | :------------------------------------------------------------: |
|  chain  |   true   |             chain type, see details in `Chain Enum`            |
|  token  |   true   | token contract address or the unique id, native token's symbol |
| address |   false  |                        receiving address                       |
|  amount |   false  |                sending amount (without decimals)               |
|   memo  |   false  |                   required if transfer needs                   |

#### Stake

* Url: <https://link.onto.app/stake?chain=ont\\&publicKey=\\&amount=>
* Params:

|    name   | required |                          description                         |
| :-------: | :------: | :----------------------------------------------------------: |
|   chain   |   true   |                chain type, now supports `ont`                |
| publicKey |   false  |               node public key when chain=`ont`               |
|   amount  |   false  | when chain=`ont`, staking amount (integer, without decimals) |

#### Unstake

* Url: <https://link.onto.app/unstake?chain=ont\\&publicKey=\\&amount=>
* Params:

|    name   | required |                          description                         |
| :-------: | :------: | :----------------------------------------------------------: |
|   chain   |   true   |                chain type, now supports `ont`                |
| publicKey |   false  |               node public key when chain=`ont`               |
|   amount  |   false  | when chain=`ont`, unstaked amount(integer, without decimals) |

#### Claim

* Url: <https://link.onto.app/stake\\_claim\\_rewards?chain=ont>
* Params:

|  name | required |           description          |
| :---: | :------: | :----------------------------: |
| chain |   true   | chain type, now supports `ont` |

#### Open Swap

* Url: <https://link.onto.app/swap?chain=bsc\\&fromToken=\\&toToken=>
* Params:

|    name   | required |                                description                               |
| :-------: | :------: | :----------------------------------------------------------------------: |
|   chain   |   true   |                       Chain type, see `Chain Enum`                       |
| fromToken |   true   | Source token contract address or unique id, pass symbol for native token |
|  toToken  |   true   | Target token contract address or unique id, pass symbol for native token |

#### Open Bridge

* Url: <https://link.onto.app/bridge?fromChain=bsc\\&toChain=ont\\_evm\\&fromToken=\\&toToken=>
* Params:

|    name   | required |                                description                               |
| :-------: | :------: | :----------------------------------------------------------------------: |
| fromChain |   true   |                    Source chain type, see `Chain Enum`                   |
| fromToken |   true   | Source token contract address or unique id, pass symbol for native token |
|  toChain  |   true   |                    Target chain type, see `Chain Enum`                   |
|  toToken  |   true   | Target token contract address or unique id, pass symbol for native token |

#### Transaction detail

* Url: <https://link.onto.app/tx\\_detail?senderAddress=\\&receiverAddress=\\&txHash=\\&chain=\\&amount=\\&symbol=\\&isSender=>
* Params:

|       name      | required |      description      |
| :-------------: | :------: | :-------------------: |
|  senderAddress  |   true   |     Sender address    |
| receiverAddress |   true   |    Receiver address   |
|      txHash     |   true   |    Transaction hash   |
|      chain      |   true   |       Chain type      |
|      amount     |   true   |    Transfer amount    |
|      symbol     |   true   |      Token symbol     |
|     isSender    |   true   | Is transaction sender |

#### Monitored address records

* Url: <https://link.onto.app/monitor\\_record?ontId=\\&address=\\&note=>
* Params:

|   name  | required |    description    |
| :-----: | :------: | :---------------: |
|  ontId  |   true   |  Monitored Ont ID |
| address |   true   | Monitored address |
|   note  |   true   |    Monitor name   |

#### My Staking

* Url: <https://link.onto.app/my\\_staking?chain=ont>
* Params:

|  name | required |              description             |
| :---: | :------: | :----------------------------------: |
| chain |   true   | Chain type, currently supports `ont` |

#### Invite friends

* Url: <https://link.onto.app/invite\\_friends?ontId=>
* Params:

|  name | required | description |
| :---: | :------: | :---------: |
| ontId |   false  |  User OntID |

#### Run Ontology Node

* Url: <https://link.onto.app/run\\_ont\\_node>

#### Earn

* Url: <https://link.onto.app/earn?chain=eth\\&name=\\&token=>
* Params:

|  name | required |                 description                 |
| :---: | :------: | :-----------------------------------------: |
| chain |   true   | Chain type, currently supports `eth`, `ton` |
|  name |   true   |  Protocol name, e.g., `Lido`, `Tonstakers`  |
| token |   true   |         Staking Token: `ETH`, `TON`         |

#### Onto Connect

* Url: <https://link.onto.app/connect?id=1\\&chain=eth\\&method=\\&params=\\&dappInfo=>
* Params:

|   name   | required |                description                |
| :------: | :------: | :---------------------------------------: |
|    id    |   true   |                  Call ID                  |
|   chain  |   true   |                 Chain type                |
|  method  |   true   |         Connection request method         |
|  params  |   true   |        Parameters, base64Url format       |
| dappInfo |   true   | Caller DApp information, base64Url format |
|          |          |                                           |

#### **About dappInfo**

```
DApp information, JSON format, passed in base64Url format
Example:
**dappInfo Object**:
{
  "name": "Dapp name",
  "url": "https://xxx.dapp.io",
  "icon": "https://xxx.dapp.png",
  "callback":"https://link.xxx.app"
}

**content**:
eyJuYW1lIjoiRGFwcCBuYW1lIiwidXJsIjoiaHR0cHM6Ly94eHguZGFwcC5pbyIsImljb24iOiJodHRwczovL3h4eC5kYXBwLnBuZyIsImNhbGxiYWNrIjoiaHR0cHM6Ly9saW5rLnh4eC5hcHAifQ==
```

#### About callback

```
callback: Third-party app callback deep link, ONTO will automatically append parameters: id, result, or error
e.g.:
https://link.xxx.app?id=1&result=eyJhZGRyZXNzIjoiMHhmODI2MzQ4...
https://link.xxx.app?id=1&error=eyJjb2RlIjoxLCJtZXNzYWdlIjoiZXJyb3IgZGV0YWlsIn0=
```

#### About result

```
If successful, returns result information; does not return error information.
result is JSON, passed in base64Url format
{
    "key1":"",
    "key2":""
}
```

#### About error

```
If failed, returns error information; does not return result information.
error is JSON, passed in base64Url format
{
    "code":1,
    "message":"error detail"
}
```

#### About method and params

```
1.
method: eth_requestAccounts
params: []

method: ont_requestAccounts
params: []

return: 
{
    "address":""
}

Supported chain: EVM chains (eth_requestAccounts) and Ontology (ont_requestAccounts)

2.
method: personal_sign
params: ["0xdeadbeaf","0x9b2055d370f73ec7d8a03e965129118dc8f5bf83"]

DATA 1, message to sign. Hex string or UTF-8 string.
DATA 2, address.

return: 
EVM:
{
    "signature":""
}

Ontology:
{
    "signature":"",
    "publicKey":""
}

Supported chain: EVM chains and Ontology
If chain is an EVM chain,
ONTO will sign with sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))

If chain is ont,
ONTO will sign with sign("\x19Ontology Signed Message:\n" + len(message) + message)

3.
method: eth_signTypedData
params: ["0x9b2055d370f73ec7d8a03e965129118dc8f5bf83", {message to sign containing type information, a domain separator, and data}]

DATA 1, address.
DATA 2, message to sign containing type information, a domain separator, and data.

return: 
{
    "signature":""
}

Supported chain: EVM chains

4.
method: eth_signTransaction
params: {
        "data": "0x",
        "from" : "0x159ffbd3b90a753958b18773fdacc479ea060d6e",
        "to" : "0x159ffbd3b90a753958b18773fdacc479ea060d6e",
        "value" : "0x1234"
    }

method: ont_signTransaction
params: {
        "from" : "Axxx...",
        "contractAddress" : "fc2712...",
        "txHex": "abcd..."
    }

return:
{
    "signedTransaction":""
}

Supported chain: Ontology, EVM chains
```

***

### Available domains links:

* `https://link.onto.app`
* `ontoprovider://link`

***

### Chain Enum

| chain name             | Enum           |
| ---------------------- | -------------- |
| Ontology               | ont            |
| Ethereum               | eth            |
| Kaia                   | kaia           |
| Bitcoin                | btc            |
| Tron                   | trx            |
| Polkadot               | dot            |
| Kusama                 | ksm            |
| BNB Smart Chain        | bsc            |
| Solana                 | sol            |
| Polygon                | polygon        |
| Neo3                   | neo3           |
| Arbitrum One           | arbitrum       |
| Harmony                | harmony        |
| IoTeX EVM              | iotex          |
| FIO                    | fio            |
| Avalanche C-Chain      | avalanche      |
| Ontology EVM           | ont\_evm       |
| Boba                   | boba           |
| NEAR                   | near           |
| zkSync Lite            | zksync         |
| OP Mainnet             | optimism       |
| XDC Network            | xinfin         |
| Vision                 | vision         |
| Aurora                 | aurora         |
| Bittorent Chain        | bittorrent     |
| Aptos                  | aptos          |
| Fantom                 | fantom         |
| Gnosis Chain           | gnosis         |
| Arbitrum Nova          | arbitrum\_nova |
| PlatON                 | platon         |
| Kava                   | kava           |
| Cronos Chain           | cronos         |
| zkSync Era             | zksync\_v2     |
| BRISE Chain            | bitgert        |
| Telos EVM              | telos          |
| KuCoin Community Chain | kcc            |
| Metis                  | metis          |
| Litecoin               | ltc            |
| XRP                    | ripple         |
| XRP EVM                | ripple\_evm    |
| ENULS                  | enuls          |
| Celo                   | celo           |
| Canto                  | canto          |
| Sui                    | sui            |
| Neon                   | neon           |
| Astar                  | astar          |
| Chiliz EVM             | chiliz\_evm    |
| Moonbeam               | moonbeam       |
| Moonriver              | moonriver      |
| Oasis Emerald          | oasis\_emerald |
| Polygon zkEVM          | polygon\_zkevm |
| Filecoin EVM           | fil\_evm       |
| Flare                  | flare          |
| Mantle                 | mantle         |
| Base                   | base\_evm      |
| Fuse                   | fuse           |
| Scroll                 | scroll         |
| X Layer                | xlayer         |
| Velas                  | velas          |
| Core                   | core           |
| Linea                  | linea          |
| ZKFair                 | zkfair         |
| Blast                  | blast          |
| TON Chain              | ton            |
| SONIC                  | sonic\_evm     |
| BERA Chain             | bera           |
| Manta Pacific          | manta          |
| Plasma                 | plasma         |
| HyperEVM               | hyper\_evm     |
