Skip to content

Commit

Permalink
inj docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Zetazzz committed Dec 25, 2024
1 parent fde167a commit 2ebff21
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions libs/injectivejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ npm install injectivejs
- [Initializing the Stargate Client](#initializing-the-stargate-client)
- [Creating Signers](#creating-signers)
- [Broadcasting Messages](#broadcasting-messages)
- [All In One Example](#all-in-one-example)
- [Advanced Usage](#advanced-usage)
- [Developing](#developing)
- [Codegen](#codegen)
Expand Down Expand Up @@ -500,6 +501,19 @@ const fee: StdFee = {
const response = await stargateClient.signAndBroadcast(address, [msg], fee);
```

### All In One Example

For a comprehensive example of how to use InjectiveJS to send messages, please see the example [here](https://github.com/cosmology-tech/create-cosmos-app/blob/main/examples/injective/components/SendMsg.tsx). This example demonstrates how to:

- Initialize the Stargate client.
- Create and sign messages.
- Broadcast transactions.
- Handle responses and errors.

The example provides a complete walkthrough of setting up the client, creating a message for sending tokens, and broadcasting the transaction to the Injective blockchain.

Follow the [instructions](https://github.com/cosmology-tech/create-cosmos-app/tree/main/examples/injective) in the example to set up your InjectiveJS client and start sending messages to the Injective blockchain.

## Advanced Usage

If you want to manually construct a stargate client
Expand Down

0 comments on commit 2ebff21

Please sign in to comment.