regenerated typescript types
This commit is contained in:
@@ -135,7 +135,10 @@ impl Display for GatewayBond {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/GatewayConfigUpdate.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/GatewayConfigUpdate.ts"
|
||||
)
|
||||
)]
|
||||
#[cw_serde]
|
||||
pub struct GatewayConfigUpdate {
|
||||
|
||||
@@ -215,7 +215,7 @@ impl Display for EpochState {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/Interval.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/Interval.ts")
|
||||
)]
|
||||
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Eq, Serialize)]
|
||||
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
|
||||
|
||||
@@ -541,7 +541,7 @@ impl MixNodeBond {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/Mixnode.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/Mixnode.ts")
|
||||
)]
|
||||
pub struct MixNode {
|
||||
/// Network address of this mixnode, for example 1.1.1.1 or foo.mixnode.com
|
||||
@@ -642,7 +642,10 @@ impl From<LegacyMixLayer> for u8 {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/PendingMixnodeChanges.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/PendingMixnodeChanges.ts"
|
||||
)
|
||||
)]
|
||||
#[cw_serde]
|
||||
#[derive(Default, Copy)]
|
||||
@@ -665,7 +668,10 @@ impl PendingMixNodeChanges {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/UnbondedMixnode.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/UnbondedMixnode.ts"
|
||||
)
|
||||
)]
|
||||
#[cw_serde]
|
||||
pub struct UnbondedMixnode {
|
||||
@@ -689,7 +695,10 @@ pub struct UnbondedMixnode {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/MixNodeConfigUpdate.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/MixNodeConfigUpdate.ts"
|
||||
)
|
||||
)]
|
||||
#[cw_serde]
|
||||
pub struct MixNodeConfigUpdate {
|
||||
|
||||
@@ -15,7 +15,7 @@ use std::fmt::{Display, Formatter};
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/Role.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/Role.ts")
|
||||
)]
|
||||
pub enum Role {
|
||||
#[serde(rename = "eg", alias = "entry", alias = "entry_gateway")]
|
||||
@@ -343,7 +343,7 @@ impl NymNodeBond {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/NymNode.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/NymNode.ts")
|
||||
)]
|
||||
pub struct NymNode {
|
||||
/// Network address of this nym-node, for example 1.1.1.1 or foo.mixnode.com
|
||||
@@ -405,7 +405,10 @@ impl From<Gateway> for NymNode {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/NodeConfigUpdate.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/NodeConfigUpdate.ts"
|
||||
)
|
||||
)]
|
||||
#[cw_serde]
|
||||
#[derive(Default)]
|
||||
@@ -424,7 +427,10 @@ pub struct NodeConfigUpdate {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/PendingNodeChanges.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/PendingNodeChanges.ts"
|
||||
)
|
||||
)]
|
||||
pub struct PendingNodeChanges {
|
||||
pub pledge_change: Option<EpochEventId>,
|
||||
|
||||
@@ -14,7 +14,10 @@ pub type WorkFactor = Decimal;
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/IntervalRewardParams.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/IntervalRewardParams.ts"
|
||||
)
|
||||
)]
|
||||
#[cw_serde]
|
||||
#[derive(Copy)]
|
||||
@@ -80,7 +83,10 @@ impl IntervalRewardParams {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/RewardingParams.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/RewardingParams.ts"
|
||||
)
|
||||
)]
|
||||
#[cw_serde]
|
||||
#[derive(Copy)]
|
||||
@@ -241,7 +247,10 @@ impl RewardingParams {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/RewardedSetParams.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/RewardedSetParams.ts"
|
||||
)
|
||||
)]
|
||||
#[cw_serde]
|
||||
#[derive(Copy)]
|
||||
@@ -306,7 +315,10 @@ impl RewardedSetParams {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/NodeRewardingParameters.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/NodeRewardingParameters.ts"
|
||||
)
|
||||
)]
|
||||
#[cw_serde]
|
||||
#[derive(Copy)]
|
||||
@@ -338,7 +350,10 @@ impl NodeRewardingParameters {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/IntervalRewardingParamsUpdate.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/IntervalRewardingParamsUpdate.ts"
|
||||
)
|
||||
)]
|
||||
#[cw_serde]
|
||||
#[derive(Copy, Default)]
|
||||
@@ -392,7 +407,10 @@ impl IntervalRewardingParamsUpdate {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/ActiveSetUpdate.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/ActiveSetUpdate.ts"
|
||||
)
|
||||
)]
|
||||
#[cw_serde]
|
||||
#[derive(Copy, Default)]
|
||||
|
||||
@@ -10,7 +10,10 @@ pub mod simulator;
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/RewardEstimate.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/RewardEstimate.ts"
|
||||
)
|
||||
)]
|
||||
#[cw_serde]
|
||||
#[derive(Copy, Default)]
|
||||
|
||||
@@ -10,7 +10,7 @@ use std::str::FromStr;
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/Period.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/Period.ts")
|
||||
)]
|
||||
#[cw_serde]
|
||||
/// The vesting period.
|
||||
|
||||
@@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize};
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/Account.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/Account.ts")
|
||||
)]
|
||||
#[derive(Serialize, Deserialize, JsonSchema)]
|
||||
pub struct Account {
|
||||
@@ -31,7 +31,10 @@ impl Account {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/AccountWithMnemonic.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/AccountWithMnemonic.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct AccountWithMnemonic {
|
||||
@@ -42,7 +45,7 @@ pub struct AccountWithMnemonic {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/AccountEntry.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/AccountEntry.ts")
|
||||
)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct AccountEntry {
|
||||
@@ -53,7 +56,7 @@ pub struct AccountEntry {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/Balance.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/Balance.ts")
|
||||
)]
|
||||
#[derive(Serialize, Deserialize)]
|
||||
pub struct Balance {
|
||||
|
||||
@@ -13,7 +13,10 @@ use strum::{Display, EnumString, VariantNames};
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/CurrencyDenom.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/CurrencyDenom.ts"
|
||||
)
|
||||
)]
|
||||
#[cfg_attr(feature = "generate-ts", ts(rename_all = "lowercase"))]
|
||||
#[derive(
|
||||
@@ -247,7 +250,7 @@ impl From<DenomDetailsOwned> for CoinMetadata {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/DecCoin.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/DecCoin.ts")
|
||||
)]
|
||||
pub struct DecCoin {
|
||||
#[cfg_attr(feature = "generate-ts", ts(as = "CurrencyDenom"))]
|
||||
|
||||
@@ -10,7 +10,7 @@ use serde::{Deserialize, Serialize};
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/Delegation.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/Delegation.ts")
|
||||
)]
|
||||
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, JsonSchema)]
|
||||
pub struct Delegation {
|
||||
@@ -39,7 +39,10 @@ impl Delegation {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/DelegationWithEverything.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/DelegationWithEverything.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, JsonSchema)]
|
||||
pub struct DelegationWithEverything {
|
||||
@@ -70,7 +73,10 @@ pub struct DelegationWithEverything {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/DelegationResult.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/DelegationResult.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Serialize, Deserialize, JsonSchema, Clone, PartialEq, Eq, Debug)]
|
||||
pub struct DelegationResult {
|
||||
@@ -82,7 +88,10 @@ pub struct DelegationResult {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/DelegationSummaryResponse.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/DelegationSummaryResponse.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub struct DelegationsSummaryResponse {
|
||||
|
||||
@@ -11,7 +11,10 @@ use serde::{Deserialize, Serialize};
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/DelegationEventKind.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/DelegationEventKind.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Clone, Deserialize, Serialize, PartialEq, Eq, JsonSchema, Debug)]
|
||||
pub enum DelegationEventKind {
|
||||
@@ -22,7 +25,10 @@ pub enum DelegationEventKind {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/DelegationEvent.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/DelegationEvent.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Clone, Deserialize, Serialize, PartialEq, Eq, JsonSchema, Debug)]
|
||||
pub struct DelegationEvent {
|
||||
@@ -36,7 +42,10 @@ pub struct DelegationEvent {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/WrappedDelegationEvent.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/WrappedDelegationEvent.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Clone, Deserialize, Serialize, PartialEq, Eq, JsonSchema, Debug)]
|
||||
pub struct WrappedDelegationEvent {
|
||||
|
||||
@@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize};
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/FeeDetails.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/FeeDetails.ts")
|
||||
)]
|
||||
pub struct FeeDetails {
|
||||
// expected to be used by the wallet in order to display detailed fee information to the user
|
||||
@@ -30,14 +30,14 @@ pub mod ts_type_helpers {
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, ts_rs::TS)]
|
||||
#[ts(export_to = "ts-packages/types/src/types/rust/Fee.ts")]
|
||||
#[ts(export, export_to = "ts-packages/types/src/types/rust/Fee.ts")]
|
||||
pub enum Fee {
|
||||
Manual(CosmosFee),
|
||||
Auto(Option<GasAdjustment>),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, ts_rs::TS)]
|
||||
#[ts(export_to = "ts-packages/types/src/types/rust/CosmosFee.ts")]
|
||||
#[ts(export, export_to = "ts-packages/types/src/types/rust/CosmosFee.ts")]
|
||||
// this should corresponds to cosmrs::tx::Fee
|
||||
// IMPORTANT NOTE: this should work as of cosmrs 0.7.1 due to their `FromStr` implementations
|
||||
// on the type. The below struct might have to get readjusted if we update cosmrs!!
|
||||
@@ -50,7 +50,7 @@ pub mod ts_type_helpers {
|
||||
|
||||
// Note: I've got a feeling this one will bite us hard at some point...
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, ts_rs::TS)]
|
||||
#[ts(export_to = "ts-packages/types/src/types/rust/Coin.ts")]
|
||||
#[ts(export, export_to = "ts-packages/types/src/types/rust/Coin.ts")]
|
||||
// this should corresponds to cosmrs::Coin
|
||||
// IMPORTANT NOTE: this should work as of cosmrs 0.7.1 due to their `FromStr` implementations
|
||||
// on the type. The below struct might have to get readjusted if we update cosmrs!!
|
||||
|
||||
@@ -5,7 +5,7 @@ use serde::{Deserialize, Serialize};
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/Gas.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/Gas.ts")
|
||||
)]
|
||||
#[derive(Deserialize, Serialize, Copy, Clone, Debug)]
|
||||
pub struct Gas {
|
||||
@@ -36,7 +36,7 @@ impl From<i64> for Gas {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/GasInfo.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/GasInfo.ts")
|
||||
)]
|
||||
#[derive(Deserialize, Serialize, Copy, Clone, Debug)]
|
||||
pub struct GasInfo {
|
||||
|
||||
@@ -10,7 +10,7 @@ use std::fmt;
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/Gateway.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/Gateway.ts")
|
||||
)]
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Eq, PartialOrd, Serialize, JsonSchema)]
|
||||
pub struct Gateway {
|
||||
@@ -51,7 +51,7 @@ impl From<MixnetContractGateway> for Gateway {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/GatewayBond.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/GatewayBond.ts")
|
||||
)]
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Eq, Serialize, JsonSchema)]
|
||||
pub struct GatewayBond {
|
||||
|
||||
@@ -17,7 +17,10 @@ use std::net::IpAddr;
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/MixNodeDetails.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/MixNodeDetails.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize, JsonSchema)]
|
||||
pub struct MixNodeDetails {
|
||||
@@ -46,7 +49,7 @@ impl MixNodeDetails {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/MixNodeBond.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/MixNodeBond.ts")
|
||||
)]
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize, JsonSchema)]
|
||||
pub struct MixNodeBond {
|
||||
@@ -80,7 +83,10 @@ impl MixNodeBond {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/NodeRewarding.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/NodeRewarding.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize, JsonSchema)]
|
||||
pub struct NodeRewarding {
|
||||
@@ -126,7 +132,10 @@ impl NodeRewarding {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/MixNodeCostParams.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/MixNodeCostParams.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize, JsonSchema)]
|
||||
pub struct NodeCostParams {
|
||||
|
||||
@@ -15,7 +15,10 @@ use serde::{Deserialize, Serialize};
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/NymNodeDetails.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/NymNodeDetails.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize, JsonSchema)]
|
||||
pub struct NymNodeDetails {
|
||||
@@ -51,7 +54,7 @@ impl NymNodeDetails {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/NymNodeBond.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/NymNodeBond.ts")
|
||||
)]
|
||||
#[derive(Clone, Debug, Deserialize, PartialEq, Serialize, JsonSchema)]
|
||||
pub struct NymNodeBond {
|
||||
|
||||
@@ -17,7 +17,10 @@ use serde::{Deserialize, Serialize};
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/PendingEpochEvent.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/PendingEpochEvent.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, JsonSchema)]
|
||||
pub struct PendingEpochEvent {
|
||||
@@ -42,7 +45,10 @@ impl PendingEpochEvent {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/PendingEpochEventData.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/PendingEpochEventData.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq, JsonSchema)]
|
||||
pub enum PendingEpochEventData {
|
||||
@@ -125,7 +131,10 @@ impl PendingEpochEventData {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/PendingIntervalEvent.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/PendingIntervalEvent.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, JsonSchema)]
|
||||
pub struct PendingIntervalEvent {
|
||||
@@ -153,7 +162,10 @@ impl PendingIntervalEvent {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/PendingIntervalEventData.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/PendingIntervalEventData.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, JsonSchema)]
|
||||
pub enum PendingIntervalEventData {
|
||||
|
||||
@@ -8,7 +8,7 @@ use serde::{Deserialize, Serialize};
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/SendTxResult.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/SendTxResult.ts")
|
||||
)]
|
||||
#[derive(Deserialize, Serialize, Debug)]
|
||||
pub struct SendTxResult {
|
||||
@@ -38,7 +38,10 @@ impl SendTxResult {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/TransactionDetails.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/TransactionDetails.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Deserialize, Serialize, Debug)]
|
||||
pub struct TransactionDetails {
|
||||
@@ -60,7 +63,10 @@ impl TransactionDetails {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/TransactionExecuteResult.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/TransactionExecuteResult.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Deserialize, Serialize, Debug)]
|
||||
pub struct TransactionExecuteResult {
|
||||
@@ -89,7 +95,10 @@ impl TransactionExecuteResult {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/RpcTransactionResponse.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/RpcTransactionResponse.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub struct RpcTransactionResponse {
|
||||
|
||||
@@ -9,7 +9,7 @@ use serde::{Deserialize, Serialize};
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/PledgeData.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/PledgeData.ts")
|
||||
)]
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct PledgeData {
|
||||
@@ -32,7 +32,10 @@ impl PledgeData {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/OriginalVestingResponse.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/OriginalVestingResponse.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct OriginalVestingResponse {
|
||||
@@ -57,7 +60,10 @@ impl OriginalVestingResponse {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/VestingAccountInfo.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/VestingAccountInfo.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct VestingAccountInfo {
|
||||
@@ -86,7 +92,10 @@ impl VestingAccountInfo {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/VestingPeriod.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/VestingPeriod.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct VestingPeriod {
|
||||
|
||||
@@ -69,7 +69,10 @@ impl Display for RequestError {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/MixnodeStatus.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/MixnodeStatus.ts"
|
||||
)
|
||||
)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum MixnodeStatus {
|
||||
@@ -88,7 +91,10 @@ impl MixnodeStatus {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/MixnodeCoreStatusResponse.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/MixnodeCoreStatusResponse.ts"
|
||||
)
|
||||
)]
|
||||
pub struct MixnodeCoreStatusResponse {
|
||||
pub mix_id: NodeId,
|
||||
@@ -99,7 +105,10 @@ pub struct MixnodeCoreStatusResponse {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/GatewayCoreStatusResponse.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/GatewayCoreStatusResponse.ts"
|
||||
)
|
||||
)]
|
||||
pub struct GatewayCoreStatusResponse {
|
||||
pub identity: String,
|
||||
@@ -110,7 +119,10 @@ pub struct GatewayCoreStatusResponse {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/MixnodeStatusResponse.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/MixnodeStatusResponse.ts"
|
||||
)
|
||||
)]
|
||||
pub struct MixnodeStatusResponse {
|
||||
pub status: MixnodeStatus,
|
||||
@@ -133,7 +145,10 @@ pub struct NodePerformance {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/NodeAnnotation.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/NodeAnnotation.ts"
|
||||
)
|
||||
)]
|
||||
pub struct NodeAnnotation {
|
||||
#[cfg_attr(feature = "generate-ts", ts(type = "string"))]
|
||||
@@ -145,7 +160,10 @@ pub struct NodeAnnotation {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/AnnotationResponse.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/AnnotationResponse.ts"
|
||||
)
|
||||
)]
|
||||
pub struct AnnotationResponse {
|
||||
#[schema(value_type = u32)]
|
||||
@@ -157,7 +175,10 @@ pub struct AnnotationResponse {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/NodePerformanceResponse.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/NodePerformanceResponse.ts"
|
||||
)
|
||||
)]
|
||||
pub struct NodePerformanceResponse {
|
||||
#[schema(value_type = u32)]
|
||||
@@ -169,7 +190,10 @@ pub struct NodePerformanceResponse {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/NodeDatePerformanceResponse.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/NodeDatePerformanceResponse.ts"
|
||||
)
|
||||
)]
|
||||
pub struct NodeDatePerformanceResponse {
|
||||
#[schema(value_type = u32)]
|
||||
@@ -359,7 +383,10 @@ pub struct ComputeRewardEstParam {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/RewardEstimationResponse.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/RewardEstimationResponse.ts"
|
||||
)
|
||||
)]
|
||||
#[derive(Clone, Copy, Debug, Serialize, Deserialize, JsonSchema, ToSchema)]
|
||||
pub struct RewardEstimationResponse {
|
||||
@@ -391,7 +418,10 @@ pub struct GatewayUptimeResponse {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/StakeSaturationResponse.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/StakeSaturationResponse.ts"
|
||||
)
|
||||
)]
|
||||
pub struct StakeSaturationResponse {
|
||||
#[cfg_attr(feature = "generate-ts", ts(type = "string"))]
|
||||
@@ -410,7 +440,10 @@ pub type StakeSaturation = Decimal;
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/SelectionChance.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/SelectionChance.ts"
|
||||
)
|
||||
)]
|
||||
pub enum SelectionChance {
|
||||
High,
|
||||
@@ -452,7 +485,10 @@ impl fmt::Display for SelectionChance {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/InclusionProbabilityResponse.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/InclusionProbabilityResponse.ts"
|
||||
)
|
||||
)]
|
||||
pub struct InclusionProbabilityResponse {
|
||||
pub in_active: SelectionChance,
|
||||
@@ -515,7 +551,10 @@ pub struct GatewayStatusReportResponse {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/PerformanceHistoryResponse.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/PerformanceHistoryResponse.ts"
|
||||
)
|
||||
)]
|
||||
pub struct PerformanceHistoryResponse {
|
||||
#[schema(value_type = u32)]
|
||||
@@ -527,7 +566,10 @@ pub struct PerformanceHistoryResponse {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/UptimeHistoryResponse.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/UptimeHistoryResponse.ts"
|
||||
)
|
||||
)]
|
||||
pub struct UptimeHistoryResponse {
|
||||
#[schema(value_type = u32)]
|
||||
@@ -539,7 +581,10 @@ pub struct UptimeHistoryResponse {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/HistoricalUptimeResponse.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/HistoricalUptimeResponse.ts"
|
||||
)
|
||||
)]
|
||||
pub struct HistoricalUptimeResponse {
|
||||
#[schema(value_type = String, example = "1970-01-01")]
|
||||
@@ -554,7 +599,10 @@ pub struct HistoricalUptimeResponse {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/HistoricalPerformanceResponse.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/HistoricalPerformanceResponse.ts"
|
||||
)
|
||||
)]
|
||||
pub struct HistoricalPerformanceResponse {
|
||||
#[schema(value_type = String, example = "1970-01-01")]
|
||||
@@ -792,7 +840,10 @@ impl NymNodeDescription {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/DescribedNodeType.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/DescribedNodeType.ts"
|
||||
)
|
||||
)]
|
||||
pub enum DescribedNodeType {
|
||||
LegacyMixnode,
|
||||
@@ -804,7 +855,10 @@ pub enum DescribedNodeType {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/DeclaredRoles.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/DeclaredRoles.ts"
|
||||
)
|
||||
)]
|
||||
pub struct DeclaredRoles {
|
||||
pub mixnode: bool,
|
||||
|
||||
@@ -9,7 +9,7 @@ use utoipa::ToSchema;
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/Pagination.ts")
|
||||
ts(export, export_to = "ts-packages/types/src/types/rust/Pagination.ts")
|
||||
)]
|
||||
pub struct Pagination {
|
||||
pub total: usize,
|
||||
@@ -21,7 +21,10 @@ pub struct Pagination {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "ts-packages/types/src/types/rust/PaginatedResponse.ts")
|
||||
ts(
|
||||
export,
|
||||
export_to = "ts-packages/types/src/types/rust/PaginatedResponse.ts"
|
||||
)
|
||||
)]
|
||||
pub struct PaginatedResponse<T> {
|
||||
pub pagination: Pagination,
|
||||
|
||||
@@ -13,7 +13,7 @@ use serde::{Deserialize, Serialize};
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "nym-wallet/src/types/rust/StateParams.ts")
|
||||
ts(export, export_to = "nym-wallet/src/types/rust/StateParams.ts")
|
||||
)]
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct TauriContractStateParams {
|
||||
@@ -27,7 +27,7 @@ pub struct TauriContractStateParams {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "nym-wallet/src/types/rust/OperatingCostRange.ts")
|
||||
ts(export, export_to = "nym-wallet/src/types/rust/OperatingCostRange.ts")
|
||||
)]
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct TauriOperatingCostRange {
|
||||
@@ -38,7 +38,7 @@ pub struct TauriOperatingCostRange {
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "nym-wallet/src/types/rust/ProfitMarginRange.ts")
|
||||
ts(export, export_to = "nym-wallet/src/types/rust/ProfitMarginRange.ts")
|
||||
)]
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
pub struct TauriProfitMarginRange {
|
||||
|
||||
@@ -8,7 +8,7 @@ use serde::{Deserialize, Serialize};
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "nym-wallet/src/types/rust/Interval.ts")
|
||||
ts(export, export_to = "nym-wallet/src/types/rust/Interval.ts")
|
||||
)]
|
||||
#[derive(Clone, Copy, Debug, Deserialize, PartialEq, Eq, PartialOrd, Serialize)]
|
||||
pub struct Interval {
|
||||
|
||||
@@ -14,7 +14,7 @@ mod sandbox;
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "nym-wallet/src/types/rust/Network.ts")
|
||||
ts(export, export_to = "nym-wallet/src/types/rust/Network.ts")
|
||||
)]
|
||||
#[derive(Copy, Clone, Debug, Deserialize, EnumIter, Eq, Hash, PartialEq, Serialize)]
|
||||
pub enum Network {
|
||||
|
||||
@@ -5,7 +5,7 @@ use std::fmt;
|
||||
#[cfg_attr(feature = "generate-ts", derive(ts_rs::TS))]
|
||||
#[cfg_attr(
|
||||
feature = "generate-ts",
|
||||
ts(export_to = "nym-wallet/src/types/rust/ValidatorUrls.ts")
|
||||
ts(export, export_to = "nym-wallet/src/types/rust/ValidatorUrls.ts")
|
||||
)]
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct ValidatorUrls {
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
import {
|
||||
DecCoin,
|
||||
GatewayBond,
|
||||
InclusionProbabilityResponse,
|
||||
MixNodeDetails,
|
||||
MixnodeStatusResponse,
|
||||
PendingIntervalEvent,
|
||||
RewardEstimationResponse,
|
||||
StakeSaturationResponse,
|
||||
WrappedDelegationEvent,
|
||||
NymNodeDetails,
|
||||
DecCoin,
|
||||
GatewayBond,
|
||||
InclusionProbabilityResponse,
|
||||
MixNodeDetails,
|
||||
MixnodeStatusResponse,
|
||||
PendingIntervalEvent,
|
||||
RewardEstimationResponse,
|
||||
StakeSaturationResponse,
|
||||
WrappedDelegationEvent,
|
||||
NymNodeDetails,
|
||||
} from '@nymproject/types';
|
||||
import {Interval, TGatewayReport, TNodeDescription} from 'src/types';
|
||||
import {invokeWrapper} from './wrapper';
|
||||
import { Interval, TGatewayReport, TNodeDescription } from 'src/types';
|
||||
import { invokeWrapper } from './wrapper';
|
||||
|
||||
export const getAllPendingDelegations = async () =>
|
||||
invokeWrapper<WrappedDelegationEvent[]>('get_pending_delegation_events');
|
||||
invokeWrapper<WrappedDelegationEvent[]>('get_pending_delegation_events');
|
||||
|
||||
export const getMixnodeBondDetails = async () => invokeWrapper<MixNodeDetails | null>('mixnode_bond_details');
|
||||
export const getGatewayBondDetails = async () => invokeWrapper<GatewayBond | null>('gateway_bond_details');
|
||||
@@ -22,44 +22,44 @@ export const getNymNodeBondDetails = async () => invokeWrapper<NymNodeDetails |
|
||||
export const getMixnodeAvgUptime = async () => invokeWrapper<number | null>('get_mixnode_avg_uptime');
|
||||
|
||||
export const getPendingOperatorRewards = async (address: string) =>
|
||||
invokeWrapper<DecCoin>('get_pending_operator_rewards', {address});
|
||||
invokeWrapper<DecCoin>('get_pending_operator_rewards', { address });
|
||||
|
||||
export const getMixnodeStakeSaturation = async (mixId: number) =>
|
||||
invokeWrapper<StakeSaturationResponse>('mixnode_stake_saturation', {mixId});
|
||||
invokeWrapper<StakeSaturationResponse>('mixnode_stake_saturation', { mixId });
|
||||
|
||||
export const getMixnodeRewardEstimation = async (mixId: number) =>
|
||||
invokeWrapper<RewardEstimationResponse>('mixnode_reward_estimation', {mixId});
|
||||
invokeWrapper<RewardEstimationResponse>('mixnode_reward_estimation', { mixId });
|
||||
|
||||
export const getMixnodeStatus = async (mixId: number) =>
|
||||
invokeWrapper<MixnodeStatusResponse>('mixnode_status', {mixId});
|
||||
invokeWrapper<MixnodeStatusResponse>('mixnode_status', { mixId });
|
||||
|
||||
export const checkMixnodeOwnership = async () => invokeWrapper<boolean>('owns_mixnode');
|
||||
|
||||
export const checkGatewayOwnership = async () => invokeWrapper<boolean>('owns_gateway');
|
||||
|
||||
export const getInclusionProbability = async (mixId: number) =>
|
||||
invokeWrapper<InclusionProbabilityResponse>('mixnode_inclusion_probability', {mixId});
|
||||
invokeWrapper<InclusionProbabilityResponse>('mixnode_inclusion_probability', { mixId });
|
||||
|
||||
export const getCurrentInterval = async () => invokeWrapper<Interval>('get_current_interval');
|
||||
|
||||
export const getNumberOfMixnodeDelegators = async (mixId: number) =>
|
||||
invokeWrapper<number>('get_number_of_mixnode_delegators', {mixId});
|
||||
invokeWrapper<number>('get_number_of_mixnode_delegators', { mixId });
|
||||
|
||||
export const getNodeDescription = async (host: string, port: number) =>
|
||||
invokeWrapper<TNodeDescription>('get_mix_node_description', {host, port});
|
||||
invokeWrapper<TNodeDescription>('get_mix_node_description', { host, port });
|
||||
|
||||
export const getPendingIntervalEvents = async () =>
|
||||
invokeWrapper<PendingIntervalEvent[]>('get_pending_interval_events');
|
||||
invokeWrapper<PendingIntervalEvent[]>('get_pending_interval_events');
|
||||
|
||||
export const getGatewayReport = async (identity: string) =>
|
||||
invokeWrapper<TGatewayReport>('gateway_report', {identity});
|
||||
invokeWrapper<TGatewayReport>('gateway_report', { identity });
|
||||
|
||||
export const computeMixnodeRewardEstimation = async (args: {
|
||||
mixId: number;
|
||||
performance: string;
|
||||
pledgeAmount: number;
|
||||
totalDelegation: number;
|
||||
profitMarginPercent: string;
|
||||
intervalOperatingCost: { denom: 'unym'; amount: string };
|
||||
mixId: number;
|
||||
performance: string;
|
||||
pledgeAmount: number;
|
||||
totalDelegation: number;
|
||||
profitMarginPercent: string;
|
||||
intervalOperatingCost: { denom: 'unym'; amount: string };
|
||||
}) => invokeWrapper<RewardEstimationResponse>('compute_mixnode_reward_estimation', args);
|
||||
export const getMixnodeUptime = async (mixId: number) => invokeWrapper<number>('get_mixnode_uptime', {mixId});
|
||||
export const getMixnodeUptime = async (mixId: number) => invokeWrapper<number>('get_mixnode_uptime', { mixId });
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface AppEnv { ADMIN_ADDRESS: string | null, SHOW_TERMINAL: string | null, ENABLE_QA_MODE: string | null, }
|
||||
export type AppEnv = { ADMIN_ADDRESS: string | null; SHOW_TERMINAL: string | null; ENABLE_QA_MODE: string | null };
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface AppVersion { current_version: string, latest_version: string, is_update_available: boolean, }
|
||||
export type AppVersion = { current_version: string; latest_version: string; is_update_available: boolean };
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface Interval { id: number, epochs_in_interval: number, current_epoch_start_unix: bigint, current_epoch_id: number, epoch_length_seconds: bigint, total_elapsed_epochs: number, }
|
||||
export type Interval = {
|
||||
id: number;
|
||||
epochs_in_interval: number;
|
||||
current_epoch_start_unix: bigint;
|
||||
current_epoch_id: number;
|
||||
epoch_length_seconds: bigint;
|
||||
total_elapsed_epochs: number;
|
||||
};
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type Network = "QA" | "SANDBOX" | "MAINNET";
|
||||
export type Network = 'QA' | 'SANDBOX' | 'MAINNET';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DecCoin } from "../../../../ts-packages/types/src/types/rust/DecCoin";
|
||||
import type { DecCoin } from '@nymproject/types/src/types/rust/DecCoin';
|
||||
|
||||
export interface TauriOperatingCostRange { minimum: DecCoin, maximum: DecCoin, }
|
||||
export type TauriOperatingCostRange = { minimum: DecCoin; maximum: DecCoin };
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface TauriProfitMarginRange { minimum: string, maximum: string, }
|
||||
export type TauriProfitMarginRange = { minimum: string; maximum: string };
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DecCoin } from "../../../../ts-packages/types/src/types/rust/DecCoin";
|
||||
import type { TauriOperatingCostRange } from "./OperatingCostRange";
|
||||
import type { TauriProfitMarginRange } from "./ProfitMarginRange";
|
||||
import type { DecCoin } from '@nymproject/types/src/types/rust/DecCoin';
|
||||
import type { TauriOperatingCostRange } from './OperatingCostRange';
|
||||
import type { TauriProfitMarginRange } from './ProfitMarginRange';
|
||||
|
||||
export interface TauriContractStateParams { minimum_pledge: DecCoin, minimum_delegation: DecCoin | null, operating_cost: TauriOperatingCostRange, profit_margin: TauriProfitMarginRange, }
|
||||
export type TauriContractStateParams = {
|
||||
minimum_pledge: DecCoin;
|
||||
minimum_delegation: DecCoin | null;
|
||||
operating_cost: TauriOperatingCostRange;
|
||||
profit_margin: TauriProfitMarginRange;
|
||||
};
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface ValidatorUrl { url: string, name: string | null, }
|
||||
export type ValidatorUrl = { url: string; name: string | null };
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { ValidatorUrl } from "./ValidatorUrl";
|
||||
import type { ValidatorUrl } from './ValidatorUrl';
|
||||
|
||||
export interface ValidatorUrls { urls: Array<ValidatorUrl>, }
|
||||
export type Validator = { nyxd_url: string; nyxd_name: string | null; api_url: string | null };
|
||||
|
||||
export type ValidatorUrls = { urls: Array<ValidatorUrl> };
|
||||
|
||||
@@ -15,7 +15,7 @@ nym-validator-client = { path = "../../common/client-libs/validator-client", fea
|
||||
"generate-ts"
|
||||
] }
|
||||
nym-api-requests = { path = "../../nym-api/nym-api-requests", features = ["generate-ts"] }
|
||||
nym-mixnet-contract-common = { path = "../../common/cosmwasm-smart-contracts/mixnet-contract", features = [ "generate-ts" ]}
|
||||
nym-vesting-contract-common = { path = "../../common/cosmwasm-smart-contracts/vesting-contract", features = [ "generate-ts" ] }
|
||||
nym-types = { path = "../../common/types", features = [ "generate-ts" ] }
|
||||
nym-wallet-types = { path = "../../nym-wallet/nym-wallet-types", features = [ "generate-ts" ] }
|
||||
nym-mixnet-contract-common = { path = "../../common/cosmwasm-smart-contracts/mixnet-contract", features = ["generate-ts"] }
|
||||
nym-vesting-contract-common = { path = "../../common/cosmwasm-smart-contracts/vesting-contract", features = ["generate-ts"] }
|
||||
nym-types = { path = "../../common/types", features = ["generate-ts"] }
|
||||
nym-wallet-types = { path = "../../nym-wallet/nym-wallet-types", features = ["generate-ts"] }
|
||||
|
||||
@@ -60,7 +60,7 @@ macro_rules! do_export {
|
||||
}};
|
||||
}
|
||||
|
||||
fn main() {
|
||||
fn main() -> anyhow::Result<()> {
|
||||
println!("Starting export of types using ts-rs...");
|
||||
println!();
|
||||
|
||||
@@ -175,7 +175,10 @@ fn main() {
|
||||
println!();
|
||||
println!("Moving output files into place...");
|
||||
|
||||
for file in WalkDir::new("./")
|
||||
let source = Path::new("./bindings");
|
||||
|
||||
// move from ./bindings/foo/bar/X.ts into ../../foo/bar/X.ts
|
||||
for file in WalkDir::new(source)
|
||||
.into_iter()
|
||||
.filter_map(|file| file.ok())
|
||||
.filter(|f| {
|
||||
@@ -191,7 +194,9 @@ fn main() {
|
||||
{
|
||||
// construct the source and destination paths that can be used to replace the output file
|
||||
let src = file.path();
|
||||
let dst = dst_base.join(src);
|
||||
let sourceless_src = src.strip_prefix(source)?;
|
||||
|
||||
let dst = dst_base.join(sourceless_src);
|
||||
let dst_directory = dst.parent().expect("Could not get parent directory");
|
||||
|
||||
if !dst_directory.exists() {
|
||||
@@ -208,15 +213,19 @@ fn main() {
|
||||
println!("✅ {} => {}", file.path().display(), res.display());
|
||||
}
|
||||
Err(e) => {
|
||||
println!("❌ {}: {}", file.path().display(), e);
|
||||
println!("❌ {}: {e}", file.path().display());
|
||||
}
|
||||
},
|
||||
Err(e) => {
|
||||
println!("❌ {}: {}", file.path().display(), e);
|
||||
println!("❌ {}: {e}", file.path().display());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// finally remove the ephemeral dir
|
||||
std::fs::remove_dir_all(source)?;
|
||||
|
||||
println!();
|
||||
println!("Done");
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { CurrencyDenom } from './CurrencyDenom';
|
||||
|
||||
export interface Account {
|
||||
client_address: string;
|
||||
base_mix_denom: string;
|
||||
display_mix_denom: CurrencyDenom;
|
||||
}
|
||||
export type Account = { client_address: string; base_mix_denom: string; display_mix_denom: CurrencyDenom };
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface AccountEntry {
|
||||
id: string;
|
||||
address: string;
|
||||
}
|
||||
export type AccountEntry = { id: string; address: string };
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Account } from './Account';
|
||||
|
||||
export interface AccountWithMnemonic {
|
||||
account: Account;
|
||||
mnemonic: string;
|
||||
}
|
||||
export type AccountWithMnemonic = { account: Account; mnemonic: string };
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* Specification on how the active set should be updated.
|
||||
*/
|
||||
export type ActiveSetUpdate = {
|
||||
/**
|
||||
* The expected number of nodes assigned entry gateway role (i.e. [`Role::EntryGateway`])
|
||||
*/
|
||||
entry_gateways: number;
|
||||
/**
|
||||
* The expected number of nodes assigned exit gateway role (i.e. [`Role::ExitGateway`])
|
||||
*/
|
||||
exit_gateways: number;
|
||||
/**
|
||||
* The expected number of nodes assigned the 'mixnode' role, i.e. total of [`Role::Layer1`], [`Role::Layer2`] and [`Role::Layer3`].
|
||||
*/
|
||||
mixnodes: number;
|
||||
};
|
||||
@@ -0,0 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { NodeAnnotation } from './NodeAnnotation';
|
||||
|
||||
export type AnnotationResponse = { node_id: number; annotation: NodeAnnotation | null };
|
||||
@@ -1,7 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DecCoin } from './DecCoin';
|
||||
|
||||
export interface Balance {
|
||||
amount: DecCoin;
|
||||
printable_balance: string;
|
||||
}
|
||||
export type Balance = { amount: DecCoin; printable_balance: string };
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface Coin {
|
||||
denom: string;
|
||||
amount: bigint;
|
||||
}
|
||||
export type Coin = { denom: string; amount: bigint };
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Coin } from './Coin';
|
||||
|
||||
export interface CosmosFee {
|
||||
amount: Array<Coin>;
|
||||
gas_limit: bigint;
|
||||
payer: string | null;
|
||||
granter: string | null;
|
||||
}
|
||||
export type CosmosFee = { amount: Array<Coin>; gas_limit: bigint; payer: string | null; granter: string | null };
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type DeclaredRoles = { mixnode: boolean; entry: boolean; exit_nr: boolean; exit_ipr: boolean };
|
||||
@@ -1,10 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DecCoin } from './DecCoin';
|
||||
|
||||
export interface Delegation {
|
||||
owner: string;
|
||||
mix_id: number;
|
||||
amount: DecCoin;
|
||||
height: bigint;
|
||||
proxy: string | null;
|
||||
}
|
||||
export type Delegation = { owner: string; mix_id: number; amount: DecCoin; height: bigint; proxy: string | null };
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
import type { DecCoin } from './DecCoin';
|
||||
import type { DelegationEventKind } from './DelegationEventKind';
|
||||
|
||||
export interface DelegationEvent {
|
||||
export type DelegationEvent = {
|
||||
kind: DelegationEventKind;
|
||||
mix_id: number;
|
||||
address: string;
|
||||
amount: DecCoin | null;
|
||||
proxy: string | null;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DecCoin } from './DecCoin';
|
||||
|
||||
export interface DelegationResult {
|
||||
source_address: string;
|
||||
target_address: string;
|
||||
amount: DecCoin | null;
|
||||
}
|
||||
export type DelegationResult = { source_address: string; target_address: string; amount: DecCoin | null };
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
import type { DecCoin } from './DecCoin';
|
||||
import type { DelegationWithEverything } from './DelegationWithEverything';
|
||||
|
||||
export interface DelegationsSummaryResponse {
|
||||
export type DelegationsSummaryResponse = {
|
||||
delegations: Array<DelegationWithEverything>;
|
||||
total_delegations: DecCoin;
|
||||
total_rewards: DecCoin;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DecCoin } from './DecCoin';
|
||||
import type { DelegationEvent } from './DelegationEvent';
|
||||
import type { MixNodeCostParams } from './MixNodeCostParams';
|
||||
import type { NodeCostParams } from './MixNodeCostParams';
|
||||
|
||||
export interface DelegationWithEverything {
|
||||
export type DelegationWithEverything = {
|
||||
owner: string;
|
||||
mix_id: number;
|
||||
node_identity: string;
|
||||
@@ -12,12 +12,12 @@ export interface DelegationWithEverything {
|
||||
accumulated_by_operator: DecCoin | null;
|
||||
block_height: bigint;
|
||||
delegated_on_iso_datetime: string | null;
|
||||
cost_params: MixNodeCostParams | null;
|
||||
cost_params: NodeCostParams | null;
|
||||
avg_uptime_percent: number | null;
|
||||
stake_saturation: string | null;
|
||||
uses_vesting_contract_tokens: boolean;
|
||||
unclaimed_rewards: DecCoin | null;
|
||||
errors: string | null;
|
||||
pending_events: Array<DelegationEvent>;
|
||||
mixnode_is_unbonding: boolean | null;
|
||||
errors: string | null;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type DescribedNodeType = 'legacy_mixnode' | 'legacy_gateway' | 'nym_node';
|
||||
@@ -1,5 +1,8 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface Gas {
|
||||
export type Gas = {
|
||||
/**
|
||||
* units of gas used
|
||||
*/
|
||||
gas_units: bigint;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Gas } from './Gas';
|
||||
|
||||
export interface GasInfo {
|
||||
export type GasInfo = {
|
||||
/**
|
||||
* GasWanted is the maximum units of work we allow this tx to perform.
|
||||
*/
|
||||
gas_wanted: Gas;
|
||||
/**
|
||||
* GasUsed is the amount of gas actually consumed.
|
||||
*/
|
||||
gas_used: Gas;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface Gateway {
|
||||
export type Gateway = {
|
||||
host: string;
|
||||
mix_port: number;
|
||||
clients_port: number;
|
||||
location: string;
|
||||
sphinx_key: string;
|
||||
/**
|
||||
* Base58 encoded ed25519 EdDSA public key of the gateway used to derive shared keys with clients
|
||||
*/
|
||||
identity_key: string;
|
||||
version: string;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
import type { DecCoin } from './DecCoin';
|
||||
import type { Gateway } from './Gateway';
|
||||
|
||||
export interface GatewayBond {
|
||||
export type GatewayBond = {
|
||||
pledge_amount: DecCoin;
|
||||
owner: string;
|
||||
block_height: bigint;
|
||||
gateway: Gateway;
|
||||
proxy: string | null;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface GatewayConfigUpdate {
|
||||
export type GatewayConfigUpdate = {
|
||||
host: string;
|
||||
mix_port: number;
|
||||
clients_port: number;
|
||||
location: string;
|
||||
version: string;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface GatewayCoreStatusResponse {
|
||||
identity: string;
|
||||
count: number;
|
||||
}
|
||||
export type GatewayCoreStatusResponse = { identity: string; count: number };
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type HistoricalPerformanceResponse = { date: string; performance: number };
|
||||
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type HistoricalUptimeResponse = { date: string; uptime: number };
|
||||
@@ -1,7 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { SelectionChance } from './SelectionChance';
|
||||
|
||||
export interface InclusionProbabilityResponse {
|
||||
in_active: SelectionChance;
|
||||
in_reserve: SelectionChance;
|
||||
}
|
||||
export type InclusionProbabilityResponse = { in_active: SelectionChance; in_reserve: SelectionChance };
|
||||
|
||||
@@ -1,10 +1,31 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface Interval {
|
||||
/**
|
||||
* Specification of a rewarding interval.
|
||||
*/
|
||||
export type Interval = {
|
||||
/**
|
||||
* Monotonously increasing id of this interval.
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* Number of epochs in this interval.
|
||||
*/
|
||||
epochs_in_interval: number;
|
||||
/**
|
||||
* The timestamp indicating the start of the current rewarding epoch.
|
||||
*/
|
||||
current_epoch_start: string;
|
||||
/**
|
||||
* Monotonously increasing id of the current epoch in this interval.
|
||||
*/
|
||||
current_epoch_id: number;
|
||||
/**
|
||||
* The duration of all epochs in this interval.
|
||||
*/
|
||||
epoch_length: { secs: number; nanos: number };
|
||||
/**
|
||||
* The total amount of elapsed epochs since the first epoch of the first interval.
|
||||
*/
|
||||
total_elapsed_epochs: number;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,12 +1,52 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface IntervalRewardParams {
|
||||
/**
|
||||
* Parameters required by the mix-mining reward distribution that do not change during an interval.
|
||||
*/
|
||||
export type IntervalRewardParams = {
|
||||
/**
|
||||
* Current value of the rewarding pool.
|
||||
* It is expected to be constant throughout the interval.
|
||||
*/
|
||||
reward_pool: string;
|
||||
/**
|
||||
* Current value of the staking supply.
|
||||
* It is expected to be constant throughout the interval.
|
||||
*/
|
||||
staking_supply: string;
|
||||
/**
|
||||
* Defines the percentage of stake needed to reach saturation for all of the nodes in the rewarded set.
|
||||
* Also known as `beta`.
|
||||
*/
|
||||
staking_supply_scale_factor: string;
|
||||
/**
|
||||
* Current value of the computed reward budget per epoch, per node.
|
||||
* It is expected to be constant throughout the interval.
|
||||
*/
|
||||
epoch_reward_budget: string;
|
||||
/**
|
||||
* Current value of the stake saturation point.
|
||||
* It is expected to be constant throughout the interval.
|
||||
*/
|
||||
stake_saturation_point: string;
|
||||
/**
|
||||
* Current value of the sybil resistance percent (`alpha`).
|
||||
* It is not really expected to be changing very often.
|
||||
* As a matter of fact, unless there's a very specific reason, it should remain constant.
|
||||
*/
|
||||
sybil_resistance: string;
|
||||
/**
|
||||
* Current active set work factor.
|
||||
* It is not really expected to be changing very often.
|
||||
* As a matter of fact, unless there's a very specific reason, it should remain constant.
|
||||
*/
|
||||
active_set_work_factor: string;
|
||||
/**
|
||||
* Current maximum interval pool emission.
|
||||
* Assuming all nodes in the rewarded set are fully saturated and have 100% performance,
|
||||
* this % of the reward pool would get distributed in rewards to all operators and its delegators.
|
||||
* It is not really expected to be changing very often.
|
||||
* As a matter of fact, unless there's a very specific reason, it should remain constant.
|
||||
*/
|
||||
interval_pool_emission: string;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,11 +1,36 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { RewardedSetParams } from './RewardedSetParams';
|
||||
|
||||
export interface IntervalRewardingParamsUpdate {
|
||||
/**
|
||||
* Specification on how the rewarding params should be updated.
|
||||
*/
|
||||
export type IntervalRewardingParamsUpdate = {
|
||||
/**
|
||||
* Defines the new value of the reward pool.
|
||||
*/
|
||||
reward_pool: string | null;
|
||||
/**
|
||||
* Defines the new value of the staking supply.
|
||||
*/
|
||||
staking_supply: string | null;
|
||||
/**
|
||||
* Defines the new value of the staking supply scale factor.
|
||||
*/
|
||||
staking_supply_scale_factor: string | null;
|
||||
/**
|
||||
* Defines the new value of the sybil resistance percent.
|
||||
*/
|
||||
sybil_resistance_percent: string | null;
|
||||
/**
|
||||
* Defines the new value of the active set work factor.
|
||||
*/
|
||||
active_set_work_factor: string | null;
|
||||
/**
|
||||
* Defines the new value of the interval pool emission rate.
|
||||
*/
|
||||
interval_pool_emission: string | null;
|
||||
rewarded_set_size: number | null;
|
||||
}
|
||||
/**
|
||||
* Defines the parameters of the rewarded set.
|
||||
*/
|
||||
rewarded_set_params: RewardedSetParams | null;
|
||||
};
|
||||
|
||||
@@ -2,13 +2,12 @@
|
||||
import type { DecCoin } from './DecCoin';
|
||||
import type { MixNode } from './Mixnode';
|
||||
|
||||
export interface MixNodeBond {
|
||||
export type MixNodeBond = {
|
||||
mix_id: number;
|
||||
owner: string;
|
||||
original_pledge: DecCoin;
|
||||
layer: string;
|
||||
mix_node: MixNode;
|
||||
proxy: string | null;
|
||||
bonding_height: bigint;
|
||||
is_unbonding: boolean;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface MixNodeConfigUpdate {
|
||||
export type MixNodeConfigUpdate = {
|
||||
host: string;
|
||||
mix_port: number;
|
||||
verloc_port: number;
|
||||
http_api_port: number;
|
||||
version: string;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DecCoin } from './DecCoin';
|
||||
|
||||
export interface MixNodeCostParams {
|
||||
profit_margin_percent: string;
|
||||
interval_operating_cost: DecCoin;
|
||||
}
|
||||
export type NodeCostParams = { profit_margin_percent: string; interval_operating_cost: DecCoin };
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { MixNodeBond } from './MixNodeBond';
|
||||
import type { MixNodeRewarding } from './MixNodeRewarding';
|
||||
import type { NodeRewarding } from './NodeRewarding';
|
||||
|
||||
export interface MixNodeDetails {
|
||||
bond_information: MixNodeBond;
|
||||
rewarding_details: MixNodeRewarding;
|
||||
}
|
||||
export type MixNodeDetails = { bond_information: MixNodeBond; rewarding_details: NodeRewarding };
|
||||
|
||||
@@ -1,11 +1,35 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface MixNode {
|
||||
/**
|
||||
* Information provided by the node operator during bonding that are used to allow other entities to use the services of this node.
|
||||
*/
|
||||
export type MixNode = {
|
||||
/**
|
||||
* Network address of this mixnode, for example 1.1.1.1 or foo.mixnode.com
|
||||
*/
|
||||
host: string;
|
||||
/**
|
||||
* Port used by this mixnode for listening for mix packets.
|
||||
*/
|
||||
mix_port: number;
|
||||
/**
|
||||
* Port used by this mixnode for listening for verloc requests.
|
||||
*/
|
||||
verloc_port: number;
|
||||
/**
|
||||
* Port used by this mixnode for its http(s) API
|
||||
*/
|
||||
http_api_port: number;
|
||||
/**
|
||||
* Base58-encoded x25519 public key used for sphinx key derivation.
|
||||
*/
|
||||
sphinx_key: string;
|
||||
/**
|
||||
* Base58-encoded ed25519 EdDSA public key.
|
||||
*/
|
||||
identity_key: string;
|
||||
/**
|
||||
* The self-reported semver version of this mixnode.
|
||||
*/
|
||||
version: string;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface MixnodeCoreStatusResponse {
|
||||
mix_id: number;
|
||||
count: number;
|
||||
}
|
||||
export type MixnodeCoreStatusResponse = { mix_id: number; count: number };
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { MixnodeStatus } from './MixnodeStatus';
|
||||
|
||||
export interface MixnodeStatusResponse {
|
||||
status: MixnodeStatus;
|
||||
}
|
||||
export type MixnodeStatusResponse = { status: MixnodeStatus };
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Role } from './Role';
|
||||
|
||||
export type NodeAnnotation = { last_24h_performance: string; current_role: Role | null };
|
||||
@@ -0,0 +1,7 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type NodeConfigUpdate = {
|
||||
host: string | null;
|
||||
custom_http_port: number | null;
|
||||
restore_default_http_port: boolean;
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type NodeDatePerformanceResponse = { node_id: number; date: string; performance: number | null };
|
||||
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type NodePerformanceResponse = { node_id: number; performance: number | null };
|
||||
@@ -1,4 +1,12 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { NodeCostParams } from "./MixNodeCostParams";
|
||||
import type { NodeCostParams } from './MixNodeCostParams';
|
||||
|
||||
export interface NodeRewarding { cost_params: NodeCostParams, operator: string, delegates: string, total_unit_reward: string, unit_delegation: string, last_rewarded_epoch: number, unique_delegations: number, }
|
||||
export type NodeRewarding = {
|
||||
cost_params: NodeCostParams;
|
||||
operator: string;
|
||||
delegates: string;
|
||||
total_unit_reward: string;
|
||||
unit_delegation: string;
|
||||
last_rewarded_epoch: number;
|
||||
unique_delegations: number;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
/**
|
||||
* Parameters used for rewarding particular node.
|
||||
*/
|
||||
export type NodeRewardingParameters = {
|
||||
/**
|
||||
* Performance of the particular node in the current epoch.
|
||||
*/
|
||||
performance: string;
|
||||
/**
|
||||
* Amount of work performed by this node in the current epoch
|
||||
* also known as 'omega' in the paper
|
||||
*/
|
||||
work_factor: string;
|
||||
};
|
||||
@@ -1,3 +1,21 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface NymNode { host: string, custom_http_port: number | null, identity_key: string, }
|
||||
/**
|
||||
* Information provided by the node operator during bonding that are used to allow other entities to use the services of this node.
|
||||
*/
|
||||
export type NymNode = {
|
||||
/**
|
||||
* Network address of this nym-node, for example 1.1.1.1 or foo.mixnode.com
|
||||
* that is used to discover other capabilities of this node.
|
||||
*/
|
||||
host: string;
|
||||
/**
|
||||
* Allow specifying custom port for accessing the http, and thus self-described, api
|
||||
* of this node for the capabilities discovery.
|
||||
*/
|
||||
custom_http_port: number | null;
|
||||
/**
|
||||
* Base58-encoded ed25519 EdDSA public key.
|
||||
*/
|
||||
identity_key: string;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,40 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DecCoin } from "./DecCoin";
|
||||
import type { DecCoin } from './DecCoin';
|
||||
|
||||
export interface NymNodeBond { node_id: number, owner: string, original_pledge: DecCoin, bonding_height: bigint, is_unbonding: boolean, host: string, custom_http_port: number | null, identity_key: string, }
|
||||
export type NymNodeBond = {
|
||||
/**
|
||||
* Unique id assigned to the bonded node.
|
||||
*/
|
||||
node_id: number;
|
||||
/**
|
||||
* Address of the owner of this nym-node.
|
||||
*/
|
||||
owner: string;
|
||||
/**
|
||||
* Original amount pledged by the operator of this node.
|
||||
*/
|
||||
original_pledge: DecCoin;
|
||||
/**
|
||||
* Block height at which this nym-node has been bonded.
|
||||
*/
|
||||
bonding_height: bigint;
|
||||
/**
|
||||
* Flag to indicate whether this node is in the process of unbonding,
|
||||
* that will conclude upon the epoch finishing.
|
||||
*/
|
||||
is_unbonding: boolean;
|
||||
/**
|
||||
* Network address of this nym-node, for example 1.1.1.1 or foo.mixnode.com
|
||||
* that is used to discover other capabilities of this node.
|
||||
*/
|
||||
host: string;
|
||||
/**
|
||||
* Allow specifying custom port for accessing the http, and thus self-described, api
|
||||
* of this node for the capabilities discovery.
|
||||
*/
|
||||
custom_http_port: number | null;
|
||||
/**
|
||||
* Base58-encoded ed25519 EdDSA public key.
|
||||
*/
|
||||
identity_key: string;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,22 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { NodeRewarding } from "./NodeRewarding";
|
||||
import type { NymNodeBond } from "./NymNodeBond";
|
||||
import type { PendingNodeChanges } from "./PendingNodeChanges";
|
||||
import type { NodeRewarding } from './NodeRewarding';
|
||||
import type { NymNodeBond } from './NymNodeBond';
|
||||
import type { PendingNodeChanges } from './PendingNodeChanges';
|
||||
|
||||
export interface NymNodeDetails { bond_information: NymNodeBond, rewarding_details: NodeRewarding, pending_changes: PendingNodeChanges, }
|
||||
/**
|
||||
* Full details associated with given node.
|
||||
*/
|
||||
export type NymNodeDetails = {
|
||||
/**
|
||||
* Basic bond information of this node, such as owner address, original pledge, etc.
|
||||
*/
|
||||
bond_information: NymNodeBond;
|
||||
/**
|
||||
* Details used for computation of rewarding related data.
|
||||
*/
|
||||
rewarding_details: NodeRewarding;
|
||||
/**
|
||||
* Adjustments to the node that are scheduled to happen during future epoch/interval transitions.
|
||||
*/
|
||||
pending_changes: PendingNodeChanges;
|
||||
};
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DecCoin } from './DecCoin';
|
||||
|
||||
export interface OriginalVestingResponse {
|
||||
amount: DecCoin;
|
||||
number_of_periods: number;
|
||||
period_duration: bigint;
|
||||
}
|
||||
export type OriginalVestingResponse = { amount: DecCoin; number_of_periods: number; period_duration: bigint };
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { Pagination } from './Pagination';
|
||||
|
||||
export type PaginatedResponse<T> = { pagination: Pagination; data: Array<T> };
|
||||
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type Pagination = { total: number; page: number; size: number };
|
||||
@@ -1,8 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { PendingEpochEventData } from './PendingEpochEventData';
|
||||
|
||||
export interface PendingEpochEvent {
|
||||
id: number;
|
||||
created_at: bigint;
|
||||
event: PendingEpochEventData;
|
||||
}
|
||||
export type PendingEpochEvent = { id: number; created_at: bigint; event: PendingEpochEventData };
|
||||
|
||||
@@ -5,5 +5,6 @@ export type PendingEpochEventData =
|
||||
| { Delegate: { owner: string; mix_id: number; amount: DecCoin; proxy: string | null } }
|
||||
| { Undelegate: { owner: string; mix_id: number; proxy: string | null } }
|
||||
| { PledgeMore: { mix_id: number; amount: DecCoin } }
|
||||
| { DecreasePledge: { mix_id: number; decrease_by: DecCoin } }
|
||||
| { UnbondMixnode: { mix_id: number } }
|
||||
| { UpdateActiveSetSize: { new_size: number } };
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { PendingIntervalEventData } from './PendingIntervalEventData';
|
||||
|
||||
export interface PendingIntervalEvent {
|
||||
id: number;
|
||||
created_at: bigint;
|
||||
event: PendingIntervalEventData;
|
||||
}
|
||||
export type PendingIntervalEvent = { id: number; created_at: bigint; event: PendingIntervalEventData };
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { IntervalRewardingParamsUpdate } from './IntervalRewardingParamsUpdate';
|
||||
import type { MixNodeCostParams } from './MixNodeCostParams';
|
||||
import type { NodeCostParams } from './MixNodeCostParams';
|
||||
|
||||
export type PendingIntervalEventData =
|
||||
| { ChangeMixCostParams: { mix_id: number; new_costs: MixNodeCostParams } }
|
||||
| { ChangeMixCostParams: { mix_id: number; new_costs: NodeCostParams } }
|
||||
| { UpdateRewardingParams: { update: IntervalRewardingParamsUpdate } }
|
||||
| { UpdateIntervalConfig: { epochs_in_interval: number; epoch_duration_secs: bigint } };
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface PendingNodeChanges { pledge_change: number | null, cost_params_change: number | null, }
|
||||
export type PendingNodeChanges = { pledge_change: number | null; cost_params_change: number | null };
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { HistoricalPerformanceResponse } from './HistoricalPerformanceResponse';
|
||||
import type { PaginatedResponse } from './PaginatedResponse';
|
||||
|
||||
export type PerformanceHistoryResponse = { node_id: number; history: PaginatedResponse<HistoricalPerformanceResponse> };
|
||||
@@ -1,3 +1,6 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type Period = 'Before' | { in: number } | 'After';
|
||||
/**
|
||||
* The vesting period.
|
||||
*/
|
||||
export type Period = 'Before' | { In: number } | 'After';
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DecCoin } from './DecCoin';
|
||||
|
||||
export interface PledgeData {
|
||||
amount: DecCoin;
|
||||
block_time: bigint;
|
||||
}
|
||||
export type PledgeData = { amount: DecCoin; block_time: bigint };
|
||||
|
||||
@@ -1,8 +1,21 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface RewardEstimate {
|
||||
export type RewardEstimate = {
|
||||
/**
|
||||
* The amount of **decimal** coins that are going to get distributed to the node,
|
||||
* i.e. the operator and all its delegators.
|
||||
*/
|
||||
total_node_reward: string;
|
||||
/**
|
||||
* The share of the reward that is going to get distributed to the node operator.
|
||||
*/
|
||||
operator: string;
|
||||
/**
|
||||
* The share of the reward that is going to get distributed among the node delegators.
|
||||
*/
|
||||
delegates: string;
|
||||
/**
|
||||
* The operating cost of this node. Note: it's already included in the operator reward.
|
||||
*/
|
||||
operating_cost: string;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -3,9 +3,9 @@ import type { Interval } from './Interval';
|
||||
import type { RewardEstimate } from './RewardEstimate';
|
||||
import type { RewardingParams } from './RewardingParams';
|
||||
|
||||
export interface RewardEstimationResponse {
|
||||
export type RewardEstimationResponse = {
|
||||
estimation: RewardEstimate;
|
||||
reward_params: RewardingParams;
|
||||
epoch: Interval;
|
||||
as_at: number;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type RewardedSetParams = {
|
||||
/**
|
||||
* The expected number of nodes assigned entry gateway role (i.e. [`Role::EntryGateway`])
|
||||
*/
|
||||
entry_gateways: number;
|
||||
/**
|
||||
* The expected number of nodes assigned exit gateway role (i.e. [`Role::ExitGateway`])
|
||||
*/
|
||||
exit_gateways: number;
|
||||
/**
|
||||
* The expected number of nodes assigned the 'mixnode' role, i.e. total of [`Role::Layer1`], [`Role::Layer2`] and [`Role::Layer3`].
|
||||
*/
|
||||
mixnodes: number;
|
||||
/**
|
||||
* Number of nodes in the 'standby' set. (i.e. [`Role::Standby`])
|
||||
*/
|
||||
standby: number;
|
||||
};
|
||||
@@ -1,8 +1,14 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { IntervalRewardParams } from './IntervalRewardParams';
|
||||
import type { RewardedSetParams } from './RewardedSetParams';
|
||||
|
||||
export interface RewardingParams {
|
||||
/**
|
||||
* Parameters used for reward calculation.
|
||||
*/
|
||||
export type RewardingParams = {
|
||||
/**
|
||||
* Parameters that should remain unchanged throughout an interval.
|
||||
*/
|
||||
interval: IntervalRewardParams;
|
||||
rewarded_set_size: number;
|
||||
active_set_size: number;
|
||||
}
|
||||
rewarded_set: RewardedSetParams;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type Role = 'EntryGateway' | 'Layer1' | 'Layer2' | 'Layer3' | 'ExitGateway' | 'Standby';
|
||||
@@ -2,7 +2,7 @@
|
||||
import type { DecCoin } from './DecCoin';
|
||||
import type { Gas } from './Gas';
|
||||
|
||||
export interface RpcTransactionResponse {
|
||||
export type RpcTransactionResponse = {
|
||||
index: number;
|
||||
tx_result_json: string;
|
||||
block_height: bigint;
|
||||
@@ -10,4 +10,4 @@ export interface RpcTransactionResponse {
|
||||
gas_used: Gas;
|
||||
gas_wanted: Gas;
|
||||
fee: DecCoin | null;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { DecCoin } from './DecCoin';
|
||||
import type { Gas } from './Gas';
|
||||
import type { TransactionDetails } from './TransactionDetails';
|
||||
|
||||
export interface SendTxResult {
|
||||
export type SendTxResult = {
|
||||
block_height: bigint;
|
||||
code: number;
|
||||
details: TransactionDetails;
|
||||
@@ -11,4 +11,4 @@ export interface SendTxResult {
|
||||
gas_wanted: Gas;
|
||||
tx_hash: string;
|
||||
fee: DecCoin | null;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export interface StakeSaturationResponse {
|
||||
saturation: string;
|
||||
uncapped_saturation: string;
|
||||
as_at: bigint;
|
||||
}
|
||||
export type StakeSaturationResponse = { saturation: string; uncapped_saturation: string; as_at: bigint };
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DecCoin } from './DecCoin';
|
||||
|
||||
export interface TransactionDetails {
|
||||
amount: DecCoin;
|
||||
from_address: string;
|
||||
to_address: string;
|
||||
}
|
||||
export type TransactionDetails = { amount: DecCoin; from_address: string; to_address: string };
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user