Skip to content

Commit

Permalink
Add test for pointer = 0
Browse files Browse the repository at this point in the history
  • Loading branch information
t4t5 committed Dec 22, 2024
1 parent fe771fa commit b8f9391
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/ordinals.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { deepStrictEqual } from 'node:assert';
import { deepStrictEqual, strictEqual } from 'node:assert';
import { describe, should } from 'micro-should';
import { hex, utf8 } from '@scure/base';
import * as btc from '@scure/btc-signer';
Expand Down Expand Up @@ -67,6 +67,17 @@ describe('Ordinals', () => {
});
});

should('support explicit pointer 0', () => {
const { TagCoder } = ordinals.__test__;
const encoded = TagCoder.decode({ pointer: 0n });

const encodedTag = encoded[0].tag[0]
const encodedValue = encoded[0].data[0]

strictEqual(encodedTag, 2);
strictEqual(encodedValue, 0);
})

should('inscription/11820782', () => {
// https://ordiscan.com/inscription/11820782
const rawTx = ordvectors[0].raw_tx;
Expand Down

0 comments on commit b8f9391

Please sign in to comment.