All files / src/Utxo/DbSyncUtxoProvider types.ts

100% Statements 6/6
100% Branches 2/2
100% Functions 1/1
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34                                                    36x 36x 36x 36x 36x 36x    
/* eslint-disable @typescript-eslint/no-explicit-any */
/*
 * There will be as many rows as tokens are in Value object
 */
export interface UtxoModel {
  address: string;
  coins: string;
  index: number;
  tx_id: string;
  asset_quantity?: string;
  asset_name?: string;
  asset_policy?: string;
  data_hash?: string;
  inline_datum?: string;
  reference_script_type?: string;
  /** CBOR encoded plutus script data, null for other script types */
  reference_script_bytes?: string;
  /** JSON representation of the timelock and multisig script, null for other script types */
  reference_script_json?: any;
}
 
/**
 * Currently supported reference scripts types according to dbSync:
 *
 * https://github.com/input-output-hk/cardano-db-sync/blob/master/cardano-db/src/Cardano/Db/Types.hs#L258-L264
 */
export enum ReferenceScriptType {
  Multisig = 'multisig',
  Timelock = 'timelock',
  PlutusV1 = 'plutusV1',
  PlutusV2 = 'plutusV2',
  PlutusV3 = 'plutusV3'
}