package bitcoinml

  1. Overview
  2. Docs
module SStack : sig ... end
type opcode =
  1. | OP_COINBASE of bytes
  2. | OP_0
  3. | OP_FALSE
  4. | OP_DATA of int * bytes
  5. | OP_PUSHDATA1 of int * bytes
  6. | OP_PUSHDATA2 of int * int * bytes
  7. | OP_PUSHDATA4 of int * int * int * int * bytes
  8. | OP_1NEGATE
  9. | OP_1
  10. | OP_TRUE
  11. | OP_2
  12. | OP_3
  13. | OP_4
  14. | OP_5
  15. | OP_6
  16. | OP_7
  17. | OP_8
  18. | OP_9
  19. | OP_10
  20. | OP_11
  21. | OP_12
  22. | OP_13
  23. | OP_14
  24. | OP_15
  25. | OP_16
  26. | OP_IF
  27. | OP_NOTIF
  28. | OP_ELSE
  29. | OP_ENDIF
  30. | OP_VERIFY
  31. | OP_RETURN of bytes
  32. | OP_TOALTSTACK
  33. | OP_FROMALTSTACK
  34. | OP_IFDUP
  35. | OP_DEPTH
  36. | OP_DROP
  37. | OP_DUP
  38. | OP_NIP
  39. | OP_OVER
  40. | OP_PICK
  41. | OP_ROLL
  42. | OP_ROT
  43. | OP_SWAP
  44. | OP_TUCK
  45. | OP_2DROP
  46. | OP_2DUP
  47. | OP_3DUP
  48. | OP_2OVER
  49. | OP_2ROT
  50. | OP_2SWAP
  51. | OP_CAT
  52. | OP_SUBSTR
  53. | OP_LEFT
  54. | OP_RIGHT
  55. | OP_SIZE
  56. | OP_INVERT
  57. | OP_AND
  58. | OP_OR
  59. | OP_XOR
  60. | OP_EQUAL
  61. | OP_EQUALVERIFY
  62. | OP_1ADD
  63. | OP_1SUB
  64. | OP_2MUL
  65. | OP_2DIV
  66. | OP_NEGATE
  67. | OP_ABS
  68. | OP_NOT
  69. | OP_0NOTEQUAL
  70. | OP_ADD
  71. | OP_SUB
  72. | OP_MUL
  73. | OP_DIV
  74. | OP_MOD
  75. | OP_LSHIFT
  76. | OP_RSHIFT
  77. | OP_BOOLAND
  78. | OP_BOOLOR
  79. | OP_NUMEQUAL
  80. | OP_NUMEQUALVERIFY
  81. | OP_NUMNOTEQUAL
  82. | OP_LESSTHAN
  83. | OP_GREATERTHAN
  84. | OP_LESSTHANOREQUAL
  85. | OP_GREATERTHANOREQUAL
  86. | OP_MIN
  87. | OP_MAX
  88. | OP_WITHIN
  89. | OP_RIPEMD160
  90. | OP_SHA1
  91. | OP_SHA256
  92. | OP_HASH160
  93. | OP_HASH256
  94. | OP_CODESEPARATOR
  95. | OP_CHECKSIG
  96. | OP_CHECKSIGVERIFY
  97. | OP_CHECKMULTISIG
  98. | OP_CHECKMULTISIGVERIFY
  99. | OP_CHECKLOCKTIMEVERIFY
  100. | OP_CHECKSEQUENCEVERIFY
  101. | OP_PUBKEYHASH
  102. | OP_PUBKEY
  103. | OP_INVALIDOPCODE
  104. | OP_RESERVED
  105. | OP_VER
  106. | OP_VERIF
  107. | OP_VERNOTIF
  108. | OP_RESERVED1
  109. | OP_RESERVED2
  110. | OP_NOP of int
val opcode_to_string : opcode -> string
val opcode_to_hex : opcode -> int list
val opcode_of_hex : bytes -> opcode * bytes
type t = opcode list * int
val length : t -> int
val serialize : t -> bytes
val parse : bytes -> t
val parse_coinbase : bytes -> t
val verify : t -> t -> bool
val to_string : t -> string
val is_spendable : t -> bool
val spendable_by : t -> string option
OCaml

Innovation. Community. Security.