@secretkeylabs/stacks-tools 0.2.0 → 0.3.0-6a691d3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +681 -0
- package/dist/index.d.cts +400 -0
- package/dist/index.d.ts +400 -2
- package/dist/index.js +650 -3
- package/package.json +13 -5
- package/dist/index.js.map +0 -1
- package/dist/pox4-api/burn-height-to-reward-cycle.d.ts +0 -7
- package/dist/pox4-api/burn-height-to-reward-cycle.js +0 -6
- package/dist/pox4-api/burn-height-to-reward-cycle.js.map +0 -1
- package/dist/pox4-api/current-pox-reward-cycle.d.ts +0 -1
- package/dist/pox4-api/current-pox-reward-cycle.js +0 -3
- package/dist/pox4-api/current-pox-reward-cycle.js.map +0 -1
- package/dist/pox4-api/get-stacker-info.d.ts +0 -1
- package/dist/pox4-api/get-stacker-info.js +0 -3
- package/dist/pox4-api/get-stacker-info.js.map +0 -1
- package/dist/pox4-api/reward-cycle-to-burn-height.d.ts +0 -1
- package/dist/pox4-api/reward-cycle-to-burn-height.js +0 -3
- package/dist/pox4-api/reward-cycle-to-burn-height.js.map +0 -1
- package/dist/queries/get-signer-total-locked.d.ts +0 -18
- package/dist/queries/get-signer-total-locked.js +0 -59
- package/dist/queries/get-signer-total-locked.js.map +0 -1
- package/dist/queries/index.d.ts +0 -4
- package/dist/queries/index.js +0 -5
- package/dist/queries/index.js.map +0 -1
- package/dist/stacks-api/accounts/balances.d.ts +0 -34
- package/dist/stacks-api/accounts/balances.js +0 -70
- package/dist/stacks-api/accounts/balances.js.map +0 -1
- package/dist/stacks-api/accounts/index.d.ts +0 -4
- package/dist/stacks-api/accounts/index.js +0 -5
- package/dist/stacks-api/accounts/index.js.map +0 -1
- package/dist/stacks-api/blocks/get-block.d.ts +0 -29
- package/dist/stacks-api/blocks/get-block.js +0 -62
- package/dist/stacks-api/blocks/get-block.js.map +0 -1
- package/dist/stacks-api/blocks/index.d.ts +0 -4
- package/dist/stacks-api/blocks/index.js +0 -5
- package/dist/stacks-api/blocks/index.js.map +0 -1
- package/dist/stacks-api/index.d.ts +0 -28
- package/dist/stacks-api/index.js +0 -17
- package/dist/stacks-api/index.js.map +0 -1
- package/dist/stacks-api/info/core-api.d.ts +0 -21
- package/dist/stacks-api/info/core-api.js +0 -55
- package/dist/stacks-api/info/core-api.js.map +0 -1
- package/dist/stacks-api/info/index.d.ts +0 -6
- package/dist/stacks-api/info/index.js +0 -7
- package/dist/stacks-api/info/index.js.map +0 -1
- package/dist/stacks-api/info/pox-details.d.ts +0 -59
- package/dist/stacks-api/info/pox-details.js +0 -92
- package/dist/stacks-api/info/pox-details.js.map +0 -1
- package/dist/stacks-api/proof-of-transfer/cycle.d.ts +0 -16
- package/dist/stacks-api/proof-of-transfer/cycle.js +0 -50
- package/dist/stacks-api/proof-of-transfer/cycle.js.map +0 -1
- package/dist/stacks-api/proof-of-transfer/cycles.d.ts +0 -37
- package/dist/stacks-api/proof-of-transfer/cycles.js +0 -61
- package/dist/stacks-api/proof-of-transfer/cycles.js.map +0 -1
- package/dist/stacks-api/proof-of-transfer/index.d.ts +0 -10
- package/dist/stacks-api/proof-of-transfer/index.js +0 -11
- package/dist/stacks-api/proof-of-transfer/index.js.map +0 -1
- package/dist/stacks-api/proof-of-transfer/signers-in-cycle.d.ts +0 -45
- package/dist/stacks-api/proof-of-transfer/signers-in-cycle.js +0 -66
- package/dist/stacks-api/proof-of-transfer/signers-in-cycle.js.map +0 -1
- package/dist/stacks-api/proof-of-transfer/stackers-for-signer-in-cycle.d.ts +0 -34
- package/dist/stacks-api/proof-of-transfer/stackers-for-signer-in-cycle.js +0 -59
- package/dist/stacks-api/proof-of-transfer/stackers-for-signer-in-cycle.js.map +0 -1
- package/dist/stacks-api/smart-contracts/index.d.ts +0 -4
- package/dist/stacks-api/smart-contracts/index.js +0 -5
- package/dist/stacks-api/smart-contracts/index.js.map +0 -1
- package/dist/stacks-api/smart-contracts/read-only.d.ts +0 -19
- package/dist/stacks-api/smart-contracts/read-only.js +0 -50
- package/dist/stacks-api/smart-contracts/read-only.js.map +0 -1
- package/dist/stacks-api/stacking-pool/index.d.ts +0 -4
- package/dist/stacks-api/stacking-pool/index.js +0 -5
- package/dist/stacks-api/stacking-pool/index.js.map +0 -1
- package/dist/stacks-api/stacking-pool/members.d.ts +0 -34
- package/dist/stacks-api/stacking-pool/members.js +0 -64
- package/dist/stacks-api/stacking-pool/members.js.map +0 -1
- package/dist/stacks-api/transactions/address-transactions.d.ts +0 -487
- package/dist/stacks-api/transactions/address-transactions.js +0 -75
- package/dist/stacks-api/transactions/address-transactions.js.map +0 -1
- package/dist/stacks-api/transactions/get-transaction.d.ts +0 -8
- package/dist/stacks-api/transactions/get-transaction.js +0 -42
- package/dist/stacks-api/transactions/get-transaction.js.map +0 -1
- package/dist/stacks-api/transactions/index.d.ts +0 -6
- package/dist/stacks-api/transactions/index.js +0 -7
- package/dist/stacks-api/transactions/index.js.map +0 -1
- package/dist/stacks-api/transactions/schemas.d.ts +0 -327
- package/dist/stacks-api/transactions/schemas.js +0 -85
- package/dist/stacks-api/transactions/schemas.js.map +0 -1
- package/dist/stacks-api/types.d.ts +0 -26
- package/dist/stacks-api/types.js +0 -8
- package/dist/stacks-api/types.js.map +0 -1
- package/dist/utils/call-rate-limited-api.d.ts +0 -8
- package/dist/utils/call-rate-limited-api.js +0 -28
- package/dist/utils/call-rate-limited-api.js.map +0 -1
- package/dist/utils/safe.d.ts +0 -10
- package/dist/utils/safe.js +0 -31
- package/dist/utils/safe.js.map +0 -1
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
|
|
3
|
+
type SafeError<TName extends string = string, TData = unknown> = {
|
|
4
|
+
readonly name: TName;
|
|
5
|
+
readonly message: string;
|
|
6
|
+
readonly data?: TData;
|
|
7
|
+
};
|
|
8
|
+
type Result<TData = unknown, E extends SafeError = SafeError> = [E, null] | [null, TData];
|
|
9
|
+
|
|
10
|
+
type ApiKeyConfig = {
|
|
11
|
+
key: string;
|
|
12
|
+
header: string;
|
|
13
|
+
};
|
|
14
|
+
type ApiRequestOptions = {
|
|
15
|
+
baseUrl: string;
|
|
16
|
+
apiKeyConfig?: ApiKeyConfig;
|
|
17
|
+
};
|
|
18
|
+
type ApiPaginationOptions = {
|
|
19
|
+
/**
|
|
20
|
+
* The number of items to return. Each endpoint has its own maximum allowed
|
|
21
|
+
* limit, although many support at least 50 items. The [Hiro
|
|
22
|
+
* docs](https://docs.hiro.so/stacks/api) include the allowed maximum for each
|
|
23
|
+
* endpoint.
|
|
24
|
+
*/
|
|
25
|
+
limit?: number;
|
|
26
|
+
offset?: number;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
type Args$7 = {
|
|
30
|
+
principal: string;
|
|
31
|
+
unanchored?: boolean;
|
|
32
|
+
untilBlock?: number;
|
|
33
|
+
} & ApiRequestOptions;
|
|
34
|
+
declare const responseSchema$2: v.ObjectSchema<{
|
|
35
|
+
readonly stx: v.ObjectSchema<{
|
|
36
|
+
readonly balance: v.StringSchema<undefined>;
|
|
37
|
+
readonly total_sent: v.StringSchema<undefined>;
|
|
38
|
+
readonly total_received: v.StringSchema<undefined>;
|
|
39
|
+
readonly total_fees_sent: v.StringSchema<undefined>;
|
|
40
|
+
readonly total_miner_rewards_received: v.StringSchema<undefined>;
|
|
41
|
+
readonly lock_tx_id: v.StringSchema<undefined>;
|
|
42
|
+
readonly locked: v.StringSchema<undefined>;
|
|
43
|
+
readonly lock_height: v.NumberSchema<undefined>;
|
|
44
|
+
readonly burnchain_lock_height: v.NumberSchema<undefined>;
|
|
45
|
+
readonly burnchain_unlock_height: v.NumberSchema<undefined>;
|
|
46
|
+
}, undefined>;
|
|
47
|
+
readonly fungible_tokens: v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
48
|
+
readonly balance: v.StringSchema<undefined>;
|
|
49
|
+
readonly total_sent: v.StringSchema<undefined>;
|
|
50
|
+
readonly total_received: v.StringSchema<undefined>;
|
|
51
|
+
}, undefined>, undefined>;
|
|
52
|
+
readonly non_fungible_tokens: v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
53
|
+
readonly count: v.StringSchema<undefined>;
|
|
54
|
+
readonly total_sent: v.StringSchema<undefined>;
|
|
55
|
+
readonly total_received: v.StringSchema<undefined>;
|
|
56
|
+
}, undefined>, undefined>;
|
|
57
|
+
}, undefined>;
|
|
58
|
+
type Response$2 = v.InferOutput<typeof responseSchema$2>;
|
|
59
|
+
declare function balances(opts: Args$7): Promise<Result<Response$2, SafeError<"FetchBalancesError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
60
|
+
|
|
61
|
+
declare const balances$1_balances: typeof balances;
|
|
62
|
+
declare namespace balances$1 {
|
|
63
|
+
export { type Args$7 as Args, type Response$2 as Response, balances$1_balances as balances, responseSchema$2 as responseSchema };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare const index$4_balances: typeof balances;
|
|
67
|
+
declare namespace index$4 {
|
|
68
|
+
export { balances$1 as Balances, index$4_balances as balances };
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
type Args$6 = {
|
|
72
|
+
heightOrHash: string | number;
|
|
73
|
+
} & ApiRequestOptions;
|
|
74
|
+
declare const responseSchema$1: v.ObjectSchema<{
|
|
75
|
+
readonly canonical: v.BooleanSchema<undefined>;
|
|
76
|
+
readonly height: v.NumberSchema<undefined>;
|
|
77
|
+
readonly hash: v.StringSchema<undefined>;
|
|
78
|
+
readonly block_time: v.NumberSchema<undefined>;
|
|
79
|
+
readonly block_time_iso: v.StringSchema<undefined>;
|
|
80
|
+
readonly index_block_hash: v.StringSchema<undefined>;
|
|
81
|
+
readonly parent_block_hash: v.StringSchema<undefined>;
|
|
82
|
+
readonly parent_index_block_hash: v.StringSchema<undefined>;
|
|
83
|
+
readonly burn_block_time: v.NumberSchema<undefined>;
|
|
84
|
+
readonly burn_block_time_iso: v.StringSchema<undefined>;
|
|
85
|
+
readonly burn_block_hash: v.StringSchema<undefined>;
|
|
86
|
+
readonly burn_block_height: v.NumberSchema<undefined>;
|
|
87
|
+
readonly miner_txid: v.StringSchema<undefined>;
|
|
88
|
+
readonly tx_count: v.NumberSchema<undefined>;
|
|
89
|
+
readonly execution_cost_read_count: v.NumberSchema<undefined>;
|
|
90
|
+
readonly execution_cost_read_length: v.NumberSchema<undefined>;
|
|
91
|
+
readonly execution_cost_runtime: v.NumberSchema<undefined>;
|
|
92
|
+
readonly execution_cost_write_count: v.NumberSchema<undefined>;
|
|
93
|
+
readonly execution_cost_write_length: v.NumberSchema<undefined>;
|
|
94
|
+
}, undefined>;
|
|
95
|
+
type Response$1 = v.InferOutput<typeof responseSchema$1>;
|
|
96
|
+
declare function getBlock(opts: Args$6): Promise<Result<Response$1, SafeError<"FetchBlockError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
97
|
+
|
|
98
|
+
declare const getBlock$1_getBlock: typeof getBlock;
|
|
99
|
+
declare namespace getBlock$1 {
|
|
100
|
+
export { type Args$6 as Args, type Response$1 as Response, getBlock$1_getBlock as getBlock, responseSchema$1 as responseSchema };
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
declare const index$3_getBlock: typeof getBlock;
|
|
104
|
+
declare namespace index$3 {
|
|
105
|
+
export { getBlock$1 as GetBlock, index$3_getBlock as getBlock };
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
declare const CoreApiResponseSchema: v.ObjectSchema<{
|
|
109
|
+
readonly peer_version: v.NumberSchema<undefined>;
|
|
110
|
+
readonly pox_consensus: v.StringSchema<undefined>;
|
|
111
|
+
readonly burn_block_height: v.NumberSchema<undefined>;
|
|
112
|
+
readonly stable_pox_consensus: v.StringSchema<undefined>;
|
|
113
|
+
readonly stable_burn_block_height: v.NumberSchema<undefined>;
|
|
114
|
+
readonly server_version: v.StringSchema<undefined>;
|
|
115
|
+
readonly network_id: v.NumberSchema<undefined>;
|
|
116
|
+
readonly parent_network_id: v.NumberSchema<undefined>;
|
|
117
|
+
readonly stacks_tip_height: v.NumberSchema<undefined>;
|
|
118
|
+
readonly stacks_tip: v.StringSchema<undefined>;
|
|
119
|
+
readonly stacks_tip_consensus_hash: v.StringSchema<undefined>;
|
|
120
|
+
readonly unanchored_tip: v.StringSchema<undefined>;
|
|
121
|
+
readonly exit_at_block_height: v.NumberSchema<undefined>;
|
|
122
|
+
}, undefined>;
|
|
123
|
+
type CoreApiResponse = v.InferOutput<typeof CoreApiResponseSchema>;
|
|
124
|
+
declare function coreApi(apiOpts: ApiRequestOptions): Promise<Result<CoreApiResponse>>;
|
|
125
|
+
|
|
126
|
+
type coreApi$1_CoreApiResponse = CoreApiResponse;
|
|
127
|
+
declare const coreApi$1_coreApi: typeof coreApi;
|
|
128
|
+
declare namespace coreApi$1 {
|
|
129
|
+
export { type coreApi$1_CoreApiResponse as CoreApiResponse, coreApi$1_coreApi as coreApi };
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
type Args$5 = ApiRequestOptions;
|
|
133
|
+
declare const poxDetailsResponseSchema: v.ObjectSchema<{
|
|
134
|
+
readonly contract_id: v.StringSchema<undefined>;
|
|
135
|
+
readonly pox_activation_threshold_ustx: v.NumberSchema<undefined>;
|
|
136
|
+
readonly first_burnchain_block_height: v.NumberSchema<undefined>;
|
|
137
|
+
readonly current_burnchain_block_height: v.NumberSchema<undefined>;
|
|
138
|
+
readonly prepare_phase_block_length: v.NumberSchema<undefined>;
|
|
139
|
+
readonly reward_phase_block_length: v.NumberSchema<undefined>;
|
|
140
|
+
readonly reward_slots: v.NumberSchema<undefined>;
|
|
141
|
+
readonly rejection_fraction: v.NullSchema<undefined>;
|
|
142
|
+
readonly total_liquid_supply_ustx: v.NumberSchema<undefined>;
|
|
143
|
+
readonly current_cycle: v.ObjectSchema<{
|
|
144
|
+
readonly id: v.NumberSchema<undefined>;
|
|
145
|
+
readonly min_threshold_ustx: v.NumberSchema<undefined>;
|
|
146
|
+
readonly stacked_ustx: v.NumberSchema<undefined>;
|
|
147
|
+
readonly is_pox_active: v.BooleanSchema<undefined>;
|
|
148
|
+
}, undefined>;
|
|
149
|
+
readonly next_cycle: v.ObjectSchema<{
|
|
150
|
+
readonly id: v.NumberSchema<undefined>;
|
|
151
|
+
readonly min_threshold_ustx: v.NumberSchema<undefined>;
|
|
152
|
+
readonly min_increment_ustx: v.NumberSchema<undefined>;
|
|
153
|
+
readonly stacked_ustx: v.NumberSchema<undefined>;
|
|
154
|
+
readonly prepare_phase_start_block_height: v.NumberSchema<undefined>;
|
|
155
|
+
readonly blocks_until_prepare_phase: v.NumberSchema<undefined>;
|
|
156
|
+
readonly reward_phase_start_block_height: v.NumberSchema<undefined>;
|
|
157
|
+
readonly blocks_until_reward_phase: v.NumberSchema<undefined>;
|
|
158
|
+
readonly ustx_until_pox_rejection: v.NullSchema<undefined>;
|
|
159
|
+
}, undefined>;
|
|
160
|
+
readonly epochs: v.ArraySchema<v.ObjectSchema<{
|
|
161
|
+
readonly epoch_id: v.StringSchema<undefined>;
|
|
162
|
+
readonly start_height: v.NumberSchema<undefined>;
|
|
163
|
+
readonly end_height: v.NumberSchema<undefined>;
|
|
164
|
+
readonly block_limit: v.ObjectSchema<{
|
|
165
|
+
readonly write_length: v.NumberSchema<undefined>;
|
|
166
|
+
readonly write_count: v.NumberSchema<undefined>;
|
|
167
|
+
readonly read_length: v.NumberSchema<undefined>;
|
|
168
|
+
readonly read_count: v.NumberSchema<undefined>;
|
|
169
|
+
readonly runtime: v.NumberSchema<undefined>;
|
|
170
|
+
}, undefined>;
|
|
171
|
+
readonly network_epoch: v.NumberSchema<undefined>;
|
|
172
|
+
}, undefined>, undefined>;
|
|
173
|
+
readonly min_amount_ustx: v.NumberSchema<undefined>;
|
|
174
|
+
readonly prepare_cycle_length: v.NumberSchema<undefined>;
|
|
175
|
+
readonly reward_cycle_id: v.NumberSchema<undefined>;
|
|
176
|
+
readonly reward_cycle_length: v.NumberSchema<undefined>;
|
|
177
|
+
readonly rejection_votes_left_required: v.NullSchema<undefined>;
|
|
178
|
+
readonly next_reward_cycle_in: v.NumberSchema<undefined>;
|
|
179
|
+
readonly contract_versions: v.ArraySchema<v.ObjectSchema<{
|
|
180
|
+
readonly contract_id: v.StringSchema<undefined>;
|
|
181
|
+
readonly activation_burnchain_block_height: v.NumberSchema<undefined>;
|
|
182
|
+
readonly first_reward_cycle_id: v.NumberSchema<undefined>;
|
|
183
|
+
}, undefined>, undefined>;
|
|
184
|
+
}, undefined>;
|
|
185
|
+
type PoxDetailsResponse = v.InferOutput<typeof poxDetailsResponseSchema>;
|
|
186
|
+
declare function poxDetails(args: Args$5): Promise<Result<PoxDetailsResponse>>;
|
|
187
|
+
|
|
188
|
+
declare const poxDetails$1_poxDetails: typeof poxDetails;
|
|
189
|
+
declare namespace poxDetails$1 {
|
|
190
|
+
export { poxDetails$1_poxDetails as poxDetails };
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
declare const index$2_coreApi: typeof coreApi;
|
|
194
|
+
declare const index$2_poxDetails: typeof poxDetails;
|
|
195
|
+
declare namespace index$2 {
|
|
196
|
+
export { coreApi$1 as CoreApi, poxDetails$1 as PoxDetails, index$2_coreApi as coreApi, index$2_poxDetails as poxDetails };
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
type Args$4 = {
|
|
200
|
+
cycleNumber: number;
|
|
201
|
+
} & ApiRequestOptions;
|
|
202
|
+
declare const responseSchema: v.ObjectSchema<{
|
|
203
|
+
readonly block_height: v.NumberSchema<undefined>;
|
|
204
|
+
readonly index_block_hash: v.StringSchema<undefined>;
|
|
205
|
+
readonly cycle_number: v.NumberSchema<undefined>;
|
|
206
|
+
readonly total_weight: v.NumberSchema<undefined>;
|
|
207
|
+
readonly total_stacked_amount: v.StringSchema<undefined>;
|
|
208
|
+
readonly total_signers: v.NumberSchema<undefined>;
|
|
209
|
+
}, undefined>;
|
|
210
|
+
type Response = v.InferOutput<typeof responseSchema>;
|
|
211
|
+
declare function cycle(opts: Args$4): Promise<Result<Response, SafeError<"FetchCycleError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
212
|
+
|
|
213
|
+
type cycle$1_Response = Response;
|
|
214
|
+
declare const cycle$1_cycle: typeof cycle;
|
|
215
|
+
declare const cycle$1_responseSchema: typeof responseSchema;
|
|
216
|
+
declare namespace cycle$1 {
|
|
217
|
+
export { type Args$4 as Args, type cycle$1_Response as Response, cycle$1_cycle as cycle, cycle$1_responseSchema as responseSchema };
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
type Args$3 = ApiRequestOptions & ApiPaginationOptions;
|
|
221
|
+
declare const cycleInfoSchema: v.ObjectSchema<{
|
|
222
|
+
readonly block_height: v.NumberSchema<undefined>;
|
|
223
|
+
readonly index_block_hash: v.StringSchema<undefined>;
|
|
224
|
+
readonly cycle_number: v.NumberSchema<undefined>;
|
|
225
|
+
readonly total_weight: v.NumberSchema<undefined>;
|
|
226
|
+
readonly total_stacked_amount: v.StringSchema<undefined>;
|
|
227
|
+
readonly total_signers: v.NumberSchema<undefined>;
|
|
228
|
+
}, undefined>;
|
|
229
|
+
type CycleInfo = v.InferOutput<typeof cycleInfoSchema>;
|
|
230
|
+
declare const resultsSchema$2: v.ArraySchema<v.ObjectSchema<{
|
|
231
|
+
readonly block_height: v.NumberSchema<undefined>;
|
|
232
|
+
readonly index_block_hash: v.StringSchema<undefined>;
|
|
233
|
+
readonly cycle_number: v.NumberSchema<undefined>;
|
|
234
|
+
readonly total_weight: v.NumberSchema<undefined>;
|
|
235
|
+
readonly total_stacked_amount: v.StringSchema<undefined>;
|
|
236
|
+
readonly total_signers: v.NumberSchema<undefined>;
|
|
237
|
+
}, undefined>, undefined>;
|
|
238
|
+
type Results$2 = v.InferOutput<typeof resultsSchema$2>;
|
|
239
|
+
declare const cyclesResponseSchema: v.ObjectSchema<{
|
|
240
|
+
readonly results: v.ArraySchema<v.ObjectSchema<{
|
|
241
|
+
readonly block_height: v.NumberSchema<undefined>;
|
|
242
|
+
readonly index_block_hash: v.StringSchema<undefined>;
|
|
243
|
+
readonly cycle_number: v.NumberSchema<undefined>;
|
|
244
|
+
readonly total_weight: v.NumberSchema<undefined>;
|
|
245
|
+
readonly total_stacked_amount: v.StringSchema<undefined>;
|
|
246
|
+
readonly total_signers: v.NumberSchema<undefined>;
|
|
247
|
+
}, undefined>, undefined>;
|
|
248
|
+
readonly limit: v.NumberSchema<undefined>;
|
|
249
|
+
readonly offset: v.NumberSchema<undefined>;
|
|
250
|
+
readonly total: v.NumberSchema<undefined>;
|
|
251
|
+
}, undefined>;
|
|
252
|
+
type CyclesResponse = v.InferOutput<typeof cyclesResponseSchema>;
|
|
253
|
+
declare function cycles(args: Args$3): Promise<Result<CyclesResponse>>;
|
|
254
|
+
|
|
255
|
+
type cycles$1_CycleInfo = CycleInfo;
|
|
256
|
+
type cycles$1_CyclesResponse = CyclesResponse;
|
|
257
|
+
declare const cycles$1_cycleInfoSchema: typeof cycleInfoSchema;
|
|
258
|
+
declare const cycles$1_cycles: typeof cycles;
|
|
259
|
+
declare const cycles$1_cyclesResponseSchema: typeof cyclesResponseSchema;
|
|
260
|
+
declare namespace cycles$1 {
|
|
261
|
+
export { type Args$3 as Args, type cycles$1_CycleInfo as CycleInfo, type cycles$1_CyclesResponse as CyclesResponse, type Results$2 as Results, cycles$1_cycleInfoSchema as cycleInfoSchema, cycles$1_cycles as cycles, cycles$1_cyclesResponseSchema as cyclesResponseSchema, resultsSchema$2 as resultsSchema };
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
type Args$2 = {
|
|
265
|
+
/**
|
|
266
|
+
* The signers public key as a hex string, with or without a '0x' prefix.
|
|
267
|
+
*/
|
|
268
|
+
signerPublicKey: string;
|
|
269
|
+
cycleId: number;
|
|
270
|
+
} & ApiRequestOptions;
|
|
271
|
+
declare const signerInCycleResponseSchema: v.ObjectSchema<{
|
|
272
|
+
readonly signing_key: v.StringSchema<undefined>;
|
|
273
|
+
readonly signer_address: v.StringSchema<undefined>;
|
|
274
|
+
readonly weight: v.NumberSchema<undefined>;
|
|
275
|
+
readonly stacked_amount: v.StringSchema<undefined>;
|
|
276
|
+
readonly weight_percent: v.NumberSchema<undefined>;
|
|
277
|
+
readonly stacked_amount_percent: v.NumberSchema<undefined>;
|
|
278
|
+
readonly solo_stacker_count: v.NumberSchema<undefined>;
|
|
279
|
+
readonly pooled_stacker_count: v.NumberSchema<undefined>;
|
|
280
|
+
}, undefined>;
|
|
281
|
+
type SignerInCycleResponse = v.InferOutput<typeof signerInCycleResponseSchema>;
|
|
282
|
+
declare function signerInCycle(args: Args$2): Promise<Result<SignerInCycleResponse>>;
|
|
283
|
+
|
|
284
|
+
type signerInCycle$1_SignerInCycleResponse = SignerInCycleResponse;
|
|
285
|
+
declare const signerInCycle$1_signerInCycle: typeof signerInCycle;
|
|
286
|
+
declare const signerInCycle$1_signerInCycleResponseSchema: typeof signerInCycleResponseSchema;
|
|
287
|
+
declare namespace signerInCycle$1 {
|
|
288
|
+
export { type Args$2 as Args, type signerInCycle$1_SignerInCycleResponse as SignerInCycleResponse, signerInCycle$1_signerInCycle as signerInCycle, signerInCycle$1_signerInCycleResponseSchema as signerInCycleResponseSchema };
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
type Args$1 = {
|
|
292
|
+
cycleNumber: number;
|
|
293
|
+
} & ApiRequestOptions & ApiPaginationOptions;
|
|
294
|
+
declare const signerSchema: v.ObjectSchema<{
|
|
295
|
+
readonly signing_key: v.StringSchema<undefined>;
|
|
296
|
+
readonly signer_address: v.StringSchema<undefined>;
|
|
297
|
+
readonly weight: v.NumberSchema<undefined>;
|
|
298
|
+
readonly stacked_amount: v.StringSchema<undefined>;
|
|
299
|
+
readonly weight_percent: v.NumberSchema<undefined>;
|
|
300
|
+
readonly stacked_amount_percent: v.NumberSchema<undefined>;
|
|
301
|
+
readonly pooled_stacker_count: v.NumberSchema<undefined>;
|
|
302
|
+
readonly solo_stacker_count: v.NumberSchema<undefined>;
|
|
303
|
+
}, undefined>;
|
|
304
|
+
type Signer = v.InferOutput<typeof signerSchema>;
|
|
305
|
+
declare const resultsSchema$1: v.ArraySchema<v.ObjectSchema<{
|
|
306
|
+
readonly signing_key: v.StringSchema<undefined>;
|
|
307
|
+
readonly signer_address: v.StringSchema<undefined>;
|
|
308
|
+
readonly weight: v.NumberSchema<undefined>;
|
|
309
|
+
readonly stacked_amount: v.StringSchema<undefined>;
|
|
310
|
+
readonly weight_percent: v.NumberSchema<undefined>;
|
|
311
|
+
readonly stacked_amount_percent: v.NumberSchema<undefined>;
|
|
312
|
+
readonly pooled_stacker_count: v.NumberSchema<undefined>;
|
|
313
|
+
readonly solo_stacker_count: v.NumberSchema<undefined>;
|
|
314
|
+
}, undefined>, undefined>;
|
|
315
|
+
type Results$1 = v.InferOutput<typeof resultsSchema$1>;
|
|
316
|
+
declare const signersResponseSchema: v.ObjectSchema<{
|
|
317
|
+
readonly results: v.ArraySchema<v.ObjectSchema<{
|
|
318
|
+
readonly signing_key: v.StringSchema<undefined>;
|
|
319
|
+
readonly signer_address: v.StringSchema<undefined>;
|
|
320
|
+
readonly weight: v.NumberSchema<undefined>;
|
|
321
|
+
readonly stacked_amount: v.StringSchema<undefined>;
|
|
322
|
+
readonly weight_percent: v.NumberSchema<undefined>;
|
|
323
|
+
readonly stacked_amount_percent: v.NumberSchema<undefined>;
|
|
324
|
+
readonly pooled_stacker_count: v.NumberSchema<undefined>;
|
|
325
|
+
readonly solo_stacker_count: v.NumberSchema<undefined>;
|
|
326
|
+
}, undefined>, undefined>;
|
|
327
|
+
readonly limit: v.NumberSchema<undefined>;
|
|
328
|
+
readonly offset: v.NumberSchema<undefined>;
|
|
329
|
+
readonly total: v.NumberSchema<undefined>;
|
|
330
|
+
}, undefined>;
|
|
331
|
+
type SignersResponse = v.InferOutput<typeof signersResponseSchema>;
|
|
332
|
+
declare function signersInCycle(args: Args$1): Promise<Result<SignersResponse, SafeError<"FetchSignersError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
333
|
+
|
|
334
|
+
type signersInCycle$1_Signer = Signer;
|
|
335
|
+
type signersInCycle$1_SignersResponse = SignersResponse;
|
|
336
|
+
declare const signersInCycle$1_signerSchema: typeof signerSchema;
|
|
337
|
+
declare const signersInCycle$1_signersInCycle: typeof signersInCycle;
|
|
338
|
+
declare const signersInCycle$1_signersResponseSchema: typeof signersResponseSchema;
|
|
339
|
+
declare namespace signersInCycle$1 {
|
|
340
|
+
export { type Args$1 as Args, type Results$1 as Results, type signersInCycle$1_Signer as Signer, type signersInCycle$1_SignersResponse as SignersResponse, resultsSchema$1 as resultsSchema, signersInCycle$1_signerSchema as signerSchema, signersInCycle$1_signersInCycle as signersInCycle, signersInCycle$1_signersResponseSchema as signersResponseSchema };
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
type Args = {
|
|
344
|
+
cycleNumber: number;
|
|
345
|
+
signerPublicKey: string;
|
|
346
|
+
} & ApiRequestOptions & ApiPaginationOptions;
|
|
347
|
+
declare const stackerInfoSchema: v.ObjectSchema<{
|
|
348
|
+
readonly stacker_address: v.StringSchema<undefined>;
|
|
349
|
+
readonly stacked_amount: v.StringSchema<undefined>;
|
|
350
|
+
readonly pox_address: v.StringSchema<undefined>;
|
|
351
|
+
readonly stacker_type: v.UnionSchema<[v.LiteralSchema<"pooled", undefined>, v.LiteralSchema<"solo", undefined>], undefined>;
|
|
352
|
+
}, undefined>;
|
|
353
|
+
type StackerInfo = v.InferOutput<typeof stackerInfoSchema>;
|
|
354
|
+
declare const resultsSchema: v.ArraySchema<v.ObjectSchema<{
|
|
355
|
+
readonly stacker_address: v.StringSchema<undefined>;
|
|
356
|
+
readonly stacked_amount: v.StringSchema<undefined>;
|
|
357
|
+
readonly pox_address: v.StringSchema<undefined>;
|
|
358
|
+
readonly stacker_type: v.UnionSchema<[v.LiteralSchema<"pooled", undefined>, v.LiteralSchema<"solo", undefined>], undefined>;
|
|
359
|
+
}, undefined>, undefined>;
|
|
360
|
+
type Results = v.InferOutput<typeof resultsSchema>;
|
|
361
|
+
declare const stackersForSignerInCycleResponseSchema: v.ObjectSchema<{
|
|
362
|
+
readonly results: v.ArraySchema<v.ObjectSchema<{
|
|
363
|
+
readonly stacker_address: v.StringSchema<undefined>;
|
|
364
|
+
readonly stacked_amount: v.StringSchema<undefined>;
|
|
365
|
+
readonly pox_address: v.StringSchema<undefined>;
|
|
366
|
+
readonly stacker_type: v.UnionSchema<[v.LiteralSchema<"pooled", undefined>, v.LiteralSchema<"solo", undefined>], undefined>;
|
|
367
|
+
}, undefined>, undefined>;
|
|
368
|
+
readonly limit: v.NumberSchema<undefined>;
|
|
369
|
+
readonly offset: v.NumberSchema<undefined>;
|
|
370
|
+
readonly total: v.NumberSchema<undefined>;
|
|
371
|
+
}, undefined>;
|
|
372
|
+
type StackersForSignerInCycleResponse = v.InferOutput<typeof stackersForSignerInCycleResponseSchema>;
|
|
373
|
+
declare function stackersForSignerInCycle(opts: Args): Promise<Result<StackersForSignerInCycleResponse, SafeError<"FetchStackersForSignerInCycleError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
374
|
+
|
|
375
|
+
type stackersForSignerInCycle$1_Args = Args;
|
|
376
|
+
type stackersForSignerInCycle$1_Results = Results;
|
|
377
|
+
type stackersForSignerInCycle$1_StackerInfo = StackerInfo;
|
|
378
|
+
type stackersForSignerInCycle$1_StackersForSignerInCycleResponse = StackersForSignerInCycleResponse;
|
|
379
|
+
declare const stackersForSignerInCycle$1_resultsSchema: typeof resultsSchema;
|
|
380
|
+
declare const stackersForSignerInCycle$1_stackerInfoSchema: typeof stackerInfoSchema;
|
|
381
|
+
declare const stackersForSignerInCycle$1_stackersForSignerInCycle: typeof stackersForSignerInCycle;
|
|
382
|
+
declare const stackersForSignerInCycle$1_stackersForSignerInCycleResponseSchema: typeof stackersForSignerInCycleResponseSchema;
|
|
383
|
+
declare namespace stackersForSignerInCycle$1 {
|
|
384
|
+
export { type stackersForSignerInCycle$1_Args as Args, type stackersForSignerInCycle$1_Results as Results, type stackersForSignerInCycle$1_StackerInfo as StackerInfo, type stackersForSignerInCycle$1_StackersForSignerInCycleResponse as StackersForSignerInCycleResponse, stackersForSignerInCycle$1_resultsSchema as resultsSchema, stackersForSignerInCycle$1_stackerInfoSchema as stackerInfoSchema, stackersForSignerInCycle$1_stackersForSignerInCycle as stackersForSignerInCycle, stackersForSignerInCycle$1_stackersForSignerInCycleResponseSchema as stackersForSignerInCycleResponseSchema };
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
declare const index$1_cycle: typeof cycle;
|
|
388
|
+
declare const index$1_cycles: typeof cycles;
|
|
389
|
+
declare const index$1_signerInCycle: typeof signerInCycle;
|
|
390
|
+
declare const index$1_signersInCycle: typeof signersInCycle;
|
|
391
|
+
declare const index$1_stackersForSignerInCycle: typeof stackersForSignerInCycle;
|
|
392
|
+
declare namespace index$1 {
|
|
393
|
+
export { cycle$1 as Cycle, cycles$1 as Cycles, signerInCycle$1 as SignerInCycle, signersInCycle$1 as SignersInCycle, stackersForSignerInCycle$1 as StackersForSignerInCycle, index$1_cycle as cycle, index$1_cycles as cycles, index$1_signerInCycle as signerInCycle, index$1_signersInCycle as signersInCycle, index$1_stackersForSignerInCycle as stackersForSignerInCycle };
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
declare namespace index {
|
|
397
|
+
export { index$4 as Accounts, index$3 as Blocks, index$2 as Info, index$1 as ProofOfTransfer, index$4 as accounts, index$3 as blocks, index$2 as info, index$1 as proofOfTransfer };
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
export { index as StacksApi, index as stacksApi };
|