import type { Input, MaybeReadResult, Output, ReadPosition, Sha256, TransactionCommon } from '../lib.js';
import { NonFungibleTokenCapability } from './transaction-types.js';
/**
* Encode a single input for inclusion in an encoded transaction.
*
* @param input - the input to encode
*/
export declare const encodeTransactionInput: (input: Input) => Uint8Array;
export declare enum TransactionDecodingError {
transaction = "Error reading transaction.",
endsWithUnexpectedBytes = "Error decoding transaction: the provided input includes unexpected bytes after the encoded transaction.",
input = "Error reading transaction input.",
inputs = "Error reading transaction inputs.",
output = "Error reading transaction output.",
outputs = "Error reading transaction outputs.",
outputsEndWithUnexpectedBytes = "Error decoding transaction outputs: the provided serialization includes unexpected bytes after the encoded transaction outputs.",
lockingBytecodeLength = "Error reading locking bytecode length."
}
/**
* Read a transaction {@link Input} from the provided {@link ReadPosition},
* returning either an error message (as a string) or an object containing the
* {@link Input} and the next {@link ReadPosition}.
* @param position - the {@link ReadPosition} at which to start reading the
* transaction output
*/
export declare const readTransactionInput: (position: ReadPosition) => MaybeReadResult;
/**
* Encode a set of {@link Input}s for inclusion in an encoded transaction
* including the prefixed number of inputs.
*
* Format: [CompactUint: input count] [encoded inputs]
*
* @param inputs - the set of inputs to encode
*/
export declare const encodeTransactionInputs: (inputs: Input[]) => Uint8Array;
/**
* Read a set of transaction {@link Input}s beginning at {@link ReadPosition}.
* A CompactUint will be read to determine the number of inputs, and that
* number of transaction inputs will be read and returned. Returns either an
* error message (as a string) or an object containing the array of inputs and
* the next {@link ReadPosition}.
*
* @param position - the {@link ReadPosition} at which to start reading the
* transaction inputs
*/
export declare const readTransactionInputs: (position: ReadPosition) => MaybeReadResult;
export declare const nftCapabilityNumberToLabel: readonly [NonFungibleTokenCapability.none, NonFungibleTokenCapability.mutable, NonFungibleTokenCapability.minting];
export declare const nftCapabilityLabelToNumber: {
[key in NonFungibleTokenCapability]: number;
};
export declare enum CashTokenDecodingError {
invalidPrefix = "Error reading token prefix.",
insufficientLength = "Invalid token prefix: insufficient length.",
reservedBit = "Invalid token prefix: reserved bit is set.",
invalidCapability = "Invalid token prefix: capability must be none (0), mutable (1), or minting (2).",
commitmentWithoutNft = "Invalid token prefix: commitment requires an NFT.",
capabilityWithoutNft = "Invalid token prefix: capability requires an NFT.",
commitmentLengthZero = "Invalid token prefix: if encoded, commitment length must be greater than 0.",
invalidCommitment = "Invalid token prefix: invalid non-fungible token commitment.",
invalidAmountEncoding = "Invalid token prefix: invalid fungible token amount encoding.",
zeroAmount = "Invalid token prefix: if encoded, fungible token amount must be greater than 0.",
excessiveAmount = "Invalid token prefix: exceeds maximum fungible token amount of 9223372036854775807.",
noTokens = "Invalid token prefix: must encode at least one token."
}
/**
* Read a token amount from the provided {@link ReadPosition}, returning either
* an error message (as a string) or an object containing the value and the next
* {@link ReadPosition}.
*
* @param position - the {@link ReadPosition} at which to start reading the
* token amount.
*/
export declare const readTokenAmount: (position: ReadPosition) => MaybeReadResult;
/**
* Attempt to read a transaction {@link Output}'s token prefix from the provided
* {@link ReadPosition}, returning either an error message (as a string) or an
* object containing the (optional) token information and the
* next {@link ReadPosition}.
*
* Rather than using this function directly, most applications
* should use {@link readLockingBytecodeWithPrefix}.
*
* @param position - the {@link ReadPosition} at which to start reading the
* token prefix
*/
export declare const readTokenPrefix: (position: ReadPosition) => MaybeReadResult<{
token?: NonNullable