@injectivelabs/sdk-ts 1.0.270 → 1.0.272

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.
@@ -1,6 +1,6 @@
1
1
  import { DirectSignResponse } from '@cosmjs/proto-signing';
2
2
  import { TxRaw } from '@injectivelabs/chain-api/cosmos/tx/v1beta1/tx_pb';
3
- import { ChainId, CosmosChainId } from '@injectivelabs/ts-types';
3
+ import { ChainId, EthereumChainId } from '@injectivelabs/ts-types';
4
4
  export interface InjectiveWalletProvider {
5
5
  /**
6
6
  * The the accounts from the wallet (addresses)
@@ -11,6 +11,15 @@ export interface InjectiveWalletProvider {
11
11
  * in base64 for Cosmos native wallets
12
12
  */
13
13
  getPubKey(): Promise<string>;
14
+ /**
15
+ * Sends Ethereum transaction. Returns a transaction hash
16
+ * @param transaction should implement TransactionConfig
17
+ * @param options
18
+ */
19
+ sendEthereumTransaction(transaction: unknown, options: {
20
+ address: string;
21
+ ethereumChainId: EthereumChainId;
22
+ }): Promise<string>;
14
23
  /**
15
24
  * Sends Cosmos transaction. Returns a transaction hash
16
25
  * @param transaction should implement TransactionConfig
@@ -20,12 +29,6 @@ export interface InjectiveWalletProvider {
20
29
  address: string;
21
30
  chainId: ChainId;
22
31
  }): Promise<string>;
23
- isChainIdSupported(chainId?: CosmosChainId): Promise<boolean>;
24
- signTransaction(transaction: {
25
- txRaw: TxRaw;
26
- chainId: string;
27
- accountNumber: number;
28
- }, address: string): Promise<DirectSignResponse>;
29
32
  /**
30
33
  * Sign a cosmos transaction using the wallet provider
31
34
  *
@@ -36,6 +39,13 @@ export interface InjectiveWalletProvider {
36
39
  txRaw: TxRaw;
37
40
  accountNumber: number;
38
41
  chainId: string;
39
- }, address: string): Promise<DirectSignResponse>;
42
+ address: string;
43
+ }): Promise<DirectSignResponse>;
44
+ /**
45
+ * Sign EIP712 TypedData using the wallet provider
46
+ * @param eip712TypedData
47
+ * @param address - ethereum address
48
+ */
49
+ signEip712TypedData(eip712TypedData: string, address: string): Promise<string>;
40
50
  }
41
51
  //# sourceMappingURL=provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/types/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,kDAAkD,CAAA;AACxE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAEhE,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,YAAY,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAEjC;;;OAGG;IACH,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAE5B;;;;OAIG;IACH,eAAe,CACb,WAAW,EAAE,kBAAkB,GAAG,KAAK,EACvC,OAAO,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,GAC7C,OAAO,CAAC,MAAM,CAAC,CAAA;IAElB,kBAAkB,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAE7D,eAAe,CACb,WAAW,EAAE;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,EACrE,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,kBAAkB,CAAC,CAAA;IAE9B;;;;;OAKG;IACH,qBAAqB,CACnB,WAAW,EAAE;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EACrE,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,kBAAkB,CAAC,CAAA;CAC/B"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/types/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,kDAAkD,CAAA;AACxE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAElE,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,YAAY,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAEjC;;;OAGG;IACH,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAE5B;;;;OAIG;IACH,uBAAuB,CACrB,WAAW,EAAE,OAAO,EACpB,OAAO,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,eAAe,CAAA;KAAE,GAC7D,OAAO,CAAC,MAAM,CAAC,CAAA;IAElB;;;;OAIG;IACH,eAAe,CACb,WAAW,EAAE,kBAAkB,GAAG,KAAK,EACvC,OAAO,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,GAC7C,OAAO,CAAC,MAAM,CAAC,CAAA;IAElB;;;;;OAKG;IACH,qBAAqB,CAAC,WAAW,EAAE;QACjC,KAAK,EAAE,KAAK,CAAA;QACZ,aAAa,EAAE,MAAM,CAAA;QACrB,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,MAAM,CAAA;KAChB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAA;IAE/B;;;;OAIG;IACH,mBAAmB,CAAC,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;CAC/E"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@injectivelabs/sdk-ts",
3
3
  "description": "SDK in TypeScript for building Injective applications in a browser, node, and react native environment.",
4
- "version": "1.0.270",
4
+ "version": "1.0.272",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
7
7
  "name": "Bojan Angjelkoski",
@@ -67,7 +67,7 @@
67
67
  "shx": "^0.3.2",
68
68
  "snakecase-keys": "^5.4.1"
69
69
  },
70
- "gitHead": "453b3700ceff5dbbf8437ca3169c74ae1aed880f",
70
+ "gitHead": "171c37c8c0d87d7f3edc2a7c2cde83f96db9a993",
71
71
  "typedoc": {
72
72
  "entryPoint": "./src/index.ts",
73
73
  "readmeFile": "./README.md",