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]

从`Ethereum`主网加载交易。

加载器使用Etherscan API与Ethereum主网进行交互。

必须设置ETHERSCAN_API_KEY环境变量才能使用此加载器。

Methods

__init__(account_address[, api_key, filter, ...])

alazy_load()

一个用于文档的惰性加载器。

aload()

将数据加载到文档对象中。

getERC1155Tx()

getERC20Tx()

getERC721Tx()

getEthBalance()

getInternalTx()

getNormTx()

lazy_load()

从表中延迟加载文档。

load()

将数据加载到文档对象中。

load_and_split([text_splitter])

加载文档并分割成块。块作为文档返回。

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]

一个用于文档的惰性加载器。

Return type

AsyncIterator[Document]

async aload() List[Document]

将数据加载到文档对象中。

Return type

List[Document]

getERC1155Tx() List[Document][source]
Return type

List[Document]

getERC20Tx() List[Document][source]
Return type

List[Document]

getERC721Tx() List[Document][source]
Return type

List[Document]

getEthBalance() List[Document][source]
Return type

List[Document]

getInternalTx() List[Document][source]
Return type

List[Document]

getNormTx() List[Document][source]
Return type

List[Document]

lazy_load() Iterator[Document][source]

从表中延迟加载文档。

Return type

Iterator[Document]

load() List[Document]

将数据加载到文档对象中。

Return type

List[Document]

load_and_split(text_splitter: Optional[TextSplitter] = None) List[Document]

加载文档并分割成块。块作为文档返回。

不要覆盖此方法。应该被视为已弃用!

参数:
text_splitter: 用于分割文档的TextSplitter实例。

默认为RecursiveCharacterTextSplitter。

返回:

文档列表。

Parameters

text_splitter (Optional[TextSplitter]) –

Return type

List[Document]

Examples using EtherscanLoader