Skip to content

Commit

Permalink
added snapid + request schemas (#183)
Browse files Browse the repository at this point in the history
* added snapid + request schemas

* add param types for wallet_invokeSnap and wallet_requestSnaps

* Apply suggestions from code review

Co-authored-by: Shane <[email protected]>

---------

Co-authored-by: Alexandra Tran <[email protected]>
Co-authored-by: Alexandra Tran Carrillo <[email protected]>
  • Loading branch information
3 people authored Jan 30, 2024
1 parent 58f0485 commit 9f6dfd6
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,8 @@
"type": "object",
"properties": {
"version": {
"description": "(Optional) A SemVer version range for the Snap. This uses the same semantics as npm package.json ranges. If specified, MetaMask attempts to install a version of the Snap that satisfies the range. If a compatible version of the Snap is already installed, the request succeeds. If an incompatible version is installed, MetaMask attempts to update the Snap to the latest version that satisfies the range. The request succeeds if the Snap is succesfully installed."
"description": "(Optional) A SemVer version range for the Snap. This uses the same semantics as npm package.json ranges. If specified, MetaMask attempts to install a version of the Snap that satisfies the range. If a compatible version of the Snap is already installed, the request succeeds. If an incompatible version is installed, MetaMask attempts to update the Snap to the latest version that satisfies the range. The request succeeds if the Snap is succesfully installed.",
"type": "string"
}
}
}
Expand Down Expand Up @@ -766,10 +767,20 @@
"type": "object",
"properties": {
"snapId": {
"description": "The ID of the Snap to invoke."
"description": "The ID of the Snap to invoke.",
"type": "string"
},
"request": {
"description": "The JSON-RPC request object to send to the invoked Snap."
"description": "The JSON-RPC request object to send to the invoked Snap.",
"type": "object",
"properties": {
"method": {
"type": "string"
},
"params": {
"type": "object"
}
}
}
}
}
Expand Down Expand Up @@ -828,10 +839,20 @@
"type": "object",
"properties": {
"snapId": {
"description": "The ID of the Snap to invoke."
"description": "The ID of the Snap to invoke.",
"type": "string"
},
"request": {
"description": "The JSON-RPC request object to send to the invoked Snap."
"description": "The JSON-RPC request object to send to the invoked Snap.",
"type": "object",
"properties": {
"method": {
"type": "string"
},
"params": {
"type": "object"
}
}
}
}
}
Expand Down

0 comments on commit 9f6dfd6

Please sign in to comment.