diff --git a/README.md b/README.md index 026ca6b..e52f15a 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ the transaction data from Bitcoin Core RPC server. ```ts import { tryDecodeRunestone, - isRunestoneArtifact, + isRunestone, RunestoneSpec, Cenotaph } from '@magiceden-oss/runestone-lib'; diff --git a/src/indexer/types.ts b/src/indexer/types.ts index cc16c51..e66c29b 100644 --- a/src/indexer/types.ts +++ b/src/indexer/types.ts @@ -50,7 +50,7 @@ export interface RunestoneStorage { /** * Get the total valid mint counts for rune up to and including specified block height. - * @param rune rune id string representation + * @param runeLocation rune id string representation * @param blockheight block height to count up to */ getValidMintCount(runeLocation: string, blockheight: number): Promise; diff --git a/src/runestone.ts b/src/runestone.ts index 97e6c67..253a8b0 100644 --- a/src/runestone.ts +++ b/src/runestone.ts @@ -250,7 +250,6 @@ export class Runestone { stack.push(MAGIC_NUMBER); const payload = Buffer.concat(payloads); - let i = 0; for (let i = 0; i < payload.length; i += MAX_SCRIPT_ELEMENT_SIZE) { stack.push(payload.subarray(i, i + MAX_SCRIPT_ELEMENT_SIZE)); } diff --git a/src/script.ts b/src/script.ts index a630045..2ec79ca 100644 --- a/src/script.ts +++ b/src/script.ts @@ -291,7 +291,7 @@ export namespace script { // attempt to read too much data? if (i + d.number > buffer.length) return false; - const data = buffer.slice(i, i + d.number); + const data = buffer.subarray(i, i + d.number); i += d.number; yield data; diff --git a/src/utils.ts b/src/utils.ts index 4ccdb44..909b527 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,4 +1,4 @@ -import { script, opcodes } from './script'; +import { script } from './script'; export namespace Instruction { export function isNumber(instruction: script.Instruction): instruction is number {