@augustdigital/sdk 4.0.5-alpha → 4.0.5-beta
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/README.md +169 -11
- package/lib/abis/AddressResolver.d.ts +28 -0
- package/lib/abis/AddressResolver.js +23 -0
- package/lib/abis/AddressResolver.js.map +1 -0
- package/lib/abis/ChainlinkV3.d.ts +87 -0
- package/lib/abis/ChainlinkV3.js +117 -0
- package/lib/abis/ChainlinkV3.js.map +1 -0
- package/lib/abis/ERC20.d.ts +168 -0
- package/lib/abis/ERC20.js +226 -0
- package/lib/abis/ERC20.js.map +1 -0
- package/lib/abis/ERC20_Bytes32.d.ts +135 -0
- package/lib/abis/ERC20_Bytes32.js +192 -0
- package/lib/abis/ERC20_Bytes32.js.map +1 -0
- package/lib/abis/ERC4626.d.ts +363 -0
- package/lib/abis/ERC4626.js +506 -0
- package/lib/abis/ERC4626.js.map +1 -0
- package/lib/abis/ERC721.d.ts +230 -0
- package/lib/abis/ERC721.js +320 -0
- package/lib/abis/ERC721.js.map +1 -0
- package/lib/abis/FeeOracle.d.ts +120 -0
- package/lib/abis/FeeOracle.js +161 -0
- package/lib/abis/FeeOracle.js.map +1 -0
- package/lib/abis/LendingPool.d.ts +1393 -0
- package/lib/abis/LendingPool.js +1806 -0
- package/lib/abis/LendingPool.js.map +1 -0
- package/lib/abis/LendingPoolV2.d.ts +55 -0
- package/lib/abis/LendingPoolV2.js +1832 -0
- package/lib/abis/LendingPoolV2.js.map +1 -0
- package/lib/abis/LendingPoolV3.d.ts +35 -0
- package/lib/abis/LendingPoolV3.js +1160 -0
- package/lib/abis/LendingPoolV3.js.map +1 -0
- package/lib/abis/Loan.d.ts +837 -0
- package/lib/abis/Loan.js +1080 -0
- package/lib/abis/Loan.js.map +1 -0
- package/lib/abis/Multicall3.d.ts +30 -0
- package/lib/abis/Multicall3.js +94 -0
- package/lib/abis/Multicall3.js.map +1 -0
- package/lib/abis/PoolAdapter.d.ts +76 -0
- package/lib/abis/PoolAdapter.js +412 -0
- package/lib/abis/PoolAdapter.js.map +1 -0
- package/lib/abis/RewardDistributor.d.ts +46 -0
- package/lib/abis/RewardDistributor.js +352 -0
- package/lib/abis/RewardDistributor.js.map +1 -0
- package/lib/abis/SmartAccount.d.ts +16 -0
- package/lib/abis/SmartAccount.js +16 -0
- package/lib/abis/SmartAccount.js.map +1 -0
- package/lib/abis/TextResolver.d.ts +16 -0
- package/lib/abis/TextResolver.js +16 -0
- package/lib/abis/TextResolver.js.map +1 -0
- package/lib/abis/TokenizedVaultV2.d.ts +1354 -0
- package/lib/abis/TokenizedVaultV2.js +1028 -0
- package/lib/abis/TokenizedVaultV2.js.map +1 -0
- package/lib/abis/TokenizedVaultV2Receipt.d.ts +1568 -0
- package/lib/abis/TokenizedVaultV2Receipt.js +1061 -0
- package/lib/abis/TokenizedVaultV2Receipt.js.map +1 -0
- package/lib/abis/TokenizedVaultV2WhitelistedAssets.d.ts +274 -0
- package/lib/abis/TokenizedVaultV2WhitelistedAssets.js +167 -0
- package/lib/abis/TokenizedVaultV2WhitelistedAssets.js.map +1 -0
- package/lib/abis/UniversalResolverResolve.d.ts +69 -0
- package/lib/abis/UniversalResolverResolve.js +35 -0
- package/lib/abis/UniversalResolverResolve.js.map +1 -0
- package/lib/abis/UniversalSignatureValidator.d.ts +17 -0
- package/lib/abis/UniversalSignatureValidator.js +27 -0
- package/lib/abis/UniversalSignatureValidator.js.map +1 -0
- package/lib/abis/WrapperAdapter.d.ts +60 -0
- package/lib/abis/WrapperAdapter.js +150 -0
- package/lib/abis/WrapperAdapter.js.map +1 -0
- package/lib/abis/index.d.ts +22 -0
- package/lib/abis/index.js +39 -0
- package/lib/abis/index.js.map +1 -0
- package/lib/adapters/evm/getters.d.ts +4 -0
- package/lib/adapters/evm/getters.js +152 -0
- package/lib/adapters/evm/getters.js.map +1 -0
- package/lib/adapters/evm/index.d.ts +19 -0
- package/lib/adapters/evm/index.js +54 -0
- package/lib/adapters/evm/index.js.map +1 -0
- package/lib/adapters/evm/utils.d.ts +2 -0
- package/lib/adapters/evm/utils.js +43 -0
- package/lib/adapters/evm/utils.js.map +1 -0
- package/lib/adapters/solana/constants.d.ts +25 -0
- package/lib/adapters/solana/constants.js +32 -0
- package/lib/adapters/solana/constants.js.map +1 -0
- package/lib/adapters/solana/getters.d.ts +3 -0
- package/lib/adapters/solana/getters.js +135 -0
- package/lib/adapters/solana/getters.js.map +1 -0
- package/lib/adapters/solana/idl/vault-idl.d.ts +338 -0
- package/lib/adapters/solana/idl/vault-idl.js +1075 -0
- package/lib/adapters/solana/idl/vault-idl.js.map +1 -0
- package/lib/adapters/solana/index.d.ts +136 -0
- package/lib/adapters/solana/index.js +174 -0
- package/lib/adapters/solana/index.js.map +1 -0
- package/lib/adapters/solana/types.d.ts +58 -0
- package/lib/adapters/solana/types.js +3 -0
- package/lib/adapters/solana/types.js.map +1 -0
- package/lib/adapters/solana/utils.d.ts +104 -0
- package/lib/adapters/solana/utils.js +380 -0
- package/lib/adapters/solana/utils.js.map +1 -0
- package/lib/adapters/solana/vault.actions.d.ts +18 -0
- package/lib/adapters/solana/vault.actions.js +235 -0
- package/lib/adapters/solana/vault.actions.js.map +1 -0
- package/lib/adapters/sui/index.d.ts +0 -0
- package/lib/adapters/sui/index.js +1 -0
- package/lib/adapters/sui/index.js.map +1 -0
- package/lib/core/auth/index.d.ts +1 -0
- package/lib/core/auth/index.js +18 -0
- package/lib/core/auth/index.js.map +1 -0
- package/lib/{verify.js → core/auth/verify.js} +3 -2
- package/lib/core/auth/verify.js.map +1 -0
- package/lib/core/base.class.d.ts +33 -0
- package/lib/core/base.class.js +66 -0
- package/lib/core/base.class.js.map +1 -0
- package/lib/core/constants.core.d.ts +59 -0
- package/lib/core/constants.core.js +63 -0
- package/lib/core/constants.core.js.map +1 -0
- package/lib/core/constants.d.ts +88 -0
- package/lib/core/constants.js +148 -0
- package/lib/core/constants.js.map +1 -0
- package/lib/core/constants.vaults.d.ts +19 -0
- package/lib/core/constants.vaults.js +130 -0
- package/lib/core/constants.vaults.js.map +1 -0
- package/lib/core/constants.web3.d.ts +30 -0
- package/lib/core/constants.web3.js +89 -0
- package/lib/core/constants.web3.js.map +1 -0
- package/lib/core/core.helpers.d.ts +23 -0
- package/lib/core/core.helpers.js +210 -0
- package/lib/core/core.helpers.js.map +1 -0
- package/lib/core/fetcher.d.ts +22 -0
- package/lib/core/fetcher.js +321 -0
- package/lib/core/fetcher.js.map +1 -0
- package/lib/core/helpers.core.d.ts +23 -0
- package/lib/core/helpers.core.js +210 -0
- package/lib/core/helpers.core.js.map +1 -0
- package/lib/core/helpers.vaults.d.ts +15 -0
- package/lib/core/helpers.vaults.js +118 -0
- package/lib/core/helpers.vaults.js.map +1 -0
- package/lib/core/helpers.web3.d.ts +29 -0
- package/lib/core/helpers.web3.js +365 -0
- package/lib/core/helpers.web3.js.map +1 -0
- package/lib/core/index.d.ts +10 -0
- package/lib/core/index.js +27 -0
- package/lib/core/index.js.map +1 -0
- package/lib/core/logger/index.d.ts +21 -0
- package/lib/core/logger/index.js +80 -0
- package/lib/core/logger/index.js.map +1 -0
- package/lib/core/logger/slack.d.ts +12 -0
- package/lib/core/logger/slack.js +49 -0
- package/lib/core/logger/slack.js.map +1 -0
- package/lib/core/read.actions.d.ts +3 -0
- package/lib/core/read.actions.js +39 -0
- package/lib/core/read.actions.js.map +1 -0
- package/lib/core/vault.utils.d.ts +4 -0
- package/lib/core/vault.utils.js +35 -0
- package/lib/core/vault.utils.js.map +1 -0
- package/lib/core/web3.helpers.d.ts +29 -0
- package/lib/core/web3.helpers.js +365 -0
- package/lib/core/web3.helpers.js.map +1 -0
- package/lib/core/write.actions.d.ts +9 -0
- package/lib/core/write.actions.js +51 -0
- package/lib/core/write.actions.js.map +1 -0
- package/lib/index.d.ts +5 -5
- package/lib/index.js +13 -6
- package/lib/index.js.map +1 -1
- package/lib/main.d.ts +90 -14
- package/lib/main.js +60 -13
- package/lib/main.js.map +1 -1
- package/lib/modules/vaults/constants.d.ts +63 -0
- package/lib/modules/vaults/constants.js +186 -0
- package/lib/modules/vaults/constants.js.map +1 -0
- package/lib/modules/vaults/fetcher.d.ts +101 -0
- package/lib/modules/vaults/fetcher.js +257 -0
- package/lib/modules/vaults/fetcher.js.map +1 -0
- package/lib/modules/vaults/getters.d.ts +67 -0
- package/lib/modules/vaults/getters.js +900 -0
- package/lib/modules/vaults/getters.js.map +1 -0
- package/lib/modules/vaults/index.d.ts +3 -0
- package/lib/modules/vaults/index.js +20 -0
- package/lib/modules/vaults/index.js.map +1 -0
- package/lib/modules/vaults/main.d.ts +98 -0
- package/lib/modules/vaults/main.js +519 -0
- package/lib/modules/vaults/main.js.map +1 -0
- package/lib/modules/vaults/read.actions.d.ts +3 -0
- package/lib/modules/vaults/read.actions.js +39 -0
- package/lib/modules/vaults/read.actions.js.map +1 -0
- package/lib/modules/vaults/utils.d.ts +12 -0
- package/lib/modules/vaults/utils.js +170 -0
- package/lib/modules/vaults/utils.js.map +1 -0
- package/lib/modules/vaults/vault.actions.d.ts +10 -0
- package/lib/modules/vaults/vault.actions.js +95 -0
- package/lib/modules/vaults/vault.actions.js.map +1 -0
- package/lib/modules/vaults/write.actions.d.ts +17 -0
- package/lib/modules/vaults/write.actions.js +143 -0
- package/lib/modules/vaults/write.actions.js.map +1 -0
- package/lib/services/coingecko/fetcher.d.ts +1 -0
- package/lib/services/coingecko/fetcher.js +36 -0
- package/lib/services/coingecko/fetcher.js.map +1 -0
- package/lib/services/coingecko/index.d.ts +2 -0
- package/lib/services/coingecko/index.js +19 -0
- package/lib/services/coingecko/index.js.map +1 -0
- package/lib/services/coingecko/utils.d.ts +1 -0
- package/lib/services/coingecko/utils.js +24 -0
- package/lib/services/coingecko/utils.js.map +1 -0
- package/lib/services/debank/fetcher.d.ts +2 -0
- package/lib/services/debank/fetcher.js +16 -0
- package/lib/services/debank/fetcher.js.map +1 -0
- package/lib/services/debank/index.d.ts +2 -0
- package/lib/services/debank/index.js +19 -0
- package/lib/services/debank/index.js.map +1 -0
- package/lib/services/debank/utils.d.ts +32 -0
- package/lib/services/debank/utils.js +229 -0
- package/lib/services/debank/utils.js.map +1 -0
- package/lib/services/subgraph/fetcher.d.ts +2 -0
- package/lib/services/subgraph/fetcher.js +59 -0
- package/lib/services/subgraph/fetcher.js.map +1 -0
- package/lib/services/subgraph/index.d.ts +2 -0
- package/lib/services/subgraph/index.js +19 -0
- package/lib/services/subgraph/index.js.map +1 -0
- package/lib/services/subgraph/vaults.d.ts +10 -0
- package/lib/services/subgraph/vaults.js +471 -0
- package/lib/services/subgraph/vaults.js.map +1 -0
- package/lib/types/index.d.ts +8 -0
- package/lib/types/index.js +24 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/pools.d.ts +141 -0
- package/lib/types/pools.js +3 -0
- package/lib/types/pools.js.map +1 -0
- package/lib/types/staking.d.ts +28 -0
- package/lib/types/staking.js +3 -0
- package/lib/types/staking.js.map +1 -0
- package/lib/types/subgraph.d.ts +45 -0
- package/lib/types/subgraph.js +3 -0
- package/lib/types/subgraph.js.map +1 -0
- package/lib/types/user.d.ts +1 -0
- package/lib/types/user.js +3 -0
- package/lib/types/user.js.map +1 -0
- package/lib/types/vaults.d.ts +170 -0
- package/lib/types/vaults.js +3 -0
- package/lib/types/vaults.js.map +1 -0
- package/lib/types/web3.d.ts +24 -0
- package/lib/types/web3.js +3 -0
- package/lib/types/web3.js.map +1 -0
- package/lib/types/webserver.d.ts +489 -0
- package/lib/types/webserver.js +3 -0
- package/lib/types/webserver.js.map +1 -0
- package/package.json +16 -10
- package/lib/verify.js.map +0 -1
- /package/lib/{verify.d.ts → core/auth/verify.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,23 +1,181 @@
|
|
|
1
1
|
# August Digital SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
TypeScript SDK for interacting with August Digital vaults across EVM and Solana chains.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Quick Start
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
```typescript
|
|
8
|
+
import { AugustSDK } from '@augustdigital/sdk';
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
// Initialize with RPC providers
|
|
11
|
+
const sdk = new AugustSDK({
|
|
12
|
+
providers: {
|
|
13
|
+
1: 'https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY',
|
|
14
|
+
42161: 'https://arb-mainnet.g.alchemy.com/v2/YOUR_KEY',
|
|
15
|
+
-1: 'https://api.mainnet-beta.solana.com', // Solana
|
|
16
|
+
},
|
|
17
|
+
keys: {
|
|
18
|
+
august: 'YOUR_API_KEY', // Optional
|
|
19
|
+
},
|
|
20
|
+
monitoring: {
|
|
21
|
+
env: 'DEV', // Optional: 'DEV' enables console logging (defaults to 'PROD')
|
|
22
|
+
},
|
|
23
|
+
});
|
|
10
24
|
|
|
11
|
-
|
|
25
|
+
// Fetch all vaults
|
|
26
|
+
const vaults = await sdk.getVaults();
|
|
12
27
|
|
|
13
|
-
|
|
28
|
+
// Fetch specific vault with loans and allocations
|
|
29
|
+
const vault = await sdk.getVault({
|
|
30
|
+
vault: '0x...',
|
|
31
|
+
options: { loans: true, allocations: true }
|
|
32
|
+
});
|
|
14
33
|
|
|
15
|
-
|
|
34
|
+
// Get user positions
|
|
35
|
+
const positions = await sdk.getVaultPositions({
|
|
36
|
+
wallet: '0x...',
|
|
37
|
+
showAllVaults: true,
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Architecture
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
src.ts/
|
|
45
|
+
├── main.ts # Main SDK class (AugustSDK)
|
|
46
|
+
├── core/ # Base utilities
|
|
47
|
+
│ ├── base.class.ts # Base SDK functionality
|
|
48
|
+
│ ├── fetcher.ts # API client with retry logic
|
|
49
|
+
│ └── web3.helpers.ts # Blockchain utilities
|
|
50
|
+
├── adapters/ # Chain-specific implementations
|
|
51
|
+
│ ├── evm/ # EVM vault adapters (v1, v2)
|
|
52
|
+
│ └── solana/ # Solana program adapters
|
|
53
|
+
├── modules/ # Feature modules
|
|
54
|
+
│ └── vaults/ # Vault operations
|
|
55
|
+
│ ├── main.ts # AugustVaults class
|
|
56
|
+
│ ├── getters.ts # Data fetching functions
|
|
57
|
+
│ └── utils.ts # Helper utilities
|
|
58
|
+
├── services/ # External service integrations
|
|
59
|
+
│ ├── debank/ # DeFi allocation data
|
|
60
|
+
│ ├── coingecko/ # Token pricing
|
|
61
|
+
│ └── subgraph/ # Historical transaction data
|
|
62
|
+
└── types/ # TypeScript interfaces
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Key Concepts
|
|
66
|
+
|
|
67
|
+
### Multi-Chain Support
|
|
68
|
+
|
|
69
|
+
- **EVM Chains**: Ethereum, Arbitrum, Base, BSC, Avalanche
|
|
70
|
+
- **Solana**: Native Solana program support
|
|
71
|
+
- Unified interface across all chains
|
|
72
|
+
|
|
73
|
+
### Vault Versions
|
|
74
|
+
|
|
75
|
+
- `evm-0/evm-1`: Legacy vault contracts
|
|
76
|
+
- `evm-2`: Current EVM vault architecture (separate receipt tokens)
|
|
77
|
+
- `sol-0`: Solana program-based vaults
|
|
78
|
+
|
|
79
|
+
### Data Enrichment
|
|
80
|
+
|
|
81
|
+
All vault queries support optional enrichment:
|
|
82
|
+
|
|
83
|
+
- `loans`: Include active loan data
|
|
84
|
+
- `allocations`: DeFi/CeFi/OTC position breakdowns
|
|
85
|
+
- `wallet`: User-specific position data
|
|
86
|
+
|
|
87
|
+
## Code Conventions
|
|
88
|
+
|
|
89
|
+
### Naming Patterns
|
|
90
|
+
|
|
91
|
+
- **Interfaces**: Prefixed with `I` (e.g., `IVault`, `IVaultLoan`)
|
|
92
|
+
- **ABIs**: Prefixed with `ABI_` (e.g., `ABI_LENDING_POOL_V2`)
|
|
93
|
+
- **Types**: Descriptive names (e.g., `IAddress`, `IChainId`)
|
|
94
|
+
|
|
95
|
+
### Important Tags
|
|
96
|
+
|
|
97
|
+
Search codebase for these comments to find areas needing attention:
|
|
98
|
+
|
|
99
|
+
- `@todo`: Planned improvements or missing features
|
|
100
|
+
- `@hardcoded`: Hardcoded values that may need configuration
|
|
101
|
+
- `@solana`: Solana-specific logic or notes
|
|
102
|
+
|
|
103
|
+
### Error Handling
|
|
104
|
+
|
|
105
|
+
- Automatic retry logic for network errors with exponential backoff
|
|
106
|
+
- 90-second request timeout (configurable via `REQUEST_TIMEOUT_MS`)
|
|
107
|
+
- Correlation IDs logged for debugging failed requests
|
|
108
|
+
- Write actions throw errors instead of silent failures
|
|
16
109
|
|
|
17
|
-
|
|
110
|
+
### Environment Configuration
|
|
18
111
|
|
|
19
|
-
```
|
|
20
|
-
|
|
112
|
+
```typescript
|
|
113
|
+
// Development mode (enables console logging)
|
|
114
|
+
const devSdk = new AugustSDK({
|
|
115
|
+
providers: {
|
|
116
|
+
/* ... */
|
|
117
|
+
},
|
|
118
|
+
monitoring: {
|
|
119
|
+
env: 'DEV',
|
|
120
|
+
},
|
|
121
|
+
});
|
|
21
122
|
|
|
22
|
-
|
|
123
|
+
// Production mode (default - no console logs)
|
|
124
|
+
const prodSdk = new AugustSDK({
|
|
125
|
+
providers: {
|
|
126
|
+
/* ... */
|
|
127
|
+
},
|
|
128
|
+
// monitoring is optional - defaults to PROD
|
|
129
|
+
});
|
|
23
130
|
```
|
|
131
|
+
|
|
132
|
+
- `env: 'DEV'` - Enables console logging for debugging
|
|
133
|
+
- `env: 'PROD'` or omitted - Disables console, uses custom logger only (safer default)
|
|
134
|
+
|
|
135
|
+
## API Reference
|
|
136
|
+
|
|
137
|
+
### Main Methods
|
|
138
|
+
|
|
139
|
+
#### Vault Queries
|
|
140
|
+
|
|
141
|
+
- `getVaults(options?)`: Fetch all vaults across chains
|
|
142
|
+
- `getVault({ vault, chainId?, options? })`: Get single vault details
|
|
143
|
+
- `getVaultLoans({ vault, chainId })`: Fetch active loans
|
|
144
|
+
- `getVaultAllocations({ vault, chainId })`: Get allocation breakdown
|
|
145
|
+
- `getVaultApy({ vault, historical? })`: Current/historical APY
|
|
146
|
+
- `getVaultTvl({ vault, historical? })`: Current/historical TVL
|
|
147
|
+
|
|
148
|
+
#### User Positions
|
|
149
|
+
|
|
150
|
+
- `getVaultPositions({ wallet?, vault?, chainId? })`: User vault positions
|
|
151
|
+
- `getVaultAvailableRedemptions({ vault, wallet?, chainId })`: Claimable redemptions
|
|
152
|
+
- `getVaultUserHistory({ wallet, vault?, chainId? })`: Transaction history
|
|
153
|
+
- `getVaultStakingPositions({ wallet, chainId })`: Staking positions
|
|
154
|
+
|
|
155
|
+
#### Utilities
|
|
156
|
+
|
|
157
|
+
- `getPrice(symbol)`: Get token price in USD
|
|
158
|
+
- `switchNetwork(chainId)`: Change active chain
|
|
159
|
+
- `updateWallet(address)`: Set active wallet for tracking
|
|
160
|
+
|
|
161
|
+
## Development
|
|
162
|
+
|
|
163
|
+
### Running Tests
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
pnpm test
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Building
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
pnpm build
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Type Checking
|
|
176
|
+
|
|
177
|
+
All exports are fully typed. Use TypeScript for best developer experience.
|
|
178
|
+
|
|
179
|
+
## Support
|
|
180
|
+
|
|
181
|
+
For issues or questions, refer to the [main repository](https://github.com/fractal-protocol/js-sdk) or contact the August Digital team.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const ABI_ADDRESS_RESOLVER: readonly [{
|
|
2
|
+
readonly name: "addr";
|
|
3
|
+
readonly type: "function";
|
|
4
|
+
readonly stateMutability: "view";
|
|
5
|
+
readonly inputs: readonly [{
|
|
6
|
+
readonly name: "name";
|
|
7
|
+
readonly type: "bytes32";
|
|
8
|
+
}];
|
|
9
|
+
readonly outputs: readonly [{
|
|
10
|
+
readonly name: "";
|
|
11
|
+
readonly type: "address";
|
|
12
|
+
}];
|
|
13
|
+
}, {
|
|
14
|
+
readonly name: "addr";
|
|
15
|
+
readonly type: "function";
|
|
16
|
+
readonly stateMutability: "view";
|
|
17
|
+
readonly inputs: readonly [{
|
|
18
|
+
readonly name: "name";
|
|
19
|
+
readonly type: "bytes32";
|
|
20
|
+
}, {
|
|
21
|
+
readonly name: "coinType";
|
|
22
|
+
readonly type: "uint256";
|
|
23
|
+
}];
|
|
24
|
+
readonly outputs: readonly [{
|
|
25
|
+
readonly name: "";
|
|
26
|
+
readonly type: "bytes";
|
|
27
|
+
}];
|
|
28
|
+
}];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ABI_ADDRESS_RESOLVER = void 0;
|
|
4
|
+
exports.ABI_ADDRESS_RESOLVER = [
|
|
5
|
+
{
|
|
6
|
+
name: 'addr',
|
|
7
|
+
type: 'function',
|
|
8
|
+
stateMutability: 'view',
|
|
9
|
+
inputs: [{ name: 'name', type: 'bytes32' }],
|
|
10
|
+
outputs: [{ name: '', type: 'address' }],
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: 'addr',
|
|
14
|
+
type: 'function',
|
|
15
|
+
stateMutability: 'view',
|
|
16
|
+
inputs: [
|
|
17
|
+
{ name: 'name', type: 'bytes32' },
|
|
18
|
+
{ name: 'coinType', type: 'uint256' },
|
|
19
|
+
],
|
|
20
|
+
outputs: [{ name: '', type: 'bytes' }],
|
|
21
|
+
},
|
|
22
|
+
];
|
|
23
|
+
//# sourceMappingURL=AddressResolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddressResolver.js","sourceRoot":"","sources":["../../src.ts/abis/AddressResolver.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG;IAClC;QACE,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,MAAM;QACvB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;QAC3C,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;KACzC;IACD;QACE,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,UAAU;QAChB,eAAe,EAAE,MAAM;QACvB,MAAM,EAAE;YACN,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE;YACjC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE;SACtC;QACD,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;KACvC;CACO,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
export declare const ABI_CHAINLINK_V3: readonly [{
|
|
2
|
+
readonly inputs: readonly [];
|
|
3
|
+
readonly name: "decimals";
|
|
4
|
+
readonly outputs: readonly [{
|
|
5
|
+
readonly internalType: "uint8";
|
|
6
|
+
readonly name: "";
|
|
7
|
+
readonly type: "uint8";
|
|
8
|
+
}];
|
|
9
|
+
readonly stateMutability: "view";
|
|
10
|
+
readonly type: "function";
|
|
11
|
+
}, {
|
|
12
|
+
readonly inputs: readonly [];
|
|
13
|
+
readonly name: "description";
|
|
14
|
+
readonly outputs: readonly [{
|
|
15
|
+
readonly internalType: "string";
|
|
16
|
+
readonly name: "";
|
|
17
|
+
readonly type: "string";
|
|
18
|
+
}];
|
|
19
|
+
readonly stateMutability: "view";
|
|
20
|
+
readonly type: "function";
|
|
21
|
+
}, {
|
|
22
|
+
readonly inputs: readonly [{
|
|
23
|
+
readonly internalType: "uint80";
|
|
24
|
+
readonly name: "_roundId";
|
|
25
|
+
readonly type: "uint80";
|
|
26
|
+
}];
|
|
27
|
+
readonly name: "getRoundData";
|
|
28
|
+
readonly outputs: readonly [{
|
|
29
|
+
readonly internalType: "uint80";
|
|
30
|
+
readonly name: "roundId";
|
|
31
|
+
readonly type: "uint80";
|
|
32
|
+
}, {
|
|
33
|
+
readonly internalType: "int256";
|
|
34
|
+
readonly name: "answer";
|
|
35
|
+
readonly type: "int256";
|
|
36
|
+
}, {
|
|
37
|
+
readonly internalType: "uint256";
|
|
38
|
+
readonly name: "startedAt";
|
|
39
|
+
readonly type: "uint256";
|
|
40
|
+
}, {
|
|
41
|
+
readonly internalType: "uint256";
|
|
42
|
+
readonly name: "updatedAt";
|
|
43
|
+
readonly type: "uint256";
|
|
44
|
+
}, {
|
|
45
|
+
readonly internalType: "uint80";
|
|
46
|
+
readonly name: "answeredInRound";
|
|
47
|
+
readonly type: "uint80";
|
|
48
|
+
}];
|
|
49
|
+
readonly stateMutability: "view";
|
|
50
|
+
readonly type: "function";
|
|
51
|
+
}, {
|
|
52
|
+
readonly inputs: readonly [];
|
|
53
|
+
readonly name: "latestRoundData";
|
|
54
|
+
readonly outputs: readonly [{
|
|
55
|
+
readonly internalType: "uint80";
|
|
56
|
+
readonly name: "roundId";
|
|
57
|
+
readonly type: "uint80";
|
|
58
|
+
}, {
|
|
59
|
+
readonly internalType: "int256";
|
|
60
|
+
readonly name: "answer";
|
|
61
|
+
readonly type: "int256";
|
|
62
|
+
}, {
|
|
63
|
+
readonly internalType: "uint256";
|
|
64
|
+
readonly name: "startedAt";
|
|
65
|
+
readonly type: "uint256";
|
|
66
|
+
}, {
|
|
67
|
+
readonly internalType: "uint256";
|
|
68
|
+
readonly name: "updatedAt";
|
|
69
|
+
readonly type: "uint256";
|
|
70
|
+
}, {
|
|
71
|
+
readonly internalType: "uint80";
|
|
72
|
+
readonly name: "answeredInRound";
|
|
73
|
+
readonly type: "uint80";
|
|
74
|
+
}];
|
|
75
|
+
readonly stateMutability: "view";
|
|
76
|
+
readonly type: "function";
|
|
77
|
+
}, {
|
|
78
|
+
readonly inputs: readonly [];
|
|
79
|
+
readonly name: "version";
|
|
80
|
+
readonly outputs: readonly [{
|
|
81
|
+
readonly internalType: "uint256";
|
|
82
|
+
readonly name: "";
|
|
83
|
+
readonly type: "uint256";
|
|
84
|
+
}];
|
|
85
|
+
readonly stateMutability: "view";
|
|
86
|
+
readonly type: "function";
|
|
87
|
+
}];
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ABI_CHAINLINK_V3 = void 0;
|
|
4
|
+
exports.ABI_CHAINLINK_V3 = [
|
|
5
|
+
{
|
|
6
|
+
inputs: [],
|
|
7
|
+
name: 'decimals',
|
|
8
|
+
outputs: [
|
|
9
|
+
{
|
|
10
|
+
internalType: 'uint8',
|
|
11
|
+
name: '',
|
|
12
|
+
type: 'uint8',
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
stateMutability: 'view',
|
|
16
|
+
type: 'function',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
inputs: [],
|
|
20
|
+
name: 'description',
|
|
21
|
+
outputs: [
|
|
22
|
+
{
|
|
23
|
+
internalType: 'string',
|
|
24
|
+
name: '',
|
|
25
|
+
type: 'string',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
stateMutability: 'view',
|
|
29
|
+
type: 'function',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
inputs: [
|
|
33
|
+
{
|
|
34
|
+
internalType: 'uint80',
|
|
35
|
+
name: '_roundId',
|
|
36
|
+
type: 'uint80',
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
name: 'getRoundData',
|
|
40
|
+
outputs: [
|
|
41
|
+
{
|
|
42
|
+
internalType: 'uint80',
|
|
43
|
+
name: 'roundId',
|
|
44
|
+
type: 'uint80',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
internalType: 'int256',
|
|
48
|
+
name: 'answer',
|
|
49
|
+
type: 'int256',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
internalType: 'uint256',
|
|
53
|
+
name: 'startedAt',
|
|
54
|
+
type: 'uint256',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
internalType: 'uint256',
|
|
58
|
+
name: 'updatedAt',
|
|
59
|
+
type: 'uint256',
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
internalType: 'uint80',
|
|
63
|
+
name: 'answeredInRound',
|
|
64
|
+
type: 'uint80',
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
stateMutability: 'view',
|
|
68
|
+
type: 'function',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
inputs: [],
|
|
72
|
+
name: 'latestRoundData',
|
|
73
|
+
outputs: [
|
|
74
|
+
{
|
|
75
|
+
internalType: 'uint80',
|
|
76
|
+
name: 'roundId',
|
|
77
|
+
type: 'uint80',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
internalType: 'int256',
|
|
81
|
+
name: 'answer',
|
|
82
|
+
type: 'int256',
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
internalType: 'uint256',
|
|
86
|
+
name: 'startedAt',
|
|
87
|
+
type: 'uint256',
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
internalType: 'uint256',
|
|
91
|
+
name: 'updatedAt',
|
|
92
|
+
type: 'uint256',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
internalType: 'uint80',
|
|
96
|
+
name: 'answeredInRound',
|
|
97
|
+
type: 'uint80',
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
stateMutability: 'view',
|
|
101
|
+
type: 'function',
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
inputs: [],
|
|
105
|
+
name: 'version',
|
|
106
|
+
outputs: [
|
|
107
|
+
{
|
|
108
|
+
internalType: 'uint256',
|
|
109
|
+
name: '',
|
|
110
|
+
type: 'uint256',
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
stateMutability: 'view',
|
|
114
|
+
type: 'function',
|
|
115
|
+
},
|
|
116
|
+
];
|
|
117
|
+
//# sourceMappingURL=ChainlinkV3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChainlinkV3.js","sourceRoot":"","sources":["../../src.ts/abis/ChainlinkV3.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B;QACE,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE;YACP;gBACE,YAAY,EAAE,OAAO;gBACrB,IAAI,EAAE,EAAE;gBACR,IAAI,EAAE,OAAO;aACd;SACF;QACD,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KACjB;IACD;QACE,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE;YACP;gBACE,YAAY,EAAE,QAAQ;gBACtB,IAAI,EAAE,EAAE;gBACR,IAAI,EAAE,QAAQ;aACf;SACF;QACD,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KACjB;IACD;QACE,MAAM,EAAE;YACN;gBACE,YAAY,EAAE,QAAQ;gBACtB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,QAAQ;aACf;SACF;QACD,IAAI,EAAE,cAAc;QACpB,OAAO,EAAE;YACP;gBACE,YAAY,EAAE,QAAQ;gBACtB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;aACf;YACD;gBACE,YAAY,EAAE,QAAQ;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;aACf;YACD;gBACE,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,SAAS;aAChB;YACD;gBACE,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,SAAS;aAChB;YACD;gBACE,YAAY,EAAE,QAAQ;gBACtB,IAAI,EAAE,iBAAiB;gBACvB,IAAI,EAAE,QAAQ;aACf;SACF;QACD,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KACjB;IACD;QACE,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE;YACP;gBACE,YAAY,EAAE,QAAQ;gBACtB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;aACf;YACD;gBACE,YAAY,EAAE,QAAQ;gBACtB,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,QAAQ;aACf;YACD;gBACE,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,SAAS;aAChB;YACD;gBACE,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,SAAS;aAChB;YACD;gBACE,YAAY,EAAE,QAAQ;gBACtB,IAAI,EAAE,iBAAiB;gBACvB,IAAI,EAAE,QAAQ;aACf;SACF;QACD,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KACjB;IACD;QACE,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,SAAS;QACf,OAAO,EAAE;YACP;gBACE,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,EAAE;gBACR,IAAI,EAAE,SAAS;aAChB;SACF;QACD,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KACjB;CACO,CAAC"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
export declare const ABI_ERC20: readonly [{
|
|
2
|
+
readonly constant: true;
|
|
3
|
+
readonly inputs: readonly [];
|
|
4
|
+
readonly name: "name";
|
|
5
|
+
readonly outputs: readonly [{
|
|
6
|
+
readonly name: "";
|
|
7
|
+
readonly type: "string";
|
|
8
|
+
}];
|
|
9
|
+
readonly payable: false;
|
|
10
|
+
readonly stateMutability: "view";
|
|
11
|
+
readonly type: "function";
|
|
12
|
+
}, {
|
|
13
|
+
readonly constant: false;
|
|
14
|
+
readonly inputs: readonly [{
|
|
15
|
+
readonly name: "_spender";
|
|
16
|
+
readonly type: "address";
|
|
17
|
+
}, {
|
|
18
|
+
readonly name: "_value";
|
|
19
|
+
readonly type: "uint256";
|
|
20
|
+
}];
|
|
21
|
+
readonly name: "approve";
|
|
22
|
+
readonly outputs: readonly [{
|
|
23
|
+
readonly name: "";
|
|
24
|
+
readonly type: "bool";
|
|
25
|
+
}];
|
|
26
|
+
readonly payable: false;
|
|
27
|
+
readonly stateMutability: "nonpayable";
|
|
28
|
+
readonly type: "function";
|
|
29
|
+
}, {
|
|
30
|
+
readonly constant: true;
|
|
31
|
+
readonly inputs: readonly [];
|
|
32
|
+
readonly name: "totalSupply";
|
|
33
|
+
readonly outputs: readonly [{
|
|
34
|
+
readonly name: "";
|
|
35
|
+
readonly type: "uint256";
|
|
36
|
+
}];
|
|
37
|
+
readonly payable: false;
|
|
38
|
+
readonly stateMutability: "view";
|
|
39
|
+
readonly type: "function";
|
|
40
|
+
}, {
|
|
41
|
+
readonly constant: false;
|
|
42
|
+
readonly inputs: readonly [{
|
|
43
|
+
readonly name: "_from";
|
|
44
|
+
readonly type: "address";
|
|
45
|
+
}, {
|
|
46
|
+
readonly name: "_to";
|
|
47
|
+
readonly type: "address";
|
|
48
|
+
}, {
|
|
49
|
+
readonly name: "_value";
|
|
50
|
+
readonly type: "uint256";
|
|
51
|
+
}];
|
|
52
|
+
readonly name: "transferFrom";
|
|
53
|
+
readonly outputs: readonly [{
|
|
54
|
+
readonly name: "";
|
|
55
|
+
readonly type: "bool";
|
|
56
|
+
}];
|
|
57
|
+
readonly payable: false;
|
|
58
|
+
readonly stateMutability: "nonpayable";
|
|
59
|
+
readonly type: "function";
|
|
60
|
+
}, {
|
|
61
|
+
readonly constant: true;
|
|
62
|
+
readonly inputs: readonly [];
|
|
63
|
+
readonly name: "decimals";
|
|
64
|
+
readonly outputs: readonly [{
|
|
65
|
+
readonly name: "";
|
|
66
|
+
readonly type: "uint8";
|
|
67
|
+
}];
|
|
68
|
+
readonly payable: false;
|
|
69
|
+
readonly stateMutability: "view";
|
|
70
|
+
readonly type: "function";
|
|
71
|
+
}, {
|
|
72
|
+
readonly constant: true;
|
|
73
|
+
readonly inputs: readonly [{
|
|
74
|
+
readonly name: "_owner";
|
|
75
|
+
readonly type: "address";
|
|
76
|
+
}];
|
|
77
|
+
readonly name: "balanceOf";
|
|
78
|
+
readonly outputs: readonly [{
|
|
79
|
+
readonly name: "balance";
|
|
80
|
+
readonly type: "uint256";
|
|
81
|
+
}];
|
|
82
|
+
readonly payable: false;
|
|
83
|
+
readonly stateMutability: "view";
|
|
84
|
+
readonly type: "function";
|
|
85
|
+
}, {
|
|
86
|
+
readonly constant: true;
|
|
87
|
+
readonly inputs: readonly [];
|
|
88
|
+
readonly name: "symbol";
|
|
89
|
+
readonly outputs: readonly [{
|
|
90
|
+
readonly name: "";
|
|
91
|
+
readonly type: "string";
|
|
92
|
+
}];
|
|
93
|
+
readonly payable: false;
|
|
94
|
+
readonly stateMutability: "view";
|
|
95
|
+
readonly type: "function";
|
|
96
|
+
}, {
|
|
97
|
+
readonly constant: false;
|
|
98
|
+
readonly inputs: readonly [{
|
|
99
|
+
readonly name: "_to";
|
|
100
|
+
readonly type: "address";
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "_value";
|
|
103
|
+
readonly type: "uint256";
|
|
104
|
+
}];
|
|
105
|
+
readonly name: "transfer";
|
|
106
|
+
readonly outputs: readonly [{
|
|
107
|
+
readonly name: "";
|
|
108
|
+
readonly type: "bool";
|
|
109
|
+
}];
|
|
110
|
+
readonly payable: false;
|
|
111
|
+
readonly stateMutability: "nonpayable";
|
|
112
|
+
readonly type: "function";
|
|
113
|
+
}, {
|
|
114
|
+
readonly constant: true;
|
|
115
|
+
readonly inputs: readonly [{
|
|
116
|
+
readonly name: "_owner";
|
|
117
|
+
readonly type: "address";
|
|
118
|
+
}, {
|
|
119
|
+
readonly name: "_spender";
|
|
120
|
+
readonly type: "address";
|
|
121
|
+
}];
|
|
122
|
+
readonly name: "allowance";
|
|
123
|
+
readonly outputs: readonly [{
|
|
124
|
+
readonly name: "";
|
|
125
|
+
readonly type: "uint256";
|
|
126
|
+
}];
|
|
127
|
+
readonly payable: false;
|
|
128
|
+
readonly stateMutability: "view";
|
|
129
|
+
readonly type: "function";
|
|
130
|
+
}, {
|
|
131
|
+
readonly payable: true;
|
|
132
|
+
readonly stateMutability: "payable";
|
|
133
|
+
readonly type: "fallback";
|
|
134
|
+
}, {
|
|
135
|
+
readonly anonymous: false;
|
|
136
|
+
readonly inputs: readonly [{
|
|
137
|
+
readonly indexed: true;
|
|
138
|
+
readonly name: "owner";
|
|
139
|
+
readonly type: "address";
|
|
140
|
+
}, {
|
|
141
|
+
readonly indexed: true;
|
|
142
|
+
readonly name: "spender";
|
|
143
|
+
readonly type: "address";
|
|
144
|
+
}, {
|
|
145
|
+
readonly indexed: false;
|
|
146
|
+
readonly name: "value";
|
|
147
|
+
readonly type: "uint256";
|
|
148
|
+
}];
|
|
149
|
+
readonly name: "Approval";
|
|
150
|
+
readonly type: "event";
|
|
151
|
+
}, {
|
|
152
|
+
readonly anonymous: false;
|
|
153
|
+
readonly inputs: readonly [{
|
|
154
|
+
readonly indexed: true;
|
|
155
|
+
readonly name: "from";
|
|
156
|
+
readonly type: "address";
|
|
157
|
+
}, {
|
|
158
|
+
readonly indexed: true;
|
|
159
|
+
readonly name: "to";
|
|
160
|
+
readonly type: "address";
|
|
161
|
+
}, {
|
|
162
|
+
readonly indexed: false;
|
|
163
|
+
readonly name: "value";
|
|
164
|
+
readonly type: "uint256";
|
|
165
|
+
}];
|
|
166
|
+
readonly name: "Transfer";
|
|
167
|
+
readonly type: "event";
|
|
168
|
+
}];
|