@gobob/bob-sdk 3.1.3 → 3.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/runes.d.ts +3 -3
- package/dist/runes.js +9 -7
- package/dist/runes.js.map +1 -1
- package/package.json +3 -3
package/dist/runes.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as bitcoin from 'bitcoinjs-lib';
|
|
2
2
|
import { EsploraClient } from './esplora';
|
|
3
|
-
import {
|
|
4
|
-
export declare function parseRunestone(tx: bitcoin.Transaction):
|
|
5
|
-
export declare function getTxRunestone(esploraClient: EsploraClient, txid: string): Promise<
|
|
3
|
+
import { Cenotaph, RunestoneSpec } from '@magiceden-oss/runestone-lib';
|
|
4
|
+
export declare function parseRunestone(tx: bitcoin.Transaction): RunestoneSpec | Cenotaph | null;
|
|
5
|
+
export declare function getTxRunestone(esploraClient: EsploraClient, txid: string): Promise<RunestoneSpec | Cenotaph>;
|
package/dist/runes.js
CHANGED
|
@@ -26,14 +26,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.parseRunestone = parseRunestone;
|
|
27
27
|
exports.getTxRunestone = getTxRunestone;
|
|
28
28
|
const bitcoin = __importStar(require("bitcoinjs-lib"));
|
|
29
|
-
const
|
|
29
|
+
const runestone_lib_1 = require("@magiceden-oss/runestone-lib");
|
|
30
30
|
function parseRunestone(tx) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
const rune = (0, runestone_lib_1.tryDecodeRunestone)({
|
|
32
|
+
vout: tx.outs.map((out) => ({
|
|
33
|
+
scriptPubKey: {
|
|
34
|
+
hex: out.script.toString('hex'),
|
|
35
|
+
},
|
|
36
|
+
})),
|
|
37
|
+
});
|
|
38
|
+
return rune;
|
|
37
39
|
}
|
|
38
40
|
async function getTxRunestone(esploraClient, txid) {
|
|
39
41
|
const txHex = await esploraClient.getTransactionHex(txid);
|
package/dist/runes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runes.js","sourceRoot":"","sources":["../src/runes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"runes.js","sourceRoot":"","sources":["../src/runes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAIA,wCAUC;AAED,wCAIC;AApBD,uDAAyC;AAEzC,gEAA2F;AAE3F,SAAgB,cAAc,CAAC,EAAuB;IAClD,MAAM,IAAI,GAAG,IAAA,kCAAkB,EAAC;QAC5B,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YACxB,YAAY,EAAE;gBACV,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;aAClC;SACJ,CAAC,CAAC;KACN,CAAC,CAAC;IAEH,OAAO,IAAI,CAAC;AAChB,CAAC;AAEM,KAAK,UAAU,cAAc,CAAC,aAA4B,EAAE,IAAY;IAC3E,MAAM,KAAK,GAAG,MAAM,aAAa,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC1D,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC9C,OAAO,cAAc,CAAC,EAAE,CAAC,CAAC;AAC9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gobob/bob-sdk",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.4",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"yargs": "^17.5.1"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
+
"@magiceden-oss/runestone-lib": "^1.0.2",
|
|
42
43
|
"@scure/base": "^1.1.7",
|
|
43
44
|
"@scure/btc-signer": "^1.3.2",
|
|
44
45
|
"bitcoin-address-validation": "^2.2.3",
|
|
45
46
|
"bitcoinjs-lib": "^6.1.6",
|
|
46
|
-
"ethers": "^6.13.2"
|
|
47
|
-
"runestone-js": "0.3.0"
|
|
47
|
+
"ethers": "^6.13.2"
|
|
48
48
|
}
|
|
49
49
|
}
|