Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions iota/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ def prepare_transfer(
def promote_transaction(
self,
transaction,
depth,
depth=3,
min_weight_magnitude=None,
):
# type: (TransactionHash, int, Optional[int]) -> dict
Expand All @@ -921,7 +921,7 @@ def promote_transaction(
def replay_bundle(
self,
transaction,
depth,
depth=3,
min_weight_magnitude=None,
):
# type: (TransactionHash, int, Optional[int]) -> dict
Expand All @@ -935,6 +935,7 @@ def replay_bundle(

:param depth:
Depth at which to attach the bundle.
Defaults to 3.

:param min_weight_magnitude:
Min weight magnitude, used by the node to calibrate Proof of
Expand Down Expand Up @@ -965,8 +966,8 @@ def replay_bundle(

def send_transfer(
self,
depth, # type: int
transfers, # type: Iterable[ProposedTransaction]
depth=3, # type: int
inputs=None, # type: Optional[Iterable[Address]]
change_address=None, # type: Optional[Address]
min_weight_magnitude=None, # type: Optional[int]
Expand All @@ -978,12 +979,13 @@ def send_transfer(
attaches the bundle to the Tangle, and broadcasts and stores the
transactions.

:param depth:
Depth at which to attach the bundle.

:param transfers:
Transfers to include in the bundle.

:param depth:
Depth at which to attach the bundle.
Defaults to 3.

:param inputs:
List of inputs used to fund the transfer.
Not needed for zero-value transfers.
Expand Down Expand Up @@ -1035,7 +1037,7 @@ def send_transfer(
securityLevel=security_level,
)

def send_trytes(self, trytes, depth, min_weight_magnitude=None):
def send_trytes(self, trytes, depth=3, min_weight_magnitude=None):
# type: (Iterable[TransactionTrytes], int, Optional[int]) -> dict
"""
Attaches transaction trytes to the Tangle, then broadcasts and
Expand All @@ -1046,6 +1048,7 @@ def send_trytes(self, trytes, depth, min_weight_magnitude=None):

:param depth:
Depth at which to attach the bundle.
Defaults to 3.

:param min_weight_magnitude:
Min weight magnitude, used by the node to calibrate Proof of
Expand Down