# Neo2 provider API

The NeoLine extension wallet injects an Neo Legacy provider into the browser at window\.NEOLine.

You can use this provider in your dapp to request users' Neo Legacy accounts, read on-chain data, and have the user sign messages and transactions.

```typescript
window.addEventListener('NEOLine.NEO.EVENT.READY', () => {
  const neoline = new NEOLine.Init();
  neoline.getAccount()
  .then(account => console.log(account))
});

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tutorial.neoline.io/reference/neo2-provider-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
