rooch icon indicating copy to clipboard operation
rooch copied to clipboard

[CLI] Implement `list` and `remove` command for SessionKey

Open jolestar opened this issue 2 years ago • 5 comments

  1. rooch session-key list show all session key via address. This command needs to read on-chain state to display the detail info of the session key.
  2. rooch session-key remove remove a session key via address and authencation_key. This command d also needs to remove the on-chain session key if the session key exists on-chain.
  3. rooch session-key clear Remove the expired session keys.

jolestar avatar Aug 14 '23 12:08 jolestar

@jolestar I think the list command is impossible because the on-chain Session-keys are stored in the table. The table key is authentication_key. The table can't get the keys or values directly because it doesn't have keys or values functions.

https://github.com/rooch-network/rooch/blob/276fb81df2f9f6d65c78077094184b7ec8288e7b/frameworks/rooch-framework/sources/session_key.move#L57-L59

vegetabledogdog avatar Jul 08 '24 12:07 vegetabledogdog

list the table key/value via list_fields API

jolestar avatar Jul 08 '24 12:07 jolestar

Is this issue available for resolving?

@vegetabledogdog already finish the list command

jolestar avatar Aug 12 '24 11:08 jolestar

Is there a remove command unassigned? Interested in doing some coding staff here.