mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
27 lines
847 B
TypeScript
27 lines
847 B
TypeScript
import {
|
|
Address,
|
|
ChainId,
|
|
Identity,
|
|
Nonce,
|
|
PostableBytes,
|
|
SignedTransaction,
|
|
SigningJob,
|
|
TransactionId,
|
|
TxCodec,
|
|
UnsignedTransaction,
|
|
} from "@iov/bcp";
|
|
import { CosmosBech32Prefix } from "./address";
|
|
import { TokenInfos } from "./types";
|
|
export declare class CosmosCodec implements TxCodec {
|
|
private readonly prefix;
|
|
private readonly tokens;
|
|
constructor(prefix: CosmosBech32Prefix, tokens: TokenInfos);
|
|
bytesToSign(unsigned: UnsignedTransaction, nonce: Nonce): SigningJob;
|
|
bytesToPost(signed: SignedTransaction): PostableBytes;
|
|
identifier(signed: SignedTransaction): TransactionId;
|
|
parseBytes(bytes: PostableBytes, chainId: ChainId, nonce?: Nonce): SignedTransaction;
|
|
identityToAddress(identity: Identity): Address;
|
|
isValidAddress(address: string): boolean;
|
|
}
|
|
export declare const cosmosCodec: CosmosCodec;
|