@alpha-dao/ion-dao-types
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -1,2 +0,2 @@ | ||
import { Addr, Config, CosmosMsgFor_Empty, Denom, Expiration, Vote } from "./shared-types"; | ||
import { Addr, Config, CosmosMsgFor_OsmosisMsg, Denom, Expiration, Vote } from "./shared-types"; | ||
export declare type ExecuteMsg = { | ||
@@ -43,3 +43,3 @@ propose: ProposeMsg; | ||
link: string; | ||
msgs: CosmosMsgFor_Empty[]; | ||
msgs: CosmosMsgFor_OsmosisMsg[]; | ||
title: string; | ||
@@ -46,0 +46,0 @@ [k: string]: unknown; |
export * from "./ballot"; | ||
export * from "./config_response"; | ||
export * from "./deposits_response"; | ||
export * from "./execute_msg"; | ||
@@ -4,0 +5,0 @@ export * from "./init_msg"; |
@@ -23,2 +23,5 @@ "use strict"; | ||
// export * from "./config"; | ||
// dedup emptied this file | ||
// export * from "./deposit_response"; | ||
__exportStar(require("./deposits_response"), exports); | ||
__exportStar(require("./execute_msg"), exports); | ||
@@ -25,0 +28,0 @@ __exportStar(require("./init_msg"), exports); |
import { Duration, Threshold, Uint128 } from "./shared-types"; | ||
export declare type GovToken = { | ||
create: { | ||
denom: string; | ||
label: string; | ||
stake_contract_code_id: number; | ||
unstaking_duration?: Duration | null; | ||
[k: string]: unknown; | ||
}; | ||
} | { | ||
reuse: { | ||
stake_contract: string; | ||
[k: string]: unknown; | ||
}; | ||
}; | ||
export interface InitMsg { | ||
@@ -22,8 +36,1 @@ deposit_period: Duration; | ||
} | ||
export interface GovToken { | ||
denom: string; | ||
label: string; | ||
stake_contract_code_id: number; | ||
unstaking_duration?: Duration | null; | ||
[k: string]: unknown; | ||
} |
@@ -1,2 +0,2 @@ | ||
import { Addr, BlockTime, CosmosMsgFor_Empty, Decimal, Expiration, Status, Threshold, Uint128, Votes } from "./shared-types"; | ||
import { BlockTime, CosmosMsgFor_Empty, Decimal, Expiration, Status, Threshold, Uint128, Votes } from "./shared-types"; | ||
/** | ||
@@ -6,19 +6,20 @@ * Note, if you are storing custom messages in the proposal, the querier needs to know what possible custom message types those are in order to parse the response | ||
export interface ProposalResponse { | ||
deposit_amount: Uint128; | ||
deposit_starts_at: BlockTime; | ||
deposit_ends_at: Expiration; | ||
description: string; | ||
expires_at: Expiration; | ||
id: number; | ||
link: string; | ||
msgs: CosmosMsgFor_Empty[]; | ||
proposer: Addr; | ||
proposer: string; | ||
quorum: Decimal; | ||
status: Status; | ||
submitted_at: BlockTime; | ||
threshold: Threshold; | ||
title: string; | ||
total_deposit: Uint128; | ||
total_votes: Uint128; | ||
total_weight: Uint128; | ||
vote_starts_at?: BlockTime | null; | ||
vote_ends_at: Expiration; | ||
vote_starts_at: BlockTime; | ||
votes: Votes; | ||
[k: string]: unknown; | ||
} |
@@ -1,16 +0,9 @@ | ||
import { Addr, BlockTime, CosmosMsgFor_Empty, Expiration, Status, Threshold, Uint128, Votes } from "./shared-types"; | ||
import { Addr, BlockTime, CosmosMsgFor_OsmosisMsg, Expiration, Status, Threshold, Uint128, Votes } from "./shared-types"; | ||
export interface Proposal { | ||
deposit_base_amount: Uint128; | ||
deposit_ends_at: Expiration; | ||
/** | ||
* Amount of the native governance token required for voting | ||
*/ | ||
deposit: Uint128; | ||
/** | ||
* Starting time / height information | ||
*/ | ||
deposit_starts_at: BlockTime; | ||
/** | ||
* Proposal Description | ||
*/ | ||
description: string; | ||
expires_at: Expiration; | ||
/** | ||
@@ -20,9 +13,19 @@ * Related link about this proposal | ||
link: string; | ||
msgs: CosmosMsgFor_Empty[]; | ||
/** | ||
* List of messages to execute | ||
*/ | ||
msgs: CosmosMsgFor_OsmosisMsg[]; | ||
/** | ||
* Address of proposer | ||
*/ | ||
proposer: Addr; | ||
/** | ||
* Current status of this proposal | ||
*/ | ||
status: Status; | ||
/** | ||
* Starting time / height information | ||
*/ | ||
submitted_at: BlockTime; | ||
/** | ||
* Pass requirements | ||
@@ -36,6 +39,11 @@ */ | ||
/** | ||
* Amount of the native governance token required for voting | ||
*/ | ||
total_deposit: Uint128; | ||
/** | ||
* The total weight when the proposal started (used to calculate percentages) | ||
*/ | ||
total_weight: Uint128; | ||
vote_starts_at?: BlockTime | null; | ||
vote_ends_at: Expiration; | ||
vote_starts_at: BlockTime; | ||
/** | ||
@@ -42,0 +50,0 @@ * summary of existing votes |
@@ -1,2 +0,2 @@ | ||
import { Addr, BlockTime, CosmosMsgFor_Empty, Decimal, Expiration, Status, Threshold, Uint128, Votes } from "./shared-types"; | ||
import { BlockTime, CosmosMsgFor_Empty, Decimal, Expiration, Status, Threshold, Uint128, Votes } from "./shared-types"; | ||
export interface ProposalsResponse { | ||
@@ -10,19 +10,20 @@ proposals: ProposalResponseFor_Empty[]; | ||
export interface ProposalResponseFor_Empty { | ||
deposit_amount: Uint128; | ||
deposit_starts_at: BlockTime; | ||
deposit_ends_at: Expiration; | ||
description: string; | ||
expires_at: Expiration; | ||
id: number; | ||
link: string; | ||
msgs: CosmosMsgFor_Empty[]; | ||
proposer: Addr; | ||
proposer: string; | ||
quorum: Decimal; | ||
status: Status; | ||
submitted_at: BlockTime; | ||
threshold: Threshold; | ||
title: string; | ||
total_deposit: Uint128; | ||
total_votes: Uint128; | ||
total_weight: Uint128; | ||
vote_starts_at?: BlockTime | null; | ||
vote_ends_at: Expiration; | ||
vote_starts_at: BlockTime; | ||
votes: Votes; | ||
[k: string]: unknown; | ||
} |
@@ -48,2 +48,15 @@ import { Addr, Denom, Status } from "./shared-types"; | ||
}; | ||
} | { | ||
deposit: { | ||
depositor: string; | ||
proposal_id: number; | ||
[k: string]: unknown; | ||
}; | ||
} | { | ||
deposits: { | ||
limit?: number | null; | ||
order?: RangeOrder | null; | ||
query: DepositsQueryOption; | ||
[k: string]: unknown; | ||
}; | ||
}; | ||
@@ -66,1 +79,19 @@ export declare type RangeOrder = "asc" | "desc"; | ||
}; | ||
export declare type DepositsQueryOption = { | ||
find_by_proposal: { | ||
proposal_id: number; | ||
start?: string | null; | ||
[k: string]: unknown; | ||
}; | ||
} | { | ||
find_by_depositor: { | ||
depositor: string; | ||
start?: number | null; | ||
[k: string]: unknown; | ||
}; | ||
} | { | ||
everything: { | ||
start?: [number, string] | null; | ||
[k: string]: unknown; | ||
}; | ||
}; |
@@ -88,6 +88,12 @@ export declare type Vote = "yes" | "no" | "abstain" | "veto"; | ||
} | ||
export declare type CosmosMsgFor_Empty = { | ||
export interface DepositResponse { | ||
[k: string]: unknown; | ||
amount: Uint128; | ||
depositor: string; | ||
proposal_id: number; | ||
} | ||
export declare type CosmosMsgFor_OsmosisMsg = { | ||
bank: BankMsg; | ||
} | { | ||
custom: Empty; | ||
custom: OsmosisMsg; | ||
} | { | ||
@@ -98,3 +104,13 @@ staking: StakingMsg; | ||
} | { | ||
stargate: { | ||
type_url: string; | ||
value: Binary; | ||
[k: string]: unknown; | ||
}; | ||
} | { | ||
ibc: IbcMsg; | ||
} | { | ||
wasm: WasmMsg; | ||
} | { | ||
gov: GovMsg; | ||
}; | ||
@@ -119,2 +135,26 @@ /** | ||
/** | ||
* A number of Custom messages that can call into the Osmosis bindings | ||
*/ | ||
export declare type OsmosisMsg = { | ||
swap: { | ||
amount: SwapAmountWithLimit; | ||
first: Swap; | ||
route: Step[]; | ||
[k: string]: unknown; | ||
}; | ||
}; | ||
export declare type SwapAmountWithLimit = { | ||
exact_in: { | ||
input: Uint128; | ||
min_output: Uint128; | ||
[k: string]: unknown; | ||
}; | ||
} | { | ||
exact_out: { | ||
max_input: Uint128; | ||
output: Uint128; | ||
[k: string]: unknown; | ||
}; | ||
}; | ||
/** | ||
* The message types of the staking module. | ||
@@ -167,2 +207,47 @@ * | ||
/** | ||
* Binary is a wrapper around Vec<u8> to add base64 de/serialization with serde. It also adds some helper methods to help encode inline. | ||
* | ||
* This is only needed as serde-json-{core,wasm} has a horrible encoding for Vec<u8> | ||
*/ | ||
export declare type Binary = string; | ||
/** | ||
* These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points) | ||
*/ | ||
export declare type IbcMsg = { | ||
transfer: { | ||
/** | ||
* packet data only supports one coin https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/ibc/applications/transfer/v1/transfer.proto#L11-L20 | ||
*/ | ||
amount: Coin; | ||
/** | ||
* exisiting channel to send the tokens over | ||
*/ | ||
channel_id: string; | ||
/** | ||
* when packet times out, measured on remote chain | ||
*/ | ||
timeout: IbcTimeout; | ||
/** | ||
* address on the remote chain to receive these tokens | ||
*/ | ||
to_address: string; | ||
[k: string]: unknown; | ||
}; | ||
} | { | ||
send_packet: { | ||
channel_id: string; | ||
data: Binary; | ||
/** | ||
* when packet times out, measured on remote chain | ||
*/ | ||
timeout: IbcTimeout; | ||
[k: string]: unknown; | ||
}; | ||
} | { | ||
close_channel: { | ||
channel_id: string; | ||
[k: string]: unknown; | ||
}; | ||
}; | ||
/** | ||
* The message types of the wasm module. | ||
@@ -222,9 +307,11 @@ * | ||
}; | ||
export declare type GovMsg = { | ||
vote: { | ||
proposal_id: number; | ||
vote: VoteOption; | ||
[k: string]: unknown; | ||
}; | ||
}; | ||
export declare type VoteOption = "yes" | "no" | "abstain" | "no_with_veto"; | ||
/** | ||
* Binary is a wrapper around Vec<u8> to add base64 de/serialization with serde. It also adds some helper methods to help encode inline. | ||
* | ||
* This is only needed as serde-json-{core,wasm} has a horrible encoding for Vec<u8> | ||
*/ | ||
export declare type Binary = string; | ||
/** | ||
* Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future) | ||
@@ -251,3 +338,58 @@ */ | ||
} | ||
export interface Swap { | ||
[k: string]: unknown; | ||
denom_in: string; | ||
denom_out: string; | ||
pool_id: number; | ||
} | ||
export interface Step { | ||
[k: string]: unknown; | ||
denom_out: string; | ||
pool_id: number; | ||
} | ||
/** | ||
* In IBC each package must set at least one type of timeout: the timestamp or the block height. Using this rather complex enum instead of two timeout fields we ensure that at least one timeout is set. | ||
*/ | ||
export interface IbcTimeout { | ||
[k: string]: unknown; | ||
block?: IbcTimeoutBlock | null; | ||
timestamp?: Timestamp | null; | ||
} | ||
/** | ||
* IBCTimeoutHeight Height is a monotonically increasing data type that can be compared against another Height for the purposes of updating and freezing clients. Ordering is (revision_number, timeout_height) | ||
*/ | ||
export interface IbcTimeoutBlock { | ||
[k: string]: unknown; | ||
/** | ||
* block height after which the packet times out. the height within the given revision | ||
*/ | ||
height: number; | ||
/** | ||
* the version that the client is currently on (eg. after reseting the chain this could increment 1 as height drops to 0) | ||
*/ | ||
revision: number; | ||
} | ||
export declare type CosmosMsgFor_Empty = { | ||
bank: BankMsg; | ||
} | { | ||
custom: Empty; | ||
} | { | ||
staking: StakingMsg; | ||
} | { | ||
distribution: DistributionMsg; | ||
} | { | ||
stargate: { | ||
type_url: string; | ||
value: Binary; | ||
[k: string]: unknown; | ||
}; | ||
} | { | ||
ibc: IbcMsg; | ||
} | { | ||
wasm: WasmMsg; | ||
} | { | ||
gov: GovMsg; | ||
}; | ||
export declare type Status = "pending" | "open" | "rejected" | "passed" | "executed"; | ||
/** | ||
* An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message. | ||
@@ -260,3 +402,2 @@ * | ||
} | ||
export declare type Status = "pending" | "open" | "rejected" | "passed" | "executed"; | ||
export interface Votes { | ||
@@ -263,0 +404,0 @@ [k: string]: unknown; |
{ | ||
"name": "@alpha-dao/ion-dao-types", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Official types of ion dao contract", | ||
@@ -5,0 +5,0 @@ "repository": "git://github.com/alpha-dao/ion-dao-contracts.git", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38874
82
1086