-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add sp-client for resource-viewer (#163)
* add sp-client for resource-viewer * make json-schema optional as feature * update deps * support ss58 addrs in param & query * support output block height * partially support input block height * fix query parsing error formatting * bump version minor * improve documentation for resource viewer
- Loading branch information
Showing
8 changed files
with
3,293 additions
and
344 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "move-resource-viewer" | ||
version = "0.1.2" | ||
version = "0.1.3" | ||
authors = ["Alex Koz. <[email protected]>"] | ||
edition = "2018" | ||
|
||
|
@@ -13,7 +13,7 @@ http = "0.2" | |
|
||
serde = { version = "=1.0.118", features = ["derive", "rc"] } | ||
serde_json = "1.0" | ||
schemars = { version = "0.8", features = ["default", "derive", "preserve_order"] } | ||
schemars = { version = "0.8", features = ["default", "derive", "preserve_order"], optional = true } | ||
hex = "0.4.2" | ||
|
||
# move-lang deps: | ||
|
@@ -22,7 +22,20 @@ libra = { package = "dfibra", git = "https://github.com/dfinance/libra.git", bra | |
lang = { path = "../lang" } | ||
git-hash = { path = "../common/git-hash" } | ||
compat = { path = "../lang/compat", package = "move-compat" } | ||
dnclient = { path = "../common/dnode-rest-client", package = "dnode-rest-client" } | ||
dnclient = { path = "../common/dnode-rest-client", package = "dnode-rest-client", optional = true } | ||
|
||
# ps: | ||
[dependencies.substrate-api-client] | ||
git = "https://github.com/scs/substrate-api-client.git" | ||
rev = "62afbac0be1928681d8c70565fa0cc39a92cf4c8" | ||
optional = true | ||
[dependencies.keyring] | ||
version = '2.0.0' | ||
package = "sp-keyring" | ||
optional = true | ||
[dependencies.sp-core] | ||
version = '2.0.0' | ||
optional = true | ||
|
||
# cli: | ||
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] | ||
|
@@ -32,21 +45,29 @@ env_logger = "0.8.2" | |
|
||
[features] | ||
default = [ | ||
"dfinance_address" | ||
"json-schema", | ||
"dfinance_address", | ||
] | ||
|
||
libra_address = [ | ||
"lang/libra_address", | ||
"libra/libra_address", | ||
"compat/libra_address", | ||
"dnclient", | ||
] | ||
dfinance_address = [ | ||
"lang/dfinance_address", | ||
"libra/dfinance_address", | ||
"compat/dfinance_address", | ||
"dnclient", | ||
] | ||
ps_address = [ | ||
"lang/ps_address", | ||
"libra/ps_address", | ||
"compat/ps_address", | ||
] | ||
"substrate-api-client", | ||
"keyring", | ||
"sp-core", | ||
] | ||
|
||
json-schema = [ "schemars", ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
#[macro_use] | ||
extern crate anyhow; | ||
|
||
pub mod ser; | ||
pub mod tte; | ||
|
||
#[cfg(feature = "ps_address")] | ||
mod sp_client; | ||
|
||
pub mod net { | ||
#[cfg(any(feature = "dfinance_address", feature = "libra_address"))] | ||
pub use dnclient::blocking::{get_resource, client::DnodeRestClient as NodeClient}; | ||
#[cfg(feature = "ps_address")] | ||
pub use super::sp_client::*; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.