@keplr-wallet/types 0.11.30 → 0.11.31-rc.1

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.
package/build/index.d.ts CHANGED
@@ -6,3 +6,4 @@ export * from "./wallet";
6
6
  export * from "./window";
7
7
  export * from "./ethereum";
8
8
  export * from "./cosmjs";
9
+ export * from "./secretjs";
package/build/index.js CHANGED
@@ -18,4 +18,5 @@ __exportStar(require("./wallet"), exports);
18
18
  __exportStar(require("./window"), exports);
19
19
  __exportStar(require("./ethereum"), exports);
20
20
  __exportStar(require("./cosmjs"), exports);
21
+ __exportStar(require("./secretjs"), exports);
21
22
  //# 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;AACzB,6CAA2B;AAC3B,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;AAC3B,2CAAyB;AACzB,6CAA2B"}
@@ -0,0 +1,6 @@
1
+ export interface SecretUtils {
2
+ getPubkey: () => Promise<Uint8Array>;
3
+ decrypt: (ciphertext: Uint8Array, nonce: Uint8Array) => Promise<Uint8Array>;
4
+ encrypt: (contractCodeHash: string, msg: object) => Promise<Uint8Array>;
5
+ getTxEncryptionKey: (nonce: Uint8Array) => Promise<Uint8Array>;
6
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=secretjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"secretjs.js","sourceRoot":"","sources":["../src/secretjs.ts"],"names":[],"mappings":""}
@@ -1,7 +1,7 @@
1
1
  import { ChainInfo, ChainInfoWithoutEndpoints } from "../chain-info";
2
2
  import { EthSignType } from "../ethereum";
3
3
  import { BroadcastMode, AminoSignResponse, StdSignDoc, OfflineAminoSigner, StdSignature, DirectSignResponse, OfflineDirectSigner } from "../cosmjs";
4
- import { SecretUtils } from "secretjs/types/enigmautils";
4
+ import { SecretUtils } from "../secretjs";
5
5
  import Long from "long";
6
6
  export interface Key {
7
7
  readonly name: string;
@@ -40,6 +40,14 @@ export interface Keplr {
40
40
  defaultOptions: KeplrIntereactionOptions;
41
41
  experimentalSuggestChain(chainInfo: ChainInfo): Promise<void>;
42
42
  enable(chainIds: string | string[]): Promise<void>;
43
+ /**
44
+ * Delete permissions granted to origin.
45
+ * If chain ids are specified, only the permissions granted to each chain id are deleted (In this case, permissions such as getChainInfosWithoutEndpoints() are not deleted).
46
+ * Else, remove all permissions granted to origin (In this case, permissions that are not assigned to each chain, such as getChainInfosWithoutEndpoints(), are also deleted).
47
+ *
48
+ * @param chainIds disable(Remove approve domain(s)) target chain ID(s).
49
+ */
50
+ disable(chainIds?: string | string[]): Promise<void>;
43
51
  getKey(chainId: string): Promise<Key>;
44
52
  signAmino(chainId: string, signer: string, signDoc: StdSignDoc, signOptions?: KeplrSignOptions): Promise<AminoSignResponse>;
45
53
  signDirect(chainId: string, signer: string, signDoc: {
@@ -89,4 +97,9 @@ export interface Keplr {
89
97
  primaryType: string;
90
98
  }, signDoc: StdSignDoc, signOptions?: KeplrSignOptions): Promise<AminoSignResponse>;
91
99
  getChainInfosWithoutEndpoints(): Promise<ChainInfoWithoutEndpoints[]>;
100
+ /** Change wallet extension user name **/
101
+ changeKeyRingName(opts: {
102
+ defaultName: string;
103
+ editable?: boolean;
104
+ }): Promise<string>;
92
105
  }
package/build/window.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Keplr } from "./wallet";
2
2
  import { OfflineAminoSigner, OfflineDirectSigner } from "./cosmjs";
3
- import { SecretUtils } from "secretjs/types/enigmautils";
3
+ import { SecretUtils } from "./secretjs";
4
4
  export interface Window {
5
5
  keplr?: Keplr;
6
6
  getOfflineSigner?: (chainId: string) => OfflineAminoSigner & OfflineDirectSigner;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keplr-wallet/types",
3
- "version": "0.11.30",
3
+ "version": "0.11.31-rc.1",
4
4
  "main": "build/index.js",
5
5
  "author": "chainapsis",
6
6
  "license": "Apache-2.0",
@@ -18,8 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "axios": "^0.27.2",
21
- "long": "^4.0.0",
22
- "secretjs": "0.17.7"
21
+ "long": "^4.0.0"
23
22
  },
24
- "gitHead": "8fdd242c532ad47914d8a5f1b0a8e8d1e7152266"
23
+ "gitHead": "9b0e0739eb6191eca5c4a19cea0f30a2198786e5"
25
24
  }
package/src/index.ts CHANGED
@@ -6,3 +6,4 @@ export * from "./wallet";
6
6
  export * from "./window";
7
7
  export * from "./ethereum";
8
8
  export * from "./cosmjs";
9
+ export * from "./secretjs";
@@ -0,0 +1,10 @@
1
+ export interface SecretUtils {
2
+ getPubkey: () => Promise<Uint8Array>;
3
+ decrypt: (ciphertext: Uint8Array, nonce: Uint8Array) => Promise<Uint8Array>;
4
+ encrypt: (
5
+ contractCodeHash: string,
6
+ // eslint-disable-next-line @typescript-eslint/ban-types
7
+ msg: object
8
+ ) => Promise<Uint8Array>;
9
+ getTxEncryptionKey: (nonce: Uint8Array) => Promise<Uint8Array>;
10
+ }
@@ -9,7 +9,7 @@ import {
9
9
  DirectSignResponse,
10
10
  OfflineDirectSigner,
11
11
  } from "../cosmjs";
12
- import { SecretUtils } from "secretjs/types/enigmautils";
12
+ import { SecretUtils } from "../secretjs";
13
13
  import Long from "long";
14
14
 
15
15
  export interface Key {
@@ -60,6 +60,15 @@ export interface Keplr {
60
60
 
61
61
  experimentalSuggestChain(chainInfo: ChainInfo): Promise<void>;
62
62
  enable(chainIds: string | string[]): Promise<void>;
63
+ /**
64
+ * Delete permissions granted to origin.
65
+ * If chain ids are specified, only the permissions granted to each chain id are deleted (In this case, permissions such as getChainInfosWithoutEndpoints() are not deleted).
66
+ * Else, remove all permissions granted to origin (In this case, permissions that are not assigned to each chain, such as getChainInfosWithoutEndpoints(), are also deleted).
67
+ *
68
+ * @param chainIds disable(Remove approve domain(s)) target chain ID(s).
69
+ */
70
+ disable(chainIds?: string | string[]): Promise<void>;
71
+
63
72
  getKey(chainId: string): Promise<Key>;
64
73
  signAmino(
65
74
  chainId: string,
@@ -180,4 +189,10 @@ export interface Keplr {
180
189
  ): Promise<AminoSignResponse>;
181
190
 
182
191
  getChainInfosWithoutEndpoints(): Promise<ChainInfoWithoutEndpoints[]>;
192
+
193
+ /** Change wallet extension user name **/
194
+ changeKeyRingName(opts: {
195
+ defaultName: string;
196
+ editable?: boolean;
197
+ }): Promise<string>;
183
198
  }
package/src/window.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Keplr } from "./wallet";
2
2
  import { OfflineAminoSigner, OfflineDirectSigner } from "./cosmjs";
3
- import { SecretUtils } from "secretjs/types/enigmautils";
3
+ import { SecretUtils } from "./secretjs";
4
4
 
5
5
  export interface Window {
6
6
  keplr?: Keplr;