import { AccountUpdate, AccountUpdateForest, Bool, DeployArgs, Field, Int64, PublicKey, SmartContract, State, Types, UInt64, UInt8, VerificationKey } from "o1js"; export type FungibleTokenAdminBase = SmartContract & { canMint(accountUpdate: AccountUpdate): Promise; canChangeAdmin(admin: PublicKey): Promise; canPause(): Promise; canResume(): Promise; canChangeVerificationKey(vk: VerificationKey): Promise; }; export type FungibleTokenAdminConstructor = new (adminPublicKey: PublicKey) => FungibleTokenAdminBase; export interface FungibleTokenDeployProps extends Exclude { /** The token symbol. */ symbol: string; /** A source code reference, which is placed within the `zkappUri` of the contract account. * Typically a link to a file on github. */ src: string; /** Setting this to `true` will allow changing the verification key later with a signature from the deployer. This will allow updating the token contract at a later stage, for instance to react to an update of the o1js library. * Setting it to `false` will make changes to the contract impossible, unless there is a backward incompatible change to the protocol. (see https://docs.minaprotocol.com/zkapps/writing-a-zkapp/feature-overview/permissions#example-impossible-to-upgrade and https://minafoundation.github.io/mina-fungible-token/deploy.html) */ allowUpdates: boolean; } export declare const FungibleTokenErrors: { noAdminKey: string; noPermissionToChangeAdmin: string; tokenPaused: string; noPermissionToMint: string; noPermissionToPause: string; noPermissionToResume: string; noTransferFromCirculation: string; noPermissionChangeAllowed: string; flashMinting: string; unbalancedTransaction: string; }; export declare function FungibleTokenContract(adminContract: FungibleTokenAdminConstructor): { new (address: PublicKey, tokenId?: Field): { decimals: State; admin: State; paused: State; readonly events: { SetAdmin: typeof SetAdminEvent; Pause: typeof PauseEvent; Mint: typeof MintEvent; Burn: typeof BurnEvent; BalanceChange: typeof BalanceChangeEvent; }; deploy(props: FungibleTokenDeployProps): Promise; /** Update the verification key. * This will only work when `allowUpdates` has been set to `true` during deployment. */ updateVerificationKey(vk: VerificationKey): Promise; /** Initializes the account for tracking total circulation. * @argument {PublicKey} admin - public key where the admin contract is deployed * @argument {UInt8} decimals - number of decimals for the token * @argument {Bool} startPaused - if set to `Bool(true), the contract will start in a mode where token minting and transfers are paused. This should be used for non-atomic deployments */ initialize(admin: PublicKey, decimals: UInt8, startPaused: Bool): Promise; getAdminContract(): Promise; setAdmin(admin: PublicKey): Promise; mint(recipient: PublicKey, amount: UInt64): Promise; burn(from: PublicKey, amount: UInt64): Promise; pause(): Promise; resume(): Promise; transfer(from: PublicKey, to: PublicKey, amount: UInt64): Promise; checkPermissionsUpdate(update: AccountUpdate): void; /** Approve `AccountUpdate`s that have been created outside of the token contract. * * @argument {AccountUpdateForest} updates - The `AccountUpdate`s to approve. Note that the forest size is limited by the base token contract, @see TokenContract.MAX_ACCOUNT_UPDATES The current limit is 9. */ approveBase(updates: AccountUpdateForest): Promise; getBalanceOf(address: PublicKey): Promise; /** Reports the current circulating supply * This does take into account currently unreduced actions. */ getCirculating(): Promise; getDecimals(): Promise; deriveTokenId(): import("node_modules/o1js/dist/node/lib/provable/field.js").Field; get internal(): { mint({ address, amount, }: { address: PublicKey | AccountUpdate | SmartContract; amount: number | bigint | UInt64; }): AccountUpdate; burn({ address, amount, }: { address: PublicKey | AccountUpdate | SmartContract; amount: number | bigint | UInt64; }): AccountUpdate; send({ from, to, amount, }: { from: PublicKey | AccountUpdate | SmartContract; to: PublicKey | AccountUpdate | SmartContract; amount: number | bigint | UInt64; }): AccountUpdate; }; forEachUpdate(updates: AccountUpdateForest, callback: (update: AccountUpdate, usesToken: Bool) => void): void; checkZeroBalanceChange(updates: AccountUpdateForest): void; approveAccountUpdate(accountUpdate: AccountUpdate | import("o1js").AccountUpdateTree): Promise; approveAccountUpdates(accountUpdates: (AccountUpdate | import("o1js").AccountUpdateTree)[]): Promise; "__#private@#private": any; address: PublicKey; tokenId: Field; init(): void; requireSignature(): void; skipAuthorization(): void; get self(): AccountUpdate; newSelf(methodName?: string): AccountUpdate; sender: { self: SmartContract; getUnconstrained(): PublicKey; getAndRequireSignature(): PublicKey; }; get account(): import("node_modules/o1js/dist/node/lib/mina/v1/precondition.js").Account; get network(): import("node_modules/o1js/dist/node/lib/mina/v1/precondition.js").Network; get currentSlot(): import("node_modules/o1js/dist/node/lib/mina/v1/precondition.js").CurrentSlot; approve(update: AccountUpdate | import("o1js").AccountUpdateTree | AccountUpdateForest): void; send(args: { to: PublicKey | AccountUpdate | SmartContract; amount: number | bigint | UInt64; }): AccountUpdate; get balance(): { addInPlace(x: string | number | bigint | UInt64 | Types.UInt32 | import("node_modules/o1js/dist/node/lib/provable/int.js").Int64): void; subInPlace(x: string | number | bigint | UInt64 | Types.UInt32 | import("node_modules/o1js/dist/node/lib/provable/int.js").Int64): void; }; emitEventIf(condition: Bool, type: K, event: any): void; emitEvent(type: K, event: any): void; fetchEvents(start?: Types.UInt32, end?: Types.UInt32): Promise<{ type: string; event: { data: import("o1js").ProvablePure; transactionInfo: { transactionHash: string; transactionStatus: string; transactionMemo: string; }; }; blockHeight: Types.UInt32; blockHash: string; parentBlockHash: string; globalSlot: Types.UInt32; chainStatus: string; }[]>; }; MAX_ACCOUNT_UPDATES: number; _methods?: import("node_modules/o1js/dist/node/lib/proof-system/zkprogram.js").MethodInterface[]; _methodMetadata?: Record; _provers?: import("node_modules/o1js/dist/node/bindings.js").Pickles.Prover[]; _verificationKey?: { data: string; hash: Field; }; Proof(): { new ({ proof, publicInput, publicOutput, maxProofsVerified, }: { proof: unknown; publicInput: import("o1js").ZkappPublicInput; publicOutput: undefined; maxProofsVerified: 0 | 2 | 1; }): { verify(): void; verifyIf(condition: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool): void; publicInput: import("o1js").ZkappPublicInput; publicOutput: undefined; proof: unknown; maxProofsVerified: 0 | 2 | 1; shouldVerify: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool; declare(): boolean; toJSON(): import("o1js").JsonProof; publicFields(): { input: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]; output: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]; }; }; publicInputType: Omit, "fromFields"> & { fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => { accountUpdate: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; calls: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }; } & { toInput: (x: { accountUpdate: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; calls: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }) => { fields?: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[] | undefined; packed?: [import("node_modules/o1js/dist/node/lib/provable/field.js").Field, number][] | undefined; }; toJSON: (x: { accountUpdate: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; calls: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }) => { accountUpdate: string; calls: string; }; fromJSON: (x: { accountUpdate: string; calls: string; }) => { accountUpdate: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; calls: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }; empty: () => { accountUpdate: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; calls: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }; }; publicOutputType: import("o1js").ProvablePureExtended; tag: () => typeof SmartContract; fromJSON>(this: S, { maxProofsVerified, proof: proofString, publicInput: publicInputJson, publicOutput: publicOutputJson, }: import("o1js").JsonProof): Promise, import("o1js").InferProvable>>; dummy(publicInput: Input, publicOutput: OutPut, maxProofsVerified: 0 | 2 | 1, domainLog2?: number): Promise>; readonly provable: { toFields: (value: import("o1js").Proof) => import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]; toAuxiliary: (value?: import("o1js").Proof | undefined) => any[]; fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[], aux: any[]) => import("o1js").Proof; sizeInFields(): number; check: (value: import("o1js").Proof) => void; toValue: (x: import("o1js").Proof) => import("node_modules/o1js/dist/node/lib/proof-system/proof.js").ProofValue; fromValue: (x: import("o1js").Proof | import("node_modules/o1js/dist/node/lib/proof-system/proof.js").ProofValue) => import("o1js").Proof; toCanonical?: ((x: import("o1js").Proof) => import("o1js").Proof) | undefined; }; publicFields(value: import("o1js").ProofBase): { input: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]; output: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]; }; _proofFromBase64(proofString: string, maxProofsVerified: 0 | 2 | 1): unknown; _proofToBase64(proof: unknown, maxProofsVerified: 0 | 2 | 1): string; }; compile({ cache, forceRecompile }?: { cache?: import("o1js").Cache | undefined; forceRecompile?: boolean | undefined; }): Promise<{ verificationKey: { data: string; hash: import("node_modules/o1js/dist/node/lib/provable/field.js").Field; }; provers: import("node_modules/o1js/dist/node/bindings.js").Pickles.Prover[]; verify: (statement: import("node_modules/o1js/dist/node/bindings.js").Pickles.Statement, proof: unknown) => Promise; }>; digest(): Promise; getMaxProofsVerified(): Promise<0 | 2 | 1>; setVerificationKeyUnsafe(verificationKey: { data: string; hash: Field | string; }): void; runOutsideCircuit(run: () => void): void; analyzeMethods({ printSummary }?: { printSummary?: boolean | undefined; }): Promise>; }; declare const SetAdminEvent_base: (new (value: { adminKey: PublicKey; }) => { adminKey: PublicKey; }) & { _isStruct: true; } & Omit, "fromFields"> & { fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => { adminKey: PublicKey; }; } & { fromValue: (value: { adminKey: PublicKey | { x: Field | bigint; isOdd: Bool | boolean; }; }) => { adminKey: PublicKey; }; toInput: (x: { adminKey: PublicKey; }) => { fields?: Field[] | undefined; packed?: [Field, number][] | undefined; }; toJSON: (x: { adminKey: PublicKey; }) => { adminKey: string; }; fromJSON: (x: { adminKey: string; }) => { adminKey: PublicKey; }; empty: () => { adminKey: PublicKey; }; }; export declare class SetAdminEvent extends SetAdminEvent_base { } declare const PauseEvent_base: (new (value: { isPaused: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool; }) => { isPaused: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool; }) & { _isStruct: true; } & Omit, "fromFields"> & { fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => { isPaused: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool; }; } & { fromValue: (value: { isPaused: boolean | import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool; }) => { isPaused: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool; }; toInput: (x: { isPaused: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool; }) => { fields?: Field[] | undefined; packed?: [Field, number][] | undefined; }; toJSON: (x: { isPaused: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool; }) => { isPaused: boolean; }; fromJSON: (x: { isPaused: boolean; }) => { isPaused: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool; }; empty: () => { isPaused: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool; }; }; export declare class PauseEvent extends PauseEvent_base { } declare const MintEvent_base: (new (value: { recipient: PublicKey; amount: Types.UInt64; }) => { recipient: PublicKey; amount: Types.UInt64; }) & { _isStruct: true; } & Omit, "fromFields"> & { fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => { recipient: PublicKey; amount: Types.UInt64; }; } & { fromValue: (value: { recipient: PublicKey | { x: Field | bigint; isOdd: Bool | boolean; }; amount: number | bigint | Types.UInt64; }) => { recipient: PublicKey; amount: Types.UInt64; }; toInput: (x: { recipient: PublicKey; amount: Types.UInt64; }) => { fields?: Field[] | undefined; packed?: [Field, number][] | undefined; }; toJSON: (x: { recipient: PublicKey; amount: Types.UInt64; }) => { recipient: string; amount: string; }; fromJSON: (x: { recipient: string; amount: string; }) => { recipient: PublicKey; amount: Types.UInt64; }; empty: () => { recipient: PublicKey; amount: Types.UInt64; }; }; export declare class MintEvent extends MintEvent_base { } declare const BurnEvent_base: (new (value: { from: PublicKey; amount: Types.UInt64; }) => { from: PublicKey; amount: Types.UInt64; }) & { _isStruct: true; } & Omit, "fromFields"> & { fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => { from: PublicKey; amount: Types.UInt64; }; } & { fromValue: (value: { from: PublicKey | { x: Field | bigint; isOdd: Bool | boolean; }; amount: number | bigint | Types.UInt64; }) => { from: PublicKey; amount: Types.UInt64; }; toInput: (x: { from: PublicKey; amount: Types.UInt64; }) => { fields?: Field[] | undefined; packed?: [Field, number][] | undefined; }; toJSON: (x: { from: PublicKey; amount: Types.UInt64; }) => { from: string; amount: string; }; fromJSON: (x: { from: string; amount: string; }) => { from: PublicKey; amount: Types.UInt64; }; empty: () => { from: PublicKey; amount: Types.UInt64; }; }; export declare class BurnEvent extends BurnEvent_base { } declare const BalanceChangeEvent_base: (new (value: { address: PublicKey; amount: Int64; }) => { address: PublicKey; amount: Int64; }) & { _isStruct: true; } & Omit, "fromFields"> & { fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => { address: PublicKey; amount: Int64; }; } & { fromValue: (value: { address: PublicKey | { x: Field | bigint; isOdd: Bool | boolean; }; amount: any; }) => { address: PublicKey; amount: Int64; }; toInput: (x: { address: PublicKey; amount: Int64; }) => { fields?: Field[] | undefined; packed?: [Field, number][] | undefined; }; toJSON: (x: { address: PublicKey; amount: Int64; }) => { address: string; amount: any; }; fromJSON: (x: { address: string; amount: any; }) => { address: PublicKey; amount: Int64; }; empty: () => { address: PublicKey; amount: Int64; }; }; export declare class BalanceChangeEvent extends BalanceChangeEvent_base { } export {};