RPC 服务端第一入口

APIOwner

钱包内部 API,默认使用 3420 端口。

/// Wrapper around internal API functions, containing a reference to
/// the wallet/keychain that they're acting upon
pub struct APIOwner<W: ?Sized, C, K>
where
    W: WalletBackend<C, K>,
    C: WalletClient,
    K: Keychain,
{
    /// Wallet, contains its keychain (TODO: Split these up into 2 traits
    /// perhaps)
    pub wallet: Arc<Mutex<Box<W>>>,
    phantom: PhantomData<K>,
    phantom_c: PhantomData<C>,
}

APIForeign

钱包外部 API,默认使用 3415 端口。

/// Wrapper around external API functions, intended to communicate
/// with other parties
pub struct APIForeign<W: ?Sized, C, K>
where
    W: WalletBackend<C, K>,
    C: WalletClient,
    K: Keychain,
{
    /// Wallet, contains its keychain (TODO: Split these up into 2 traits
    /// perhaps)
    pub wallet: Arc<Mutex<Box<W>>>,
    phantom: PhantomData<K>,
    phantom_c: PhantomData<C>,
}

results matching ""

    No results matching ""