bbclib.libs.bbclib_wire module

Copyright (c) 2018 beyond-blockchain.org.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

class bbclib.libs.bbclib_wire.BBcFormat[source]

Bases: object

FORMAT_PLAIN = 0
FORMAT_ZLIB = 16
classmethod generate(txobj, format_type=0)[source]

Transform transaction object in wire format

Parameters:
  • txobj – BBcTransaction object
  • format_type – 2-byte value of BBcFormat type
Returns:

binary data

classmethod strip(data)[source]

Strip 2-byte wire header and recover plain binary

Parameters:data – binary data with wire header
Returns:plain binary data without the header