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

RPC/Provider Authorization Call, 23 Nov #53

Closed
4 tasks done
bumblefudge opened this issue Nov 23, 2022 · 0 comments
Closed
4 tasks done

RPC/Provider Authorization Call, 23 Nov #53

bumblefudge opened this issue Nov 23, 2022 · 0 comments

Comments

@bumblefudge
Copy link
Collaborator

bumblefudge commented Nov 23, 2022

2022-11-22

  • PRs
    • idempotency - new PR#184

      • pedro: initial CAIP-25 creates session if there isn't a live one to iterate, but relay tracks across sessions anyways
        • CAIP-27 has session as mandatory
      • pedro: failsafe for expiry - idempotent until session expires on wallet side (gives wallet way to force its own expiry if not negotiated explicitly)
      • pedro: getter == creator of sessions here
      • @bumblefudge will update PR - remove session from REQ and review CAIP-27
    • extensions REMIX - new PR#185

      • - session --> SessionIdentifier
      • - optional session OBJECT (170)? Wallet might extend scope by passing the whole session object, or additional methods not requested...
        • Ligi: But "allowOptional" or some other flag in REQ might make sense, to avoid unpredictable handling or security (or botch the session itself)
    • New proposal for a more aggressive CAIP-25 -

    "params": {
        "required":{
            eip155": {
                "chains": ["eip155:1", "eip155:137"],
                "methods": ["eth_sendTransaction", "eth_signTransaction", "eth_sign", "personal_sign"]
                "events": ["accountsChanged", "chainChanged"]
            },
            "eip155:10": {
                "methods": ["personal_sign"]
                "events": ["accountsChanged", "chainChanged"]
            },
            "cosmos": {
                ...
            }
        },
        "optional":{
            "eip155:10": {
                "methods": ["additional_novel_method"]
                "events": ["novel_event"]
            },
            "sessionVars" {
                "expiry": $timestamp
            }
        }
    },

result:

{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "SessionIdentifier": "0xdeadbeef",
    "accounts": ["eip155:1:0xab16a96d359ec26a11e2c2b3d8f8b8942d5bfcdb"],
    "session": {
        eip155": {
            "chains": ["eip155:1", "eip155:137"],
            "methods": ["eth_sendTransaction", "eth_signTransaction", "eth_sign", "personal_sign"]
            "events": ["accountsChanged", "chainChanged"]
        },
        "eip155:10": {
            "methods": ["personal_sign"]
            "events": ["accountsChanged", "chainChanged", "novel_event"]
        },
        "sessionVars": {
            "expiry": $timestamp
        }    
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant