From bbc83755db2727803a0ce2ec82804fc25492ef62 Mon Sep 17 00:00:00 2001 From: Zetazzz Date: Thu, 26 Dec 2024 07:32:56 +0800 Subject: [PATCH] fix docs --- libs/injective-react/README.md | 2 +- libs/injective-vue/README.md | 14 ++++++++++++++ libs/injectivejs/README.md | 2 +- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/libs/injective-react/README.md b/libs/injective-react/README.md index 0a87a1e9..55505fa9 100644 --- a/libs/injective-react/README.md +++ b/libs/injective-react/README.md @@ -545,7 +545,7 @@ const response = await stargateClient.signAndBroadcast(address, [msg], fee); 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. +- Initialize the client. - Create and sign messages. - Broadcast transactions. - Handle responses and errors. diff --git a/libs/injective-vue/README.md b/libs/injective-vue/README.md index d07052ed..46360fc1 100644 --- a/libs/injective-vue/README.md +++ b/libs/injective-vue/README.md @@ -40,6 +40,7 @@ npm install injective-vue - [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) @@ -277,6 +278,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-vue/src/views/injective.vue). This example demonstrates how to: + +- Initialize the 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/blob/main/examples/injective-vue) 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 diff --git a/libs/injectivejs/README.md b/libs/injectivejs/README.md index 09acb44a..ca8d0e3a 100644 --- a/libs/injectivejs/README.md +++ b/libs/injectivejs/README.md @@ -505,7 +505,7 @@ const response = await stargateClient.signAndBroadcast(address, [msg], fee); 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. +- Initialize the client. - Create and sign messages. - Broadcast transactions. - Handle responses and errors.