This repository has been archived by the owner on Dec 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 213
SCP-2368: expose partial transactions that need to be balanced, signed and submitted by a remote wallet #119
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
koslambrou
changed the title
WIP SCP-2368: expose partial transactions that need to be balanced, signed and submitted by a remote
WIP SCP-2368: expose partial transactions that need to be balanced, signed and submitted by a remote wallet
Nov 16, 2021
koslambrou
force-pushed
the
scp-2368-pab-expose-url-tx-signed
branch
3 times, most recently
from
November 22, 2021 16:34
8690791
to
2ee1e00
Compare
koslambrou
changed the title
WIP SCP-2368: expose partial transactions that need to be balanced, signed and submitted by a remote wallet
SCP-2368: expose partial transactions that need to be balanced, signed and submitted by a remote wallet
Nov 22, 2021
koslambrou
force-pushed
the
scp-2368-pab-expose-url-tx-signed
branch
from
November 22, 2021 17:49
2ee1e00
to
c67f1ca
Compare
6 tasks
silky
reviewed
Nov 23, 2021
koslambrou
commented
Nov 23, 2021
koslambrou
commented
Nov 23, 2021
koslambrou
commented
Nov 23, 2021
silky
reviewed
Nov 23, 2021
silky
approved these changes
Nov 23, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! :)
koslambrou
force-pushed
the
scp-2368-pab-expose-url-tx-signed
branch
5 times, most recently
from
November 24, 2021 15:37
f630e96
to
9cd641e
Compare
… to be balanced, signed and submitted by a remote wallet. * New WalletEffect, `yieldUnbalancedTx`, which makes available an unbalanced tx to be balanced, signed and then submitted to the blockchain. * Added ToJSON and FromJSON instances to ExportTx (partial tx) * Additionnal Generic and OpenAPI.ToSchema orphan instances for some cardano-api types. * New wallet handler in the PAB: RemoteClient. The only implemented wallet effect for the moment is `YieldUnbalancedTx`. The rest of the effects will be implemented in the future. * Changed the PAB wallet config settings which allows the user to specify if the wallet is available locally or remotely. * In the PAB, partial txs (`ExportTx`) are now exposed in the contract instance status endpoint (additionnaly as a `NewYieldedPartialTx` message in the websocket) when calling `yieldUnbalancedTx`. * Changed the PayToWallet example in plutus-pab to use `yieldUnbalancedTx`.
koslambrou
force-pushed
the
scp-2368-pab-expose-url-tx-signed
branch
from
November 24, 2021 16:31
9cd641e
to
5e76297
Compare
I was able to reproduce locally, deserialize the transaction in the browser with cardano-serialization-lib, and sign the transaction with Nami wallet. This branch of CSL was required to get it working: https://github.com/SundaeSwap-finance/cardano-serialization-lib/tree/fix-plutus-list-serialization |
Before merging, I need to find out why the tx encoding is always |
My fault, the hex ARE different. Merging! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First part of the hosted PAB scenario for a remote wallet client.
We expose partial transactions that need to be balanced, signed and submitted by the remote wallet.
What was done:
New WalletEffect,
yieldUnbalancedTx
, which makes available an unbalanced tx to be balanced, signed and then submitted to the blockchain.Added ToJSON and FromJSON instances to ExportTx (partial tx)
Additionnal Generic and OpenAPI.ToSchema orphan instances for some cardano-api types.
New wallet handler in the PAB: RemoteClient. The only implemented wallet effect for the moment is
YieldUnbalancedTx
. The rest of the effects will be implemented in the future.Changed the PAB wallet config settings which allows the user to specify if the wallet is available locally or remotely.
In the PAB, partial txs (
ExportTx
) are now exposed in the contract instance status endpoint (additionnaly as aNewYieldedPartialTx
message in the websocket) when callingyieldUnbalancedTx
.Here's a simple setup to test this functionality:
1- In the
plutus-pab.yaml
config file, set the following attributes:2- Open a terminal and run
cabal run plutus-pab:exe:plutus-pab-examples -- webserver --config plutus-pab/plutus-pab.yaml.sample
3- Open another terminal and execute the following shell script:
You should see a yielded tx similar the to following:
Pre-submit checklist: