@sei-js/cosmjs
Version:
TypeScript library for CosmJS interactions on the Sei blockchain
17 lines (16 loc) • 1.15 kB
TypeScript
import type { StdSignDoc, StdSignature } from '@cosmjs/amino';
/**
* Creates a StdSignDoc for an [ADR-36](https://github.com/cosmos/cosmos-sdk/blob/main/docs/architecture/adr-036-arbitrary-signature.md) object.
* @param signer A string representing the address of the signer.
* @param data A string or byte array representing the payload of the tx to be signed.
* Data is arbitrary bytes which can represent text, files, objects. It's applications developers decision how Data should be deserialized, serialized and the object it can represent in their context
* It's applications developers decision how Data should be treated, by treated we mean the serialization and deserialization process and the Object Data should represent.
* @returns A StdSignDoc object.
* @category Utils
*/
export declare function makeADR36AminoSignDoc(signer: string, data: string | Uint8Array): StdSignDoc;
/**
* Verifies a StdSignature object against the given signer address and expected message.
* @category Utils
*/
export declare const verifyArbitrary: (signerAddress: string, expectedMessage: string, signatureToVerify: StdSignature) => Promise<boolean>;