public IKzWriter AddTo(IKzWriter writer) { writer .Add(_prevout) .Add(_scriptSig) .Add(_sequence); return writer; }
public IKzWriter AddTo(IKzWriter writer) { writer .Add(_value) .Add(_scriptPub) ; return(writer); }
public IKzWriter AddTo(IKzWriter w) { w.Add((byte)_code); if (_code >= KzOpcode.OP_PUSHDATA1 && _code <= KzOpcode.OP_PUSHDATA4) { var lengthBytes = BitConverter.GetBytes((uint)_data.Length).AsSpan(0, LengthBytesCount); w.Add(lengthBytes); } if (_data.Length > 0) { w.Add(_data.Sequence); } return(w); }
public IKzWriter AddTo(IKzWriter writer, bool withoutCodeSeparators = false) { if (withoutCodeSeparators) { var ops = Decode().Where(o => o.Code != KzOpcode.OP_CODESEPARATOR).ToArray(); writer.Add(ops.Length.AsVarIntBytes()); foreach (var op in ops) { writer.Add(op); } } else { writer .Add(_script.Length.AsVarIntBytes()) .Add(_script); } return(writer); }
public static IKzWriter Add(this IKzWriter w, KzOp op) => op.AddTo(w);
public static IKzWriter Add(this IKzWriter w, KzTransaction tx) => tx.AddTo(w);
public static IKzWriter Add(this IKzWriter w, KzTxOut txOut) => txOut.AddTo(w);
public static IKzWriter Add(this IKzWriter w, KzTxIn txIn) => txIn.AddTo(w);
public static IKzWriter Add(this IKzWriter w, KzScript script, bool withoutCodeSeparators = false) => script.AddTo(w, withoutCodeSeparators);
public IKzWriter AddTo(IKzWriter w) { w.Add(_txid).Add(_n); return(w); }
public IKzWriter AddTo(IKzWriter w) { w.Add(_HashTx).Add(_N); return(w); }