Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

πŸ› οΈ [TASK] : Create a prototype tool for testing wallets and hand crafter transactions #299

Closed
Tracked by #128
stevenj opened this issue Mar 11, 2024 · 0 comments Β· Fixed by #305
Closed
Tracked by #128
Assignees

Comments

@stevenj
Copy link
Collaborator

stevenj commented Mar 11, 2024

For helping design and validate Registration Transactions and metadata we need a transaction prototyping tool.

References:

Build the app from the base react app: https://github.com/dynamicstrategies/cardano-wallet-connector
CIP30 : https://cips.cardano.org/cip/CIP-30/
Serialization: https://developers.cardano.org/docs/get-started/cardano-serialization-lib/overview
Example CBOR/Binary decoding UI: https://cbor.me/
CBOR Decoding Javascript Library: https://www.npmjs.com/package/cborg

Output of task.

A standalone container with NginX which can run the app for local use only.
See the Docs NGINX example for a similar use.
Does not need to add react support to Catalyst CI.

Wallet connect.

  1. Iterate each wallet in the cardano namespace and display information from:
  • cardano.{walletName}.isEnabled(): Promise<bool>
  • cardano.{walletName}.apiVersion: String
  • cardano.{walletName}.supportedExtensions: Extension[]
  • cardano.{walletName}.name: String
  • cardano.{walletName}.icon: String

An option to set a list of extensions which are then semt to the wallet with cardano.{walletName}.enable({ extensions: Extension[] } = {}): Promise<API.

That function can be sent anytime, even if the wallet is already connected.
If the wallet returns a valid api in response its available to be called.

A Refresh button which updates the list of wallets and their information.
If isEnabled is false then the wallet should not be sent API requests even if it was previously enabled.

Note: Multiple wallets are enabled at the same time. This is required for the testing.
A user can deselect a wallet if they no longer want to communicate with it.

For every enabled wallet, on connection or refresh show the output from all of the CIP-30 Apis:

  • `api.getExtensions(): Promise<Extension[]>
  • api.getNetworkId(): Promise<number>
  • api.getUtxos(amount: cbor<value> = undefined, paginate: Paginate = undefined): Promise<TransactionUnspentOutput[] | null>
  • api.getCollateral(params: { amount: cbor<Coin> }): Promise<TransactionUnspentOutput[] | null>
  • api.getBalance(): Promise<cbor<value>>
  • api.getUsedAddresses(paginate: Paginate = undefined): Promise<Address[]>
  • api.getUnusedAddresses(): Promise<Address[]>
  • api.getChangeAddress(): Promise<Address>
  • api.getRewardAddresses(): Promise<Address[]>

Sign Transaction

Display a data entry field for hex/diagnostric notation and json.
An update to one can be updated in the others.

The main field is the hex.

A check box for partialSign.

A button for signTransaction which sends the binary data to every enabled wallet, and shows the response to that request from each wallet.

Again the response should be shown as hex/ diagnostic and json.

Sign Data

Not to be implemented in this version of the utility

submitTx

Not to be implemented in this version of the utility

@stevenj stevenj changed the title Create a prototype tool for testing wallets and hand crafter transactions πŸ› οΈ [TASK] : Create a prototype tool for testing wallets and hand crafter transactions Mar 11, 2024
@apskhem apskhem assigned apskhem and unassigned apskhem Mar 13, 2024
@apskhem apskhem moved this to πŸ— In progress in Catalyst Mar 13, 2024
@apskhem apskhem moved this from πŸ— In progress to New in Catalyst Mar 13, 2024
@apskhem apskhem moved this from New to πŸ— In progress in Catalyst Mar 13, 2024
@apskhem apskhem linked a pull request Mar 14, 2024 that will close this issue
8 tasks
@apskhem apskhem moved this from πŸ— In progress to πŸ‘€ In review in Catalyst Apr 3, 2024
@github-project-automation github-project-automation bot moved this from πŸ‘€ In review to βœ… Done in Catalyst Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants