export type NewSignerFunc = (genesisId: string) => Promise; export declare const createSync2: NewSignerFunc; export declare const createSync: NewSignerFunc; export declare interface Connex1 { readonly vendor: Connex1.Vendor; readonly thor: Connex1.Thor; } export declare namespace Connex1 { interface Thor { readonly genesis: { id: string; }; } namespace Thor { type Clause = { to: string | null; value: string | number; data?: string; }; } interface Vendor { sign(kind: T): Vendor.SigningService; owned(addr: string): Promise; } namespace Vendor { interface TxSigningService { signer(addr: string): this; gas(gas: number): this; dependsOn(txid: string): this; link(url: string): this; comment(text: string): this; delegate(handler: DelegationHandler): this; request(msg: TxMessage): Promise; } interface CertSigningService { signer(addr: string): this; link(url: string): this; request(msg: CertMessage): Promise; } type SigningService = T extends 'tx' ? TxSigningService : T extends 'cert' ? CertSigningService : never; type TxMessage = Array; type CertMessage = { purpose: 'identification' | 'agreement'; payload: { type: 'text'; content: string; }; }; type TxResponse = { txid: string; signer: string; }; type CertResponse = { annex: { domain: string; timestamp: number; signer: string; }; signature: string; }; type DelegationHandler = (unsignedTx: { raw: string; origin: string; }) => Promise<{ signature: string; }>; } }