langchain_community.document_loaders.etherscan
.EtherscanLoader¶
- class langchain_community.document_loaders.etherscan.EtherscanLoader(account_address: str, api_key: str = 'docs-demo', filter: str = 'normal_transaction', page: int = 1, offset: int = 10, start_block: int = 0, end_block: int = 99999999, sort: str = 'desc')[source]¶
Load transactions from Ethereum mainnet.
The Loader use Etherscan API to interact with Ethereum mainnet.
ETHERSCAN_API_KEY environment variable must be set use this loader.
Methods
__init__
(account_address[, api_key, filter, ...])A lazy loader for Documents.
Lazy load Documents from table.
load
()Load data into Document objects.
load_and_split
([text_splitter])Load Documents and split into chunks.
- Parameters
account_address (str) –
api_key (str) –
filter (str) –
page (int) –
offset (int) –
start_block (int) –
end_block (int) –
sort (str) –
- __init__(account_address: str, api_key: str = 'docs-demo', filter: str = 'normal_transaction', page: int = 1, offset: int = 10, start_block: int = 0, end_block: int = 99999999, sort: str = 'desc')[source]¶
- Parameters
account_address (str) –
api_key (str) –
filter (str) –
page (int) –
offset (int) –
start_block (int) –
end_block (int) –
sort (str) –
- async alazy_load() AsyncIterator[Document] ¶
A lazy loader for Documents.
- Return type
AsyncIterator[Document]
- lazy_load() Iterator[Document] [source]¶
Lazy load Documents from table.
- Return type
Iterator[Document]
- load_and_split(text_splitter: Optional[TextSplitter] = None) List[Document] ¶
Load Documents and split into chunks. Chunks are returned as Documents.
Do not override this method. It should be considered to be deprecated!
- Parameters
text_splitter (Optional[TextSplitter]) – TextSplitter instance to use for splitting documents. Defaults to RecursiveCharacterTextSplitter.
- Returns
List of Documents.
- Return type
List[Document]