@swapkit/helpers 1.0.0-rc.63 → 1.0.0-rc.65
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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +12 -10
- package/dist/index.es.js +766 -696
- package/dist/index.es.js.map +1 -1
- package/package.json +10 -10
- package/src/helpers/asset.ts +1 -2
- package/src/index.ts +2 -1
- package/src/modules/swapKitError.ts +11 -4
- package/src/helpers/request.ts +0 -15
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ import type { CoinGeckoList } from '@swapkit/tokens';
|
|
|
4
4
|
import { FeeOption } from '@swapkit/types';
|
|
5
5
|
import type { MayaList } from '@swapkit/tokens';
|
|
6
6
|
import { MemoType } from '@swapkit/types';
|
|
7
|
-
import type { Options } from 'ky';
|
|
8
7
|
import type { PancakeswapETHList } from '@swapkit/tokens';
|
|
9
8
|
import type { PancakeswapList } from '@swapkit/tokens';
|
|
10
9
|
import type { PangolinList } from '@swapkit/tokens';
|
|
@@ -109,6 +108,8 @@ export declare type CommonAssetString = `${Chain.Maya}.MAYA` | `${Chain.Ethereum
|
|
|
109
108
|
|
|
110
109
|
export declare function derivationPathToString([network, chainId, account, change, index]: number[]): string;
|
|
111
110
|
|
|
111
|
+
export declare type ErrorKeys = keyof typeof errorMessages;
|
|
112
|
+
|
|
112
113
|
declare const errorMessages: {
|
|
113
114
|
/**
|
|
114
115
|
* Core
|
|
@@ -158,11 +159,16 @@ declare const errorMessages: {
|
|
|
158
159
|
readonly core_transaction_deposit_insufficient_funds_error: 10311;
|
|
159
160
|
readonly core_transaction_deposit_gas_error: 10312;
|
|
160
161
|
readonly core_transaction_invalid_sender_address: 10313;
|
|
161
|
-
readonly core_transaction_deposit_server_error:
|
|
162
|
+
readonly core_transaction_deposit_server_error: 10314;
|
|
163
|
+
readonly core_transaction_user_rejected: 10315;
|
|
162
164
|
/**
|
|
163
165
|
* Wallets
|
|
164
166
|
*/
|
|
165
167
|
readonly wallet_ledger_connection_error: 20001;
|
|
168
|
+
readonly wallet_ledger_connection_claimed: 20002;
|
|
169
|
+
readonly wallet_ledger_get_address_error: 20003;
|
|
170
|
+
readonly wallet_ledger_device_not_found: 20004;
|
|
171
|
+
readonly wallet_ledger_device_locked: 20005;
|
|
166
172
|
/**
|
|
167
173
|
* Helpers
|
|
168
174
|
*/
|
|
@@ -271,8 +277,6 @@ export declare const isGasAsset: ({ chain, symbol }: {
|
|
|
271
277
|
symbol: string;
|
|
272
278
|
}) => boolean;
|
|
273
279
|
|
|
274
|
-
export declare type Keys = keyof typeof errorMessages;
|
|
275
|
-
|
|
276
280
|
export declare type MemoOptions<T extends MemoType> = {
|
|
277
281
|
[MemoType.BOND]: WithAddress;
|
|
278
282
|
[MemoType.LEAVE]: WithAddress;
|
|
@@ -317,11 +321,6 @@ declare type PoolParams<T = {}> = T & {
|
|
|
317
321
|
assetDepth: string;
|
|
318
322
|
};
|
|
319
323
|
|
|
320
|
-
export declare const RequestClient: {
|
|
321
|
-
get: <T>(url: string | URL | Request, options?: Options) => Promise<T>;
|
|
322
|
-
post: <T_1>(url: string | URL | Request, options?: Options) => Promise<T_1>;
|
|
323
|
-
};
|
|
324
|
-
|
|
325
324
|
declare type ShareParams<T = {}> = T & {
|
|
326
325
|
liquidityUnits: string;
|
|
327
326
|
poolUnits: string;
|
|
@@ -333,7 +332,7 @@ declare type SKBigIntParams = InitialisationValueType | {
|
|
|
333
332
|
};
|
|
334
333
|
|
|
335
334
|
export declare class SwapKitError extends Error {
|
|
336
|
-
constructor(errorKey:
|
|
335
|
+
constructor(errorKey: ErrorKeys, sourceError?: any);
|
|
337
336
|
}
|
|
338
337
|
|
|
339
338
|
export declare class SwapKitNumber extends BigIntArithmetics {
|
|
@@ -369,4 +368,7 @@ declare type WithChain<T = {}> = T & {
|
|
|
369
368
|
chain: Chain;
|
|
370
369
|
};
|
|
371
370
|
|
|
371
|
+
|
|
372
|
+
export * from "@swapkit/api";
|
|
373
|
+
|
|
372
374
|
export { }
|