@secretkeylabs/stacks-tools 0.4.0 → 0.5.0-5d800c5

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.d.cts 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;
@@ -23,6 +25,13 @@ type ApiRequestOptions = {
23
25
  baseUrl: string;
24
26
  apiKeyConfig?: ApiKeyConfig;
25
27
  };
28
+ type ProofAndTip = {
29
+ /**
30
+ * Returns object without the proof field when set to 0.
31
+ */
32
+ proof?: number;
33
+ tip?: "latest" | string;
34
+ };
26
35
  type ApiPaginationOptions = {
27
36
  /**
28
37
  * The number of items to return. Each endpoint has its own maximum allowed
@@ -33,6 +42,45 @@ type ApiPaginationOptions = {
33
42
  limit?: number;
34
43
  offset?: number;
35
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
+ }
36
84
 
37
85
  declare const baseTransactionSchema: v.ObjectSchema<{
38
86
  readonly tx_id: v.StringSchema<undefined>;
@@ -373,17 +421,17 @@ declare namespace schemas {
373
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 };
374
422
  }
375
423
 
376
- type Args$b = {
424
+ type Args$i = {
377
425
  transactionId: string;
378
426
  } & ApiRequestOptions;
379
- declare function getTransaction(args: Args$b): Promise<Result$1<Transaction>>;
427
+ declare function getTransaction(args: Args$i): Promise<Result$1<Transaction>>;
380
428
 
381
429
  declare const getTransaction$1_getTransaction: typeof getTransaction;
382
430
  declare namespace getTransaction$1 {
383
431
  export { getTransaction$1_getTransaction as getTransaction };
384
432
  }
385
433
 
386
- type Args$a = {
434
+ type Args$h = {
387
435
  address: string;
388
436
  } & ApiRequestOptions & ApiPaginationOptions;
389
437
  declare const resultSchema: v.ObjectSchema<{
@@ -865,7 +913,7 @@ declare const addressTransactionsResponseSchema: v.ObjectSchema<{
865
913
  readonly total: v.NumberSchema<undefined>;
866
914
  }, undefined>;
867
915
  type AddressTransactionsResponse = v.InferOutput<typeof addressTransactionsResponseSchema>;
868
- declare function addressTransactions(args: Args$a): Promise<Result$1<AddressTransactionsResponse, SafeError<"FetchAddressTransactionsError" | "ParseBodyError" | "ValidateDataError">>>;
916
+ declare function addressTransactions(args: Args$h): Promise<Result$1<AddressTransactionsResponse, SafeError<"FetchAddressTransactionsError" | "ParseBodyError" | "ValidateDataError">>>;
869
917
 
870
918
  type addressTransactions$1_AddressTransactionsResponse = AddressTransactionsResponse;
871
919
  type addressTransactions$1_Result = Result;
@@ -874,13 +922,13 @@ declare namespace addressTransactions$1 {
874
922
  export { type addressTransactions$1_AddressTransactionsResponse as AddressTransactionsResponse, type addressTransactions$1_Result as Result, type Results$3 as Results, addressTransactions$1_addressTransactions as addressTransactions };
875
923
  }
876
924
 
877
- type Options$1 = {
925
+ type Args$g = {
878
926
  poolPrincipal: string;
879
927
  afterBlock?: number;
880
928
  unanchored?: boolean;
881
929
  limit?: number;
882
930
  offset?: number;
883
- };
931
+ } & ApiRequestOptions & ApiPaginationOptions;
884
932
  declare const memberSchema: v.ObjectSchema<{
885
933
  readonly stacker: v.StringSchema<undefined>;
886
934
  readonly pox_addr: v.OptionalSchema<v.StringSchema<undefined>, never>;
@@ -904,7 +952,7 @@ declare const membersResponseSchema: v.ObjectSchema<{
904
952
  }, undefined>, undefined>;
905
953
  }, undefined>;
906
954
  type MembersResponse = v.InferOutput<typeof membersResponseSchema>;
907
- declare function members(opts: Options$1, apiOpts: ApiRequestOptions): Promise<Result$1<MembersResponse>>;
955
+ declare function members(args: Args$g): Promise<Result$1<MembersResponse>>;
908
956
 
909
957
  type members$1_Member = Member;
910
958
  type members$1_MembersResponse = MembersResponse;
@@ -912,37 +960,10 @@ declare const members$1_memberSchema: typeof memberSchema;
912
960
  declare const members$1_members: typeof members;
913
961
  declare const members$1_membersResponseSchema: typeof membersResponseSchema;
914
962
  declare namespace members$1 {
915
- export { type members$1_Member as Member, type members$1_MembersResponse as MembersResponse, type Options$1 as Options, members$1_memberSchema as memberSchema, members$1_members as members, members$1_membersResponseSchema as membersResponseSchema };
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 };
916
964
  }
917
965
 
918
- type Args$9 = {
919
- sender: string;
920
- arguments: string[];
921
- contractAddress: string;
922
- contractName: string;
923
- functionName: string;
924
- } & ApiRequestOptions;
925
- declare const readOnlyResponseSchema: v.VariantSchema<"okay", [v.ObjectSchema<{
926
- readonly okay: v.LiteralSchema<true, undefined>;
927
- /**
928
- * A Clarity value as a hex-encoded string.
929
- */
930
- readonly result: v.StringSchema<undefined>;
931
- }, undefined>, v.ObjectSchema<{
932
- readonly okay: v.LiteralSchema<false, undefined>;
933
- readonly cause: v.UnknownSchema;
934
- }, undefined>], undefined>;
935
- type ReadOnlyResponse = v.InferOutput<typeof readOnlyResponseSchema>;
936
- declare function readOnly(args: Args$9): Promise<Result$1<ReadOnlyResponse>>;
937
-
938
- type readOnly$1_ReadOnlyResponse = ReadOnlyResponse;
939
- declare const readOnly$1_readOnly: typeof readOnly;
940
- declare const readOnly$1_readOnlyResponseSchema: typeof readOnlyResponseSchema;
941
- declare namespace readOnly$1 {
942
- export { type Args$9 as Args, type readOnly$1_ReadOnlyResponse as ReadOnlyResponse, readOnly$1_readOnly as readOnly, readOnly$1_readOnlyResponseSchema as readOnlyResponseSchema };
943
- }
944
-
945
- type Args$8 = {
966
+ type Args$f = {
946
967
  cycleNumber: number;
947
968
  signerPublicKey: string;
948
969
  } & ApiRequestOptions & ApiPaginationOptions;
@@ -972,7 +993,7 @@ declare const stackersForSignerInCycleResponseSchema: v.ObjectSchema<{
972
993
  readonly total: v.NumberSchema<undefined>;
973
994
  }, undefined>;
974
995
  type StackersForSignerInCycleResponse = v.InferOutput<typeof stackersForSignerInCycleResponseSchema>;
975
- declare function stackersForSignerInCycle(opts: Args$8): Promise<Result$1<StackersForSignerInCycleResponse, SafeError<"FetchStackersForSignerInCycleError" | "ParseBodyError" | "ValidateDataError">>>;
996
+ declare function stackersForSignerInCycle(opts: Args$f): Promise<Result$1<StackersForSignerInCycleResponse, SafeError<"FetchStackersForSignerInCycleError" | "ParseBodyError" | "ValidateDataError">>>;
976
997
 
977
998
  type stackersForSignerInCycle$1_StackerInfo = StackerInfo;
978
999
  type stackersForSignerInCycle$1_StackersForSignerInCycleResponse = StackersForSignerInCycleResponse;
@@ -980,10 +1001,10 @@ declare const stackersForSignerInCycle$1_stackerInfoSchema: typeof stackerInfoSc
980
1001
  declare const stackersForSignerInCycle$1_stackersForSignerInCycle: typeof stackersForSignerInCycle;
981
1002
  declare const stackersForSignerInCycle$1_stackersForSignerInCycleResponseSchema: typeof stackersForSignerInCycleResponseSchema;
982
1003
  declare namespace stackersForSignerInCycle$1 {
983
- export { type Args$8 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 };
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 };
984
1005
  }
985
1006
 
986
- type Args$7 = {
1007
+ type Args$e = {
987
1008
  cycleNumber: number;
988
1009
  } & ApiRequestOptions & ApiPaginationOptions;
989
1010
  declare const signerSchema: v.ObjectSchema<{
@@ -1024,7 +1045,7 @@ declare const signersResponseSchema: v.ObjectSchema<{
1024
1045
  readonly total: v.NumberSchema<undefined>;
1025
1046
  }, undefined>;
1026
1047
  type SignersResponse = v.InferOutput<typeof signersResponseSchema>;
1027
- declare function signersInCycle(args: Args$7): Promise<Result$1<SignersResponse, SafeError<"FetchSignersError" | "ParseBodyError" | "ValidateDataError">>>;
1048
+ declare function signersInCycle(args: Args$e): Promise<Result$1<SignersResponse, SafeError<"FetchSignersError" | "ParseBodyError" | "ValidateDataError">>>;
1028
1049
 
1029
1050
  type signersInCycle$1_Signer = Signer;
1030
1051
  type signersInCycle$1_SignersResponse = SignersResponse;
@@ -1032,10 +1053,10 @@ declare const signersInCycle$1_signerSchema: typeof signerSchema;
1032
1053
  declare const signersInCycle$1_signersInCycle: typeof signersInCycle;
1033
1054
  declare const signersInCycle$1_signersResponseSchema: typeof signersResponseSchema;
1034
1055
  declare namespace signersInCycle$1 {
1035
- export { type Args$7 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 };
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 };
1036
1057
  }
1037
1058
 
1038
- type Args$6 = {
1059
+ type Args$d = {
1039
1060
  /**
1040
1061
  * The signers public key as a hex string, with or without a '0x' prefix.
1041
1062
  */
@@ -1053,16 +1074,16 @@ declare const signerInCycleResponseSchema: v.ObjectSchema<{
1053
1074
  readonly pooled_stacker_count: v.NumberSchema<undefined>;
1054
1075
  }, undefined>;
1055
1076
  type SignerInCycleResponse = v.InferOutput<typeof signerInCycleResponseSchema>;
1056
- declare function signerInCycle(args: Args$6): Promise<Result$1<SignerInCycleResponse>>;
1077
+ declare function signerInCycle(args: Args$d): Promise<Result$1<SignerInCycleResponse>>;
1057
1078
 
1058
1079
  type signerInCycle$1_SignerInCycleResponse = SignerInCycleResponse;
1059
1080
  declare const signerInCycle$1_signerInCycle: typeof signerInCycle;
1060
1081
  declare const signerInCycle$1_signerInCycleResponseSchema: typeof signerInCycleResponseSchema;
1061
1082
  declare namespace signerInCycle$1 {
1062
- export { type Args$6 as Args, type signerInCycle$1_SignerInCycleResponse as SignerInCycleResponse, signerInCycle$1_signerInCycle as signerInCycle, signerInCycle$1_signerInCycleResponseSchema as signerInCycleResponseSchema };
1083
+ export { type Args$d as Args, type signerInCycle$1_SignerInCycleResponse as SignerInCycleResponse, signerInCycle$1_signerInCycle as signerInCycle, signerInCycle$1_signerInCycleResponseSchema as signerInCycleResponseSchema };
1063
1084
  }
1064
1085
 
1065
- type Args$5 = ApiRequestOptions & ApiPaginationOptions;
1086
+ type Args$c = ApiRequestOptions & ApiPaginationOptions;
1066
1087
  declare const cycleInfoSchema: v.ObjectSchema<{
1067
1088
  readonly block_height: v.NumberSchema<undefined>;
1068
1089
  readonly index_block_hash: v.StringSchema<undefined>;
@@ -1095,7 +1116,7 @@ declare const cyclesResponseSchema: v.ObjectSchema<{
1095
1116
  readonly total: v.NumberSchema<undefined>;
1096
1117
  }, undefined>;
1097
1118
  type CyclesResponse = v.InferOutput<typeof cyclesResponseSchema>;
1098
- declare function cycles(args: Args$5): Promise<Result$1<CyclesResponse>>;
1119
+ declare function cycles(args: Args$c): Promise<Result$1<CyclesResponse>>;
1099
1120
 
1100
1121
  type cycles$1_CycleInfo = CycleInfo;
1101
1122
  type cycles$1_CyclesResponse = CyclesResponse;
@@ -1105,13 +1126,13 @@ declare const cycles$1_cycles: typeof cycles;
1105
1126
  declare const cycles$1_cyclesResponseSchema: typeof cyclesResponseSchema;
1106
1127
  declare const cycles$1_resultsSchema: typeof resultsSchema;
1107
1128
  declare namespace cycles$1 {
1108
- export { type Args$5 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 };
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 };
1109
1130
  }
1110
1131
 
1111
- type Args$4 = {
1132
+ type Args$b = {
1112
1133
  cycleNumber: number;
1113
1134
  } & ApiRequestOptions;
1114
- declare const responseSchema$3: v.ObjectSchema<{
1135
+ declare const responseSchema$2: v.ObjectSchema<{
1115
1136
  readonly block_height: v.NumberSchema<undefined>;
1116
1137
  readonly index_block_hash: v.StringSchema<undefined>;
1117
1138
  readonly cycle_number: v.NumberSchema<undefined>;
@@ -1119,73 +1140,12 @@ declare const responseSchema$3: v.ObjectSchema<{
1119
1140
  readonly total_stacked_amount: v.StringSchema<undefined>;
1120
1141
  readonly total_signers: v.NumberSchema<undefined>;
1121
1142
  }, undefined>;
1122
- type Response$3 = v.InferOutput<typeof responseSchema$3>;
1123
- declare function cycle(opts: Args$4): Promise<Result$1<Response$3, SafeError<"FetchCycleError" | "ParseBodyError" | "ValidateDataError">>>;
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">>>;
1124
1145
 
1125
1146
  declare const cycle$1_cycle: typeof cycle;
1126
1147
  declare namespace cycle$1 {
1127
- export { type Args$4 as Args, type Response$3 as Response, cycle$1_cycle as cycle, responseSchema$3 as responseSchema };
1128
- }
1129
-
1130
- type Args$3 = ApiRequestOptions;
1131
- declare const poxDetailsResponseSchema: v.ObjectSchema<{
1132
- readonly contract_id: v.StringSchema<undefined>;
1133
- readonly pox_activation_threshold_ustx: v.NumberSchema<undefined>;
1134
- readonly first_burnchain_block_height: v.NumberSchema<undefined>;
1135
- readonly current_burnchain_block_height: v.NumberSchema<undefined>;
1136
- readonly prepare_phase_block_length: v.NumberSchema<undefined>;
1137
- readonly reward_phase_block_length: v.NumberSchema<undefined>;
1138
- readonly reward_slots: v.NumberSchema<undefined>;
1139
- readonly rejection_fraction: v.NullSchema<undefined>;
1140
- readonly total_liquid_supply_ustx: v.NumberSchema<undefined>;
1141
- readonly current_cycle: v.ObjectSchema<{
1142
- readonly id: v.NumberSchema<undefined>;
1143
- readonly min_threshold_ustx: v.NumberSchema<undefined>;
1144
- readonly stacked_ustx: v.NumberSchema<undefined>;
1145
- readonly is_pox_active: v.BooleanSchema<undefined>;
1146
- }, undefined>;
1147
- readonly next_cycle: v.ObjectSchema<{
1148
- readonly id: v.NumberSchema<undefined>;
1149
- readonly min_threshold_ustx: v.NumberSchema<undefined>;
1150
- readonly min_increment_ustx: v.NumberSchema<undefined>;
1151
- readonly stacked_ustx: v.NumberSchema<undefined>;
1152
- readonly prepare_phase_start_block_height: v.NumberSchema<undefined>;
1153
- readonly blocks_until_prepare_phase: v.NumberSchema<undefined>;
1154
- readonly reward_phase_start_block_height: v.NumberSchema<undefined>;
1155
- readonly blocks_until_reward_phase: v.NumberSchema<undefined>;
1156
- readonly ustx_until_pox_rejection: v.NullSchema<undefined>;
1157
- }, undefined>;
1158
- readonly epochs: v.ArraySchema<v.ObjectSchema<{
1159
- readonly epoch_id: v.StringSchema<undefined>;
1160
- readonly start_height: v.NumberSchema<undefined>;
1161
- readonly end_height: v.NumberSchema<undefined>;
1162
- readonly block_limit: v.ObjectSchema<{
1163
- readonly write_length: v.NumberSchema<undefined>;
1164
- readonly write_count: v.NumberSchema<undefined>;
1165
- readonly read_length: v.NumberSchema<undefined>;
1166
- readonly read_count: v.NumberSchema<undefined>;
1167
- readonly runtime: v.NumberSchema<undefined>;
1168
- }, undefined>;
1169
- readonly network_epoch: v.NumberSchema<undefined>;
1170
- }, undefined>, undefined>;
1171
- readonly min_amount_ustx: v.NumberSchema<undefined>;
1172
- readonly prepare_cycle_length: v.NumberSchema<undefined>;
1173
- readonly reward_cycle_id: v.NumberSchema<undefined>;
1174
- readonly reward_cycle_length: v.NumberSchema<undefined>;
1175
- readonly rejection_votes_left_required: v.NullSchema<undefined>;
1176
- readonly next_reward_cycle_in: v.NumberSchema<undefined>;
1177
- readonly contract_versions: v.ArraySchema<v.ObjectSchema<{
1178
- readonly contract_id: v.StringSchema<undefined>;
1179
- readonly activation_burnchain_block_height: v.NumberSchema<undefined>;
1180
- readonly first_reward_cycle_id: v.NumberSchema<undefined>;
1181
- }, undefined>, undefined>;
1182
- }, undefined>;
1183
- type PoxDetailsResponse = v.InferOutput<typeof poxDetailsResponseSchema>;
1184
- declare function poxDetails(args: Args$3): Promise<Result$1<PoxDetailsResponse>>;
1185
-
1186
- declare const poxDetails$1_poxDetails: typeof poxDetails;
1187
- declare namespace poxDetails$1 {
1188
- export { poxDetails$1_poxDetails as poxDetails };
1148
+ export { type Args$b as Args, type Response$2 as Response, cycle$1_cycle as cycle, responseSchema$2 as responseSchema };
1189
1149
  }
1190
1150
 
1191
1151
  declare const CoreApiResponseSchema: v.ObjectSchema<{
@@ -1213,10 +1173,21 @@ declare namespace coreApi$1 {
1213
1173
  export { type coreApi$1_CoreApiResponse as CoreApiResponse, coreApi$1_coreApi as coreApi };
1214
1174
  }
1215
1175
 
1216
- type Args$2 = {
1176
+ type Args$a = {
1177
+ address: string;
1178
+ stacking?: boolean;
1179
+ } & ApiRequestOptions;
1180
+ declare function stx(opts: Args$a): Promise<Result$1<any>>;
1181
+
1182
+ declare const stx$1_stx: typeof stx;
1183
+ declare namespace stx$1 {
1184
+ export { type Args$a as Args, stx$1_stx as stx };
1185
+ }
1186
+
1187
+ type Args$9 = {
1217
1188
  heightOrHash: string | number;
1218
1189
  } & ApiRequestOptions;
1219
- declare const responseSchema$2: v.ObjectSchema<{
1190
+ declare const responseSchema$1: v.ObjectSchema<{
1220
1191
  readonly canonical: v.BooleanSchema<undefined>;
1221
1192
  readonly height: v.NumberSchema<undefined>;
1222
1193
  readonly hash: v.StringSchema<undefined>;
@@ -1237,112 +1208,44 @@ declare const responseSchema$2: v.ObjectSchema<{
1237
1208
  readonly execution_cost_write_count: v.NumberSchema<undefined>;
1238
1209
  readonly execution_cost_write_length: v.NumberSchema<undefined>;
1239
1210
  }, undefined>;
1240
- type Response$2 = v.InferOutput<typeof responseSchema$2>;
1241
- declare function getBlock(opts: Args$2): Promise<Result$1<Response$2, SafeError<"FetchBlockError" | "ParseBodyError" | "ValidateDataError">>>;
1211
+ type Response$1 = v.InferOutput<typeof responseSchema$1>;
1212
+ declare function getBlock(opts: Args$9): Promise<Result$1<Response$1, SafeError<"FetchBlockError" | "ParseBodyError" | "ValidateDataError">>>;
1242
1213
 
1243
1214
  declare const getBlock$1_getBlock: typeof getBlock;
1244
1215
  declare namespace getBlock$1 {
1245
- export { type Args$2 as Args, type Response$2 as Response, getBlock$1_getBlock as getBlock, responseSchema$2 as responseSchema };
1216
+ export { type Args$9 as Args, type Response$1 as Response, getBlock$1_getBlock as getBlock, responseSchema$1 as responseSchema };
1246
1217
  }
1247
1218
 
1248
- type Args$1 = {
1219
+ type Args$8 = {
1249
1220
  principal: string;
1250
1221
  } & ApiRequestOptions;
1251
- declare const responseSchema$1: v.ObjectSchema<{
1222
+ declare const responseSchema: v.ObjectSchema<{
1252
1223
  readonly last_mempool_tx_nonce: v.NullableSchema<v.NumberSchema<undefined>, never>;
1253
1224
  readonly last_executed_tx_nonce: v.NullableSchema<v.NumberSchema<undefined>, never>;
1254
1225
  readonly possible_next_nonce: v.NumberSchema<undefined>;
1255
1226
  readonly detected_missing_nonces: v.ArraySchema<v.NumberSchema<undefined>, undefined>;
1256
1227
  readonly detected_mempool_nonces: v.ArraySchema<v.NumberSchema<undefined>, undefined>;
1257
1228
  }, undefined>;
1258
- type Response$1 = v.InferOutput<typeof responseSchema$1>;
1259
- declare function latestNonce(opts: Args$1): Promise<Result$1<Response$1, SafeError<"FetchLatestNonceError" | "ParseBodyError" | "ValidateDataError">>>;
1229
+ type Response = v.InferOutput<typeof responseSchema>;
1230
+ declare function latestNonce(opts: Args$8): Promise<Result$1<Response, SafeError<"FetchLatestNonceError" | "ParseBodyError" | "ValidateDataError">>>;
1260
1231
 
1232
+ type latestNonce$1_Response = Response;
1261
1233
  declare const latestNonce$1_latestNonce: typeof latestNonce;
1234
+ declare const latestNonce$1_responseSchema: typeof responseSchema;
1262
1235
  declare namespace latestNonce$1 {
1263
- export { type Args$1 as Args, type Response$1 as Response, latestNonce$1_latestNonce as latestNonce, responseSchema$1 as responseSchema };
1236
+ export { type Args$8 as Args, type latestNonce$1_Response as Response, latestNonce$1_latestNonce as latestNonce, latestNonce$1_responseSchema as responseSchema };
1264
1237
  }
1265
1238
 
1266
- type Args = {
1239
+ type Args$7 = {
1267
1240
  principal: string;
1268
1241
  unanchored?: boolean;
1269
1242
  untilBlock?: number;
1270
1243
  } & ApiRequestOptions;
1271
- declare const responseSchema: v.ObjectSchema<{
1272
- readonly stx: v.ObjectSchema<{
1273
- readonly balance: v.StringSchema<undefined>;
1274
- readonly total_sent: v.StringSchema<undefined>;
1275
- readonly total_received: v.StringSchema<undefined>;
1276
- readonly total_fees_sent: v.StringSchema<undefined>;
1277
- readonly total_miner_rewards_received: v.StringSchema<undefined>;
1278
- readonly lock_tx_id: v.StringSchema<undefined>;
1279
- readonly locked: v.StringSchema<undefined>;
1280
- readonly lock_height: v.NumberSchema<undefined>;
1281
- readonly burnchain_lock_height: v.NumberSchema<undefined>;
1282
- readonly burnchain_unlock_height: v.NumberSchema<undefined>;
1283
- }, undefined>;
1284
- readonly fungible_tokens: v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
1285
- readonly balance: v.StringSchema<undefined>;
1286
- readonly total_sent: v.StringSchema<undefined>;
1287
- readonly total_received: v.StringSchema<undefined>;
1288
- }, undefined>, undefined>;
1289
- readonly non_fungible_tokens: v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
1290
- readonly count: v.StringSchema<undefined>;
1291
- readonly total_sent: v.StringSchema<undefined>;
1292
- readonly total_received: v.StringSchema<undefined>;
1293
- }, undefined>, undefined>;
1294
- }, undefined>;
1295
- type Response = v.InferOutput<typeof responseSchema>;
1296
- declare function balances(opts: Args): Promise<Result$1<Response, SafeError<"FetchBalancesError" | "ParseBodyError" | "ValidateDataError">>>;
1244
+ declare function balances(opts: Args$7): Promise<Result$1<OperationResponse["get_account_balance"], SafeError<"FetchBalancesError" | "ParseBodyError" | "ValidateDataError">>>;
1297
1245
 
1298
- type balances$1_Args = Args;
1299
- type balances$1_Response = Response;
1300
1246
  declare const balances$1_balances: typeof balances;
1301
- declare const balances$1_responseSchema: typeof responseSchema;
1302
1247
  declare namespace balances$1 {
1303
- export { type balances$1_Args as Args, type balances$1_Response as Response, balances$1_balances as balances, balances$1_responseSchema as responseSchema };
1304
- }
1305
-
1306
- declare const index$7_balances: typeof balances;
1307
- declare const index$7_latestNonce: typeof latestNonce;
1308
- declare namespace index$7 {
1309
- export { balances$1 as Balances, latestNonce$1 as LatestNonce, index$7_balances as balances, index$7_latestNonce as latestNonce };
1310
- }
1311
-
1312
- declare const index$6_getBlock: typeof getBlock;
1313
- declare namespace index$6 {
1314
- export { getBlock$1 as GetBlock, index$6_getBlock as getBlock };
1315
- }
1316
-
1317
- declare const index$5_coreApi: typeof coreApi;
1318
- declare const index$5_poxDetails: typeof poxDetails;
1319
- declare namespace index$5 {
1320
- export { coreApi$1 as CoreApi, poxDetails$1 as PoxDetails, index$5_coreApi as coreApi, index$5_poxDetails as poxDetails };
1321
- }
1322
-
1323
- declare const index$4_cycle: typeof cycle;
1324
- declare const index$4_cycles: typeof cycles;
1325
- declare const index$4_signerInCycle: typeof signerInCycle;
1326
- declare const index$4_signersInCycle: typeof signersInCycle;
1327
- declare const index$4_stackersForSignerInCycle: typeof stackersForSignerInCycle;
1328
- declare namespace index$4 {
1329
- export { cycle$1 as Cycle, cycles$1 as Cycles, signerInCycle$1 as SignerInCycle, signersInCycle$1 as SignersInCycle, stackersForSignerInCycle$1 as StackersForSignerInCycle, index$4_cycle as cycle, index$4_cycles as cycles, index$4_signerInCycle as signerInCycle, index$4_signersInCycle as signersInCycle, index$4_stackersForSignerInCycle as stackersForSignerInCycle };
1330
- }
1331
-
1332
- declare const index$3_readOnly: typeof readOnly;
1333
- declare namespace index$3 {
1334
- export { readOnly$1 as ReadOnly, index$3_readOnly as readOnly };
1335
- }
1336
-
1337
- declare const index$2_members: typeof members;
1338
- declare namespace index$2 {
1339
- export { members$1 as Members, index$2_members as members };
1340
- }
1341
-
1342
- declare const index$1_addressTransactions: typeof addressTransactions;
1343
- declare const index$1_getTransaction: typeof getTransaction;
1344
- declare namespace index$1 {
1345
- export { addressTransactions$1 as AddressTransactions, schemas as Common, getTransaction$1 as GetTransaction, index$1_addressTransactions as addressTransactions, index$1_getTransaction as getTransaction };
1248
+ export { type Args$7 as Args, balances$1_balances as balances };
1346
1249
  }
1347
1250
 
1348
1251
  declare const accounts: {
@@ -1350,15 +1253,38 @@ declare const accounts: {
1350
1253
  latestNonce: typeof latestNonce;
1351
1254
  };
1352
1255
 
1256
+ declare const index$d_accounts: typeof accounts;
1257
+ declare namespace index$d {
1258
+ export { balances$1 as Balances, latestNonce$1 as LatestNonce, index$d_accounts as accounts };
1259
+ }
1260
+
1353
1261
  declare const blocks: {
1354
1262
  getBlock: typeof getBlock;
1355
1263
  };
1356
1264
 
1265
+ declare const index$c_blocks: typeof blocks;
1266
+ declare namespace index$c {
1267
+ export { getBlock$1 as GetBlock, index$c_blocks as blocks };
1268
+ }
1269
+
1270
+ declare const faucets: {
1271
+ stx: typeof stx;
1272
+ };
1273
+
1274
+ declare const index$b_faucets: typeof faucets;
1275
+ declare namespace index$b {
1276
+ export { stx$1 as Stx, index$b_faucets as faucets };
1277
+ }
1278
+
1357
1279
  declare const info: {
1358
1280
  coreApi: typeof coreApi;
1359
- poxDetails: typeof poxDetails;
1360
1281
  };
1361
1282
 
1283
+ declare const index$a_info: typeof info;
1284
+ declare namespace index$a {
1285
+ export { coreApi$1 as CoreApi, index$a_info as info };
1286
+ }
1287
+
1362
1288
  declare const proofOfTransfer: {
1363
1289
  cycle: typeof cycle;
1364
1290
  cycles: typeof cycles;
@@ -1367,37 +1293,31 @@ declare const proofOfTransfer: {
1367
1293
  stackersForSignerInCycle: typeof stackersForSignerInCycle;
1368
1294
  };
1369
1295
 
1370
- declare const smartContracts: {
1371
- readOnly: typeof readOnly;
1372
- };
1296
+ declare const index$9_proofOfTransfer: typeof proofOfTransfer;
1297
+ declare namespace index$9 {
1298
+ export { cycle$1 as Cycle, cycles$1 as Cycles, signerInCycle$1 as SignerInCycle, signersInCycle$1 as SignersInCycle, stackersForSignerInCycle$1 as StackersForSignerInCycle, index$9_proofOfTransfer as proofOfTransfer };
1299
+ }
1373
1300
 
1374
1301
  declare const stackingPool: {
1375
1302
  members: typeof members;
1376
1303
  };
1377
1304
 
1305
+ declare const index$8_stackingPool: typeof stackingPool;
1306
+ declare namespace index$8 {
1307
+ export { members$1 as Members, index$8_stackingPool as stackingPool };
1308
+ }
1309
+
1378
1310
  declare const transactions: {
1379
1311
  addressTransactions: typeof addressTransactions;
1380
1312
  getTransaction: typeof getTransaction;
1313
+ mempoolTransactions: typeof mempoolTransactions;
1381
1314
  };
1382
1315
 
1383
- declare const index_accounts: typeof accounts;
1384
- declare const index_blocks: typeof blocks;
1385
- declare const index_info: typeof info;
1386
- declare const index_proofOfTransfer: typeof proofOfTransfer;
1387
- declare const index_smartContracts: typeof smartContracts;
1388
- declare const index_stackingPool: typeof stackingPool;
1389
- declare const index_transactions: typeof transactions;
1390
- declare namespace index {
1391
- export { index$7 as Accounts, index$6 as Blocks, index$5 as Info, index$4 as ProofOfTransfer, index$3 as SmartContracts, index$2 as StackingPool, index$1 as Transactions, index_accounts as accounts, index_blocks as blocks, index_info as info, index_proofOfTransfer as proofOfTransfer, index_smartContracts as smartContracts, index_stackingPool as stackingPool, index_transactions as transactions };
1316
+ declare const index$7_transactions: typeof transactions;
1317
+ declare namespace index$7 {
1318
+ export { addressTransactions$1 as AddressTransactions, schemas as Common, getTransaction$1 as GetTransaction, mempoolTransactions$1 as MempoolTransactions, index$7_transactions as transactions };
1392
1319
  }
1393
1320
 
1394
- type Options = {
1395
- startingDelay?: number;
1396
- numOfAttempts?: number;
1397
- };
1398
- declare function callRateLimitedApi<T>(fn: () => Promise<T>, options?: Options): Promise<T>;
1399
- declare function safeCallRateLimitedApi<T>(fn: () => Promise<Result$1<T>>, options?: Options): Promise<Result$1<T, SafeError<"MaxRetriesExceeded" | string>>>;
1400
-
1401
1321
  declare const stacksApi: {
1402
1322
  accounts: {
1403
1323
  balances: typeof balances;
@@ -1406,9 +1326,11 @@ declare const stacksApi: {
1406
1326
  blocks: {
1407
1327
  getBlock: typeof getBlock;
1408
1328
  };
1329
+ faucets: {
1330
+ stx: typeof stx;
1331
+ };
1409
1332
  info: {
1410
1333
  coreApi: typeof coreApi;
1411
- poxDetails: typeof poxDetails;
1412
1334
  };
1413
1335
  proofOfTransfer: {
1414
1336
  cycle: typeof cycle;
@@ -1417,16 +1339,396 @@ declare const stacksApi: {
1417
1339
  signersInCycle: typeof signersInCycle;
1418
1340
  stackersForSignerInCycle: typeof stackersForSignerInCycle;
1419
1341
  };
1420
- smartContracts: {
1421
- readOnly: typeof readOnly;
1422
- };
1423
1342
  stackingPool: {
1424
1343
  members: typeof members;
1425
1344
  };
1426
1345
  transactions: {
1427
1346
  addressTransactions: typeof addressTransactions;
1428
1347
  getTransaction: typeof getTransaction;
1348
+ mempoolTransactions: typeof mempoolTransactions;
1349
+ };
1350
+ };
1351
+
1352
+ declare const index$6_stacksApi: typeof stacksApi;
1353
+ declare namespace index$6 {
1354
+ export { index$d as Accounts, index$c as Blocks, index$b as Faucets, index$a as Info, index$9 as ProofOfTransfer, index$8 as StackingPool, index$7 as Transactions, index$6_stacksApi as stacksApi };
1355
+ }
1356
+
1357
+ type Args$6 = {
1358
+ sender: string;
1359
+ arguments: string[];
1360
+ contractAddress: string;
1361
+ contractName: string;
1362
+ functionName: string;
1363
+ } & ApiRequestOptions;
1364
+ interface ReadOnlyContractCallSuccessResponse {
1365
+ okay: true;
1366
+ result: string;
1367
+ }
1368
+ interface ReadOnlyContractCallFailResponse {
1369
+ okay: false;
1370
+ cause: string;
1371
+ }
1372
+ type ReadOnlyContractCallResponse = ReadOnlyContractCallSuccessResponse | ReadOnlyContractCallFailResponse;
1373
+ type ReadOnlyResponse = ReadOnlyContractCallResponse;
1374
+ declare function readOnly$1(args: Args$6): Promise<Result$1<ReadOnlyResponse>>;
1375
+
1376
+ type readOnly$2_ReadOnlyContractCallResponse = ReadOnlyContractCallResponse;
1377
+ type readOnly$2_ReadOnlyResponse = ReadOnlyResponse;
1378
+ declare namespace readOnly$2 {
1379
+ export { type Args$6 as Args, type readOnly$2_ReadOnlyContractCallResponse as ReadOnlyContractCallResponse, type readOnly$2_ReadOnlyResponse as ReadOnlyResponse, readOnly$1 as readOnly };
1380
+ }
1381
+
1382
+ type Args$5 = {
1383
+ contractAddress: string;
1384
+ contractName: string;
1385
+ mapName: string;
1386
+ /**
1387
+ * Hex-encoded string of the map key Clarity value.
1388
+ */
1389
+ mapKey: string;
1390
+ } & ApiRequestOptions & ProofAndTip;
1391
+ declare const mapEntryResponseSchema: v.ObjectSchema<{
1392
+ /**
1393
+ * Hex-encoded string of clarity value. It is always an optional tuple.
1394
+ */
1395
+ readonly data: v.StringSchema<undefined>;
1396
+ /**
1397
+ * Hex-encoded string of the MARF proof for the data
1398
+ */
1399
+ readonly proof: v.OptionalSchema<v.StringSchema<undefined>, never>;
1400
+ }, undefined>;
1401
+ type MapEntryResponse = v.InferOutput<typeof mapEntryResponseSchema>;
1402
+ declare function mapEntry(args: Args$5): Promise<Result$1<MapEntryResponse>>;
1403
+
1404
+ type mapEntry$1_MapEntryResponse = MapEntryResponse;
1405
+ declare const mapEntry$1_mapEntry: typeof mapEntry;
1406
+ declare namespace mapEntry$1 {
1407
+ export { type Args$5 as Args, type mapEntry$1_MapEntryResponse as MapEntryResponse, mapEntry$1_mapEntry as mapEntry };
1408
+ }
1409
+
1410
+ type Args$4 = ApiRequestOptions;
1411
+ /**
1412
+ * Get Proof of Transfer (PoX) information
1413
+ */
1414
+ interface CoreNodePoxResponse {
1415
+ /**
1416
+ * The contract identifier for the PoX contract
1417
+ */
1418
+ contract_id: string;
1419
+ /**
1420
+ * The first burn block evaluated in this Stacks chain
1421
+ */
1422
+ first_burnchain_block_height: number;
1423
+ /**
1424
+ * The latest Bitcoin chain block height
1425
+ */
1426
+ current_burnchain_block_height: number;
1427
+ /**
1428
+ * The threshold of stacking participation that must be reached for PoX to
1429
+ * activate in any cycle
1430
+ */
1431
+ pox_activation_threshold_ustx: number;
1432
+ /**
1433
+ * The fraction of liquid STX that must vote to reject PoX in order to prevent
1434
+ * the next reward cycle from activating.
1435
+ */
1436
+ rejection_fraction: number;
1437
+ /**
1438
+ * The length in burn blocks of the reward phase
1439
+ */
1440
+ reward_phase_block_length: number;
1441
+ /**
1442
+ * The length in burn blocks of the prepare phase
1443
+ */
1444
+ prepare_phase_block_length: number;
1445
+ /**
1446
+ * The number of reward slots in a reward cycle
1447
+ */
1448
+ reward_slots: number;
1449
+ /**
1450
+ * The current total amount of liquid microstacks.
1451
+ */
1452
+ total_liquid_supply_ustx: number;
1453
+ /**
1454
+ * The length in burn blocks of a whole PoX cycle (reward phase and prepare
1455
+ * phase)
1456
+ */
1457
+ reward_cycle_length: number;
1458
+ current_cycle: {
1459
+ /**
1460
+ * The reward cycle number
1461
+ */
1462
+ id: number;
1463
+ /**
1464
+ * The threshold amount for obtaining a slot in this reward cycle.
1465
+ */
1466
+ min_threshold_ustx: number;
1467
+ /**
1468
+ * The total amount of stacked microstacks in this reward cycle.
1469
+ */
1470
+ stacked_ustx: number;
1471
+ /**
1472
+ * Whether or not PoX is active during this reward cycle.
1473
+ */
1474
+ is_pox_active: boolean;
1475
+ };
1476
+ next_cycle: {
1477
+ /**
1478
+ * The reward cycle number
1479
+ */
1480
+ id: number;
1481
+ /**
1482
+ * The threshold amount for obtaining a slot in this reward cycle.
1483
+ */
1484
+ min_threshold_ustx: number;
1485
+ /**
1486
+ * The total amount of stacked microstacks in this reward cycle.
1487
+ */
1488
+ stacked_ustx: number;
1489
+ /**
1490
+ * The minimum amount that can be used to submit a `stack-stx` call.
1491
+ */
1492
+ min_increment_ustx: number;
1493
+ /**
1494
+ * The burn block height when the prepare phase for this cycle begins. Any
1495
+ * eligible stacks must be stacked before this block.
1496
+ */
1497
+ prepare_phase_start_block_height: number;
1498
+ /**
1499
+ * The number of burn blocks until the prepare phase for this cycle starts.
1500
+ * If the prepare phase for this cycle already started, this value will be
1501
+ * negative.
1502
+ */
1503
+ blocks_until_prepare_phase: number;
1504
+ /**
1505
+ * The burn block height when the reward phase for this cycle begins. Any
1506
+ * eligible stacks must be stacked before this block.
1507
+ */
1508
+ reward_phase_start_block_height: number;
1509
+ /**
1510
+ * The number of burn blocks until this reward phase starts.
1511
+ */
1512
+ blocks_until_reward_phase: number;
1513
+ /**
1514
+ * The remaining amount of liquid STX that must vote to reject the next
1515
+ * reward cycle to prevent the next reward cycle from activating.
1516
+ */
1517
+ ustx_until_pox_rejection: number;
1518
+ };
1519
+ /**
1520
+ * @deprecated
1521
+ * The active reward cycle number
1522
+ */
1523
+ reward_cycle_id: number;
1524
+ /**
1525
+ * @deprecated
1526
+ */
1527
+ min_amount_ustx: number;
1528
+ /**
1529
+ * @deprecated
1530
+ */
1531
+ prepare_cycle_length: number;
1532
+ /**
1533
+ * @deprecated
1534
+ */
1535
+ rejection_votes_left_required: number;
1536
+ /**
1537
+ * Versions of each PoX
1538
+ */
1539
+ contract_versions: {
1540
+ /**
1541
+ * The contract identifier for the PoX contract
1542
+ */
1543
+ contract_id: string;
1544
+ /**
1545
+ * The burn block height at which this version of PoX is activated
1546
+ */
1547
+ activation_burnchain_block_height: number;
1548
+ /**
1549
+ * The first reward cycle number that uses this version of PoX
1550
+ */
1551
+ first_reward_cycle_id: number;
1552
+ }[];
1553
+ }
1554
+ type PoxDetailsResponse = CoreNodePoxResponse;
1555
+ declare function poxDetails(args: Args$4): Promise<Result$1<PoxDetailsResponse>>;
1556
+
1557
+ type poxDetails$1_CoreNodePoxResponse = CoreNodePoxResponse;
1558
+ type poxDetails$1_PoxDetailsResponse = PoxDetailsResponse;
1559
+ declare const poxDetails$1_poxDetails: typeof poxDetails;
1560
+ declare namespace poxDetails$1 {
1561
+ export { type poxDetails$1_CoreNodePoxResponse as CoreNodePoxResponse, type poxDetails$1_PoxDetailsResponse as PoxDetailsResponse, poxDetails$1_poxDetails as poxDetails };
1562
+ }
1563
+
1564
+ declare const smartContracts: {
1565
+ mapEntry: typeof mapEntry;
1566
+ readOnly: typeof readOnly$1;
1567
+ };
1568
+
1569
+ declare const index$5_smartContracts: typeof smartContracts;
1570
+ declare namespace index$5 {
1571
+ export { mapEntry$1 as MapEntry, readOnly$2 as ReadOnly, index$5_smartContracts as smartContracts };
1572
+ }
1573
+
1574
+ declare const pox: {
1575
+ poxDetails: typeof poxDetails;
1576
+ };
1577
+
1578
+ declare const index$4_pox: typeof pox;
1579
+ declare namespace index$4 {
1580
+ export { poxDetails$1 as PoxDetails, index$4_pox as pox };
1581
+ }
1582
+
1583
+ declare const stacksRpcApi: {
1584
+ pox: {
1585
+ poxDetails: typeof poxDetails;
1429
1586
  };
1587
+ smartContracts: {
1588
+ mapEntry: typeof mapEntry;
1589
+ readOnly: typeof readOnly$1;
1590
+ };
1591
+ };
1592
+
1593
+ declare const index$3_stacksRpcApi: typeof stacksRpcApi;
1594
+ declare namespace index$3 {
1595
+ export { index$4 as Pox, index$5 as SmartContracts, index$3_stacksRpcApi as stacksRpcApi };
1596
+ }
1597
+
1598
+ type Identifier = {
1599
+ type: "address";
1600
+ signerAddress: string;
1601
+ } | {
1602
+ type: "publicKey";
1603
+ signerPublicKey: string;
1604
+ };
1605
+ type Args$3 = {
1606
+ identifier: Identifier;
1607
+ } & {
1608
+ cycleNumber: number;
1609
+ } & ApiRequestOptions;
1610
+ /**
1611
+ * Return the total locked amount for a signer in a PoX cycle.
1612
+ */
1613
+ declare function getSignerStackedAmount(args: Args$3): Promise<Result$1<bigint, SafeError<"SignerNotFound" | string>>>;
1614
+
1615
+ declare const queries: {
1616
+ getSignerStackedAmount: typeof getSignerStackedAmount;
1617
+ };
1618
+
1619
+ type Options = {
1620
+ startingDelay?: number;
1621
+ numOfAttempts?: number;
1430
1622
  };
1623
+ declare function callRateLimitedApi<T>(fn: () => Promise<T>, options?: Options): Promise<T>;
1624
+ declare function safeCallRateLimitedApi<T>(fn: () => Promise<Result$1<T>>, options?: Options): Promise<Result$1<T, SafeError<"MaxRetriesExceeded" | string>>>;
1625
+
1626
+ type Network = "mainnet" | "testnet";
1627
+
1628
+ type PoxAddr = OptionalCV<TupleCV<{
1629
+ version: BufferCV;
1630
+ hashbytes: BufferCV;
1631
+ }>>;
1632
+
1633
+ type Args$2 = {
1634
+ principal: string;
1635
+ network: Network;
1636
+ } & ApiRequestOptions;
1637
+ type GetCheckDelegationReturn = OptionalCV<TupleCV<{
1638
+ "amount-ustx": UIntCV;
1639
+ "delegated-to": PrincipalCV;
1640
+ "until-burn-ht": OptionalCV<UIntCV>;
1641
+ "pox-addr": OptionalCV<PoxAddr>;
1642
+ }>>;
1643
+ declare function getCheckDelegation({ principal, network, baseUrl, apiKeyConfig, }: Args$2): Promise<Result$1<GetCheckDelegationReturn>>;
1644
+
1645
+ type getCheckDelegation$1_GetCheckDelegationReturn = GetCheckDelegationReturn;
1646
+ declare const getCheckDelegation$1_getCheckDelegation: typeof getCheckDelegation;
1647
+ declare namespace getCheckDelegation$1 {
1648
+ export { type getCheckDelegation$1_GetCheckDelegationReturn as GetCheckDelegationReturn, getCheckDelegation$1_getCheckDelegation as getCheckDelegation };
1649
+ }
1650
+
1651
+ type Args$1 = {
1652
+ principal: string;
1653
+ network: Network;
1654
+ } & ApiRequestOptions;
1655
+ type GetStackerInfoReturn = OptionalCV<TupleCV<{
1656
+ "pox-addr": PoxAddr;
1657
+ "lock-period": UIntCV;
1658
+ "first-reward-cycle": UIntCV;
1659
+ "reward-set-indexes": ListCV<UIntCV>;
1660
+ "delegated-to": OptionalCV<PrincipalCV>;
1661
+ }>>;
1662
+ declare function getStackerInfo({ principal, network, baseUrl, apiKeyConfig, }: Args$1): Promise<Result$1<GetStackerInfoReturn>>;
1663
+
1664
+ type getStackerInfo$1_GetStackerInfoReturn = GetStackerInfoReturn;
1665
+ declare const getStackerInfo$1_getStackerInfo: typeof getStackerInfo;
1666
+ declare namespace getStackerInfo$1 {
1667
+ export { type Args$1 as Args, type getStackerInfo$1_GetStackerInfoReturn as GetStackerInfoReturn, getStackerInfo$1_getStackerInfo as getStackerInfo };
1668
+ }
1669
+
1670
+ type StackingStateKey = TupleCV<{
1671
+ stacker: PrincipalCV;
1672
+ }>;
1673
+ type StackingStateValue = TupleCV<{
1674
+ "pox-addr": TupleCV<{
1675
+ version: BufferCV;
1676
+ hashbytes: BufferCV;
1677
+ }>;
1678
+ "lock-period": UIntCV;
1679
+ "first-reward-cycle": UIntCV;
1680
+ "reward-set-indexes": ListCV<UIntCV>;
1681
+ "delegated-to": OptionalCV<PrincipalCV>;
1682
+ }>;
1683
+ type Args = {
1684
+ key: StackingStateKey;
1685
+ network: Network;
1686
+ } & ApiRequestOptions & ProofAndTip;
1687
+ declare function stackingState({ key, network, baseUrl, apiKeyConfig, proof, tip, }: Args): Promise<Result$1<{
1688
+ data: StackingStateValue;
1689
+ proof?: string;
1690
+ }>>;
1691
+
1692
+ type stackingState$1_Args = Args;
1693
+ type stackingState$1_StackingStateKey = StackingStateKey;
1694
+ type stackingState$1_StackingStateValue = StackingStateValue;
1695
+ declare const stackingState$1_stackingState: typeof stackingState;
1696
+ declare namespace stackingState$1 {
1697
+ export { type stackingState$1_Args as Args, type stackingState$1_StackingStateKey as StackingStateKey, type stackingState$1_StackingStateValue as StackingStateValue, stackingState$1_stackingState as stackingState };
1698
+ }
1699
+
1700
+ declare const maps: {
1701
+ stackingState: typeof stackingState;
1702
+ };
1703
+
1704
+ declare const index$2_maps: typeof maps;
1705
+ declare namespace index$2 {
1706
+ export { stackingState$1 as StackingState, index$2_maps as maps };
1707
+ }
1708
+
1709
+ declare const readOnly: {
1710
+ getStackerInfo: typeof getStackerInfo;
1711
+ getCheckDelegation: typeof getCheckDelegation;
1712
+ };
1713
+
1714
+ declare const index$1_readOnly: typeof readOnly;
1715
+ declare namespace index$1 {
1716
+ export { getCheckDelegation$1 as GetCheckDelegation, getStackerInfo$1 as GetStackerInfo, index$1_readOnly as readOnly };
1717
+ }
1718
+
1719
+ declare const pox4Api: {
1720
+ maps: {
1721
+ stackingState: typeof stackingState;
1722
+ };
1723
+ readOnly: {
1724
+ getStackerInfo: typeof getStackerInfo;
1725
+ getCheckDelegation: typeof getCheckDelegation;
1726
+ };
1727
+ };
1728
+
1729
+ declare const index_pox4Api: typeof pox4Api;
1730
+ declare namespace index {
1731
+ export { index$2 as Maps, index$1 as ReadOnly, index_pox4Api as pox4Api };
1732
+ }
1431
1733
 
1432
- export { type Result$1 as Result, type SafeError, index as StacksApi, callRateLimitedApi, error, safeCall, safeCallRateLimitedApi, safePromise, stacksApi, success };
1734
+ 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 };