@aave/client 0.7.0 → 4.0.0-next.0

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 (71) hide show
  1. package/README.md +35 -27
  2. package/dist/{AaveClient-C-OkXfVz.d.ts → AaveClient-CgHY2iS9.d.ts} +12 -15
  3. package/dist/{AaveClient-PHUEzt7l.d.cts → AaveClient-L3v8kWvn.d.cts} +12 -15
  4. package/dist/actions/index.cjs +1 -1
  5. package/dist/actions/index.cjs.map +1 -1
  6. package/dist/actions/index.d.cts +626 -710
  7. package/dist/actions/index.d.ts +626 -710
  8. package/dist/actions/index.js +1 -1
  9. package/dist/chunk-2TNQ52OQ.js +3 -0
  10. package/dist/chunk-2TNQ52OQ.js.map +1 -0
  11. package/dist/chunk-BQFM5RT3.js +2 -0
  12. package/dist/chunk-BQFM5RT3.js.map +1 -0
  13. package/dist/chunk-BQNVAUS6.js +3 -0
  14. package/dist/chunk-BQNVAUS6.js.map +1 -0
  15. package/dist/ethers.cjs +1 -1
  16. package/dist/ethers.cjs.map +1 -1
  17. package/dist/ethers.d.cts +28 -12
  18. package/dist/ethers.d.ts +28 -12
  19. package/dist/ethers.js +1 -1
  20. package/dist/ethers.js.map +1 -1
  21. package/dist/index.cjs +2 -2
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +3 -2
  24. package/dist/index.d.ts +3 -2
  25. package/dist/index.js +1 -1
  26. package/dist/options-vB2peXdE.d.cts +35 -0
  27. package/dist/options-vB2peXdE.d.ts +35 -0
  28. package/dist/privy.cjs +2 -2
  29. package/dist/privy.cjs.map +1 -1
  30. package/dist/privy.d.cts +21 -9
  31. package/dist/privy.d.ts +21 -9
  32. package/dist/privy.js +1 -1
  33. package/dist/privy.js.map +1 -1
  34. package/dist/test-utils.cjs +2 -449
  35. package/dist/test-utils.cjs.map +1 -1
  36. package/dist/test-utils.d.cts +28 -20
  37. package/dist/test-utils.d.ts +28 -20
  38. package/dist/test-utils.js +2 -437
  39. package/dist/test-utils.js.map +1 -1
  40. package/dist/thirdweb.cjs +2 -2
  41. package/dist/thirdweb.cjs.map +1 -1
  42. package/dist/thirdweb.d.cts +21 -9
  43. package/dist/thirdweb.d.ts +21 -9
  44. package/dist/thirdweb.js +2 -2
  45. package/dist/thirdweb.js.map +1 -1
  46. package/dist/types-Bu63z0x6.d.cts +21 -0
  47. package/dist/types-Bu63z0x6.d.ts +21 -0
  48. package/dist/utils/index.cjs +2 -0
  49. package/dist/utils/index.cjs.map +1 -0
  50. package/dist/utils/index.d.cts +18 -0
  51. package/dist/utils/index.d.ts +18 -0
  52. package/dist/utils/index.js +2 -0
  53. package/dist/utils/index.js.map +1 -0
  54. package/dist/viem.cjs +2 -2
  55. package/dist/viem.cjs.map +1 -1
  56. package/dist/viem.d.cts +32 -12
  57. package/dist/viem.d.ts +32 -12
  58. package/dist/viem.js +1 -1
  59. package/package.json +32 -8
  60. package/dist/chunk-BLZHGYNH.js +0 -2
  61. package/dist/chunk-BLZHGYNH.js.map +0 -1
  62. package/dist/chunk-FW4363Y4.js +0 -2
  63. package/dist/chunk-FW4363Y4.js.map +0 -1
  64. package/dist/chunk-QQSK6HIZ.js +0 -3
  65. package/dist/chunk-QQSK6HIZ.js.map +0 -1
  66. package/dist/chunk-V4DWF6LT.js +0 -3
  67. package/dist/chunk-V4DWF6LT.js.map +0 -1
  68. package/dist/magic-string.es-PTUXR566.js +0 -14
  69. package/dist/magic-string.es-PTUXR566.js.map +0 -1
  70. package/dist/types-ieyj0UmJ.d.cts +0 -16
  71. package/dist/types-ieyj0UmJ.d.ts +0 -16
@@ -1,31 +1,39 @@
1
+ import * as _aave_graphql from '@aave/graphql';
1
2
  import * as _aave_types from '@aave/types';
2
- import { EvmAddress, BigDecimal, ResultAsync, AnyVariables } from '@aave/types';
3
- export { bigDecimal } from '@aave/types';
3
+ import { EvmAddress, BigDecimal, ResultAsync } from '@aave/types';
4
4
  import * as _aave_core from '@aave/core';
5
5
  import { UnexpectedError, GraphQLErrorCode } from '@aave/core';
6
- import { Reserve } from '@aave/graphql';
7
- import { TypedDocumentNode } from '@urql/core';
8
- import { ValidationRule } from 'graphql/validation/ValidationContext';
9
- import { Chain, WalletClient } from 'viem';
10
- import { A as AaveClient } from './AaveClient-PHUEzt7l.cjs';
11
- import './types-ieyj0UmJ.cjs';
6
+ import { WalletClient, Transport, Chain, Account } from 'viem';
7
+ import { A as AaveClient } from './AaveClient-L3v8kWvn.cjs';
8
+ import '@urql/core';
9
+ import './types-Bu63z0x6.cjs';
12
10
 
13
11
  declare const environment: _aave_core.EnvironmentConfig;
14
12
  declare const ETHEREUM_FORK_ID: _aave_types.ChainId;
15
13
  declare const ETHEREUM_GHO_ADDRESS: EvmAddress;
16
14
  declare const ETHEREUM_WETH_ADDRESS: EvmAddress;
17
15
  declare const ETHEREUM_USDC_ADDRESS: EvmAddress;
18
- declare const ETHEREUM_DAI_ADDRESS: EvmAddress;
19
- declare const ETHEREUM_MARKET_ADDRESS: EvmAddress;
20
- declare const ETHEREUM_SGHO_ADDRESS: EvmAddress;
21
- declare const ETHEREUM_MARKET_ETH_CORRELATED_EMODE_CATEGORY = 1;
22
-
23
- declare const ethereumForkChain: Chain;
16
+ declare const ETHEREUM_USDS_ADDRESS: EvmAddress;
17
+ declare const ETHEREUM_WSTETH_ADDRESS: EvmAddress;
18
+ declare const ETHEREUM_1INCH_ADDRESS: EvmAddress;
19
+ declare const ETHEREUM_SPOKE_CORE_ADDRESS: EvmAddress;
20
+ declare const ETHEREUM_SPOKE_CORE_ID: _aave_graphql.SpokeId;
21
+ declare const ETHEREUM_SPOKE_ETHENA_ADDRESS: EvmAddress;
22
+ declare const ETHEREUM_SPOKE_FRONTIER_ADDRESS: EvmAddress;
23
+ declare const ETHEREUM_SPOKE_LST_ADDRESS: EvmAddress;
24
+ declare const ETHEREUM_SPOKE_ISO_STABLE_ID: _aave_graphql.SpokeId;
25
+ declare const ETHEREUM_HUB_CORE_ADDRESS: EvmAddress;
26
+ declare const ETHEREUM_HUB_CORE_ID: _aave_graphql.HubId;
27
+ declare const ETHEREUM_FORK_RPC_URL: string;
28
+ declare const ETHEREUM_FORK_RPC_URL_ADMIN: string;
24
29
  declare const client: AaveClient;
25
- declare function createNewWallet(privateKey?: `0x${string}`): WalletClient;
30
+ declare function createNewWallet(privateKey?: `0x${string}`): Promise<WalletClient<Transport, Chain, Account>>;
26
31
  declare function fundNativeAddress(address: EvmAddress, amount?: BigDecimal): ResultAsync<string, UnexpectedError>;
27
- declare function fundErc20Address(tokenAddress: EvmAddress, address: EvmAddress, amount: BigDecimal, decimals?: number): ResultAsync<string, UnexpectedError>;
28
- declare function fetchReserve(tokenAddress: EvmAddress, user?: EvmAddress): Promise<Reserve>;
32
+ declare function fundErc20Address(address: EvmAddress, token: {
33
+ address: EvmAddress;
34
+ amount: BigDecimal;
35
+ decimals?: number;
36
+ }): ResultAsync<string, Error>;
29
37
  declare function createGraphQLErrorObject(code: GraphQLErrorCode): {
30
38
  message: string;
31
39
  locations: never[];
@@ -34,8 +42,8 @@ declare function createGraphQLErrorObject(code: GraphQLErrorCode): {
34
42
  code: GraphQLErrorCode;
35
43
  };
36
44
  };
37
- declare function assertTypedDocumentSatisfies<TResult, TVariables extends AnyVariables>(document: TypedDocumentNode<TResult, TVariables>, rules: ReadonlyArray<ValidationRule>): void;
38
45
  declare function wait(ms: number): Promise<unknown>;
39
- declare function getBalance(address: EvmAddress, tokenAddress: EvmAddress): Promise<number>;
46
+ declare function getBalance(address: EvmAddress, tokenAddress: EvmAddress): Promise<BigDecimal>;
47
+ declare function getNativeBalance(address: EvmAddress): Promise<BigDecimal>;
40
48
 
41
- export { ETHEREUM_DAI_ADDRESS, ETHEREUM_FORK_ID, ETHEREUM_GHO_ADDRESS, ETHEREUM_MARKET_ADDRESS, ETHEREUM_MARKET_ETH_CORRELATED_EMODE_CATEGORY, ETHEREUM_SGHO_ADDRESS, ETHEREUM_USDC_ADDRESS, ETHEREUM_WETH_ADDRESS, assertTypedDocumentSatisfies, client, createGraphQLErrorObject, createNewWallet, environment, ethereumForkChain, fetchReserve, fundErc20Address, fundNativeAddress, getBalance, wait };
49
+ export { ETHEREUM_1INCH_ADDRESS, ETHEREUM_FORK_ID, ETHEREUM_FORK_RPC_URL, ETHEREUM_FORK_RPC_URL_ADMIN, ETHEREUM_GHO_ADDRESS, ETHEREUM_HUB_CORE_ADDRESS, ETHEREUM_HUB_CORE_ID, ETHEREUM_SPOKE_CORE_ADDRESS, ETHEREUM_SPOKE_CORE_ID, ETHEREUM_SPOKE_ETHENA_ADDRESS, ETHEREUM_SPOKE_FRONTIER_ADDRESS, ETHEREUM_SPOKE_ISO_STABLE_ID, ETHEREUM_SPOKE_LST_ADDRESS, ETHEREUM_USDC_ADDRESS, ETHEREUM_USDS_ADDRESS, ETHEREUM_WETH_ADDRESS, ETHEREUM_WSTETH_ADDRESS, client, createGraphQLErrorObject, createNewWallet, environment, fundErc20Address, fundNativeAddress, getBalance, getNativeBalance, wait };
@@ -1,31 +1,39 @@
1
+ import * as _aave_graphql from '@aave/graphql';
1
2
  import * as _aave_types from '@aave/types';
2
- import { EvmAddress, BigDecimal, ResultAsync, AnyVariables } from '@aave/types';
3
- export { bigDecimal } from '@aave/types';
3
+ import { EvmAddress, BigDecimal, ResultAsync } from '@aave/types';
4
4
  import * as _aave_core from '@aave/core';
5
5
  import { UnexpectedError, GraphQLErrorCode } from '@aave/core';
6
- import { Reserve } from '@aave/graphql';
7
- import { TypedDocumentNode } from '@urql/core';
8
- import { ValidationRule } from 'graphql/validation/ValidationContext';
9
- import { Chain, WalletClient } from 'viem';
10
- import { A as AaveClient } from './AaveClient-C-OkXfVz.js';
11
- import './types-ieyj0UmJ.js';
6
+ import { WalletClient, Transport, Chain, Account } from 'viem';
7
+ import { A as AaveClient } from './AaveClient-CgHY2iS9.js';
8
+ import '@urql/core';
9
+ import './types-Bu63z0x6.js';
12
10
 
13
11
  declare const environment: _aave_core.EnvironmentConfig;
14
12
  declare const ETHEREUM_FORK_ID: _aave_types.ChainId;
15
13
  declare const ETHEREUM_GHO_ADDRESS: EvmAddress;
16
14
  declare const ETHEREUM_WETH_ADDRESS: EvmAddress;
17
15
  declare const ETHEREUM_USDC_ADDRESS: EvmAddress;
18
- declare const ETHEREUM_DAI_ADDRESS: EvmAddress;
19
- declare const ETHEREUM_MARKET_ADDRESS: EvmAddress;
20
- declare const ETHEREUM_SGHO_ADDRESS: EvmAddress;
21
- declare const ETHEREUM_MARKET_ETH_CORRELATED_EMODE_CATEGORY = 1;
22
-
23
- declare const ethereumForkChain: Chain;
16
+ declare const ETHEREUM_USDS_ADDRESS: EvmAddress;
17
+ declare const ETHEREUM_WSTETH_ADDRESS: EvmAddress;
18
+ declare const ETHEREUM_1INCH_ADDRESS: EvmAddress;
19
+ declare const ETHEREUM_SPOKE_CORE_ADDRESS: EvmAddress;
20
+ declare const ETHEREUM_SPOKE_CORE_ID: _aave_graphql.SpokeId;
21
+ declare const ETHEREUM_SPOKE_ETHENA_ADDRESS: EvmAddress;
22
+ declare const ETHEREUM_SPOKE_FRONTIER_ADDRESS: EvmAddress;
23
+ declare const ETHEREUM_SPOKE_LST_ADDRESS: EvmAddress;
24
+ declare const ETHEREUM_SPOKE_ISO_STABLE_ID: _aave_graphql.SpokeId;
25
+ declare const ETHEREUM_HUB_CORE_ADDRESS: EvmAddress;
26
+ declare const ETHEREUM_HUB_CORE_ID: _aave_graphql.HubId;
27
+ declare const ETHEREUM_FORK_RPC_URL: string;
28
+ declare const ETHEREUM_FORK_RPC_URL_ADMIN: string;
24
29
  declare const client: AaveClient;
25
- declare function createNewWallet(privateKey?: `0x${string}`): WalletClient;
30
+ declare function createNewWallet(privateKey?: `0x${string}`): Promise<WalletClient<Transport, Chain, Account>>;
26
31
  declare function fundNativeAddress(address: EvmAddress, amount?: BigDecimal): ResultAsync<string, UnexpectedError>;
27
- declare function fundErc20Address(tokenAddress: EvmAddress, address: EvmAddress, amount: BigDecimal, decimals?: number): ResultAsync<string, UnexpectedError>;
28
- declare function fetchReserve(tokenAddress: EvmAddress, user?: EvmAddress): Promise<Reserve>;
32
+ declare function fundErc20Address(address: EvmAddress, token: {
33
+ address: EvmAddress;
34
+ amount: BigDecimal;
35
+ decimals?: number;
36
+ }): ResultAsync<string, Error>;
29
37
  declare function createGraphQLErrorObject(code: GraphQLErrorCode): {
30
38
  message: string;
31
39
  locations: never[];
@@ -34,8 +42,8 @@ declare function createGraphQLErrorObject(code: GraphQLErrorCode): {
34
42
  code: GraphQLErrorCode;
35
43
  };
36
44
  };
37
- declare function assertTypedDocumentSatisfies<TResult, TVariables extends AnyVariables>(document: TypedDocumentNode<TResult, TVariables>, rules: ReadonlyArray<ValidationRule>): void;
38
45
  declare function wait(ms: number): Promise<unknown>;
39
- declare function getBalance(address: EvmAddress, tokenAddress: EvmAddress): Promise<number>;
46
+ declare function getBalance(address: EvmAddress, tokenAddress: EvmAddress): Promise<BigDecimal>;
47
+ declare function getNativeBalance(address: EvmAddress): Promise<BigDecimal>;
40
48
 
41
- export { ETHEREUM_DAI_ADDRESS, ETHEREUM_FORK_ID, ETHEREUM_GHO_ADDRESS, ETHEREUM_MARKET_ADDRESS, ETHEREUM_MARKET_ETH_CORRELATED_EMODE_CATEGORY, ETHEREUM_SGHO_ADDRESS, ETHEREUM_USDC_ADDRESS, ETHEREUM_WETH_ADDRESS, assertTypedDocumentSatisfies, client, createGraphQLErrorObject, createNewWallet, environment, ethereumForkChain, fetchReserve, fundErc20Address, fundNativeAddress, getBalance, wait };
49
+ export { ETHEREUM_1INCH_ADDRESS, ETHEREUM_FORK_ID, ETHEREUM_FORK_RPC_URL, ETHEREUM_FORK_RPC_URL_ADMIN, ETHEREUM_GHO_ADDRESS, ETHEREUM_HUB_CORE_ADDRESS, ETHEREUM_HUB_CORE_ID, ETHEREUM_SPOKE_CORE_ADDRESS, ETHEREUM_SPOKE_CORE_ID, ETHEREUM_SPOKE_ETHENA_ADDRESS, ETHEREUM_SPOKE_FRONTIER_ADDRESS, ETHEREUM_SPOKE_ISO_STABLE_ID, ETHEREUM_SPOKE_LST_ADDRESS, ETHEREUM_USDC_ADDRESS, ETHEREUM_USDS_ADDRESS, ETHEREUM_WETH_ADDRESS, ETHEREUM_WSTETH_ADDRESS, client, createGraphQLErrorObject, createNewWallet, environment, fundErc20Address, fundNativeAddress, getBalance, getNativeBalance, wait };