mirror of
https://github.com/mempool/mempool.git
synced 2025-03-13 11:36:07 +01:00
Move inscription type to utils
This commit is contained in:
parent
1ddb8a39c9
commit
57a05c80a2
4 changed files with 12 additions and 13 deletions
|
@ -1,14 +1,6 @@
|
|||
import { ChangeDetectionStrategy, Component, Input, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { Runestone, Etching } from '../../shared/ord/rune.utils';
|
||||
|
||||
export interface Inscription {
|
||||
body?: Uint8Array;
|
||||
is_cropped?: boolean;
|
||||
body_length?: number;
|
||||
content_type?: Uint8Array;
|
||||
content_type_str?: string;
|
||||
delegate_txid?: string;
|
||||
}
|
||||
import { Inscription } from '../../shared/ord/inscription.utils';
|
||||
|
||||
@Component({
|
||||
selector: 'app-ord-data',
|
||||
|
|
|
@ -12,7 +12,7 @@ import { ApiService } from '../../services/api.service';
|
|||
import { PriceService } from '../../services/price.service';
|
||||
import { StorageService } from '../../services/storage.service';
|
||||
import { OrdApiService } from '../../services/ord-api.service';
|
||||
import { Inscription } from '../ord-data/ord-data.component';
|
||||
import { Inscription } from '../../shared/ord/inscription.utils';
|
||||
import { Etching, Runestone } from '../../shared/ord/rune.utils';
|
||||
|
||||
@Component({
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { catchError, forkJoin, map, Observable, of, switchMap, tap } from 'rxjs';
|
||||
import { Inscription } from '../components/ord-data/ord-data.component';
|
||||
import { Inscription } from '../shared/ord/inscription.utils';
|
||||
import { Transaction } from '../interfaces/electrs.interface';
|
||||
import { getNextInscriptionMark, hexToBytes, extractInscriptionData } from '../shared/ord/inscription.utils';
|
||||
import { decipherRunestone, Runestone, Etching, UNCOMMON_GOODS } from '../shared/ord/rune.utils';
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue