generateSpend

fun generateSpend(services: <Error class: unknown class>, tx: <Error class: unknown class>, amount: <Error class: unknown class><Currency>, ourIdentity: <Error class: unknown class>, to: <Error class: unknown class>, onlyFromParties: Set<<Error class: unknown class>> = emptySet(), anonymous: Boolean = true): <Error class: unknown class><<Error class: unknown class>, List<PublicKey>>

Generate a transaction that moves an amount of currency to the given party.

Note: an Amount of Currency is only fungible for a given Issuer Party within a FungibleAsset

Return

A Pair of the same transaction builder passed in as tx, and the list of keys that need to sign the resulting transaction for it to be valid.

Parameters

services

The ServiceHub to provide access to the database session.

tx

A builder, which may contain inputs, outputs and commands already. The relevant components needed to move the cash will be added on top.

amount

How much currency to send.

to

the recipient party.

ourIdentity

ourIdentity is used to determine the where the change will be sent. If anonymous is true then an anonymous identity will be generated from this and the change will be spent to that, otherwise ourIdentity will be used as is.

onlyFromParties

if non-null, the asset states will be filtered to only include those issued by the set of given parties. This can be useful if the party you're trying to pay has expectations about which type of asset claims they are willing to accept.

anonymous

whether or not to use CI to send the change to

Throws

InsufficientBalanceException

when a cash spending transaction fails because there is insufficient quantity for a given currency (and optionally set of Issuer Parties).


fun generateSpend(services: <Error class: unknown class>, tx: <Error class: unknown class>, amount: <Error class: unknown class><Currency>, ourIdentity: <Error class: unknown class>, to: <Error class: unknown class>, onlyFromParties: Set<<Error class: unknown class>> = emptySet(), confidentialIdentitiesMode: ConfidentialIdentitiesMode = ConfidentialIdentitiesMode.NONE): <Error class: unknown class><<Error class: unknown class>, List<PublicKey>>

Generate a transaction that moves an amount of currency to the given party.

Note: an Amount of Currency is only fungible for a given Issuer Party within a FungibleAsset

Return

A Pair of the same transaction builder passed in as tx, and the list of keys that need to sign the resulting transaction for it to be valid.

Parameters

services

The ServiceHub to provide access to the database session.

tx

A builder, which may contain inputs, outputs and commands already. The relevant components needed to move the cash will be added on top.

amount

How much currency to send.

to

the recipient party.

ourIdentity

ourIdentity is used to determine the where the change will be sent. If anonymous is true then an anonymous identity will be generated from this and the change will be spent to that, otherwise ourIdentity will be used as is.

onlyFromParties

if non-null, the asset states will be filtered to only include those issued by the set of given parties. This can be useful if the party you're trying to pay has expectations about which type of asset claims they are willing to accept.

confidentialIdentitiesMode

whether or not to use CI to send the change to along with CI Mode, by default it does not use CI KEY_PAIR_WITH_CERT use CI using keypair with certificates KEY_PAIR use CI using key pair

Throws

InsufficientBalanceException

when a cash spending transaction fails because there is insufficient quantity for a given currency (and optionally set of Issuer Parties).


fun generateSpend(services: <Error class: unknown class>, tx: <Error class: unknown class>, amount: <Error class: unknown class><Currency>, ourIdentity: <Error class: unknown class>, to: <Error class: unknown class>): <Error class: unknown class><<Error class: unknown class>, List<PublicKey>>
fun generateSpend(services: <Error class: unknown class>, tx: <Error class: unknown class>, amount: <Error class: unknown class><Currency>, ourIdentity: <Error class: unknown class>, to: <Error class: unknown class>, onlyFromParties: Set<<Error class: unknown class>> = emptySet()): <Error class: unknown class><<Error class: unknown class>, List<PublicKey>>
fun generateSpend(services: <Error class: unknown class>, tx: <Error class: unknown class>, amount: <Error class: unknown class><Currency>, ourIdentity: <Error class: unknown class>, to: <Error class: unknown class>, anonymous: Boolean = true): <Error class: unknown class><<Error class: unknown class>, List<PublicKey>>


fun generateSpend(services: <Error class: unknown class>, tx: <Error class: unknown class>, payments: List<<Error class: unknown class><Currency>>, ourIdentity: <Error class: unknown class>, onlyFromParties: Set<<Error class: unknown class>> = emptySet(), anonymous: Boolean = true): <Error class: unknown class><<Error class: unknown class>, List<PublicKey>>

Generate a transaction that moves money of the given amounts to the recipients specified.

Note: an Amount of Currency is only fungible for a given Issuer Party within a FungibleAsset

Return

A Pair of the same transaction builder passed in as tx, and the list of keys that need to sign the resulting transaction for it to be valid.

Parameters

services

The ServiceHub to provide access to the database session.

tx

A builder, which may contain inputs, outputs and commands already. The relevant components needed to move the cash will be added on top.

payments

A list of amounts to pay, and the party to send the payment to.

ourIdentity

ourIdentity is used to determine the where the change will be sent. If anonymous is true then an anonymous identity will be generated from this and the change will be spent to that, otherwise ourIdentity will be used as is.

onlyFromParties

if non-null, the asset states will be filtered to only include those issued by the set of given parties. This can be useful if the party you're trying to pay has expectations about which type of asset claims they are willing to accept.

anonymous

whether or not to use CI to send the change to

Throws

InsufficientBalanceException

when a cash spending transaction fails because there is insufficient quantity for a given currency (and optionally set of Issuer Parties).


fun generateSpend(services: <Error class: unknown class>, tx: <Error class: unknown class>, payments: List<<Error class: unknown class><Currency>>, ourIdentity: <Error class: unknown class>, onlyFromParties: Set<<Error class: unknown class>> = emptySet(), confidentialIdentitiesMode: ConfidentialIdentitiesMode = ConfidentialIdentitiesMode.NONE): <Error class: unknown class><<Error class: unknown class>, List<PublicKey>>

Generate a transaction that moves money of the given amounts to the recipients specified.

Note: an Amount of Currency is only fungible for a given Issuer Party within a FungibleAsset

Return

A Pair of the same transaction builder passed in as tx, and the list of keys that need to sign the resulting transaction for it to be valid.

Parameters

services

The ServiceHub to provide access to the database session.

tx

A builder, which may contain inputs, outputs and commands already. The relevant components needed to move the cash will be added on top.

payments

A list of amounts to pay, and the party to send the payment to.

ourIdentity

ourIdentity is used to determine the where the change will be sent. If anonymous is true then an anonymous identity will be generated from this and the change will be spent to that, otherwise ourIdentity will be used as is.

onlyFromParties

if non-null, the asset states will be filtered to only include those issued by the set of given parties. This can be useful if the party you're trying to pay has expectations about which type of asset claims they are willing to accept.

confidentialIdentitiesMode

whether or not to use CI to send the change to along with CI Mode, by default it does not use CI KEY_PAIR_WITH_CERT use CI using keypair with certificates KEY_PAIR use CI using key pair

Throws

InsufficientBalanceException

when a cash spending transaction fails because there is insufficient quantity for a given currency (and optionally set of Issuer Parties).


fun generateSpend(services: <Error class: unknown class>, tx: <Error class: unknown class>, amount: <Error class: unknown class><Currency>, to: <Error class: unknown class>, onlyFromParties: Set<<Error class: unknown class>> = emptySet()): <Error class: unknown class><<Error class: unknown class>, List<PublicKey>>

Deprecated

Our identity should be specified

Replace with

generateSpend(services, tx, amount, to, ourIdentity, onlyFromParties)

Generate a transaction that moves an amount of currency to the given party, and sends any change back to sole identity of the calling node. Fails for nodes with multiple identities.

Note: an Amount of Currency is only fungible for a given Issuer Party within a FungibleAsset

Return

A Pair of the same transaction builder passed in as tx, and the list of keys that need to sign the resulting transaction for it to be valid.

Parameters

services

The ServiceHub to provide access to the database session.

tx

A builder, which may contain inputs, outputs and commands already. The relevant components needed to move the cash will be added on top.

amount

How much currency to send.

to

the recipient party.

onlyFromParties

if non-null, the asset states will be filtered to only include those issued by the set of given parties. This can be useful if the party you're trying to pay has expectations about which type of asset claims they are willing to accept.

Throws

InsufficientBalanceException

when a cash spending transaction fails because there is insufficient quantity for a given currency (and optionally set of Issuer Parties).


fun generateSpend(services: <Error class: unknown class>, tx: <Error class: unknown class>, payments: List<<Error class: unknown class><Currency>>, onlyFromParties: Set<<Error class: unknown class>> = emptySet()): <Error class: unknown class><<Error class: unknown class>, List<PublicKey>>

Deprecated

Our identity should be specified

Replace with

generateSpend(services, tx, amount, to, ourIdentity, onlyFromParties)

Generate a transaction that moves money of the given amounts to the recipients specified, and sends any change back to sole identity of the calling node. Fails for nodes with multiple identities.

Note: an Amount of Currency is only fungible for a given Issuer Party within a FungibleAsset

Return

A Pair of the same transaction builder passed in as tx, and the list of keys that need to sign the resulting transaction for it to be valid.

Parameters

services

The ServiceHub to provide access to the database session.

tx

A builder, which may contain inputs, outputs and commands already. The relevant components needed to move the cash will be added on top.

payments

A list of amounts to pay, and the party to send the payment to.

onlyFromParties

if non-null, the asset states will be filtered to only include those issued by the set of given parties. This can be useful if the party you're trying to pay has expectations about which type of asset claims they are willing to accept.

Throws

InsufficientBalanceException

when a cash spending transaction fails because there is insufficient quantity for a given currency (and optionally set of Issuer Parties).