diff --git a/package.json b/package.json index a8bf89af8..304ce902d 100644 --- a/package.json +++ b/package.json @@ -97,7 +97,6 @@ "@reduxjs/toolkit": "^2.2.5", "@scure/bip32": "^1.3.0", "@scure/bip39": "^1.2.0", - "@skip-router/core": "^5.1.0", "@skip-go/client": "0.10.3", "@solana/web3.js": "^1.93.0", "@statsig/js-client": "1.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 16d387f34..de63bcd8d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -152,9 +152,6 @@ dependencies: '@skip-go/client': specifier: 0.10.3 version: 0.10.3(@types/react@18.3.3)(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.3) - '@skip-router/core': - specifier: ^5.1.0 - version: 5.1.0(@types/react@18.3.3)(chain-registry@1.63.9)(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.3) '@solana/web3.js': specifier: ^1.93.0 version: 1.93.2 @@ -241,7 +238,7 @@ dependencies: version: 2.1.0 graz: specifier: ^0.1.19 - version: 0.1.19(@cosmjs/amino@0.32.2)(@cosmjs/cosmwasm-stargate@0.32.3)(@cosmjs/launchpad@0.27.1)(@cosmjs/proto-signing@0.32.2)(@cosmjs/stargate@0.32.2)(@cosmjs/tendermint-rpc@0.32.2)(@leapwallet/cosmos-social-login-capsule-provider@0.0.39)(@types/react@18.3.3)(axios@1.6.7)(react-dom@18.2.0)(react-native@0.74.3)(react@18.2.0) + version: 0.1.19(@cosmjs/amino@0.32.2)(@cosmjs/cosmwasm-stargate@0.32.4)(@cosmjs/launchpad@0.27.1)(@cosmjs/proto-signing@0.32.2)(@cosmjs/stargate@0.32.2)(@cosmjs/tendermint-rpc@0.32.2)(@leapwallet/cosmos-social-login-capsule-provider@0.0.39)(@types/react@18.3.3)(axios@1.6.7)(react-dom@18.2.0)(react-native@0.74.3)(react@18.2.0) jsdom: specifier: ^24.1.0 version: 24.1.0 @@ -2334,10 +2331,6 @@ packages: - fp-ts dev: false - /@chain-registry/types@0.45.6: - resolution: {integrity: sha512-adtjeJe9mZjNcXGbpjRlYhsJvClvRDcWjcnsOsCP5Sg8GpmPY3qbvtHsmYxcBT2zv46HozceUgI9UBL5fnGYZg==} - dev: false - /@chain-registry/types@0.50.0: resolution: {integrity: sha512-77TY/i3lPPQRQGBl0PFrb8+k3rbjIb4LOSsmK49mlMSPUNeJ3Wcx3Donnm2XvdpQDH5aeCofWOPonZ2/3XoibQ==} dev: false @@ -2619,25 +2612,6 @@ packages: - utf-8-validate dev: false - /@cosmjs/cosmwasm-stargate@0.32.3: - resolution: {integrity: sha512-pqkt+QsLIPNMTRh9m+igJgIpzXXgn1BxmxfAb9zlC23kvsuzY/12un9M7iAdim1NwKXDFeYw46xC2YkprwQp+g==} - dependencies: - '@cosmjs/amino': 0.32.3 - '@cosmjs/crypto': 0.32.3 - '@cosmjs/encoding': 0.32.3 - '@cosmjs/math': 0.32.3 - '@cosmjs/proto-signing': 0.32.3 - '@cosmjs/stargate': 0.32.3 - '@cosmjs/tendermint-rpc': 0.32.3 - '@cosmjs/utils': 0.32.3 - cosmjs-types: 0.9.0 - pako: 2.1.0 - transitivePeerDependencies: - - bufferutil - - debug - - utf-8-validate - dev: false - /@cosmjs/cosmwasm-stargate@0.32.4: resolution: {integrity: sha512-Fuo9BGEiB+POJ5WeRyBGuhyKR1ordvxZGLPuPosFJOH9U0gKMgcjwKMCgAlWFkMlHaTB+tNdA8AifWiHrI7VgA==} dependencies: @@ -4193,12 +4167,6 @@ packages: '@initia/initia-registry-types': 0.0.17 dev: false - /@initia/initia-registry@0.1.9: - resolution: {integrity: sha512-zXIP9Gk0OG4SJkcrileCHJNgZU8LyHzTHdcNO5bjEoxeuvM8mvlhsGQvKeJcefBcvhvIyeX5LOlSBCTeIofngg==} - dependencies: - '@initia/initia-registry-types': 0.0.17 - dev: false - /@injectivelabs/core-proto-ts@0.0.21: resolution: {integrity: sha512-RBxSkRBCty60R/l55/D1jsSW0Aof5dyGFhCFdN3A010KjMv/SzZGGr+6DZPY/hflyFeaJzDv/VTopCymKNRBvQ==} dependencies: @@ -4208,15 +4176,6 @@ packages: rxjs: 7.8.1 dev: false - /@injectivelabs/core-proto-ts@0.0.24: - resolution: {integrity: sha512-qDAEMWvGhMcdvgWHHZWLFFooNGE/f7ZYR4/TPBoLE/TC39WWO9A8Fb0kOlNAKrGhLeZIHUzE/ESPpZimTxUTKg==} - dependencies: - '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.2) - google-protobuf: 3.21.2 - protobufjs: 7.3.2 - rxjs: 7.8.1 - dev: false - /@injectivelabs/dmm-proto-ts@1.0.19: resolution: {integrity: sha512-2FCzCziy1RhzmnkAVIU+Asby/GXAVQqKt5/o1s52j0LJXfJMpiCrV6soLfnjTebj61T+1WvJBPFoZCCiVYBpcw==} dependencies: @@ -4226,15 +4185,6 @@ packages: rxjs: 7.8.1 dev: false - /@injectivelabs/dmm-proto-ts@1.0.20: - resolution: {integrity: sha512-S9vGOAZbNNa+N5QDW2HcXn7ohvU/4qze6wELA9gF8zu8uWbE+UKWTqzkZ+B4XuG1MkJwoHL7pVcj3M+nC9Qe4A==} - dependencies: - '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.2) - google-protobuf: 3.21.2 - protobufjs: 7.3.2 - rxjs: 7.8.1 - dev: false - /@injectivelabs/exceptions@1.14.11(google-protobuf@3.21.2): resolution: {integrity: sha512-oNVBtNYML3Fvh6qaUsqNcyBwjyG9hUy0/eSIiK2kOKWdpxeQ9Ctxre3sxoSiDy99o4mi1ynB2wh2F/kx6gsgAg==} requiresBuild: true @@ -4282,15 +4232,6 @@ packages: rxjs: 7.8.1 dev: false - /@injectivelabs/indexer-proto-ts@1.11.42: - resolution: {integrity: sha512-6ejCpcWZWOSsELFIfUf2+xuJPOH+YdiJtwtB3d9x2H7dnrCBjXMxlPCSxoKEUbDH6w/lY2mO6TJm65rNy9piew==} - dependencies: - '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.2) - google-protobuf: 3.21.2 - protobufjs: 7.3.2 - rxjs: 7.8.1 - dev: false - /@injectivelabs/mito-proto-ts@1.0.55: resolution: {integrity: sha512-clFKpU/LCYvYiPg5PRjhVJFTxKcfJHzaj5saJHuL32LaOaB3Rd8L3CqP9qUrg78L7eKjjXjyG97U3NdRdZBlWg==} dependencies: @@ -4300,15 +4241,6 @@ packages: rxjs: 7.8.1 dev: false - /@injectivelabs/mito-proto-ts@1.0.65: - resolution: {integrity: sha512-kceZP68QrgFop387RYyO7tkfJCYxoktuceHTs9DQP3dJceLqj/V2mz0NlpkkacjgE5NhYkQ/zc0Z40hr8tnYqQ==} - dependencies: - '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.2) - google-protobuf: 3.21.2 - protobufjs: 7.3.2 - rxjs: 7.8.1 - dev: false - /@injectivelabs/networks@1.14.11(google-protobuf@3.21.2): resolution: {integrity: sha512-wiw1vWyHhFmS8FsXsSvB6EXRJEcf89yugKD6vB0WjXq9haulxJlTpuuzmAo0/v80KkZJOeCjoOOdOWAK02/9JQ==} requiresBuild: true @@ -4323,57 +4255,6 @@ packages: - google-protobuf dev: false - /@injectivelabs/sdk-ts@1.14.11(@types/react@18.3.3)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-26WVglSfGdh3cTmMX2yE3tzdbKDIxfBIYiyACT3GMTImu2O4hAX2/4yooH4WhMBkpYB+AJIrdZT8eg6CAqLJ+Q==} - requiresBuild: true - dependencies: - '@apollo/client': 3.10.6(@types/react@18.3.3)(graphql@16.8.1)(react-dom@18.2.0)(react@18.2.0) - '@cosmjs/amino': 0.32.3 - '@cosmjs/proto-signing': 0.32.3 - '@cosmjs/stargate': 0.32.3 - '@ethersproject/bytes': 5.7.0 - '@injectivelabs/core-proto-ts': 0.0.21 - '@injectivelabs/dmm-proto-ts': 1.0.20 - '@injectivelabs/exceptions': 1.14.11(google-protobuf@3.21.2) - '@injectivelabs/grpc-web': 0.0.1(google-protobuf@3.21.2) - '@injectivelabs/grpc-web-node-http-transport': 0.0.2(@injectivelabs/grpc-web@0.0.1) - '@injectivelabs/grpc-web-react-native-transport': 0.0.2(@injectivelabs/grpc-web@0.0.1) - '@injectivelabs/indexer-proto-ts': 1.11.42 - '@injectivelabs/mito-proto-ts': 1.0.65 - '@injectivelabs/networks': 1.14.11(google-protobuf@3.21.2) - '@injectivelabs/test-utils': 1.14.5 - '@injectivelabs/token-metadata': 1.14.11(google-protobuf@3.21.2) - '@injectivelabs/ts-types': 1.14.11 - '@injectivelabs/utils': 1.14.11(google-protobuf@3.21.2) - '@metamask/eth-sig-util': 4.0.1 - '@noble/curves': 1.4.0 - axios: 1.6.7 - bech32: 2.0.0 - bip39: 3.1.0 - cosmjs-types: 0.9.0 - ethereumjs-util: 7.1.5 - ethers: 5.7.2 - google-protobuf: 3.21.2 - graphql: 16.8.1 - http-status-codes: 2.3.0 - js-sha3: 0.8.0 - jscrypto: 1.0.3 - keccak256: 1.0.6 - link-module-alias: 1.2.0 - secp256k1: 4.0.3 - shx: 0.3.4 - snakecase-keys: 5.5.0 - transitivePeerDependencies: - - '@types/react' - - bufferutil - - debug - - graphql-ws - - react - - react-dom - - subscriptions-transport-ws - - utf-8-validate - dev: false - /@injectivelabs/sdk-ts@1.14.5(@types/react@18.3.3)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-j/6EcvNgQn563L0P5x80cZDTbYYbsXmHgtIbj8DCzemzgPRadmZLtlMDBjMQZ0ZcMhDSMfVOCINBOB2bBz2qMw==} requiresBuild: true @@ -4735,12 +4616,6 @@ packages: - debug dev: false - /@keplr-wallet/types@0.12.105: - resolution: {integrity: sha512-jJPSugQ6yWk/7kZVVzypKupQjSSnETg8lB9Icaqv/ULcSu4AZkl+JqBbUKMcb0bIgQKcHTTx5o/otyII4niHIw==} - dependencies: - long: 4.0.0 - dev: false - /@keplr-wallet/types@0.12.12: resolution: {integrity: sha512-fo6b8j9EXnJukGvZorifJWEm1BPIrvaTLuu5PqaU5k1ANDasm/FL1NaUuaTBVvhRjINtvVXqYpW/rVUinA9MBA==} dependencies: @@ -4753,14 +4628,6 @@ packages: long: 4.0.0 dev: false - /@keplr-wallet/unit@0.12.105: - resolution: {integrity: sha512-+QC9So7uwr4ytzfqMZG1Vs963+txQXswnCN7Gwo9S6feGMYS9sst9xWSDBy2uKDx23+Xqfyt0JMkwbf9ak8fKQ==} - dependencies: - '@keplr-wallet/types': 0.12.105 - big-integer: 1.6.52 - utility-types: 3.10.0 - dev: false - /@keplr-wallet/unit@0.12.121: resolution: {integrity: sha512-zshS9bd9Y9FJY7d54ZqrUUXY1BAFhD1ClLyeGpeXGk0SSOPPmHk6/j2f14Uk6zUZzb5iAtloBTZ4g2fGdQIiSQ==} dependencies: @@ -9065,44 +8932,6 @@ packages: - zod dev: false - /@skip-router/core@5.1.0(@types/react@18.3.3)(chain-registry@1.63.9)(react-dom@18.2.0)(react@18.2.0)(typescript@5.1.3): - resolution: {integrity: sha512-js0ru+Y/taoHs27us25eqqE9kS+mE/0byOXOAt6LIomZnD6th5BGJoKFWSZ/0XGGHi69blnGnLCw8swClbKDqg==} - peerDependencies: - chain-registry: ^1.33.11 - dependencies: - '@cosmjs/amino': 0.32.3 - '@cosmjs/cosmwasm-stargate': 0.32.3 - '@cosmjs/encoding': 0.32.3 - '@cosmjs/math': 0.32.3 - '@cosmjs/proto-signing': 0.32.3 - '@cosmjs/stargate': 0.32.3 - '@cosmjs/tendermint-rpc': 0.32.3 - '@initia/initia-registry': 0.1.9 - '@injectivelabs/core-proto-ts': 0.0.24 - '@injectivelabs/sdk-ts': 1.14.11(@types/react@18.3.3)(react-dom@18.2.0)(react@18.2.0) - '@keplr-wallet/unit': 0.12.105 - '@solana/wallet-adapter-base': 0.9.23(@solana/web3.js@1.93.2) - '@solana/web3.js': 1.93.2 - axios: 1.6.7 - chain-registry: 1.63.9 - cosmjs-types: 0.8.0 - keccak256: 1.0.6 - kujira.js: 0.9.162 - viem: 2.16.2(typescript@5.1.3) - transitivePeerDependencies: - - '@types/react' - - bufferutil - - debug - - encoding - - graphql-ws - - react - - react-dom - - subscriptions-transport-ws - - typescript - - utf-8-validate - - zod - dev: false - /@socket.io/component-emitter@3.1.2: resolution: {integrity: sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==} dev: false @@ -13076,12 +12905,6 @@ packages: type-detect: 4.1.0 dev: true - /chain-registry@1.63.9: - resolution: {integrity: sha512-vxpKexdHhYEI4+/GiWnTFomoY+a1MIl7Fhk/yJ+Xng7kbQ1C8by9pQHyuOJfQO8c5ojLbgO8ma0urcIP5cWFDg==} - dependencies: - '@chain-registry/types': 0.45.6 - dev: false - /chain-registry@1.69.0: resolution: {integrity: sha512-jNDHQrtF7qwqvQBF+1FylyKxTkUofD5MD/wVFshlmGciOjLR8Amh4wC0zPzeWrJsOWUihvYFR8qPpjCgT1YvTw==} dependencies: @@ -16375,7 +16198,7 @@ packages: resolution: {integrity: sha512-59LZHPdGZVh695Ud9lRzPBVTtlX9ZCV150Er2W43ro37wVof0ctenSaskPPjN7lVTIN8mSZt8PHUNKZuNQUuxw==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} - /graz@0.1.19(@cosmjs/amino@0.32.2)(@cosmjs/cosmwasm-stargate@0.32.3)(@cosmjs/launchpad@0.27.1)(@cosmjs/proto-signing@0.32.2)(@cosmjs/stargate@0.32.2)(@cosmjs/tendermint-rpc@0.32.2)(@leapwallet/cosmos-social-login-capsule-provider@0.0.39)(@types/react@18.3.3)(axios@1.6.7)(react-dom@18.2.0)(react-native@0.74.3)(react@18.2.0): + /graz@0.1.19(@cosmjs/amino@0.32.2)(@cosmjs/cosmwasm-stargate@0.32.4)(@cosmjs/launchpad@0.27.1)(@cosmjs/proto-signing@0.32.2)(@cosmjs/stargate@0.32.2)(@cosmjs/tendermint-rpc@0.32.2)(@leapwallet/cosmos-social-login-capsule-provider@0.0.39)(@types/react@18.3.3)(axios@1.6.7)(react-dom@18.2.0)(react-native@0.74.3)(react@18.2.0): resolution: {integrity: sha512-KaRQJ7HTQp3vbX/bG2Oc9T3t/KyaIuU5dLoGU2QNFirNjIpRbhkBtCll9Li5A6+zw3O9bHkbZ1aUaKfuVyBS8w==} hasBin: true peerDependencies: @@ -16389,7 +16212,7 @@ packages: react: '>=17' dependencies: '@cosmjs/amino': 0.32.2 - '@cosmjs/cosmwasm-stargate': 0.32.3 + '@cosmjs/cosmwasm-stargate': 0.32.4 '@cosmjs/launchpad': 0.27.1 '@cosmjs/proto-signing': 0.32.2 '@cosmjs/stargate': 0.32.2 @@ -18307,7 +18130,7 @@ packages: '@ethersproject/bignumber': 5.7.0 '@keplr-wallet/types': 0.11.64 '@types/google-protobuf': 3.15.12 - chain-registry: 1.63.9 + chain-registry: 1.69.0 cosmjs-types: 0.8.0 long: 4.0.0 text-encoding: 0.7.0 diff --git a/src/lib/__test__/fixtures/skipCctpDeposit.ts b/src/lib/__test__/fixtures/skipCctpDeposit.ts index d4d25a037..ef4db92f3 100644 --- a/src/lib/__test__/fixtures/skipCctpDeposit.ts +++ b/src/lib/__test__/fixtures/skipCctpDeposit.ts @@ -1,4 +1,4 @@ -import { TxStatusResponseJSON } from '@skip-router/core'; +import { TxStatusResponseJSON } from '@skip-client'; export const depositFromUsdcEthPending = { transfers: [ diff --git a/src/lib/__test__/fixtures/skipCctpWithdrawal.ts b/src/lib/__test__/fixtures/skipCctpWithdrawal.ts index bef1f5e9f..189e820e0 100644 --- a/src/lib/__test__/fixtures/skipCctpWithdrawal.ts +++ b/src/lib/__test__/fixtures/skipCctpWithdrawal.ts @@ -1,4 +1,4 @@ -import { TxStatusResponseJSON } from '@skip-router/core'; +import { TxStatusResponseJSON } from '@skip-client'; export const withdrawToUsdcEthPending = { transfers: [ diff --git a/src/lib/__test__/fixtures/skipNonCctpDeposit.ts b/src/lib/__test__/fixtures/skipNonCctpDeposit.ts index f72986f05..de274cefe 100644 --- a/src/lib/__test__/fixtures/skipNonCctpDeposit.ts +++ b/src/lib/__test__/fixtures/skipNonCctpDeposit.ts @@ -1,4 +1,4 @@ -import { TxStatusResponseJSON } from '@skip-router/core'; +import { TxStatusResponseJSON } from '@skip-client'; export const depositFromEthereumEthSubmitted = { transfers: [ diff --git a/src/lib/__test__/fixtures/skipNonCctpWithdrawal.ts b/src/lib/__test__/fixtures/skipNonCctpWithdrawal.ts index 69a3bfdfb..0f4865865 100644 --- a/src/lib/__test__/fixtures/skipNonCctpWithdrawal.ts +++ b/src/lib/__test__/fixtures/skipNonCctpWithdrawal.ts @@ -1,4 +1,4 @@ -import { TxStatusResponseJSON } from '@skip-router/core'; +import { TxStatusResponseJSON } from '@skip-client'; export const withdrawToBinanceBNBSubmitted = { transfers: [ diff --git a/src/lib/skip.ts b/src/lib/skip.ts index 6a6a919e9..079934196 100644 --- a/src/lib/skip.ts +++ b/src/lib/skip.ts @@ -1,12 +1,13 @@ import { AxelarTransferInfoJSON, CCTPTransferInfoJSON, + SkipClient, TrackTxResponseJSON, TransferEventJSON, TransferInfoJSON, TransferStatusJSON, TxStatusResponseJSON, -} from '@skip-router/core'; +} from '@skip-go/client'; import { RouteStatus, @@ -238,3 +239,14 @@ export const fetchTransferStatus = ({ }) => { return fetchSkipStatus({ transactionHash: transactionId, chainId: fromChainId, baseUrl }); }; + +export const skipClient = new SkipClient({ + endpointOptions: { + getRpcEndpointForChain: async (chainId: string) => { + if (chainId === 'noble-1') return 'https://noble-yx-rpc.polkachu.com/'; + if (chainId === 'dydx-mainnet-1') return 'https://dydx-ops-rpc.kingnodes.com'; + if (chainId === '43114') return 'https://api.avax.network/ext/bc/C/rpc'; + return 'https://dydx-ops-rpc.kingnodes.com'; + }, + }, +});