@injectivelabs/utils
Advanced tools
@@ -111,3 +111,3 @@ const require_constants = require('../constants-BFjeP4ow.cjs'); | ||
| //#region src/test-utils/msgs.ts | ||
| const prepareEip712 = ({ messages, gas = require_constants.DEFAULT_GAS_LIMIT, network = __injectivelabs_networks.Network.Mainnet, injectiveAddress: injectiveAddress$1 = mockFactory.injectiveAddress, ethereumAddress: ethereumAddress$1 = mockFactory.ethereumAddress, endpoints = {}, accountNumber = 1, sequence = 1, timeoutHeight = 999999999, memo = "" }) => { | ||
| const prepareEip712 = ({ messages, memo = "", granter = "", payer = "", sequence = 1, accountNumber = 1, endpoints = {}, gas = require_constants.DEFAULT_GAS_LIMIT, network = __injectivelabs_networks.Network.Mainnet, timeoutHeight = 999999999, ethereumAddress: ethereumAddress$1 = mockFactory.ethereumAddress }) => { | ||
| const chainInfo = (0, __injectivelabs_networks.getNetworkInfo)(network); | ||
@@ -137,3 +137,4 @@ const actualEndpoints = { | ||
| gas: gas.toString(), | ||
| payer: injectiveAddress$1 | ||
| ...granter && { granter }, | ||
| ...payer && { payer } | ||
| }, | ||
@@ -150,2 +151,3 @@ tx: { | ||
| ...eip712, | ||
| granter, | ||
| chainId: eip712.evmChainId, | ||
@@ -152,0 +154,0 @@ message: web3Msgs, |
@@ -7,22 +7,24 @@ import { ChainId, Coin, EvmChainId } from "@injectivelabs/ts-types"; | ||
| messages, | ||
| memo, | ||
| granter, | ||
| payer, | ||
| sequence, | ||
| accountNumber, | ||
| endpoints, | ||
| gas, | ||
| network, | ||
| injectiveAddress, | ||
| ethereumAddress, | ||
| endpoints, | ||
| accountNumber, | ||
| sequence, | ||
| timeoutHeight, | ||
| memo | ||
| ethereumAddress | ||
| }: { | ||
| ethereumAddress?: string; | ||
| messages: T; | ||
| memo?: string; | ||
| payer?: string; | ||
| granter?: string; | ||
| network?: Network; | ||
| gas?: number | string; | ||
| sequence?: number; | ||
| accountNumber?: number; | ||
| sequence?: number; | ||
| timeoutHeight?: number; | ||
| memo?: string; | ||
| gas?: number | string; | ||
| ethereumAddress?: string; | ||
| endpoints?: Partial<NetworkEndpoints>; | ||
| injectiveAddress?: string; | ||
| }) => { | ||
@@ -44,3 +46,4 @@ endpoints: NetworkEndpoints; | ||
| gas: string; | ||
| payer: string; | ||
| payer?: string; | ||
| granter?: string; | ||
| }; | ||
@@ -47,0 +50,0 @@ }; |
@@ -7,22 +7,24 @@ import { Network, NetworkEndpoints } from "@injectivelabs/networks"; | ||
| messages, | ||
| memo, | ||
| granter, | ||
| payer, | ||
| sequence, | ||
| accountNumber, | ||
| endpoints, | ||
| gas, | ||
| network, | ||
| injectiveAddress, | ||
| ethereumAddress, | ||
| endpoints, | ||
| accountNumber, | ||
| sequence, | ||
| timeoutHeight, | ||
| memo | ||
| ethereumAddress | ||
| }: { | ||
| ethereumAddress?: string; | ||
| messages: T; | ||
| memo?: string; | ||
| payer?: string; | ||
| granter?: string; | ||
| network?: Network; | ||
| gas?: number | string; | ||
| sequence?: number; | ||
| accountNumber?: number; | ||
| sequence?: number; | ||
| timeoutHeight?: number; | ||
| memo?: string; | ||
| gas?: number | string; | ||
| ethereumAddress?: string; | ||
| endpoints?: Partial<NetworkEndpoints>; | ||
| injectiveAddress?: string; | ||
| }) => { | ||
@@ -44,3 +46,4 @@ endpoints: NetworkEndpoints; | ||
| gas: string; | ||
| payer: string; | ||
| payer?: string; | ||
| granter?: string; | ||
| }; | ||
@@ -47,0 +50,0 @@ }; |
@@ -111,3 +111,3 @@ import { b as BigNumber_default, c as DEFAULT_GAS_LIMIT, l as DEFAULT_GAS_PRICE } from "../constants-BY74CT5-.js"; | ||
| //#region src/test-utils/msgs.ts | ||
| const prepareEip712 = ({ messages, gas = DEFAULT_GAS_LIMIT, network = Network.Mainnet, injectiveAddress: injectiveAddress$1 = mockFactory.injectiveAddress, ethereumAddress: ethereumAddress$1 = mockFactory.ethereumAddress, endpoints = {}, accountNumber = 1, sequence = 1, timeoutHeight = 999999999, memo = "" }) => { | ||
| const prepareEip712 = ({ messages, memo = "", granter = "", payer = "", sequence = 1, accountNumber = 1, endpoints = {}, gas = DEFAULT_GAS_LIMIT, network = Network.Mainnet, timeoutHeight = 999999999, ethereumAddress: ethereumAddress$1 = mockFactory.ethereumAddress }) => { | ||
| const chainInfo = getNetworkInfo(network); | ||
@@ -137,3 +137,4 @@ const actualEndpoints = { | ||
| gas: gas.toString(), | ||
| payer: injectiveAddress$1 | ||
| ...granter && { granter }, | ||
| ...payer && { payer } | ||
| }, | ||
@@ -150,2 +151,3 @@ tx: { | ||
| ...eip712, | ||
| granter, | ||
| chainId: eip712.evmChainId, | ||
@@ -152,0 +154,0 @@ message: web3Msgs, |
+4
-4
| { | ||
| "name": "@injectivelabs/utils", | ||
| "version": "1.20.11", | ||
| "version": "1.20.12", | ||
| "description": "List of utils and helper functions that can be reused throughout Injective's projects.", | ||
@@ -69,5 +69,5 @@ "license": "Apache-2.0", | ||
| "store2": "^2.14.4", | ||
| "@injectivelabs/networks": "1.20.11", | ||
| "@injectivelabs/exceptions": "1.20.11", | ||
| "@injectivelabs/ts-types": "1.20.11" | ||
| "@injectivelabs/exceptions": "1.20.12", | ||
| "@injectivelabs/networks": "1.20.12", | ||
| "@injectivelabs/ts-types": "1.20.12" | ||
| }, | ||
@@ -74,0 +74,0 @@ "publishConfig": { |
99181
0.06%2074
0.29%+ Added
+ Added
+ Added
- Removed
- Removed
- Removed