@keplr-wallet/types 0.10.16 → 0.10.17-rc.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.
@@ -0,0 +1,5 @@
1
+ export declare enum EthSignType {
2
+ MESSAGE = "message",
3
+ TRANSACTION = "transaction",
4
+ BYTE64 = "byte64"
5
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EthSignType = void 0;
4
+ var EthSignType;
5
+ (function (EthSignType) {
6
+ EthSignType["MESSAGE"] = "message";
7
+ EthSignType["TRANSACTION"] = "transaction";
8
+ EthSignType["BYTE64"] = "byte64";
9
+ })(EthSignType = exports.EthSignType || (exports.EthSignType = {}));
10
+ //# sourceMappingURL=ethereum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ethereum.js","sourceRoot":"","sources":["../src/ethereum.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,0CAA2B,CAAA;IAC3B,gCAAiB,CAAA;AACnB,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB"}
package/build/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from "./bip44";
4
4
  export * from "./chain-info";
5
5
  export * from "./wallet";
6
6
  export * from "./window";
7
+ export * from "./ethereum";
package/build/index.js CHANGED
@@ -16,4 +16,5 @@ __exportStar(require("./bip44"), exports);
16
16
  __exportStar(require("./chain-info"), exports);
17
17
  __exportStar(require("./wallet"), exports);
18
18
  __exportStar(require("./window"), exports);
19
+ __exportStar(require("./ethereum"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA2B;AAC3B,2CAAyB;AACzB,0CAAwB;AACxB,+CAA6B;AAC7B,2CAAyB;AACzB,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA2B;AAC3B,2CAAyB;AACzB,0CAAwB;AACxB,+CAA6B;AAC7B,2CAAyB;AACzB,2CAAyB;AACzB,6CAA2B"}
@@ -1,4 +1,5 @@
1
1
  import { ChainInfo } from "../chain-info";
2
+ import { EthSignType } from "../ethereum";
2
3
  import { BroadcastMode, AminoSignResponse, StdSignDoc, OfflineSigner, StdSignature } from "@cosmjs/launchpad";
3
4
  import { DirectSignResponse, OfflineDirectSigner } from "@cosmjs/proto-signing";
4
5
  import { SecretUtils } from "secretjs/types/enigmautils";
@@ -46,6 +47,7 @@ export interface Keplr {
46
47
  sendTx(chainId: string, tx: Uint8Array, mode: BroadcastMode): Promise<Uint8Array>;
47
48
  signArbitrary(chainId: string, signer: string, data: string | Uint8Array): Promise<StdSignature>;
48
49
  verifyArbitrary(chainId: string, signer: string, data: string | Uint8Array, signature: StdSignature): Promise<boolean>;
50
+ signEthereum(chainId: string, signer: string, data: string | Uint8Array, type: EthSignType): Promise<Uint8Array>;
49
51
  getOfflineSigner(chainId: string): OfflineSigner & OfflineDirectSigner;
50
52
  getOfflineSignerOnlyAmino(chainId: string): OfflineSigner;
51
53
  getOfflineSignerAuto(chainId: string): Promise<OfflineSigner | OfflineDirectSigner>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keplr-wallet/types",
3
- "version": "0.10.16",
3
+ "version": "0.10.17-rc.0",
4
4
  "main": "build/index.js",
5
5
  "author": "chainapsis",
6
6
  "license": "Apache-2.0",
@@ -23,5 +23,5 @@
23
23
  "long": "^4.0.0",
24
24
  "secretjs": "^0.17.0"
25
25
  },
26
- "gitHead": "779cebb08efcf062d23ba8bb2f577b0633723b6a"
26
+ "gitHead": "89498e14c4a94172510df65732de31d64eea2b38"
27
27
  }
@@ -0,0 +1,5 @@
1
+ export enum EthSignType {
2
+ MESSAGE = "message",
3
+ TRANSACTION = "transaction",
4
+ BYTE64 = "byte64",
5
+ }
package/src/index.ts CHANGED
@@ -4,3 +4,4 @@ export * from "./bip44";
4
4
  export * from "./chain-info";
5
5
  export * from "./wallet";
6
6
  export * from "./window";
7
+ export * from "./ethereum";
@@ -1,4 +1,5 @@
1
1
  import { ChainInfo } from "../chain-info";
2
+ import { EthSignType } from "../ethereum";
2
3
  import {
3
4
  BroadcastMode,
4
5
  AminoSignResponse,
@@ -91,6 +92,13 @@ export interface Keplr {
91
92
  signature: StdSignature
92
93
  ): Promise<boolean>;
93
94
 
95
+ signEthereum(
96
+ chainId: string,
97
+ signer: string,
98
+ data: string | Uint8Array,
99
+ type: EthSignType
100
+ ): Promise<Uint8Array>;
101
+
94
102
  getOfflineSigner(chainId: string): OfflineSigner & OfflineDirectSigner;
95
103
  getOfflineSignerOnlyAmino(chainId: string): OfflineSigner;
96
104
  getOfflineSignerAuto(