Skip to content

Commit

Permalink
feat: add ton connect provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Ikari-Shinji-re authored and yeager-eren committed Nov 27, 2024
1 parent e0aaef4 commit 2a2dbb7
Show file tree
Hide file tree
Showing 37 changed files with 397 additions and 73 deletions.
6 changes: 3 additions & 3 deletions examples/queue-manager-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"rango-sdk": "^0.1.57"
},
"dependencies": {
"@rango-dev/provider-all": "^0.39.1-next.0",
"@rango-dev/provider-xdefi": "^0.39.1-next.0",
"@rango-dev/provider-all": "^0.39.1-next.1",
"@rango-dev/provider-xdefi": "^0.39.1-next.1",
"@rango-dev/queue-manager-rango-preset": "^0.39.0",
"@rango-dev/queue-manager-react": "^0.27.0",
"@rango-dev/wallets-react": "^0.25.0",
Expand All @@ -30,4 +30,4 @@
"rango-sdk-basic": "^0.1.57",
"rango-types": "^0.1.74"
}
}
}
6 changes: 3 additions & 3 deletions examples/wallets-adapter-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"clean": "rimraf .parcel-cache && rimraf dist"
},
"dependencies": {
"@rango-dev/provider-all": "^0.39.1-next.0",
"@rango-dev/wallets-adapter": "^0.35.1-next.0",
"@rango-dev/provider-all": "^0.39.1-next.1",
"@rango-dev/wallets-adapter": "^0.35.1-next.1",
"rango-sdk": "^0.1.57",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand All @@ -27,4 +27,4 @@
"publishConfig": {
"access": "public"
}
}
}
4 changes: 2 additions & 2 deletions examples/wallets-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
"clean": "rimraf .parcel-cache && rimraf dist"
},
"dependencies": {
"@rango-dev/provider-all": "^0.39.1-next.0",
"@rango-dev/provider-all": "^0.39.1-next.1",
"@rango-dev/ui": "^0.41.0",
"@rango-dev/wallets-react": "^0.25.0",
"@rango-dev/wallets-shared": "^0.39.0",
"rango-sdk": "^0.1.57",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
}
}
33 changes: 17 additions & 16 deletions wallets/provider-all/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,42 @@
"@rango-dev/provider-argentx": "^0.40.1-next.0",
"@rango-dev/provider-bitget": "^0.36.1-next.0",
"@rango-dev/provider-braavos": "^0.33.1-next.0",
"@rango-dev/provider-brave": "^0.40.1-next.0",
"@rango-dev/provider-clover": "^0.40.1-next.0",
"@rango-dev/provider-coin98": "^0.40.1-next.0",
"@rango-dev/provider-coinbase": "^0.39.1-next.0",
"@rango-dev/provider-brave": "^0.40.1-next.1",
"@rango-dev/provider-clover": "^0.40.1-next.1",
"@rango-dev/provider-coin98": "^0.40.1-next.1",
"@rango-dev/provider-coinbase": "^0.39.1-next.1",
"@rango-dev/provider-cosmostation": "^0.39.0",
"@rango-dev/provider-default": "^0.36.0",
"@rango-dev/provider-enkrypt": "^0.39.0",
"@rango-dev/provider-exodus": "^0.39.1-next.0",
"@rango-dev/provider-frontier": "^0.39.1-next.0",
"@rango-dev/provider-exodus": "^0.39.1-next.1",
"@rango-dev/provider-frontier": "^0.39.1-next.1",
"@rango-dev/provider-halo": "^0.39.0",
"@rango-dev/provider-keplr": "^0.39.0",
"@rango-dev/provider-leap-cosmos": "^0.39.0",
"@rango-dev/provider-ledger": "^0.9.1-next.0",
"@rango-dev/provider-math-wallet": "^0.39.1-next.0",
"@rango-dev/provider-ledger": "^0.9.1-next.1",
"@rango-dev/provider-math-wallet": "^0.39.1-next.1",
"@rango-dev/provider-metamask": "^0.39.0",
"@rango-dev/provider-mytonwallet": "^0.24.1-next.1",
"@rango-dev/provider-okx": "^0.39.1-next.0",
"@rango-dev/provider-phantom": "^0.39.1-next.0",
"@rango-dev/provider-okx": "^0.39.1-next.1",
"@rango-dev/provider-phantom": "^0.39.1-next.1",
"@rango-dev/provider-rabby": "^0.6.0",
"@rango-dev/provider-safe": "^0.32.0",
"@rango-dev/provider-safepal": "^0.39.1-next.0",
"@rango-dev/provider-solflare": "^0.5.1-next.0",
"@rango-dev/provider-solflare-snap": "^0.10.1-next.0",
"@rango-dev/provider-safepal": "^0.39.1-next.1",
"@rango-dev/provider-solflare": "^0.5.1-next.1",
"@rango-dev/provider-solflare-snap": "^0.10.1-next.1",
"@rango-dev/provider-taho": "^0.39.0",
"@rango-dev/provider-tokenpocket": "^0.39.0",
"@rango-dev/provider-tomo": "^0.6.0",
"@rango-dev/provider-tonconnect": "^0.1.0",
"@rango-dev/provider-trezor": "^0.6.0",
"@rango-dev/provider-tron-link": "^0.39.1-next.0",
"@rango-dev/provider-trustwallet": "^0.39.0",
"@rango-dev/provider-walletconnect-2": "^0.32.0",
"@rango-dev/provider-xdefi": "^0.39.1-next.0",
"@rango-dev/provider-walletconnect-2": "^0.32.1-next.0",
"@rango-dev/provider-xdefi": "^0.39.1-next.1",
"@rango-dev/wallets-react": "^0.25.0",
"@rango-dev/wallets-shared": "^0.39.0"
},
"publishConfig": {
"access": "public"
}
}
}
17 changes: 15 additions & 2 deletions wallets/provider-all/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Environments as MyTonWalletEnvironments } from '@rango-dev/provider-mytonwallet';
import type { Environments as TonConnectEnvironments } from '@rango-dev/provider-tonconnect';
import type { Environments as TrezorEnvironments } from '@rango-dev/provider-trezor';
import type { Environments as WalletConnectEnvironments } from '@rango-dev/provider-walletconnect-2';
import type { ProviderInterface } from '@rango-dev/wallets-react';
Expand Down Expand Up @@ -32,6 +32,7 @@ import * as solflareSnap from '@rango-dev/provider-solflare-snap';
import * as taho from '@rango-dev/provider-taho';
import * as tokenpocket from '@rango-dev/provider-tokenpocket';
import * as tomo from '@rango-dev/provider-tomo';
import * as tonconnect from '@rango-dev/provider-tonconnect';
import * as trezor from '@rango-dev/provider-trezor';
import * as tronLink from '@rango-dev/provider-tron-link';
import * as trustwallet from '@rango-dev/provider-trustwallet';
Expand All @@ -45,7 +46,7 @@ interface Options {
walletconnect2: WalletConnectEnvironments;
selectedProviders?: (WalletType | ProviderInterface)[];
trezor?: TrezorEnvironments;
tonConnect?: MyTonWalletEnvironments;
tonConnect?: TonConnectEnvironments;
}

export const allProviders = (options?: Options) => {
Expand Down Expand Up @@ -88,12 +89,24 @@ export const allProviders = (options?: Options) => {
}
}

if (
!isWalletExcluded(providers, {
type: WalletTypes.TON_CONNECT,
name: 'tonconnect',
})
) {
if (!!options?.tonConnect?.manifestUrl) {
tonconnect.init(options.tonConnect);
}
}

return [
safe,
defaultInjected,
metamask,
solflareSnap,
walletconnect2,
tonconnect,
keplr,
phantom,
argentx,
Expand Down
4 changes: 2 additions & 2 deletions wallets/provider-brave/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rango-dev/provider-brave",
"version": "0.40.1-next.0",
"version": "0.40.1-next.1",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
Expand All @@ -22,7 +22,7 @@
},
"dependencies": {
"@rango-dev/signer-evm": "^0.32.0",
"@rango-dev/signer-solana": "^0.34.0",
"@rango-dev/signer-solana": "^0.34.1-next.0",
"@rango-dev/wallets-shared": "^0.39.0",
"rango-types": "^0.1.74"
},
Expand Down
4 changes: 2 additions & 2 deletions wallets/provider-clover/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rango-dev/provider-clover",
"version": "0.40.1-next.0",
"version": "0.40.1-next.1",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
Expand All @@ -22,7 +22,7 @@
},
"dependencies": {
"@rango-dev/signer-evm": "^0.32.0",
"@rango-dev/signer-solana": "^0.34.0",
"@rango-dev/signer-solana": "^0.34.1-next.0",
"@rango-dev/wallets-shared": "^0.39.0",
"bs58": "^5.0.0",
"rango-types": "^0.1.74"
Expand Down
4 changes: 2 additions & 2 deletions wallets/provider-coin98/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rango-dev/provider-coin98",
"version": "0.40.1-next.0",
"version": "0.40.1-next.1",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
Expand All @@ -22,7 +22,7 @@
},
"dependencies": {
"@rango-dev/signer-evm": "^0.32.0",
"@rango-dev/signer-solana": "^0.34.0",
"@rango-dev/signer-solana": "^0.34.1-next.0",
"@rango-dev/wallets-shared": "^0.39.0",
"@solana/web3.js": "^1.91.4",
"bs58": "^5.0.0",
Expand Down
4 changes: 2 additions & 2 deletions wallets/provider-coinbase/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rango-dev/provider-coinbase",
"version": "0.39.1-next.0",
"version": "0.39.1-next.1",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
Expand All @@ -22,7 +22,7 @@
},
"dependencies": {
"@rango-dev/signer-evm": "^0.32.0",
"@rango-dev/signer-solana": "^0.34.0",
"@rango-dev/signer-solana": "^0.34.1-next.0",
"@rango-dev/wallets-shared": "^0.39.0",
"bs58": "^5.0.0",
"rango-types": "^0.1.74"
Expand Down
4 changes: 2 additions & 2 deletions wallets/provider-exodus/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rango-dev/provider-exodus",
"version": "0.39.1-next.0",
"version": "0.39.1-next.1",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
Expand All @@ -22,7 +22,7 @@
},
"dependencies": {
"@rango-dev/signer-evm": "^0.32.0",
"@rango-dev/signer-solana": "^0.34.0",
"@rango-dev/signer-solana": "^0.34.1-next.0",
"@rango-dev/wallets-shared": "^0.39.0",
"bs58": "^5.0.0",
"rango-types": "^0.1.74"
Expand Down
4 changes: 2 additions & 2 deletions wallets/provider-frontier/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rango-dev/provider-frontier",
"version": "0.39.1-next.0",
"version": "0.39.1-next.1",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
Expand All @@ -22,7 +22,7 @@
},
"dependencies": {
"@rango-dev/signer-evm": "^0.32.0",
"@rango-dev/signer-solana": "^0.34.0",
"@rango-dev/signer-solana": "^0.34.1-next.0",
"@rango-dev/wallets-shared": "^0.39.0",
"rango-types": "^0.1.74"
},
Expand Down
4 changes: 2 additions & 2 deletions wallets/provider-ledger/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rango-dev/provider-ledger",
"version": "0.9.1-next.0",
"version": "0.9.1-next.1",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
Expand All @@ -27,7 +27,7 @@
"@ledgerhq/hw-transport-webhid": "^6.28.6",
"@ledgerhq/types-cryptoassets": "^7.11.0",
"@ledgerhq/types-devices": "^6.24.0",
"@rango-dev/signer-solana": "^0.34.0",
"@rango-dev/signer-solana": "^0.34.1-next.0",
"@rango-dev/wallets-shared": "^0.39.0",
"@solana/web3.js": "^1.91.4",
"@types/w3c-web-hid": "^1.0.2",
Expand Down
4 changes: 2 additions & 2 deletions wallets/provider-math-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rango-dev/provider-math-wallet",
"version": "0.39.1-next.0",
"version": "0.39.1-next.1",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
Expand All @@ -23,7 +23,7 @@
"dependencies": {
"@cosmjs/stargate": "^0.31.0",
"@rango-dev/signer-evm": "^0.32.0",
"@rango-dev/signer-solana": "^0.34.0",
"@rango-dev/signer-solana": "^0.34.1-next.0",
"@rango-dev/wallets-shared": "^0.39.0",
"rango-types": "^0.1.74"
},
Expand Down
4 changes: 2 additions & 2 deletions wallets/provider-okx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rango-dev/provider-okx",
"version": "0.39.1-next.0",
"version": "0.39.1-next.1",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
Expand All @@ -22,7 +22,7 @@
},
"dependencies": {
"@rango-dev/signer-evm": "^0.32.0",
"@rango-dev/signer-solana": "^0.34.0",
"@rango-dev/signer-solana": "^0.34.1-next.0",
"@rango-dev/wallets-shared": "^0.39.0",
"rango-types": "^0.1.74"
},
Expand Down
4 changes: 2 additions & 2 deletions wallets/provider-phantom/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rango-dev/provider-phantom",
"version": "0.39.1-next.0",
"version": "0.39.1-next.1",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
Expand All @@ -21,7 +21,7 @@
"lint": "eslint \"**/*.{ts,tsx}\" --ignore-path ../../.eslintignore"
},
"dependencies": {
"@rango-dev/signer-solana": "^0.34.0",
"@rango-dev/signer-solana": "^0.34.1-next.0",
"@rango-dev/wallets-shared": "^0.39.0",
"rango-types": "^0.1.74"
},
Expand Down
4 changes: 2 additions & 2 deletions wallets/provider-safepal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rango-dev/provider-safepal",
"version": "0.39.1-next.0",
"version": "0.39.1-next.1",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
Expand All @@ -22,7 +22,7 @@
},
"dependencies": {
"@rango-dev/signer-evm": "^0.32.0",
"@rango-dev/signer-solana": "^0.34.0",
"@rango-dev/signer-solana": "^0.34.1-next.0",
"@rango-dev/wallets-shared": "^0.39.0",
"rango-types": "^0.1.74"
},
Expand Down
4 changes: 2 additions & 2 deletions wallets/provider-solflare-snap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rango-dev/provider-solflare-snap",
"version": "0.10.1-next.0",
"version": "0.10.1-next.1",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
Expand All @@ -22,7 +22,7 @@
},
"dependencies": {
"@rango-dev/provider-metamask": "^0.39.0",
"@rango-dev/signer-solana": "^0.34.0",
"@rango-dev/signer-solana": "^0.34.1-next.0",
"@rango-dev/wallets-shared": "^0.39.0",
"@solflare-wallet/metamask-sdk": "^1.0.3",
"bs58": "^5.0.0",
Expand Down
4 changes: 2 additions & 2 deletions wallets/provider-solflare/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rango-dev/provider-solflare",
"version": "0.5.1-next.0",
"version": "0.5.1-next.1",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
Expand All @@ -21,7 +21,7 @@
"lint": "eslint \"**/*.{ts,tsx}\" --ignore-path ../../.eslintignore"
},
"dependencies": {
"@rango-dev/signer-solana": "^0.34.0",
"@rango-dev/signer-solana": "^0.34.1-next.0",
"@rango-dev/wallets-shared": "^0.39.0",
"@solflare-wallet/sdk": "^1.4.2",
"bs58": "^5.0.0",
Expand Down
Loading

0 comments on commit 2a2dbb7

Please sign in to comment.