> For the complete documentation index, see [llms.txt](https://docs.coin98.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coin98.com/developer-guide/coin98-connect-integration.md).

# Coin98 Connect Integration

### Introduction <a href="#introduction" id="introduction"></a>

### Getting Started <a href="#getting-started" id="getting-started"></a>

Example Dapps connection requested via Coin98 Connect&#x20;

[https://connect.coin98.com](https://connect.coin98.com/)

Quick Start For Dapps

[NPM Package](https://www.npmjs.com/package/@coin98-com/connect-sdk)

### Install

```bash
npm install --save @coin98-com/connect-sdk
```

### Usage

**Dapps Website Connection Example**

```ts
import { Client, Chain } from '@coin98-com/connect-sdk'

const client = new Client()


client.connect(Chain.fantom, {
  logo: "Provide Your App Logo URL",
  name: "Your App Name",
  url: "Provide Your App URL"
})
```

#### React Native Connection (Without Expo) Example

```ts
import { Client, Chain } from '@coin98-com/connect-sdk/dist/native'

const client = new Client()

client.connect(Chain.fantom, {
  logo: "Provide Your App Logo URL",
  name: "Your App Name",
  callbackURL: "Your App Uri Schema"
})
```

#### Lite without any handler (Example With React Native)

```javascript
import { Client, Chain } from '@coin98-com/connect-sdk/dist/lite'
import { Linking } from 'react-native'
const client = new Client({
  callback(cUrl){
    Linking.openURL(cUrl);
  }
})

client.connect(Chain.fantom, {
  logo: "Dapps Logo URL",
  name: "Dapps Name",
  callbackURL: "Application URI Schema"
})
```

#### Common API

```ts
// Common API
client.request({
  method: "<Your Request Method Here>",
  params: [],
  redirect: "(Optional), Callback URL after handle request"
}): Promise<{ result, error }>
```

#### Available Methods

**EVM**

Example

\---- SEND ETH ----

```
const onEthSendTransaction = async () => {
  try {
    const result = await window.coin98.provider.request({
      method: 'eth_sendTransaction',
      params: [
        {
          from: <Your Account>,
          to: <Your Account>,
          value: '0x0'
        }
      ]
    })
    return result
  } catch (err) {
    console.log({ err })
  }
}
```

\---- ETH SIGN ----

```
const onEthSign = async () => {
  try {
    const msg = 'Coin98 Connect Example Message'

    const result = await window.coin98.provider.request({
      method: 'eth_sign',
      params: [msg]
    })
    return result
  } catch (err) {
    console.log({ err })
  }
}

```

Document reference

{% embed url="<https://docs.coin98.com/developer-guide/ethereum-dapps-integration>" %}

**Solana**

Example

\---- SIGN TRANSACTION ----

```
const solSignTransaction = async () => {
  try {
    const pubKey = new PublicKey(solanaAccount)
    const txs = new Transaction().add(SystemProgram.transfer({
      fromPubkey: pubKey,
      toPubkey: pubKey,
      lamports: LAMPORTS_PER_SOL / 100
    }))

    txs.recentBlockhash = (await cnn.getLatestBlockhash()).blockhash
    txs.feePayer = pubKey

    const result = await window.coin98.sol.request({
      method: 'sol_sign',
      params: [txs]
    })

    return result
  } catch (err) {
    console.log({ err })
  }
}
```

\---- SIGN MESSAGES ----

```
const solSignMessage = async () => {
  try {
    const result = await window.coin98.sol.request({
      method: 'sol_signMessage',
      params: ['Some Message Should Goes Here']
    })
    return result
  } catch (err) {
    console.log({ err })
  }
}
```

Document reference

{% embed url="<https://docs.coin98.com/developer-guide/solana-dapps-integration>" %}

**NEAR**

Example

\---- SIGN & SEND TRANSACTIONS ----

```
const nearSignAndSend = async () => {
  try {
    const result = await window.coin98.near.request({
      method: 'near_signAndSendTransaction',
      params: [{
        transactions: [{
          action: 'transfer',
          amount: 0.001
        }],
        receiver: resultAcc.accountId
      }]
    })
    return get(result, 'result') || result
  } catch (err) {
    console.log({ err })
  }
}
```

\---- SIGN NEAR ACCOUNT STATE ----

```
const getNearAccountState = async () => {
  try {
    const result = await window.coin98.near.request({
      method: 'near_accountState',
    })
    const ressultAccState = get(result, 'result') || result
    return ressultAccState
  } catch (err) {
    console.log({ err })
  }
}
```

Document reference

{% embed url="<https://docs.coin98.com/developer-guide/near-dapps-integration>" %}

**Cosmos**

**updating ...**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.coin98.com/developer-guide/coin98-connect-integration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
