Skip to content

Following BIP62.3, this module validates that a script uses only minimal data pushes.

License

Notifications You must be signed in to change notification settings

dart-bitcoin-lib/dart-minimaldata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dart_minimaldata

Following BIP62.3, this module validates that a script uses only minimal data pushes.

Example

import 'dart:typed_data';

import 'package:dart_minimaldata/dart_minimaldata.dart';

void main() {
  // OP_PUSHDATA4, 1 byte
  Uint8List script = Uint8List.fromList([0x4e, 0x01, 0x00, 0x00, 0x00, 0x00]);
  print(bip62(script));
  // => false

  script = Uint8List.fromList([0x00, 0x00, 0x00]);
  print(bip62(script));
  // => true
}

LICENSE MIT

About

Following BIP62.3, this module validates that a script uses only minimal data pushes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages