@mutants/cardano-tx-builder
Version:
A package that provides utility functions to build and destructure a cardano transaction
35 lines • 1.06 kB
TypeScript
import { AssetValue, BlockfrostAssetValue, UTxO, Value } from "./types";
export declare class ValueBuilder {
private totalLovelace;
private utxos;
private assetMap;
constructor();
addAsset(asset: string, quantity: bigint): this | undefined;
hasUTxO(utxo: UTxO): boolean;
addUTxO(utxo: UTxO): this;
addLovelace(quantity: bigint): this;
addValue(value: Value): this;
getAssetQuantity(asset: string): bigint;
getTotalLovelace(): bigint;
getUnlockedLovelace(): bigint;
isEmpty(): boolean;
areAllAssetsEmptyOrNegative(): boolean;
hasAnyNegativeAssetOrLovelace(): boolean;
getNegativeValues(): Value;
getUTxOs(): UTxO[];
/**
* Take an array of asset values and load them into the map
* @param values
*/
loadValues(values: (AssetValue | BlockfrostAssetValue)[]): this;
/**
* Makes all asset quantities absolute
*/
abs(): this;
/**
* Revers all asset quantities
*/
revert(): void;
build(): Value;
}
//# sourceMappingURL=valueBuilder.d.ts.map