Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const connector = new PrivateKeyProviderConnector(
)

const sdk = new FusionSDK({
url: 'https://api.1inch.dev/fusion',
url: 'https://api.1inch.com/fusion',
network: NetworkEnum.BINANCE,
blockchainProvider: connector,
authKey: DEV_PORTAL_API_TOKEN
Expand Down Expand Up @@ -133,7 +133,7 @@ const connector = new PrivateKeyProviderConnector(
)

const sdk = new FusionSDK({
url: 'https://api.1inch.dev/fusion',
url: 'https://api.1inch.com/fusion',
network: NetworkEnum.BINANCE,
blockchainProvider: connector,
authKey: DEV_PORTAL_API_TOKEN
Expand Down
4 changes: 3 additions & 1 deletion src/errors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
export class AuthError extends Error {
constructor() {
super('Auth error, please use token from https://portal.1inch.dev/')
super(
'Auth error, please use token from https://business.1inch.com/portal'
)
}
}
12 changes: 6 additions & 6 deletions src/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {FusionSDK, NetworkEnum} from '@1inch/fusion-sdk'

async function main() {
const sdk = new FusionSDK({
url: 'https://api.1inch.dev/fusion',
url: 'https://api.1inch.com/fusion',
network: NetworkEnum.ETHEREUM,
authKey: 'your-auth-key'
})
Expand Down Expand Up @@ -78,7 +78,7 @@ class CustomHttpProvider implements HttpProviderConnector {
```typescript
import {FusionSDK, NetworkEnum} from '@1inch/fusion-sdk'
const sdk = new FusionSDK({
url: 'https://api.1inch.dev/fusion',
url: 'https://api.1inch.com/fusion',
network: NetworkEnum.ETHEREUM
})
const orders = await sdk.getActiveOrders({page: 1, limit: 2})
Expand All @@ -97,7 +97,7 @@ const orders = await sdk.getActiveOrders({page: 1, limit: 2})
```typescript
import {FusionSDK, NetworkEnum} from '@1inch/fusion-sdk'
const sdk = new FusionSDK({
url: 'https://api.1inch.dev/fusion',
url: 'https://api.1inch.com/fusion',
network: NetworkEnum.ETHEREUM
})

Expand All @@ -121,7 +121,7 @@ const orders = await sdk.getOrdersByMaker({
```typescript
import {FusionSDK, NetworkEnum, QuoteParams} from '@1inch/fusion-sdk'
const sdk = new FusionSDK({
url: 'https://api.1inch.dev/fusion',
url: 'https://api.1inch.com/fusion',
network: NetworkEnum.ETHEREUM
})

Expand All @@ -146,7 +146,7 @@ const quote = await sdk.getQuote(params)
```typescript
import {FusionSDK, NetworkEnum, QuoteParams} from '@1inch/fusion-sdk'
const sdk = new FusionSDK({
url: 'https://api.1inch.dev/fusion',
url: 'https://api.1inch.com/fusion',
network: NetworkEnum.ETHEREUM
})

Expand Down Expand Up @@ -194,7 +194,7 @@ const blockchainProvider = new PrivateKeyProviderConnector(
)

const sdk = new FusionSDK({
url: 'https://api.1inch.dev/fusion',
url: 'https://api.1inch.com/fusion',
network: 1,
blockchainProvider
})
Expand Down
52 changes: 26 additions & 26 deletions src/ws-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const wsSdk = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM,
authKey: 'your-auth-key'
})
Expand All @@ -26,7 +26,7 @@ wsSdk.order.onOrder((data) => {
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM,
authKey: 'your-auth-key'
})
Expand All @@ -43,7 +43,7 @@ class MyFancyProvider implements WsProviderConnector {
// ... user implementation
}

const url = 'wss://api.1inch.dev/fusion/ws/v2.0/1'
const url = 'wss://api.1inch.com/fusion/ws/v2.0/1'
const provider = new MyFancyProvider({url})

const wsSdk = new WebSocketApi(provider)
Expand All @@ -55,7 +55,7 @@ const wsSdk = new WebSocketApi(provider)
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = WebSocketApi.new({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})
```
Expand All @@ -68,7 +68,7 @@ By default, when user creates an instance of WebSocketApi, it automatically open
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM,
lazyInit: true
})
Expand All @@ -95,7 +95,7 @@ ws.init()
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand Down Expand Up @@ -125,7 +125,7 @@ ws.on('message', function message(data) {
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand Down Expand Up @@ -158,7 +158,7 @@ ws.off('message', message)
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand All @@ -181,7 +181,7 @@ ws.onOpen(() => {
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand All @@ -198,7 +198,7 @@ ws.send('my message')
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand All @@ -219,7 +219,7 @@ ws.close()
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand All @@ -238,7 +238,7 @@ ws.onMessage((data) => {
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand All @@ -261,7 +261,7 @@ ws.onClose(() => {
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand All @@ -286,7 +286,7 @@ ws.onError((error) => {
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand Down Expand Up @@ -314,7 +314,7 @@ ws.order.onOrder((data) => {
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand All @@ -337,7 +337,7 @@ ws.order.onOrderCreated((data) => {
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand All @@ -360,7 +360,7 @@ ws.order.onOrderInvalid((data) => {
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand All @@ -383,7 +383,7 @@ ws.order.onOrderBalanceOrAllowanceChange((data) => {
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand All @@ -406,7 +406,7 @@ ws.order.onOrderFilled((data) => {
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand All @@ -429,7 +429,7 @@ ws.order.onOrderFilledPartially((data) => {
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand All @@ -454,7 +454,7 @@ ws.order.onOrderCancelled((data) => {
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand All @@ -473,7 +473,7 @@ ws.rpc.onPong((data) => {
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand All @@ -490,7 +490,7 @@ ws.rpc.ping()
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand All @@ -511,7 +511,7 @@ ws.rpc.getAllowedMethods()
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand All @@ -530,7 +530,7 @@ ws.rpc.onGetAllowedMethods((data) => {
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand All @@ -551,7 +551,7 @@ ws.rpc.getActiveOrders()
import {WebSocketApi, NetworkEnum} from '@1inch/fusion-sdk'

const ws = new WebSocketApi({
url: 'wss://api.1inch.dev/fusion/ws',
url: 'wss://api.1inch.com/fusion/ws',
network: NetworkEnum.ETHEREUM
})

Expand Down
Loading