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

[JSON-RPC] Generate openrpc.json spec and rpc.discover endpoint #1588

Merged
merged 9 commits into from
Apr 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rename package
  • Loading branch information
patrickkuo committed Apr 28, 2022
commit 54a984d36d204c3fd4badd39193cf5a0c0808a24
4 changes: 2 additions & 2 deletions sui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ sui-framework = { path = "../sui_programmability/framework" }
sui-network = { path = "../network_utils" }
sui-types = { path = "../sui_types" }
sui-verifier = { path = "../sui_programmability/verifier" }
open-rpc = { path = "open_rpc" }
open-rpc-macros = { path = "open_rpc/macros" }
sui-open-rpc = { path = "open_rpc" }
sui-open-rpc-macros = { path = "open_rpc/macros" }

rustyline = "9.1.2"
rustyline-derive = "0.6.0"
Expand Down
4 changes: 2 additions & 2 deletions sui/open_rpc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "open-rpc"
name = "sui-open-rpc"
version = "0.1.0"
authors = ["Mysten Labs <build@mystenlabs.com>"]
license = "Apache-2.0"
Expand All @@ -9,7 +9,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
open-rpc-macros = { path = "macros" }
sui-open-rpc-macros = { path = "macros" }
sui-types = { path = "../../sui_types" }
schemars = "0.8.8"
serde = "1.0.136"
2 changes: 1 addition & 1 deletion sui/open_rpc/macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "open-rpc-macros"
name = "sui-open-rpc-macros"
version = "0.1.0"
authors = ["Mysten Labs <build@mystenlabs.com>"]
license = "Apache-2.0"
Expand Down
6 changes: 3 additions & 3 deletions sui/open_rpc/macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub fn open_rpc(attr: TokenStream, item: TokenStream) -> TokenStream {
quote! {None;}
};
methods.push(quote! {
let mut inputs: Vec<open_rpc::ContentDescriptor> = Vec::new();
let mut inputs: Vec<sui_open_rpc::ContentDescriptor> = Vec::new();
#(#inputs)*
let result = #returns_ty
builder.add_method(#name, inputs, result, #doc);
Expand Down Expand Up @@ -86,8 +86,8 @@ pub fn open_rpc(attr: TokenStream, item: TokenStream) -> TokenStream {
#trait_data
pub struct #open_rpc_name;
impl #open_rpc_name {
pub fn open_rpc() -> open_rpc::Project{
let mut builder = open_rpc::ProjectBuilder::new(#proj_name, #namespace);
pub fn open_rpc() -> sui_open_rpc::Project{
let mut builder = sui_open_rpc::ProjectBuilder::new(#proj_name, #namespace);
#license
#contact
#description
Expand Down
2 changes: 1 addition & 1 deletion sui/src/rpc_gateway.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ use jsonrpsee::core::RpcResult;
use jsonrpsee_proc_macros::rpc;
use move_core_types::identifier::Identifier;
use move_core_types::language_storage::TypeTag;
use open_rpc_macros::open_rpc;
use schemars::JsonSchema;
use serde::Deserialize;
use serde::Serialize;
use serde_with::base64;
use serde_with::serde_as;
use sui_core::gateway_state::gateway_responses::TransactionResponse;
use sui_core::gateway_state::{GatewayClient, GatewayState, GatewayTxSeqNumber};
use sui_open_rpc_macros::open_rpc;
use sui_types::base_types::{ObjectID, SuiAddress, TransactionDigest};
use sui_types::crypto;
use sui_types::crypto::SignableBytes;
Expand Down