@gera2ld/lib-dex 0.0.1

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.
Files changed (70) hide show
  1. package/README.md +3 -0
  2. package/dist/common/abis/index.d.ts +2 -0
  3. package/dist/common/constants.d.ts +9 -0
  4. package/dist/common/evm.d.ts +1 -0
  5. package/dist/common/index.d.ts +4 -0
  6. package/dist/common/types.d.ts +13 -0
  7. package/dist/common/util.d.ts +21 -0
  8. package/dist/index.d.ts +7 -0
  9. package/dist/index.js +17853 -0
  10. package/dist/node/index.d.ts +1 -0
  11. package/dist/node/index.js +23 -0
  12. package/dist/node/wallets/index.d.ts +1 -0
  13. package/dist/node/wallets/solana/index.d.ts +3 -0
  14. package/dist/prices/coingecko.d.ts +5 -0
  15. package/dist/prices/coingecko.integration.d.ts +1 -0
  16. package/dist/prices/index.d.ts +7 -0
  17. package/dist/prices/lifi.d.ts +4 -0
  18. package/dist/quotes/1inch/index.d.ts +60 -0
  19. package/dist/quotes/1inch/index.integration.d.ts +1 -0
  20. package/dist/quotes/base.d.ts +43 -0
  21. package/dist/quotes/deprecated-0x/index.d.ts +46 -0
  22. package/dist/quotes/deprecated-0x/types.d.ts +56 -0
  23. package/dist/quotes/index.d.ts +22 -0
  24. package/dist/quotes/jupiter/index.d.ts +2 -0
  25. package/dist/quotes/jupiter/metis.d.ts +35 -0
  26. package/dist/quotes/jupiter/metis.integration.d.ts +1 -0
  27. package/dist/quotes/jupiter/metis.types.d.ts +35 -0
  28. package/dist/quotes/jupiter/ultra.d.ts +44 -0
  29. package/dist/quotes/jupiter/ultra.integration.d.ts +1 -0
  30. package/dist/quotes/jupiter/ultra.types.d.ts +20 -0
  31. package/dist/quotes/kyberswap/index.d.ts +39 -0
  32. package/dist/quotes/kyberswap/index.integration.d.ts +1 -0
  33. package/dist/quotes/kyberswap/types.d.ts +18 -0
  34. package/dist/quotes/lifi/index.d.ts +36 -0
  35. package/dist/quotes/lifi/types.d.ts +53 -0
  36. package/dist/quotes/lifi/util.d.ts +6 -0
  37. package/dist/quotes/odos/index.d.ts +32 -0
  38. package/dist/quotes/odos/index.integration.d.ts +1 -0
  39. package/dist/quotes/odos/types.d.ts +21 -0
  40. package/dist/quotes/paraswap/index.d.ts +39 -0
  41. package/dist/quotes/paraswap/types.d.ts +25 -0
  42. package/dist/quotes/types.d.ts +36 -0
  43. package/dist/tokens/chain/evm.d.ts +2 -0
  44. package/dist/tokens/chain/index.d.ts +5 -0
  45. package/dist/tokens/chain/solana.d.ts +2 -0
  46. package/dist/tokens/constants.d.ts +2 -0
  47. package/dist/tokens/index.d.ts +4 -0
  48. package/dist/tokens/lifi.d.ts +4 -0
  49. package/dist/transactions/evm/ankr.d.ts +70 -0
  50. package/dist/transactions/evm/ankr.integration.d.ts +1 -0
  51. package/dist/transactions/evm/index.d.ts +2 -0
  52. package/dist/transactions/evm/wallet.d.ts +21 -0
  53. package/dist/transactions/index.d.ts +6 -0
  54. package/dist/transactions/index.integration.d.ts +1 -0
  55. package/dist/transactions/solana/index.d.ts +1 -0
  56. package/dist/transactions/solana/wallet.d.ts +38 -0
  57. package/dist/transactions/solana/wallet.integration.d.ts +1 -0
  58. package/dist/transactions/types.d.ts +15 -0
  59. package/dist/trezor/index.d.ts +12 -0
  60. package/dist/trezor/util.d.ts +9 -0
  61. package/dist/wallets/common.d.ts +2 -0
  62. package/dist/wallets/evm/client.d.ts +25 -0
  63. package/dist/wallets/evm/index.d.ts +2 -0
  64. package/dist/wallets/evm/wallet.d.ts +71 -0
  65. package/dist/wallets/index.d.ts +4 -0
  66. package/dist/wallets/solana/index.d.ts +2 -0
  67. package/dist/wallets/solana/util/connection.d.ts +6 -0
  68. package/dist/wallets/solana/wallet.d.ts +55 -0
  69. package/dist/wallets/types.d.ts +34 -0
  70. package/package.json +47 -0
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ ## Build Notes
2
+
3
+ - `@1inch/fusion-sdk` must be bundled for this library to work in browsers. Because it requires `assert` but does not add it as a dependency.
@@ -0,0 +1,2 @@
1
+ import { default as ERC20 } from './erc-20.abi.json';
2
+ export { ERC20 };
@@ -0,0 +1,9 @@
1
+ export interface IChainConfig {
2
+ id: number;
3
+ ankrChainName?: string;
4
+ txUrl: (hash: string) => string;
5
+ gasToken: string;
6
+ wrappedAddress: string;
7
+ }
8
+ export type ISupportedChains = 'AVA' | 'ARB' | 'POL' | 'SOL';
9
+ export declare const ChainConfig: Record<ISupportedChains, IChainConfig>;
@@ -0,0 +1 @@
1
+ export declare function replaceEvmZeroAddress(address: string): string;
@@ -0,0 +1,4 @@
1
+ export * from './constants.ts';
2
+ export * from './evm';
3
+ export * from './types.ts';
4
+ export * from './util.ts';
@@ -0,0 +1,13 @@
1
+ export interface ITokenInfo {
2
+ address: string;
3
+ chainId: number;
4
+ symbol: string;
5
+ decimals: number;
6
+ name: string;
7
+ }
8
+ export interface ITransactionRequest {
9
+ request: unknown;
10
+ permit2?: {
11
+ eip712?: any;
12
+ };
13
+ }
@@ -0,0 +1,21 @@
1
+ import { Logger } from '@gera2ld/common';
2
+ export declare const logger: Logger;
3
+ export declare const loggedRequest: <T = unknown>(this: unknown, url: string | URL, options?: import("@gera2ld/common").IRequestOptions | undefined) => {
4
+ arrayBuffer(): Promise<ArrayBuffer>;
5
+ blob(): Promise<Blob>;
6
+ json<U = T>(): Promise<U>;
7
+ text(): Promise<string>;
8
+ abort(): void;
9
+ };
10
+ export declare class TransactionError extends Error {
11
+ readonly data: {
12
+ type: 'fatal' | 'transient';
13
+ code?: string;
14
+ message: string;
15
+ };
16
+ constructor(data: {
17
+ type: 'fatal' | 'transient';
18
+ code?: string;
19
+ message: string;
20
+ });
21
+ }
@@ -0,0 +1,7 @@
1
+ export * from './common';
2
+ export * from './prices';
3
+ export * from './quotes';
4
+ export * from './tokens';
5
+ export * from './transactions';
6
+ export * from './trezor';
7
+ export * from './wallets';