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

Open
opened 2025-12-28 17:15:46 +00:00 by sami · 1 comment
Owner

Originally created by @AnnaShaleva on GitHub (Jan 30, 2024).

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:
nspcc-dev/neo-go@51ac153a7b/pkg/rpcclient/notary/accounts.go (L12-L17)

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?

Originally created by @AnnaShaleva on GitHub (Jan 30, 2024). ## 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: https://github.com/nspcc-dev/neo-go/blob/51ac153a7b009f8f69117ed987038a08dc78f261/pkg/rpcclient/notary/accounts.go#L12-L17 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?
Author
Owner

@roman-khimov commented on GitHub (Jan 30, 2024):

Makes sense and we have almost everything needed already.

@roman-khimov commented on GitHub (Jan 30, 2024): Makes sense and we have almost everything needed already.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neo-go#1252
No description provided.