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

Commit 88d8df1

Browse files
author
Gabriel Cardona
committed
Add createValidator docs.
1 parent 2086459 commit 88d8df1

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

src/data/docs/slp/utils.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ Validate that txid is an SLP transaction
221221

222222
1. txid : `String` required. The transaction id to validate
223223
2. network : `String` required. mainnet or testnet
224+
3. getRawTransactions: `Function` optional.
224225

225226
#### Result
226227

@@ -243,3 +244,30 @@ isValid : `Boolean`
243244

244245
// returns
245246
true
247+
248+
### `createValidator`
249+
250+
Create and return a local validator
251+
252+
#### Arguments
253+
254+
1. network : `String` required. mainnet or testnet
255+
2. getRawTransactions: `Function` optional.
256+
257+
#### Result
258+
259+
slpValidator : `slpValidator`
260+
261+
#### Examples
262+
263+
// validate SLP txid
264+
(async () => {
265+
try {
266+
let slpValidator = await SLP.Utils.createValidator(
267+
"mainnet"
268+
);
269+
console.log(slpValidator);
270+
} catch (error) {
271+
console.error(error);
272+
}
273+
})();

0 commit comments

Comments
 (0)