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

/sign endpoint #159

Closed
aphelionz opened this issue Aug 26, 2021 · 1 comment
Closed

/sign endpoint #159

aphelionz opened this issue Aug 26, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@aphelionz
Copy link
Member

This is required for https://github.com/flow-hydraulics/fcl-wallet-adapter. The requirement is simply an endpoint that takes a built transaction and a custodial account ID as an input and outputs the proper signature.

Here's more context:

Upon approval, the FCL adapter frontend should submit the transaction to the adapter backend, which in turn passes it to the Wallet API for signing.
This sign endpoint can be fully trusted. That means that it will not validate transactions before signing, and can even take a simple byte array (e.g. hex string as input).

@aphelionz aphelionz added the enhancement New feature or request label Aug 26, 2021
@tuommaki
Copy link
Collaborator

tuommaki commented Sep 2, 2021

I'm currently working on this task, but would like to get clarification to couple details on this.

As I currently understand this, the endpoint should receive transaction details, accompanied with the account details and then construct the transaction object, compute the signatures and return them, but not send the transaction just yet.

Therefore this differs from existing transaction creation operation which doesn't sign it, but does send it nevertheless.

  1. Should the request input structure of this endpoint look similar to that raw transaction sending?
  2. How are proposer and authorizer[s] passed in?
  3. How should the response structure look like? Should it contain the whole transaction with authorization and payment envelopes, or only the signatures? If only signatures, should it still contain both of them?
  4. As I understand it, the payer is always the admin account, but besides that, should there be any defaulting for possibly missing account addresses in input request?

Ping @psiemens

tuommaki pushed a commit to tuommaki/flow-wallet-api that referenced this issue Sep 9, 2021
`transactions.Service.Sign()` crafts a Flow transaction and signs it
with given account key. It returns pre-signed transaction that can be
sent later separately.

Towards flow-hydraulics#159
tuommaki pushed a commit to tuommaki/flow-wallet-api that referenced this issue Sep 9, 2021
This adds `/accounts/{address}/sign` endpoint to provide functionality
for pre-signing a transaction to be sent separately.

Towards flow-hydraulics#159
@tuommaki tuommaki self-assigned this Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants