本文整理匯總了Python中ckcc.protocol.CCProtocolPacker.sign_transaction方法的典型用法代碼示例。如果您正苦於以下問題:Python CCProtocolPacker.sign_transaction方法的具體用法?Python CCProtocolPacker.sign_transaction怎麽用?Python CCProtocolPacker.sign_transaction使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ckcc.protocol.CCProtocolPacker
的用法示例。
在下文中一共展示了CCProtocolPacker.sign_transaction方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: sign_transaction_start
# 需要導入模塊: from ckcc.protocol import CCProtocolPacker [as 別名]
# 或者: from ckcc.protocol.CCProtocolPacker import sign_transaction [as 別名]
def sign_transaction_start(self, raw_psbt, finalize=True):
# Multiple steps to sign:
# - upload binary
# - start signing UX
# - wait for coldcard to complete process, or have it refused.
# - download resulting txn
assert 20 <= len(raw_psbt) < MAX_TXN_LEN, 'PSBT is too big'
dlen, chk = self.dev.upload_file(raw_psbt)
resp = self.dev.send_recv(CCProtocolPacker.sign_transaction(dlen, chk, finalize=finalize),
timeout=None)
if resp != None:
raise ValueError(resp)