MCPcopy Index your code
hub / github.com/0xsequence/czip / WriteSequenceNestedSignaturePart

Method WriteSequenceNestedSignaturePart

compressor/encode.go:743–758  ·  view source on GitHub ↗
(weight uint, threshold uint, branch []byte)

Source from the content-addressed store, hash-verified

741}
742
743func (buf *Buffer) WriteSequenceNestedSignaturePart(weight uint, threshold uint, branch []byte) (EncodeType, error) {
744 if weight > 255 {
745 return Stateless, fmt.Errorf("weight exceeds 255")
746 }
747
748 if threshold > 255 {
749 return Stateless, fmt.Errorf("threshold exceeds 255")
750 }
751
752 buf.commitUint(FLAG_SEQUENCE_NESTED)
753 buf.commitUint(weight)
754 buf.commitUint(threshold)
755 buf.end([]byte{}, Stateless)
756
757 return buf.WriteSequenceSignatureTree(branch)
758}
759
760func (buf *Buffer) WriteSequenceBranchSignaturePart(branch []byte) (EncodeType, error) {
761 if len(branch) == 0 {

Calls 3

commitUintMethod · 0.95
endMethod · 0.95

Tested by

no test coverage detected