Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: expose full request message to listeners #20

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions docs/api-reference/avm-web-client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ import TOCInline from '@theme/TOCInline';

#### Parameters

| Name | Type | Required | Default | Description |
|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| listener | (`result`?: [`IDisableResult`](types#idisableresult) \| `null`, `error`?: [`IBaseError`](types#ibaseerror) \| `null`) => (`void` \| `Promise<void>`) \| `null` | yes | - | The callback is called when a response message is received, or null to remove the listener. If the result was successful, the `error` parameter will be null. |
| Name | Type | Required | Default | Description |
|----------|----------------------------------------------------------------------------------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| listener | (`options`: [`IAVMWebClientListenerOptions`](types#iavmwebclientlisteneroptions)) => (`void` \| `Promise<void>`) \| `null` | yes | - | The callback is called when a response message is received, or null to remove the listener. If the result was successful, the `error` parameter will be null. |


### `onDiscover(listener)`
Expand All @@ -103,9 +103,9 @@ import TOCInline from '@theme/TOCInline';

#### Parameters

| Name | Type | Required | Default | Description |
|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| listener | (`result`?: [`IDiscoverResult`](types#idiscoverresult) \| `null`, `error`?: [`IBaseError`](types#ibaseerror) \| `null`) => (`void` \| `Promise<void>`) \| `null` | yes | - | The callback is called when a response message is received, or null to remove the listener. If the result was successful, the `error` parameter will be null. |
| Name | Type | Required | Default | Description |
|----------|----------------------------------------------------------------------------------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| listener | (`options`: [`IAVMWebClientListenerOptions`](types#iavmwebclientlisteneroptions)) => (`void` \| `Promise<void>`) \| `null` | yes | - | The callback is called when a response message is received, or null to remove the listener. If the result was successful, the `error` parameter will be null. |

#### Returns

Expand All @@ -119,9 +119,9 @@ import TOCInline from '@theme/TOCInline';

#### Parameters

| Name | Type | Required | Default | Description |
|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| listener | (`result`?: [`IEnableResult`](types#ienableresult) \| `null`, `error`?: [`IBaseError`](types#ibaseerror) \| `null`) => (`void` \| `Promise<void>`) \| `null` | yes | - | The callback is called when a response message is received, or null to remove the listener. If the result was successful, the `error` parameter will be null. |
| Name | Type | Required | Default | Description |
|----------|----------------------------------------------------------------------------------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| listener | (`options`: [`IAVMWebClientListenerOptions`](types#iavmwebclientlisteneroptions)) => (`void` \| `Promise<void>`) \| `null` | yes | - | The callback is called when a response message is received, or null to remove the listener. If the result was successful, the `error` parameter will be null. |

#### Returns

Expand All @@ -135,9 +135,9 @@ import TOCInline from '@theme/TOCInline';

#### Parameters

| Name | Type | Required | Default | Description |
|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| listener | (`result`?: [`IPostTransactionsResult`](types#iposttransactionsresult) \| `null`, `error`?: [`IBaseError`](types#ibaseerror) \| `null`) => (`void` \| `Promise<void>`) \| `null` | yes | - | The callback is called when a response message is received, or null to remove the listener. If the result was successful, the `error` parameter will be null. |
| Name | Type | Required | Default | Description |
|----------|----------------------------------------------------------------------------------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| listener | (`options`: [`IAVMWebClientListenerOptions`](types#iavmwebclientlisteneroptions)) => (`void` \| `Promise<void>`) \| `null` | yes | - | The callback is called when a response message is received, or null to remove the listener. If the result was successful, the `error` parameter will be null. |

#### Returns

Expand All @@ -151,19 +151,19 @@ import TOCInline from '@theme/TOCInline';

#### Parameters

| Name | Type | Required | Default | Description |
|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| listener | (`result`?: [`IPostTransactionsResult`](types#iposttransactionsresult) \| `null`, `error`?: [`IBaseError`](types#ibaseerror) \| `null`) => (`void` \| `Promise<void>`) \| `null` | yes | - | The callback is called when a response message is received, or null to remove the listener. If the result was successful, the `error` parameter will be null. |
| Name | Type | Required | Default | Description |
|----------|----------------------------------------------------------------------------------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| listener | (`options`: [`IAVMWebClientListenerOptions`](types#iavmwebclientlisteneroptions)) => (`void` \| `Promise<void>`) \| `null` | yes | - | The callback is called when a response message is received, or null to remove the listener. If the result was successful, the `error` parameter will be null. |

### `onSignTransactions(listener)`

> Listens to `sign_transactions` messages sent from providers. This will replace any previous set listeners. If null is supplied, the listener will be removed.

#### Parameters

| Name | Type | Required | Default | Description |
|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| listener | (`result`?: [`ISignTransactionsResult`](types#isigntransactionsresult) \| `null`, `error`?: [`IBaseError`](types#ibaseerror) \| `null`) => (`void` \| `Promise<void>`) \| `null` | yes | - | The callback is called when a response message is received, or null to remove the listener. If the result was successful, the `error` parameter will be null. |
| Name | Type | Required | Default | Description |
|----------|----------------------------------------------------------------------------------------------------------------------------|----------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| listener | (`options`: [`IAVMWebClientListenerOptions`](types#iavmwebclientlisteneroptions)) => (`void` \| `Promise<void>`) \| `null` | yes | - | The callback is called when a response message is received, or null to remove the listener. If the result was successful, the `error` parameter will be null. |

#### Returns

Expand Down
Loading