Skip to content
This repository has been archived by the owner on Dec 25, 2023. It is now read-only.

Commit

Permalink
Merge pull request #102 from cosmostation/add-cosmostation
Browse files Browse the repository at this point in the history
add cosmostation
  • Loading branch information
ethanfrey authored Jul 30, 2022
2 parents 5c8964b + e2f5b93 commit 0f64808
Show file tree
Hide file tree
Showing 7 changed files with 12,175 additions and 2,536 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,25 @@ async function main() {
main();
```

### Connect with Cosmostation and get a signing starget client

```ts
import { setupCosmostation } from "cosmwasm";

const config = {
chainId: "cliffnet-1",
rpcEndpoint: "https://rpc.cliffnet.cosmwasm.com:443/",
prefix: "wasm",
};

async function main() {
const client = await setupCosmostation(config);
console.log(client);
}

main();
```

### Interacting with contracts

```ts
Expand Down
21 changes: 21 additions & 0 deletions docs/clients/writing/CosmWasmSigningClient/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Basically there are currently 4 different setup functions:
| setupWebLedger | This function is used to log in to web-based dApps with a ledger. (Without Keplr) |
| setupNodeLocal | Herewith a local mnemonic can be used for signing. |
| setupNodeLedger | With the help of this function, a ledger device can be used in a node environment. |
| setupCosmostation | This function is used to log in to dApps with Cosmostation. |


## Configuration

Expand Down Expand Up @@ -117,4 +119,23 @@ const config = {
async function getClient() {
return await setupWebLedger(config, TransportNodeHid);
}
```

### Setup Web/Cosmostation

```ts
import { setupCosmostation } from "cosmwasm";

const config = {
chainId: "cliffnet-1",
rpcEndpoint: "https://rpc.cliffnet.cosmwasm.com:443/",
prefix: "wasm",
};

async function main() {
const client = await setupCosmostation(config);
console.log(client);
}

main();
```
Loading

0 comments on commit 0f64808

Please sign in to comment.