@keplr-wallet/types 0.12.68 → 0.12.69

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,33 @@
1
+ import { StdSignature } from "./cosmjs";
2
+ import Long from "long";
3
+ export interface SignDocDirectAux {
4
+ /**
5
+ * body_bytes is protobuf serialization of a TxBody that matches the
6
+ * representation in TxRaw.
7
+ */
8
+ bodyBytes: Uint8Array;
9
+ /** public_key is the public key of the signing account. */
10
+ publicKey: {
11
+ typeUrl: string;
12
+ /** Must be a valid serialized protocol buffer of the above specified type. */
13
+ value: Uint8Array;
14
+ } | undefined;
15
+ /**
16
+ * chain_id is the identifier of the chain this transaction targets.
17
+ * It prevents signed transactions from being used on another chain by an
18
+ * attacker.
19
+ */
20
+ chainId: string;
21
+ /** account_number is the account number of the account in state. */
22
+ accountNumber: Long;
23
+ /** sequence is the sequence number of the signing account. */
24
+ sequence: Long;
25
+ }
26
+ export interface DirectAuxSignResponse {
27
+ /**
28
+ * The sign doc that was signed.
29
+ * This may be different from the input signDoc when the signer modifies it as part of the signing process.
30
+ */
31
+ readonly signed: SignDocDirectAux;
32
+ readonly signature: StdSignature;
33
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=cosmjs-alt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cosmjs-alt.js","sourceRoot":"","sources":["../src/cosmjs-alt.ts"],"names":[],"mappings":""}
package/build/index.d.ts CHANGED
@@ -6,5 +6,6 @@ export * from "./wallet";
6
6
  export * from "./window";
7
7
  export * from "./ethereum";
8
8
  export * from "./cosmjs";
9
+ export * from "./cosmjs-alt";
9
10
  export * from "./secretjs";
10
11
  export * from "./settled";
package/build/index.js CHANGED
@@ -22,6 +22,7 @@ __exportStar(require("./wallet"), exports);
22
22
  __exportStar(require("./window"), exports);
23
23
  __exportStar(require("./ethereum"), exports);
24
24
  __exportStar(require("./cosmjs"), exports);
25
+ __exportStar(require("./cosmjs-alt"), exports);
25
26
  __exportStar(require("./secretjs"), exports);
26
27
  __exportStar(require("./settled"), exports);
27
28
  //# 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;AACzB,6CAA2B;AAC3B,4CAA0B"}
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,+CAA6B;AAC7B,6CAA2B;AAC3B,4CAA0B"}
@@ -4,6 +4,7 @@ import { BroadcastMode, AminoSignResponse, StdSignDoc, OfflineAminoSigner, StdSi
4
4
  import { SecretUtils } from "../secretjs";
5
5
  import Long from "long";
6
6
  import { SettledResponses } from "../settled";
7
+ import { DirectAuxSignResponse } from "../cosmjs-alt";
7
8
  export interface Key {
8
9
  readonly name: string;
9
10
  readonly algo: string;
@@ -63,6 +64,23 @@ export interface Keplr {
63
64
  /** SignDoc accountNumber */
64
65
  accountNumber?: Long | null;
65
66
  }, signOptions?: KeplrSignOptions): Promise<DirectSignResponse>;
67
+ signDirectAux(chainId: string, signer: string, signDoc: {
68
+ bodyBytes?: Uint8Array | null;
69
+ publicKey?: {
70
+ typeUrl: string;
71
+ value: Uint8Array;
72
+ } | null;
73
+ chainId?: string | null;
74
+ accountNumber?: Long | null;
75
+ sequence?: Long | null;
76
+ tip?: {
77
+ amount: {
78
+ denom: string;
79
+ amount: string;
80
+ }[];
81
+ tipper: string;
82
+ } | null;
83
+ }, signOptions?: Exclude<KeplrSignOptions, "preferNoSetFee" | "disableBalanceCheck">): Promise<DirectAuxSignResponse>;
66
84
  sendTx(chainId: string, tx: Uint8Array, mode: BroadcastMode): Promise<Uint8Array>;
67
85
  signICNSAdr36(chainId: string, contractAddress: string, owner: string, username: string, addressChainIds: string[]): Promise<ICNSAdr36Signatures>;
68
86
  signArbitrary(chainId: string, signer: string, data: string | Uint8Array): Promise<StdSignature>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keplr-wallet/types",
3
- "version": "0.12.68",
3
+ "version": "0.12.69",
4
4
  "main": "build/index.js",
5
5
  "author": "chainapsis",
6
6
  "license": "Apache-2.0",
@@ -18,5 +18,5 @@
18
18
  "dependencies": {
19
19
  "long": "^4.0.0"
20
20
  },
21
- "gitHead": "70cd82a35876f8a42bd6da766ef0d11e388a0df2"
21
+ "gitHead": "8d79f9aa5a77fc822cdcab75b8992376f7af1d1a"
22
22
  }
@@ -0,0 +1,37 @@
1
+ import { StdSignature } from "./cosmjs";
2
+ import Long from "long";
3
+
4
+ export interface SignDocDirectAux {
5
+ /**
6
+ * body_bytes is protobuf serialization of a TxBody that matches the
7
+ * representation in TxRaw.
8
+ */
9
+ bodyBytes: Uint8Array;
10
+ /** public_key is the public key of the signing account. */
11
+ publicKey:
12
+ | {
13
+ typeUrl: string;
14
+ /** Must be a valid serialized protocol buffer of the above specified type. */
15
+ value: Uint8Array;
16
+ }
17
+ | undefined;
18
+ /**
19
+ * chain_id is the identifier of the chain this transaction targets.
20
+ * It prevents signed transactions from being used on another chain by an
21
+ * attacker.
22
+ */
23
+ chainId: string;
24
+ /** account_number is the account number of the account in state. */
25
+ accountNumber: Long;
26
+ /** sequence is the sequence number of the signing account. */
27
+ sequence: Long;
28
+ }
29
+
30
+ export interface DirectAuxSignResponse {
31
+ /**
32
+ * The sign doc that was signed.
33
+ * This may be different from the input signDoc when the signer modifies it as part of the signing process.
34
+ */
35
+ readonly signed: SignDocDirectAux;
36
+ readonly signature: StdSignature;
37
+ }
package/src/index.ts CHANGED
@@ -6,5 +6,6 @@ export * from "./wallet";
6
6
  export * from "./window";
7
7
  export * from "./ethereum";
8
8
  export * from "./cosmjs";
9
+ export * from "./cosmjs-alt";
9
10
  export * from "./secretjs";
10
11
  export * from "./settled";
@@ -12,6 +12,7 @@ import {
12
12
  import { SecretUtils } from "../secretjs";
13
13
  import Long from "long";
14
14
  import { SettledResponses } from "../settled";
15
+ import { DirectAuxSignResponse } from "../cosmjs-alt";
15
16
 
16
17
  export interface Key {
17
18
  // Name of the selected key store.
@@ -97,6 +98,31 @@ export interface Keplr {
97
98
  },
98
99
  signOptions?: KeplrSignOptions
99
100
  ): Promise<DirectSignResponse>;
101
+ signDirectAux(
102
+ chainId: string,
103
+ signer: string,
104
+ signDoc: {
105
+ bodyBytes?: Uint8Array | null;
106
+ publicKey?: {
107
+ typeUrl: string;
108
+ value: Uint8Array;
109
+ } | null;
110
+ chainId?: string | null;
111
+ accountNumber?: Long | null;
112
+ sequence?: Long | null;
113
+ tip?: {
114
+ amount: {
115
+ denom: string;
116
+ amount: string;
117
+ }[];
118
+ tipper: string;
119
+ } | null;
120
+ },
121
+ signOptions?: Exclude<
122
+ KeplrSignOptions,
123
+ "preferNoSetFee" | "disableBalanceCheck"
124
+ >
125
+ ): Promise<DirectAuxSignResponse>;
100
126
  sendTx(
101
127
  chainId: string,
102
128
  tx: Uint8Array,