MCPcopy Create free account
hub / github.com/cardananium/cquisitor / getScriptRefTag

Function getScriptRefTag

src/utils/scriptRefFormat.ts:56–66  ·  view source on GitHub ↗
(koiosType: string)

Source from the content-addressed store, hash-verified

54 * - 3 = PlutusV3
55 */
56export function getScriptRefTag(koiosType: string): number {
57 const typeMap: Record<string, number> = {
58 'native': 0,
59 'timelock': 0,
60 'multisig': 0,
61 'plutusv1': 1,
62 'plutusv2': 2,
63 'plutusv3': 3,
64 };
65 return typeMap[koiosType.toLowerCase()] ?? 3; // default to PlutusV3 if unknown
66}
67
68/**
69 * Checks if the bytes are already in ScriptRef format (2-element CBOR array with valid tag)

Callers 1

wrapInScriptRefFormatFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected