import * as $ from '@manahippo/move-to-ts'; import { AptosDataCache, AptosParserRepo, AptosLocalCache } from '@manahippo/move-to-ts'; import { U64, U128 } from '@manahippo/move-to-ts'; import { TypeParamDeclType, FieldDeclType } from '@manahippo/move-to-ts'; import { StructTag, TypeTag } from '@manahippo/move-to-ts'; import { HexString, AptosClient } from 'aptos'; import * as Simple_map from './simple_map'; export declare const packageName = "AptosStdlib"; export declare const moduleAddress: HexString; export declare const moduleName = "pool_u64"; export declare const EINSUFFICIENT_SHARES: U64; export declare const EPOOL_IS_NOT_EMPTY: U64; export declare const EPOOL_TOTAL_COINS_OVERFLOW: U64; export declare const EPOOL_TOTAL_SHARES_OVERFLOW: U64; export declare const ESHAREHOLDER_NOT_FOUND: U64; export declare const ESHAREHOLDER_SHARES_OVERFLOW: U64; export declare const ETOO_MANY_SHAREHOLDERS: U64; export declare const MAX_U64: U64; export declare class Pool { typeTag: TypeTag; static moduleAddress: HexString; static moduleName: string; __app: $.AppType | null; static structName: string; static typeParameters: TypeParamDeclType[]; static fields: FieldDeclType[]; shareholders_limit: U64; total_coins: U64; total_shares: U64; shares: Simple_map.SimpleMap; shareholders: HexString[]; scaling_factor: U64; constructor(proto: any, typeTag: TypeTag); static PoolParser(data: any, typeTag: TypeTag, repo: AptosParserRepo): Pool; static getTag(): StructTag; loadFullState(app: $.AppType): Promise; } export declare function add_shares_(pool: Pool, shareholder: HexString, new_shares: U64, $c: AptosDataCache): U64; export declare function amount_to_shares_(pool: Pool, coins_amount: U64, $c: AptosDataCache): U64; export declare function amount_to_shares_with_total_coins_(pool: Pool, coins_amount: U64, total_coins: U64, $c: AptosDataCache): U64; export declare function balance_(pool: Pool, shareholder: HexString, $c: AptosDataCache): U64; export declare function buy_in_(pool: Pool, shareholder: HexString, coins_amount: U64, $c: AptosDataCache): U64; export declare function contains_(pool: Pool, shareholder: HexString, $c: AptosDataCache): boolean; export declare function create_(shareholders_limit: U64, $c: AptosDataCache): Pool; export declare function create_with_scaling_factor_(shareholders_limit: U64, scaling_factor: U64, $c: AptosDataCache): Pool; export declare function deduct_shares_(pool: Pool, shareholder: HexString, num_shares: U64, $c: AptosDataCache): U64; export declare function destroy_empty_(pool: Pool, $c: AptosDataCache): void; export declare function multiply_then_divide_(_pool: Pool, x: U64, y: U64, z: U64, $c: AptosDataCache): U64; export declare function redeem_shares_(pool: Pool, shareholder: HexString, shares_to_redeem: U64, $c: AptosDataCache): U64; export declare function shareholders_(pool: Pool, $c: AptosDataCache): HexString[]; export declare function shareholders_count_(pool: Pool, $c: AptosDataCache): U64; export declare function shares_(pool: Pool, shareholder: HexString, $c: AptosDataCache): U64; export declare function shares_to_amount_(pool: Pool, shares: U64, $c: AptosDataCache): U64; export declare function shares_to_amount_with_total_coins_(pool: Pool, shares: U64, total_coins: U64, $c: AptosDataCache): U64; export declare function to_u128_(num: U64, $c: AptosDataCache): U128; export declare function total_coins_(pool: Pool, $c: AptosDataCache): U64; export declare function total_shares_(pool: Pool, $c: AptosDataCache): U64; export declare function transfer_shares_(pool: Pool, shareholder_1: HexString, shareholder_2: HexString, shares_to_transfer: U64, $c: AptosDataCache): void; export declare function update_total_coins_(pool: Pool, new_total_coins: U64, $c: AptosDataCache): void; 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 Pool(): typeof Pool; } //# sourceMappingURL=pool_u64.d.ts.map