Move vote_signer back to paritytech/jsonrpc
This commit is contained in:
committed by
Tyera Eulberg
parent
85333c5d62
commit
4985b682c3
@@ -12,12 +12,14 @@ homepage = "https://solana.com/"
|
||||
bs58 = "0.2.0"
|
||||
clap = "2.31"
|
||||
log = "0.4.2"
|
||||
jsonrpc-core = "10.0.1"
|
||||
jsonrpc-derive = "10.0.1"
|
||||
jsonrpc-http-server = "10.0.1"
|
||||
jsonrpc-pubsub = "10.0.1"
|
||||
serde = "1.0.87"
|
||||
serde_json = "1.0.38"
|
||||
solana-sdk = { path = "../sdk", version = "0.12.0" }
|
||||
solana-metrics = { path = "../metrics", version = "0.12.0" }
|
||||
solana-jsonrpc-core = "0.4.0"
|
||||
solana-jsonrpc-http-server = "0.4.0"
|
||||
solana-jsonrpc-macros = "0.4.0"
|
||||
|
||||
[lib]
|
||||
name = "solana_vote_signer"
|
||||
|
@@ -2,11 +2,7 @@ pub mod rpc;
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
extern crate solana_jsonrpc_core as jsonrpc_core;
|
||||
extern crate solana_jsonrpc_http_server as jsonrpc_http_server;
|
||||
extern crate solana_sdk;
|
||||
#[macro_use]
|
||||
extern crate solana_jsonrpc_macros as jsonrpc_macros;
|
||||
#[cfg(test)]
|
||||
#[macro_use]
|
||||
extern crate serde_json;
|
||||
|
@@ -1,7 +1,8 @@
|
||||
//! The `rpc` module implements the Vote signing service RPC interface.
|
||||
|
||||
use crate::jsonrpc_core::*;
|
||||
use crate::jsonrpc_http_server::*;
|
||||
use jsonrpc_core::{Error, MetaIoHandler, Metadata, Result};
|
||||
use jsonrpc_derive::rpc;
|
||||
use jsonrpc_http_server::{hyper, AccessControlAllowOrigin, DomainsValidation, ServerBuilder};
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use solana_sdk::signature::{Keypair, KeypairUtil, Signature};
|
||||
use std::collections::HashMap;
|
||||
@@ -68,19 +69,18 @@ pub struct Meta {
|
||||
}
|
||||
impl Metadata for Meta {}
|
||||
|
||||
build_rpc_trait! {
|
||||
pub trait VoteSignerRpc {
|
||||
type Metadata;
|
||||
#[rpc]
|
||||
pub trait VoteSignerRpc {
|
||||
type Metadata;
|
||||
|
||||
#[rpc(meta, name = "registerNode")]
|
||||
fn register(&self, Self::Metadata, Pubkey, Signature, Vec<u8>) -> Result<Pubkey>;
|
||||
#[rpc(meta, name = "registerNode")]
|
||||
fn register(&self, _: Self::Metadata, _: Pubkey, _: Signature, _: Vec<u8>) -> Result<Pubkey>;
|
||||
|
||||
#[rpc(meta, name = "signVote")]
|
||||
fn sign(&self, Self::Metadata, Pubkey, Signature, Vec<u8>) -> Result<Signature>;
|
||||
#[rpc(meta, name = "signVote")]
|
||||
fn sign(&self, _: Self::Metadata, _: Pubkey, _: Signature, _: Vec<u8>) -> Result<Signature>;
|
||||
|
||||
#[rpc(meta, name = "deregisterNode")]
|
||||
fn deregister(&self, Self::Metadata, Pubkey, Signature, Vec<u8>) -> Result<()>;
|
||||
}
|
||||
#[rpc(meta, name = "deregisterNode")]
|
||||
fn deregister(&self, _: Self::Metadata, _: Pubkey, _: Signature, _: Vec<u8>) -> Result<()>;
|
||||
}
|
||||
|
||||
pub struct VoteSignerRpcImpl;
|
||||
|
Reference in New Issue
Block a user