code: def register_onchain_secret(
          channel_state: NettingChannelState,
          secret: Secret,
          secrethash: SecretHash,
          secret_reveal_block_number: BlockNumber,
          delete_lock: bool = True,
  ) -> None:
      
      our_state = channel_state.our_state
      partner_state = channel_state.partner_state
  
      register_onchain_secret_endstate(
          our_state,
          secret,
          secrethash,
          secret_reveal_block_number,
          delete_lock,
      )
      register_onchain_secret_endstate(
          partner_state,
          secret,
          secrethash,
          secret_reveal_block_number,
          delete_lock,
      )
docs: This will register the onchain secret and set the lock to the unlocked stated.
  
      Even though the lock is unlocked it is *not* claimed. The capacity will
      increase once the next balance proof is received.