Move inscription type to utils

This commit is contained in:
natsoni
2024-10-08 12:53:18 +09:00
parent 1ddb8a39c9
commit 57a05c80a2
4 changed files with 12 additions and 13 deletions

View File

@@ -1,8 +1,6 @@
// Adapted from https://github.com/ordpool-space/ordpool-parser/tree/ce04d7a5b6bb1cf37b9fdadd77ba430f5bd6e7d6/src
// Utils functions to decode ord inscriptions
import { Inscription } from "../../components/ord-data/ord-data.component";
export const OP_FALSE = 0x00;
export const OP_IF = 0x63;
export const OP_0 = 0x00;
@@ -304,6 +302,15 @@ export function concatUint8Arrays(arrays: Uint8Array[]): Uint8Array {
////////////////////////////// Inscription ///////////////////////////
export interface Inscription {
body?: Uint8Array;
is_cropped?: boolean;
body_length?: number;
content_type?: Uint8Array;
content_type_str?: string;
delegate_txid?: string;
}
/**
* Extracts fields from the raw data until OP_0 is encountered.
*