113
113
/// ## SEQUENCE_LOCKTIME_MASK
114
114
/// If CTxIn::nSequence encodes a relative lock-time, this mask is applied to
115
115
/// extract that lock-time from the sequence field.
116
- class ScriptFlags {
116
+ public class ScriptFlags {
117
117
118
118
/// bitcoind commit: b5d1b1092998bc95313856d535c632ea5a8f9104
119
- static final int SCRIPT_VERIFY_NONE = 0 ;
119
+ public static final int SCRIPT_VERIFY_NONE = 0 ;
120
120
121
121
/// Evaluate P2SH subscripts (softfork safe, BIP16).
122
- static final int SCRIPT_VERIFY_P2SH = (1 << 0 );
122
+ public static final int SCRIPT_VERIFY_P2SH = (1 << 0 );
123
123
124
124
125
125
/// Passing a non-strict-DER signature or one with undefined hashtype to a checksig operation causes script failure.
126
126
/// Passing a pubkey that is not (0x04 + 64 bytes) or (0x02 or 0x03 + 32 bytes) to checksig causes that pubkey to be
127
127
/// skipped (not softfork safe: this flag can widen the validity of OP_CHECKSIG OP_NOT).
128
- static final int SCRIPT_VERIFY_STRICTENC = (1 << 1 );
128
+ public static final int SCRIPT_VERIFY_STRICTENC = (1 << 1 );
129
129
130
130
/// Passing a non-strict-DER signature to a checksig operation causes script failure (softfork safe, BIP62 rule 1)
131
- static final int SCRIPT_VERIFY_DERSIG = (1 << 2 );
131
+ public static final int SCRIPT_VERIFY_DERSIG = (1 << 2 );
132
132
133
133
/// Pa non-strict-DER signature or one with S > order/2 to a checksig operation causes script failure
134
134
/// (softfork safe, BIP62 rule 5).
135
- static final int SCRIPT_VERIFY_LOW_S = (1 << 3 );
135
+ public static final int SCRIPT_VERIFY_LOW_S = (1 << 3 );
136
136
137
137
/// verify dummy stack item consumed by CHECKMULTISIG is of zero-length (softfork safe, BIP62 rule 7).
138
- static final int SCRIPT_VERIFY_NULLDUMMY = (1 << 4 );
138
+ public static final int SCRIPT_VERIFY_NULLDUMMY = (1 << 4 );
139
139
140
140
/// Using a non-push operator in the scriptSig causes script failure (softfork safe, BIP62 rule 2).
141
- static final int SCRIPT_VERIFY_SIGPUSHONLY = (1 << 5 );
141
+ public static final int SCRIPT_VERIFY_SIGPUSHONLY = (1 << 5 );
142
142
143
143
/// Require minimal encodings for all push operations (OP_0... OP_16, OP_1NEGATE where possible, direct
144
144
/// pushes up to 75 bytes, OP_PUSHDATA up to 255 bytes, OP_PUSHDATA2 for anything larger). Evaluating
145
145
/// any other push causes the script to fail (BIP62 rule 3).
146
146
/// In addition, whenever a stack element is interpreted as a number, it must be of minimal length (BIP62 rule 4).
147
147
/// (softfork safe)
148
- static final int SCRIPT_VERIFY_MINIMALDATA = (1 << 6 );
148
+ public static final int SCRIPT_VERIFY_MINIMALDATA = (1 << 6 );
149
149
150
150
/// Discourage use of NOPs reserved for upgrades (NOP1-10)
151
151
///
@@ -155,7 +155,7 @@ class ScriptFlags {
155
155
/// discouraged NOPs fails the script. This verification flag will never be
156
156
/// a mandatory flag applied to scripts in a block. NOPs that are not
157
157
/// executed, e.g. within an unexecuted IF ENDIF block, are *not* rejected.
158
- static final int SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS = (1 << 7 );
158
+ public static final int SCRIPT_VERIFY_DISCOURAGE_UPGRADABLE_NOPS = (1 << 7 );
159
159
160
160
/// Require that only a single stack element remains after evaluation. This
161
161
/// changes the success criterion from "At least one stack element must
@@ -164,62 +164,62 @@ class ScriptFlags {
164
164
/// be true".
165
165
/// (softfork safe, BIP62 rule 6)
166
166
/// Note: CLEANSTACK should never be used without P2SH or WITNESS.
167
- static final int SCRIPT_VERIFY_CLEANSTACK = (1 << 8 );
167
+ public static final int SCRIPT_VERIFY_CLEANSTACK = (1 << 8 );
168
168
169
169
/// Cstatic final LTV See BIP65 for details.
170
- static final int SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY = (1 << 9 );
170
+ public static final int SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY = (1 << 9 );
171
171
172
172
/// support CHECKSEQUENCEVERIFY opcode
173
173
///
174
174
/// See BIP112 for details
175
- static final int SCRIPT_VERIFY_CHECKSEQUENCEVERIFY = (1 << 10 );
175
+ public static final int SCRIPT_VERIFY_CHECKSEQUENCEVERIFY = (1 << 10 );
176
176
177
177
/// Segwit script only: Require the argument of OP_IF/NOTIF to be exactly
178
178
/// 0x01 or empty vector
179
179
///
180
- static final int SCRIPT_VERIFY_MINIMALIF = (1 << 13 );
180
+ public static final int SCRIPT_VERIFY_MINIMALIF = (1 << 13 );
181
181
182
182
/// Signature(s) must be empty vector if an CHECK(MULTI)SIG operation failed
183
183
///
184
- static final int SCRIPT_VERIFY_NULLFAIL = (1 << 14 );
184
+ public static final int SCRIPT_VERIFY_NULLFAIL = (1 << 14 );
185
185
186
186
/// Public keys in scripts must be compressed
187
- static final int SCRIPT_VERIFY_COMPRESSED_PUBKEYTYPE = (1 << 15 );
187
+ public static final int SCRIPT_VERIFY_COMPRESSED_PUBKEYTYPE = (1 << 15 );
188
188
189
189
/// Do we accept signature using SIGHASH_FORKID
190
190
///
191
- static final int SCRIPT_ENABLE_SIGHASH_FORKID = (1 << 16 );
191
+ public static final int SCRIPT_ENABLE_SIGHASH_FORKID = (1 << 16 );
192
192
193
193
/// Do we accept activate replay protection using a different fork id.
194
194
///
195
- static final int SCRIPT_ENABLE_REPLAY_PROTECTION = (1 << 17 );
195
+ public static final int SCRIPT_ENABLE_REPLAY_PROTECTION = (1 << 17 );
196
196
197
197
/// Enable new opcodes.
198
198
///
199
- static final int SCRIPT_ENABLE_MONOLITH_OPCODES = (1 << 18 );
199
+ public static final int SCRIPT_ENABLE_MONOLITH_OPCODES = (1 << 18 );
200
200
201
201
/// Are the Magnetic upgrade opcodes enabled?
202
202
///
203
- static final int SCRIPT_ENABLE_MAGNETIC_OPCODES = (1 << 19 );
203
+ public static final int SCRIPT_ENABLE_MAGNETIC_OPCODES = (1 << 19 );
204
204
205
205
/// *Below flags apply in the context of BIP 68*
206
206
///
207
207
/// If this flag set, CTxIn::nSequence is NOT interpreted as a relative lock-time.
208
208
209
- static final int SEQUENCE_LOCKTIME_DISABLE_FLAG = (1 << 31 );
209
+ public static final int SEQUENCE_LOCKTIME_DISABLE_FLAG = (1 << 31 );
210
210
211
211
212
212
/// If CTxIn::nSequence encodes a relative lock-time and this flag is set,
213
213
/// the relative lock-time has units of 512 seconds, otherwise it specifies
214
214
/// blocks with a granularity of 1.
215
215
216
- static final int SEQUENCE_LOCKTIME_TYPE_FLAG = (1 << 22 );
216
+ public static final int SEQUENCE_LOCKTIME_TYPE_FLAG = (1 << 22 );
217
217
218
218
///
219
219
/// If CTxIn::nSequence encodes a relative lock-time, this mask is applied to
220
220
/// extract that lock-time from the sequence field.
221
221
///
222
- static final int SEQUENCE_LOCKTIME_MASK = 0x0000ffff ;
222
+ public static final int SEQUENCE_LOCKTIME_MASK = 0x0000ffff ;
223
223
224
224
225
225
}
0 commit comments