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

Introduce account stub for actor-like packages of RPC client #3302

Open
AnnaShaleva opened this issue Jan 30, 2024 · 1 comment
Open

Introduce account stub for actor-like packages of RPC client #3302

AnnaShaleva opened this issue Jan 30, 2024 · 1 comment
Labels
enhancement Improving existing functionality I3 Minimal impact rpc RPC server and client S3 Minimally significant U3 Regular

Comments

@AnnaShaleva
Copy link
Member

Is your feature request related to a problem? Please describe.

Sometimes users of rpcclient/actor package don't have the ability to sign the transaction (consider the case when dApp uses WaletConnect for transaction signing), but still have to construct it and relay. And thus, there's a need to split the transaction creation/signing processes. For such case we have account stubs provided by notary Actor, like that:

// FakeSimpleAccount creates a fake account belonging to the given public key.
// It uses a simple signature contract and this account has SignTx that
// returns no error, but at the same time adds no signature (it obviously can't
// do that, so CanSign() returns false for it). Use this account for Actor when
// simple signatures are needed to be collected.
func FakeSimpleAccount(k *keys.PublicKey) *wallet.Account {

These stubs are useful not only in notary package, but also in other actors.

Describe the solution you'd like

We may think about moving notary accounts stub to a package of their own, so that they can be reused by all actors.

Describe alternatives you've considered

Create stubs for every actor.

Additional context

Inspired by config_wizard's question from Discord:

I realise that I am using wallet connect for signing payloads. As a result I think I need to use a signer or an actor and an unsigned transaction to then get signed with wallet connect? I think this way using an account type, requires me to have the private key? I also guess it then becomes a two step operation (signing, receving signed)?

I have wallet connect all working and set up using NeoFS payloads (signing bearer tokens etc) so I reckon i know how to do that part, just wondering what the easiest way to create the transaction but export its data to sign is?
i guess i might have to manually create a transaction, but is there a way to get the transaction from above (using the helpers etc) before it gets signed/transferred and then call the sender manually once i have a signed payload?

@AnnaShaleva AnnaShaleva added feature Completely new functionality I2 Regular impact rpc RPC server and client U4 Nothing urgent S3 Minimally significant labels Jan 30, 2024
@roman-khimov
Copy link
Member

Makes sense and we have almost everything needed already.

@roman-khimov roman-khimov added I3 Minimal impact U3 Regular enhancement Improving existing functionality and removed feature Completely new functionality I2 Regular impact U4 Nothing urgent labels Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving existing functionality I3 Minimal impact rpc RPC server and client S3 Minimally significant U3 Regular
Projects
None yet
Development

No branches or pull requests

2 participants