@rango-dev/queue-manager-rango-preset 0.1.15-next.8 → 0.1.15-next.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/checkStatus.d.ts +11 -11
- package/dist/actions/checkStatus.d.ts.map +1 -1
- package/dist/actions/createTransaction.d.ts +10 -10
- package/dist/actions/createTransaction.d.ts.map +1 -1
- package/dist/actions/executeTransaction.d.ts +12 -12
- package/dist/actions/executeTransaction.d.ts.map +1 -1
- package/dist/actions/scheduleNextStep.d.ts +12 -12
- package/dist/actions/scheduleNextStep.d.ts.map +1 -1
- package/dist/actions/start.d.ts +3 -3
- package/dist/actions/start.d.ts.map +1 -1
- package/dist/configs.d.ts +7 -7
- package/dist/configs.d.ts.map +1 -1
- package/dist/constants.d.ts +5 -5
- package/dist/constants.d.ts.map +1 -1
- package/dist/helpers.d.ts +242 -242
- package/dist/helpers.d.ts.map +1 -1
- package/dist/hooks.d.ts +18 -18
- package/dist/hooks.d.ts.map +1 -1
- package/dist/index.d.ts +9 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -8
- package/dist/index.js.map +7 -0
- package/dist/migration.d.ts +14 -14
- package/dist/migration.d.ts.map +1 -1
- package/dist/numbers.d.ts +2 -2
- package/dist/numbers.d.ts.map +1 -1
- package/dist/queueDef.d.ts +9 -9
- package/dist/queueDef.d.ts.map +1 -1
- package/dist/services/httpService.d.ts +2 -2
- package/dist/services/httpService.d.ts.map +1 -1
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.d.ts.map +1 -1
- package/dist/shared-errors.d.ts +24 -24
- package/dist/shared-errors.d.ts.map +1 -1
- package/dist/shared-sentry.d.ts +3 -3
- package/dist/shared-sentry.d.ts.map +1 -1
- package/dist/shared.d.ts +158 -158
- package/dist/shared.d.ts.map +1 -1
- package/dist/types.d.ts +50 -50
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -5
- package/src/index.ts +8 -6
- package/dist/queue-manager-rango-preset.cjs.development.js +0 -2803
- package/dist/queue-manager-rango-preset.cjs.development.js.map +0 -1
- package/dist/queue-manager-rango-preset.cjs.production.min.js +0 -2
- package/dist/queue-manager-rango-preset.cjs.production.min.js.map +0 -1
- package/dist/queue-manager-rango-preset.esm.js +0 -2782
- package/dist/queue-manager-rango-preset.esm.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ExecuterActions } from '@rango-dev/queue-manager-core';
|
|
2
|
-
import { SwapActionTypes, SwapQueueContext, SwapStorage } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* For doing a swap the user needs to accept a `contract` so it can use the user balance.
|
|
6
|
-
* There is two types of check status:
|
|
7
|
-
* 1. Checking approval transaction (Give permission to a contract)
|
|
8
|
-
* 2. Checking swap transaction.
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
export declare function checkStatus(actions: ExecuterActions<SwapStorage, SwapActionTypes, SwapQueueContext>): Promise<void>;
|
|
1
|
+
import { ExecuterActions } from '@rango-dev/queue-manager-core';
|
|
2
|
+
import { SwapActionTypes, SwapQueueContext, SwapStorage } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* For doing a swap the user needs to accept a `contract` so it can use the user balance.
|
|
6
|
+
* There is two types of check status:
|
|
7
|
+
* 1. Checking approval transaction (Give permission to a contract)
|
|
8
|
+
* 2. Checking swap transaction.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export declare function checkStatus(actions: ExecuterActions<SwapStorage, SwapActionTypes, SwapQueueContext>): Promise<void>;
|
|
12
12
|
//# sourceMappingURL=checkStatus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkStatus.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"checkStatus.d.ts","sourceRoot":"","sources":["../../src/actions/checkStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAUhE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AA0X1E;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAC/B,OAAO,EAAE,eAAe,CAAC,WAAW,EAAE,eAAe,EAAE,gBAAgB,CAAC,GACvE,OAAO,CAAC,IAAI,CAAC,CAiBf"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ExecuterActions } from '@rango-dev/queue-manager-core';
|
|
2
|
-
import { SwapActionTypes, SwapQueueContext, SwapStorage } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* When a user asks for a swap, We first create the transaction by sending a request to server
|
|
6
|
-
* Server will return the transaction that need to be sent to wallet.
|
|
7
|
-
* It can be failed if server goes through an error, If not, we will schedule the `EXECTUTE_TRANSACTION`.
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
export declare function createTransaction(actions: ExecuterActions<SwapStorage, SwapActionTypes, SwapQueueContext>): Promise<void>;
|
|
1
|
+
import { ExecuterActions } from '@rango-dev/queue-manager-core';
|
|
2
|
+
import { SwapActionTypes, SwapQueueContext, SwapStorage } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* When a user asks for a swap, We first create the transaction by sending a request to server
|
|
6
|
+
* Server will return the transaction that need to be sent to wallet.
|
|
7
|
+
* It can be failed if server goes through an error, If not, we will schedule the `EXECTUTE_TRANSACTION`.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export declare function createTransaction(actions: ExecuterActions<SwapStorage, SwapActionTypes, SwapQueueContext>): Promise<void>;
|
|
11
11
|
//# sourceMappingURL=createTransaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTransaction.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"createTransaction.d.ts","sourceRoot":"","sources":["../../src/actions/createTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAY1E;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,eAAe,CAAC,WAAW,EAAE,eAAe,EAAE,gBAAgB,CAAC,GACvE,OAAO,CAAC,IAAI,CAAC,CAsDf"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ExecuterActions } from '@rango-dev/queue-manager-core';
|
|
2
|
-
import { SwapActionTypes, SwapQueueContext, SwapStorage } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
* Excecute a created transaction.
|
|
5
|
-
*
|
|
6
|
-
* This function implemented the parallel mode by `claim` mechanism which means
|
|
7
|
-
* All the queues the meet certain situation (like multiple evm transaction) will go through
|
|
8
|
-
* a `claim` mechanims that decides which queue should be run and it blocks other ones.
|
|
9
|
-
*
|
|
10
|
-
* A queue will be go to sign process, if the wallet and network is matched.
|
|
11
|
-
*/
|
|
12
|
-
export declare function executeTransaction(actions: ExecuterActions<SwapStorage, SwapActionTypes, SwapQueueContext>): Promise<void>;
|
|
1
|
+
import { ExecuterActions } from '@rango-dev/queue-manager-core';
|
|
2
|
+
import { SwapActionTypes, SwapQueueContext, SwapStorage } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Excecute a created transaction.
|
|
5
|
+
*
|
|
6
|
+
* This function implemented the parallel mode by `claim` mechanism which means
|
|
7
|
+
* All the queues the meet certain situation (like multiple evm transaction) will go through
|
|
8
|
+
* a `claim` mechanims that decides which queue should be run and it blocks other ones.
|
|
9
|
+
*
|
|
10
|
+
* A queue will be go to sign process, if the wallet and network is matched.
|
|
11
|
+
*/
|
|
12
|
+
export declare function executeTransaction(actions: ExecuterActions<SwapStorage, SwapActionTypes, SwapQueueContext>): Promise<void>;
|
|
13
13
|
//# sourceMappingURL=executeTransaction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executeTransaction.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"executeTransaction.d.ts","sourceRoot":"","sources":["../../src/actions/executeTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAoBhE,OAAO,EAEL,eAAe,EACf,gBAAgB,EAChB,WAAW,EACZ,MAAM,UAAU,CAAC;AAElB;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,eAAe,CAAC,WAAW,EAAE,eAAe,EAAE,gBAAgB,CAAC,GACvE,OAAO,CAAC,IAAI,CAAC,CAgGf"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { ExecuterActions } from '@rango-dev/queue-manager-core';
|
|
2
|
-
import { SwapActionTypes, SwapQueueContext, SwapStorage } from '../types';
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* This function is responsibe for scheduling the correct `action` based on `PendingSwap` status.
|
|
6
|
-
* It means `action`s schedule this step to decide what should be the next step/task.
|
|
7
|
-
*
|
|
8
|
-
* It's acts like a `while(true)` and will `break` the loop on certain `action`s like `CHECK_STATUS`.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
|
-
export declare function scheduleNextStep({ schedule, next, failed, setStorage, getStorage, context, }: ExecuterActions<SwapStorage, SwapActionTypes, SwapQueueContext>): void;
|
|
1
|
+
import { ExecuterActions } from '@rango-dev/queue-manager-core';
|
|
2
|
+
import { SwapActionTypes, SwapQueueContext, SwapStorage } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* This function is responsibe for scheduling the correct `action` based on `PendingSwap` status.
|
|
6
|
+
* It means `action`s schedule this step to decide what should be the next step/task.
|
|
7
|
+
*
|
|
8
|
+
* It's acts like a `while(true)` and will `break` the loop on certain `action`s like `CHECK_STATUS`.
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
export declare function scheduleNextStep({ schedule, next, failed, setStorage, getStorage, context, }: ExecuterActions<SwapStorage, SwapActionTypes, SwapQueueContext>): void;
|
|
13
13
|
//# sourceMappingURL=scheduleNextStep.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduleNextStep.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"scheduleNextStep.d.ts","sourceRoot":"","sources":["../../src/actions/scheduleNextStep.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG1E;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,UAAU,EACV,UAAU,EACV,OAAO,GACR,EAAE,eAAe,CAAC,WAAW,EAAE,eAAe,EAAE,gBAAgB,CAAC,GAAG,IAAI,CAwCxE"}
|
package/dist/actions/start.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExecuterActions } from '@rango-dev/queue-manager-core';
|
|
2
|
-
import { SwapActionTypes, SwapStorage } from '../types';
|
|
3
|
-
export declare function start({ schedule, next, }: ExecuterActions<SwapStorage, SwapActionTypes>): void;
|
|
1
|
+
import { ExecuterActions } from '@rango-dev/queue-manager-core';
|
|
2
|
+
import { SwapActionTypes, SwapStorage } from '../types';
|
|
3
|
+
export declare function start({ schedule, next, }: ExecuterActions<SwapStorage, SwapActionTypes>): void;
|
|
4
4
|
//# sourceMappingURL=start.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../../src/actions/start.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAExD,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EACR,IAAI,GACL,EAAE,eAAe,CAAC,WAAW,EAAE,eAAe,CAAC,GAAG,IAAI,CAGtD"}
|
package/dist/configs.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export interface Configs {
|
|
2
|
-
API_KEY: string;
|
|
3
|
-
BASE_URL?: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function getConfig(name: keyof Configs): string;
|
|
6
|
-
export declare function setConfig(name: keyof Configs, value: any): any;
|
|
7
|
-
export declare function initConfig(nextConfigs: Configs): Configs;
|
|
1
|
+
export interface Configs {
|
|
2
|
+
API_KEY: string;
|
|
3
|
+
BASE_URL?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function getConfig(name: keyof Configs): string;
|
|
6
|
+
export declare function setConfig(name: keyof Configs, value: any): any;
|
|
7
|
+
export declare function initConfig(nextConfigs: Configs): Configs;
|
|
8
8
|
//# sourceMappingURL=configs.d.ts.map
|
package/dist/configs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["src/configs.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAWD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,OAAO,UAE5C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,OAAO,EAAE,KAAK,EAAE,GAAG,OAIxD;AAED,wBAAgB,UAAU,CAAC,WAAW,EAAE,OAAO,WAS9C"}
|
|
1
|
+
{"version":3,"file":"configs.d.ts","sourceRoot":"","sources":["../src/configs.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAWD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,OAAO,UAE5C;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,OAAO,EAAE,KAAK,EAAE,GAAG,OAIxD;AAED,wBAAgB,UAAU,CAAC,WAAW,EAAE,OAAO,WAS9C"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const ERROR_MESSAGE_DEPENDS_ON_OTHER_QUEUES = "Waiting for other swaps to complete";
|
|
2
|
-
export declare const ERROR_MESSAGE_WAIT_FOR_WALLET = "Waiting for connecting wallet";
|
|
3
|
-
export declare const ERROR_MESSAGE_WAIT_FOR_WALLET_DESCRIPTION_WRONG_WALLET: (type: string | null, address: string | null) => string;
|
|
4
|
-
export declare const ERROR_MESSAGE_WAIT_FOR_WALLET_DESCRIPTION: (type: string | null) => string;
|
|
5
|
-
export declare const ERROR_MESSAGE_WAIT_FOR_CHANGE_NETWORK: (network: string | null) => string;
|
|
1
|
+
export declare const ERROR_MESSAGE_DEPENDS_ON_OTHER_QUEUES = "Waiting for other swaps to complete";
|
|
2
|
+
export declare const ERROR_MESSAGE_WAIT_FOR_WALLET = "Waiting for connecting wallet";
|
|
3
|
+
export declare const ERROR_MESSAGE_WAIT_FOR_WALLET_DESCRIPTION_WRONG_WALLET: (type: string | null, address: string | null) => string;
|
|
4
|
+
export declare const ERROR_MESSAGE_WAIT_FOR_WALLET_DESCRIPTION: (type: string | null) => string;
|
|
5
|
+
export declare const ERROR_MESSAGE_WAIT_FOR_CHANGE_NETWORK: (network: string | null) => string;
|
|
6
6
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qCAAqC,wCACX,CAAC;AACxC,eAAO,MAAM,6BAA6B,kCAAkC,CAAC;AAC7E,eAAO,MAAM,sDAAsD,SAC3D,MAAM,GAAG,IAAI,WACV,MAAM,GAAG,IAAI,KACrB,MAGC,CAAC;AACL,eAAO,MAAM,yCAAyC,SAC9C,MAAM,GAAG,IAAI,KAClB,MAGqD,CAAC;AACzD,eAAO,MAAM,qCAAqC,YACvC,MAAM,GAAG,IAAI,KACrB,MAAqD,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qCAAqC,wCACX,CAAC;AACxC,eAAO,MAAM,6BAA6B,kCAAkC,CAAC;AAC7E,eAAO,MAAM,sDAAsD,SAC3D,MAAM,GAAG,IAAI,WACV,MAAM,GAAG,IAAI,KACrB,MAGC,CAAC;AACL,eAAO,MAAM,yCAAyC,SAC9C,MAAM,GAAG,IAAI,KAClB,MAGqD,CAAC;AACzD,eAAO,MAAM,qCAAqC,YACvC,MAAM,GAAG,IAAI,KACrB,MAAqD,CAAC"}
|