@secretkeylabs/stacks-tools 0.5.0 → 0.6.0-33dafd2
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 +480 -388
- package/dist/index.d.cts +457 -184
- package/dist/index.d.ts +457 -184
- package/dist/index.js +490 -388
- package/package.json +6 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { MempoolTransaction, OperationResponse } from '@stacks/blockchain-api-client';
|
|
1
2
|
import * as v from 'valibot';
|
|
3
|
+
import { OptionalCV, TupleCV, BufferCV, UIntCV, PrincipalCV, ListCV } from '@stacks/transactions';
|
|
2
4
|
|
|
3
5
|
type SafeError<TName extends string = string, TData = unknown> = {
|
|
4
6
|
readonly name: TName;
|
|
@@ -40,6 +42,45 @@ type ApiPaginationOptions = {
|
|
|
40
42
|
limit?: number;
|
|
41
43
|
offset?: number;
|
|
42
44
|
};
|
|
45
|
+
type ListResponse<T = unknown> = {
|
|
46
|
+
limit: number;
|
|
47
|
+
offset: number;
|
|
48
|
+
total: number;
|
|
49
|
+
results: T[];
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
type Args$j = {
|
|
53
|
+
/**
|
|
54
|
+
* Filter to only return transactions with this sender address.
|
|
55
|
+
*/
|
|
56
|
+
senderAddress?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Filter to only return transactions with this recipient address (only
|
|
59
|
+
* applicable for STX transfer tx types).
|
|
60
|
+
*/
|
|
61
|
+
recipientAddress?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Filter to only return transactions with this address as the sender or
|
|
64
|
+
* recipient (recipient only applicable for STX transfer tx types).
|
|
65
|
+
*/
|
|
66
|
+
address?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Option to sort results by transaction age, size, or fee rate.
|
|
69
|
+
*/
|
|
70
|
+
orderBy?: "age" | "size" | "fee";
|
|
71
|
+
/**
|
|
72
|
+
* Option to sort results in ascending or descending order.
|
|
73
|
+
*/
|
|
74
|
+
order?: "asc" | "desc";
|
|
75
|
+
} & ApiRequestOptions & ApiPaginationOptions;
|
|
76
|
+
type MempoolTransactionsResponse = ListResponse<MempoolTransaction>;
|
|
77
|
+
declare function mempoolTransactions(args: Args$j): Promise<Result$1<MempoolTransactionsResponse, SafeError<"FetchMempoolTransactionsError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
78
|
+
|
|
79
|
+
type mempoolTransactions$1_MempoolTransactionsResponse = MempoolTransactionsResponse;
|
|
80
|
+
declare const mempoolTransactions$1_mempoolTransactions: typeof mempoolTransactions;
|
|
81
|
+
declare namespace mempoolTransactions$1 {
|
|
82
|
+
export { type mempoolTransactions$1_MempoolTransactionsResponse as MempoolTransactionsResponse, mempoolTransactions$1_mempoolTransactions as mempoolTransactions };
|
|
83
|
+
}
|
|
43
84
|
|
|
44
85
|
declare const baseTransactionSchema: v.ObjectSchema<{
|
|
45
86
|
readonly tx_id: v.StringSchema<undefined>;
|
|
@@ -380,17 +421,17 @@ declare namespace schemas {
|
|
|
380
421
|
export { type schemas_ContractCallTransaction as ContractCallTransaction, type schemas_SmartContractTransaction as SmartContractTransaction, type schemas_Transaction as Transaction, schemas_baseTransactionSchema as baseTransactionSchema, schemas_contractCallTransactionSchema as contractCallTransactionSchema, schemas_smartContractTransactionSchema as smartContractTransactionSchema, schemas_tokenTransferSchema as tokenTransferSchema, schemas_transactionSchema as transactionSchema };
|
|
381
422
|
}
|
|
382
423
|
|
|
383
|
-
type Args$
|
|
424
|
+
type Args$i = {
|
|
384
425
|
transactionId: string;
|
|
385
426
|
} & ApiRequestOptions;
|
|
386
|
-
declare function getTransaction(args: Args$
|
|
427
|
+
declare function getTransaction(args: Args$i): Promise<Result$1<Transaction>>;
|
|
387
428
|
|
|
388
429
|
declare const getTransaction$1_getTransaction: typeof getTransaction;
|
|
389
430
|
declare namespace getTransaction$1 {
|
|
390
431
|
export { getTransaction$1_getTransaction as getTransaction };
|
|
391
432
|
}
|
|
392
433
|
|
|
393
|
-
type Args$
|
|
434
|
+
type Args$h = {
|
|
394
435
|
address: string;
|
|
395
436
|
} & ApiRequestOptions & ApiPaginationOptions;
|
|
396
437
|
declare const resultSchema: v.ObjectSchema<{
|
|
@@ -872,7 +913,7 @@ declare const addressTransactionsResponseSchema: v.ObjectSchema<{
|
|
|
872
913
|
readonly total: v.NumberSchema<undefined>;
|
|
873
914
|
}, undefined>;
|
|
874
915
|
type AddressTransactionsResponse = v.InferOutput<typeof addressTransactionsResponseSchema>;
|
|
875
|
-
declare function addressTransactions(args: Args$
|
|
916
|
+
declare function addressTransactions(args: Args$h): Promise<Result$1<AddressTransactionsResponse, SafeError<"FetchAddressTransactionsError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
876
917
|
|
|
877
918
|
type addressTransactions$1_AddressTransactionsResponse = AddressTransactionsResponse;
|
|
878
919
|
type addressTransactions$1_Result = Result;
|
|
@@ -881,7 +922,7 @@ declare namespace addressTransactions$1 {
|
|
|
881
922
|
export { type addressTransactions$1_AddressTransactionsResponse as AddressTransactionsResponse, type addressTransactions$1_Result as Result, type Results$3 as Results, addressTransactions$1_addressTransactions as addressTransactions };
|
|
882
923
|
}
|
|
883
924
|
|
|
884
|
-
type Args$
|
|
925
|
+
type Args$g = {
|
|
885
926
|
poolPrincipal: string;
|
|
886
927
|
afterBlock?: number;
|
|
887
928
|
unanchored?: boolean;
|
|
@@ -911,7 +952,7 @@ declare const membersResponseSchema: v.ObjectSchema<{
|
|
|
911
952
|
}, undefined>, undefined>;
|
|
912
953
|
}, undefined>;
|
|
913
954
|
type MembersResponse = v.InferOutput<typeof membersResponseSchema>;
|
|
914
|
-
declare function members(args: Args$
|
|
955
|
+
declare function members(args: Args$g): Promise<Result$1<MembersResponse>>;
|
|
915
956
|
|
|
916
957
|
type members$1_Member = Member;
|
|
917
958
|
type members$1_MembersResponse = MembersResponse;
|
|
@@ -919,10 +960,10 @@ declare const members$1_memberSchema: typeof memberSchema;
|
|
|
919
960
|
declare const members$1_members: typeof members;
|
|
920
961
|
declare const members$1_membersResponseSchema: typeof membersResponseSchema;
|
|
921
962
|
declare namespace members$1 {
|
|
922
|
-
export { type Args$
|
|
963
|
+
export { type Args$g as Args, type members$1_Member as Member, type members$1_MembersResponse as MembersResponse, members$1_memberSchema as memberSchema, members$1_members as members, members$1_membersResponseSchema as membersResponseSchema };
|
|
923
964
|
}
|
|
924
965
|
|
|
925
|
-
type Args$
|
|
966
|
+
type Args$f = {
|
|
926
967
|
cycleNumber: number;
|
|
927
968
|
signerPublicKey: string;
|
|
928
969
|
} & ApiRequestOptions & ApiPaginationOptions;
|
|
@@ -952,7 +993,7 @@ declare const stackersForSignerInCycleResponseSchema: v.ObjectSchema<{
|
|
|
952
993
|
readonly total: v.NumberSchema<undefined>;
|
|
953
994
|
}, undefined>;
|
|
954
995
|
type StackersForSignerInCycleResponse = v.InferOutput<typeof stackersForSignerInCycleResponseSchema>;
|
|
955
|
-
declare function stackersForSignerInCycle(opts: Args$
|
|
996
|
+
declare function stackersForSignerInCycle(opts: Args$f): Promise<Result$1<StackersForSignerInCycleResponse, SafeError<"FetchStackersForSignerInCycleError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
956
997
|
|
|
957
998
|
type stackersForSignerInCycle$1_StackerInfo = StackerInfo;
|
|
958
999
|
type stackersForSignerInCycle$1_StackersForSignerInCycleResponse = StackersForSignerInCycleResponse;
|
|
@@ -960,10 +1001,10 @@ declare const stackersForSignerInCycle$1_stackerInfoSchema: typeof stackerInfoSc
|
|
|
960
1001
|
declare const stackersForSignerInCycle$1_stackersForSignerInCycle: typeof stackersForSignerInCycle;
|
|
961
1002
|
declare const stackersForSignerInCycle$1_stackersForSignerInCycleResponseSchema: typeof stackersForSignerInCycleResponseSchema;
|
|
962
1003
|
declare namespace stackersForSignerInCycle$1 {
|
|
963
|
-
export { type Args$
|
|
1004
|
+
export { type Args$f as Args, type Results$2 as Results, type stackersForSignerInCycle$1_StackerInfo as StackerInfo, type stackersForSignerInCycle$1_StackersForSignerInCycleResponse as StackersForSignerInCycleResponse, resultsSchema$2 as resultsSchema, stackersForSignerInCycle$1_stackerInfoSchema as stackerInfoSchema, stackersForSignerInCycle$1_stackersForSignerInCycle as stackersForSignerInCycle, stackersForSignerInCycle$1_stackersForSignerInCycleResponseSchema as stackersForSignerInCycleResponseSchema };
|
|
964
1005
|
}
|
|
965
1006
|
|
|
966
|
-
type Args$
|
|
1007
|
+
type Args$e = {
|
|
967
1008
|
cycleNumber: number;
|
|
968
1009
|
} & ApiRequestOptions & ApiPaginationOptions;
|
|
969
1010
|
declare const signerSchema: v.ObjectSchema<{
|
|
@@ -1004,7 +1045,7 @@ declare const signersResponseSchema: v.ObjectSchema<{
|
|
|
1004
1045
|
readonly total: v.NumberSchema<undefined>;
|
|
1005
1046
|
}, undefined>;
|
|
1006
1047
|
type SignersResponse = v.InferOutput<typeof signersResponseSchema>;
|
|
1007
|
-
declare function signersInCycle(args: Args$
|
|
1048
|
+
declare function signersInCycle(args: Args$e): Promise<Result$1<SignersResponse, SafeError<"FetchSignersError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
1008
1049
|
|
|
1009
1050
|
type signersInCycle$1_Signer = Signer;
|
|
1010
1051
|
type signersInCycle$1_SignersResponse = SignersResponse;
|
|
@@ -1012,10 +1053,10 @@ declare const signersInCycle$1_signerSchema: typeof signerSchema;
|
|
|
1012
1053
|
declare const signersInCycle$1_signersInCycle: typeof signersInCycle;
|
|
1013
1054
|
declare const signersInCycle$1_signersResponseSchema: typeof signersResponseSchema;
|
|
1014
1055
|
declare namespace signersInCycle$1 {
|
|
1015
|
-
export { type Args$
|
|
1056
|
+
export { type Args$e 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 };
|
|
1016
1057
|
}
|
|
1017
1058
|
|
|
1018
|
-
type Args$
|
|
1059
|
+
type Args$d = {
|
|
1019
1060
|
/**
|
|
1020
1061
|
* The signers public key as a hex string, with or without a '0x' prefix.
|
|
1021
1062
|
*/
|
|
@@ -1033,16 +1074,16 @@ declare const signerInCycleResponseSchema: v.ObjectSchema<{
|
|
|
1033
1074
|
readonly pooled_stacker_count: v.NumberSchema<undefined>;
|
|
1034
1075
|
}, undefined>;
|
|
1035
1076
|
type SignerInCycleResponse = v.InferOutput<typeof signerInCycleResponseSchema>;
|
|
1036
|
-
declare function signerInCycle(args: Args$
|
|
1077
|
+
declare function signerInCycle(args: Args$d): Promise<Result$1<SignerInCycleResponse>>;
|
|
1037
1078
|
|
|
1038
1079
|
type signerInCycle$1_SignerInCycleResponse = SignerInCycleResponse;
|
|
1039
1080
|
declare const signerInCycle$1_signerInCycle: typeof signerInCycle;
|
|
1040
1081
|
declare const signerInCycle$1_signerInCycleResponseSchema: typeof signerInCycleResponseSchema;
|
|
1041
1082
|
declare namespace signerInCycle$1 {
|
|
1042
|
-
export { type Args$
|
|
1083
|
+
export { type Args$d as Args, type signerInCycle$1_SignerInCycleResponse as SignerInCycleResponse, signerInCycle$1_signerInCycle as signerInCycle, signerInCycle$1_signerInCycleResponseSchema as signerInCycleResponseSchema };
|
|
1043
1084
|
}
|
|
1044
1085
|
|
|
1045
|
-
type Args$
|
|
1086
|
+
type Args$c = ApiRequestOptions & ApiPaginationOptions;
|
|
1046
1087
|
declare const cycleInfoSchema: v.ObjectSchema<{
|
|
1047
1088
|
readonly block_height: v.NumberSchema<undefined>;
|
|
1048
1089
|
readonly index_block_hash: v.StringSchema<undefined>;
|
|
@@ -1075,7 +1116,7 @@ declare const cyclesResponseSchema: v.ObjectSchema<{
|
|
|
1075
1116
|
readonly total: v.NumberSchema<undefined>;
|
|
1076
1117
|
}, undefined>;
|
|
1077
1118
|
type CyclesResponse = v.InferOutput<typeof cyclesResponseSchema>;
|
|
1078
|
-
declare function cycles(args: Args$
|
|
1119
|
+
declare function cycles(args: Args$c): Promise<Result$1<CyclesResponse>>;
|
|
1079
1120
|
|
|
1080
1121
|
type cycles$1_CycleInfo = CycleInfo;
|
|
1081
1122
|
type cycles$1_CyclesResponse = CyclesResponse;
|
|
@@ -1085,13 +1126,13 @@ declare const cycles$1_cycles: typeof cycles;
|
|
|
1085
1126
|
declare const cycles$1_cyclesResponseSchema: typeof cyclesResponseSchema;
|
|
1086
1127
|
declare const cycles$1_resultsSchema: typeof resultsSchema;
|
|
1087
1128
|
declare namespace cycles$1 {
|
|
1088
|
-
export { type Args$
|
|
1129
|
+
export { type Args$c as Args, type cycles$1_CycleInfo as CycleInfo, type cycles$1_CyclesResponse as CyclesResponse, type cycles$1_Results as Results, cycles$1_cycleInfoSchema as cycleInfoSchema, cycles$1_cycles as cycles, cycles$1_cyclesResponseSchema as cyclesResponseSchema, cycles$1_resultsSchema as resultsSchema };
|
|
1089
1130
|
}
|
|
1090
1131
|
|
|
1091
|
-
type Args$
|
|
1132
|
+
type Args$b = {
|
|
1092
1133
|
cycleNumber: number;
|
|
1093
1134
|
} & ApiRequestOptions;
|
|
1094
|
-
declare const responseSchema$
|
|
1135
|
+
declare const responseSchema$2: v.ObjectSchema<{
|
|
1095
1136
|
readonly block_height: v.NumberSchema<undefined>;
|
|
1096
1137
|
readonly index_block_hash: v.StringSchema<undefined>;
|
|
1097
1138
|
readonly cycle_number: v.NumberSchema<undefined>;
|
|
@@ -1099,73 +1140,46 @@ declare const responseSchema$3: v.ObjectSchema<{
|
|
|
1099
1140
|
readonly total_stacked_amount: v.StringSchema<undefined>;
|
|
1100
1141
|
readonly total_signers: v.NumberSchema<undefined>;
|
|
1101
1142
|
}, undefined>;
|
|
1102
|
-
type Response$
|
|
1103
|
-
declare function cycle(opts: Args$
|
|
1143
|
+
type Response$2 = v.InferOutput<typeof responseSchema$2>;
|
|
1144
|
+
declare function cycle(opts: Args$b): Promise<Result$1<Response$2, SafeError<"FetchCycleError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
1104
1145
|
|
|
1105
1146
|
declare const cycle$1_cycle: typeof cycle;
|
|
1106
1147
|
declare namespace cycle$1 {
|
|
1107
|
-
export { type Args$
|
|
1148
|
+
export { type Args$b as Args, type Response$2 as Response, cycle$1_cycle as cycle, responseSchema$2 as responseSchema };
|
|
1108
1149
|
}
|
|
1109
1150
|
|
|
1110
|
-
type
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
}, undefined>;
|
|
1138
|
-
readonly epochs: v.ArraySchema<v.ObjectSchema<{
|
|
1139
|
-
readonly epoch_id: v.StringSchema<undefined>;
|
|
1140
|
-
readonly start_height: v.NumberSchema<undefined>;
|
|
1141
|
-
readonly end_height: v.NumberSchema<undefined>;
|
|
1142
|
-
readonly block_limit: v.ObjectSchema<{
|
|
1143
|
-
readonly write_length: v.NumberSchema<undefined>;
|
|
1144
|
-
readonly write_count: v.NumberSchema<undefined>;
|
|
1145
|
-
readonly read_length: v.NumberSchema<undefined>;
|
|
1146
|
-
readonly read_count: v.NumberSchema<undefined>;
|
|
1147
|
-
readonly runtime: v.NumberSchema<undefined>;
|
|
1148
|
-
}, undefined>;
|
|
1149
|
-
readonly network_epoch: v.NumberSchema<undefined>;
|
|
1150
|
-
}, undefined>, undefined>;
|
|
1151
|
-
readonly min_amount_ustx: v.NumberSchema<undefined>;
|
|
1152
|
-
readonly prepare_cycle_length: v.NumberSchema<undefined>;
|
|
1153
|
-
readonly reward_cycle_id: v.NumberSchema<undefined>;
|
|
1154
|
-
readonly reward_cycle_length: v.NumberSchema<undefined>;
|
|
1155
|
-
readonly rejection_votes_left_required: v.NullSchema<undefined>;
|
|
1156
|
-
readonly next_reward_cycle_in: v.NumberSchema<undefined>;
|
|
1157
|
-
readonly contract_versions: v.ArraySchema<v.ObjectSchema<{
|
|
1158
|
-
readonly contract_id: v.StringSchema<undefined>;
|
|
1159
|
-
readonly activation_burnchain_block_height: v.NumberSchema<undefined>;
|
|
1160
|
-
readonly first_reward_cycle_id: v.NumberSchema<undefined>;
|
|
1161
|
-
}, undefined>, undefined>;
|
|
1162
|
-
}, undefined>;
|
|
1163
|
-
type PoxDetailsResponse = v.InferOutput<typeof poxDetailsResponseSchema>;
|
|
1164
|
-
declare function poxDetails(args: Args$7): Promise<Result$1<PoxDetailsResponse>>;
|
|
1151
|
+
type FeePrioritiesResponse = {
|
|
1152
|
+
all: {
|
|
1153
|
+
no_priority: number;
|
|
1154
|
+
low_priority: number;
|
|
1155
|
+
medium_priority: number;
|
|
1156
|
+
high_priority: number;
|
|
1157
|
+
};
|
|
1158
|
+
token_transfer: {
|
|
1159
|
+
no_priority: number;
|
|
1160
|
+
low_priority: number;
|
|
1161
|
+
medium_priority: number;
|
|
1162
|
+
high_priority: number;
|
|
1163
|
+
};
|
|
1164
|
+
smart_contract: {
|
|
1165
|
+
no_priority: number;
|
|
1166
|
+
low_priority: number;
|
|
1167
|
+
medium_priority: number;
|
|
1168
|
+
high_priority: number;
|
|
1169
|
+
};
|
|
1170
|
+
contract_call: {
|
|
1171
|
+
no_priority: number;
|
|
1172
|
+
low_priority: number;
|
|
1173
|
+
medium_priority: number;
|
|
1174
|
+
high_priority: number;
|
|
1175
|
+
};
|
|
1176
|
+
};
|
|
1177
|
+
declare function transactionFeePriorities(opts: ApiRequestOptions): Promise<Result$1<FeePrioritiesResponse, SafeError<"FetchFeePrioritiesError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
1165
1178
|
|
|
1166
|
-
|
|
1167
|
-
declare
|
|
1168
|
-
|
|
1179
|
+
type transactionFeePriorities$1_FeePrioritiesResponse = FeePrioritiesResponse;
|
|
1180
|
+
declare const transactionFeePriorities$1_transactionFeePriorities: typeof transactionFeePriorities;
|
|
1181
|
+
declare namespace transactionFeePriorities$1 {
|
|
1182
|
+
export { type transactionFeePriorities$1_FeePrioritiesResponse as FeePrioritiesResponse, transactionFeePriorities$1_transactionFeePriorities as transactionFeePriorities };
|
|
1169
1183
|
}
|
|
1170
1184
|
|
|
1171
1185
|
declare const CoreApiResponseSchema: v.ObjectSchema<{
|
|
@@ -1193,21 +1207,21 @@ declare namespace coreApi$1 {
|
|
|
1193
1207
|
export { type coreApi$1_CoreApiResponse as CoreApiResponse, coreApi$1_coreApi as coreApi };
|
|
1194
1208
|
}
|
|
1195
1209
|
|
|
1196
|
-
type Args$
|
|
1210
|
+
type Args$a = {
|
|
1197
1211
|
address: string;
|
|
1198
1212
|
stacking?: boolean;
|
|
1199
1213
|
} & ApiRequestOptions;
|
|
1200
|
-
declare function stx(opts: Args$
|
|
1214
|
+
declare function stx(opts: Args$a): Promise<Result$1<any>>;
|
|
1201
1215
|
|
|
1202
1216
|
declare const stx$1_stx: typeof stx;
|
|
1203
1217
|
declare namespace stx$1 {
|
|
1204
|
-
export { type Args$
|
|
1218
|
+
export { type Args$a as Args, stx$1_stx as stx };
|
|
1205
1219
|
}
|
|
1206
1220
|
|
|
1207
|
-
type Args$
|
|
1221
|
+
type Args$9 = {
|
|
1208
1222
|
heightOrHash: string | number;
|
|
1209
1223
|
} & ApiRequestOptions;
|
|
1210
|
-
declare const responseSchema$
|
|
1224
|
+
declare const responseSchema$1: v.ObjectSchema<{
|
|
1211
1225
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
1212
1226
|
readonly height: v.NumberSchema<undefined>;
|
|
1213
1227
|
readonly hash: v.StringSchema<undefined>;
|
|
@@ -1228,69 +1242,44 @@ declare const responseSchema$2: v.ObjectSchema<{
|
|
|
1228
1242
|
readonly execution_cost_write_count: v.NumberSchema<undefined>;
|
|
1229
1243
|
readonly execution_cost_write_length: v.NumberSchema<undefined>;
|
|
1230
1244
|
}, undefined>;
|
|
1231
|
-
type Response$
|
|
1232
|
-
declare function getBlock(opts: Args$
|
|
1245
|
+
type Response$1 = v.InferOutput<typeof responseSchema$1>;
|
|
1246
|
+
declare function getBlock(opts: Args$9): Promise<Result$1<Response$1, SafeError<"FetchBlockError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
1233
1247
|
|
|
1234
1248
|
declare const getBlock$1_getBlock: typeof getBlock;
|
|
1235
1249
|
declare namespace getBlock$1 {
|
|
1236
|
-
export { type Args$
|
|
1250
|
+
export { type Args$9 as Args, type Response$1 as Response, getBlock$1_getBlock as getBlock, responseSchema$1 as responseSchema };
|
|
1237
1251
|
}
|
|
1238
1252
|
|
|
1239
|
-
type Args$
|
|
1253
|
+
type Args$8 = {
|
|
1240
1254
|
principal: string;
|
|
1241
1255
|
} & ApiRequestOptions;
|
|
1242
|
-
declare const responseSchema
|
|
1256
|
+
declare const responseSchema: v.ObjectSchema<{
|
|
1243
1257
|
readonly last_mempool_tx_nonce: v.NullableSchema<v.NumberSchema<undefined>, never>;
|
|
1244
1258
|
readonly last_executed_tx_nonce: v.NullableSchema<v.NumberSchema<undefined>, never>;
|
|
1245
1259
|
readonly possible_next_nonce: v.NumberSchema<undefined>;
|
|
1246
1260
|
readonly detected_missing_nonces: v.ArraySchema<v.NumberSchema<undefined>, undefined>;
|
|
1247
1261
|
readonly detected_mempool_nonces: v.ArraySchema<v.NumberSchema<undefined>, undefined>;
|
|
1248
1262
|
}, undefined>;
|
|
1249
|
-
type Response
|
|
1250
|
-
declare function latestNonce(opts: Args$
|
|
1263
|
+
type Response = v.InferOutput<typeof responseSchema>;
|
|
1264
|
+
declare function latestNonce(opts: Args$8): Promise<Result$1<Response, SafeError<"FetchLatestNonceError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
1251
1265
|
|
|
1266
|
+
type latestNonce$1_Response = Response;
|
|
1252
1267
|
declare const latestNonce$1_latestNonce: typeof latestNonce;
|
|
1268
|
+
declare const latestNonce$1_responseSchema: typeof responseSchema;
|
|
1253
1269
|
declare namespace latestNonce$1 {
|
|
1254
|
-
export { type Args$
|
|
1270
|
+
export { type Args$8 as Args, type latestNonce$1_Response as Response, latestNonce$1_latestNonce as latestNonce, latestNonce$1_responseSchema as responseSchema };
|
|
1255
1271
|
}
|
|
1256
1272
|
|
|
1257
|
-
type Args$
|
|
1273
|
+
type Args$7 = {
|
|
1258
1274
|
principal: string;
|
|
1259
1275
|
unanchored?: boolean;
|
|
1260
1276
|
untilBlock?: number;
|
|
1261
1277
|
} & ApiRequestOptions;
|
|
1262
|
-
declare
|
|
1263
|
-
readonly stx: v.ObjectSchema<{
|
|
1264
|
-
readonly balance: v.StringSchema<undefined>;
|
|
1265
|
-
readonly total_sent: v.StringSchema<undefined>;
|
|
1266
|
-
readonly total_received: v.StringSchema<undefined>;
|
|
1267
|
-
readonly total_fees_sent: v.StringSchema<undefined>;
|
|
1268
|
-
readonly total_miner_rewards_received: v.StringSchema<undefined>;
|
|
1269
|
-
readonly lock_tx_id: v.StringSchema<undefined>;
|
|
1270
|
-
readonly locked: v.StringSchema<undefined>;
|
|
1271
|
-
readonly lock_height: v.NumberSchema<undefined>;
|
|
1272
|
-
readonly burnchain_lock_height: v.NumberSchema<undefined>;
|
|
1273
|
-
readonly burnchain_unlock_height: v.NumberSchema<undefined>;
|
|
1274
|
-
}, undefined>;
|
|
1275
|
-
readonly fungible_tokens: v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
1276
|
-
readonly balance: v.StringSchema<undefined>;
|
|
1277
|
-
readonly total_sent: v.StringSchema<undefined>;
|
|
1278
|
-
readonly total_received: v.StringSchema<undefined>;
|
|
1279
|
-
}, undefined>, undefined>;
|
|
1280
|
-
readonly non_fungible_tokens: v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
|
|
1281
|
-
readonly count: v.StringSchema<undefined>;
|
|
1282
|
-
readonly total_sent: v.StringSchema<undefined>;
|
|
1283
|
-
readonly total_received: v.StringSchema<undefined>;
|
|
1284
|
-
}, undefined>, undefined>;
|
|
1285
|
-
}, undefined>;
|
|
1286
|
-
type Response = v.InferOutput<typeof responseSchema>;
|
|
1287
|
-
declare function balances(opts: Args$3): Promise<Result$1<Response, SafeError<"FetchBalancesError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
1278
|
+
declare function balances(opts: Args$7): Promise<Result$1<OperationResponse["get_account_balance"], SafeError<"FetchBalancesError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
1288
1279
|
|
|
1289
|
-
type balances$1_Response = Response;
|
|
1290
1280
|
declare const balances$1_balances: typeof balances;
|
|
1291
|
-
declare const balances$1_responseSchema: typeof responseSchema;
|
|
1292
1281
|
declare namespace balances$1 {
|
|
1293
|
-
export { type Args$
|
|
1282
|
+
export { type Args$7 as Args, balances$1_balances as balances };
|
|
1294
1283
|
}
|
|
1295
1284
|
|
|
1296
1285
|
declare const accounts: {
|
|
@@ -1298,37 +1287,36 @@ declare const accounts: {
|
|
|
1298
1287
|
latestNonce: typeof latestNonce;
|
|
1299
1288
|
};
|
|
1300
1289
|
|
|
1301
|
-
declare const index$
|
|
1302
|
-
declare namespace index$
|
|
1303
|
-
export { balances$1 as Balances, latestNonce$1 as LatestNonce, index$
|
|
1290
|
+
declare const index$e_accounts: typeof accounts;
|
|
1291
|
+
declare namespace index$e {
|
|
1292
|
+
export { balances$1 as Balances, latestNonce$1 as LatestNonce, index$e_accounts as accounts };
|
|
1304
1293
|
}
|
|
1305
1294
|
|
|
1306
1295
|
declare const blocks: {
|
|
1307
1296
|
getBlock: typeof getBlock;
|
|
1308
1297
|
};
|
|
1309
1298
|
|
|
1310
|
-
declare const index$
|
|
1311
|
-
declare namespace index$
|
|
1312
|
-
export { getBlock$1 as GetBlock, index$
|
|
1299
|
+
declare const index$d_blocks: typeof blocks;
|
|
1300
|
+
declare namespace index$d {
|
|
1301
|
+
export { getBlock$1 as GetBlock, index$d_blocks as blocks };
|
|
1313
1302
|
}
|
|
1314
1303
|
|
|
1315
1304
|
declare const faucets: {
|
|
1316
1305
|
stx: typeof stx;
|
|
1317
1306
|
};
|
|
1318
1307
|
|
|
1319
|
-
declare const index$
|
|
1320
|
-
declare namespace index$
|
|
1321
|
-
export { stx$1 as Stx, index$
|
|
1308
|
+
declare const index$c_faucets: typeof faucets;
|
|
1309
|
+
declare namespace index$c {
|
|
1310
|
+
export { stx$1 as Stx, index$c_faucets as faucets };
|
|
1322
1311
|
}
|
|
1323
1312
|
|
|
1324
1313
|
declare const info: {
|
|
1325
1314
|
coreApi: typeof coreApi;
|
|
1326
|
-
poxDetails: typeof poxDetails;
|
|
1327
1315
|
};
|
|
1328
1316
|
|
|
1329
|
-
declare const index$
|
|
1330
|
-
declare namespace index$
|
|
1331
|
-
export { coreApi$1 as CoreApi,
|
|
1317
|
+
declare const index$b_info: typeof info;
|
|
1318
|
+
declare namespace index$b {
|
|
1319
|
+
export { coreApi$1 as CoreApi, index$b_info as info };
|
|
1332
1320
|
}
|
|
1333
1321
|
|
|
1334
1322
|
declare const proofOfTransfer: {
|
|
@@ -1339,28 +1327,38 @@ declare const proofOfTransfer: {
|
|
|
1339
1327
|
stackersForSignerInCycle: typeof stackersForSignerInCycle;
|
|
1340
1328
|
};
|
|
1341
1329
|
|
|
1342
|
-
declare const index$
|
|
1343
|
-
declare namespace index$
|
|
1344
|
-
export { cycle$1 as Cycle, cycles$1 as Cycles, signerInCycle$1 as SignerInCycle, signersInCycle$1 as SignersInCycle, stackersForSignerInCycle$1 as StackersForSignerInCycle, index$
|
|
1330
|
+
declare const index$a_proofOfTransfer: typeof proofOfTransfer;
|
|
1331
|
+
declare namespace index$a {
|
|
1332
|
+
export { cycle$1 as Cycle, cycles$1 as Cycles, signerInCycle$1 as SignerInCycle, signersInCycle$1 as SignersInCycle, stackersForSignerInCycle$1 as StackersForSignerInCycle, index$a_proofOfTransfer as proofOfTransfer };
|
|
1345
1333
|
}
|
|
1346
1334
|
|
|
1347
1335
|
declare const stackingPool: {
|
|
1348
1336
|
members: typeof members;
|
|
1349
1337
|
};
|
|
1350
1338
|
|
|
1351
|
-
declare const index$
|
|
1352
|
-
declare namespace index$
|
|
1353
|
-
export { members$1 as Members, index$
|
|
1339
|
+
declare const index$9_stackingPool: typeof stackingPool;
|
|
1340
|
+
declare namespace index$9 {
|
|
1341
|
+
export { members$1 as Members, index$9_stackingPool as stackingPool };
|
|
1354
1342
|
}
|
|
1355
1343
|
|
|
1356
1344
|
declare const transactions: {
|
|
1357
1345
|
addressTransactions: typeof addressTransactions;
|
|
1358
1346
|
getTransaction: typeof getTransaction;
|
|
1347
|
+
mempoolTransactions: typeof mempoolTransactions;
|
|
1359
1348
|
};
|
|
1360
1349
|
|
|
1361
|
-
declare const index$
|
|
1362
|
-
declare namespace index$
|
|
1363
|
-
export { addressTransactions$1 as AddressTransactions, schemas as Common, getTransaction$1 as GetTransaction, index$
|
|
1350
|
+
declare const index$8_transactions: typeof transactions;
|
|
1351
|
+
declare namespace index$8 {
|
|
1352
|
+
export { addressTransactions$1 as AddressTransactions, schemas as Common, getTransaction$1 as GetTransaction, mempoolTransactions$1 as MempoolTransactions, index$8_transactions as transactions };
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
declare const mempool: {
|
|
1356
|
+
transactionFeePriorities: typeof transactionFeePriorities;
|
|
1357
|
+
};
|
|
1358
|
+
|
|
1359
|
+
declare const index$7_mempool: typeof mempool;
|
|
1360
|
+
declare namespace index$7 {
|
|
1361
|
+
export { transactionFeePriorities$1 as TransactionFeePriorities, index$7_mempool as mempool };
|
|
1364
1362
|
}
|
|
1365
1363
|
|
|
1366
1364
|
declare const stacksApi: {
|
|
@@ -1376,7 +1374,9 @@ declare const stacksApi: {
|
|
|
1376
1374
|
};
|
|
1377
1375
|
info: {
|
|
1378
1376
|
coreApi: typeof coreApi;
|
|
1379
|
-
|
|
1377
|
+
};
|
|
1378
|
+
mempool: {
|
|
1379
|
+
transactionFeePriorities: typeof transactionFeePriorities;
|
|
1380
1380
|
};
|
|
1381
1381
|
proofOfTransfer: {
|
|
1382
1382
|
cycle: typeof cycle;
|
|
@@ -1391,42 +1391,41 @@ declare const stacksApi: {
|
|
|
1391
1391
|
transactions: {
|
|
1392
1392
|
addressTransactions: typeof addressTransactions;
|
|
1393
1393
|
getTransaction: typeof getTransaction;
|
|
1394
|
+
mempoolTransactions: typeof mempoolTransactions;
|
|
1394
1395
|
};
|
|
1395
1396
|
};
|
|
1396
1397
|
|
|
1397
|
-
declare const index$
|
|
1398
|
-
declare namespace index$
|
|
1399
|
-
export { index$
|
|
1398
|
+
declare const index$6_stacksApi: typeof stacksApi;
|
|
1399
|
+
declare namespace index$6 {
|
|
1400
|
+
export { index$e as Accounts, index$d as Blocks, index$c as Faucets, index$b as Info, index$7 as Mempool, index$a as ProofOfTransfer, index$9 as StackingPool, index$8 as Transactions, index$6_stacksApi as stacksApi };
|
|
1400
1401
|
}
|
|
1401
1402
|
|
|
1402
|
-
type Args$
|
|
1403
|
+
type Args$6 = {
|
|
1403
1404
|
sender: string;
|
|
1404
1405
|
arguments: string[];
|
|
1405
1406
|
contractAddress: string;
|
|
1406
1407
|
contractName: string;
|
|
1407
1408
|
functionName: string;
|
|
1408
1409
|
} & ApiRequestOptions;
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
readonly okay: v.LiteralSchema<false, undefined>;
|
|
1417
|
-
readonly cause: v.UnknownSchema;
|
|
1418
|
-
}, undefined>], undefined>;
|
|
1419
|
-
type ReadOnlyResponse = v.InferOutput<typeof readOnlyResponseSchema>;
|
|
1420
|
-
declare function readOnly(args: Args$2): Promise<Result$1<ReadOnlyResponse>>;
|
|
1421
|
-
|
|
1422
|
-
type readOnly$1_ReadOnlyResponse = ReadOnlyResponse;
|
|
1423
|
-
declare const readOnly$1_readOnly: typeof readOnly;
|
|
1424
|
-
declare const readOnly$1_readOnlyResponseSchema: typeof readOnlyResponseSchema;
|
|
1425
|
-
declare namespace readOnly$1 {
|
|
1426
|
-
export { type Args$2 as Args, type readOnly$1_ReadOnlyResponse as ReadOnlyResponse, readOnly$1_readOnly as readOnly, readOnly$1_readOnlyResponseSchema as readOnlyResponseSchema };
|
|
1410
|
+
interface ReadOnlyContractCallSuccessResponse {
|
|
1411
|
+
okay: true;
|
|
1412
|
+
result: string;
|
|
1413
|
+
}
|
|
1414
|
+
interface ReadOnlyContractCallFailResponse {
|
|
1415
|
+
okay: false;
|
|
1416
|
+
cause: string;
|
|
1427
1417
|
}
|
|
1418
|
+
type ReadOnlyContractCallResponse = ReadOnlyContractCallSuccessResponse | ReadOnlyContractCallFailResponse;
|
|
1419
|
+
type ReadOnlyResponse = ReadOnlyContractCallResponse;
|
|
1420
|
+
declare function readOnly$1(args: Args$6): Promise<Result$1<ReadOnlyResponse>>;
|
|
1428
1421
|
|
|
1429
|
-
type
|
|
1422
|
+
type readOnly$2_ReadOnlyContractCallResponse = ReadOnlyContractCallResponse;
|
|
1423
|
+
type readOnly$2_ReadOnlyResponse = ReadOnlyResponse;
|
|
1424
|
+
declare namespace readOnly$2 {
|
|
1425
|
+
export { type Args$6 as Args, type readOnly$2_ReadOnlyContractCallResponse as ReadOnlyContractCallResponse, type readOnly$2_ReadOnlyResponse as ReadOnlyResponse, readOnly$1 as readOnly };
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
type Args$5 = {
|
|
1430
1429
|
contractAddress: string;
|
|
1431
1430
|
contractName: string;
|
|
1432
1431
|
mapName: string;
|
|
@@ -1446,34 +1445,200 @@ declare const mapEntryResponseSchema: v.ObjectSchema<{
|
|
|
1446
1445
|
readonly proof: v.OptionalSchema<v.StringSchema<undefined>, never>;
|
|
1447
1446
|
}, undefined>;
|
|
1448
1447
|
type MapEntryResponse = v.InferOutput<typeof mapEntryResponseSchema>;
|
|
1449
|
-
declare function mapEntry(args: Args$
|
|
1448
|
+
declare function mapEntry(args: Args$5): Promise<Result$1<MapEntryResponse>>;
|
|
1450
1449
|
|
|
1451
1450
|
type mapEntry$1_MapEntryResponse = MapEntryResponse;
|
|
1452
1451
|
declare const mapEntry$1_mapEntry: typeof mapEntry;
|
|
1453
1452
|
declare namespace mapEntry$1 {
|
|
1454
|
-
export { type Args$
|
|
1453
|
+
export { type Args$5 as Args, type mapEntry$1_MapEntryResponse as MapEntryResponse, mapEntry$1_mapEntry as mapEntry };
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
type Args$4 = ApiRequestOptions;
|
|
1457
|
+
/**
|
|
1458
|
+
* Get Proof of Transfer (PoX) information
|
|
1459
|
+
*/
|
|
1460
|
+
interface CoreNodePoxResponse {
|
|
1461
|
+
/**
|
|
1462
|
+
* The contract identifier for the PoX contract
|
|
1463
|
+
*/
|
|
1464
|
+
contract_id: string;
|
|
1465
|
+
/**
|
|
1466
|
+
* The first burn block evaluated in this Stacks chain
|
|
1467
|
+
*/
|
|
1468
|
+
first_burnchain_block_height: number;
|
|
1469
|
+
/**
|
|
1470
|
+
* The latest Bitcoin chain block height
|
|
1471
|
+
*/
|
|
1472
|
+
current_burnchain_block_height: number;
|
|
1473
|
+
/**
|
|
1474
|
+
* The threshold of stacking participation that must be reached for PoX to
|
|
1475
|
+
* activate in any cycle
|
|
1476
|
+
*/
|
|
1477
|
+
pox_activation_threshold_ustx: number;
|
|
1478
|
+
/**
|
|
1479
|
+
* The fraction of liquid STX that must vote to reject PoX in order to prevent
|
|
1480
|
+
* the next reward cycle from activating.
|
|
1481
|
+
*/
|
|
1482
|
+
rejection_fraction: number;
|
|
1483
|
+
/**
|
|
1484
|
+
* The length in burn blocks of the reward phase
|
|
1485
|
+
*/
|
|
1486
|
+
reward_phase_block_length: number;
|
|
1487
|
+
/**
|
|
1488
|
+
* The length in burn blocks of the prepare phase
|
|
1489
|
+
*/
|
|
1490
|
+
prepare_phase_block_length: number;
|
|
1491
|
+
/**
|
|
1492
|
+
* The number of reward slots in a reward cycle
|
|
1493
|
+
*/
|
|
1494
|
+
reward_slots: number;
|
|
1495
|
+
/**
|
|
1496
|
+
* The current total amount of liquid microstacks.
|
|
1497
|
+
*/
|
|
1498
|
+
total_liquid_supply_ustx: number;
|
|
1499
|
+
/**
|
|
1500
|
+
* The length in burn blocks of a whole PoX cycle (reward phase and prepare
|
|
1501
|
+
* phase)
|
|
1502
|
+
*/
|
|
1503
|
+
reward_cycle_length: number;
|
|
1504
|
+
current_cycle: {
|
|
1505
|
+
/**
|
|
1506
|
+
* The reward cycle number
|
|
1507
|
+
*/
|
|
1508
|
+
id: number;
|
|
1509
|
+
/**
|
|
1510
|
+
* The threshold amount for obtaining a slot in this reward cycle.
|
|
1511
|
+
*/
|
|
1512
|
+
min_threshold_ustx: number;
|
|
1513
|
+
/**
|
|
1514
|
+
* The total amount of stacked microstacks in this reward cycle.
|
|
1515
|
+
*/
|
|
1516
|
+
stacked_ustx: number;
|
|
1517
|
+
/**
|
|
1518
|
+
* Whether or not PoX is active during this reward cycle.
|
|
1519
|
+
*/
|
|
1520
|
+
is_pox_active: boolean;
|
|
1521
|
+
};
|
|
1522
|
+
next_cycle: {
|
|
1523
|
+
/**
|
|
1524
|
+
* The reward cycle number
|
|
1525
|
+
*/
|
|
1526
|
+
id: number;
|
|
1527
|
+
/**
|
|
1528
|
+
* The threshold amount for obtaining a slot in this reward cycle.
|
|
1529
|
+
*/
|
|
1530
|
+
min_threshold_ustx: number;
|
|
1531
|
+
/**
|
|
1532
|
+
* The total amount of stacked microstacks in this reward cycle.
|
|
1533
|
+
*/
|
|
1534
|
+
stacked_ustx: number;
|
|
1535
|
+
/**
|
|
1536
|
+
* The minimum amount that can be used to submit a `stack-stx` call.
|
|
1537
|
+
*/
|
|
1538
|
+
min_increment_ustx: number;
|
|
1539
|
+
/**
|
|
1540
|
+
* The burn block height when the prepare phase for this cycle begins. Any
|
|
1541
|
+
* eligible stacks must be stacked before this block.
|
|
1542
|
+
*/
|
|
1543
|
+
prepare_phase_start_block_height: number;
|
|
1544
|
+
/**
|
|
1545
|
+
* The number of burn blocks until the prepare phase for this cycle starts.
|
|
1546
|
+
* If the prepare phase for this cycle already started, this value will be
|
|
1547
|
+
* negative.
|
|
1548
|
+
*/
|
|
1549
|
+
blocks_until_prepare_phase: number;
|
|
1550
|
+
/**
|
|
1551
|
+
* The burn block height when the reward phase for this cycle begins. Any
|
|
1552
|
+
* eligible stacks must be stacked before this block.
|
|
1553
|
+
*/
|
|
1554
|
+
reward_phase_start_block_height: number;
|
|
1555
|
+
/**
|
|
1556
|
+
* The number of burn blocks until this reward phase starts.
|
|
1557
|
+
*/
|
|
1558
|
+
blocks_until_reward_phase: number;
|
|
1559
|
+
/**
|
|
1560
|
+
* The remaining amount of liquid STX that must vote to reject the next
|
|
1561
|
+
* reward cycle to prevent the next reward cycle from activating.
|
|
1562
|
+
*/
|
|
1563
|
+
ustx_until_pox_rejection: number;
|
|
1564
|
+
};
|
|
1565
|
+
/**
|
|
1566
|
+
* @deprecated
|
|
1567
|
+
* The active reward cycle number
|
|
1568
|
+
*/
|
|
1569
|
+
reward_cycle_id: number;
|
|
1570
|
+
/**
|
|
1571
|
+
* @deprecated
|
|
1572
|
+
*/
|
|
1573
|
+
min_amount_ustx: number;
|
|
1574
|
+
/**
|
|
1575
|
+
* @deprecated
|
|
1576
|
+
*/
|
|
1577
|
+
prepare_cycle_length: number;
|
|
1578
|
+
/**
|
|
1579
|
+
* @deprecated
|
|
1580
|
+
*/
|
|
1581
|
+
rejection_votes_left_required: number;
|
|
1582
|
+
/**
|
|
1583
|
+
* Versions of each PoX
|
|
1584
|
+
*/
|
|
1585
|
+
contract_versions: {
|
|
1586
|
+
/**
|
|
1587
|
+
* The contract identifier for the PoX contract
|
|
1588
|
+
*/
|
|
1589
|
+
contract_id: string;
|
|
1590
|
+
/**
|
|
1591
|
+
* The burn block height at which this version of PoX is activated
|
|
1592
|
+
*/
|
|
1593
|
+
activation_burnchain_block_height: number;
|
|
1594
|
+
/**
|
|
1595
|
+
* The first reward cycle number that uses this version of PoX
|
|
1596
|
+
*/
|
|
1597
|
+
first_reward_cycle_id: number;
|
|
1598
|
+
}[];
|
|
1599
|
+
}
|
|
1600
|
+
type PoxDetailsResponse = CoreNodePoxResponse;
|
|
1601
|
+
declare function poxDetails(args: Args$4): Promise<Result$1<PoxDetailsResponse>>;
|
|
1602
|
+
|
|
1603
|
+
type poxDetails$1_CoreNodePoxResponse = CoreNodePoxResponse;
|
|
1604
|
+
type poxDetails$1_PoxDetailsResponse = PoxDetailsResponse;
|
|
1605
|
+
declare const poxDetails$1_poxDetails: typeof poxDetails;
|
|
1606
|
+
declare namespace poxDetails$1 {
|
|
1607
|
+
export { type poxDetails$1_CoreNodePoxResponse as CoreNodePoxResponse, type poxDetails$1_PoxDetailsResponse as PoxDetailsResponse, poxDetails$1_poxDetails as poxDetails };
|
|
1455
1608
|
}
|
|
1456
1609
|
|
|
1457
1610
|
declare const smartContracts: {
|
|
1458
1611
|
mapEntry: typeof mapEntry;
|
|
1459
|
-
readOnly: typeof readOnly;
|
|
1612
|
+
readOnly: typeof readOnly$1;
|
|
1460
1613
|
};
|
|
1461
1614
|
|
|
1462
|
-
declare const index$
|
|
1463
|
-
declare namespace index$
|
|
1464
|
-
export { mapEntry$1 as MapEntry, readOnly$
|
|
1615
|
+
declare const index$5_smartContracts: typeof smartContracts;
|
|
1616
|
+
declare namespace index$5 {
|
|
1617
|
+
export { mapEntry$1 as MapEntry, readOnly$2 as ReadOnly, index$5_smartContracts as smartContracts };
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
declare const pox: {
|
|
1621
|
+
poxDetails: typeof poxDetails;
|
|
1622
|
+
};
|
|
1623
|
+
|
|
1624
|
+
declare const index$4_pox: typeof pox;
|
|
1625
|
+
declare namespace index$4 {
|
|
1626
|
+
export { poxDetails$1 as PoxDetails, index$4_pox as pox };
|
|
1465
1627
|
}
|
|
1466
1628
|
|
|
1467
1629
|
declare const stacksRpcApi: {
|
|
1630
|
+
pox: {
|
|
1631
|
+
poxDetails: typeof poxDetails;
|
|
1632
|
+
};
|
|
1468
1633
|
smartContracts: {
|
|
1469
1634
|
mapEntry: typeof mapEntry;
|
|
1470
|
-
readOnly: typeof readOnly;
|
|
1635
|
+
readOnly: typeof readOnly$1;
|
|
1471
1636
|
};
|
|
1472
1637
|
};
|
|
1473
1638
|
|
|
1474
|
-
declare const
|
|
1475
|
-
declare namespace index {
|
|
1476
|
-
export { index$
|
|
1639
|
+
declare const index$3_stacksRpcApi: typeof stacksRpcApi;
|
|
1640
|
+
declare namespace index$3 {
|
|
1641
|
+
export { index$4 as Pox, index$5 as SmartContracts, index$3_stacksRpcApi as stacksRpcApi };
|
|
1477
1642
|
}
|
|
1478
1643
|
|
|
1479
1644
|
type Identifier = {
|
|
@@ -1483,7 +1648,7 @@ type Identifier = {
|
|
|
1483
1648
|
type: "publicKey";
|
|
1484
1649
|
signerPublicKey: string;
|
|
1485
1650
|
};
|
|
1486
|
-
type Args = {
|
|
1651
|
+
type Args$3 = {
|
|
1487
1652
|
identifier: Identifier;
|
|
1488
1653
|
} & {
|
|
1489
1654
|
cycleNumber: number;
|
|
@@ -1491,7 +1656,7 @@ type Args = {
|
|
|
1491
1656
|
/**
|
|
1492
1657
|
* Return the total locked amount for a signer in a PoX cycle.
|
|
1493
1658
|
*/
|
|
1494
|
-
declare function getSignerStackedAmount(args: Args): Promise<Result$1<bigint, SafeError<"SignerNotFound" | string>>>;
|
|
1659
|
+
declare function getSignerStackedAmount(args: Args$3): Promise<Result$1<bigint, SafeError<"SignerNotFound" | string>>>;
|
|
1495
1660
|
|
|
1496
1661
|
declare const queries: {
|
|
1497
1662
|
getSignerStackedAmount: typeof getSignerStackedAmount;
|
|
@@ -1504,4 +1669,112 @@ type Options = {
|
|
|
1504
1669
|
declare function callRateLimitedApi<T>(fn: () => Promise<T>, options?: Options): Promise<T>;
|
|
1505
1670
|
declare function safeCallRateLimitedApi<T>(fn: () => Promise<Result$1<T>>, options?: Options): Promise<Result$1<T, SafeError<"MaxRetriesExceeded" | string>>>;
|
|
1506
1671
|
|
|
1507
|
-
|
|
1672
|
+
type Network = "mainnet" | "testnet";
|
|
1673
|
+
|
|
1674
|
+
type PoxAddr = OptionalCV<TupleCV<{
|
|
1675
|
+
version: BufferCV;
|
|
1676
|
+
hashbytes: BufferCV;
|
|
1677
|
+
}>>;
|
|
1678
|
+
|
|
1679
|
+
type Args$2 = {
|
|
1680
|
+
principal: string;
|
|
1681
|
+
network: Network;
|
|
1682
|
+
} & ApiRequestOptions;
|
|
1683
|
+
type GetCheckDelegationReturn = OptionalCV<TupleCV<{
|
|
1684
|
+
"amount-ustx": UIntCV;
|
|
1685
|
+
"delegated-to": PrincipalCV;
|
|
1686
|
+
"until-burn-ht": OptionalCV<UIntCV>;
|
|
1687
|
+
"pox-addr": OptionalCV<PoxAddr>;
|
|
1688
|
+
}>>;
|
|
1689
|
+
declare function getCheckDelegation({ principal, network, baseUrl, apiKeyConfig, }: Args$2): Promise<Result$1<GetCheckDelegationReturn>>;
|
|
1690
|
+
|
|
1691
|
+
type getCheckDelegation$1_GetCheckDelegationReturn = GetCheckDelegationReturn;
|
|
1692
|
+
declare const getCheckDelegation$1_getCheckDelegation: typeof getCheckDelegation;
|
|
1693
|
+
declare namespace getCheckDelegation$1 {
|
|
1694
|
+
export { type getCheckDelegation$1_GetCheckDelegationReturn as GetCheckDelegationReturn, getCheckDelegation$1_getCheckDelegation as getCheckDelegation };
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
type Args$1 = {
|
|
1698
|
+
principal: string;
|
|
1699
|
+
network: Network;
|
|
1700
|
+
} & ApiRequestOptions;
|
|
1701
|
+
type GetStackerInfoReturn = OptionalCV<TupleCV<{
|
|
1702
|
+
"pox-addr": PoxAddr;
|
|
1703
|
+
"lock-period": UIntCV;
|
|
1704
|
+
"first-reward-cycle": UIntCV;
|
|
1705
|
+
"reward-set-indexes": ListCV<UIntCV>;
|
|
1706
|
+
"delegated-to": OptionalCV<PrincipalCV>;
|
|
1707
|
+
}>>;
|
|
1708
|
+
declare function getStackerInfo({ principal, network, baseUrl, apiKeyConfig, }: Args$1): Promise<Result$1<GetStackerInfoReturn>>;
|
|
1709
|
+
|
|
1710
|
+
type getStackerInfo$1_GetStackerInfoReturn = GetStackerInfoReturn;
|
|
1711
|
+
declare const getStackerInfo$1_getStackerInfo: typeof getStackerInfo;
|
|
1712
|
+
declare namespace getStackerInfo$1 {
|
|
1713
|
+
export { type Args$1 as Args, type getStackerInfo$1_GetStackerInfoReturn as GetStackerInfoReturn, getStackerInfo$1_getStackerInfo as getStackerInfo };
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
type StackingStateKey = TupleCV<{
|
|
1717
|
+
stacker: PrincipalCV;
|
|
1718
|
+
}>;
|
|
1719
|
+
type StackingStateValue = TupleCV<{
|
|
1720
|
+
"pox-addr": TupleCV<{
|
|
1721
|
+
version: BufferCV;
|
|
1722
|
+
hashbytes: BufferCV;
|
|
1723
|
+
}>;
|
|
1724
|
+
"lock-period": UIntCV;
|
|
1725
|
+
"first-reward-cycle": UIntCV;
|
|
1726
|
+
"reward-set-indexes": ListCV<UIntCV>;
|
|
1727
|
+
"delegated-to": OptionalCV<PrincipalCV>;
|
|
1728
|
+
}>;
|
|
1729
|
+
type Args = {
|
|
1730
|
+
key: StackingStateKey;
|
|
1731
|
+
network: Network;
|
|
1732
|
+
} & ApiRequestOptions & ProofAndTip;
|
|
1733
|
+
declare function stackingState({ key, network, baseUrl, apiKeyConfig, proof, tip, }: Args): Promise<Result$1<{
|
|
1734
|
+
data: StackingStateValue;
|
|
1735
|
+
proof?: string;
|
|
1736
|
+
}>>;
|
|
1737
|
+
|
|
1738
|
+
type stackingState$1_Args = Args;
|
|
1739
|
+
type stackingState$1_StackingStateKey = StackingStateKey;
|
|
1740
|
+
type stackingState$1_StackingStateValue = StackingStateValue;
|
|
1741
|
+
declare const stackingState$1_stackingState: typeof stackingState;
|
|
1742
|
+
declare namespace stackingState$1 {
|
|
1743
|
+
export { type stackingState$1_Args as Args, type stackingState$1_StackingStateKey as StackingStateKey, type stackingState$1_StackingStateValue as StackingStateValue, stackingState$1_stackingState as stackingState };
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
declare const maps: {
|
|
1747
|
+
stackingState: typeof stackingState;
|
|
1748
|
+
};
|
|
1749
|
+
|
|
1750
|
+
declare const index$2_maps: typeof maps;
|
|
1751
|
+
declare namespace index$2 {
|
|
1752
|
+
export { stackingState$1 as StackingState, index$2_maps as maps };
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
declare const readOnly: {
|
|
1756
|
+
getStackerInfo: typeof getStackerInfo;
|
|
1757
|
+
getCheckDelegation: typeof getCheckDelegation;
|
|
1758
|
+
};
|
|
1759
|
+
|
|
1760
|
+
declare const index$1_readOnly: typeof readOnly;
|
|
1761
|
+
declare namespace index$1 {
|
|
1762
|
+
export { getCheckDelegation$1 as GetCheckDelegation, getStackerInfo$1 as GetStackerInfo, index$1_readOnly as readOnly };
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
declare const pox4Api: {
|
|
1766
|
+
maps: {
|
|
1767
|
+
stackingState: typeof stackingState;
|
|
1768
|
+
};
|
|
1769
|
+
readOnly: {
|
|
1770
|
+
getStackerInfo: typeof getStackerInfo;
|
|
1771
|
+
getCheckDelegation: typeof getCheckDelegation;
|
|
1772
|
+
};
|
|
1773
|
+
};
|
|
1774
|
+
|
|
1775
|
+
declare const index_pox4Api: typeof pox4Api;
|
|
1776
|
+
declare namespace index {
|
|
1777
|
+
export { index$2 as Maps, index$1 as ReadOnly, index_pox4Api as pox4Api };
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
export { index as Pox4Api, type Result$1 as Result, type SafeError, index$6 as StacksApi, index$3 as StacksRpcApi, callRateLimitedApi, error, pox4Api, queries, safeCall, safeCallRateLimitedApi, safePromise, stacksApi, stacksRpcApi, success };
|