diff --git a/.env.example b/.env.example
index 6ab8df523..2f45f685e 100644
--- a/.env.example
+++ b/.env.example
@@ -1 +1,2 @@
TEST_PRIVATE_KEY=
+TEST_SEED_PHASE=
diff --git a/docs/classes/_injectivelabs_wallet_ts.internal.HTTPConnection.html b/docs/classes/_injectivelabs_wallet_ts.internal.HTTPConnection.html
deleted file mode 100644
index 45d698b23..000000000
--- a/docs/classes/_injectivelabs_wallet_ts.internal.HTTPConnection.html
+++ /dev/null
@@ -1 +0,0 @@
-
HttpConnection | API Reference | Injective - Powering the future of decentralized finance. Constructors constructor Defined in node_modules/@json-rpc-tools/provider/dist/cjs/http.d.ts:9 Parameters Properties Private apiapi: any
Defined in node_modules/@json-rpc-tools/provider/dist/cjs/http.d.ts:7 Private on Closeon Close: any
Defined in node_modules/@json-rpc-tools/provider/dist/cjs/http.d.ts:21 Private on Erroron Error: any
Defined in node_modules/@json-rpc-tools/provider/dist/cjs/http.d.ts:23 Private on Openon Open: any
Defined in node_modules/@json-rpc-tools/provider/dist/cjs/http.d.ts:20 Private on Payloadon Payload: any
Defined in node_modules/@json-rpc-tools/provider/dist/cjs/http.d.ts:22 Private registerregister: any
Defined in node_modules/@json-rpc-tools/provider/dist/cjs/http.d.ts:19 Private registeringregistering: any
Defined in node_modules/@json-rpc-tools/provider/dist/cjs/http.d.ts:8 url url: string
Defined in node_modules/@json-rpc-tools/provider/dist/cjs/http.d.ts:5 Accessors connecting get connecting( ) : boolean Methods off off( event: string , listener: any ) : void Parameters event: string listener: any Returns void on on( event: string , listener: any ) : void Parameters event: string listener: any Returns void once once( event: string , listener: any ) : void Parameters event: string listener: any Returns void open open( url?: string ) : Promise < void > Parameters Returns Promise < void > remove Listener remove Listener( event: string , listener: any ) : void Parameters event: string listener: any Returns void send Parameters Returns Promise < void > Legend Namespace Variable Function Function with type parameter Type alias Type alias with type parameter Interface Interface with type parameter Settings Theme OS Light Dark
\ No newline at end of file
diff --git a/docs/interfaces/_injectivelabs_sdk_ts.internal.PubKey.html b/docs/interfaces/_injectivelabs_sdk_ts.internal.PubKey.html
deleted file mode 100644
index f345ee246..000000000
--- a/docs/interfaces/_injectivelabs_sdk_ts.internal.PubKey.html
+++ /dev/null
@@ -1 +0,0 @@
-Pubkey | API Reference | Injective - Powering the future of decentralized finance. Properties Readonly typetype: string
Defined in node_modules/@cosmjs/amino/build/pubkeys.d.ts:2 Readonly valuevalue: any
Defined in node_modules/@cosmjs/amino/build/pubkeys.d.ts:3 Legend Namespace Variable Function Function with type parameter Type alias Type alias with type parameter Interface Interface with type parameter Settings Theme OS Light Dark
\ No newline at end of file
diff --git a/packages/exceptions/CHANGELOG.md b/packages/exceptions/CHANGELOG.md
index 12742ec94..240543322 100644
--- a/packages/exceptions/CHANGELOG.md
+++ b/packages/exceptions/CHANGELOG.md
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [1.14.12](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/exceptions@1.14.12-beta.0...@injectivelabs/exceptions@1.14.12) (2024-06-18)
+
+**Note:** Version bump only for package @injectivelabs/exceptions
+
## [1.14.11](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/exceptions@1.14.11-beta.9...@injectivelabs/exceptions@1.14.11) (2024-06-10)
**Note:** Version bump only for package @injectivelabs/exceptions
diff --git a/packages/exceptions/package.json b/packages/exceptions/package.json
index 133640ecb..f1fe03464 100644
--- a/packages/exceptions/package.json
+++ b/packages/exceptions/package.json
@@ -1,7 +1,7 @@
{
"name": "@injectivelabs/exceptions",
"description": "List of exceptions that can be reused throughout Injective's projects.",
- "version": "1.14.12-beta.0",
+ "version": "1.14.13-beta.0",
"sideEffects": false,
"license": "Apache-2.0",
"types": "dist/cjs/index.d.ts",
@@ -33,7 +33,7 @@
},
"dependencies": {
"@injectivelabs/grpc-web": "^0.0.1",
- "@injectivelabs/ts-types": "^1.14.12-beta.0",
+ "@injectivelabs/ts-types": "^1.14.13-beta.0",
"http-status-codes": "^2.2.0",
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
diff --git a/packages/networks/CHANGELOG.md b/packages/networks/CHANGELOG.md
index b4d787c6d..78e1393da 100644
--- a/packages/networks/CHANGELOG.md
+++ b/packages/networks/CHANGELOG.md
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [1.14.12](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/networks@1.14.12-beta.0...@injectivelabs/networks@1.14.12) (2024-06-18)
+
+**Note:** Version bump only for package @injectivelabs/networks
+
## [1.14.11](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/networks@1.14.11-beta.13...@injectivelabs/networks@1.14.11) (2024-06-10)
**Note:** Version bump only for package @injectivelabs/networks
diff --git a/packages/networks/package.json b/packages/networks/package.json
index 72fa80d90..d1da1ba3c 100644
--- a/packages/networks/package.json
+++ b/packages/networks/package.json
@@ -1,7 +1,7 @@
{
"name": "@injectivelabs/networks",
"description": "Endpoints, networks, etc. Can be reused throughout Injective's projects.",
- "version": "1.14.12-beta.0",
+ "version": "1.14.13-beta.0",
"sideEffects": false,
"license": "Apache-2.0",
"author": {
@@ -32,9 +32,9 @@
"start": "node dist/index.js"
},
"dependencies": {
- "@injectivelabs/exceptions": "^1.14.12-beta.0",
- "@injectivelabs/ts-types": "^1.14.12-beta.0",
- "@injectivelabs/utils": "^1.14.12-beta.0",
+ "@injectivelabs/exceptions": "^1.14.13-beta.0",
+ "@injectivelabs/ts-types": "^1.14.13-beta.0",
+ "@injectivelabs/utils": "^1.14.13-beta.0",
"link-module-alias": "^1.2.0",
"shx": "^0.3.2"
},
diff --git a/packages/sdk-ts/CHANGELOG.md b/packages/sdk-ts/CHANGELOG.md
index 8c244ce0f..6737989ad 100644
--- a/packages/sdk-ts/CHANGELOG.md
+++ b/packages/sdk-ts/CHANGELOG.md
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [1.14.12](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/sdk-ts@1.14.12-beta.7...@injectivelabs/sdk-ts@1.14.12) (2024-06-18)
+
+**Note:** Version bump only for package @injectivelabs/sdk-ts
+
## [1.14.11](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/sdk-ts@1.14.11-beta.88...@injectivelabs/sdk-ts@1.14.11) (2024-06-10)
**Note:** Version bump only for package @injectivelabs/sdk-ts
diff --git a/packages/sdk-ts/package.json b/packages/sdk-ts/package.json
index e83c3e7aa..361b4937c 100644
--- a/packages/sdk-ts/package.json
+++ b/packages/sdk-ts/package.json
@@ -1,7 +1,7 @@
{
"name": "@injectivelabs/sdk-ts",
"description": "SDK in TypeScript for building Injective applications in a browser, node, and react native environment.",
- "version": "1.14.12-beta.7",
+ "version": "1.14.13-beta.5",
"sideEffects": false,
"license": "Apache-2.0",
"author": {
@@ -39,16 +39,16 @@
"@ethersproject/bytes": "^5.7.0",
"@injectivelabs/core-proto-ts": "^0.0.21",
"@injectivelabs/dmm-proto-ts": "1.0.20",
- "@injectivelabs/exceptions": "^1.14.12-beta.0",
+ "@injectivelabs/exceptions": "^1.14.13-beta.0",
"@injectivelabs/grpc-web": "^0.0.1",
"@injectivelabs/grpc-web-node-http-transport": "^0.0.2",
"@injectivelabs/grpc-web-react-native-transport": "^0.0.2",
"@injectivelabs/indexer-proto-ts": "1.11.42",
"@injectivelabs/mito-proto-ts": "1.0.65",
- "@injectivelabs/networks": "^1.14.12-beta.0",
- "@injectivelabs/test-utils": "^1.14.6-beta.0",
- "@injectivelabs/ts-types": "^1.14.12-beta.0",
- "@injectivelabs/utils": "^1.14.12-beta.0",
+ "@injectivelabs/networks": "^1.14.13-beta.0",
+ "@injectivelabs/test-utils": "^1.14.13-beta.0",
+ "@injectivelabs/ts-types": "^1.14.13-beta.0",
+ "@injectivelabs/utils": "^1.14.13-beta.0",
"@metamask/eth-sig-util": "^4.0.0",
"@noble/curves": "^1.4.0",
"axios": "^1.6.4",
@@ -56,7 +56,7 @@
"bip39": "^3.0.4",
"cosmjs-types": "^0.9.0",
"ethereumjs-util": "^7.1.4",
- "ethers": "^5.7.2",
+ "ethers": "^6.5.1",
"google-protobuf": "^3.21.0",
"graphql": "^16.3.0",
"http-status-codes": "^2.2.0",
diff --git a/packages/sdk-ts/src/core/accounts/PrivateKey.spec.ts b/packages/sdk-ts/src/core/accounts/PrivateKey.spec.ts
index 5b5f32c3e..215da81e0 100644
--- a/packages/sdk-ts/src/core/accounts/PrivateKey.spec.ts
+++ b/packages/sdk-ts/src/core/accounts/PrivateKey.spec.ts
@@ -1,26 +1,71 @@
import { generateArbitrarySignDoc } from '../modules'
import { PrivateKey } from './PrivateKey'
-const privateKey =
- 'f9db9bf330e23cb7839039e944adef6e9df447b90b503d5b4464c90bea9022f3'
+const pk = 'f9db9bf330e23cb7839039e944adef6e9df447b90b503d5b4464c90bea9022f3'
+const seedPhase = process.env.TEST_SEED_PHASE as string
describe('PrivateKey', () => {
- it('returns the correct PublicKey is derived from a private key', () => {
- const publicKey = PrivateKey.fromPrivateKey(privateKey)
+ it('returns the correct address derived from a mnemonic', () => {
+ const privateKey = PrivateKey.fromMnemonic(seedPhase)
- expect(publicKey.toPublicKey().toBase64()).toEqual(
+ expect(privateKey.toBech32()).toEqual(
+ 'inj1u3f7yuwl8mkd88ryzdhxt6kt90a60rgl0nmxyq',
+ )
+ })
+
+ it('returns the correct PublicKey derived from a private key', () => {
+ const privateKey = PrivateKey.fromHex(pk)
+
+ expect(privateKey.toPublicKey().toBase64()).toEqual(
'A13cTVZCuTg+Lwh7LuiLcgf2KG68nzEOnfFAbszCwxgT',
)
})
- it('returns the correct PublicKey is derived from a private key starting with 0x', () => {
- const publicKey = PrivateKey.fromPrivateKey('0x' + privateKey)
+ it('returns the correct PublicKey derived from a private key starting with 0x', () => {
+ const privateKey = PrivateKey.fromHex('0x' + pk)
- expect(publicKey.toPublicKey().toBase64()).toEqual(
+ expect(privateKey.toPublicKey().toBase64()).toEqual(
'A13cTVZCuTg+Lwh7LuiLcgf2KG68nzEOnfFAbszCwxgT',
)
})
+ it('returns true when verifying signature for a particular EIP712', () => {
+ const expectedSignature =
+ 'e75db7f206927afd916b1423ed04fca37d2ac19662b220edc7d14f164b3af8f4727bb0f5b1f1372fd25675aebed92a5467cc55d2f38774a794a14bc59212c7d41c'
+ const eip712 = {
+ types: {
+ EIP712Domain: [
+ { name: 'name', type: 'string' },
+ { name: 'version', type: 'string' },
+ { name: 'chainId', type: 'uint256' },
+ { name: 'verifyingContract', type: 'address' },
+ { name: 'salt', type: 'string' },
+ ],
+ Tx: [
+ { name: 'context', type: 'string' },
+ { name: 'msgs', type: 'string' },
+ ],
+ },
+ primaryType: 'Tx',
+ domain: {
+ name: 'Injective Web3',
+ version: '1.0.0',
+ chainId: '0xaa36a7',
+ verifyingContract: '0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC',
+ salt: '0',
+ },
+ message: {
+ context:
+ '{"account_number":17,"chain_id":"injective-888","fee":{"amount":[{"denom":"inj","amount":"71101500000000"}],"gas":142203,"payer":"inj17gkuet8f6pssxd8nycm3qr9d9y699rupv6397z"},"memo":"","sequence":21979,"timeout_height":30038262}',
+ msgs: '[{"@type":"/injective.exchange.v1beta1.MsgCreateSpotMarketOrder","sender":"inj1hkhdaj2a2clmq5jq6mspsggqs32vynpk228q3r","order":{"market_id":"0x0611780ba69656949525013d947713300f56c37b6175e02f26bffa495c3208fe","order_info":{"subaccount_id":"0xbdaedec95d563fb05240d6e01821008454c24c36000000000000000000000000","fee_recipient":"inj1jv65s3grqf6v6jl3dp4t6c9t9rk99cd8dkncm8","price":"0.000000000024039000","quantity":"41000000000000000.000000000000000000","cid":""},"order_type":"BUY","trigger_price":"0.000000000000000000"}}]',
+ },
+ }
+ const privateKey = PrivateKey.fromHex(pk)
+ const signature = privateKey.signTypedData(eip712)
+
+ expect(Buffer.from(signature).toString('hex')).toEqual(expectedSignature)
+ })
+
it('returns true when verifying signature for a public key and eip712', () => {
const signature =
'0xe75db7f206927afd916b1423ed04fca37d2ac19662b220edc7d14f164b3af8f4727bb0f5b1f1372fd25675aebed92a5467cc55d2f38774a794a14bc59212c7d41c'
@@ -69,17 +114,20 @@ describe('PrivateKey', () => {
})
it('returns true when verifying arbitrary message', async () => {
- const pk = PrivateKey.fromHex(privateKey)
+ const privateKey = PrivateKey.fromHex(pk)
const message = 'testing ADR-36'
- const { signDocBuff } = generateArbitrarySignDoc(message, pk.toBech32())
- const signature = await pk.sign(signDocBuff)
+ const { signDocBuff } = generateArbitrarySignDoc(
+ message,
+ privateKey.toBech32(),
+ )
+ const signature = await privateKey.sign(signDocBuff)
expect(
PrivateKey.verifyArbitrarySignature({
signature: Buffer.from(signature).toString('hex'),
signDoc: signDocBuff,
- publicKey: pk.toPublicKey().toHex(),
+ publicKey: privateKey.toPublicKey().toHex(),
}),
).toBe(true)
})
diff --git a/packages/sdk-ts/src/core/accounts/PrivateKey.ts b/packages/sdk-ts/src/core/accounts/PrivateKey.ts
index 7419e728d..d2881f85d 100644
--- a/packages/sdk-ts/src/core/accounts/PrivateKey.ts
+++ b/packages/sdk-ts/src/core/accounts/PrivateKey.ts
@@ -2,7 +2,6 @@ import { generateMnemonic } from 'bip39'
import { Wallet } from 'ethers'
import secp256k1 from 'secp256k1'
import keccak256 from 'keccak256'
-import { DEFAULT_DERIVATION_PATH } from '../../utils/constants'
import { PublicKey } from './PublicKey'
import { Address } from './Address'
import * as BytesUtils from '@ethersproject/bytes'
@@ -50,11 +49,8 @@ export class PrivateKey {
* @param {string|undefined} path the HD path that follows the BIP32 standard (optional)
* @returns {PrivateKey} Initialized PrivateKey object
*/
- static fromMnemonic(
- words: string,
- path: string | undefined = DEFAULT_DERIVATION_PATH,
- ): PrivateKey {
- return new PrivateKey(Wallet.fromMnemonic(words, path))
+ static fromMnemonic(words: string): PrivateKey {
+ return new PrivateKey(new Wallet(Wallet.fromPhrase(words).signingKey))
}
/**
@@ -83,7 +79,9 @@ export class PrivateKey {
? Buffer.from(privateKeyHex.toString(), 'hex')
: privateKey
- return new PrivateKey(new Wallet(privateKeyBuff))
+ return new PrivateKey(
+ new Wallet(Buffer.from(privateKeyBuff).toString('hex')),
+ )
}
/**
@@ -105,7 +103,7 @@ export class PrivateKey {
}
/**
- * Return a hex representation of signing key.
+ * Return the hex address associated with this private key.
* @returns {string}
*/
toHex(): string {
@@ -135,11 +133,11 @@ export class PrivateKey {
* @param {string} messageBytes: the message that will be hashed and signed, a Buffer made of bytes
* @returns {Uint8Array} a signature of this private key over the given message
*/
- async sign(messageBytes: Buffer): Promise {
+ sign(messageBytes: Buffer): Uint8Array {
const { wallet } = this
const msgHash = keccak256(messageBytes)
- const signature = await wallet._signingKey().signDigest(msgHash)
+ const signature = wallet.signingKey.sign(msgHash)
const splitSignature = BytesUtils.splitSignature(signature)
return BytesUtils.arrayify(
@@ -152,7 +150,7 @@ export class PrivateKey {
* @param {Buffer} messageBytes: the message that will be hashed and signed, a Buffer made of bytes
* @returns {Uint8Array} a signature of this private key over the given message
*/
- async signEcda(messageBytes: Buffer): Promise {
+ signEcda(messageBytes: Buffer): Uint8Array {
const { wallet } = this
const msgHash = keccak256(messageBytes)
@@ -170,10 +168,10 @@ export class PrivateKey {
* @param {string} messageHashedBytes: the message that will be signed, a Buffer made of bytes
* @returns {Uint8Array} a signature of this private key over the given message
*/
- async signHashed(messageHashedBytes: Buffer): Promise {
+ signHashed(messageHashedBytes: Buffer): Uint8Array {
const { wallet } = this
- const signature = await wallet._signingKey().signDigest(messageHashedBytes)
+ const signature = wallet.signingKey.sign(messageHashedBytes)
const splitSignature = BytesUtils.splitSignature(signature)
return BytesUtils.arrayify(
@@ -186,7 +184,7 @@ export class PrivateKey {
* @param {Buffer} messageHashedBytes: the message that will be signed, a Buffer made of bytes
* @returns {Uint8Array} a signature of this private key over the given message
*/
- async signHashedEcda(messageHashedBytes: Buffer): Promise {
+ signHashedEcda(messageHashedBytes: Buffer): Uint8Array {
const { wallet } = this
const privateKeyHex = wallet.privateKey.startsWith('0x')
@@ -203,7 +201,7 @@ export class PrivateKey {
* @param {Buffer} eip712Data: the typed data that will be hashed and signed, a Buffer made of bytes
* @returns {Uint8Array} a signature of this private key over the given message
*/
- async signTypedData(eip712Data: any): Promise {
+ signTypedData(eip712Data: any): Uint8Array {
const { wallet } = this
const privateKeyHex = wallet.privateKey.startsWith('0x')
@@ -223,7 +221,7 @@ export class PrivateKey {
* @param {Buffer} eip712Data: the typed data that will be signed, a Buffer made of bytes
* @returns {Uint8Array} a signature of this private key over the given message
*/
- async signHashedTypedData(eip712Data: Buffer): Promise {
+ signHashedTypedData(eip712Data: Buffer): Uint8Array {
const { wallet } = this
const privateKeyHex = wallet.privateKey.startsWith('0x')
diff --git a/packages/sdk-ts/src/core/accounts/PublicKey.ts b/packages/sdk-ts/src/core/accounts/PublicKey.ts
index c30aa86fd..24b0d2335 100644
--- a/packages/sdk-ts/src/core/accounts/PublicKey.ts
+++ b/packages/sdk-ts/src/core/accounts/PublicKey.ts
@@ -53,6 +53,10 @@ export class PublicKey {
return Buffer.from(this.toPubKeyBytes()).toString('hex')
}
+ /**
+ * Convert the public key to a pubkey in bech32 format.
+ * Note: this does not convert the public key to an address.
+ */
public toBech32(): string {
return bech32.encode(
BECH32_PUBKEY_ACC_PREFIX,
diff --git a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchCancelSpotOrders.spec.ts b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchCancelSpotOrders.spec.ts
index 0b3e0ef97..028a3f61e 100644
--- a/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchCancelSpotOrders.spec.ts
+++ b/packages/sdk-ts/src/core/modules/exchange/msgs/MsgBatchCancelSpotOrders.spec.ts
@@ -1,6 +1,11 @@
import MsgBatchCancelSpotOrders from './MsgBatchCancelSpotOrders'
import { mockFactory } from '@injectivelabs/test-utils'
+// import { Network, getNetworkEndpoints } from '@injectivelabs/networks'
import snakecaseKeys from 'snakecase-keys'
+// import { getEthereumAddress } from '../../../../utils/address'
+// import { IndexerGrpcTransactionApi } from '../../../../client'
+// import { DEFAULT_GAS_LIMIT } from '@injectivelabs/utils'
+// import { EthereumChainId } from '@injectivelabs/ts-types'
const params: MsgBatchCancelSpotOrders['params'] = {
injectiveAddress: mockFactory.injectiveAddress,
@@ -100,4 +105,28 @@ describe('MsgBatchCancelSpotOrders', () => {
...protoParamsAmino,
})
})
+
+ // it('generates correct EIP712 compared to the chain', async () => {
+ // const web3 = message.toWeb3()
+ // const endpoints = getNetworkEndpoints(Network.TestnetSentry)
+ // const transactionApi = new IndexerGrpcTransactionApi(
+ // endpoints.web3gw || endpoints.indexer,
+ // )
+
+ // const txResponse = await transactionApi.prepareTxRequest({
+ // memo: '',
+ // message: web3,
+ // address: getEthereumAddress(mockFactory.injectiveAddress),
+ // chainId: EthereumChainId.Sepolia,
+ // gasLimit: DEFAULT_GAS_LIMIT,
+ // estimateGas: false,
+ // })
+
+ // console.log(txResponse.data)
+
+ // expect(web3).toStrictEqual({
+ // '@type': protoType,
+ // ...protoParamsAmino,
+ // })
+ // })
})
diff --git a/packages/sdk-ts/src/core/modules/ibc/msgs/MsgTransfer.ts b/packages/sdk-ts/src/core/modules/ibc/msgs/MsgTransfer.ts
index b37eb5c16..397254809 100644
--- a/packages/sdk-ts/src/core/modules/ibc/msgs/MsgTransfer.ts
+++ b/packages/sdk-ts/src/core/modules/ibc/msgs/MsgTransfer.ts
@@ -2,8 +2,8 @@ import { MsgBase } from '../../MsgBase'
import snakecaseKeys, { SnakeCaseKeys } from 'snakecase-keys'
import {
CosmosBaseV1Beta1Coin,
- IbcApplicationsTransferV1Tx,
IbcCoreClientV1Client,
+ IbcApplicationsTransferV1Tx,
} from '@injectivelabs/core-proto-ts'
export declare namespace MsgTransfer {
diff --git a/packages/sdk-ts/src/core/modules/ibc/msgs/MsgTransferCosmjs.ts b/packages/sdk-ts/src/core/modules/ibc/msgs/MsgTransferCosmjs.ts
index 6b2d6607b..615776f6d 100644
--- a/packages/sdk-ts/src/core/modules/ibc/msgs/MsgTransferCosmjs.ts
+++ b/packages/sdk-ts/src/core/modules/ibc/msgs/MsgTransferCosmjs.ts
@@ -1,5 +1,11 @@
-import { MsgTransferEncodeObject } from '@cosmjs/stargate'
+// import { MsgTransferEncodeObject } from '@cosmjs/stargate'
+import snakecaseKeys, { SnakeCaseKeys } from 'snakecase-keys'
import { MsgTransfer as BaseMsgTransferCosmjs } from 'cosmjs-types/ibc/applications/transfer/v1/tx'
+import {
+ CosmosBaseV1Beta1Coin,
+ IbcCoreClientV1Client,
+ IbcApplicationsTransferV1Tx,
+} from '@injectivelabs/core-proto-ts'
export declare namespace MsgTransferCosmjs {
export interface Params {
@@ -38,7 +44,32 @@ export default class MsgTransferCosmjs {
}
public toProto() {
- throw new Error('Method not implemented.')
+ const { params } = this
+
+ const token = CosmosBaseV1Beta1Coin.Coin.create()
+ token.denom = params.amount.denom
+ token.amount = params.amount.amount
+
+ const message = IbcApplicationsTransferV1Tx.MsgTransfer.create()
+ message.receiver = params.receiver
+ message.sender = params.sender
+ message.sourceChannel = params.channelId
+ message.sourcePort = params.port
+ message.token = token
+
+ if (params.height) {
+ const timeoutHeight = IbcCoreClientV1Client.Height.create()
+ timeoutHeight.revisionHeight = params.height.revisionHeight.toString()
+ timeoutHeight.revisionNumber = params.height.revisionNumber.toString()
+
+ message.timeoutHeight = timeoutHeight
+ }
+
+ if (params.timeout) {
+ message.timeoutTimestamp = params.timeout.toString()
+ }
+
+ return BaseMsgTransferCosmjs.fromJSON(message)
}
public toData() {
@@ -46,34 +77,39 @@ export default class MsgTransferCosmjs {
}
public toAmino() {
- const { params } = this
-
- const transferMsg: MsgTransferEncodeObject = {
- typeUrl: '/ibc.applications.transfer.v1.MsgTransfer',
- value: BaseMsgTransferCosmjs.fromPartial({
- sourcePort: params.port,
- sourceChannel: params.channelId,
- sender: params.sender,
- receiver: params.receiver,
- token: params.amount,
- timeoutHeight: params.height
- ? {
- revisionHeight: BigInt(params.height.revisionHeight),
- revisionNumber: BigInt(params.height.revisionNumber),
- }
- : undefined,
- timeoutTimestamp: params.timeout ? BigInt(params.timeout) : undefined,
- }),
+ const proto = this.toProto()
+ const message = {
+ ...snakecaseKeys(proto),
}
- return transferMsg
+ return {
+ type: 'cosmos-sdk/MsgTransfer',
+ value: {
+ ...message,
+ } as unknown as SnakeCaseKeys,
+ }
}
public toWeb3() {
- throw new Error('Method not implemented.')
+ const amino = this.toAmino()
+ const { value } = amino
+
+ return {
+ '@type': '/ibc.applications.transfer.v1.MsgTransfer',
+ ...value,
+ }
}
public toDirectSign() {
- throw new Error('Method not implemented.')
+ const proto = this.toProto()
+
+ return {
+ type: '/ibc.applications.transfer.v1.MsgTransfer',
+ message: proto,
+ }
+ }
+
+ public toBinary(): Uint8Array {
+ return BaseMsgTransferCosmjs.encode(this.toProto()).finish()
}
}
diff --git a/packages/sdk-ts/src/core/modules/tx/api/TxGrpcApi.ts b/packages/sdk-ts/src/core/modules/tx/api/TxGrpcApi.ts
index 7e85f9c51..2963bfd04 100644
--- a/packages/sdk-ts/src/core/modules/tx/api/TxGrpcApi.ts
+++ b/packages/sdk-ts/src/core/modules/tx/api/TxGrpcApi.ts
@@ -9,10 +9,10 @@ import {
GeneralException,
} from '@injectivelabs/exceptions'
import {
- DEFAULT_TX_BLOCK_INCLUSION_TIMEOUT_IN_MS,
+ BigNumberInBase,
DEFAULT_BLOCK_TIME_IN_SECONDS,
DEFAULT_BLOCK_TIMEOUT_HEIGHT,
- BigNumberInBase,
+ DEFAULT_TX_BLOCK_INCLUSION_TIMEOUT_IN_MS,
} from '@injectivelabs/utils'
import { TxResponse } from '../types/tx'
import BaseGrpcWebConsumer from '../../../../client/base/BaseGrpcWebConsumer'
diff --git a/packages/sdk-ts/src/core/modules/tx/api/TxRestApi.ts b/packages/sdk-ts/src/core/modules/tx/api/TxRestApi.ts
index bfa5abc0b..634774cd3 100644
--- a/packages/sdk-ts/src/core/modules/tx/api/TxRestApi.ts
+++ b/packages/sdk-ts/src/core/modules/tx/api/TxRestApi.ts
@@ -1,9 +1,9 @@
import {
HttpClient,
- DEFAULT_BLOCK_TIME_IN_SECONDS,
- DEFAULT_TX_BLOCK_INCLUSION_TIMEOUT_IN_MS,
BigNumberInBase,
DEFAULT_BLOCK_TIMEOUT_HEIGHT,
+ DEFAULT_BLOCK_TIME_IN_SECONDS,
+ DEFAULT_TX_BLOCK_INCLUSION_TIMEOUT_IN_MS,
} from '@injectivelabs/utils'
import {
BroadcastMode,
diff --git a/packages/sdk-ts/src/core/modules/tx/broadcaster/MsgBroadcasterWithPk.spec.ts b/packages/sdk-ts/src/core/modules/tx/broadcaster/MsgBroadcasterWithPk.spec.ts
index a7e21fe1a..70c59454c 100644
--- a/packages/sdk-ts/src/core/modules/tx/broadcaster/MsgBroadcasterWithPk.spec.ts
+++ b/packages/sdk-ts/src/core/modules/tx/broadcaster/MsgBroadcasterWithPk.spec.ts
@@ -57,4 +57,29 @@ describe('MsgBroadcasterWithPk', () => {
expect(response.txHash).toBeDefined()
}, 60000)
+
+ test('simulates a transaction', async () => {
+ const privateKey = PrivateKey.fromHex(
+ process.env.TEST_PRIVATE_KEY as string,
+ )
+
+ const network = Network.Devnet
+ const injectiveAddress = privateKey.toBech32()
+
+ const message = MsgSend.fromJSON({
+ srcInjectiveAddress: injectiveAddress,
+ dstInjectiveAddress: injectiveAddress,
+ amount: {
+ amount: '1',
+ denom: 'inj',
+ },
+ })
+
+ const response = await new MsgBroadcasterWithPk({
+ network,
+ privateKey,
+ }).simulate({ msgs: message })
+
+ expect(response.result).toBeDefined()
+ }, 60000)
})
diff --git a/packages/sdk-ts/src/core/modules/tx/broadcaster/MsgBroadcasterWithPk.ts b/packages/sdk-ts/src/core/modules/tx/broadcaster/MsgBroadcasterWithPk.ts
index 2ade1987a..060f5d822 100644
--- a/packages/sdk-ts/src/core/modules/tx/broadcaster/MsgBroadcasterWithPk.ts
+++ b/packages/sdk-ts/src/core/modules/tx/broadcaster/MsgBroadcasterWithPk.ts
@@ -175,7 +175,7 @@ export class MsgBroadcasterWithPk {
const publicKey = privateKey.toPublicKey()
const accountDetails = await new ChainGrpcAuthApi(
endpoints.grpc,
- ).fetchAccount(publicKey.toBech32())
+ ).fetchAccount(publicKey.toAddress().toBech32())
const { baseAccount } = accountDetails
/** Block Details */
diff --git a/packages/sdk-ts/src/core/modules/wasm/msgs/MsgInstantiateContract.ts b/packages/sdk-ts/src/core/modules/wasm/msgs/MsgInstantiateContract.ts
index 32bd120f0..608f2a086 100644
--- a/packages/sdk-ts/src/core/modules/wasm/msgs/MsgInstantiateContract.ts
+++ b/packages/sdk-ts/src/core/modules/wasm/msgs/MsgInstantiateContract.ts
@@ -40,17 +40,17 @@ export default class MsgInstantiateContract extends MsgBase<
const message = CosmwasmWasmV1Tx.MsgInstantiateContract.create()
- message.msg = fromUtf8(JSON.stringify(params.msg))
message.sender = params.sender
message.admin = params.admin
message.codeId = params.codeId.toString()
message.label = params.label
+ message.msg = fromUtf8(JSON.stringify(params.msg))
if (params.amount) {
const funds = CosmosBaseV1Beta1Coin.Coin.create()
- funds.amount = params.amount.amount
funds.denom = params.amount.denom
+ funds.amount = params.amount.amount
message.funds = [funds]
}
diff --git a/packages/test-utils/CHANGELOG.md b/packages/test-utils/CHANGELOG.md
index 1112f953f..146019711 100644
--- a/packages/test-utils/CHANGELOG.md
+++ b/packages/test-utils/CHANGELOG.md
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [1.14.6](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/test-utils@1.14.6-beta.0...@injectivelabs/test-utils@1.14.6) (2024-06-18)
+
+**Note:** Version bump only for package @injectivelabs/test-utils
+
## [1.14.5](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/test-utils@1.14.5-beta.2...@injectivelabs/test-utils@1.14.5) (2024-06-10)
**Note:** Version bump only for package @injectivelabs/test-utils
diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json
index 08e3bfc3e..52520b7f4 100644
--- a/packages/test-utils/package.json
+++ b/packages/test-utils/package.json
@@ -1,7 +1,7 @@
{
"name": "@injectivelabs/test-utils",
"description": "List of test-utils and helper functions that can be reused throughout Injective's projects.",
- "version": "1.14.6-beta.0",
+ "version": "1.14.13-beta.0",
"sideEffects": false,
"author": {
"name": "InjectiveLabs",
diff --git a/packages/ts-types/CHANGELOG.md b/packages/ts-types/CHANGELOG.md
index 3b6c2a47b..6818bd387 100644
--- a/packages/ts-types/CHANGELOG.md
+++ b/packages/ts-types/CHANGELOG.md
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [1.14.12](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/ts-types@1.14.12-beta.0...@injectivelabs/ts-types@1.14.12) (2024-06-18)
+
+**Note:** Version bump only for package @injectivelabs/ts-types
+
## [1.14.11](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/ts-types@1.14.11-beta.4...@injectivelabs/ts-types@1.14.11) (2024-06-10)
**Note:** Version bump only for package @injectivelabs/ts-types
diff --git a/packages/ts-types/package.json b/packages/ts-types/package.json
index 977ff4b40..6f3f44db2 100644
--- a/packages/ts-types/package.json
+++ b/packages/ts-types/package.json
@@ -1,7 +1,7 @@
{
"name": "@injectivelabs/ts-types",
"description": "List of types that can be reused throughout Injective's projects.",
- "version": "1.14.12-beta.0",
+ "version": "1.14.13-beta.0",
"sideEffects": false,
"license": "Apache-2.0",
"types": "dist/cjs/index.d.ts",
diff --git a/packages/ts-types/src/cosmos.ts b/packages/ts-types/src/cosmos.ts
index 60e84be88..e0127c965 100644
--- a/packages/ts-types/src/cosmos.ts
+++ b/packages/ts-types/src/cosmos.ts
@@ -29,6 +29,7 @@ export enum CosmosChainId {
Andromeda = 'andromeda-1',
Saga = 'ssc-1',
Neutron = 'neutron-1',
+ Fetch = 'fetchhub-4',
}
export enum TestnetCosmosChainId {
diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md
index 6cb64dd3b..7020f8da0 100644
--- a/packages/utils/CHANGELOG.md
+++ b/packages/utils/CHANGELOG.md
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [1.14.12](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/utils@1.14.12-beta.0...@injectivelabs/utils@1.14.12) (2024-06-18)
+
+**Note:** Version bump only for package @injectivelabs/utils
+
## [1.14.11](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/utils@1.14.11-beta.10...@injectivelabs/utils@1.14.11) (2024-06-10)
**Note:** Version bump only for package @injectivelabs/utils
diff --git a/packages/utils/package.json b/packages/utils/package.json
index 7512f1e52..d810846c6 100644
--- a/packages/utils/package.json
+++ b/packages/utils/package.json
@@ -1,7 +1,7 @@
{
"name": "@injectivelabs/utils",
"description": "List of utils and helper functions that can be reused throughout Injective's projects.",
- "version": "1.14.12-beta.0",
+ "version": "1.14.13-beta.0",
"sideEffects": false,
"author": {
"name": "InjectiveLabs",
@@ -32,8 +32,8 @@
"start": "node dist/index.js"
},
"dependencies": {
- "@injectivelabs/exceptions": "^1.14.12-beta.0",
- "@injectivelabs/ts-types": "^1.14.12-beta.0",
+ "@injectivelabs/exceptions": "^1.14.13-beta.0",
+ "@injectivelabs/ts-types": "^1.14.13-beta.0",
"axios": "^1.6.4",
"bignumber.js": "^9.0.1",
"http-status-codes": "^2.2.0",
diff --git a/packages/utils/src/constants.ts b/packages/utils/src/constants.ts
index 92023ccf7..bc3e1e77f 100644
--- a/packages/utils/src/constants.ts
+++ b/packages/utils/src/constants.ts
@@ -15,10 +15,10 @@ export const DEFAULT_BRIDGE_FEE_DENOM = 'inj'
export const DEFAULT_BRIDGE_FEE_PRICE = '160000000'
export const DEFAULT_BRIDGE_FEE_AMOUNT = '200000000000000'
-export const DEFAULT_BLOCK_TIMEOUT_HEIGHT = 90
-export const DEFAULT_BLOCK_TIME_IN_SECONDS = 2
+export const DEFAULT_BLOCK_TIMEOUT_HEIGHT = 120
+export const DEFAULT_BLOCK_TIME_IN_SECONDS = 0.7
export const DEFAULT_TX_BLOCK_INCLUSION_TIMEOUT_IN_MS =
- DEFAULT_BLOCK_TIMEOUT_HEIGHT * DEFAULT_BLOCK_TIME_IN_SECONDS * 1000
+ Math.floor(DEFAULT_BLOCK_TIMEOUT_HEIGHT * DEFAULT_BLOCK_TIME_IN_SECONDS * 1000)
export const DEFAULT_TIMESTAMP_TIMEOUT_MS = 60 * 1000 * 3
export const DEFAULT_STD_FEE = {
diff --git a/packages/wallet-ts/CHANGELOG.md b/packages/wallet-ts/CHANGELOG.md
index f45c3df1b..141b1abb6 100644
--- a/packages/wallet-ts/CHANGELOG.md
+++ b/packages/wallet-ts/CHANGELOG.md
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
+## [1.14.12](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/wallet-ts@1.14.12-beta.7...@injectivelabs/wallet-ts@1.14.12) (2024-06-18)
+
+**Note:** Version bump only for package @injectivelabs/wallet-ts
+
## [1.14.11](https://github.com/InjectiveLabs/injective-ts/compare/@injectivelabs/wallet-ts@1.14.11-beta.102...@injectivelabs/wallet-ts@1.14.11) (2024-06-10)
**Note:** Version bump only for package @injectivelabs/wallet-ts
diff --git a/packages/wallet-ts/package.json b/packages/wallet-ts/package.json
index 3fb91a5de..480ecbbfd 100644
--- a/packages/wallet-ts/package.json
+++ b/packages/wallet-ts/package.json
@@ -1,7 +1,7 @@
{
"name": "@injectivelabs/wallet-ts",
"description": "A convenient way to use and interact with different types of wallets on Injective.",
- "version": "1.14.12-beta.7",
+ "version": "1.14.13-beta.6",
"sideEffects": false,
"author": {
"name": "InjectiveLabs",
@@ -40,11 +40,11 @@
"@cosmostation/extension-client": "^0.1.15",
"@ethereumjs/common": "^3.1.1",
"@ethereumjs/tx": "^4.1.1",
- "@injectivelabs/exceptions": "^1.14.12-beta.0",
- "@injectivelabs/networks": "^1.14.12-beta.0",
- "@injectivelabs/sdk-ts": "^1.14.12-beta.7",
- "@injectivelabs/ts-types": "^1.14.12-beta.0",
- "@injectivelabs/utils": "^1.14.12-beta.0",
+ "@injectivelabs/exceptions": "^1.14.13-beta.0",
+ "@injectivelabs/networks": "^1.14.13-beta.0",
+ "@injectivelabs/sdk-ts": "^1.14.13-beta.5",
+ "@injectivelabs/ts-types": "^1.14.13-beta.0",
+ "@injectivelabs/utils": "^1.14.13-beta.0",
"@keplr-wallet/cosmos": "^0.12.71",
"@keplr-wallet/types": "^0.12.71",
"@ledgerhq/hw-app-cosmos": "^6.29.5",
@@ -61,7 +61,7 @@
"eip1193-provider": "^1.0.1",
"eth-sig-util": "^3.0.1",
"ethereumjs-util": "^7.1.0",
- "ethers": "^5.7.2",
+ "ethers": "^6.5.1",
"hdkey": "^2.0.1",
"link-module-alias": "^1.2.0",
"long": "^5.2.1",
diff --git a/packages/wallet-ts/src/strategies/wallet-strategy/WalletStrategy.ts b/packages/wallet-ts/src/strategies/wallet-strategy/WalletStrategy.ts
index bc9791dfd..35777b30a 100644
--- a/packages/wallet-ts/src/strategies/wallet-strategy/WalletStrategy.ts
+++ b/packages/wallet-ts/src/strategies/wallet-strategy/WalletStrategy.ts
@@ -155,7 +155,6 @@ export default class WalletStrategy {
}
public setWallet(wallet: Wallet) {
- this.disconnect()
this.wallet = wallet
}
diff --git a/packages/wallet-ts/src/utils/wallets/bitget/BitGet.ts b/packages/wallet-ts/src/utils/wallets/bitget/BitGet.ts
index 544177867..98a2381c7 100644
--- a/packages/wallet-ts/src/utils/wallets/bitget/BitGet.ts
+++ b/packages/wallet-ts/src/utils/wallets/bitget/BitGet.ts
@@ -12,7 +12,7 @@ export const getEthersProviderFromBitGet = async () => {
throw new WalletException(new Error('Please install BitGet Extension'))
}
- return new ethers.providers.Web3Provider(provider, 'any')
+ return new ethers.BrowserProvider(provider, 'any')
} catch (e) {
throw new WalletException(new Error('Please install BitGet Extension'))
}
diff --git a/packages/wallet-ts/src/utils/wallets/cosmos/endpoints.ts b/packages/wallet-ts/src/utils/wallets/cosmos/endpoints.ts
index 0073f6fbe..62916ca17 100644
--- a/packages/wallet-ts/src/utils/wallets/cosmos/endpoints.ts
+++ b/packages/wallet-ts/src/utils/wallets/cosmos/endpoints.ts
@@ -151,6 +151,11 @@ export const getEndpointsFromChainId = (
rpc: 'https://rpc.cosmos.directory/neutron',
rest: 'https://rest.cosmos.directory/neutron',
}
+ case CosmosChainId.Fetch:
+ return {
+ rpc: 'https://fetch-rpc.publicnode.com',
+ rest: 'https://fetch-rest.publicnode.com',
+ }
default:
throw new GeneralException(
new Error(`Endpoints for ${chainId} not found`),
diff --git a/packages/wallet-ts/src/utils/wallets/metamask/Metamask.ts b/packages/wallet-ts/src/utils/wallets/metamask/Metamask.ts
index b555c681c..466abdfd2 100644
--- a/packages/wallet-ts/src/utils/wallets/metamask/Metamask.ts
+++ b/packages/wallet-ts/src/utils/wallets/metamask/Metamask.ts
@@ -12,7 +12,7 @@ export const getEthersProviderFromMetamask = async () => {
throw new WalletException(new Error('Please install Metamask Extension'))
}
- return new ethers.providers.Web3Provider(provider, 'any')
+ return new ethers.BrowserProvider(provider, 'any')
} catch (e) {
throw new WalletException(new Error('Please install Metamask Extension'))
}
diff --git a/packages/wallet-ts/src/utils/wallets/okx/Okx.ts b/packages/wallet-ts/src/utils/wallets/okx/Okx.ts
index 3fdaca880..bc285d56a 100644
--- a/packages/wallet-ts/src/utils/wallets/okx/Okx.ts
+++ b/packages/wallet-ts/src/utils/wallets/okx/Okx.ts
@@ -12,7 +12,7 @@ export const getEthersProviderFromOkxWallet = async () => {
throw new WalletException(new Error('Please install OkxWallet Extension'))
}
- return new ethers.providers.Web3Provider(provider, 'any')
+ return new ethers.BrowserProvider(provider, 'any')
} catch (e) {
throw new WalletException(new Error('Please install OkxWallet Extension'))
}
diff --git a/tsconfig.json b/tsconfig.json
index 9462045d8..0dfabc2f7 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -21,20 +21,8 @@
"@injectivelabs/wallet-ts": [
"packages/wallet-ts"
],
- "@injectivelabs/contracts": [
- "packages/contracts"
- ],
- "@injectivelabs/tokens-metadata": [
- "packages/tokens-metadata"
- ],
"@injectivelabs/sdk-ts": [
"packages/sdk-ts"
- ],
- "@injectivelabs/sdk-ui-ts": [
- "packages/sdk-ui-ts"
- ],
- "@injectivelabs/bridge-ts": [
- "packages/bridge-ts"
]
}
}
diff --git a/yarn.lock b/yarn.lock
index e97234b2c..809593340 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2,6 +2,11 @@
# yarn lockfile v1
+"@adraffy/ens-normalize@1.10.1":
+ version "1.10.1"
+ resolved "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz#63430d04bd8c5e74f8d7d049338f1cd9d4f02069"
+ integrity sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==
+
"@ampproject/remapping@^2.1.0":
version "2.2.0"
resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d"
@@ -3110,6 +3115,13 @@
jsbi "^3.1.5"
sha.js "^2.4.11"
+"@noble/curves@1.2.0":
+ version "1.2.0"
+ resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35"
+ integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==
+ dependencies:
+ "@noble/hashes" "1.3.2"
+
"@noble/curves@1.3.0", "@noble/curves@^1.1.0", "@noble/curves@^1.2.0", "@noble/curves@~1.3.0":
version "1.3.0"
resolved "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz#01be46da4fd195822dab821e72f71bf4aeec635e"
@@ -3134,6 +3146,11 @@
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.2.0.tgz#a3150eeb09cc7ab207ebf6d7b9ad311a9bdbed12"
integrity sha512-FZfhjEDbT5GRswV3C6uvLPHMiVD6lQBmpoX5+eSiPaMTXte/IKqI5dykDxzZB/WBeK/CDuQRBWarPdi3FNY2zQ==
+"@noble/hashes@1.3.2":
+ version "1.3.2"
+ resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39"
+ integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==
+
"@noble/hashes@1.3.3", "@noble/hashes@^1.2.0", "@noble/hashes@^1.3.3", "@noble/hashes@~1.3.2":
version "1.3.3"
resolved "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz#39908da56a4adc270147bb07968bf3b16cfe1699"
@@ -5189,6 +5206,11 @@
resolved "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz#df929d1bb2eee5afdda598a41930fe50b43eaa6a"
integrity sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ==
+"@types/node@18.15.13":
+ version "18.15.13"
+ resolved "https://registry.npmjs.org/@types/node/-/node-18.15.13.tgz#f64277c341150c979e42b00e4ac289290c9df469"
+ integrity sha512-N+0kuo9KgrUQ1Sn/ifDXsvg0TTleP7rIy4zOBGECxAljqvqfqpTfzx0Q1NUedOixRMBfe2Whhb056a42cWs26Q==
+
"@types/node@^12.12.54":
version "12.20.55"
resolved "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240"
@@ -5972,6 +5994,11 @@ aes-js@3.0.0:
resolved "https://registry.npmjs.org/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d"
integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==
+aes-js@4.0.0-beta.5:
+ version "4.0.0-beta.5"
+ resolved "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz#8d2452c52adedebc3a3e28465d858c11ca315873"
+ integrity sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==
+
agent-base@6, agent-base@^6.0.2:
version "6.0.2"
resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77"
@@ -8885,7 +8912,7 @@ ethereumjs-util@^6.0.0, ethereumjs-util@^6.2.1:
ethjs-util "0.1.6"
rlp "^2.2.3"
-ethers@5.7.2, ethers@^5.7.2:
+ethers@5.7.2:
version "5.7.2"
resolved "https://registry.npmjs.org/ethers/-/ethers-5.7.2.tgz#3a7deeabbb8c030d4126b24f84e525466145872e"
integrity sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==
@@ -8921,6 +8948,19 @@ ethers@5.7.2, ethers@^5.7.2:
"@ethersproject/web" "5.7.1"
"@ethersproject/wordlists" "5.7.0"
+ethers@^6.5.1:
+ version "6.13.1"
+ resolved "https://registry.npmjs.org/ethers/-/ethers-6.13.1.tgz#2b9f9c7455cde9d38b30fe6589972eb083652961"
+ integrity sha512-hdJ2HOxg/xx97Lm9HdCWk949BfYqYWpyw4//78SiwOLgASyfrNszfMUNB2joKjvGUdwhHfaiMMFFwacVVoLR9A==
+ dependencies:
+ "@adraffy/ens-normalize" "1.10.1"
+ "@noble/curves" "1.2.0"
+ "@noble/hashes" "1.3.2"
+ "@types/node" "18.15.13"
+ aes-js "4.0.0-beta.5"
+ tslib "2.4.0"
+ ws "8.17.1"
+
ethjs-util@0.1.6, ethjs-util@^0.1.3, ethjs-util@^0.1.6:
version "0.1.6"
resolved "https://registry.npmjs.org/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536"
@@ -16206,6 +16246,11 @@ tslib@1.14.1, tslib@^1.8.1, tslib@^1.9.0:
resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
+tslib@2.4.0:
+ version "2.4.0"
+ resolved "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
+ integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==
+
tslib@^2, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.4.0:
version "2.4.1"
resolved "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e"
@@ -17028,6 +17073,11 @@ ws@7.4.6:
resolved "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c"
integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==
+ws@8.17.1:
+ version "8.17.1"
+ resolved "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b"
+ integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==
+
ws@^7, ws@^7.2.0, ws@^7.4.0, ws@^7.4.5, ws@^7.5.1:
version "7.5.9"
resolved "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591"