Skip to content

Commit

Permalink
update wallet_createSession examples (#279)
Browse files Browse the repository at this point in the history
* update create-session-examples

* Apply suggestions from code review

Co-authored-by: jiexi <jiexiluan@gmail.com>

* fix wallet_createSessionUnsupportedScopesResultExample

* fix indentations

---------

Co-authored-by: jiexi <jiexiluan@gmail.com>
  • Loading branch information
adonesky1 and jiexi authored Feb 5, 2025
1 parent a19e6db commit 1f76392
Showing 1 changed file with 186 additions and 1 deletion.
187 changes: 186 additions & 1 deletion multichain/openrpc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ methods:
type: string
format: date-time
examples:
- name: wallet_createSessionExample
- name: wallet_createSessionEthExample
description: Example of a createSession request.
params:
- name: requiredScopes
Expand Down Expand Up @@ -383,6 +383,191 @@ methods:
notifications: []
sessionProperties:
expiry: "2022-11-31T17:07:31+00:00"

- name: wallet_createSessionEthUnsupportedMethodsExample
description: Example of a createSession request with unsupported eip155 methods.
params:
- name: optionalScopes
value:
eip155:1337:
methods:
- not_supported
notifications: []
wallet:
methods: []
notifications: []
wallet:eip155:
methods: []
notifications: []
- name: sessionProperties
value:
expiry: "2022-12-24T17:07:31+00:00"
result:
name: wallet_createSessionEthUnsupportedMethodsResultExample
value:
sessionScopes:
eip155:1337:
accounts:
- eip155:1337:0x5cfe73b6021e818b776b421b1c4db2474086a7e1
methods:
- wallet_watchAsset
- eth_sendTransaction
- eth_decrypt
- eth_getEncryptionPublicKey
- web3_clientVersion
- eth_subscribe
- eth_unsubscribe
- eth_blockNumber
- eth_call
- eth_chainId
- eth_estimateGas
- eth_feeHistory
- eth_gasPrice
- eth_getBalance
- eth_getBlockByHash
- eth_getBlockByNumber
- eth_getBlockTransactionCountByHash
- eth_getBlockTransactionCountByNumber
- eth_getCode
- eth_getFilterChanges
- eth_getFilterLogs
- eth_getLogs
- eth_getProof
- eth_getStorageAt
- eth_getTransactionByBlockHashAndIndex
- eth_getTransactionByBlockNumberAndIndex
- eth_getTransactionByHash
- eth_getTransactionCount
- eth_getTransactionReceipt
- eth_getUncleCountByBlockHash
- eth_getUncleCountByBlockNumber
- eth_newBlockFilter
- eth_newFilter
- eth_newPendingTransactionFilter
- eth_sendRawTransaction
- eth_syncing
- eth_uninstallFilter
notifications:
- eth_subscription
wallet:
accounts: []
methods:
- wallet_registerOnboarding
- wallet_scanQRCode
notifications: []
wallet:eip155:
accounts:
- wallet:eip155:0x5cfe73b6021e818b776b421b1c4db2474086a7e1
methods:
- wallet_addEthereumChain
- personal_sign
- eth_signTypedData_v4
notifications: []
sessionProperties:
expiry: "2022-11-31T17:07:31+00:00"
- name: wallet_createSessionUnsupportedScopesExample
description: Example of a createSession request with unsupported scopes.
params:
- name: requiredScopes
value:
foobar:
methods:
- eth_getBalance
notifications:
- eth_subscription
- result:
name: wallet_createSessionUnsupportedScopesResultExample
value:
sessionScopes:
eip155:1:
accounts:
- eip155:1:0x5cfe73b6021e818b776b421b1c4db2474086a7e1
methods:
- wallet_watchAsset
- eth_sendTransaction
- eth_decrypt
- eth_getEncryptionPublicKey
- web3_clientVersion
- eth_subscribe
- eth_unsubscribe
- eth_blockNumber
- eth_call
- eth_chainId
- eth_estimateGas
- eth_feeHistory
- eth_gasPrice
- eth_getBalance
- eth_getBlockByHash
- eth_getBlockByNumber
- eth_getBlockTransactionCountByHash
- eth_getBlockTransactionCountByNumber
- eth_getCode
- eth_getFilterChanges
- eth_getFilterLogs
- eth_getLogs
- eth_getProof
- eth_getStorageAt
- eth_getTransactionByBlockHashAndIndex
- eth_getTransactionByBlockNumberAndIndex
- eth_getTransactionByHash
- eth_getTransactionCount
- eth_getTransactionReceipt
- eth_getUncleCountByBlockHash
- eth_getUncleCountByBlockNumber
- eth_newBlockFilter
- eth_newFilter
- eth_newPendingTransactionFilter
- eth_sendRawTransaction
- eth_syncing
- eth_uninstallFilter
notifications:
- eth_subscription
eip155:59144:
accounts:
- eip155:59144:0x5cfe73b6021e818b776b421b1c4db2474086a7e1
methods:
- wallet_watchAsset
- eth_sendTransaction
- eth_decrypt
- eth_getEncryptionPublicKey
- web3_clientVersion
- eth_subscribe
- eth_unsubscribe
- eth_blockNumber
- eth_call
- eth_chainId
- eth_estimateGas
- eth_feeHistory
- eth_gasPrice
- eth_getBalance
- eth_getBlockByHash
- eth_getBlockByNumber
- eth_getBlockTransactionCountByHash
- eth_getBlockTransactionCountByNumber
- eth_getCode
- eth_getFilterChanges
- eth_getFilterLogs
- eth_getLogs
- eth_getProof
- eth_getStorageAt
- eth_getTransactionByBlockHashAndIndex
- eth_getTransactionByBlockNumberAndIndex
- eth_getTransactionByHash
- eth_getTransactionCount
- eth_getTransactionReceipt
- eth_getUncleCountByBlockHash
- eth_getUncleCountByBlockNumber
- eth_newBlockFilter
- eth_newFilter
- eth_newPendingTransactionFilter
- eth_sendRawTransaction
- eth_syncing
- eth_uninstallFilter
notifications:
- eth_subscription
sessionProperties:
expiry: "2022-11-31T17:07:31+00:00"

errors:
- $ref: "#/components/errors/UnknownError"
- code: 5100
Expand Down

0 comments on commit 1f76392

Please sign in to comment.