slp_parser 0.1.0 copy "slp_parser: ^0.1.0" to clipboard
slp_parser: ^0.1.0 copied to clipboard

Parse Simple Ledger Protocol OP_RETURN data segments with ease!

example/main.dart

import 'package:slp_parser/slp_parser.dart';
import 'package:convert/convert.dart';

main() {
  var scriptPubKey = '6a04534c500001010747454e455349530ce3838ae382abe383a2e383884c004c004c0001094c00080000000000000064';
  var slpMsg = parseSLP(hex.decode(scriptPubKey));
  print('Parsed results (raw form):\n ${slpMsg.toMap(raw: true)}');
  print('Parsed results (readable form):\n ${slpMsg.toMap()}');

  scriptPubKey = '6a04534c500001010453454e44208888888888888888888888888888888888888888888888888888888888888888080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001080000000000000001';
  slpMsg = parseSLP(hex.decode(scriptPubKey));
  print('Parsed results (raw form):\n ${slpMsg.toMap(raw: true)}');
  print('Parsed results (readable form):\n ${slpMsg.toMap()}');
}
2
likes
120
pub points
0%
popularity

Publisher

verified publisherslp.dev

Parse Simple Ledger Protocol OP_RETURN data segments with ease!

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

convert

More

Packages that depend on slp_parser