@swaptoshi/governance-client
Version:
Client for interacting with blockchain networks that implements the Swaptoshi governance module
28 lines (27 loc) • 1.26 kB
TypeScript
import { TransactionParam } from './types';
import { BoostVoteParams, CreateProposalParams, DelegateVoteParams, RevokeDelegatedVoteParams, SetProposalAttributesParams, VoteParams } from '@swaptoshi/governance-module';
export declare class GovernanceTransactionClient {
private _url;
private _mode;
constructor(url: string, mode: 'ipc' | 'ws');
boostVote(params: TransactionParam<BoostVoteParams>, senderPrivateKey: Buffer): Promise<{
transactionId: string;
}>;
createProposal(params: TransactionParam<CreateProposalParams>, senderPrivateKey: Buffer): Promise<{
transactionId: string;
}>;
delegateVote(params: TransactionParam<DelegateVoteParams>, senderPrivateKey: Buffer): Promise<{
transactionId: string;
}>;
revokeDelegatedVote(params: TransactionParam<RevokeDelegatedVoteParams>, senderPrivateKey: Buffer): Promise<{
transactionId: string;
}>;
setProposalAttributes(params: TransactionParam<SetProposalAttributesParams>, senderPrivateKey: Buffer): Promise<{
transactionId: string;
}>;
vote(params: TransactionParam<VoteParams>, senderPrivateKey: Buffer): Promise<{
transactionId: string;
}>;
private _sendTransaction;
private _getClient;
}