Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
val clientConnection = client.start(rpcUsername, rpcPassword)
val proxy = clientConnection.proxy
val nodes = proxy.networkMapSnapshot()
val partyA = getNodeWithName(nodes,"PartyA", "O=PartyA, L=London, C=GB")
val partyB = getNodeWithName(nodes,"PartyB", "O=PartyB, L=New York, C=US")
// Instead of searching for accounts owned by PartyA you can simply pass the PaymentAccountId to the MakePayment flow
val accountA = proxy.startTrackedFlow(
::PaymentAccounts,
partyA
).returnValue.getOrThrow().first()
// Instead of searching for accounts owned by PartyB you can simply pass the PaymentAccountId to the MakePayment flow
val accountB = proxy.startTrackedFlow(
::PaymentAccounts,
partyB
).returnValue.getOrThrow().first()
val paymentState = proxy.startTrackedFlow(
::MakePayment,
250 of GBP,
accountA.accountId,
accountB.accountId
).returnValue.getOrThrow()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment