@secretkeylabs/stacks-tools 0.4.0-425a956 → 0.4.0-80a0ce6
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 +5 -9
- package/dist/index.d.cts +27 -27
- package/dist/index.d.ts +27 -27
- package/dist/index.js +5 -9
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -667,15 +667,15 @@ var readOnlyResponseSchema = v11.variant("okay", [
|
|
|
667
667
|
cause: v11.unknown()
|
|
668
668
|
})
|
|
669
669
|
]);
|
|
670
|
-
async function readOnly(
|
|
670
|
+
async function readOnly(opts, apiOpts) {
|
|
671
671
|
const init = {};
|
|
672
|
-
if (
|
|
672
|
+
if (apiOpts.apiKeyConfig) {
|
|
673
673
|
init.headers = {
|
|
674
|
-
[
|
|
674
|
+
[apiOpts.apiKeyConfig.header]: apiOpts.apiKeyConfig.key
|
|
675
675
|
};
|
|
676
676
|
}
|
|
677
677
|
const res = await fetch(
|
|
678
|
-
`${
|
|
678
|
+
`${apiOpts.baseUrl}/v2/contracts/call-read/${opts.contractAddress}/${opts.contractName}/${opts.functionName}`,
|
|
679
679
|
init
|
|
680
680
|
);
|
|
681
681
|
if (!res.ok) {
|
|
@@ -794,11 +794,7 @@ var baseTransactionSchema = v13.object({
|
|
|
794
794
|
parent_burn_block_time_iso: v13.string(),
|
|
795
795
|
canonical: v13.boolean(),
|
|
796
796
|
tx_index: v13.number(),
|
|
797
|
-
tx_status: v13.
|
|
798
|
-
v13.literal("success"),
|
|
799
|
-
v13.literal("abort_by_response"),
|
|
800
|
-
v13.literal("abort_by_post_condition")
|
|
801
|
-
]),
|
|
797
|
+
tx_status: v13.string(),
|
|
802
798
|
tx_result: v13.object({
|
|
803
799
|
hex: v13.string(),
|
|
804
800
|
repr: v13.string()
|
package/dist/index.d.cts
CHANGED
|
@@ -52,7 +52,7 @@ declare const baseTransactionSchema: v.ObjectSchema<{
|
|
|
52
52
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
53
53
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
54
54
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
55
|
-
readonly tx_status: v.
|
|
55
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
56
56
|
readonly tx_result: v.ObjectSchema<{
|
|
57
57
|
readonly hex: v.StringSchema<undefined>;
|
|
58
58
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -90,7 +90,7 @@ declare const contractCallTransactionSchema: v.ObjectSchema<{
|
|
|
90
90
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
91
91
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
92
92
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
93
|
-
readonly tx_status: v.
|
|
93
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
94
94
|
readonly tx_result: v.ObjectSchema<{
|
|
95
95
|
readonly hex: v.StringSchema<undefined>;
|
|
96
96
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -141,7 +141,7 @@ declare const smartContractTransactionSchema: v.ObjectSchema<{
|
|
|
141
141
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
142
142
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
143
143
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
144
|
-
readonly tx_status: v.
|
|
144
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
145
145
|
readonly tx_result: v.ObjectSchema<{
|
|
146
146
|
readonly hex: v.StringSchema<undefined>;
|
|
147
147
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -190,7 +190,7 @@ declare const tokenTransferSchema: v.ObjectSchema<{
|
|
|
190
190
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
191
191
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
192
192
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
193
|
-
readonly tx_status: v.
|
|
193
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
194
194
|
readonly tx_result: v.ObjectSchema<{
|
|
195
195
|
readonly hex: v.StringSchema<undefined>;
|
|
196
196
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -237,7 +237,7 @@ declare const transactionSchema: v.VariantSchema<"tx_type", [v.ObjectSchema<{
|
|
|
237
237
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
238
238
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
239
239
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
240
|
-
readonly tx_status: v.
|
|
240
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
241
241
|
readonly tx_result: v.ObjectSchema<{
|
|
242
242
|
readonly hex: v.StringSchema<undefined>;
|
|
243
243
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -286,7 +286,7 @@ declare const transactionSchema: v.VariantSchema<"tx_type", [v.ObjectSchema<{
|
|
|
286
286
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
287
287
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
288
288
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
289
|
-
readonly tx_status: v.
|
|
289
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
290
290
|
readonly tx_result: v.ObjectSchema<{
|
|
291
291
|
readonly hex: v.StringSchema<undefined>;
|
|
292
292
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -333,7 +333,7 @@ declare const transactionSchema: v.VariantSchema<"tx_type", [v.ObjectSchema<{
|
|
|
333
333
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
334
334
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
335
335
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
336
|
-
readonly tx_status: v.
|
|
336
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
337
337
|
readonly tx_result: v.ObjectSchema<{
|
|
338
338
|
readonly hex: v.StringSchema<undefined>;
|
|
339
339
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -369,17 +369,17 @@ declare namespace schemas {
|
|
|
369
369
|
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 };
|
|
370
370
|
}
|
|
371
371
|
|
|
372
|
-
type Args$
|
|
372
|
+
type Args$9 = {
|
|
373
373
|
transactionId: string;
|
|
374
374
|
} & ApiRequestOptions;
|
|
375
|
-
declare function getTransaction(args: Args$
|
|
375
|
+
declare function getTransaction(args: Args$9): Promise<Result$1<Transaction>>;
|
|
376
376
|
|
|
377
377
|
declare const getTransaction$1_getTransaction: typeof getTransaction;
|
|
378
378
|
declare namespace getTransaction$1 {
|
|
379
379
|
export { getTransaction$1_getTransaction as getTransaction };
|
|
380
380
|
}
|
|
381
381
|
|
|
382
|
-
type Args$
|
|
382
|
+
type Args$8 = {
|
|
383
383
|
address: string;
|
|
384
384
|
} & ApiRequestOptions & ApiPaginationOptions;
|
|
385
385
|
declare const resultSchema: v.ObjectSchema<{
|
|
@@ -405,7 +405,7 @@ declare const resultSchema: v.ObjectSchema<{
|
|
|
405
405
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
406
406
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
407
407
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
408
|
-
readonly tx_status: v.
|
|
408
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
409
409
|
readonly tx_result: v.ObjectSchema<{
|
|
410
410
|
readonly hex: v.StringSchema<undefined>;
|
|
411
411
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -454,7 +454,7 @@ declare const resultSchema: v.ObjectSchema<{
|
|
|
454
454
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
455
455
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
456
456
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
457
|
-
readonly tx_status: v.
|
|
457
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
458
458
|
readonly tx_result: v.ObjectSchema<{
|
|
459
459
|
readonly hex: v.StringSchema<undefined>;
|
|
460
460
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -497,7 +497,7 @@ declare const resultSchema: v.ObjectSchema<{
|
|
|
497
497
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
498
498
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
499
499
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
500
|
-
readonly tx_status: v.
|
|
500
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
501
501
|
readonly tx_result: v.ObjectSchema<{
|
|
502
502
|
readonly hex: v.StringSchema<undefined>;
|
|
503
503
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -563,7 +563,7 @@ declare const resultsSchema$3: v.ArraySchema<v.ObjectSchema<{
|
|
|
563
563
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
564
564
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
565
565
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
566
|
-
readonly tx_status: v.
|
|
566
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
567
567
|
readonly tx_result: v.ObjectSchema<{
|
|
568
568
|
readonly hex: v.StringSchema<undefined>;
|
|
569
569
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -612,7 +612,7 @@ declare const resultsSchema$3: v.ArraySchema<v.ObjectSchema<{
|
|
|
612
612
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
613
613
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
614
614
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
615
|
-
readonly tx_status: v.
|
|
615
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
616
616
|
readonly tx_result: v.ObjectSchema<{
|
|
617
617
|
readonly hex: v.StringSchema<undefined>;
|
|
618
618
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -655,7 +655,7 @@ declare const resultsSchema$3: v.ArraySchema<v.ObjectSchema<{
|
|
|
655
655
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
656
656
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
657
657
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
658
|
-
readonly tx_status: v.
|
|
658
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
659
659
|
readonly tx_result: v.ObjectSchema<{
|
|
660
660
|
readonly hex: v.StringSchema<undefined>;
|
|
661
661
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -722,7 +722,7 @@ declare const addressTransactionsResponseSchema: v.ObjectSchema<{
|
|
|
722
722
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
723
723
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
724
724
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
725
|
-
readonly tx_status: v.
|
|
725
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
726
726
|
readonly tx_result: v.ObjectSchema<{
|
|
727
727
|
readonly hex: v.StringSchema<undefined>;
|
|
728
728
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -771,7 +771,7 @@ declare const addressTransactionsResponseSchema: v.ObjectSchema<{
|
|
|
771
771
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
772
772
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
773
773
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
774
|
-
readonly tx_status: v.
|
|
774
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
775
775
|
readonly tx_result: v.ObjectSchema<{
|
|
776
776
|
readonly hex: v.StringSchema<undefined>;
|
|
777
777
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -814,7 +814,7 @@ declare const addressTransactionsResponseSchema: v.ObjectSchema<{
|
|
|
814
814
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
815
815
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
816
816
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
817
|
-
readonly tx_status: v.
|
|
817
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
818
818
|
readonly tx_result: v.ObjectSchema<{
|
|
819
819
|
readonly hex: v.StringSchema<undefined>;
|
|
820
820
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -861,7 +861,7 @@ declare const addressTransactionsResponseSchema: v.ObjectSchema<{
|
|
|
861
861
|
readonly total: v.NumberSchema<undefined>;
|
|
862
862
|
}, undefined>;
|
|
863
863
|
type AddressTransactionsResponse = v.InferOutput<typeof addressTransactionsResponseSchema>;
|
|
864
|
-
declare function addressTransactions(args: Args$
|
|
864
|
+
declare function addressTransactions(args: Args$8): Promise<Result$1<AddressTransactionsResponse, SafeError<"FetchAddressTransactionsError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
865
865
|
|
|
866
866
|
type addressTransactions$1_AddressTransactionsResponse = AddressTransactionsResponse;
|
|
867
867
|
type addressTransactions$1_Result = Result;
|
|
@@ -870,7 +870,7 @@ declare namespace addressTransactions$1 {
|
|
|
870
870
|
export { type addressTransactions$1_AddressTransactionsResponse as AddressTransactionsResponse, type addressTransactions$1_Result as Result, type Results$3 as Results, addressTransactions$1_addressTransactions as addressTransactions };
|
|
871
871
|
}
|
|
872
872
|
|
|
873
|
-
type Options$
|
|
873
|
+
type Options$2 = {
|
|
874
874
|
poolPrincipal: string;
|
|
875
875
|
afterBlock?: number;
|
|
876
876
|
unanchored?: boolean;
|
|
@@ -900,7 +900,7 @@ declare const membersResponseSchema: v.ObjectSchema<{
|
|
|
900
900
|
}, undefined>, undefined>;
|
|
901
901
|
}, undefined>;
|
|
902
902
|
type MembersResponse = v.InferOutput<typeof membersResponseSchema>;
|
|
903
|
-
declare function members(opts: Options$
|
|
903
|
+
declare function members(opts: Options$2, apiOpts: ApiRequestOptions): Promise<Result$1<MembersResponse>>;
|
|
904
904
|
|
|
905
905
|
type members$1_Member = Member;
|
|
906
906
|
type members$1_MembersResponse = MembersResponse;
|
|
@@ -908,16 +908,16 @@ declare const members$1_memberSchema: typeof memberSchema;
|
|
|
908
908
|
declare const members$1_members: typeof members;
|
|
909
909
|
declare const members$1_membersResponseSchema: typeof membersResponseSchema;
|
|
910
910
|
declare namespace members$1 {
|
|
911
|
-
export { type members$1_Member as Member, type members$1_MembersResponse as MembersResponse, type Options$
|
|
911
|
+
export { type members$1_Member as Member, type members$1_MembersResponse as MembersResponse, type Options$2 as Options, members$1_memberSchema as memberSchema, members$1_members as members, members$1_membersResponseSchema as membersResponseSchema };
|
|
912
912
|
}
|
|
913
913
|
|
|
914
|
-
type
|
|
914
|
+
type Options$1 = {
|
|
915
915
|
sender: string;
|
|
916
916
|
arguments: string[];
|
|
917
917
|
contractAddress: string;
|
|
918
918
|
contractName: string;
|
|
919
919
|
functionName: string;
|
|
920
|
-
}
|
|
920
|
+
};
|
|
921
921
|
declare const readOnlyResponseSchema: v.VariantSchema<"okay", [v.ObjectSchema<{
|
|
922
922
|
readonly okay: v.LiteralSchema<true, undefined>;
|
|
923
923
|
readonly result: v.StringSchema<undefined>;
|
|
@@ -926,13 +926,13 @@ declare const readOnlyResponseSchema: v.VariantSchema<"okay", [v.ObjectSchema<{
|
|
|
926
926
|
readonly cause: v.UnknownSchema;
|
|
927
927
|
}, undefined>], undefined>;
|
|
928
928
|
type ReadOnlyResponse = v.InferOutput<typeof readOnlyResponseSchema>;
|
|
929
|
-
declare function readOnly(
|
|
929
|
+
declare function readOnly(opts: Options$1, apiOpts: ApiRequestOptions): Promise<Result$1<ReadOnlyResponse>>;
|
|
930
930
|
|
|
931
931
|
type readOnly$1_ReadOnlyResponse = ReadOnlyResponse;
|
|
932
932
|
declare const readOnly$1_readOnly: typeof readOnly;
|
|
933
933
|
declare const readOnly$1_readOnlyResponseSchema: typeof readOnlyResponseSchema;
|
|
934
934
|
declare namespace readOnly$1 {
|
|
935
|
-
export { type
|
|
935
|
+
export { type Options$1 as Options, type readOnly$1_ReadOnlyResponse as ReadOnlyResponse, readOnly$1_readOnly as readOnly, readOnly$1_readOnlyResponseSchema as readOnlyResponseSchema };
|
|
936
936
|
}
|
|
937
937
|
|
|
938
938
|
type Args$7 = {
|
package/dist/index.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ declare const baseTransactionSchema: v.ObjectSchema<{
|
|
|
52
52
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
53
53
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
54
54
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
55
|
-
readonly tx_status: v.
|
|
55
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
56
56
|
readonly tx_result: v.ObjectSchema<{
|
|
57
57
|
readonly hex: v.StringSchema<undefined>;
|
|
58
58
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -90,7 +90,7 @@ declare const contractCallTransactionSchema: v.ObjectSchema<{
|
|
|
90
90
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
91
91
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
92
92
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
93
|
-
readonly tx_status: v.
|
|
93
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
94
94
|
readonly tx_result: v.ObjectSchema<{
|
|
95
95
|
readonly hex: v.StringSchema<undefined>;
|
|
96
96
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -141,7 +141,7 @@ declare const smartContractTransactionSchema: v.ObjectSchema<{
|
|
|
141
141
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
142
142
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
143
143
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
144
|
-
readonly tx_status: v.
|
|
144
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
145
145
|
readonly tx_result: v.ObjectSchema<{
|
|
146
146
|
readonly hex: v.StringSchema<undefined>;
|
|
147
147
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -190,7 +190,7 @@ declare const tokenTransferSchema: v.ObjectSchema<{
|
|
|
190
190
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
191
191
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
192
192
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
193
|
-
readonly tx_status: v.
|
|
193
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
194
194
|
readonly tx_result: v.ObjectSchema<{
|
|
195
195
|
readonly hex: v.StringSchema<undefined>;
|
|
196
196
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -237,7 +237,7 @@ declare const transactionSchema: v.VariantSchema<"tx_type", [v.ObjectSchema<{
|
|
|
237
237
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
238
238
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
239
239
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
240
|
-
readonly tx_status: v.
|
|
240
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
241
241
|
readonly tx_result: v.ObjectSchema<{
|
|
242
242
|
readonly hex: v.StringSchema<undefined>;
|
|
243
243
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -286,7 +286,7 @@ declare const transactionSchema: v.VariantSchema<"tx_type", [v.ObjectSchema<{
|
|
|
286
286
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
287
287
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
288
288
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
289
|
-
readonly tx_status: v.
|
|
289
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
290
290
|
readonly tx_result: v.ObjectSchema<{
|
|
291
291
|
readonly hex: v.StringSchema<undefined>;
|
|
292
292
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -333,7 +333,7 @@ declare const transactionSchema: v.VariantSchema<"tx_type", [v.ObjectSchema<{
|
|
|
333
333
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
334
334
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
335
335
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
336
|
-
readonly tx_status: v.
|
|
336
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
337
337
|
readonly tx_result: v.ObjectSchema<{
|
|
338
338
|
readonly hex: v.StringSchema<undefined>;
|
|
339
339
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -369,17 +369,17 @@ declare namespace schemas {
|
|
|
369
369
|
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 };
|
|
370
370
|
}
|
|
371
371
|
|
|
372
|
-
type Args$
|
|
372
|
+
type Args$9 = {
|
|
373
373
|
transactionId: string;
|
|
374
374
|
} & ApiRequestOptions;
|
|
375
|
-
declare function getTransaction(args: Args$
|
|
375
|
+
declare function getTransaction(args: Args$9): Promise<Result$1<Transaction>>;
|
|
376
376
|
|
|
377
377
|
declare const getTransaction$1_getTransaction: typeof getTransaction;
|
|
378
378
|
declare namespace getTransaction$1 {
|
|
379
379
|
export { getTransaction$1_getTransaction as getTransaction };
|
|
380
380
|
}
|
|
381
381
|
|
|
382
|
-
type Args$
|
|
382
|
+
type Args$8 = {
|
|
383
383
|
address: string;
|
|
384
384
|
} & ApiRequestOptions & ApiPaginationOptions;
|
|
385
385
|
declare const resultSchema: v.ObjectSchema<{
|
|
@@ -405,7 +405,7 @@ declare const resultSchema: v.ObjectSchema<{
|
|
|
405
405
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
406
406
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
407
407
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
408
|
-
readonly tx_status: v.
|
|
408
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
409
409
|
readonly tx_result: v.ObjectSchema<{
|
|
410
410
|
readonly hex: v.StringSchema<undefined>;
|
|
411
411
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -454,7 +454,7 @@ declare const resultSchema: v.ObjectSchema<{
|
|
|
454
454
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
455
455
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
456
456
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
457
|
-
readonly tx_status: v.
|
|
457
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
458
458
|
readonly tx_result: v.ObjectSchema<{
|
|
459
459
|
readonly hex: v.StringSchema<undefined>;
|
|
460
460
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -497,7 +497,7 @@ declare const resultSchema: v.ObjectSchema<{
|
|
|
497
497
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
498
498
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
499
499
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
500
|
-
readonly tx_status: v.
|
|
500
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
501
501
|
readonly tx_result: v.ObjectSchema<{
|
|
502
502
|
readonly hex: v.StringSchema<undefined>;
|
|
503
503
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -563,7 +563,7 @@ declare const resultsSchema$3: v.ArraySchema<v.ObjectSchema<{
|
|
|
563
563
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
564
564
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
565
565
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
566
|
-
readonly tx_status: v.
|
|
566
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
567
567
|
readonly tx_result: v.ObjectSchema<{
|
|
568
568
|
readonly hex: v.StringSchema<undefined>;
|
|
569
569
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -612,7 +612,7 @@ declare const resultsSchema$3: v.ArraySchema<v.ObjectSchema<{
|
|
|
612
612
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
613
613
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
614
614
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
615
|
-
readonly tx_status: v.
|
|
615
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
616
616
|
readonly tx_result: v.ObjectSchema<{
|
|
617
617
|
readonly hex: v.StringSchema<undefined>;
|
|
618
618
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -655,7 +655,7 @@ declare const resultsSchema$3: v.ArraySchema<v.ObjectSchema<{
|
|
|
655
655
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
656
656
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
657
657
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
658
|
-
readonly tx_status: v.
|
|
658
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
659
659
|
readonly tx_result: v.ObjectSchema<{
|
|
660
660
|
readonly hex: v.StringSchema<undefined>;
|
|
661
661
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -722,7 +722,7 @@ declare const addressTransactionsResponseSchema: v.ObjectSchema<{
|
|
|
722
722
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
723
723
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
724
724
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
725
|
-
readonly tx_status: v.
|
|
725
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
726
726
|
readonly tx_result: v.ObjectSchema<{
|
|
727
727
|
readonly hex: v.StringSchema<undefined>;
|
|
728
728
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -771,7 +771,7 @@ declare const addressTransactionsResponseSchema: v.ObjectSchema<{
|
|
|
771
771
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
772
772
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
773
773
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
774
|
-
readonly tx_status: v.
|
|
774
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
775
775
|
readonly tx_result: v.ObjectSchema<{
|
|
776
776
|
readonly hex: v.StringSchema<undefined>;
|
|
777
777
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -814,7 +814,7 @@ declare const addressTransactionsResponseSchema: v.ObjectSchema<{
|
|
|
814
814
|
readonly parent_burn_block_time_iso: v.StringSchema<undefined>;
|
|
815
815
|
readonly canonical: v.BooleanSchema<undefined>;
|
|
816
816
|
readonly tx_index: v.NumberSchema<undefined>;
|
|
817
|
-
readonly tx_status: v.
|
|
817
|
+
readonly tx_status: v.StringSchema<undefined>;
|
|
818
818
|
readonly tx_result: v.ObjectSchema<{
|
|
819
819
|
readonly hex: v.StringSchema<undefined>;
|
|
820
820
|
readonly repr: v.StringSchema<undefined>;
|
|
@@ -861,7 +861,7 @@ declare const addressTransactionsResponseSchema: v.ObjectSchema<{
|
|
|
861
861
|
readonly total: v.NumberSchema<undefined>;
|
|
862
862
|
}, undefined>;
|
|
863
863
|
type AddressTransactionsResponse = v.InferOutput<typeof addressTransactionsResponseSchema>;
|
|
864
|
-
declare function addressTransactions(args: Args$
|
|
864
|
+
declare function addressTransactions(args: Args$8): Promise<Result$1<AddressTransactionsResponse, SafeError<"FetchAddressTransactionsError" | "ParseBodyError" | "ValidateDataError">>>;
|
|
865
865
|
|
|
866
866
|
type addressTransactions$1_AddressTransactionsResponse = AddressTransactionsResponse;
|
|
867
867
|
type addressTransactions$1_Result = Result;
|
|
@@ -870,7 +870,7 @@ declare namespace addressTransactions$1 {
|
|
|
870
870
|
export { type addressTransactions$1_AddressTransactionsResponse as AddressTransactionsResponse, type addressTransactions$1_Result as Result, type Results$3 as Results, addressTransactions$1_addressTransactions as addressTransactions };
|
|
871
871
|
}
|
|
872
872
|
|
|
873
|
-
type Options$
|
|
873
|
+
type Options$2 = {
|
|
874
874
|
poolPrincipal: string;
|
|
875
875
|
afterBlock?: number;
|
|
876
876
|
unanchored?: boolean;
|
|
@@ -900,7 +900,7 @@ declare const membersResponseSchema: v.ObjectSchema<{
|
|
|
900
900
|
}, undefined>, undefined>;
|
|
901
901
|
}, undefined>;
|
|
902
902
|
type MembersResponse = v.InferOutput<typeof membersResponseSchema>;
|
|
903
|
-
declare function members(opts: Options$
|
|
903
|
+
declare function members(opts: Options$2, apiOpts: ApiRequestOptions): Promise<Result$1<MembersResponse>>;
|
|
904
904
|
|
|
905
905
|
type members$1_Member = Member;
|
|
906
906
|
type members$1_MembersResponse = MembersResponse;
|
|
@@ -908,16 +908,16 @@ declare const members$1_memberSchema: typeof memberSchema;
|
|
|
908
908
|
declare const members$1_members: typeof members;
|
|
909
909
|
declare const members$1_membersResponseSchema: typeof membersResponseSchema;
|
|
910
910
|
declare namespace members$1 {
|
|
911
|
-
export { type members$1_Member as Member, type members$1_MembersResponse as MembersResponse, type Options$
|
|
911
|
+
export { type members$1_Member as Member, type members$1_MembersResponse as MembersResponse, type Options$2 as Options, members$1_memberSchema as memberSchema, members$1_members as members, members$1_membersResponseSchema as membersResponseSchema };
|
|
912
912
|
}
|
|
913
913
|
|
|
914
|
-
type
|
|
914
|
+
type Options$1 = {
|
|
915
915
|
sender: string;
|
|
916
916
|
arguments: string[];
|
|
917
917
|
contractAddress: string;
|
|
918
918
|
contractName: string;
|
|
919
919
|
functionName: string;
|
|
920
|
-
}
|
|
920
|
+
};
|
|
921
921
|
declare const readOnlyResponseSchema: v.VariantSchema<"okay", [v.ObjectSchema<{
|
|
922
922
|
readonly okay: v.LiteralSchema<true, undefined>;
|
|
923
923
|
readonly result: v.StringSchema<undefined>;
|
|
@@ -926,13 +926,13 @@ declare const readOnlyResponseSchema: v.VariantSchema<"okay", [v.ObjectSchema<{
|
|
|
926
926
|
readonly cause: v.UnknownSchema;
|
|
927
927
|
}, undefined>], undefined>;
|
|
928
928
|
type ReadOnlyResponse = v.InferOutput<typeof readOnlyResponseSchema>;
|
|
929
|
-
declare function readOnly(
|
|
929
|
+
declare function readOnly(opts: Options$1, apiOpts: ApiRequestOptions): Promise<Result$1<ReadOnlyResponse>>;
|
|
930
930
|
|
|
931
931
|
type readOnly$1_ReadOnlyResponse = ReadOnlyResponse;
|
|
932
932
|
declare const readOnly$1_readOnly: typeof readOnly;
|
|
933
933
|
declare const readOnly$1_readOnlyResponseSchema: typeof readOnlyResponseSchema;
|
|
934
934
|
declare namespace readOnly$1 {
|
|
935
|
-
export { type
|
|
935
|
+
export { type Options$1 as Options, type readOnly$1_ReadOnlyResponse as ReadOnlyResponse, readOnly$1_readOnly as readOnly, readOnly$1_readOnlyResponseSchema as readOnlyResponseSchema };
|
|
936
936
|
}
|
|
937
937
|
|
|
938
938
|
type Args$7 = {
|
package/dist/index.js
CHANGED
|
@@ -625,15 +625,15 @@ var readOnlyResponseSchema = v11.variant("okay", [
|
|
|
625
625
|
cause: v11.unknown()
|
|
626
626
|
})
|
|
627
627
|
]);
|
|
628
|
-
async function readOnly(
|
|
628
|
+
async function readOnly(opts, apiOpts) {
|
|
629
629
|
const init = {};
|
|
630
|
-
if (
|
|
630
|
+
if (apiOpts.apiKeyConfig) {
|
|
631
631
|
init.headers = {
|
|
632
|
-
[
|
|
632
|
+
[apiOpts.apiKeyConfig.header]: apiOpts.apiKeyConfig.key
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
635
|
const res = await fetch(
|
|
636
|
-
`${
|
|
636
|
+
`${apiOpts.baseUrl}/v2/contracts/call-read/${opts.contractAddress}/${opts.contractName}/${opts.functionName}`,
|
|
637
637
|
init
|
|
638
638
|
);
|
|
639
639
|
if (!res.ok) {
|
|
@@ -752,11 +752,7 @@ var baseTransactionSchema = v13.object({
|
|
|
752
752
|
parent_burn_block_time_iso: v13.string(),
|
|
753
753
|
canonical: v13.boolean(),
|
|
754
754
|
tx_index: v13.number(),
|
|
755
|
-
tx_status: v13.
|
|
756
|
-
v13.literal("success"),
|
|
757
|
-
v13.literal("abort_by_response"),
|
|
758
|
-
v13.literal("abort_by_post_condition")
|
|
759
|
-
]),
|
|
755
|
+
tx_status: v13.string(),
|
|
760
756
|
tx_result: v13.object({
|
|
761
757
|
hex: v13.string(),
|
|
762
758
|
repr: v13.string()
|