proto-signing: Allow customizable sign mode in makeAuthBytes

This commit is contained in:
willclarktech
2020-10-27 16:00:35 +01:00
parent c677990550
commit c1cf37380e
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -14,13 +14,14 @@ export function makeAuthInfoBytes(
feeAmount: readonly cosmos.base.v1beta1.Coin[],
gasLimit: number,
sequence: number,
signMode = cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT,
): Uint8Array {
const authInfo = {
signerInfos: pubkeys.map(
(pubkey): cosmos.tx.v1beta1.ISignerInfo => ({
publicKey: pubkey,
modeInfo: {
single: { mode: cosmos.tx.signing.v1beta1.SignMode.SIGN_MODE_DIRECT },
single: { mode: signMode },
},
sequence: sequence ? Long.fromNumber(sequence) : undefined,
}),
+1
View File
@@ -7,6 +7,7 @@ export declare function makeAuthInfoBytes(
feeAmount: readonly cosmos.base.v1beta1.Coin[],
gasLimit: number,
sequence: number,
signMode?: cosmos.tx.signing.v1beta1.SignMode,
): Uint8Array;
export declare function makeSignDoc(
bodyBytes: Uint8Array,