def _channel_update(short_channel_id: str, side: Side, disable: bool, cltv_expiry_delta: int, htlc_minimum_msat: int, fee_base_msat: int, fee_proportional_millionths: int, timestamp: Optional[int], htlc_maximum_msat: Optional[int], runner: Runner, event: Event, field: str) -> Message: """Get the channel_update""" if timestamp is None: timestamp = int(time.time()) return runner.get_stash(event, 'Commit').channel_update( short_channel_id, side, disable, cltv_expiry_delta, htlc_maximum_msat, fee_base_msat, fee_proportional_millionths, timestamp, htlc_maximum_msat)
def _channel_id(runner: Runner, event: Event, field: str) -> str: return runner.get_stash(event, 'Commit').channel_id_v2()
def _channel_announcement(short_channel_id: str, features: bytes, runner: Runner, event: Event, field: str) -> Message: return runner.get_stash(event, 'Commit').channel_announcement( short_channel_id, features)
def _funding_close_tx(runner: Runner, event: Event, field: str) -> str: return runner.get_stash(event, 'Funding').close_tx()
def _htlc_sigs(signer: Side, runner: Runner, event: Event, field: str) -> str: sigs = runner.get_stash(event, 'Commit').htlc_sigs(signer, not signer) return '[' + ','.join([sig.to_str() for sig in sigs]) + ']'
def _witnesses(runner: Runner, event: Event, field: str) -> str: funding = runner.get_stash(event, 'Funding') return funding.our_witnesses()
def _locking_script(runner: Runner, event: Event, field: str) -> str: return runner.get_stash(event, 'Funding').locking_script().hex()
def _funding(runner: Runner, event: Event, field: str) -> Funding: return runner.get_stash(event, 'Funding')
def _funding_txid(runner: Runner, event: Event, field: str) -> str: return runner.get_stash(event, 'Funding').txid
def _commitsig_to_recv(runner: Runner, event: Event, field: str) -> str: tx = runner.get_stash(event, 'Commit').local_unsigned_tx() return runner.get_stash(event, 'Commit').remote_sig(tx)
def _funding_pubkey(side: Side, runner: Runner, event: Event, field: str) -> str: return coincurve.PublicKey.from_secret( runner.get_stash(event, 'Funding').funding_privkeys[side].secret)
def _funding_amount(runner: Runner, event: Event, field: str) -> int: return runner.get_stash(event, 'Funding').amount