Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Deprecation Warning and Resolve Minor Issues #78

Merged
merged 2 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ the transaction data from Bitcoin Core RPC server.
```ts
import {
tryDecodeRunestone,
isRunestoneArtifact,
isRunestone,
RunestoneSpec,
Cenotaph
} from '@magiceden-oss/runestone-lib';
Expand Down
2 changes: 1 addition & 1 deletion src/indexer/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<number>;
Expand Down
1 change: 0 additions & 1 deletion src/runestone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
2 changes: 1 addition & 1 deletion src/script.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down