tfchain/TFChainWallet.py
def record_new(self, months=1, names=None, addresses=None, key_index=None, source=None, refund=None):
        """
        Create a new 3Bot by creating a new record on the BlockChain,
        by default 1 month rent is already paid for the 3Bot, but up to 24 months can immediately be pre-paid
        against a discount if desired.

        At least one name or one address is required, and up to 5 names and 10 addresses can
        exists for a single 3Bot.

        If no key_index is given a new key pair is generated for the wallet,
        otherwise the key pair on the given index of the wallet is used.

        Returns a TransactionSendResult.

        @param months: amount of months to be prepaid, at least 1 month is required, maximum 24 months is allowed
        @param names: 3Bot Names to add to the 3Bot as aliases (minumum 0, maximum 5)
        @param addresses: Network Addresses used to reach the 3Bot (minimum 0, maximum 10)
        @param key_index: if None is given a new key pair is generated, otherwise the key pair on the defined index is used.
        @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 (recipient type, with None being the exception in its interpretation)
        """
        # create the txn and fill the easiest properties already
        txn = tftransactions.threebot_registration_new()
        txn.number_of_months = months
        if names is None and addresses is None:
            raise ValueError("at least one name or one address is to be given, none is defined")
        txn.names = names
        txn.addresses = addresses

        # get the fees, and fund the transaction
        balance = self._fund_txn(txn, source, refund)

        # if the key_index is not defined, generate a new public key,
        # otherwise use the key_index given
        if key_index is None:
            txn.public_key = self._wallet.public_key_new()
        else:
            if not isinstance(key_index, int):
                raise TypeError("key index is to be of type int, not type {}".format(type(key_index)))
            addresses = self._wallet.addresses
            if key_index < 0 or key_index >= len(addresses):
                raise ValueError("key index {} is OOB, index cannot be negative, and can be maximum {}".format(key_index, len(addresses)-1))
            txn.public_key = self._wallet.key_pair_get(unlockhash=addresses[key_index]).public_key

        # sign, submit, update Balance and return result
        return self._sign_and_submit_txn(txn, balance)

        Create a new 3Bot by creating a new record on the BlockChain,
        by default 1 month rent is already paid for the 3Bot, but up to 24 months can immediately be pre-paid
        against a discount if desired.

        At least one name or one address is required, and up to 5 names and 10 addresses can
        exists for a single 3Bot.

        If no key_index is given a new key pair is generated for the wallet,
        otherwise the key pair on the given index of the wallet is used.

        Returns a TransactionSendResult.

        @param months: amount of months to be prepaid, at least 1 month is required, maximum 24 months is allowed
        @param names: 3Bot Names to add to the 3Bot as aliases (minumum 0, maximum 5)
        @param addresses: Network Addresses used to reach the 3Bot (minimum 0, maximum 10)
        @param key_index: if None is given a new key pair is generated, otherwise the key pair on the defined index is used.
        @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 (recipient type, with None being the exception in its interpretation)
        
Create a new 3Bot by creating a new record on the BlockChain,
by default 1 month rent is already paid for the 3Bot, but up to 24 months can immediately be pre-paid
against a discount if desired.

At least one name or one address is required, and up to 5 names and 10 addresses can
exists for a single 3Bot.

If no key_index is given a new key pair is generated for the wallet,
otherwise the key pair on the given index of the wallet is used.


Create a new 3Bot by creating a new record on the BlockChain by default 1 month rent is already paid for the 3Bot but up to 24 months can immediately be pre - paid against a discount if desired . At least one name or one address is required and up to 5 names and 10 addresses can exists for a single 3Bot . If no key_index is given a new key pair is generated for the wallet otherwise the key pair on the given index of the wallet is used .
def record_new(self, months=1, names=None, addresses=None, key_index=None, source=None, refund=None):
        txn = tftransactions.threebot_registration_new()
        txn.number_of_months = months
        if names is None and addresses is None:
            raise ValueError("at least one name or one address is to be given, none is defined")
        txn.names = names
        txn.addresses = addresses
        balance = self._fund_txn(txn, source, refund)
        if key_index is None:
            txn.public_key = self._wallet.public_key_new()
        else:
            if not isinstance(key_index, int):
                raise TypeError("key index is to be of type int, not type {}".format(type(key_index)))
            addresses = self._wallet.addresses
            if key_index < 0 or key_index >= len(addresses):
                raise ValueError("key index {} is OOB, index cannot be negative, and can be maximum {}".format(key_index, len(addresses)-1))
            txn.public_key = self._wallet.key_pair_get(unlockhash=addresses[key_index]).public_key
        return self._sign_and_submit_txn(txn, balance)
def record_new ( self , months = 1 , names = None , addresses = None , key_index = None , source = None , refund = None ) : txn = tftransactions . threebot_registration_new ( ) txn . number_of_months = months if names is None and addresses is None : raise ValueError ( "at least one name or one address is to be given, none is defined" ) txn . names = names txn . addresses = addresses balance = self . _fund_txn ( txn , source , refund ) if key_index is None : txn . public_key = self . _wallet . public_key_new ( ) else : if not isinstance ( key_index , int ) : raise TypeError ( "key index is to be of type int, not type {}" . format ( type ( key_index ) ) ) addresses = self . _wallet . addresses if key_index < 0 or key_index >= len ( addresses ) : raise ValueError ( "key index {} is OOB, index cannot be negative, and can be maximum {}" . format ( key_index , len ( addresses ) - 1 ) ) txn . public_key = self . _wallet . key_pair_get ( unlockhash = addresses [ key_index ] ) . public_key return self . _sign_and_submit_txn ( txn , balance )
Create a new 3Bot by creating a new record on the BlockChain,
by default 1 month rent is already paid for the 3Bot, but up to 24 months can immediately be pre-paid
against a discount if desired.
Create a new 3Bot by creating a new record on the BlockChain by default 1 month rent is already paid for the 3Bot but up to 24 months can immediately be pre - paid against a discount if desired .
"""
        Create a new 3Bot by creating a new record on the BlockChain,
        by default 1 month rent is already paid for the 3Bot, but up to 24 months can immediately be pre-paid
        against a discount if desired.

        At least one name or one address is required, and up to 5 names and 10 addresses can
        exists for a single 3Bot.

        If no key_index is given a new key pair is generated for the wallet,
        otherwise the key pair on the given index of the wallet is used.

        Returns a TransactionSendResult.

        @param months: amount of months to be prepaid, at least 1 month is required, maximum 24 months is allowed
        @param names: 3Bot Names to add to the 3Bot as aliases (minumum 0, maximum 5)
        @param addresses: Network Addresses used to reach the 3Bot (minimum 0, maximum 10)
        @param key_index: if None is given a new key pair is generated, otherwise the key pair on the defined index is used.
        @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 (recipient type, with None being the exception in its interpretation)
        """ # create the txn and fill the easiest properties already # get the fees, and fund the transaction # if the key_index is not defined, generate a new public key, # otherwise use the key_index given # sign, submit, update Balance and return result
self
months
amount of months to be prepaid, at least 1 month is required, maximum 24 months is allowed
amount of months to be prepaid at least 1 month is required maximum 24 months is allowed
names
3Bot Names to add to the 3Bot as aliases (minumum 0, maximum 5)
3Bot Names to add to the 3Bot as aliases ( minumum 0 maximum 5 )
addresses
Network Addresses used to reach the 3Bot (minimum 0, maximum 10)
Network Addresses used to reach the 3Bot ( minimum 0 maximum 10 )
key_index
if None is given a new key pair is generated, otherwise the key pair on the defined index is used.
if None is given a new key pair is generated otherwise the key pair on the defined index is used .
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 (recipient type, with None being the exception in its interpretation)
optional refund address by default is uses the source if it specifies a single address otherwise it uses the default wallet address ( recipient type with None being the exception in its interpretation )