tfchain/TFChainWallet.py
def participate(self, initiator, amount, secret_hash, refund_time='+24h', source=None, refund=None, data=None, submit=True):
        """
        Initiate an atomic swap contract, targeted at the specified address,
        with the given amount. By default a 24 hours duration (starting from last block time)
        is used as time until contract can be refunded, but this can be changed.

        The amount can be a str or an int:
            - when it is an int, you are defining the amount in the smallest unit (that is 1 == 0.000000001 TFT)
            - when defining as a str you can use the following space-stripped and case-insentive formats:
                - '123456789': same as when defining the amount as an int
                - '123.456': define the amount in TFT (that is '123.456' == 123.456 TFT == 123456000000)
                - '123456 TFT': define the amount in TFT (that is '123456 TFT' == 123456 TFT == 123456000000000)
                - '123.456 TFT': define the amount in TFT (that is '123.456 TFT' == 123.456 TFT == 123456000000)

        Returns the AtomicSwapParticipationResult.

        @param initiator: str (or unlockhash) of a personal wallet
        @param amount: int or str that defines the amount of TFT to set, see explanation above
        @param secret_hash: the secret hash to be use, the same secret hash as used for the initiation contract
        @param duration: the duration until the atomic swap contract becomes refundable
        @param source: one or multiple addresses/unlockhashes from which to fund this coin send transaction, by default all personal wallet addresses are used, only known addresses can be used
        @param refund: optional refund address, by default is uses the source if it specifies a single address otherwise it uses the default wallet address (can only be a personal wallet address)
        @param data: optional data that can be attached ot the sent transaction (str or bytes), with a max length of 83
        @param submit: True by default, if False the transaction will not be sent even if possible (e.g. if you want to double check)
        """
        # normalize secret hash
        secret_hash = AtomicSwapSecretHash(value=secret_hash)

        # create the contract and return the contract, transaction and submission status
        result = self._create_contract(
            recipient=initiator, amount=amount, refund_time=refund_time, source=source,
            refund=refund, data=data, secret_hash=secret_hash, submit=submit)
        return AtomicSwapParticipationResult(
            AtomicSwapContract(coinoutput=result.transaction.coin_outputs[0], unspent=True, current_timestamp=self._chain_time),
            result.transaction, result.submitted)

        Initiate an atomic swap contract, targeted at the specified address,
        with the given amount. By default a 24 hours duration (starting from last block time)
        is used as time until contract can be refunded, but this can be changed.

        The amount can be a str or an int:
            - when it is an int, you are defining the amount in the smallest unit (that is 1 == 0.000000001 TFT)
            - when defining as a str you can use the following space-stripped and case-insentive formats:
                - '123456789': same as when defining the amount as an int
                - '123.456': define the amount in TFT (that is '123.456' == 123.456 TFT == 123456000000)
                - '123456 TFT': define the amount in TFT (that is '123456 TFT' == 123456 TFT == 123456000000000)
                - '123.456 TFT': define the amount in TFT (that is '123.456 TFT' == 123.456 TFT == 123456000000)

        Returns the AtomicSwapParticipationResult.

        @param initiator: str (or unlockhash) of a personal wallet
        @param amount: int or str that defines the amount of TFT to set, see explanation above
        @param secret_hash: the secret hash to be use, the same secret hash as used for the initiation contract
        @param duration: the duration until the atomic swap contract becomes refundable
        @param source: one or multiple addresses/unlockhashes from which to fund this coin send transaction, by default all personal wallet addresses are used, only known addresses can be used
        @param refund: optional refund address, by default is uses the source if it specifies a single address otherwise it uses the default wallet address (can only be a personal wallet address)
        @param data: optional data that can be attached ot the sent transaction (str or bytes), with a max length of 83
        @param submit: True by default, if False the transaction will not be sent even if possible (e.g. if you want to double check)
        
Initiate an atomic swap contract, targeted at the specified address,
with the given amount. By default a 24 hours duration (starting from last block time)
is used as time until contract can be refunded, but this can be changed.




Initiate an atomic swap contract targeted at the specified address with the given amount . By default a 24 hours duration ( starting from last block time ) is used as time until contract can be refunded but this can be changed .
def participate(self, initiator, amount, secret_hash, refund_time='+24h', source=None, refund=None, data=None, submit=True):
        secret_hash = AtomicSwapSecretHash(value=secret_hash)
        result = self._create_contract(
            recipient=initiator, amount=amount, refund_time=refund_time, source=source,
            refund=refund, data=data, secret_hash=secret_hash, submit=submit)
        return AtomicSwapParticipationResult(
            AtomicSwapContract(coinoutput=result.transaction.coin_outputs[0], unspent=True, current_timestamp=self._chain_time),
            result.transaction, result.submitted)
def participate ( self , initiator , amount , secret_hash , refund_time = '+24h' , source = None , refund = None , data = None , submit = True ) : secret_hash = AtomicSwapSecretHash ( value = secret_hash ) result = self . _create_contract ( recipient = initiator , amount = amount , refund_time = refund_time , source = source , refund = refund , data = data , secret_hash = secret_hash , submit = submit ) return AtomicSwapParticipationResult ( AtomicSwapContract ( coinoutput = result . transaction . coin_outputs [ 0 ] , unspent = True , current_timestamp = self . _chain_time ) , result . transaction , result . submitted )
Initiate an atomic swap contract, targeted at the specified address,
with the given amount.
Initiate an atomic swap contract targeted at the specified address with the given amount .
"""
        Initiate an atomic swap contract, targeted at the specified address,
        with the given amount. By default a 24 hours duration (starting from last block time)
        is used as time until contract can be refunded, but this can be changed.

        The amount can be a str or an int:
            - when it is an int, you are defining the amount in the smallest unit (that is 1 == 0.000000001 TFT)
            - when defining as a str you can use the following space-stripped and case-insentive formats:
                - '123456789': same as when defining the amount as an int
                - '123.456': define the amount in TFT (that is '123.456' == 123.456 TFT == 123456000000)
                - '123456 TFT': define the amount in TFT (that is '123456 TFT' == 123456 TFT == 123456000000000)
                - '123.456 TFT': define the amount in TFT (that is '123.456 TFT' == 123.456 TFT == 123456000000)

        Returns the AtomicSwapParticipationResult.

        @param initiator: str (or unlockhash) of a personal wallet
        @param amount: int or str that defines the amount of TFT to set, see explanation above
        @param secret_hash: the secret hash to be use, the same secret hash as used for the initiation contract
        @param duration: the duration until the atomic swap contract becomes refundable
        @param source: one or multiple addresses/unlockhashes from which to fund this coin send transaction, by default all personal wallet addresses are used, only known addresses can be used
        @param refund: optional refund address, by default is uses the source if it specifies a single address otherwise it uses the default wallet address (can only be a personal wallet address)
        @param data: optional data that can be attached ot the sent transaction (str or bytes), with a max length of 83
        @param submit: True by default, if False the transaction will not be sent even if possible (e.g. if you want to double check)
        """ # normalize secret hash # create the contract and return the contract, transaction and submission status
self
initiator
str (or unlockhash) of a personal wallet
str ( or unlockhash ) of a personal wallet
amount
int or str that defines the amount of TFT to set, see explanation above
int or str that defines the amount of TFT to set see explanation above
secret_hash
the secret hash to be use, the same secret hash as used for the initiation contract
the secret hash to be use the same secret hash as used for the initiation contract
refund_time
source
one or multiple addresses/unlockhashes from which to fund this coin send transaction, by default all personal wallet addresses are used, only known addresses can be used
one or multiple addresses / unlockhashes from which to fund this coin send transaction by default all personal wallet addresses are used only known addresses can be used
refund
optional refund address, by default is uses the source if it specifies a single address otherwise it uses the default wallet address (can only be a personal wallet address)
optional refund address by default is uses the source if it specifies a single address otherwise it uses the default wallet address ( can only be a personal wallet address )
data
optional data that can be attached ot the sent transaction (str or bytes), with a max length of 83
optional data that can be attached ot the sent transaction ( str or bytes ) with a max length of 83
submit
True by default, if False the transaction will not be sent even if possible
True by default if False the transaction will not be sent even if possible
duration
the duration until the atomic swap contract becomes refundable
the duration until the atomic swap contract becomes refundable