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

docs(gno-js): Add provider instantiation docs #2427

Merged
Merged
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
32 changes: 32 additions & 0 deletions docs/reference/gno-js-client/gno-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,38 @@ id: gno-js-provider
The `Gno Provider` is an extension on the `tm2-js-client` `Provider`,
outlined [here](../tm2-js-client/Provider/provider.md). Both JSON-RPC and WS providers are included with the package.

## Instantiation

### new GnoWSProvider

Creates a new instance of the Gno WebSocket Provider, based on [`tm2-js-client` `WSProvider`](../tm2-js-client/Provider/ws-provider.md).

#### Parameters

Same as [`tm2-js-client` `WSProvider`](../tm2-js-client/Provider/ws-provider.md).

#### Usage

```ts
new GnoWSProvider('ws://staging.gno.land:26657/ws');
// provider with WS connection is created
```

### new GnoJSONRPCProvider

Creates a new instance of the Gno JSON-RPC Provider, based on [`tm2-js-client` `JSONRPCProvider`](../tm2-js-client/Provider/json-rpc-provider.md).

#### Parameters

Same as [`tm2-js-client` `JSONRPCProvider`](../tm2-js-client/Provider/json-rpc-provider.md).

#### Usage

```ts
new GnoJSONRPCProvider('http://staging.gno.land:36657');
// provider is created
```

## Realm Methods

### getRenderOutput
Expand Down
Loading