pulsar-contracts
Version:
24 lines (23 loc) • 981 B
TypeScript
import { PublicKey } from 'o1js';
import { CosmosSignature } from '../types/PulsarAction.js';
export { PulsarEncoder };
declare class PulsarEncoder {
private static readonly alphabet;
static marshalBytes(pubKey: PublicKey): Uint8Array;
static toAddress(pubKey: PublicKey): string;
static bigintToBytes(value: bigint): Uint8Array;
static base58Encode(bytes: Uint8Array): string;
static base58Decode(encoded: string): Uint8Array;
static unmarshalBytes(bytes: Uint8Array): {
x: bigint;
isOdd: boolean;
};
static fromAddress(address: string): PublicKey;
static bytesToBigint(bytes: Uint8Array): bigint;
static bigintToHex(value: bigint): string;
static stringToHex(str: string): string;
static hexToBytes(hex: string): Uint8Array;
static parseCosmosSignature(cosmosSignature: string): CosmosSignature;
static encodeSignature(signature: CosmosSignature): string;
static hexToBigint(hex: string): bigint;
}