Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into meeting-notes-blog
Browse files Browse the repository at this point in the history
  • Loading branch information
kalepail committed Feb 16, 2024
2 parents 6480c93 + 28e8fbb commit 64ab687
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 4 deletions.
8 changes: 8 additions & 0 deletions api/json-rpc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ To interact with soroban-rpc from inside a JavaScript application, use the [Java

When XDR is passed as a parameter or returned, it is always a string encoded using standard base64.

:::info

Please note that parameter structure must contain named parameters as a by-name
object, and not as positional arguments as a by-position array. Positional
arguments as a by-position array will be deprecated in future RPC releases.

:::

## Open-RPC Specification

Soroban-RPC provides an [OpenRPC] specification document that can be used to mock, build, and/or validate both server and client software implementations. This document is used to generate all of our [methods] documentation pages. You can view the full [specification document here]. Additionally, you can experiment with this specificaiton document in the [OpenRPC Playground].
Expand Down
2 changes: 1 addition & 1 deletion api/pagination.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ For example, calling a method with pagination parameter set:
```json
{
"jsonrpc": "2.0",
"Id": "1",
"id": "1",
"method": "exampleMethod",
"params": ["other", "arguments", { "cursor": "1234-1", "limit": 100 }]
}
Expand Down
24 changes: 24 additions & 0 deletions docs/notes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,30 @@ description: Notes and recordings from the Soroban protocol & developers meeting
2. Stellar + Soroban documentation survey
1. [Take the survey](https://discord.com/channels/897514728459468821/1204462856037470248/1205196745877757962)

## 2024-02-01

<audio controls>
<source
src="https://pub-b2eaaee2bbe74d70820bacb7298958f5.r2.dev/Stellar-Protocol-Meeting-02-01-2024.mp3"
type="audio/mpeg"
></source>
Your browser does not support the audio element.
</audio>

[Discord agenda thread](https://discord.com/channels/897514728459468821/1201979721211203614)

1. The proposal is to advance stellar-core by adding a host function to verify the secp256r1 signature, which is the most common elliptic curve used outside of the blockchain space. It is useful in connecting off-chain authentication interfaces with on-chain functionality.
1. Note that the proposal is not for a new signer type but a host function.
1. Leigh investigated adding support for the WebAuthN use case, by allowing a custom account / smart contract to sign soroban auth entries using a secp256r1-signed payload.
1. secp256r1 is supported by phones, passkeys, and enables an app to replace passwords. This is a massive benefit to user-facing applications like wallets.
1. Pros and cons of the interface: blockchains generally implement the recovery interface over the verification interface but verification is easier for developers as it reduces burden on the client and the network.
1. The WebAuthN use case requires encoding and decoding of base64 payloads and decoding JSON blobs, which is not currently supported in Soroban.
1. While there are hacky ways of accomplishing the latter, it’s not a great developer experience and final implementation is susceptible to breakages on updates.
1. It is also costly to bundle decoding with verification in guest.
1. Soroban has always led with a batteries included mindset. Keeping in line with that approach, it makes sense to further investigate and determine whether a host function makes sense for these as well.
1. Leigh’s implementation may require further evaluation of the crates used for ecdsa and p256.
1. Brief discussion around proposed process for adding of a host function by a non-core dev.

## 2024-01-26

<audio controls>
Expand Down
3 changes: 2 additions & 1 deletion openrpc/src/methods/simulateTransaction.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
},
"cost": {
"type": "object",
"description": "(optional) - Information about instructions used, etc. Not present in case of error.",
"description": "(optional) - The cost object is legacy, inaccurate, and will be deprecated in future RPC releases. Please decode transactionData XDR to retrieve the correct resources.",
"deprecated": true,
"properties": {
"cpuInsns": {
"type": "string",
Expand Down
38 changes: 37 additions & 1 deletion patches/@metamask+open-rpc-docs-react+0.1.2.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/node_modules/@metamask/open-rpc-docs-react/dist/ExamplePairing/ExamplePairing.js b/node_modules/@metamask/open-rpc-docs-react/dist/ExamplePairing/ExamplePairing.js
index 354ce73..5e07a7f 100644
index 354ce73..129371f 100644
--- a/node_modules/@metamask/open-rpc-docs-react/dist/ExamplePairing/ExamplePairing.js
+++ b/node_modules/@metamask/open-rpc-docs-react/dist/ExamplePairing/ExamplePairing.js
@@ -45,10 +45,37 @@ class ExamplePairing extends react_1.Component {
Expand Down Expand Up @@ -93,3 +93,39 @@ index b8b0f3d..9a49549 100644
};
onExamplePairingChange?: (examplePairing: ExamplePairingObject | undefined) => void;
reactJsonOptions?: object;
diff --git a/node_modules/@metamask/open-rpc-docs-react/dist/Params/Params.js b/node_modules/@metamask/open-rpc-docs-react/dist/Params/Params.js
index 4b059a6..b5dafce 100644
--- a/node_modules/@metamask/open-rpc-docs-react/dist/Params/Params.js
+++ b/node_modules/@metamask/open-rpc-docs-react/dist/Params/Params.js
@@ -34,17 +34,20 @@ class Params extends react_1.Component {
if (!params || params.length === 0) {
return null;
}
- return (params.map((row, i) => react_1.default.createElement("section", null,
- react_1.default.createElement("h3", null,
- i + 1,
- ". ",
- row.name,
- (row.required === undefined ||
- row.required === true) &&
- react_1.default.createElement("span", { className: "content-descriptor-summary" },
- react_1.default.createElement("i", null,
- react_1.default.createElement("small", null, " (required)")))),
- react_1.default.createElement(ContentDescriptor_1.default, { key: row.name, contentDescriptor: row, uiSchema: uiSchema }))));
+ return (
+ [react_1.default.createElement("p", { key: "param-structure", className: "param-structure-requirement" }, "Please note that parameter structure within the request must contain named parameters as a by-name object, and not as positional arguments in a by-position array"),
+ ...params.map((row, i) => react_1.default.createElement("section", null,
+ react_1.default.createElement("h3", null,
+ i + 1,
+ ". ",
+ row.name,
+ (row.required === undefined ||
+ row.required === true) &&
+ react_1.default.createElement("span", { className: "content-descriptor-summary" },
+ react_1.default.createElement("i", null,
+ react_1.default.createElement("small", null, " (required)")))),
+ react_1.default.createElement(ContentDescriptor_1.default, { key: row.name, contentDescriptor: row, uiSchema: uiSchema })))]
+ );
}
}
exports.default = Params;
3 changes: 2 additions & 1 deletion static/openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,8 @@
},
"cost": {
"type": "object",
"description": "(optional) - Information about instructions used, etc. Not present in case of error.",
"description": "(optional) - The cost object is legacy, inaccurate, and will be deprecated in future RPC releases. Please decode transactionData XDR to retrieve the correct resources.",
"deprecated": true,
"required": [
"cpuInsns",
"memBytes"
Expand Down

0 comments on commit 64ab687

Please sign in to comment.