-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
521 changed files
with
9,890 additions
and
4,100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,31 @@ | ||
# Getting Started | ||
|
||
**Stable Package Version** | ||
|
||
![Stable Package (all) versions](https://img.shields.io/npm/v/%40injectivelabs/sdk-ts/latest?label=%40injectivelabs%2Fsdk-ts) | ||
![Supported Node Version](http://img.shields.io/badge/node-16.x-brightgreen.svg) | ||
|
||
**Latest Package Versions:** | ||
|
||
![](https://img.shields.io/npm/v/%40injectivelabs/sdk-ts/next?label=%40injectivelabs%2Fsdk-ts)![](https://img.shields.io/npm/v/%40injectivelabs/wallet-ts/next?label=%40injectivelabs%2Fwallet-ts)![](https://img.shields.io/npm/v/%40injectivelabs/sdk-ui-ts/next?label=%40injectivelabs%2Fsdk-ui-ts)![](https://img.shields.io/npm/v/%40injectivelabs/utils/next?label=%40injectivelabs%2Futils)![](https://img.shields.io/npm/v/%40injectivelabs/token-metadata/next?label=%40injectivelabs%2Ftoken-metadata)![](https://img.shields.io/npm/v/%40injectivelabs/networks/next?label=%40injectivelabs%2Fnetworks) | ||
![](https://img.shields.io/npm/v/%40injectivelabs/sdk-ts/next?label=%40injectivelabs%2Fsdk-ts)![](https://img.shields.io/npm/v/%40injectivelabs/wallet-ts/next?label=%40injectivelabs%2Fwallet-ts)![](https://img.shields.io/npm/v/%40injectivelabs/sdk-ui-ts/next?label=%40injectivelabs%2Fsdk-ui-ts) | ||
|
||
![](https://img.shields.io/npm/v/%40injectivelabs/utils/next?label=%40injectivelabs%2Futils)![](https://img.shields.io/npm/v/%40injectivelabs/token-metadata/next?label=%40injectivelabs%2Ftoken-metadata)![](https://img.shields.io/npm/v/%40injectivelabs/networks/next?label=%40injectivelabs%2Fnetworks) | ||
|
||
_**Note:** The latest versions are published using the `next` tag. For stable versions use the `latest` tag or check npm registry for the latest stable version._  | ||
|
||
The purpose of this Wiki is to help developers build decentralized applications on top of Injective. Let's dive a bit deeper into each section and explain its purpose so its easier to get the bigger picture. | ||
|
||
_Note: Reading the Technical Concepts section after reading the overview below is highly recommended. There are some concepts that can have a bit steeper learning curve than others, so we recommend going through them to understand a bit more about Injective._ | ||
|
||
* [Wallets](wallet/) - In this section, we are going to explain (in technical terms) how Accounts are derived on Injective, how you can connect your wallet straight from the dApp itself, and finally have a look at the **WalletStrategy** - a package built by the InjectiveLabs team which offers out of the box solution for providing multiple wallet solutions to the user to connect and interact with your dApp. | ||
* [Querying](querying/) - In this section we are going to explore different ways to obtain data from different data sources needed to build your dApps. First, we are going to see how to query the chain directly and then we are going to explore the Indexer API - an indexer solution for easier data access/streaming including historical data. | ||
* [Transaction](transactions/) - In this section, we are going to explore different ways to make transactions on Injective. First, we are going to explain (in technical terms) how Transactions work on Injective and some technical concepts around them and then we are going to have a look at how to prepare, sign, and broadcast transactions on Injective in several ways. There are a couple of ways to do this. | ||
- [Wallets](wallet/) - In this section, we are going to explain (in technical terms) how Accounts are derived on Injective, how you can connect your wallet straight from the dApp itself, and finally have a look at the **WalletStrategy** - a package built by the InjectiveLabs team which offers out of the box solution for providing multiple wallet solutions to the user to connect and interact with your dApp. | ||
- [Querying](querying/) - In this section we are going to explore different ways to obtain data from different data sources needed to build your dApps. First, we are going to see how to query the chain directly and then we are going to explore the Indexer API - an indexer solution for easier data access/streaming including historical data. | ||
- [Transaction](transactions/) - In this section, we are going to explore different ways to make transactions on Injective. First, we are going to explain (in technical terms) how Transactions work on Injective and some technical concepts around them and then we are going to have a look at how to prepare, sign, and broadcast transactions on Injective in several ways. There are a couple of ways to do this. | ||
1. Using the Cosmos native approach in creating a transaction, sign it using a **Cosmos native wallet** and broadcast it to Injective, | ||
2. Using the Ethereum native approach in creating a transaction using EIP712 typed data, sign it using an **Ethereum native wallet** and broadcast it to Injective, | ||
3. Using the Ethereum native approach in creating a transaction using EIP712 typed data, sign it using a **Ledger device** and broadcast it to Injective, | ||
4. Using the Cosmos native approach in creating a transaction, sign it using a **raw PrivateKey** and broadcast it to Injective, | ||
5. Using the Web3Gateway microservice - an API that provides fee delegation services. | ||
* [Core Modules](core-modules/) - In this section we are going to have a quick summary of the core modules on Injective and show examples of how to create some Messages (+ pack them into a transaction, sign them using a private key, and broadcast them on Injective) within these core modules. | ||
* [Bridge](bridge/) - In this section, we are going to have a look at Injective's interoperability and explain how developers can utilize the Peggy bridge and the IBC bridge to bridge assets over to Injective. | ||
* [Networks](readme/networks.md) - In this section, we will look at different (pre-defined) available Networks for developers to utilize while building dApps on top of Injective, allowing them to start building without the need to make their own infrastructure. | ||
* [Calculations](calculations/) - In this section, we will look at different calculations formula converting values between UI human-readable and chain format. | ||
- [Core Modules](core-modules/) - In this section we are going to have a quick summary of the core modules on Injective and show examples of how to create some Messages (+ pack them into a transaction, sign them using a private key, and broadcast them on Injective) within these core modules. | ||
- [Bridge](bridge/) - In this section, we are going to have a look at Injective's interoperability and explain how developers can utilize the Peggy bridge and the IBC bridge to bridge assets over to Injective. | ||
- [Networks](readme/networks.md) - In this section, we will look at different (pre-defined) available Networks for developers to utilize while building dApps on top of Injective, allowing them to start building without the need to make their own infrastructure. | ||
- [Calculations](calculations/) - In this section, we will look at different calculations formula converting values between UI human-readable and chain format. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,8 @@ $ yarn add @bangjelkoski/node-stdlib-browser | |
$ yarn add -D @bangjelkoski/vite-plugin-node-polyfills | ||
``` | ||
|
||
Make sure you are using the `vue-tsc@^1.2.0`, `nuxt@^3.3.3`, `typescript@^4.9.5` versions. | ||
Make sure you are using the `[email protected] | ||
`, `nuxt@^3.8.1`, `typescript@^5.0.4` versions. | ||
|
||
**Buffer** | ||
|
||
|
@@ -55,7 +56,7 @@ export default defineNuxtPlugin(() => { | |
If you are going to use `pinia` as state management, add it to your packages: | ||
|
||
```bash | ||
$ yarn add pinia @pinia/nuxt | ||
$ yarn add @pinia/nuxt@^0.4.9 | ||
``` | ||
|
||
### 5. Using `vueuse` | ||
|
@@ -88,11 +89,12 @@ Then, we need to configure the `tsconfig.json` if you are using TypeScript (reco | |
|
||
### 6. nuxt.config.ts / packages.json | ||
|
||
Before we boot our application, we need to set everything up in the `nuxt.config.ts`, the main configuration point for every Nuxt 3 application. Let's see a reference `nuxt.config.ts` and explain every line using comments so its easier for developers to understand. | ||
Before we boot our application, we need to set everything up in the `nuxt.config.ts`, the main configuration point for every Nuxt 3 application. Let's see a reference `nuxt.config.ts` and explain every line using comments so it's easier for developers to understand. | ||
|
||
```ts | ||
// filename - nuxt.config.ts | ||
import { nodePolyfills } from "@bangjelkoski/vite-plugin-node-polyfills"; | ||
import tsconfigPaths from 'vite-tsconfig-paths' | ||
|
||
export default defineNuxtConfig({ | ||
ssr: false, // whether to pre-render your application | ||
|
@@ -120,10 +122,10 @@ export default defineNuxtConfig({ | |
|
||
// We generate only sitemaps for the client side as we don't need a server | ||
// Note: there is a problem with sitemaps for Vite + Nuxt3 | ||
// as usually is that it takes to much time/memory to generate | ||
// as usual is that it takes too much time/memory to generate | ||
// sitemaps and the build process can fail | ||
// on Github Actions/Netlify/Vercel/etc so we have to use another | ||
// strategy like generating them locally and them pushing them to services like | ||
// strategy like generating them locally and pushing them to services like | ||
// busgnag | ||
sourcemap: { | ||
server: false, | ||
|
@@ -137,7 +139,8 @@ export default defineNuxtConfig({ | |
"process.env.DEBUG": JSON.stringify(process.env.DEBUG), | ||
}, | ||
|
||
plugins: [ // setting up node + crypto polyfils | ||
plugins: [ // setting up node + crypto polyfils + vite TS path resolution | ||
tsconfigPaths(), | ||
nodePolyfills({ protocolImports: false }) | ||
], | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
# Calculations | ||
|
||
Here are some formula formatting values between the chain and UI human-readable. | ||
In this page we are going to look through some calculations and formatting to understand better about how numbers are represented on the chain vs how we are showing them on the UI. | ||
|
||
### Bridges Supported | ||
### Tick Sizes | ||
|
||
| Topic | Description | | ||
| ------------------------------------------------------- | --------------------------------------- | | ||
| [Market min price tick size](minPriceTickSize.md) | Minimum market order price tick size | | ||
| [Market min quantity tick size](minQuantityTickSzie.md) | Minimum market order quantity tick size | | ||
| Topic | Description | | ||
| ---------------------------------------------------------- | --------------------------------------- | | ||
| [Market min price tick size](min-price-tick-size.md) | Minimum market order price tick size | | ||
| [Market min quantity tick size](min-quantity-tick-size.md) | Minimum market order quantity tick size | |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.