Skip to content

Commit 0fec9dd

Browse files
committed
Remove unsupported methods, update chain list
1 parent a7234ef commit 0fec9dd

3 files changed

Lines changed: 283 additions & 828 deletions

File tree

README.md

Lines changed: 6 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ Mainnet
107107
- Flare: `"flare"`
108108
- Gnosis Chain: `"gnosis"`
109109
- Scroll: `"scroll"`
110+
- Stellar: `"stellar"`
110111
- Linea: `"linea"`
111112
- Xai: `"xai"`
112113
- Xlayer: `"xlayer"`
@@ -118,19 +119,15 @@ Testnet
118119
- Ethereum Holesky: `"eth_holesky"`
119120
- Avalanche Fuji: `"avalanche_fuji"`
120121
- Polygon Amoy: `"polygon_amoy"`
121-
- Optimism Testnet: `"optimism_testnet"`
122+
- Optimism Sepolia: `"optimism_sepolia"`
122123
- Base Sepolia: `"base_sepolia"`
123-
124-
Appchain
125-
126-
- META Apes: `"bas_metaapes"`
124+
- Neura Devnet `"neura_devnet"`
125+
- Neura Testnet `"neura_testnet_v1"`
127126

128127
Appchain Testnet
129128

130-
- META Apes Testnet: `"bas_metaapes_testnet"`
131-
- Neura Devnet `"neura_devnet"`
132-
- Neura Testnet `"neura_testnet_v1"`
133-
- Incentiv Devnet `"incentiv_devnet"`
129+
- Incentiv Devnet `"incentiv_devnet_v3"`
130+
- Incentiv Testnet `"incentiv_testnet"`
134131

135132
When passing blockchain, you can use one available from `types.py` (preferred) or just a string value.
136133

@@ -141,9 +138,6 @@ When passing blockchain, you can use one available from `types.py` (preferred) o
141138
Early Access
142139

143140
- [`get_token_price_history`](#gettokenpricehistory--gettokenpricehistoryraw)
144-
- [`get_account_balance_historical`](#getaccountbalancehistorical--getaccountbalancehistoricalraw)
145-
- [`get_internal_transactions_by_block_number`](#getinternaltransactionsbyblocknumber--getinternaltransactionsbyblocknumberraw)
146-
- [`get_internal_transactions_by_parent_hash`](#getinternaltransactionsbyparenthash--getinternaltransactionsbyparenthashraw)
147141

148142
Token API
149143

@@ -208,68 +202,6 @@ result = advancedAPI.get_token_price_history(
208202
print(result)
209203
```
210204

211-
#### `get_account_balance_historical` / `get_account_balance_historical_raw`
212-
213-
Get the coin and token balances of the wallet at specified block.
214-
215-
```python3
216-
from ankr import AnkrAdvancedAPI
217-
from ankr.types import Blockchain, GetAccountBalanceHistoricalRequest
218-
219-
advancedAPI = AnkrAdvancedAPI("YOUR-TOKEN")
220-
221-
result = advancedAPI.get_account_balance_historical(
222-
request=GetAccountBalanceHistoricalRequest(
223-
blockchain=Blockchain.Eth,
224-
walletAddress='vitalik.eth',
225-
onlyWhitelisted=False,
226-
blockHeight=17967813,
227-
)
228-
)
229-
print(result)
230-
```
231-
232-
#### `get_internal_transactions_by_block_number` / `get_internal_transactions_by_block_number_raw`
233-
234-
Get a list of internal transactions in the block.
235-
236-
```python3
237-
from ankr import AnkrAdvancedAPI
238-
from ankr.types import Blockchain, GetInternalTransactionsByBlockNumberRequest
239-
240-
advancedAPI = AnkrAdvancedAPI("YOUR-TOKEN")
241-
242-
result = advancedAPI.get_internal_transactions_by_block_number(
243-
request=GetInternalTransactionsByBlockNumberRequest(
244-
blockchain=Blockchain.Eth,
245-
blockNumber=10000000,
246-
onlyWithValue=True,
247-
)
248-
)
249-
for transaction in result:
250-
print(transaction)
251-
```
252-
253-
#### `get_internal_transactions_by_parent_hash` / `get_internal_transactions_by_parent_hash_raw`
254-
255-
Get a list of internal transactions in the transaction.
256-
257-
```python3
258-
from ankr import AnkrAdvancedAPI
259-
from ankr.types import Blockchain, GetInternalTransactionsByParentHashRequest
260-
261-
advancedAPI = AnkrAdvancedAPI("YOUR-TOKEN")
262-
263-
result = advancedAPI.get_internal_transactions_by_parent_hash(
264-
request=GetInternalTransactionsByParentHashRequest(
265-
blockchain=Blockchain.Eth,
266-
parentTransactionHash='0xa50f8744e65cb76f66f9d54499d5401866a75d93db2e784952f55205afc3acc5',
267-
onlyWithValue=True,
268-
)
269-
)
270-
for transaction in result:
271-
print(transaction)
272-
```
273205

274206
### Token API
275207

ankr/advanced_apis.py

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -44,87 +44,6 @@ def get_token_price_history_raw(
4444

4545
return reply
4646

47-
def get_account_balance_historical(
48-
self,
49-
request: types.GetAccountBalanceHistoricalRequest,
50-
limit: Optional[int] = None,
51-
) -> Iterable[types.Balance]:
52-
for asset in self.provider.call_method_paginated(
53-
rpc="ankr_getAccountBalanceHistorical",
54-
request=request,
55-
reply=types.GetAccountBalanceHistoricalReply,
56-
iterable_name="assets",
57-
iterable_type=types.Balance,
58-
limit=limit,
59-
):
60-
yield asset
61-
62-
def get_account_balance_historical_raw(
63-
self,
64-
request: types.GetAccountBalanceHistoricalRequest,
65-
) -> types.GetAccountBalanceHistoricalReply:
66-
reply = self.provider.call_method(
67-
rpc="ankr_getAccountBalanceHistorical",
68-
request=request,
69-
reply=types.GetAccountBalanceReply,
70-
)
71-
72-
return reply
73-
74-
def get_internal_transactions_by_block_number(
75-
self,
76-
request: types.GetInternalTransactionsByBlockNumberRequest,
77-
limit: Optional[int] = None,
78-
) -> Iterable[types.InternalTransaction]:
79-
for asset in self.provider.call_method_paginated(
80-
rpc="ankr_getInternalTransactionsByBlockNumber",
81-
request=request,
82-
reply=types.GetInternalTransactionsReply,
83-
iterable_name="internalTransactions",
84-
iterable_type=types.InternalTransaction,
85-
limit=limit,
86-
):
87-
yield asset
88-
89-
def get_internal_transactions_by_block_number_raw(
90-
self,
91-
request: types.GetInternalTransactionsByBlockNumberRequest,
92-
) -> types.GetInternalTransactionsReply:
93-
reply = self.provider.call_method(
94-
rpc="ankr_getInternalTransactionsByBlockNumber",
95-
request=request,
96-
reply=types.GetInternalTransactionsReply,
97-
)
98-
99-
return reply
100-
101-
def get_internal_transactions_by_parent_hash(
102-
self,
103-
request: types.GetInternalTransactionsByParentHashRequest,
104-
limit: Optional[int] = None,
105-
) -> Iterable[types.InternalTransaction]:
106-
for asset in self.provider.call_method_paginated(
107-
rpc="ankr_getInternalTransactionsByParentHash",
108-
request=request,
109-
reply=types.GetInternalTransactionsReply,
110-
iterable_name="internalTransactions",
111-
iterable_type=types.InternalTransaction,
112-
limit=limit,
113-
):
114-
yield asset
115-
116-
def get_internal_transactions_by_parent_hash_raw(
117-
self,
118-
request: types.GetInternalTransactionsByBlockNumberRequest,
119-
) -> types.GetInternalTransactionsReply:
120-
reply = self.provider.call_method(
121-
rpc="ankr_getInternalTransactionsByParentHash",
122-
request=request,
123-
reply=types.GetInternalTransactionsReply,
124-
)
125-
126-
return reply
127-
12847

12948
class AnkrQueryAPI(AnkrMultichainAPI):
13049
def get_logs(

0 commit comments

Comments
 (0)