diff --git a/examples/injective/package.json b/examples/injective/package.json index 116058ff..73d0dc24 100644 --- a/examples/injective/package.json +++ b/examples/injective/package.json @@ -46,6 +46,7 @@ "decimal.js": "^10.4.3", "immer": "^10.0.2", "injective-react": "1.9.12", + "injectivejs": "1.11.2", "mobx": "^6.13.5", "next": "^13", "react": "18.2.0", diff --git a/examples/injective/starship/src/index.ts b/examples/injective/starship/src/index.ts index fbe11210..aff3f791 100644 --- a/examples/injective/starship/src/index.ts +++ b/examples/injective/starship/src/index.ts @@ -2,18 +2,22 @@ import path from 'path'; import { ConfigContext, generateMnemonic, useRegistry } from 'starshipjs'; import { useChain } from 'starshipjs'; +// the defaultSignerOptions.Cosmos makes a general DirectSigner become a injective signer import { defaultSignerOptions } from '@interchainjs/injective/defaults'; import { DirectSigner } from '@interchainjs/cosmos/signers/direct'; +// the cosmos part of these functions is the same with the ones in interchainjs +// meaning these functions can be also imported from interchainjs +// and feel free to use those injective specific functions from injectivejs/injective import { getBalance } from 'injectivejs/cosmos/bank/v1beta1/query.rpc.func'; import { send } from 'injectivejs/cosmos/bank/v1beta1/tx.rpc.func'; +import { MsgSend } from 'injectivejs/cosmos/bank/v1beta1/tx'; import { Secp256k1Auth } from '@interchainjs/auth/secp256k1'; import { EthSecp256k1Auth } from '@interchainjs/auth/ethSecp256k1'; import { HDPath } from '@interchainjs/types'; import { sleep } from '@interchainjs/utils'; -import { MsgSend } from 'injectivejs/cosmos/bank/v1beta1/tx'; const main = async () => { // initialize starship diff --git a/examples/injective/yarn.lock b/examples/injective/yarn.lock index 8d00610c..1ef0b909 100644 --- a/examples/injective/yarn.lock +++ b/examples/injective/yarn.lock @@ -2578,6 +2578,7 @@ __metadata: generate-lockfile: "npm:0.0.12" immer: "npm:^10.0.2" injective-react: "npm:1.9.12" + injectivejs: "npm:1.11.2" mobx: "npm:^6.13.5" next: "npm:^13" react: "npm:18.2.0" @@ -9162,6 +9163,22 @@ __metadata: languageName: node linkType: hard +"injectivejs@npm:1.11.2": + version: 1.11.2 + resolution: "injectivejs@npm:1.11.2" + dependencies: + "@interchainjs/cosmos": "npm:1.11.2" + "@interchainjs/cosmos-types": "npm:1.11.2" + "@interchainjs/encoding": "npm:1.11.2" + "@interchainjs/pubkey": "npm:1.11.2" + "@interchainjs/types": "npm:1.11.2" + "@interchainjs/utils": "npm:1.11.2" + "@noble/hashes": "npm:^1.3.1" + decimal.js: "npm:^10.4.3" + checksum: 10c0/01292df87e7af2f455fe085d09d09018e0815d198566a81ebddca43d8980a7c6a2be0826ebe04d9e7bb53887a3df5c685923fb2e6b9300ed58e57920f9a14fb3 + languageName: node + linkType: hard + "inquirer-autocomplete-prompt@npm:^0.11.1": version: 0.11.1 resolution: "inquirer-autocomplete-prompt@npm:0.11.1"