import { AccountUpdate, Bool, DeployArgs, PublicKey, TokenContract, State, UInt64, VerificationKey, Field, AccountUpdateForest, Int64, UInt32 } from "o1js"; import { FungibleTokenAdminBase } from "@silvana-one/token"; declare const BondingCurveParams_base: (new (value: { startPrice: UInt64; curveK: UInt64; fee: UInt32; mintingIsAllowed: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool; }) => { startPrice: UInt64; curveK: UInt64; fee: UInt32; mintingIsAllowed: 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[]) => { startPrice: UInt64; curveK: UInt64; fee: UInt32; mintingIsAllowed: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool; }; } & { fromValue: (value: { startPrice: number | bigint | UInt64; curveK: number | bigint | UInt64; fee: number | bigint | UInt32; mintingIsAllowed: boolean | import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool; }) => { startPrice: UInt64; curveK: UInt64; fee: UInt32; mintingIsAllowed: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool; }; toInput: (x: { startPrice: UInt64; curveK: UInt64; fee: UInt32; mintingIsAllowed: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool; }) => { fields?: Field[] | undefined; packed?: [Field, number][] | undefined; }; toJSON: (x: { startPrice: UInt64; curveK: UInt64; fee: UInt32; mintingIsAllowed: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool; }) => { startPrice: string; curveK: string; fee: string; mintingIsAllowed: boolean; }; fromJSON: (x: { startPrice: string; curveK: string; fee: string; mintingIsAllowed: boolean; }) => { startPrice: UInt64; curveK: UInt64; fee: UInt32; mintingIsAllowed: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool; }; empty: () => { startPrice: UInt64; curveK: UInt64; fee: UInt32; mintingIsAllowed: import("node_modules/o1js/dist/node/lib/provable/bool.js").Bool; }; }; /** * Default bonding curve: * Initial price: 1 MINA per 100,000 tokens (0.00001 MINA per token), or 10_000 / 10 ** 9 * Curve K: 1 MINA per 100,000 tokens (0.00001 MINA per token), or 10_000 / 10 ** 9 MINA * Owner fee: 10% in 0.001 % units(10 * 1000 = 10_000) * Price formula: price = startPrice + curveK * totalSupply * Example: * If supply is 200,000 tokens, price = 1 MINA + 1 MINA * 200_000 / 100_000 = 3 MINA per 100,000 tokens * or per token in MINA/1e9 * 10000 + 10000 * 200_000 / 100_000 = 30000 per token, * or 30_000 * 100_000 = 3_000_000_000, or 3 MINA per 100,000 tokens * * To calculate the max supply for the given price for 100,000 tokens: * price = startPrice + curveK * totalSupply * price - startPrice = curveK * totalSupply * (price - startPrice) / curveK = totalSupply * (3 MINA - 1 MINA) / 1 MINA = 2 * 100_000 = 200_000 tokens * (30_000 - 10_000) / 10_000 = 2 * 100_000 = 200_000 tokens * or, in 1e9 units: * (30_000 - 10_000) * 1e9 * 100_000 / 10_000 = 200_000_000_000_000, or to avoid overflow, * (30_000 - 10_000) * 1e9 / 10_000 * 100_000 = 200_000_000_000_000 */ export declare class BondingCurveParams extends BondingCurveParams_base { pack(): import("node_modules/o1js/dist/node/lib/provable/field.js").Field; static unpack(field: Field): BondingCurveParams; } declare const BondingMintEvent_base: (new (value: { to: PublicKey; amount: UInt64; price: UInt64; payment: UInt64; fee: UInt64; }) => { to: PublicKey; amount: UInt64; price: UInt64; payment: UInt64; fee: UInt64; }) & { _isStruct: true; } & Omit, "fromFields"> & { fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => { to: PublicKey; amount: UInt64; price: UInt64; payment: UInt64; fee: UInt64; }; } & { fromValue: (value: { to: PublicKey | { x: Field | bigint; isOdd: Bool | boolean; }; amount: number | bigint | UInt64; price: number | bigint | UInt64; payment: number | bigint | UInt64; fee: number | bigint | UInt64; }) => { to: PublicKey; amount: UInt64; price: UInt64; payment: UInt64; fee: UInt64; }; toInput: (x: { to: PublicKey; amount: UInt64; price: UInt64; payment: UInt64; fee: UInt64; }) => { fields?: Field[] | undefined; packed?: [Field, number][] | undefined; }; toJSON: (x: { to: PublicKey; amount: UInt64; price: UInt64; payment: UInt64; fee: UInt64; }) => { to: string; amount: string; price: string; payment: string; fee: string; }; fromJSON: (x: { to: string; amount: string; price: string; payment: string; fee: string; }) => { to: PublicKey; amount: UInt64; price: UInt64; payment: UInt64; fee: UInt64; }; empty: () => { to: PublicKey; amount: UInt64; price: UInt64; payment: UInt64; fee: UInt64; }; }; export declare class BondingMintEvent extends BondingMintEvent_base { } declare const BondingRedeemEvent_base: (new (value: { seller: PublicKey; amount: UInt64; payment: UInt64; minBalance: UInt64; maxSupply: UInt64; fee: UInt64; }) => { seller: PublicKey; amount: UInt64; payment: UInt64; minBalance: UInt64; maxSupply: UInt64; fee: UInt64; }) & { _isStruct: true; } & Omit, "fromFields"> & { fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => { seller: PublicKey; amount: UInt64; payment: UInt64; minBalance: UInt64; maxSupply: UInt64; fee: UInt64; }; } & { fromValue: (value: { seller: PublicKey | { x: Field | bigint; isOdd: Bool | boolean; }; amount: number | bigint | UInt64; payment: number | bigint | UInt64; minBalance: number | bigint | UInt64; maxSupply: number | bigint | UInt64; fee: number | bigint | UInt64; }) => { seller: PublicKey; amount: UInt64; payment: UInt64; minBalance: UInt64; maxSupply: UInt64; fee: UInt64; }; toInput: (x: { seller: PublicKey; amount: UInt64; payment: UInt64; minBalance: UInt64; maxSupply: UInt64; fee: UInt64; }) => { fields?: Field[] | undefined; packed?: [Field, number][] | undefined; }; toJSON: (x: { seller: PublicKey; amount: UInt64; payment: UInt64; minBalance: UInt64; maxSupply: UInt64; fee: UInt64; }) => { seller: string; amount: string; payment: string; minBalance: string; maxSupply: string; fee: string; }; fromJSON: (x: { seller: string; amount: string; payment: string; minBalance: string; maxSupply: string; fee: string; }) => { seller: PublicKey; amount: UInt64; payment: UInt64; minBalance: UInt64; maxSupply: UInt64; fee: UInt64; }; empty: () => { seller: PublicKey; amount: UInt64; payment: UInt64; minBalance: UInt64; maxSupply: UInt64; fee: UInt64; }; }; export declare class BondingRedeemEvent extends BondingRedeemEvent_base { } declare const BondingCurveAdminInitializeProps_base: (new (value: { tokenAddress: PublicKey; startPrice: UInt64; curveK: UInt64; feeMaster: PublicKey; fee: UInt32; launchFee: UInt64; numberOfNewAccounts: UInt64; }) => { tokenAddress: PublicKey; startPrice: UInt64; curveK: UInt64; feeMaster: PublicKey; fee: UInt32; launchFee: UInt64; numberOfNewAccounts: UInt64; }) & { _isStruct: true; } & Omit, "fromFields"> & { fromFields: (fields: import("node_modules/o1js/dist/node/lib/provable/field.js").Field[]) => { tokenAddress: PublicKey; startPrice: UInt64; curveK: UInt64; feeMaster: PublicKey; fee: UInt32; launchFee: UInt64; numberOfNewAccounts: UInt64; }; } & { fromValue: (value: { tokenAddress: PublicKey | { x: Field | bigint; isOdd: Bool | boolean; }; startPrice: number | bigint | UInt64; curveK: number | bigint | UInt64; feeMaster: PublicKey | { x: Field | bigint; isOdd: Bool | boolean; }; fee: number | bigint | UInt32; launchFee: number | bigint | UInt64; numberOfNewAccounts: number | bigint | UInt64; }) => { tokenAddress: PublicKey; startPrice: UInt64; curveK: UInt64; feeMaster: PublicKey; fee: UInt32; launchFee: UInt64; numberOfNewAccounts: UInt64; }; toInput: (x: { tokenAddress: PublicKey; startPrice: UInt64; curveK: UInt64; feeMaster: PublicKey; fee: UInt32; launchFee: UInt64; numberOfNewAccounts: UInt64; }) => { fields?: Field[] | undefined; packed?: [Field, number][] | undefined; }; toJSON: (x: { tokenAddress: PublicKey; startPrice: UInt64; curveK: UInt64; feeMaster: PublicKey; fee: UInt32; launchFee: UInt64; numberOfNewAccounts: UInt64; }) => { tokenAddress: string; startPrice: string; curveK: string; feeMaster: string; fee: string; launchFee: string; numberOfNewAccounts: string; }; fromJSON: (x: { tokenAddress: string; startPrice: string; curveK: string; feeMaster: string; fee: string; launchFee: string; numberOfNewAccounts: string; }) => { tokenAddress: PublicKey; startPrice: UInt64; curveK: UInt64; feeMaster: PublicKey; fee: UInt32; launchFee: UInt64; numberOfNewAccounts: UInt64; }; empty: () => { tokenAddress: PublicKey; startPrice: UInt64; curveK: UInt64; feeMaster: PublicKey; fee: UInt32; launchFee: UInt64; numberOfNewAccounts: UInt64; }; }; export declare class BondingCurveAdminInitializeProps extends BondingCurveAdminInitializeProps_base { } export declare class FungibleTokenBondingCurveAdmin extends TokenContract implements FungibleTokenAdminBase { owner: State; token: State; feeMaster: State; curve: State; insideMint: State; events: { mint: typeof BondingMintEvent; redeem: typeof BondingRedeemEvent; }; deploy(props: DeployArgs): Promise; approveBase(forest: AccountUpdateForest): Promise; initialize(props: BondingCurveAdminInitializeProps): Promise; mint(to: PublicKey, amount: UInt64, price: UInt64): Promise; redeem(amount: UInt64, minPrice: UInt64, slippage: UInt32): Promise; /** * In case the user burned tokens without calling the redeem method, * we need to sync the supply to the actual circulated supply */ sync(): Promise; /** Update the verification key. * Note that because we have set the permissions for setting the verification key to `impossibleDuringCurrentVersion()`, this will only be possible in case of a protocol update that requires an update. */ updateVerificationKey(vk: VerificationKey): Promise; ensureOwnerSignature(): AccountUpdate; canMint(_accountUpdate: AccountUpdate): Promise; canChangeAdmin(_admin: PublicKey): Promise; canPause(): Promise; canResume(): Promise; canChangeVerificationKey(_vk: VerificationKey): Promise; } export declare const BondingCurveFungibleToken: { new (address: PublicKey, tokenId?: Field): { decimals: State; admin: State; paused: State; readonly events: { SetAdmin: typeof import("@silvana-one/token").SetAdminEvent; Pause: typeof import("@silvana-one/token").PauseEvent; Mint: typeof import("@silvana-one/token").MintEvent; Burn: typeof import("@silvana-one/token").BurnEvent; BalanceChange: typeof import("@silvana-one/token").BalanceChangeEvent; }; deploy(props: import("@silvana-one/token").FungibleTokenDeployProps): Promise; updateVerificationKey(vk: VerificationKey): Promise; initialize(admin: PublicKey, decimals: import("o1js").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; approveBase(updates: AccountUpdateForest): Promise; getBalanceOf(address: PublicKey): Promise; getCirculating(): Promise; getDecimals(): Promise; deriveTokenId(): import("node_modules/o1js/dist/node/lib/provable/field.js").Field; get internal(): { mint({ address, amount, }: { address: PublicKey | AccountUpdate | import("o1js").SmartContract; amount: number | bigint | UInt64; }): AccountUpdate; burn({ address, amount, }: { address: PublicKey | AccountUpdate | import("o1js").SmartContract; amount: number | bigint | UInt64; }): AccountUpdate; send({ from, to, amount, }: { from: PublicKey | AccountUpdate | import("o1js").SmartContract; to: PublicKey | AccountUpdate | import("o1js").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: import("o1js").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 | import("o1js").SmartContract; amount: number | bigint | UInt64; }): AccountUpdate; get balance(): { addInPlace(x: string | number | bigint | UInt64 | UInt32 | import("node_modules/o1js/dist/node/lib/provable/int.js").Int64): void; subInPlace(x: string | number | bigint | UInt64 | 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?: UInt32, end?: UInt32): Promise<{ type: string; event: { data: import("o1js").ProvablePure; transactionInfo: { transactionHash: string; transactionStatus: string; transactionMemo: string; }; }; blockHeight: UInt32; blockHash: string; parentBlockHash: string; globalSlot: 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 import("o1js").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>; }; export {};