import * as $ from '@manahippo/move-to-ts'; import { AptosDataCache, AptosParserRepo, AptosLocalCache } from '@manahippo/move-to-ts'; import { U8, U64, U128 } from '@manahippo/move-to-ts'; import { TypeParamDeclType, FieldDeclType } from '@manahippo/move-to-ts'; import { StructTag, TypeTag } from '@manahippo/move-to-ts'; import { OptionTransaction } from '@manahippo/move-to-ts'; import { HexString, AptosClient, AptosAccount, TxnBuilderTypes, Types } from 'aptos'; import * as Account from './account'; import * as Event from './event'; import * as Simple_map from './simple_map'; import * as Table from './table'; export declare const packageName = "AptosFramework"; export declare const moduleAddress: HexString; export declare const moduleName = "aptos_governance"; export declare const EALREADY_VOTED: U64; export declare const EINSUFFICIENT_PROPOSER_STAKE: U64; export declare const EINSUFFICIENT_STAKE_LOCKUP: U64; export declare const EMETADATA_HASH_TOO_LONG: U64; export declare const EMETADATA_LOCATION_TOO_LONG: U64; export declare const ENOT_DELEGATED_VOTER: U64; export declare const ENO_VOTING_POWER: U64; export declare const EPROPOSAL_NOT_RESOLVABLE_YET: U64; export declare const EPROPOSAL_NOT_RESOLVED_YET: U64; export declare const EUNAUTHORIZED: U64; export declare const METADATA_HASH_KEY: U8[]; export declare const METADATA_LOCATION_KEY: U8[]; export declare const PROPOSAL_STATE_SUCCEEDED: U64; export declare class ApprovedExecutionHashes { typeTag: TypeTag; static moduleAddress: HexString; static moduleName: string; __app: $.AppType | null; static structName: string; static typeParameters: TypeParamDeclType[]; static fields: FieldDeclType[]; hashes: Simple_map.SimpleMap; constructor(proto: any, typeTag: TypeTag); static ApprovedExecutionHashesParser(data: any, typeTag: TypeTag, repo: AptosParserRepo): ApprovedExecutionHashes; static load(repo: AptosParserRepo, client: AptosClient, address: HexString, typeParams: TypeTag[], query?: { ledgerVersion?: number; }): Promise; static loadByApp(app: $.AppType, address: HexString, typeParams: TypeTag[], query?: { ledgerVersion?: number; }): Promise; static getTag(): StructTag; loadFullState(app: $.AppType): Promise; } export declare class CreateProposalEvent { typeTag: TypeTag; static moduleAddress: HexString; static moduleName: string; __app: $.AppType | null; static structName: string; static typeParameters: TypeParamDeclType[]; static fields: FieldDeclType[]; proposer: HexString; stake_pool: HexString; proposal_id: U64; execution_hash: U8[]; proposal_metadata: Simple_map.SimpleMap; constructor(proto: any, typeTag: TypeTag); static CreateProposalEventParser(data: any, typeTag: TypeTag, repo: AptosParserRepo): CreateProposalEvent; static getTag(): StructTag; loadFullState(app: $.AppType): Promise; } export declare class GovernanceConfig { typeTag: TypeTag; static moduleAddress: HexString; static moduleName: string; __app: $.AppType | null; static structName: string; static typeParameters: TypeParamDeclType[]; static fields: FieldDeclType[]; min_voting_threshold: U128; required_proposer_stake: U64; voting_duration_secs: U64; constructor(proto: any, typeTag: TypeTag); static GovernanceConfigParser(data: any, typeTag: TypeTag, repo: AptosParserRepo): GovernanceConfig; static load(repo: AptosParserRepo, client: AptosClient, address: HexString, typeParams: TypeTag[], query?: { ledgerVersion?: number; }): Promise; static loadByApp(app: $.AppType, address: HexString, typeParams: TypeTag[], query?: { ledgerVersion?: number; }): Promise; static getTag(): StructTag; loadFullState(app: $.AppType): Promise; } export declare class GovernanceEvents { typeTag: TypeTag; static moduleAddress: HexString; static moduleName: string; __app: $.AppType | null; static structName: string; static typeParameters: TypeParamDeclType[]; static fields: FieldDeclType[]; create_proposal_events: Event.EventHandle; update_config_events: Event.EventHandle; vote_events: Event.EventHandle; constructor(proto: any, typeTag: TypeTag); static GovernanceEventsParser(data: any, typeTag: TypeTag, repo: AptosParserRepo): GovernanceEvents; static load(repo: AptosParserRepo, client: AptosClient, address: HexString, typeParams: TypeTag[], query?: { ledgerVersion?: number; }): Promise; static loadByApp(app: $.AppType, address: HexString, typeParams: TypeTag[], query?: { ledgerVersion?: number; }): Promise; static getTag(): StructTag; loadFullState(app: $.AppType): Promise; } export declare class GovernanceResponsbility { typeTag: TypeTag; static moduleAddress: HexString; static moduleName: string; __app: $.AppType | null; static structName: string; static typeParameters: TypeParamDeclType[]; static fields: FieldDeclType[]; signer_caps: Simple_map.SimpleMap; constructor(proto: any, typeTag: TypeTag); static GovernanceResponsbilityParser(data: any, typeTag: TypeTag, repo: AptosParserRepo): GovernanceResponsbility; static load(repo: AptosParserRepo, client: AptosClient, address: HexString, typeParams: TypeTag[], query?: { ledgerVersion?: number; }): Promise; static loadByApp(app: $.AppType, address: HexString, typeParams: TypeTag[], query?: { ledgerVersion?: number; }): Promise; static getTag(): StructTag; loadFullState(app: $.AppType): Promise; } export declare class RecordKey { typeTag: TypeTag; static moduleAddress: HexString; static moduleName: string; __app: $.AppType | null; static structName: string; static typeParameters: TypeParamDeclType[]; static fields: FieldDeclType[]; stake_pool: HexString; proposal_id: U64; constructor(proto: any, typeTag: TypeTag); static RecordKeyParser(data: any, typeTag: TypeTag, repo: AptosParserRepo): RecordKey; static getTag(): StructTag; loadFullState(app: $.AppType): Promise; } export declare class UpdateConfigEvent { typeTag: TypeTag; static moduleAddress: HexString; static moduleName: string; __app: $.AppType | null; static structName: string; static typeParameters: TypeParamDeclType[]; static fields: FieldDeclType[]; min_voting_threshold: U128; required_proposer_stake: U64; voting_duration_secs: U64; constructor(proto: any, typeTag: TypeTag); static UpdateConfigEventParser(data: any, typeTag: TypeTag, repo: AptosParserRepo): UpdateConfigEvent; static getTag(): StructTag; loadFullState(app: $.AppType): Promise; } export declare class VoteEvent { typeTag: TypeTag; static moduleAddress: HexString; static moduleName: string; __app: $.AppType | null; static structName: string; static typeParameters: TypeParamDeclType[]; static fields: FieldDeclType[]; proposal_id: U64; voter: HexString; stake_pool: HexString; num_votes: U64; should_pass: boolean; constructor(proto: any, typeTag: TypeTag); static VoteEventParser(data: any, typeTag: TypeTag, repo: AptosParserRepo): VoteEvent; static getTag(): StructTag; loadFullState(app: $.AppType): Promise; } export declare class VotingRecords { typeTag: TypeTag; static moduleAddress: HexString; static moduleName: string; __app: $.AppType | null; static structName: string; static typeParameters: TypeParamDeclType[]; static fields: FieldDeclType[]; votes: Table.Table; constructor(proto: any, typeTag: TypeTag); static VotingRecordsParser(data: any, typeTag: TypeTag, repo: AptosParserRepo): VotingRecords; static load(repo: AptosParserRepo, client: AptosClient, address: HexString, typeParams: TypeTag[], query?: { ledgerVersion?: number; }): Promise; static loadByApp(app: $.AppType, address: HexString, typeParams: TypeTag[], query?: { ledgerVersion?: number; }): Promise; static getTag(): StructTag; loadFullState(app: $.AppType): Promise; } export declare function add_approved_script_hash_(proposal_id: U64, $c: AptosDataCache): void; export declare function add_approved_script_hash_script_(proposal_id: U64, $c: AptosDataCache): void; export declare function buildPayload_add_approved_script_hash_script(proposal_id: U64, isJSON?: boolean): TxnBuilderTypes.TransactionPayloadEntryFunction | Types.TransactionPayload_EntryFunctionPayload; export declare function create_proposal_(proposer: HexString, stake_pool: HexString, execution_hash: U8[], metadata_location: U8[], metadata_hash: U8[], $c: AptosDataCache): void; export declare function buildPayload_create_proposal(stake_pool: HexString, execution_hash: U8[], metadata_location: U8[], metadata_hash: U8[], isJSON?: boolean): TxnBuilderTypes.TransactionPayloadEntryFunction | Types.TransactionPayload_EntryFunctionPayload; export declare function create_proposal_metadata_(metadata_location: U8[], metadata_hash: U8[], $c: AptosDataCache): Simple_map.SimpleMap; export declare function get_min_voting_threshold_($c: AptosDataCache): U128; export declare function get_required_proposer_stake_($c: AptosDataCache): U64; export declare function get_signer_(signer_address: HexString, $c: AptosDataCache): HexString; export declare function get_signer_testnet_only_(core_resources: HexString, signer_address: HexString, $c: AptosDataCache): HexString; export declare function get_voting_duration_secs_($c: AptosDataCache): U64; export declare function get_voting_power_(pool_address: HexString, $c: AptosDataCache): U64; export declare function initialize_(aptos_framework: HexString, min_voting_threshold: U128, required_proposer_stake: U64, voting_duration_secs: U64, $c: AptosDataCache): void; export declare function reconfigure_(aptos_framework: HexString, $c: AptosDataCache): void; export declare function remove_approved_hash_(proposal_id: U64, $c: AptosDataCache): void; export declare function resolve_(proposal_id: U64, signer_address: HexString, $c: AptosDataCache): HexString; export declare function store_signer_cap_(aptos_framework: HexString, signer_address: HexString, signer_cap: Account.SignerCapability, $c: AptosDataCache): void; export declare function update_governance_config_(aptos_framework: HexString, min_voting_threshold: U128, required_proposer_stake: U64, voting_duration_secs: U64, $c: AptosDataCache): void; export declare function vote_(voter: HexString, stake_pool: HexString, proposal_id: U64, should_pass: boolean, $c: AptosDataCache): void; export declare function buildPayload_vote(stake_pool: HexString, proposal_id: U64, should_pass: boolean, isJSON?: boolean): TxnBuilderTypes.TransactionPayloadEntryFunction | Types.TransactionPayload_EntryFunctionPayload; export declare function loadParsers(repo: AptosParserRepo): void; export declare class App { client: AptosClient; repo: AptosParserRepo; cache: AptosLocalCache; constructor(client: AptosClient, repo: AptosParserRepo, cache: AptosLocalCache); get moduleAddress(): HexString; get moduleName(): string; get ApprovedExecutionHashes(): typeof ApprovedExecutionHashes; loadApprovedExecutionHashes(owner: HexString, loadFull?: boolean, fillCache?: boolean, query?: { ledgerVersion?: number; }): Promise; get CreateProposalEvent(): typeof CreateProposalEvent; get GovernanceConfig(): typeof GovernanceConfig; loadGovernanceConfig(owner: HexString, loadFull?: boolean, fillCache?: boolean, query?: { ledgerVersion?: number; }): Promise; get GovernanceEvents(): typeof GovernanceEvents; loadGovernanceEvents(owner: HexString, loadFull?: boolean, fillCache?: boolean, query?: { ledgerVersion?: number; }): Promise; get GovernanceResponsbility(): typeof GovernanceResponsbility; loadGovernanceResponsbility(owner: HexString, loadFull?: boolean, fillCache?: boolean, query?: { ledgerVersion?: number; }): Promise; get RecordKey(): typeof RecordKey; get UpdateConfigEvent(): typeof UpdateConfigEvent; get VoteEvent(): typeof VoteEvent; get VotingRecords(): typeof VotingRecords; loadVotingRecords(owner: HexString, loadFull?: boolean, fillCache?: boolean, query?: { ledgerVersion?: number; }): Promise; payload_add_approved_script_hash_script(proposal_id: U64, isJSON?: boolean): TxnBuilderTypes.TransactionPayloadEntryFunction | Types.TransactionPayload_EntryFunctionPayload; add_approved_script_hash_script(_account: AptosAccount, proposal_id: U64, option?: OptionTransaction, _isJSON?: boolean): Promise; payload_create_proposal(stake_pool: HexString, execution_hash: U8[], metadata_location: U8[], metadata_hash: U8[], isJSON?: boolean): TxnBuilderTypes.TransactionPayloadEntryFunction | Types.TransactionPayload_EntryFunctionPayload; create_proposal(_account: AptosAccount, stake_pool: HexString, execution_hash: U8[], metadata_location: U8[], metadata_hash: U8[], option?: OptionTransaction, _isJSON?: boolean): Promise; payload_vote(stake_pool: HexString, proposal_id: U64, should_pass: boolean, isJSON?: boolean): TxnBuilderTypes.TransactionPayloadEntryFunction | Types.TransactionPayload_EntryFunctionPayload; vote(_account: AptosAccount, stake_pool: HexString, proposal_id: U64, should_pass: boolean, option?: OptionTransaction, _isJSON?: boolean): Promise; } //# sourceMappingURL=aptos_governance.d.ts.map