Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Commit ca50837

Browse files
author
Gabriel Cardona
committed
Update example.
1 parent d657df1 commit ca50837

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

src/data/docs/slp/utils.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,16 @@ slpValidator : `slpValidator`
263263
// create validator
264264
(async () => {
265265
try {
266-
let slpValidator = await SLP.Utils.createValidator(
267-
"mainnet"
268-
);
269-
console.log(slpValidator);
266+
const slpValidator = SLP.Utils.createValidator(
267+
process.env.NETWORK,
268+
getRawTransactionsFromNode.bind(this)
269+
)
270+
const isValid = await slpValidator.isValidSlpTxid(txid)
271+
console.log(isvalid)
270272
} catch (error) {
271273
console.error(error);
272274
}
273275
})();
276+
277+
// returns
278+
// true

0 commit comments

Comments
 (0)