@@ -1,4 +1,8 @@
|
||||
import { CosmosAddressBech32Prefix, decodeSignature } from "@cosmwasm/sdk";
|
||||
import {
|
||||
CosmosAddressBech32Prefix,
|
||||
decodeSignature,
|
||||
makeSecp256k1SignatureFromFixedLength,
|
||||
} from "@cosmwasm/sdk";
|
||||
import {
|
||||
Account,
|
||||
Address,
|
||||
@@ -17,7 +21,7 @@ import {
|
||||
TransactionState,
|
||||
UnsignedTransaction,
|
||||
} from "@iov/bcp";
|
||||
import { Random, Secp256k1, Secp256k1Signature, Sha256 } from "@iov/crypto";
|
||||
import { Random, Secp256k1, Sha256 } from "@iov/crypto";
|
||||
import { Bech32, Encoding } from "@iov/encoding";
|
||||
import { HdPaths, Secp256k1HdWallet, UserProfile } from "@iov/keycontrol";
|
||||
import { assert } from "@iov/utils";
|
||||
@@ -475,7 +479,7 @@ describe("CosmWasmConnection", () => {
|
||||
const { pubkey, signature } = decodeSignature(encodeFullSignature(signatures[0]));
|
||||
const prehashed = new Sha256(signBytes).digest();
|
||||
const valid = await Secp256k1.verifySignature(
|
||||
new Secp256k1Signature(signature.slice(0, 32), signature.slice(32, 64)),
|
||||
makeSecp256k1SignatureFromFixedLength(signature),
|
||||
prehashed,
|
||||
pubkey,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user