예제 #1
0
def _create_msg(network: int, timestamp: int, fee: int, deadline: int,
                namespace: str, mosaic: str, description: str,
                divisibility: int, supply: int, mutable_supply: bool,
                transferable: bool, levy_type: int, levy_fee: int,
                levy_address: str, levy_namespace: str, levy_mosaic: str,
                creation_sink: str, creation_fee: int):
    m = NEMSignTx()
    m.transaction = NEMTransactionCommon()
    m.transaction.network = network
    m.transaction.timestamp = timestamp
    m.transaction.fee = fee
    m.transaction.deadline = deadline

    m.mosaic_creation = NEMMosaicCreation()
    m.mosaic_creation.sink = creation_sink
    m.mosaic_creation.fee = creation_fee

    m.mosaic_creation.definition = NEMMosaicDefinition()
    m.mosaic_creation.definition.namespace = namespace
    m.mosaic_creation.definition.mosaic = mosaic
    m.mosaic_creation.definition.description = description
    m.mosaic_creation.definition.divisibility = divisibility
    m.mosaic_creation.definition.supply = supply
    m.mosaic_creation.definition.mutable_supply = mutable_supply
    m.mosaic_creation.definition.transferable = transferable
    m.mosaic_creation.definition.levy = levy_type
    m.mosaic_creation.definition.fee = levy_fee
    m.mosaic_creation.definition.levy_address = levy_address
    m.mosaic_creation.definition.levy_namespace = levy_namespace
    m.mosaic_creation.definition.levy_mosaic = levy_mosaic
    return m
def _create_msg(network: int, timestamp: int, fee: int, deadline: int,
                modifications: int, relative_change: int):
    m = NEMSignTx()
    m.transaction = _create_common_msg(network, timestamp, fee, deadline)

    m.aggregate_modification = NEMAggregateModification()
    for i in range(modifications):
        m.aggregate_modification.modifications.append(
            NEMCosignatoryModification())
    m.aggregate_modification.relative_change = relative_change
    return m
def _create_provision_msg(network: int, timestamp: int, fee: int,
                          deadline: int, name: str, parent: str, sink: str,
                          rental_fee: int):
    m = NEMSignTx()
    m.transaction = _create_common_msg(network, timestamp, fee, deadline)

    m.provision_namespace = NEMProvisionNamespace()
    m.provision_namespace.namespace = name
    m.provision_namespace.parent = parent
    m.provision_namespace.sink = sink
    m.provision_namespace.fee = rental_fee
    return m
def _create_msg(network: int, timestamp: int, fee: int, deadline: int,
                modifications: int, relative_change: int):
    m = NEMSignTx()
    m.transaction = NEMTransactionCommon()
    m.transaction.network = network
    m.transaction.timestamp = timestamp
    m.transaction.fee = fee
    m.transaction.deadline = deadline

    m.aggregate_modification = NEMAggregateModification()
    for i in range(modifications):
        m.aggregate_modification.modifications.append(NEMCosignatoryModification())
    m.aggregate_modification.relative_change = relative_change
    return m
def _create_msg(network: int, timestamp: int, fee: int, deadline: int,
                name: str, parent: str, sink: str, rental_fee: int):
    m = NEMSignTx()
    m.transaction = NEMTransactionCommon()
    m.transaction.network = network
    m.transaction.timestamp = timestamp
    m.transaction.fee = fee
    m.transaction.deadline = deadline
    m.provision_namespace = NEMProvisionNamespace()
    m.provision_namespace.namespace = name
    m.provision_namespace.parent = parent
    m.provision_namespace.sink = sink
    m.provision_namespace.fee = rental_fee
    return m
예제 #6
0
def _create_msg(network: int, timestamp: int, fee: int, deadline: int,
                namespace: str, mosaic: str, mod_type: int, delta: int):
    m = NEMSignTx()
    m.transaction = NEMTransactionCommon()
    m.transaction.network = network
    m.transaction.timestamp = timestamp
    m.transaction.fee = fee
    m.transaction.deadline = deadline

    m.supply_change = NEMMosaicSupplyChange()
    m.supply_change.namespace = namespace
    m.supply_change.mosaic = mosaic
    m.supply_change.type = mod_type
    m.supply_change.delta = delta
    return m
def _create_msg(network: int, timestamp: int, fee: int, deadline: int,
                recipient: str, amount: int, mosaics: int = 0):
    m = NEMSignTx()
    m.transaction = NEMTransactionCommon()
    m.transaction.network = network
    m.transaction.timestamp = timestamp
    m.transaction.fee = fee
    m.transaction.deadline = deadline
    m.transfer = NEMTransfer()
    m.transfer.recipient = recipient
    m.transfer.amount = amount
    m.transfer.mosaics = list()
    for i in range(mosaics):
        m.transfer.mosaics.append(NEMMosaic())
    return m