/// <reference types="node" />
import * as Long from "long";
import { TransactionBuilder } from "..";
import { InstanceID } from "../../../byzcoin";
export declare const contractID = "coin";
export declare const commandMint = "mint";
export declare const commandFetch = "fetch";
export declare const commandTransfer = "transfer";
export declare const commandStore = "store";
export declare const argumentCoinID = "coinID";
export declare const argumentDarcID = "darcID";
export declare const argumentType = "type";
export declare const argumentCoins = "coins";
export declare const argumentDestination = "destination";
export declare const ruleSpawn: string;
export declare const ruleMint: string;
export declare const ruleFetch: string;
export declare const ruleTransfer: string;
export declare const ruleStore: string;
/**
 * Generate the coin instance ID for a given darc ID
 *
 * @param buf Any buffer that is known to the caller
 * @returns the id as a buffer
 */
export declare function coinIID(buf: Buffer): InstanceID;
/**
 * Mints coins on ByzCoin. For this to work, the DARC governing this coin instance needs to have a
 * 'invoke.Coin.mint' rule and the instruction will need to be signed by the appropriate identity.
 *
 * @param tx used to collect one or more instructions
 * @param coinID to mint
 * @param amount positive, non-zero value to mint on this coin
 */
export declare function mint(tx: TransactionBuilder, coinID: InstanceID, amount: Long): void;
/**
 * Creates an instruction to transfer coins to another account.
 *
 * @param tx used to collect one or more instructions that will be bundled together and sent as one transaction
 * to byzcoin.
 * @param src the source account to fetch coins from.
 * @param dest the destination account to store the coins in. The destination must exist!
 * @param amount how many coins to transfer.
 */
export declare function transfer(tx: TransactionBuilder, src: InstanceID, dest: InstanceID, amount: Long): void;
/**
 * Fetches coins from a coinInstance and puts it on the ByzCoin 'stack' for use by the next instruction.
 * Unused coins are discarded by all nodes and thus lost.
 *
 * @param tx used to collect one or more instructions that will be bundled together and sent as one transaction
 * to byzcoin.
 * @param src the source account to fetch coins from.
 * @param amount how many coins to put on the stack
 */
export declare function fetch(tx: TransactionBuilder, src: InstanceID, amount: Long): void;
/**
 * Stores coins from the ByzCoin 'stack' in the given coin-account. Only the coins of the stack with the same
 * name are added to the destination account.
 *
 * @param tx used to collect one or more instructions that will be bundled together and sent as one transaction
 * to byzcoin.
 * @param dst where the coins to store
 */
export declare function store(tx: TransactionBuilder, dst: InstanceID): void;
