@keplr-wallet/types 0.11.31 → 0.11.32-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.
- package/build/index.d.ts +1 -0
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/secretjs.d.ts +6 -0
- package/build/secretjs.js +3 -0
- package/build/secretjs.js.map +1 -0
- package/build/wallet/keplr.d.ts +15 -1
- package/build/window.d.ts +1 -1
- package/package.json +3 -4
- package/src/index.ts +1 -0
- package/src/secretjs.ts +10 -0
- package/src/wallet/keplr.ts +17 -1
- package/src/window.ts +1 -1
package/build/index.d.ts
CHANGED
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
|
package/build/index.js.map
CHANGED
@@ -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 @@
|
|
1
|
+
{"version":3,"file":"secretjs.js","sourceRoot":"","sources":["../src/secretjs.ts"],"names":[],"mappings":""}
|
package/build/wallet/keplr.d.ts
CHANGED
@@ -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
|
4
|
+
import { SecretUtils } from "../secretjs";
|
5
5
|
import Long from "long";
|
6
6
|
export interface Key {
|
7
7
|
readonly name: string;
|
@@ -10,6 +10,7 @@ export interface Key {
|
|
10
10
|
readonly address: Uint8Array;
|
11
11
|
readonly bech32Address: string;
|
12
12
|
readonly isNanoLedger: boolean;
|
13
|
+
readonly isKeystone: boolean;
|
13
14
|
}
|
14
15
|
export declare type ICNSAdr36Signatures = {
|
15
16
|
chainId: string;
|
@@ -40,6 +41,14 @@ export interface Keplr {
|
|
40
41
|
defaultOptions: KeplrIntereactionOptions;
|
41
42
|
experimentalSuggestChain(chainInfo: ChainInfo): Promise<void>;
|
42
43
|
enable(chainIds: string | string[]): Promise<void>;
|
44
|
+
/**
|
45
|
+
* Delete permissions granted to origin.
|
46
|
+
* 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).
|
47
|
+
* Else, remove all permissions granted to origin (In this case, permissions that are not assigned to each chain, such as getChainInfosWithoutEndpoints(), are also deleted).
|
48
|
+
*
|
49
|
+
* @param chainIds disable(Remove approve domain(s)) target chain ID(s).
|
50
|
+
*/
|
51
|
+
disable(chainIds?: string | string[]): Promise<void>;
|
43
52
|
getKey(chainId: string): Promise<Key>;
|
44
53
|
signAmino(chainId: string, signer: string, signDoc: StdSignDoc, signOptions?: KeplrSignOptions): Promise<AminoSignResponse>;
|
45
54
|
signDirect(chainId: string, signer: string, signDoc: {
|
@@ -89,4 +98,9 @@ export interface Keplr {
|
|
89
98
|
primaryType: string;
|
90
99
|
}, signDoc: StdSignDoc, signOptions?: KeplrSignOptions): Promise<AminoSignResponse>;
|
91
100
|
getChainInfosWithoutEndpoints(): Promise<ChainInfoWithoutEndpoints[]>;
|
101
|
+
/** Change wallet extension user name **/
|
102
|
+
changeKeyRingName(opts: {
|
103
|
+
defaultName: string;
|
104
|
+
editable?: boolean;
|
105
|
+
}): Promise<string>;
|
92
106
|
}
|
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
|
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.
|
3
|
+
"version": "0.11.32-rc.0",
|
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": "
|
23
|
+
"gitHead": "42f5ee7527aaef0f12d1aebe9d0c8c15db2c8507"
|
25
24
|
}
|
package/src/index.ts
CHANGED
package/src/secretjs.ts
ADDED
@@ -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
|
+
}
|
package/src/wallet/keplr.ts
CHANGED
@@ -9,7 +9,7 @@ import {
|
|
9
9
|
DirectSignResponse,
|
10
10
|
OfflineDirectSigner,
|
11
11
|
} from "../cosmjs";
|
12
|
-
import { SecretUtils } from "secretjs
|
12
|
+
import { SecretUtils } from "../secretjs";
|
13
13
|
import Long from "long";
|
14
14
|
|
15
15
|
export interface Key {
|
@@ -23,6 +23,7 @@ export interface Key {
|
|
23
23
|
// Because current cosmos app in the nano ledger doesn't support the direct (proto) format msgs,
|
24
24
|
// this can be used to select the amino or direct signer.
|
25
25
|
readonly isNanoLedger: boolean;
|
26
|
+
readonly isKeystone: boolean;
|
26
27
|
}
|
27
28
|
|
28
29
|
export type ICNSAdr36Signatures = {
|
@@ -60,6 +61,15 @@ export interface Keplr {
|
|
60
61
|
|
61
62
|
experimentalSuggestChain(chainInfo: ChainInfo): Promise<void>;
|
62
63
|
enable(chainIds: string | string[]): Promise<void>;
|
64
|
+
/**
|
65
|
+
* Delete permissions granted to origin.
|
66
|
+
* 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).
|
67
|
+
* Else, remove all permissions granted to origin (In this case, permissions that are not assigned to each chain, such as getChainInfosWithoutEndpoints(), are also deleted).
|
68
|
+
*
|
69
|
+
* @param chainIds disable(Remove approve domain(s)) target chain ID(s).
|
70
|
+
*/
|
71
|
+
disable(chainIds?: string | string[]): Promise<void>;
|
72
|
+
|
63
73
|
getKey(chainId: string): Promise<Key>;
|
64
74
|
signAmino(
|
65
75
|
chainId: string,
|
@@ -180,4 +190,10 @@ export interface Keplr {
|
|
180
190
|
): Promise<AminoSignResponse>;
|
181
191
|
|
182
192
|
getChainInfosWithoutEndpoints(): Promise<ChainInfoWithoutEndpoints[]>;
|
193
|
+
|
194
|
+
/** Change wallet extension user name **/
|
195
|
+
changeKeyRingName(opts: {
|
196
|
+
defaultName: string;
|
197
|
+
editable?: boolean;
|
198
|
+
}): Promise<string>;
|
183
199
|
}
|
package/src/window.ts
CHANGED