@injectivelabs/wallet-base 1.16.9 → 1.16.11-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,8 +2,17 @@ import { ChainId, EvmChainId, AccountAddress } from '@injectivelabs/ts-types';
2
2
  import type { TxRaw, TxResponse, AminoSignResponse, DirectSignResponse } from '@injectivelabs/sdk-ts';
3
3
  import { StdSignDoc } from '@keplr-wallet/types';
4
4
  import { WalletDeviceType, Wallet } from './enums.js';
5
+ import { OfflineSigner } from '@cosmjs/proto-signing';
5
6
  export type onAccountChangeCallback = (account: string | string[]) => void;
6
7
  export type onChainIdChangeCallback = () => void;
8
+ export type Eip1193Provider = {
9
+ request: (args: {
10
+ method: string;
11
+ params: any[];
12
+ }) => Promise<any>;
13
+ on: (event: string, listener: (...args: any[]) => void) => void;
14
+ removeListener: (event: string, listener: (...args: any[]) => void) => void;
15
+ };
7
16
  export type CosmosWalletAbstraction = {
8
17
  enableGasCheck?(chainId: ChainId): Promise<void> | void;
9
18
  disableGasCheck?(chainId: ChainId): Promise<void> | void;
@@ -194,6 +203,8 @@ export interface ConcreteWalletStrategy extends Omit<ConcreteCosmosWalletStrateg
194
203
  disconnect?(): Promise<void> | void;
195
204
  getCosmosWallet?(chainId: ChainId): CosmosWalletAbstraction;
196
205
  getWalletClient?<T>(): Promise<T>;
206
+ getEip1193Provider?(): Promise<Eip1193Provider>;
207
+ getOfflineSigner?(chainId: string): Promise<OfflineSigner>;
197
208
  }
198
209
  export interface WalletStrategy {
199
210
  strategies: ConcreteStrategiesArg;
@@ -234,5 +245,7 @@ export interface WalletStrategy {
234
245
  onChainIdChange(callback: onChainIdChangeCallback): Promise<void>;
235
246
  disconnect(): Promise<void>;
236
247
  getCosmosWallet?(chainId: ChainId): CosmosWalletAbstraction;
248
+ getEip1193Provider?(): Promise<Eip1193Provider>;
249
+ getOfflineSigner?(chainId: string): Promise<OfflineSigner>;
237
250
  }
238
251
  export { StdSignDoc };
@@ -2,8 +2,17 @@ import { ChainId, EvmChainId, AccountAddress } from '@injectivelabs/ts-types';
2
2
  import type { TxRaw, TxResponse, AminoSignResponse, DirectSignResponse } from '@injectivelabs/sdk-ts';
3
3
  import { StdSignDoc } from '@keplr-wallet/types';
4
4
  import { WalletDeviceType, Wallet } from './enums.js';
5
+ import { OfflineSigner } from '@cosmjs/proto-signing';
5
6
  export type onAccountChangeCallback = (account: string | string[]) => void;
6
7
  export type onChainIdChangeCallback = () => void;
8
+ export type Eip1193Provider = {
9
+ request: (args: {
10
+ method: string;
11
+ params: any[];
12
+ }) => Promise<any>;
13
+ on: (event: string, listener: (...args: any[]) => void) => void;
14
+ removeListener: (event: string, listener: (...args: any[]) => void) => void;
15
+ };
7
16
  export type CosmosWalletAbstraction = {
8
17
  enableGasCheck?(chainId: ChainId): Promise<void> | void;
9
18
  disableGasCheck?(chainId: ChainId): Promise<void> | void;
@@ -194,6 +203,8 @@ export interface ConcreteWalletStrategy extends Omit<ConcreteCosmosWalletStrateg
194
203
  disconnect?(): Promise<void> | void;
195
204
  getCosmosWallet?(chainId: ChainId): CosmosWalletAbstraction;
196
205
  getWalletClient?<T>(): Promise<T>;
206
+ getEip1193Provider?(): Promise<Eip1193Provider>;
207
+ getOfflineSigner?(chainId: string): Promise<OfflineSigner>;
197
208
  }
198
209
  export interface WalletStrategy {
199
210
  strategies: ConcreteStrategiesArg;
@@ -234,5 +245,7 @@ export interface WalletStrategy {
234
245
  onChainIdChange(callback: onChainIdChangeCallback): Promise<void>;
235
246
  disconnect(): Promise<void>;
236
247
  getCosmosWallet?(chainId: ChainId): CosmosWalletAbstraction;
248
+ getEip1193Provider?(): Promise<Eip1193Provider>;
249
+ getOfflineSigner?(chainId: string): Promise<OfflineSigner>;
237
250
  }
238
251
  export { StdSignDoc };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@injectivelabs/wallet-base",
3
3
  "description": "Base wallet strategy for use with @injectivelabs/wallet-core.",
4
- "version": "1.16.9",
4
+ "version": "1.16.11-alpha.0",
5
5
  "sideEffects": false,
6
6
  "type": "module",
7
7
  "author": {
@@ -56,14 +56,14 @@
56
56
  "start": "node dist/index.js"
57
57
  },
58
58
  "dependencies": {
59
- "@injectivelabs/exceptions": "1.16.9",
60
- "@injectivelabs/networks": "1.16.9",
61
- "@injectivelabs/sdk-ts": "1.16.9",
62
- "@injectivelabs/ts-types": "1.16.9",
59
+ "@injectivelabs/exceptions": "1.16.11-alpha.0",
60
+ "@injectivelabs/networks": "1.16.11-alpha.0",
61
+ "@injectivelabs/sdk-ts": "1.16.11-alpha.0",
62
+ "@injectivelabs/ts-types": "1.16.11-alpha.0",
63
63
  "eip1193-provider": "^1.0.1"
64
64
  },
65
65
  "devDependencies": {
66
66
  "shx": "^0.3.3"
67
67
  },
68
- "gitHead": "e2cf78d7937552013fd491b046a50705b6b4b3a3"
68
+ "gitHead": "640edf06e57aa38d3176e38fa03dddfc72e901cf"
69
69
  }