/// import Long from "long"; import { ByzCoinRPC, ClientTransaction, InstanceID } from "@dedis/cothority/byzcoin"; import { CoinInstance, CredentialStruct, SpawnerInstance } from "@dedis/cothority/byzcoin/contracts"; import { AddTxResponse } from "@dedis/cothority/byzcoin/proto/requests"; import { Darc, IIdentity, Rule } from "@dedis/cothority/darc"; import { Write } from "@dedis/cothority/calypso"; import { Point } from "@dedis/kyber"; import { TransactionBuilder } from "./byzcoin"; import { ICoin } from "./genesis"; import { UserSkeleton } from "./userSkeleton"; export declare type TProgress = (percentage: number, text: string) => void; /** * SpawnerTransactionBuilder offers an easy interface to create new instances * using the SpawnerInstance. * Contrary to 'pure' spawns, when using the SpawnerInstance, the caller must * pay coins for the creation of a new instance. * The SpawnerTransactionBuilder signs and sends all instructions when `sendCoins` * is called. * After a call to `sendCoins`, the builder can be used again for new instructions. */ export declare class SpawnerTransactionBuilder extends TransactionBuilder { bc: ByzCoinRPC; private spawner; private coin; static readonly longWait = 10; progress: TProgress; private cost; constructor(bc: ByzCoinRPC, spawner: SpawnerInstance, coin: ICoin); clone(): SpawnerTransactionBuilder; sendCoins(wait?: number): Promise<[ClientTransaction, AddTxResponse]>; spawnDarc(d: Darc): Darc; spawnDarcBasic(desc: string, signers: IIdentity[]): Darc; spawnCoin(type: InstanceID, darcID: InstanceID, coinID?: InstanceID, initial?: Long): CoinInstance; spawnCredential(cred: CredentialStruct, darcID: InstanceID, credID?: InstanceID): void; spawnCalypsoWrite(darcID: InstanceID, wr: Write, preID?: any): InstanceID; spawnCalypsoRead(wrID: InstanceID, pub: Point, preID?: any): InstanceID; spawnValue(darcID: InstanceID, value: Buffer): InstanceID; evolveDarcAddRules(d: Darc, rules: Rule[]): Darc; createUser(user: UserSkeleton, initial?: Long): void; }