Skip to content

Commit

Permalink
update docs to show the partner id creation page
Browse files Browse the repository at this point in the history
  • Loading branch information
abhisom2912 committed Apr 18, 2024
1 parent eedb3d8 commit 7421540
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ After installing the module, import and initialize it into your code:
import { RouterProtocol } from "@routerprotocol/router-js-sdk"
import { ethers } from "ethers";

let SDK_ID = 24 // get your unique sdk id by contacting us on Telegram
let SDK_ID = 24 // get your unique sdk id - https://app.routernitro.com/partnerId
let chainId = 137
const provider = new ethers.providers.JsonRpcProvider("https://polygon-rpc.com", chainId)

Expand All @@ -27,5 +27,5 @@ await routerprotocol.initialize()
```

:::note
To play around with the SDK, you can use the SDK ID given in the example above. But for use in any product/protocol, you will be assigned a unique SDK ID. To get your SDK ID, please contact us on [Telegram](https://t.me/Add_ith).
To play around with the SDK, you can use the SDK ID given in the example above. But for use in any product/protocol, you will be assigned a unique SDK ID. To get your SDK ID, please use the link [here](https://app.routernitro.com/partnerId).
:::
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ const getQuote = async () => {
toTokenChainId: '43113', // Fuji
slippageTolerance: 1, // optional
additionalGasLimit: '100000', // Additional gas limit to execute instruction on dest chain
partnerId: 0, // (Optional) - For any partnership, get your unique partner id by contacting us on Telegram or emailing us at contact@routerprotocol.com
partnerId: 0, // (Optional) - For any partnership, get your unique partner id - https://app.routernitro.com/partnerId
};

const endpoint = 'v2/sequencer-quote';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const params = {
'userAddress': 'YOUR_WALLET_ADDRESS',
'feeTokenAddress': '0x16ECCfDbb4eE1A85A33f3A9B21175Cd7Ae753dB4', // ROUTE on Polygon
'slippageTolerance': 2,
'partnerId': 0, // get your unique partner id by contacting us on Telegram
'partnerId': 0, // get your unique partner id - https://app.routernitro.com/partnerId
}


Expand All @@ -45,7 +45,7 @@ const params = {
'fromTokenChainId': 137, // Polygon
'toTokenChainId': 250, // Fantom
'slippageTolerance': 2, // optional
'partnerId': 0, // get your unique partner id by contacting us on Telegram
'partnerId': 0, // get your unique partner id - https://app.routernitro.com/partnerId
}
```

Expand Down Expand Up @@ -83,7 +83,7 @@ const main = async () => {
'amount': '10000000', // 10 USDC (USDC token contract on Polygon has 6 decimal places)
'fromTokenChainId': 137, // Polygon
'toTokenChainId': 250, // Fantom
'partnerId': 24, // get your unique partner id by contacting us on Telegram
'partnerId': 24, // get your unique partner id - https://app.routernitro.com/partnerId
}

const quoteData = await getQuote(params);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { PathFinder, Network } from "@routerprotocol/asset-transfer-sdk-ts";
import { evmSignerFromPrivateKeyAndRpc } from "@routerprotocol/asset-transfer-sdk-ts/pathfinder/ChainClient/EvmChainClient";

// initialize a Pathfinder instance
const YOUR_WIDGET_ID = 24; // get your unique sdk id by contacting us on Telegram
const YOUR_WIDGET_ID = 24; // get your unique sdk id - https://app.routernitro.com/partnerId
const pathfinder = new Pathfinder(Network.Testnet, YOUR_WIDGET_ID);

const main = async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { PathFinder, Network } from "@routerprotocol/asset-transfer-sdk-ts";
import { evmSignerFromPrivateKeyAndRpc } from "@routerprotocol/asset-transfer-sdk-ts/pathfinder/ChainClient/EvmChainClient";

// initialize a Pathfinder instance
const YOUR_WIDGET_ID = 0; // get your unique sdk id by contacting us on Telegram
const YOUR_WIDGET_ID = 0; // get your unique sdk id - https://app.routernitro.com/partnerId
const pathfinder = new Pathfinder(Network.Testnet, YOUR_WIDGET_ID);

const main = async () => {
Expand Down Expand Up @@ -67,7 +67,7 @@ import { evmSignerFromPrivateKeyAndRpc } from "@routerprotocol/asset-transfer-sd
import { getTronWeb } from "@routerprotocol/asset-transfer-sdk-ts/pathfinder/ChainClient/TronChainClient";

// initialize a Pathfinder instance
const YOUR_WIDGET_ID = 0; // get your unique sdk id by contacting us on Telegram
const YOUR_WIDGET_ID = 0; // get your unique sdk id - https://app.routernitro.com/partnerId
const pathfinder = new Pathfinder(Network.Testnet, YOUR_WIDGET_ID);
const TRON_RPC = "https://api.shasta.trongrid.io";
const main = async () => {
Expand Down Expand Up @@ -107,7 +107,7 @@ import { PathFinder, Network } from "@routerprotocol/asset-transfer-sdk-ts";
import { nearSignerFromPrivateKey } from "@routerprotocol/asset-transfer-sdk-ts/pathfinder/ChainClient/NearChainClient";

// initialize a Pathfinder instance
const YOUR_WIDGET_ID = 0; // get your unique sdk id by contacting us on Telegram
const YOUR_WIDGET_ID = 0; // get your unique sdk id - https://app.routernitro.com/partnerId
const pathfinder = new Pathfinder(Network.Testnet, YOUR_WIDGET_ID);

const main = async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ Example:
```jsx
import { PathFinder, Network } from "@routerprotocol/asset-transfer-sdk-ts";

const YOUR_WIDGET_ID = 24 // get your unique sdk id by contacting us on Telegram
const YOUR_WIDGET_ID = 24 // get your unique sdk id - https://app.routernitro.com/partnerId
const pathfinder = new PathFinder(Network.Testnet, YOUR_WIDGET_ID);
```
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Getting a quote for transferring 10 USDT from Fuji to Mumbai:
import { PathFinder, Network } from "@routerprotocol/asset-transfer-sdk-ts";

// initialize a Pathfinder instance
const YOUR_WIDGET_ID = 0; // get your unique sdk id by contacting us on Telegram
const YOUR_WIDGET_ID = 0; // get your unique sdk id - https://app.routernitro.com/partnerId
const pathfinder = new Pathfinder(Network.Testnet, YOUR_WIDGET_ID);

const main = async () => {
Expand All @@ -59,5 +59,5 @@ In case you want source / destination token to be native token, then the followi

:::info
Important Note:
To play around with the API, you can use the Partner ID given in the example above. But for use in any product/protocol, you will be assigned a unique Partner ID. To get your Partner ID, please contact us on [Telegram](https://t.me/Add_ith).
To play around with the API, you can use the Partner ID given in the example above. But for use in any product/protocol, you will be assigned a unique Partner ID. To get your Partner ID, please use the link provided [here](https://app.routernitro.com/partnerId).
:::
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const main = async () => {
'amount': '100000000000000000', // source amount
'fromTokenChainId': "80001", // Mumbai
'toTokenChainId': "43113", // Fuji
'partnerId': 0, // (Optional) - For any partnership, get your unique partner id by contacting us on Telegram or emailing us at contact@routerprotocol.com
'partnerId': 0, // (Optional) - For any partnership, get your unique partner id - https://app.routernitro.com/partnerId
}

const quoteData = await getQuote(params);
Expand All @@ -57,5 +57,5 @@ In case you want source / destination token to be native token, then the followi

:::info
Important Note:
To play around with the API, you can use the Partner ID given in the example above. But for use in any product/protocol, you will be assigned a unique Partner ID. To get your Partner ID, please contact us on [Telegram](https://t.me/Add_ith).
To play around with the API, you can use the Partner ID given in the example above. But for use in any product/protocol, you will be assigned a unique Partner ID. To get your Partner ID, please use the link [here](https://app.routernitro.com/partnerId).
:::
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const baseUrl = "https://nitro.routerprotocol.com/swap";

const configuration = {
isWidget: true,
partnerId: "0", // get your unique partner id by contacting us on Telegram or emailing us at contact@routerprotocol.com
partnerId: "0", // get your unique partner id - https://app.routernitro.com/partnerId
fromChain: "80001",
toChain: "43113",
fromToken: "0x22bAA8b6cdd31a0C5D1035d6e72043f4Ce6aF054",
Expand All @@ -34,7 +34,7 @@ document.getElementById("widget__iframe").src = `${baseUrl}?${paramString}`;
:::note
1. You can use [Nitro's Widget Builder Tool](https://nitro.routerprotocol.com/widget) to automatically generate the widget paramaters.
2. In case you want source / destination token to be native token, then the following value should be used for token address - 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
3. To integrate the widget on your UI, you will be assigned a unique partner ID. To get your partner ID, please contact us on [Telegram](https://t.me/Add_ith).
3. To integrate the widget on your UI, you will be assigned a unique partner ID. To get your partner ID, please use the link [here](https://app.routernitro.com/partnerId).
:::

```jsx
Expand Down
2 changes: 1 addition & 1 deletion static/api/PATHFINDER.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ paths:
schema:
type: number
example: 0
description: "For testing omit this parameter. For any partnership, you can get your unique partner id by contacting us on Telegram or emailing us at contact@routerprotocol.com"
description: "For testing omit this parameter. For any partnership, you can get your unique partner id - https://app.routernitro.com/partnerId"
responses:
"200":
description: Empty
Expand Down

0 comments on commit 7421540

Please sign in to comment.