@hsuite/smart-engines-sdk 3.3.0 → 3.4.1

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.
@@ -122,6 +122,23 @@ declare const AccountBalanceSchema: z.ZodObject<{
122
122
  }[] | undefined;
123
123
  }>;
124
124
  export type AccountBalance = z.infer<typeof AccountBalanceSchema>;
125
+ export type HederaKeyShape = {
126
+ type: "ed25519";
127
+ key: string;
128
+ } | {
129
+ type: "keyList";
130
+ threshold: number;
131
+ keys: HederaKeyShape[];
132
+ };
133
+ export type PolkadotSignatoryShape = {
134
+ type: "account";
135
+ address: string;
136
+ } | {
137
+ type: "multisig";
138
+ address: string;
139
+ threshold: number;
140
+ signatories: PolkadotSignatoryShape[];
141
+ };
125
142
  declare const TransactionSchema: z.ZodObject<{
126
143
  id: z.ZodString;
127
144
  chain: z.ZodEnum<[
@@ -658,6 +675,837 @@ declare const ActionResultSchema: z.ZodObject<{
658
675
  notes?: string[] | undefined;
659
676
  }>;
660
677
  export type ActionResult = z.infer<typeof ActionResultSchema>;
678
+ declare const PreparedTransactionResponseSchema: z.ZodObject<{
679
+ chain: z.ZodEnum<[
680
+ "hedera",
681
+ "xrpl",
682
+ "polkadot",
683
+ "solana",
684
+ "stellar",
685
+ "ethereum",
686
+ "polygon",
687
+ "bitcoin",
688
+ "cardano"
689
+ ]>;
690
+ transactionType: z.ZodString;
691
+ transactionId: z.ZodString;
692
+ transactionBytes: z.ZodString;
693
+ expiresAt: z.ZodDate;
694
+ validatorSignatures: z.ZodArray<z.ZodObject<{
695
+ validatorId: z.ZodString;
696
+ publicKey: z.ZodString;
697
+ signature: z.ZodString;
698
+ signedAt: z.ZodDate;
699
+ algorithm: z.ZodOptional<z.ZodEnum<[
700
+ "ed25519",
701
+ "ecdsa-secp256k1",
702
+ "bls12-381"
703
+ ]>>;
704
+ }, "strip", z.ZodTypeAny, {
705
+ publicKey: string;
706
+ validatorId: string;
707
+ signature: string;
708
+ signedAt: Date;
709
+ algorithm?: "ed25519" | "ecdsa-secp256k1" | "bls12-381" | undefined;
710
+ }, {
711
+ publicKey: string;
712
+ validatorId: string;
713
+ signature: string;
714
+ signedAt: Date;
715
+ algorithm?: "ed25519" | "ecdsa-secp256k1" | "bls12-381" | undefined;
716
+ }>, "many">;
717
+ payerAccountId: z.ZodOptional<z.ZodString>;
718
+ estimatedFee: z.ZodOptional<z.ZodString>;
719
+ requiredSignatures: z.ZodOptional<z.ZodNumber>;
720
+ readyToSubmit: z.ZodDefault<z.ZodBoolean>;
721
+ metadata: z.ZodOptional<z.ZodUnion<[
722
+ z.ZodObject<{
723
+ nodeAccountIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
724
+ maxTransactionFee: z.ZodOptional<z.ZodString>;
725
+ memo: z.ZodOptional<z.ZodString>;
726
+ scheduleInfo: z.ZodOptional<z.ZodObject<{
727
+ scheduleId: z.ZodString;
728
+ adminKey: z.ZodOptional<z.ZodString>;
729
+ }, "strip", z.ZodTypeAny, {
730
+ scheduleId: string;
731
+ adminKey?: string | undefined;
732
+ }, {
733
+ scheduleId: string;
734
+ adminKey?: string | undefined;
735
+ }>>;
736
+ }, "strip", z.ZodTypeAny, {
737
+ memo?: string | undefined;
738
+ nodeAccountIds?: string[] | undefined;
739
+ maxTransactionFee?: string | undefined;
740
+ scheduleInfo?: {
741
+ scheduleId: string;
742
+ adminKey?: string | undefined;
743
+ } | undefined;
744
+ }, {
745
+ memo?: string | undefined;
746
+ nodeAccountIds?: string[] | undefined;
747
+ maxTransactionFee?: string | undefined;
748
+ scheduleInfo?: {
749
+ scheduleId: string;
750
+ adminKey?: string | undefined;
751
+ } | undefined;
752
+ }>,
753
+ z.ZodObject<{
754
+ sequence: z.ZodOptional<z.ZodNumber>;
755
+ lastLedgerSequence: z.ZodOptional<z.ZodNumber>;
756
+ signerList: z.ZodOptional<z.ZodArray<z.ZodObject<{
757
+ account: z.ZodString;
758
+ signerWeight: z.ZodNumber;
759
+ }, "strip", z.ZodTypeAny, {
760
+ account: string;
761
+ signerWeight: number;
762
+ }, {
763
+ account: string;
764
+ signerWeight: number;
765
+ }>, "many">>;
766
+ signerQuorum: z.ZodOptional<z.ZodNumber>;
767
+ }, "strip", z.ZodTypeAny, {
768
+ signerQuorum?: number | undefined;
769
+ sequence?: number | undefined;
770
+ lastLedgerSequence?: number | undefined;
771
+ signerList?: {
772
+ account: string;
773
+ signerWeight: number;
774
+ }[] | undefined;
775
+ }, {
776
+ signerQuorum?: number | undefined;
777
+ sequence?: number | undefined;
778
+ lastLedgerSequence?: number | undefined;
779
+ signerList?: {
780
+ account: string;
781
+ signerWeight: number;
782
+ }[] | undefined;
783
+ }>,
784
+ z.ZodObject<{
785
+ recentBlockhash: z.ZodOptional<z.ZodString>;
786
+ feePayer: z.ZodOptional<z.ZodString>;
787
+ programIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
788
+ squadsMultisigPda: z.ZodOptional<z.ZodString>;
789
+ squadsVaultPda: z.ZodOptional<z.ZodString>;
790
+ squadsTransactionIndex: z.ZodOptional<z.ZodNumber>;
791
+ squadsProposalAddress: z.ZodOptional<z.ZodString>;
792
+ multisigCreated: z.ZodOptional<z.ZodBoolean>;
793
+ securityMode: z.ZodOptional<z.ZodEnum<[
794
+ "partial",
795
+ "full"
796
+ ]>>;
797
+ splMint: z.ZodOptional<z.ZodString>;
798
+ }, "strip", z.ZodTypeAny, {
799
+ securityMode?: "partial" | "full" | undefined;
800
+ recentBlockhash?: string | undefined;
801
+ feePayer?: string | undefined;
802
+ programIds?: string[] | undefined;
803
+ squadsMultisigPda?: string | undefined;
804
+ squadsVaultPda?: string | undefined;
805
+ squadsTransactionIndex?: number | undefined;
806
+ squadsProposalAddress?: string | undefined;
807
+ multisigCreated?: boolean | undefined;
808
+ splMint?: string | undefined;
809
+ }, {
810
+ securityMode?: "partial" | "full" | undefined;
811
+ recentBlockhash?: string | undefined;
812
+ feePayer?: string | undefined;
813
+ programIds?: string[] | undefined;
814
+ squadsMultisigPda?: string | undefined;
815
+ squadsVaultPda?: string | undefined;
816
+ squadsTransactionIndex?: number | undefined;
817
+ squadsProposalAddress?: string | undefined;
818
+ multisigCreated?: boolean | undefined;
819
+ splMint?: string | undefined;
820
+ }>,
821
+ z.ZodObject<{
822
+ era: z.ZodOptional<z.ZodString>;
823
+ nonce: z.ZodOptional<z.ZodNumber>;
824
+ tip: z.ZodOptional<z.ZodString>;
825
+ specVersion: z.ZodOptional<z.ZodNumber>;
826
+ }, "strip", z.ZodTypeAny, {
827
+ era?: string | undefined;
828
+ nonce?: number | undefined;
829
+ tip?: string | undefined;
830
+ specVersion?: number | undefined;
831
+ }, {
832
+ era?: string | undefined;
833
+ nonce?: number | undefined;
834
+ tip?: string | undefined;
835
+ specVersion?: number | undefined;
836
+ }>,
837
+ z.ZodRecord<z.ZodString, z.ZodAny>
838
+ ]>>;
839
+ sovereignty: z.ZodOptional<z.ZodDiscriminatedUnion<"mode", [
840
+ z.ZodObject<{
841
+ mode: z.ZodLiteral<"partial">;
842
+ entityId: z.ZodString;
843
+ validatorPublicKeys: z.ZodArray<z.ZodString, "many">;
844
+ authorizationSet: z.ZodOptional<z.ZodDiscriminatedUnion<"chain", [
845
+ z.ZodObject<{
846
+ chain: z.ZodLiteral<"hedera">;
847
+ adminKey: z.ZodType<HederaKeyShape, z.ZodTypeDef, HederaKeyShape>;
848
+ supplyKey: z.ZodOptional<z.ZodType<HederaKeyShape, z.ZodTypeDef, HederaKeyShape>>;
849
+ freezeKey: z.ZodOptional<z.ZodType<HederaKeyShape, z.ZodTypeDef, HederaKeyShape>>;
850
+ wipeKey: z.ZodOptional<z.ZodType<HederaKeyShape, z.ZodTypeDef, HederaKeyShape>>;
851
+ pauseKey: z.ZodOptional<z.ZodType<HederaKeyShape, z.ZodTypeDef, HederaKeyShape>>;
852
+ kycKey: z.ZodOptional<z.ZodType<HederaKeyShape, z.ZodTypeDef, HederaKeyShape>>;
853
+ }, "strip", z.ZodTypeAny, {
854
+ chain: "hedera";
855
+ adminKey: HederaKeyShape;
856
+ supplyKey?: HederaKeyShape | undefined;
857
+ freezeKey?: HederaKeyShape | undefined;
858
+ wipeKey?: HederaKeyShape | undefined;
859
+ pauseKey?: HederaKeyShape | undefined;
860
+ kycKey?: HederaKeyShape | undefined;
861
+ }, {
862
+ chain: "hedera";
863
+ adminKey: HederaKeyShape;
864
+ supplyKey?: HederaKeyShape | undefined;
865
+ freezeKey?: HederaKeyShape | undefined;
866
+ wipeKey?: HederaKeyShape | undefined;
867
+ pauseKey?: HederaKeyShape | undefined;
868
+ kycKey?: HederaKeyShape | undefined;
869
+ }>,
870
+ z.ZodObject<{
871
+ chain: z.ZodLiteral<"xrpl">;
872
+ signerEntries: z.ZodArray<z.ZodObject<{
873
+ account: z.ZodString;
874
+ weight: z.ZodNumber;
875
+ }, "strip", z.ZodTypeAny, {
876
+ account: string;
877
+ weight: number;
878
+ }, {
879
+ account: string;
880
+ weight: number;
881
+ }>, "many">;
882
+ signerQuorum: z.ZodNumber;
883
+ masterDisabled: z.ZodBoolean;
884
+ }, "strip", z.ZodTypeAny, {
885
+ chain: "xrpl";
886
+ signerEntries: {
887
+ account: string;
888
+ weight: number;
889
+ }[];
890
+ signerQuorum: number;
891
+ masterDisabled: boolean;
892
+ }, {
893
+ chain: "xrpl";
894
+ signerEntries: {
895
+ account: string;
896
+ weight: number;
897
+ }[];
898
+ signerQuorum: number;
899
+ masterDisabled: boolean;
900
+ }>,
901
+ z.ZodObject<{
902
+ chain: z.ZodLiteral<"stellar">;
903
+ signers: z.ZodArray<z.ZodObject<{
904
+ key: z.ZodString;
905
+ weight: z.ZodNumber;
906
+ }, "strip", z.ZodTypeAny, {
907
+ key: string;
908
+ weight: number;
909
+ }, {
910
+ key: string;
911
+ weight: number;
912
+ }>, "many">;
913
+ thresholds: z.ZodObject<{
914
+ low: z.ZodNumber;
915
+ med: z.ZodNumber;
916
+ high: z.ZodNumber;
917
+ }, "strip", z.ZodTypeAny, {
918
+ low: number;
919
+ med: number;
920
+ high: number;
921
+ }, {
922
+ low: number;
923
+ med: number;
924
+ high: number;
925
+ }>;
926
+ masterWeight: z.ZodNumber;
927
+ }, "strip", z.ZodTypeAny, {
928
+ chain: "stellar";
929
+ signers: {
930
+ key: string;
931
+ weight: number;
932
+ }[];
933
+ thresholds: {
934
+ low: number;
935
+ med: number;
936
+ high: number;
937
+ };
938
+ masterWeight: number;
939
+ }, {
940
+ chain: "stellar";
941
+ signers: {
942
+ key: string;
943
+ weight: number;
944
+ }[];
945
+ thresholds: {
946
+ low: number;
947
+ med: number;
948
+ high: number;
949
+ };
950
+ masterWeight: number;
951
+ }>,
952
+ z.ZodObject<{
953
+ chain: z.ZodLiteral<"polkadot">;
954
+ address: z.ZodString;
955
+ signatory: z.ZodType<PolkadotSignatoryShape, z.ZodTypeDef, PolkadotSignatoryShape>;
956
+ ss58Format: z.ZodNumber;
957
+ }, "strip", z.ZodTypeAny, {
958
+ chain: "polkadot";
959
+ address: string;
960
+ signatory: PolkadotSignatoryShape;
961
+ ss58Format: number;
962
+ }, {
963
+ chain: "polkadot";
964
+ address: string;
965
+ signatory: PolkadotSignatoryShape;
966
+ ss58Format: number;
967
+ }>
968
+ ]>>;
969
+ }, "strip", z.ZodTypeAny, {
970
+ entityId: string;
971
+ mode: "partial";
972
+ validatorPublicKeys: string[];
973
+ authorizationSet?: {
974
+ chain: "hedera";
975
+ adminKey: HederaKeyShape;
976
+ supplyKey?: HederaKeyShape | undefined;
977
+ freezeKey?: HederaKeyShape | undefined;
978
+ wipeKey?: HederaKeyShape | undefined;
979
+ pauseKey?: HederaKeyShape | undefined;
980
+ kycKey?: HederaKeyShape | undefined;
981
+ } | {
982
+ chain: "xrpl";
983
+ signerEntries: {
984
+ account: string;
985
+ weight: number;
986
+ }[];
987
+ signerQuorum: number;
988
+ masterDisabled: boolean;
989
+ } | {
990
+ chain: "stellar";
991
+ signers: {
992
+ key: string;
993
+ weight: number;
994
+ }[];
995
+ thresholds: {
996
+ low: number;
997
+ med: number;
998
+ high: number;
999
+ };
1000
+ masterWeight: number;
1001
+ } | {
1002
+ chain: "polkadot";
1003
+ address: string;
1004
+ signatory: PolkadotSignatoryShape;
1005
+ ss58Format: number;
1006
+ } | undefined;
1007
+ }, {
1008
+ entityId: string;
1009
+ mode: "partial";
1010
+ validatorPublicKeys: string[];
1011
+ authorizationSet?: {
1012
+ chain: "hedera";
1013
+ adminKey: HederaKeyShape;
1014
+ supplyKey?: HederaKeyShape | undefined;
1015
+ freezeKey?: HederaKeyShape | undefined;
1016
+ wipeKey?: HederaKeyShape | undefined;
1017
+ pauseKey?: HederaKeyShape | undefined;
1018
+ kycKey?: HederaKeyShape | undefined;
1019
+ } | {
1020
+ chain: "xrpl";
1021
+ signerEntries: {
1022
+ account: string;
1023
+ weight: number;
1024
+ }[];
1025
+ signerQuorum: number;
1026
+ masterDisabled: boolean;
1027
+ } | {
1028
+ chain: "stellar";
1029
+ signers: {
1030
+ key: string;
1031
+ weight: number;
1032
+ }[];
1033
+ thresholds: {
1034
+ low: number;
1035
+ med: number;
1036
+ high: number;
1037
+ };
1038
+ masterWeight: number;
1039
+ } | {
1040
+ chain: "polkadot";
1041
+ address: string;
1042
+ signatory: PolkadotSignatoryShape;
1043
+ ss58Format: number;
1044
+ } | undefined;
1045
+ }>,
1046
+ z.ZodObject<{
1047
+ mode: z.ZodLiteral<"full">;
1048
+ entityId: z.ZodString;
1049
+ validatorPublicKeys: z.ZodArray<z.ZodString, "many">;
1050
+ authorizationSet: z.ZodOptional<z.ZodDiscriminatedUnion<"chain", [
1051
+ z.ZodObject<{
1052
+ chain: z.ZodLiteral<"hedera">;
1053
+ adminKey: z.ZodType<HederaKeyShape, z.ZodTypeDef, HederaKeyShape>;
1054
+ supplyKey: z.ZodOptional<z.ZodType<HederaKeyShape, z.ZodTypeDef, HederaKeyShape>>;
1055
+ freezeKey: z.ZodOptional<z.ZodType<HederaKeyShape, z.ZodTypeDef, HederaKeyShape>>;
1056
+ wipeKey: z.ZodOptional<z.ZodType<HederaKeyShape, z.ZodTypeDef, HederaKeyShape>>;
1057
+ pauseKey: z.ZodOptional<z.ZodType<HederaKeyShape, z.ZodTypeDef, HederaKeyShape>>;
1058
+ kycKey: z.ZodOptional<z.ZodType<HederaKeyShape, z.ZodTypeDef, HederaKeyShape>>;
1059
+ }, "strip", z.ZodTypeAny, {
1060
+ chain: "hedera";
1061
+ adminKey: HederaKeyShape;
1062
+ supplyKey?: HederaKeyShape | undefined;
1063
+ freezeKey?: HederaKeyShape | undefined;
1064
+ wipeKey?: HederaKeyShape | undefined;
1065
+ pauseKey?: HederaKeyShape | undefined;
1066
+ kycKey?: HederaKeyShape | undefined;
1067
+ }, {
1068
+ chain: "hedera";
1069
+ adminKey: HederaKeyShape;
1070
+ supplyKey?: HederaKeyShape | undefined;
1071
+ freezeKey?: HederaKeyShape | undefined;
1072
+ wipeKey?: HederaKeyShape | undefined;
1073
+ pauseKey?: HederaKeyShape | undefined;
1074
+ kycKey?: HederaKeyShape | undefined;
1075
+ }>,
1076
+ z.ZodObject<{
1077
+ chain: z.ZodLiteral<"xrpl">;
1078
+ signerEntries: z.ZodArray<z.ZodObject<{
1079
+ account: z.ZodString;
1080
+ weight: z.ZodNumber;
1081
+ }, "strip", z.ZodTypeAny, {
1082
+ account: string;
1083
+ weight: number;
1084
+ }, {
1085
+ account: string;
1086
+ weight: number;
1087
+ }>, "many">;
1088
+ signerQuorum: z.ZodNumber;
1089
+ masterDisabled: z.ZodBoolean;
1090
+ }, "strip", z.ZodTypeAny, {
1091
+ chain: "xrpl";
1092
+ signerEntries: {
1093
+ account: string;
1094
+ weight: number;
1095
+ }[];
1096
+ signerQuorum: number;
1097
+ masterDisabled: boolean;
1098
+ }, {
1099
+ chain: "xrpl";
1100
+ signerEntries: {
1101
+ account: string;
1102
+ weight: number;
1103
+ }[];
1104
+ signerQuorum: number;
1105
+ masterDisabled: boolean;
1106
+ }>,
1107
+ z.ZodObject<{
1108
+ chain: z.ZodLiteral<"stellar">;
1109
+ signers: z.ZodArray<z.ZodObject<{
1110
+ key: z.ZodString;
1111
+ weight: z.ZodNumber;
1112
+ }, "strip", z.ZodTypeAny, {
1113
+ key: string;
1114
+ weight: number;
1115
+ }, {
1116
+ key: string;
1117
+ weight: number;
1118
+ }>, "many">;
1119
+ thresholds: z.ZodObject<{
1120
+ low: z.ZodNumber;
1121
+ med: z.ZodNumber;
1122
+ high: z.ZodNumber;
1123
+ }, "strip", z.ZodTypeAny, {
1124
+ low: number;
1125
+ med: number;
1126
+ high: number;
1127
+ }, {
1128
+ low: number;
1129
+ med: number;
1130
+ high: number;
1131
+ }>;
1132
+ masterWeight: z.ZodNumber;
1133
+ }, "strip", z.ZodTypeAny, {
1134
+ chain: "stellar";
1135
+ signers: {
1136
+ key: string;
1137
+ weight: number;
1138
+ }[];
1139
+ thresholds: {
1140
+ low: number;
1141
+ med: number;
1142
+ high: number;
1143
+ };
1144
+ masterWeight: number;
1145
+ }, {
1146
+ chain: "stellar";
1147
+ signers: {
1148
+ key: string;
1149
+ weight: number;
1150
+ }[];
1151
+ thresholds: {
1152
+ low: number;
1153
+ med: number;
1154
+ high: number;
1155
+ };
1156
+ masterWeight: number;
1157
+ }>,
1158
+ z.ZodObject<{
1159
+ chain: z.ZodLiteral<"polkadot">;
1160
+ address: z.ZodString;
1161
+ signatory: z.ZodType<PolkadotSignatoryShape, z.ZodTypeDef, PolkadotSignatoryShape>;
1162
+ ss58Format: z.ZodNumber;
1163
+ }, "strip", z.ZodTypeAny, {
1164
+ chain: "polkadot";
1165
+ address: string;
1166
+ signatory: PolkadotSignatoryShape;
1167
+ ss58Format: number;
1168
+ }, {
1169
+ chain: "polkadot";
1170
+ address: string;
1171
+ signatory: PolkadotSignatoryShape;
1172
+ ss58Format: number;
1173
+ }>
1174
+ ]>>;
1175
+ }, "strip", z.ZodTypeAny, {
1176
+ entityId: string;
1177
+ mode: "full";
1178
+ validatorPublicKeys: string[];
1179
+ authorizationSet?: {
1180
+ chain: "hedera";
1181
+ adminKey: HederaKeyShape;
1182
+ supplyKey?: HederaKeyShape | undefined;
1183
+ freezeKey?: HederaKeyShape | undefined;
1184
+ wipeKey?: HederaKeyShape | undefined;
1185
+ pauseKey?: HederaKeyShape | undefined;
1186
+ kycKey?: HederaKeyShape | undefined;
1187
+ } | {
1188
+ chain: "xrpl";
1189
+ signerEntries: {
1190
+ account: string;
1191
+ weight: number;
1192
+ }[];
1193
+ signerQuorum: number;
1194
+ masterDisabled: boolean;
1195
+ } | {
1196
+ chain: "stellar";
1197
+ signers: {
1198
+ key: string;
1199
+ weight: number;
1200
+ }[];
1201
+ thresholds: {
1202
+ low: number;
1203
+ med: number;
1204
+ high: number;
1205
+ };
1206
+ masterWeight: number;
1207
+ } | {
1208
+ chain: "polkadot";
1209
+ address: string;
1210
+ signatory: PolkadotSignatoryShape;
1211
+ ss58Format: number;
1212
+ } | undefined;
1213
+ }, {
1214
+ entityId: string;
1215
+ mode: "full";
1216
+ validatorPublicKeys: string[];
1217
+ authorizationSet?: {
1218
+ chain: "hedera";
1219
+ adminKey: HederaKeyShape;
1220
+ supplyKey?: HederaKeyShape | undefined;
1221
+ freezeKey?: HederaKeyShape | undefined;
1222
+ wipeKey?: HederaKeyShape | undefined;
1223
+ pauseKey?: HederaKeyShape | undefined;
1224
+ kycKey?: HederaKeyShape | undefined;
1225
+ } | {
1226
+ chain: "xrpl";
1227
+ signerEntries: {
1228
+ account: string;
1229
+ weight: number;
1230
+ }[];
1231
+ signerQuorum: number;
1232
+ masterDisabled: boolean;
1233
+ } | {
1234
+ chain: "stellar";
1235
+ signers: {
1236
+ key: string;
1237
+ weight: number;
1238
+ }[];
1239
+ thresholds: {
1240
+ low: number;
1241
+ med: number;
1242
+ high: number;
1243
+ };
1244
+ masterWeight: number;
1245
+ } | {
1246
+ chain: "polkadot";
1247
+ address: string;
1248
+ signatory: PolkadotSignatoryShape;
1249
+ ss58Format: number;
1250
+ } | undefined;
1251
+ }>
1252
+ ]>>;
1253
+ }, "strip", z.ZodTypeAny, {
1254
+ chain: "hedera" | "xrpl" | "polkadot" | "solana" | "stellar" | "ethereum" | "polygon" | "bitcoin" | "cardano";
1255
+ transactionId: string;
1256
+ transactionType: string;
1257
+ transactionBytes: string;
1258
+ expiresAt: Date;
1259
+ validatorSignatures: {
1260
+ publicKey: string;
1261
+ validatorId: string;
1262
+ signature: string;
1263
+ signedAt: Date;
1264
+ algorithm?: "ed25519" | "ecdsa-secp256k1" | "bls12-381" | undefined;
1265
+ }[];
1266
+ readyToSubmit: boolean;
1267
+ metadata?: Record<string, any> | {
1268
+ memo?: string | undefined;
1269
+ nodeAccountIds?: string[] | undefined;
1270
+ maxTransactionFee?: string | undefined;
1271
+ scheduleInfo?: {
1272
+ scheduleId: string;
1273
+ adminKey?: string | undefined;
1274
+ } | undefined;
1275
+ } | {
1276
+ signerQuorum?: number | undefined;
1277
+ sequence?: number | undefined;
1278
+ lastLedgerSequence?: number | undefined;
1279
+ signerList?: {
1280
+ account: string;
1281
+ signerWeight: number;
1282
+ }[] | undefined;
1283
+ } | {
1284
+ securityMode?: "partial" | "full" | undefined;
1285
+ recentBlockhash?: string | undefined;
1286
+ feePayer?: string | undefined;
1287
+ programIds?: string[] | undefined;
1288
+ squadsMultisigPda?: string | undefined;
1289
+ squadsVaultPda?: string | undefined;
1290
+ squadsTransactionIndex?: number | undefined;
1291
+ squadsProposalAddress?: string | undefined;
1292
+ multisigCreated?: boolean | undefined;
1293
+ splMint?: string | undefined;
1294
+ } | {
1295
+ era?: string | undefined;
1296
+ nonce?: number | undefined;
1297
+ tip?: string | undefined;
1298
+ specVersion?: number | undefined;
1299
+ } | undefined;
1300
+ payerAccountId?: string | undefined;
1301
+ estimatedFee?: string | undefined;
1302
+ requiredSignatures?: number | undefined;
1303
+ sovereignty?: {
1304
+ entityId: string;
1305
+ mode: "partial";
1306
+ validatorPublicKeys: string[];
1307
+ authorizationSet?: {
1308
+ chain: "hedera";
1309
+ adminKey: HederaKeyShape;
1310
+ supplyKey?: HederaKeyShape | undefined;
1311
+ freezeKey?: HederaKeyShape | undefined;
1312
+ wipeKey?: HederaKeyShape | undefined;
1313
+ pauseKey?: HederaKeyShape | undefined;
1314
+ kycKey?: HederaKeyShape | undefined;
1315
+ } | {
1316
+ chain: "xrpl";
1317
+ signerEntries: {
1318
+ account: string;
1319
+ weight: number;
1320
+ }[];
1321
+ signerQuorum: number;
1322
+ masterDisabled: boolean;
1323
+ } | {
1324
+ chain: "stellar";
1325
+ signers: {
1326
+ key: string;
1327
+ weight: number;
1328
+ }[];
1329
+ thresholds: {
1330
+ low: number;
1331
+ med: number;
1332
+ high: number;
1333
+ };
1334
+ masterWeight: number;
1335
+ } | {
1336
+ chain: "polkadot";
1337
+ address: string;
1338
+ signatory: PolkadotSignatoryShape;
1339
+ ss58Format: number;
1340
+ } | undefined;
1341
+ } | {
1342
+ entityId: string;
1343
+ mode: "full";
1344
+ validatorPublicKeys: string[];
1345
+ authorizationSet?: {
1346
+ chain: "hedera";
1347
+ adminKey: HederaKeyShape;
1348
+ supplyKey?: HederaKeyShape | undefined;
1349
+ freezeKey?: HederaKeyShape | undefined;
1350
+ wipeKey?: HederaKeyShape | undefined;
1351
+ pauseKey?: HederaKeyShape | undefined;
1352
+ kycKey?: HederaKeyShape | undefined;
1353
+ } | {
1354
+ chain: "xrpl";
1355
+ signerEntries: {
1356
+ account: string;
1357
+ weight: number;
1358
+ }[];
1359
+ signerQuorum: number;
1360
+ masterDisabled: boolean;
1361
+ } | {
1362
+ chain: "stellar";
1363
+ signers: {
1364
+ key: string;
1365
+ weight: number;
1366
+ }[];
1367
+ thresholds: {
1368
+ low: number;
1369
+ med: number;
1370
+ high: number;
1371
+ };
1372
+ masterWeight: number;
1373
+ } | {
1374
+ chain: "polkadot";
1375
+ address: string;
1376
+ signatory: PolkadotSignatoryShape;
1377
+ ss58Format: number;
1378
+ } | undefined;
1379
+ } | undefined;
1380
+ }, {
1381
+ chain: "hedera" | "xrpl" | "polkadot" | "solana" | "stellar" | "ethereum" | "polygon" | "bitcoin" | "cardano";
1382
+ transactionId: string;
1383
+ transactionType: string;
1384
+ transactionBytes: string;
1385
+ expiresAt: Date;
1386
+ validatorSignatures: {
1387
+ publicKey: string;
1388
+ validatorId: string;
1389
+ signature: string;
1390
+ signedAt: Date;
1391
+ algorithm?: "ed25519" | "ecdsa-secp256k1" | "bls12-381" | undefined;
1392
+ }[];
1393
+ metadata?: Record<string, any> | {
1394
+ memo?: string | undefined;
1395
+ nodeAccountIds?: string[] | undefined;
1396
+ maxTransactionFee?: string | undefined;
1397
+ scheduleInfo?: {
1398
+ scheduleId: string;
1399
+ adminKey?: string | undefined;
1400
+ } | undefined;
1401
+ } | {
1402
+ signerQuorum?: number | undefined;
1403
+ sequence?: number | undefined;
1404
+ lastLedgerSequence?: number | undefined;
1405
+ signerList?: {
1406
+ account: string;
1407
+ signerWeight: number;
1408
+ }[] | undefined;
1409
+ } | {
1410
+ securityMode?: "partial" | "full" | undefined;
1411
+ recentBlockhash?: string | undefined;
1412
+ feePayer?: string | undefined;
1413
+ programIds?: string[] | undefined;
1414
+ squadsMultisigPda?: string | undefined;
1415
+ squadsVaultPda?: string | undefined;
1416
+ squadsTransactionIndex?: number | undefined;
1417
+ squadsProposalAddress?: string | undefined;
1418
+ multisigCreated?: boolean | undefined;
1419
+ splMint?: string | undefined;
1420
+ } | {
1421
+ era?: string | undefined;
1422
+ nonce?: number | undefined;
1423
+ tip?: string | undefined;
1424
+ specVersion?: number | undefined;
1425
+ } | undefined;
1426
+ payerAccountId?: string | undefined;
1427
+ estimatedFee?: string | undefined;
1428
+ requiredSignatures?: number | undefined;
1429
+ readyToSubmit?: boolean | undefined;
1430
+ sovereignty?: {
1431
+ entityId: string;
1432
+ mode: "partial";
1433
+ validatorPublicKeys: string[];
1434
+ authorizationSet?: {
1435
+ chain: "hedera";
1436
+ adminKey: HederaKeyShape;
1437
+ supplyKey?: HederaKeyShape | undefined;
1438
+ freezeKey?: HederaKeyShape | undefined;
1439
+ wipeKey?: HederaKeyShape | undefined;
1440
+ pauseKey?: HederaKeyShape | undefined;
1441
+ kycKey?: HederaKeyShape | undefined;
1442
+ } | {
1443
+ chain: "xrpl";
1444
+ signerEntries: {
1445
+ account: string;
1446
+ weight: number;
1447
+ }[];
1448
+ signerQuorum: number;
1449
+ masterDisabled: boolean;
1450
+ } | {
1451
+ chain: "stellar";
1452
+ signers: {
1453
+ key: string;
1454
+ weight: number;
1455
+ }[];
1456
+ thresholds: {
1457
+ low: number;
1458
+ med: number;
1459
+ high: number;
1460
+ };
1461
+ masterWeight: number;
1462
+ } | {
1463
+ chain: "polkadot";
1464
+ address: string;
1465
+ signatory: PolkadotSignatoryShape;
1466
+ ss58Format: number;
1467
+ } | undefined;
1468
+ } | {
1469
+ entityId: string;
1470
+ mode: "full";
1471
+ validatorPublicKeys: string[];
1472
+ authorizationSet?: {
1473
+ chain: "hedera";
1474
+ adminKey: HederaKeyShape;
1475
+ supplyKey?: HederaKeyShape | undefined;
1476
+ freezeKey?: HederaKeyShape | undefined;
1477
+ wipeKey?: HederaKeyShape | undefined;
1478
+ pauseKey?: HederaKeyShape | undefined;
1479
+ kycKey?: HederaKeyShape | undefined;
1480
+ } | {
1481
+ chain: "xrpl";
1482
+ signerEntries: {
1483
+ account: string;
1484
+ weight: number;
1485
+ }[];
1486
+ signerQuorum: number;
1487
+ masterDisabled: boolean;
1488
+ } | {
1489
+ chain: "stellar";
1490
+ signers: {
1491
+ key: string;
1492
+ weight: number;
1493
+ }[];
1494
+ thresholds: {
1495
+ low: number;
1496
+ med: number;
1497
+ high: number;
1498
+ };
1499
+ masterWeight: number;
1500
+ } | {
1501
+ chain: "polkadot";
1502
+ address: string;
1503
+ signatory: PolkadotSignatoryShape;
1504
+ ss58Format: number;
1505
+ } | undefined;
1506
+ } | undefined;
1507
+ }>;
1508
+ export type PreparedTransactionResponse = z.infer<typeof PreparedTransactionResponseSchema>;
661
1509
  export interface ValidatorNetworkEndpoints {
662
1510
  apiEndpoint: string;
663
1511
  natsEndpoint?: string;
@@ -695,6 +1543,85 @@ export interface ClusterInfo {
695
1543
  endpoints: ClusterEndpointsView;
696
1544
  nodeIds: string[];
697
1545
  }
1546
+ export type HttpClient = {
1547
+ post<T = any>(path: string, body: unknown): Promise<T>;
1548
+ get<T = any>(path: string): Promise<T>;
1549
+ put<T = any>(path: string, body: unknown): Promise<T>;
1550
+ patch<T = any>(path: string, body: unknown): Promise<T>;
1551
+ delete<T = any>(path: string): Promise<T>;
1552
+ getText(path: string): Promise<string>;
1553
+ upload<T = any>(path: string, file: Blob | Buffer, filename: string, metadata?: Record<string, string>, fieldName?: string): Promise<T>;
1554
+ };
1555
+ export type DiscoveryClusterEndpoints = {
1556
+ clusterId: string;
1557
+ gatewayUrl: string;
1558
+ harborUrl?: string;
1559
+ natsUrl?: string;
1560
+ publicIp?: string;
1561
+ region?: string;
1562
+ };
1563
+ export type DiscoveryClusterRecord = {
1564
+ clusterId: string;
1565
+ endpoints: DiscoveryClusterEndpoints;
1566
+ nodeIds: string[];
1567
+ };
1568
+ export type DiscoveryNodeRecord = {
1569
+ nodeId: string;
1570
+ publicKey?: string;
1571
+ status?: string;
1572
+ endpoints: DiscoveryClusterEndpoints;
1573
+ endpointsCid: string;
1574
+ lastEventTs: string;
1575
+ };
1576
+ export type DiscoveryPlatformImageManifest = {
1577
+ imageName: string;
1578
+ version: string;
1579
+ sha256digest: string;
1580
+ publishedAt: string;
1581
+ publisherNodeId?: string;
1582
+ metadata?: Record<string, unknown>;
1583
+ };
1584
+ export type DiscoveryPlatformImageEnvelope = {
1585
+ manifest: DiscoveryPlatformImageManifest;
1586
+ signature: string;
1587
+ publicKey: string;
1588
+ };
1589
+ export type DiscoveryVerifyResult = {
1590
+ verified: boolean;
1591
+ reason?: string;
1592
+ };
1593
+ declare class DiscoveryClient {
1594
+ private readonly http;
1595
+ readonly platformImages: PlatformImagesClient;
1596
+ constructor(http: HttpClient);
1597
+ listClusters(): Promise<{
1598
+ clusters: DiscoveryClusterRecord[];
1599
+ }>;
1600
+ listAllClusters(): Promise<{
1601
+ records: DiscoveryNodeRecord[];
1602
+ }>;
1603
+ getClusterByNode(nodeId: string): Promise<{
1604
+ record: DiscoveryNodeRecord | null;
1605
+ }>;
1606
+ }
1607
+ declare class PlatformImagesClient {
1608
+ private readonly http;
1609
+ constructor(http: HttpClient);
1610
+ list(): Promise<{
1611
+ manifests: DiscoveryPlatformImageManifest[];
1612
+ }>;
1613
+ listEnvelopes(): Promise<{
1614
+ envelopes: DiscoveryPlatformImageEnvelope[];
1615
+ }>;
1616
+ get(imageName: string): Promise<{
1617
+ imageName: string;
1618
+ manifests: DiscoveryPlatformImageManifest[];
1619
+ }>;
1620
+ getVersion(imageName: string, version: string): Promise<{
1621
+ manifest: DiscoveryPlatformImageManifest | null;
1622
+ }>;
1623
+ verify(imageName: string, version: string, digest: string): Promise<DiscoveryVerifyResult>;
1624
+ }
698
1625
  export type AuthChain = "hedera" | "xrpl" | "polkadot" | "stellar" | "solana";
699
1626
  export interface AuthenticateResponse {
700
1627
  token: string;
@@ -718,13 +1645,6 @@ export interface ResilientHttpConfig {
718
1645
  onCircuitBreakerStateChange?: (state: "closed" | "open" | "half_open") => void;
719
1646
  }
720
1647
  export type NetworkName = "testnet" | "mainnet";
721
- export type HttpClient = {
722
- post<T = any>(path: string, body: unknown): Promise<T>;
723
- get<T = any>(path: string): Promise<T>;
724
- put<T = any>(path: string, body: unknown): Promise<T>;
725
- delete<T = any>(path: string): Promise<T>;
726
- upload<T = any>(path: string, file: Blob | Buffer, filename: string, metadata?: Record<string, string>, fieldName?: string): Promise<T>;
727
- };
728
1648
  export type SubscriptionTierName = "free_testnet" | "starter" | "professional" | "enterprise";
729
1649
  export type SubscriptionStatus = "pending_deposit" | "deposit_confirmed" | "active" | "expired" | "cancelled";
730
1650
  export type DepositWalletStatus = "pending" | "locked" | "expired" | "slashed" | "released";
@@ -820,6 +1740,120 @@ export type SubscriptionListResponse = {
820
1740
  createdAt: string;
821
1741
  }>;
822
1742
  };
1743
+ export type PendingTierChange = {
1744
+ fromTier?: SubscriptionTierName;
1745
+ toTier?: SubscriptionTierName;
1746
+ direction?: "upgrade" | "downgrade";
1747
+ effectiveAt?: string;
1748
+ depositInstructions?: {
1749
+ walletAddress: string;
1750
+ tokenId: string;
1751
+ amount: string;
1752
+ chain: string;
1753
+ };
1754
+ };
1755
+ export type DowngradeSubscriptionRequest = {
1756
+ appId: string;
1757
+ toTier: SubscriptionTierName;
1758
+ };
1759
+ export type DowngradeSubscriptionResponse = {
1760
+ success: boolean;
1761
+ appId: string;
1762
+ pendingTierChange?: PendingTierChange;
1763
+ message: string;
1764
+ };
1765
+ export type UpgradeSubscriptionRequest = {
1766
+ appId: string;
1767
+ toTier: SubscriptionTierName;
1768
+ };
1769
+ export type UpgradeSubscriptionResponse = {
1770
+ success: boolean;
1771
+ appId: string;
1772
+ pendingTierChange?: PendingTierChange;
1773
+ depositInstructions?: {
1774
+ walletAddress: string;
1775
+ tokenId: string;
1776
+ amount: string;
1777
+ chain: string;
1778
+ };
1779
+ message: string;
1780
+ };
1781
+ export type CancelTierChangeRequest = {
1782
+ appId: string;
1783
+ };
1784
+ export type CancelTierChangeResponse = {
1785
+ success: boolean;
1786
+ appId: string;
1787
+ message: string;
1788
+ };
1789
+ export type ActiveSubscriptionForWalletResponse = {
1790
+ active: boolean;
1791
+ };
1792
+ export type SubscriptionUsageSummaryResponse = {
1793
+ appId: string;
1794
+ total: number;
1795
+ byCategory: {
1796
+ database: number;
1797
+ functions: number;
1798
+ messaging: number;
1799
+ storage: number;
1800
+ ipfs: number;
1801
+ snapshots: number;
1802
+ other: number;
1803
+ };
1804
+ recordCount: number;
1805
+ lastUpdated: string;
1806
+ };
1807
+ export type SubscriptionUsageStatusResponse = {
1808
+ appId: string;
1809
+ usagePercent: number;
1810
+ currentUsage: number;
1811
+ dailyLimit: number;
1812
+ overagePercent: number;
1813
+ inGracePeriod: boolean;
1814
+ graceExpiresAt: string | null;
1815
+ blocked: boolean;
1816
+ suggestUpgrade: boolean;
1817
+ nextTier: {
1818
+ tier: SubscriptionTierName;
1819
+ name: string;
1820
+ apiCallsPerDay: number;
1821
+ monthlyPriceHsuite: number;
1822
+ } | null;
1823
+ projectedDaysUntilLimit: number | null;
1824
+ };
1825
+ export type SubscriptionBillingLedgerEntry = {
1826
+ id: string;
1827
+ subscriptionId: string;
1828
+ operation: string;
1829
+ amount: string;
1830
+ balanceAfter: string;
1831
+ timestamp: string;
1832
+ metadata?: Record<string, unknown>;
1833
+ };
1834
+ export type SubscriptionBillingResponse = {
1835
+ appId: string;
1836
+ entries: SubscriptionBillingLedgerEntry[];
1837
+ total: number;
1838
+ hasMore: boolean;
1839
+ };
1840
+ export type GetBillingOptions = {
1841
+ limit?: number;
1842
+ offset?: number;
1843
+ from?: string;
1844
+ to?: string;
1845
+ };
1846
+ export type MintCustomerSubscriptionRequest = {
1847
+ appId: string;
1848
+ customerAddress: string;
1849
+ customerChain: "xrpl";
1850
+ metadataCid: string;
1851
+ };
1852
+ export type MintCustomerSubscriptionResponse = {
1853
+ success: true;
1854
+ nftSerial: number;
1855
+ txHash: string;
1856
+ };
823
1857
  export type BalanceResponse = {
824
1858
  appId: string;
825
1859
  subscriptionId: string;
@@ -839,6 +1873,14 @@ declare class SubscriptionClient {
839
1873
  list(): Promise<SubscriptionListResponse>;
840
1874
  listByStatus(status: SubscriptionStatus): Promise<SubscriptionListResponse>;
841
1875
  getBalance(appId: string): Promise<BalanceResponse>;
1876
+ downgrade(request: DowngradeSubscriptionRequest): Promise<DowngradeSubscriptionResponse>;
1877
+ upgrade(request: UpgradeSubscriptionRequest): Promise<UpgradeSubscriptionResponse>;
1878
+ cancelTierChange(request: CancelTierChangeRequest): Promise<CancelTierChangeResponse>;
1879
+ getActiveFor(walletAddress: string): Promise<ActiveSubscriptionForWalletResponse>;
1880
+ getUsage(appId: string): Promise<SubscriptionUsageSummaryResponse>;
1881
+ getUsageStatus(appId: string): Promise<SubscriptionUsageStatusResponse>;
1882
+ getBilling(appId: string, options?: GetBillingOptions): Promise<SubscriptionBillingResponse>;
1883
+ mintCustomer(request: MintCustomerSubscriptionRequest): Promise<MintCustomerSubscriptionResponse>;
842
1884
  }
843
1885
  export type EntityType = "account" | "token" | "topic";
844
1886
  export type EntityCreationOptions = {
@@ -929,13 +1971,44 @@ export type MultiSigStatusResponse = {
929
1971
  threshold?: number;
930
1972
  participants?: string[];
931
1973
  };
1974
+ export type TssJobType = "entity-create";
1975
+ export type TssJobStatus = "pending" | "in-progress" | "success" | "failed";
1976
+ export type TssJobAccepted = {
1977
+ jobId: string;
1978
+ statusUrl: string;
1979
+ status: "pending";
1980
+ };
1981
+ export type TssJobResponse = {
1982
+ jobId: string;
1983
+ type: TssJobType;
1984
+ status: TssJobStatus;
1985
+ request?: unknown;
1986
+ result?: unknown;
1987
+ error?: {
1988
+ code: string;
1989
+ message: string;
1990
+ };
1991
+ createdAt: string;
1992
+ updatedAt: string;
1993
+ };
1994
+ export type SignForAppRequest = {
1995
+ payloadHex: string;
1996
+ };
1997
+ export type SignForAppResponse = {
1998
+ appId: string;
1999
+ signatureHex: string;
2000
+ blsPubKeyHex: string;
2001
+ signedAt: string;
2002
+ };
932
2003
  declare class TSSClient {
933
2004
  private readonly http;
934
2005
  constructor(http: HttpClient);
935
2006
  createEntity(options: EntityCreationOptions): Promise<EntityCreationResponse>;
936
2007
  reshareCluster(request: ReshareRequest): Promise<ReshareResponse>;
937
2008
  getEntity(entityId: string): Promise<EntityDetails>;
938
- signMPC(request: MPCSigningRequest): Promise<MPCSigningResponse>;
2009
+ signMPC(request: MPCSigningRequest & {
2010
+ chain?: "hedera";
2011
+ }): Promise<MPCSigningResponse>;
939
2012
  getValidators(): Promise<ValidatorListResponse>;
940
2013
  announceKey(): Promise<{
941
2014
  success: boolean;
@@ -946,6 +2019,10 @@ declare class TSSClient {
946
2019
  getHealth(): Promise<TSSHealthResponse>;
947
2020
  listCeremonies(): Promise<CeremonyListResponse>;
948
2021
  getMultiSigStatus(txId: string): Promise<MultiSigStatusResponse>;
2022
+ createEntityAsync(options: EntityCreationOptions): Promise<TssJobAccepted>;
2023
+ reshareClusterAsync(request: ReshareRequest): Promise<TssJobAccepted>;
2024
+ getJob(jobId: string): Promise<TssJobResponse>;
2025
+ signForApp(appId: string, request: SignForAppRequest): Promise<SignForAppResponse>;
949
2026
  }
950
2027
  export type IpfsFileMetadata = {
951
2028
  cid: string;
@@ -1196,18 +2273,192 @@ export type TransactionInfoResponse = {
1196
2273
  supportedChains: string[];
1197
2274
  responseFormat?: Record<string, string>;
1198
2275
  };
1199
- export type PrepareTopicCreateRequest = {
2276
+ export type MetaplexCreator = {
2277
+ address: string;
2278
+ verified: boolean;
2279
+ share: number;
2280
+ };
2281
+ export type PrepareNftCollectionCreateRequest = {
2282
+ chain: "polkadot" | "solana";
1200
2283
  payerAccountId?: string;
2284
+ entityId?: string;
2285
+ securityMode?: SecurityMode;
2286
+ appOwnerPublicKey?: string;
2287
+ ss58Format?: number;
2288
+ admin?: string;
2289
+ config?: {
2290
+ settings?: number;
2291
+ maxSupply?: number | null;
2292
+ mintSettings?: unknown;
2293
+ };
2294
+ name?: string;
2295
+ symbol?: string;
2296
+ uri?: string;
2297
+ sellerFeeBasisPoints?: number;
2298
+ creators?: MetaplexCreator[];
2299
+ recipient?: string;
2300
+ mintAuthority?: string;
1201
2301
  memo?: string;
1202
- adminKeyRequired?: boolean;
1203
- submitKeyRequired?: boolean;
1204
- entityId: string;
1205
2302
  };
1206
- export type PrepareTopicMessageRequest = {
2303
+ export type PrepareNftSetMetadataRequest = {
2304
+ chain: "polkadot";
1207
2305
  payerAccountId?: string;
1208
- topicId: string;
1209
- message: string | Record<string, unknown>;
1210
- entityId: string;
2306
+ collection: number;
2307
+ item: number;
2308
+ data: string;
2309
+ entityId?: string;
2310
+ securityMode?: SecurityMode;
2311
+ appOwnerPublicKey?: string;
2312
+ ss58Format?: number;
2313
+ };
2314
+ export type PrepareNftCollectionSetMetadataRequest = {
2315
+ chain: "polkadot";
2316
+ payerAccountId?: string;
2317
+ collection: number;
2318
+ data: string;
2319
+ entityId?: string;
2320
+ securityMode?: SecurityMode;
2321
+ appOwnerPublicKey?: string;
2322
+ ss58Format?: number;
2323
+ };
2324
+ export type PrepareNftCollectionLockRequest = {
2325
+ chain: "polkadot";
2326
+ payerAccountId?: string;
2327
+ collection: number;
2328
+ lockSettings: number;
2329
+ entityId?: string;
2330
+ securityMode?: SecurityMode;
2331
+ appOwnerPublicKey?: string;
2332
+ ss58Format?: number;
2333
+ };
2334
+ export type HederaTssSecurityMode = "full" | "partial";
2335
+ export type ValidatorBoundRequest = {
2336
+ entityId: string;
2337
+ validatorTimestamp: string;
2338
+ validatorTopicId: string;
2339
+ payerAccountId?: string;
2340
+ };
2341
+ export type CreateHederaAccountRequest = ValidatorBoundRequest & {
2342
+ initialBalance?: number;
2343
+ securityMode?: HederaTssSecurityMode;
2344
+ appOwnerPublicKey?: string;
2345
+ };
2346
+ export type CreateHederaAccountResponse = {
2347
+ success: boolean;
2348
+ accountId: string;
2349
+ transactionId: string;
2350
+ hashscanUrl: string;
2351
+ securityMode: HederaTssSecurityMode;
2352
+ validatorBinding: {
2353
+ timestamp: string;
2354
+ topicId: string;
2355
+ memo: string;
2356
+ rulesUrl: string;
2357
+ };
2358
+ };
2359
+ export type UpdateHederaMemoRequest = {
2360
+ entityId: string;
2361
+ accountId: string;
2362
+ newMemo: string;
2363
+ payerAccountId?: string;
2364
+ };
2365
+ export type UpdateHederaMemoResponse = {
2366
+ success: boolean;
2367
+ transactionId: string;
2368
+ hashscanUrl: string;
2369
+ status: string;
2370
+ };
2371
+ export type CreateHederaTopicRequest = ValidatorBoundRequest;
2372
+ export type CreateHederaTopicResponse = {
2373
+ success: boolean;
2374
+ topicId: string;
2375
+ transactionId: string;
2376
+ hashscanUrl: string;
2377
+ validatorBinding: {
2378
+ timestamp: string;
2379
+ topicId: string;
2380
+ memo: string;
2381
+ rulesUrl: string;
2382
+ };
2383
+ };
2384
+ export type SubmitHederaMessageRequest = {
2385
+ entityId: string;
2386
+ topicId: string;
2387
+ message: string;
2388
+ payerAccountId?: string;
2389
+ };
2390
+ export type SubmitHederaMessageResponse = {
2391
+ success: boolean;
2392
+ sequenceNumber: string | number;
2393
+ transactionId: string;
2394
+ hashscanUrl: string;
2395
+ };
2396
+ export type CreateHederaTokenRequest = ValidatorBoundRequest & {
2397
+ name: string;
2398
+ symbol: string;
2399
+ decimals: number;
2400
+ initialSupply: number;
2401
+ maxSupply?: number;
2402
+ treasuryAccountId: string;
2403
+ enableAdminKey?: boolean;
2404
+ enableSupplyKey?: boolean;
2405
+ enableFreezeKey?: boolean;
2406
+ enablePauseKey?: boolean;
2407
+ enableWipeKey?: boolean;
2408
+ };
2409
+ export type CreateHederaTokenResponse = {
2410
+ success: boolean;
2411
+ tokenId: string;
2412
+ transactionId: string;
2413
+ hashscanUrl: string;
2414
+ tokenUrl: string;
2415
+ keys: Record<string, string>;
2416
+ validatorBinding: {
2417
+ timestamp: string;
2418
+ topicId: string;
2419
+ memo: string;
2420
+ rulesUrl: string;
2421
+ };
2422
+ };
2423
+ export type MintHederaTokenRequest = {
2424
+ entityId: string;
2425
+ tokenId: string;
2426
+ amount: number;
2427
+ decimals?: number;
2428
+ validatorTopicId?: string;
2429
+ payerAccountId?: string;
2430
+ };
2431
+ export type MintHederaTokenResponse = {
2432
+ success: boolean;
2433
+ transactionId: string;
2434
+ hashscanUrl: string;
2435
+ newTotalSupply: string;
2436
+ mintedAmount: string | number;
2437
+ tokenId: string;
2438
+ decimals: number;
2439
+ };
2440
+ declare class HederaTssClient {
2441
+ private readonly http;
2442
+ constructor(http: HttpClient);
2443
+ createAccount(request: CreateHederaAccountRequest): Promise<CreateHederaAccountResponse>;
2444
+ updateMemo(request: UpdateHederaMemoRequest): Promise<UpdateHederaMemoResponse>;
2445
+ createTopic(request: CreateHederaTopicRequest): Promise<CreateHederaTopicResponse>;
2446
+ submitMessage(request: SubmitHederaMessageRequest): Promise<SubmitHederaMessageResponse>;
2447
+ createToken(request: CreateHederaTokenRequest): Promise<CreateHederaTokenResponse>;
2448
+ mintToken(request: MintHederaTokenRequest): Promise<MintHederaTokenResponse>;
2449
+ }
2450
+ export type PrepareTopicCreateRequest = {
2451
+ payerAccountId?: string;
2452
+ memo?: string;
2453
+ adminKeyRequired?: boolean;
2454
+ submitKeyRequired?: boolean;
2455
+ entityId: string;
2456
+ };
2457
+ export type PrepareTopicMessageRequest = {
2458
+ payerAccountId?: string;
2459
+ topicId: string;
2460
+ message: string | Record<string, unknown>;
2461
+ entityId: string;
1211
2462
  };
1212
2463
  export type PrepareTokenComplianceEnableRequest = {
1213
2464
  payerAccountId?: string;
@@ -1229,7 +2480,8 @@ export type PrepareTokenWipeRequest = {
1229
2480
  };
1230
2481
  declare class HederaTransactionsClient {
1231
2482
  private readonly http;
1232
- constructor(http: HttpClient);
2483
+ readonly tss: HederaTssClient;
2484
+ constructor(http: HttpClient, tssHttp?: HttpClient);
1233
2485
  prepareTopicCreate(request: PrepareTopicCreateRequest): Promise<PreparedTransaction>;
1234
2486
  prepareTopicMessage(request: PrepareTopicMessageRequest): Promise<PreparedTransaction>;
1235
2487
  prepareTokenComplianceEnable(request: PrepareTokenComplianceEnableRequest): Promise<PreparedTransaction>;
@@ -1244,10 +2496,39 @@ export type PrepareTrustLineRequest = {
1244
2496
  limit?: string;
1245
2497
  entityId: string;
1246
2498
  };
2499
+ export type PrepareXrplAccountSetupRequest = {
2500
+ payerAccountId?: string;
2501
+ accountAddress: string;
2502
+ validatorTimestamp: string;
2503
+ validatorTopicId: string;
2504
+ securityMode?: SecurityMode;
2505
+ appOwnerPublicKey?: string;
2506
+ entityId?: string;
2507
+ };
2508
+ export type PreparedTransactionSovereignty = {
2509
+ mode: SecurityMode | "none";
2510
+ appOwnerPublicKey?: string;
2511
+ signerListEntries?: Array<{
2512
+ account: string;
2513
+ weight: number;
2514
+ }>;
2515
+ signerQuorum?: number;
2516
+ };
2517
+ export type XrplAccountSetupSteps = {
2518
+ steps: Array<{
2519
+ step: number;
2520
+ description?: string;
2521
+ transactionBytes: string;
2522
+ transactionId?: string;
2523
+ [k: string]: unknown;
2524
+ }>;
2525
+ sovereignty: PreparedTransactionSovereignty;
2526
+ };
1247
2527
  declare class XrplTransactionsClient {
1248
2528
  private readonly http;
1249
2529
  constructor(http: HttpClient);
1250
2530
  prepareTrustLine(request: PrepareTrustLineRequest): Promise<PreparedTransaction>;
2531
+ prepareAccountSetup(request: PrepareXrplAccountSetupRequest): Promise<XrplAccountSetupSteps>;
1251
2532
  }
1252
2533
  export type PrepareTokenCloseAccountRequest = {
1253
2534
  payerAccountId?: string;
@@ -1300,6 +2581,10 @@ declare class TransactionsClient {
1300
2581
  prepareNftMint(request: PrepareNftMintRequest): Promise<PreparedTransaction>;
1301
2582
  prepareNftBurn(request: PrepareNftBurnRequest): Promise<PreparedTransaction>;
1302
2583
  prepareNftTransfer(request: PrepareNftTransferRequest): Promise<PreparedTransaction>;
2584
+ prepareNftCollectionCreate(request: PrepareNftCollectionCreateRequest): Promise<PreparedTransaction>;
2585
+ prepareNftSetMetadata(request: PrepareNftSetMetadataRequest): Promise<PreparedTransaction>;
2586
+ prepareNftCollectionSetMetadata(request: PrepareNftCollectionSetMetadataRequest): Promise<PreparedTransaction>;
2587
+ prepareNftCollectionLock(request: PrepareNftCollectionLockRequest): Promise<PreparedTransaction>;
1303
2588
  prepareTokenCreate(request: PrepareTokenCreateRequest): Promise<PreparedTransaction>;
1304
2589
  prepareTokenMint(request: PrepareTokenMintRequest): Promise<PreparedTransaction>;
1305
2590
  prepareTokenBurn(request: PrepareTokenBurnRequest): Promise<PreparedTransaction>;
@@ -1516,6 +2801,391 @@ declare class GovernanceClient {
1516
2801
  constructor(http: HttpClient);
1517
2802
  simulate(params: GovernanceSimulateRequest): Promise<GovernanceValidationResult>;
1518
2803
  }
2804
+ export type DaoSupportedChain = "hedera" | "xrpl" | "polkadot" | "solana" | "ethereum" | "polygon" | "bitcoin" | "stellar" | "cardano";
2805
+ export type DaoStatus = "pending" | "active" | "paused" | "dissolved";
2806
+ export type DaoMembershipModel = "token-only" | "nft-only" | "token-and-nft";
2807
+ export type DaoMemberStatus = "active" | "removed";
2808
+ export type DaoVotingPowerModel = "token-balance" | "quadratic" | "one-person-one-vote" | "nft-based" | "delegated";
2809
+ export type DaoProposalType = "dao_parameter_change" | "dao_treasury_transfer" | "dao_treasury_allocation" | "dao_update_details" | "dao_set_status" | "dao_add_member" | "dao_remove_member" | "dao_token_mint" | "dao_token_burn" | "dao_token_pause" | "dao_token_unpause" | "dao_token_freeze" | "dao_token_unfreeze" | "dao_token_kyc" | "dao_token_wipe" | "dao_token_transfer" | "dao_hbar_transfer" | "dao_custom";
2810
+ export type DaoProposalStatus = "pending" | "awaiting_signature" | "active" | "passed" | "failed" | "executed" | "cancelled" | "expired" | "vetoed";
2811
+ export type DaoChainTokenEntry = {
2812
+ chain: DaoSupportedChain;
2813
+ tokenId: string;
2814
+ issuerAddress?: string;
2815
+ decimals: number;
2816
+ };
2817
+ export type DaoMultiChainTokenConfig = {
2818
+ symbol: string;
2819
+ chains: DaoChainTokenEntry[];
2820
+ };
2821
+ export type DaoVotingRules = {
2822
+ approvalThresholdPercent: number;
2823
+ quorumPercent: number;
2824
+ votingPeriodMs: number;
2825
+ votingPowerModel: DaoVotingPowerModel;
2826
+ allowVoteChange: boolean;
2827
+ executionDelayMs: number;
2828
+ proposalCooldownMs: number;
2829
+ maxActiveProposals: number;
2830
+ proposalThreshold: string;
2831
+ };
2832
+ export type DaoTreasuryWallet = {
2833
+ chain: DaoSupportedChain;
2834
+ walletAddress: string;
2835
+ tssEntityId: string;
2836
+ };
2837
+ export type DaoTreasuryConfig = {
2838
+ wallets: DaoTreasuryWallet[];
2839
+ spendingLimits?: {
2840
+ perProposalLimit?: string;
2841
+ dailyLimit?: string;
2842
+ };
2843
+ };
2844
+ export type DaoConfig = {
2845
+ daoId: string;
2846
+ name: string;
2847
+ description: string;
2848
+ status: DaoStatus;
2849
+ membershipModel: DaoMembershipModel;
2850
+ governanceToken: DaoMultiChainTokenConfig;
2851
+ nftToken?: DaoMultiChainTokenConfig;
2852
+ votingRules: DaoVotingRules;
2853
+ treasury: DaoTreasuryConfig;
2854
+ vetoCouncil?: string[];
2855
+ createdBy: string;
2856
+ createdAt: string | Date;
2857
+ hcsTopicId?: string;
2858
+ metadataCid?: string;
2859
+ image?: string;
2860
+ banner?: string;
2861
+ socials?: {
2862
+ discord?: string;
2863
+ twitter?: string;
2864
+ website?: string;
2865
+ };
2866
+ tokenControlledByValidators?: boolean;
2867
+ };
2868
+ export type DaoProposalAction = {
2869
+ type: string;
2870
+ chain?: DaoSupportedChain;
2871
+ targetEntityId?: string;
2872
+ params: Record<string, unknown>;
2873
+ };
2874
+ export type DaoVotingOption = {
2875
+ id: string;
2876
+ label: string;
2877
+ description?: string;
2878
+ type?: "approve" | "reject";
2879
+ actionPayload?: DaoProposalAction;
2880
+ };
2881
+ export type DaoProposalConfig = {
2882
+ proposalId: string;
2883
+ daoId: string;
2884
+ type: DaoProposalType;
2885
+ title: string;
2886
+ description: string;
2887
+ content?: string;
2888
+ images?: string[];
2889
+ externalLinks?: Array<{
2890
+ label: string;
2891
+ url: string;
2892
+ }>;
2893
+ proposer: string;
2894
+ status: DaoProposalStatus;
2895
+ votingOptions: DaoVotingOption[];
2896
+ votingPeriodMs: number;
2897
+ votingStartsAt: string | Date;
2898
+ votingEndsAt: string | Date;
2899
+ executionDeadline?: string | Date;
2900
+ snapshotId: string;
2901
+ snapshotPinTimestamp?: number;
2902
+ actions: DaoProposalAction[];
2903
+ tally: Record<string, string>;
2904
+ quorumReached: boolean;
2905
+ totalVotingPower: string;
2906
+ hcsTopicId?: string;
2907
+ executionResult?: {
2908
+ success: boolean;
2909
+ transactionIds?: string[];
2910
+ error?: string;
2911
+ };
2912
+ winningOptionId?: string;
2913
+ preparedMessage?: {
2914
+ message: Record<string, unknown>;
2915
+ voteTopicId?: string;
2916
+ snapshot?: string;
2917
+ createdAt: string | Date;
2918
+ };
2919
+ passedAt?: string | Date;
2920
+ createdAt: string | Date;
2921
+ executedAt?: string | Date;
2922
+ };
2923
+ export type DaoVote = {
2924
+ proposalId: string;
2925
+ daoId: string;
2926
+ voter: string;
2927
+ choice: string;
2928
+ weight: string;
2929
+ comment?: string;
2930
+ chain: DaoSupportedChain;
2931
+ delegatedFrom?: string;
2932
+ timestamp: string | Date;
2933
+ };
2934
+ export type DaoMember = {
2935
+ daoId: string;
2936
+ address: string;
2937
+ chain: DaoSupportedChain;
2938
+ nftSerials?: number[];
2939
+ joinedAt: string | Date;
2940
+ status: DaoMemberStatus;
2941
+ };
2942
+ export type DaoDashboardStats = {
2943
+ totalDaosJoined: number;
2944
+ totalVotesCast: number;
2945
+ totalProposalsCreated: number;
2946
+ activeProposalsCount: number;
2947
+ pendingActionsCount: number;
2948
+ };
2949
+ export type DaoGovernanceImpact = {
2950
+ totalVotingPower: string;
2951
+ proposalSuccessRate: number;
2952
+ averageVoteWeight: string;
2953
+ mostActiveDao?: {
2954
+ daoId: string;
2955
+ name: string;
2956
+ };
2957
+ participationStreak: number;
2958
+ proposalOutcomes: {
2959
+ created: number;
2960
+ passed: number;
2961
+ rejected: number;
2962
+ expired: number;
2963
+ };
2964
+ };
2965
+ export type DaoActiveProposalForUser = {
2966
+ proposal: DaoProposalConfig;
2967
+ dao: DaoConfig;
2968
+ hasVoted: boolean;
2969
+ timeRemaining: number;
2970
+ };
2971
+ export type DaoActivityEntry = {
2972
+ type: string;
2973
+ daoId: string;
2974
+ entityId: string;
2975
+ timestamp: string | Date;
2976
+ description: string;
2977
+ };
2978
+ export type DaoPendingAction = {
2979
+ type: string;
2980
+ daoId: string;
2981
+ entityId: string;
2982
+ description: string;
2983
+ };
2984
+ export type CreateDaoRequest = {
2985
+ name: string;
2986
+ description: string;
2987
+ membershipModel: DaoMembershipModel;
2988
+ governanceToken: DaoMultiChainTokenConfig;
2989
+ nftToken?: DaoMultiChainTokenConfig;
2990
+ votingRules: DaoVotingRules;
2991
+ vetoCouncil?: string[];
2992
+ treasuryChains: DaoSupportedChain[];
2993
+ metadataCid?: string;
2994
+ daoId?: string;
2995
+ createdBy: string;
2996
+ };
2997
+ export type CreateDaoProposalRequest = {
2998
+ type: DaoProposalType;
2999
+ title: string;
3000
+ description: string;
3001
+ content?: string;
3002
+ proposer: string;
3003
+ votingOptions?: DaoVotingOption[];
3004
+ actions: DaoProposalAction[];
3005
+ };
3006
+ export type CastVoteRequest = {
3007
+ voter: string;
3008
+ choice: string;
3009
+ chain: DaoSupportedChain;
3010
+ comment?: string;
3011
+ delegatedFrom?: string;
3012
+ };
3013
+ export type PrepareDaoProposalRequest = CreateDaoProposalRequest;
3014
+ export type PrepareVoteRequest = CastVoteRequest;
3015
+ export type SubmitSignedProposalRequest = {
3016
+ signature: string;
3017
+ };
3018
+ export type SubmitSignedVoteRequest = PrepareVoteRequest & {
3019
+ signature: string;
3020
+ };
3021
+ export type AddDaoMemberRequest = {
3022
+ address: string;
3023
+ chain: DaoSupportedChain;
3024
+ nftSerials?: number[];
3025
+ };
3026
+ export type ClaimDaoMemberNftRequest = {
3027
+ nftSerial: number;
3028
+ };
3029
+ export type ListDaosOptions = {
3030
+ status?: string;
3031
+ createdBy?: string;
3032
+ };
3033
+ export type ListProposalsOptions = {
3034
+ status?: string;
3035
+ proposer?: string;
3036
+ };
3037
+ export type ListMembersOptions = {
3038
+ status?: string;
3039
+ };
3040
+ export type VoteListOptions = {
3041
+ limit?: number;
3042
+ offset?: number;
3043
+ };
3044
+ export type TreasuryHistoryOptions = {
3045
+ chain?: string;
3046
+ limit?: number;
3047
+ offset?: number;
3048
+ };
3049
+ export type DashboardListOptions = {
3050
+ limit?: number;
3051
+ offset?: number;
3052
+ };
3053
+ export type DashboardActivityOptions = {
3054
+ limit?: number;
3055
+ daoId?: string;
3056
+ };
3057
+ export type CreateDaoResponse = {
3058
+ success: boolean;
3059
+ dao: DaoConfig;
3060
+ };
3061
+ export type ListDaosResponse = {
3062
+ count: number;
3063
+ daos: DaoConfig[];
3064
+ };
3065
+ export type DaoWithProposalsResponse = {
3066
+ dao: DaoConfig;
3067
+ proposals: DaoProposalConfig[];
3068
+ };
3069
+ export type ListProposalsResponse = {
3070
+ count: number;
3071
+ proposals: DaoProposalConfig[];
3072
+ };
3073
+ export type CreateProposalResponse = {
3074
+ success: boolean;
3075
+ proposal: DaoProposalConfig;
3076
+ };
3077
+ export type PrepareProposalResponse = {
3078
+ success: boolean;
3079
+ proposal: DaoProposalConfig;
3080
+ };
3081
+ export type SubmitSignedProposalResponse = {
3082
+ success: boolean;
3083
+ proposal: DaoProposalConfig;
3084
+ };
3085
+ export type PrepareVoteResponse = {
3086
+ success: boolean;
3087
+ proposalId: string;
3088
+ message: Record<string, unknown>;
3089
+ weight: string;
3090
+ };
3091
+ export type CastVoteResponse = {
3092
+ success: boolean;
3093
+ vote: DaoVote;
3094
+ };
3095
+ export type VotesListResponse = {
3096
+ count: number;
3097
+ votes: DaoVote[];
3098
+ };
3099
+ export type ProposalResultsResponse = {
3100
+ tally: Record<string, string>;
3101
+ quorumReached: boolean;
3102
+ passed: boolean;
3103
+ };
3104
+ export type ExecuteProposalResponse = {
3105
+ success: boolean;
3106
+ transactionIds?: string[];
3107
+ error?: string;
3108
+ };
3109
+ export type TreasuryHistoryEntry = {
3110
+ chain: string;
3111
+ type: string;
3112
+ amount: string;
3113
+ tokenId: string;
3114
+ txId: string;
3115
+ timestamp: string | Date;
3116
+ };
3117
+ export type TreasuryHistoryResponse = {
3118
+ count: number;
3119
+ transactions: TreasuryHistoryEntry[];
3120
+ };
3121
+ export type TreasuryBalancesResponse = {
3122
+ balances: Array<{
3123
+ chain: string;
3124
+ walletAddress: string;
3125
+ tokenBalances: Record<string, string>;
3126
+ }>;
3127
+ };
3128
+ export type ListMembersResponse = {
3129
+ count: number;
3130
+ members: DaoMember[];
3131
+ };
3132
+ export type AddMemberResponse = {
3133
+ success: boolean;
3134
+ member: DaoMember;
3135
+ };
3136
+ export type RemoveMemberResponse = {
3137
+ success: boolean;
3138
+ };
3139
+ export type ClaimNftResponse = {
3140
+ success: boolean;
3141
+ member: DaoMember;
3142
+ };
3143
+ export type MemberNftResponse = {
3144
+ nftSerials: number[];
3145
+ status: string;
3146
+ };
3147
+ declare class DaoDashboardClient {
3148
+ private readonly http;
3149
+ constructor(http: HttpClient);
3150
+ getStats(userAddress: string): Promise<DaoDashboardStats>;
3151
+ getActiveProposals(userAddress: string): Promise<DaoActiveProposalForUser[]>;
3152
+ getVoteHistory(userAddress: string, opts?: DashboardListOptions): Promise<{
3153
+ count: number;
3154
+ votes: DaoVote[];
3155
+ }>;
3156
+ getActivity(userAddress: string, opts?: DashboardActivityOptions): Promise<DaoActivityEntry[]>;
3157
+ getPendingActions(userAddress: string): Promise<DaoPendingAction[]>;
3158
+ getImpact(userAddress: string): Promise<DaoGovernanceImpact>;
3159
+ }
3160
+ declare class DaoClient {
3161
+ private readonly http;
3162
+ readonly dashboard: DaoDashboardClient;
3163
+ constructor(http: HttpClient);
3164
+ create(request: CreateDaoRequest): Promise<CreateDaoResponse>;
3165
+ list(opts?: ListDaosOptions): Promise<ListDaosResponse>;
3166
+ get(daoId: string): Promise<DaoConfig>;
3167
+ getWithProposals(daoId: string): Promise<DaoWithProposalsResponse>;
3168
+ listProposals(daoId: string, opts?: ListProposalsOptions): Promise<ListProposalsResponse>;
3169
+ createProposal(daoId: string, request: CreateDaoProposalRequest): Promise<CreateProposalResponse>;
3170
+ prepareProposal(daoId: string, request: PrepareDaoProposalRequest): Promise<PrepareProposalResponse>;
3171
+ signProposal(daoId: string, proposalId: string, request: SubmitSignedProposalRequest): Promise<SubmitSignedProposalResponse>;
3172
+ prepareVote(daoId: string, proposalId: string, request: PrepareVoteRequest): Promise<PrepareVoteResponse>;
3173
+ submitVote(daoId: string, proposalId: string, request: SubmitSignedVoteRequest): Promise<CastVoteResponse>;
3174
+ vote(daoId: string, proposalId: string, request: CastVoteRequest): Promise<CastVoteResponse>;
3175
+ execute(daoId: string, proposalId: string): Promise<ExecuteProposalResponse>;
3176
+ getVotes(daoId: string, proposalId: string, opts?: VoteListOptions): Promise<VotesListResponse>;
3177
+ getResults(daoId: string, proposalId: string): Promise<ProposalResultsResponse>;
3178
+ getVoteCounts(daoId: string, proposalId: string): Promise<Record<string, number>>;
3179
+ getVoterRecord(daoId: string, proposalId: string, voterAddress: string): Promise<DaoVote>;
3180
+ getProposal(daoId: string, proposalId: string): Promise<DaoProposalConfig>;
3181
+ getTreasury(daoId: string, chain?: string): Promise<TreasuryBalancesResponse>;
3182
+ getTreasuryHistory(daoId: string, opts?: TreasuryHistoryOptions): Promise<TreasuryHistoryResponse>;
3183
+ listMembers(daoId: string, opts?: ListMembersOptions): Promise<ListMembersResponse>;
3184
+ addMember(daoId: string, request: AddDaoMemberRequest): Promise<AddMemberResponse>;
3185
+ removeMember(daoId: string, address: string): Promise<RemoveMemberResponse>;
3186
+ claimMemberNft(daoId: string, address: string, request: ClaimDaoMemberNftRequest): Promise<ClaimNftResponse>;
3187
+ getMemberNft(daoId: string, address: string): Promise<MemberNftResponse>;
3188
+ }
1519
3189
  export type PersonhoodAttestationMethod = "web-of-trust" | "biometric" | "pop-protocol";
1520
3190
  export interface PersonhoodProof {
1521
3191
  attestationMethod: PersonhoodAttestationMethod;
@@ -1599,6 +3269,9 @@ export type AgentWithdrawRequest = {
1599
3269
  amount: string;
1600
3270
  destination: string;
1601
3271
  };
3272
+ export type AgentPreparedTransactionResponse = PreparedTransactionResponse & {
3273
+ success: true;
3274
+ };
1602
3275
  declare class AgentsClient {
1603
3276
  private readonly http;
1604
3277
  constructor(http: HttpClient);
@@ -1608,18 +3281,9 @@ declare class AgentsClient {
1608
3281
  agents: AgentInfo[];
1609
3282
  total: number;
1610
3283
  }>;
1611
- fund(agentId: string, request: AgentFundRequest): Promise<{
1612
- success: boolean;
1613
- txId?: string;
1614
- }>;
1615
- trade(agentId: string, request: AgentTradeRequest): Promise<{
1616
- success: boolean;
1617
- txId?: string;
1618
- }>;
1619
- withdraw(agentId: string, request: AgentWithdrawRequest): Promise<{
1620
- success: boolean;
1621
- txId?: string;
1622
- }>;
3284
+ fund(agentId: string, request: AgentFundRequest): Promise<AgentPreparedTransactionResponse>;
3285
+ trade(agentId: string, request: AgentTradeRequest): Promise<AgentPreparedTransactionResponse>;
3286
+ withdraw(agentId: string, request: AgentWithdrawRequest): Promise<AgentPreparedTransactionResponse>;
1623
3287
  pause(agentId: string): Promise<{
1624
3288
  success: boolean;
1625
3289
  status: string;
@@ -1931,6 +3595,19 @@ export type BaasRuntimeStatus = {
1931
3595
  export type BaasAppListResponse = {
1932
3596
  apps: DeployedAppInfo[];
1933
3597
  };
3598
+ export type BaasSetWebhookResponse = {
3599
+ appId: string;
3600
+ webhookUrl: string;
3601
+ webhookSecret: string;
3602
+ };
3603
+ export type BaasRotateKekResponse = {
3604
+ success: boolean;
3605
+ newKekVersion: number;
3606
+ };
3607
+ export type BaasRevokeKekResponse = {
3608
+ success: boolean;
3609
+ revokedKekVersions: number[];
3610
+ };
1934
3611
  declare class DeploymentClient {
1935
3612
  private readonly http;
1936
3613
  constructor(http: HttpClient);
@@ -1958,6 +3635,318 @@ declare class DeploymentClient {
1958
3635
  activeApps: number;
1959
3636
  totalOwners: number;
1960
3637
  }>;
3638
+ setWebhook(appId: string, webhookUrl: string): Promise<BaasSetWebhookResponse>;
3639
+ getMetrics(appId: string): Promise<string>;
3640
+ rotateKek(appId: string): Promise<BaasRotateKekResponse>;
3641
+ revokeKek(appId: string, version: number): Promise<BaasRevokeKekResponse>;
3642
+ }
3643
+ export type BridgeChain = "hedera" | "xrpl" | "polkadot" | "solana" | "stellar";
3644
+ export type BridgeMode = "rekey" | "lock-wallet";
3645
+ export type BridgeDirection = "one-way" | "two-way";
3646
+ export type BridgeTrustLevel = "owner-rekeyed" | "owner-verified" | "community";
3647
+ export type BridgeStatus = "initializing" | "active" | "paused" | "closed";
3648
+ export type BridgeClaimStatus = "pending" | "completed" | "failed";
3649
+ export type BridgeOperationConfig = {
3650
+ enabled: boolean;
3651
+ controller?: "owner" | "dao";
3652
+ requiresEvidence: boolean;
3653
+ evidenceType?: string;
3654
+ limits?: {
3655
+ totalLimit?: string;
3656
+ perTxLimit?: string;
3657
+ dailyLimit?: string;
3658
+ };
3659
+ };
3660
+ export type BridgeRulesConfig = {
3661
+ mint: BridgeOperationConfig;
3662
+ burn: BridgeOperationConfig;
3663
+ timeRange?: {
3664
+ start: number;
3665
+ end?: number;
3666
+ };
3667
+ };
3668
+ export type BridgeSourceConfig = {
3669
+ chain: BridgeChain;
3670
+ tokenId: string;
3671
+ keyModel: BridgeMode;
3672
+ lockWalletAddress?: string;
3673
+ tssEntityId?: string;
3674
+ };
3675
+ export type BridgeDestinationConfig = {
3676
+ chain: BridgeChain;
3677
+ tokenId: string;
3678
+ issuerAddress?: string;
3679
+ createIfMissing: boolean;
3680
+ };
3681
+ export type BridgeGenesisBinding = {
3682
+ sourceTokenId: string;
3683
+ destinationTokenId: string;
3684
+ initializedAt: string;
3685
+ };
3686
+ export type BridgeConfig = {
3687
+ bridgeId: string;
3688
+ source: BridgeSourceConfig;
3689
+ destination: BridgeDestinationConfig;
3690
+ direction: BridgeDirection;
3691
+ allowedDirections: string[];
3692
+ rules: BridgeRulesConfig;
3693
+ trustLevel: BridgeTrustLevel;
3694
+ status: BridgeStatus;
3695
+ tssEntityId: string;
3696
+ genesisBinding?: BridgeGenesisBinding;
3697
+ createdAt: string | Date;
3698
+ createdBy?: string;
3699
+ };
3700
+ export type CreateBridgeRequest = {
3701
+ sourceChain: BridgeChain;
3702
+ sourceTokenId: string;
3703
+ destinationChain: BridgeChain;
3704
+ keyModel: BridgeMode;
3705
+ direction: BridgeDirection;
3706
+ createDestinationToken: boolean;
3707
+ destinationTokenId?: string;
3708
+ rules: BridgeRulesConfig;
3709
+ name?: string;
3710
+ };
3711
+ export type CreateBridgeResponse = {
3712
+ success: boolean;
3713
+ bridge: BridgeConfig;
3714
+ };
3715
+ export type ListBridgesOptions = {
3716
+ status?: BridgeStatus;
3717
+ sourceChain?: BridgeChain;
3718
+ };
3719
+ export type ListBridgesResponse = {
3720
+ count: number;
3721
+ bridges: BridgeConfig[];
3722
+ };
3723
+ export type PortRequest = {
3724
+ amount: string;
3725
+ sourceAccountId: string;
3726
+ destinationAddress: string;
3727
+ sourceTxId?: string;
3728
+ metadata?: Record<string, unknown>;
3729
+ };
3730
+ export type ReturnRequest = {
3731
+ amount: string;
3732
+ destinationAccountId: string;
3733
+ sourceAddress: string;
3734
+ destinationBurnTxId?: string;
3735
+ metadata?: Record<string, unknown>;
3736
+ };
3737
+ export type PortResult = {
3738
+ success: boolean;
3739
+ claimId: string;
3740
+ sourceTxId?: string;
3741
+ destinationTxId?: string;
3742
+ amount: string;
3743
+ error?: string;
3744
+ };
3745
+ export type BridgeClaimRecord = {
3746
+ claimId: string;
3747
+ bridgeId: string;
3748
+ sourceTxId: string;
3749
+ destinationTxId?: string;
3750
+ amount: string;
3751
+ sourceAccountId: string;
3752
+ destinationAddress: string;
3753
+ direction: string;
3754
+ status: BridgeClaimStatus;
3755
+ createdAt: string | Date;
3756
+ completedAt?: string | Date;
3757
+ error?: string;
3758
+ };
3759
+ export type BridgeSupply = {
3760
+ sourceSupply: string;
3761
+ destinationMinted: string;
3762
+ totalPorted: string;
3763
+ remainingMintable: string;
3764
+ totalClaims: number;
3765
+ };
3766
+ export type ListClaimsOptions = {
3767
+ limit?: number;
3768
+ offset?: number;
3769
+ };
3770
+ export type ListClaimsResponse = {
3771
+ count: number;
3772
+ claims: BridgeClaimRecord[];
3773
+ };
3774
+ declare class BridgeClient {
3775
+ private readonly http;
3776
+ constructor(http: HttpClient);
3777
+ create(request: CreateBridgeRequest): Promise<CreateBridgeResponse>;
3778
+ list(options?: ListBridgesOptions): Promise<ListBridgesResponse>;
3779
+ get(bridgeId: string): Promise<BridgeConfig>;
3780
+ port(bridgeId: string, request: PortRequest): Promise<PortResult>;
3781
+ return(bridgeId: string, request: ReturnRequest): Promise<PortResult>;
3782
+ getStatus(bridgeId: string, claimId: string): Promise<BridgeClaimRecord>;
3783
+ getSupply(bridgeId: string): Promise<BridgeSupply>;
3784
+ listClaims(bridgeId: string, options?: ListClaimsOptions): Promise<ListClaimsResponse>;
3785
+ }
3786
+ export type ResourcesEnvelope<T = unknown> = {
3787
+ success: boolean;
3788
+ data: T;
3789
+ timestamp: string;
3790
+ };
3791
+ export type ResourceSummaryResponse = ResourcesEnvelope;
3792
+ export type ResourceConsumptionResponse = ResourcesEnvelope;
3793
+ export type ResourceHistoryResponse = ResourcesEnvelope;
3794
+ export type ResourceLedgerResponse = ResourcesEnvelope;
3795
+ export type ResourceBreakdownResponse = ResourcesEnvelope;
3796
+ export type ResourceNodesResponse = ResourcesEnvelope;
3797
+ export type ResourceNodeResponse = ResourcesEnvelope;
3798
+ export type ResourceStatusResponse = ResourcesEnvelope<{
3799
+ appId: string;
3800
+ currentUsage: number;
3801
+ dailyLimit: number;
3802
+ usagePercent: number;
3803
+ blocked: boolean;
3804
+ warnings: unknown;
3805
+ suggestUpgrade: boolean;
3806
+ breakdown: unknown;
3807
+ }>;
3808
+ export type ResourceLedgerOptions = {
3809
+ limit?: number;
3810
+ offset?: number;
3811
+ since?: string;
3812
+ until?: string;
3813
+ category?: string;
3814
+ };
3815
+ export type ResourceBreakdownOptions = {
3816
+ since?: string;
3817
+ until?: string;
3818
+ };
3819
+ declare class ResourcesClient {
3820
+ private readonly http;
3821
+ constructor(http: HttpClient);
3822
+ getSummary(): Promise<ResourceSummaryResponse>;
3823
+ getConsumption(appId: string): Promise<ResourceConsumptionResponse>;
3824
+ getHistory(appId: string, days?: number): Promise<ResourceHistoryResponse>;
3825
+ getLedger(appId: string, options?: ResourceLedgerOptions): Promise<ResourceLedgerResponse>;
3826
+ getStatus(appId: string, dailyLimit?: number): Promise<ResourceStatusResponse>;
3827
+ getBreakdown(appId: string, options?: ResourceBreakdownOptions): Promise<ResourceBreakdownResponse>;
3828
+ listNodes(): Promise<ResourceNodesResponse>;
3829
+ getNode(nodeId: string): Promise<ResourceNodeResponse>;
3830
+ }
3831
+ export type EncryptedEnvelope = {
3832
+ v: 1;
3833
+ alg: "aes-256-gcm";
3834
+ kek: number;
3835
+ mg: number;
3836
+ ct: string;
3837
+ n: string;
3838
+ ts: string;
3839
+ };
3840
+ export type EncryptRequest = {
3841
+ appId: string;
3842
+ kekVersion: number;
3843
+ plaintext: string;
3844
+ masterGeneration?: number;
3845
+ };
3846
+ export type EncryptResponse = {
3847
+ envelope: EncryptedEnvelope;
3848
+ };
3849
+ export type DecryptRequest = {
3850
+ appId: string;
3851
+ envelope: EncryptedEnvelope;
3852
+ };
3853
+ export type DecryptResponse = {
3854
+ plaintext: string;
3855
+ };
3856
+ declare class EnvelopeClient {
3857
+ private readonly http;
3858
+ constructor(http: HttpClient);
3859
+ encrypt(request: EncryptRequest): Promise<EncryptResponse>;
3860
+ decrypt(request: DecryptRequest): Promise<DecryptResponse>;
3861
+ }
3862
+ export type TokenMigrationChain = "hedera" | "xrpl" | "stellar";
3863
+ export type TokenMigrationStatusValue = "pending" | "in_progress" | "completed" | "failed";
3864
+ export type TokenMigrationRequest = {
3865
+ chain: TokenMigrationChain;
3866
+ tokenId: string;
3867
+ currentAdminKey: string;
3868
+ currentSupplyKey?: string;
3869
+ payerAccountId?: string;
3870
+ };
3871
+ export type TokenMigrationResponse = {
3872
+ migrationId: string;
3873
+ success: boolean;
3874
+ newAdminKey?: string;
3875
+ newSupplyKey?: string;
3876
+ entityId?: string;
3877
+ txId?: string;
3878
+ error?: string;
3879
+ };
3880
+ export type TokenMigrationStatus = {
3881
+ migrationId: string;
3882
+ chain: TokenMigrationChain;
3883
+ tokenId: string;
3884
+ status: TokenMigrationStatusValue;
3885
+ progress: number;
3886
+ currentStep: string;
3887
+ error?: string;
3888
+ startedAt: string | Date;
3889
+ completedAt?: string | Date;
3890
+ result?: TokenMigrationResponse;
3891
+ };
3892
+ export type ListMigrationsResponse = {
3893
+ migrations: TokenMigrationStatus[];
3894
+ count: number;
3895
+ };
3896
+ export type TokenMigrationsForTokenResponse = {
3897
+ tokenId: string;
3898
+ migrations: TokenMigrationStatus[];
3899
+ count: number;
3900
+ };
3901
+ export type TokenDetailsResponse = {
3902
+ chain: string;
3903
+ tokenId: string;
3904
+ name?: string;
3905
+ symbol?: string;
3906
+ totalSupply?: string;
3907
+ adminKey?: string | null;
3908
+ supplyKey?: string | null;
3909
+ tssControlled?: boolean;
3910
+ entityId?: string;
3911
+ message?: string;
3912
+ };
3913
+ declare class TokensClient {
3914
+ private readonly http;
3915
+ constructor(http: HttpClient);
3916
+ migrate(request: TokenMigrationRequest): Promise<TokenMigrationResponse>;
3917
+ listMigrations(): Promise<ListMigrationsResponse>;
3918
+ getMigration(migrationId: string): Promise<TokenMigrationStatus | {
3919
+ error: string;
3920
+ }>;
3921
+ getMigrationsForToken(tokenId: string): Promise<TokenMigrationsForTokenResponse>;
3922
+ getDetails(chain: string, tokenId: string): Promise<TokenDetailsResponse>;
3923
+ }
3924
+ export type OperatorChain = "hedera";
3925
+ export type OperatorTokenBalance = {
3926
+ tokenId: string;
3927
+ balance: string;
3928
+ decimals?: number;
3929
+ };
3930
+ export type OperatorBalanceResponse = {
3931
+ accountId: string;
3932
+ chain: OperatorChain;
3933
+ hbarBalance: string;
3934
+ tokenBalances: OperatorTokenBalance[];
3935
+ };
3936
+ export type OperatorTopUpResponse = {
3937
+ accountId: string;
3938
+ chain: OperatorChain;
3939
+ minimumRecommended: string;
3940
+ currentBalance: string;
3941
+ needsTopUp: boolean;
3942
+ instructions: string;
3943
+ explorerUrl: string;
3944
+ };
3945
+ declare class OperatorClient {
3946
+ private readonly http;
3947
+ constructor(http: HttpClient);
3948
+ getBalance(chain: OperatorChain, accountId: string): Promise<OperatorBalanceResponse>;
3949
+ getTopup(chain: OperatorChain, accountId: string): Promise<OperatorTopUpResponse>;
1961
3950
  }
1962
3951
  export interface SmartEngineClientConfig {
1963
3952
  baseUrl: string;
@@ -2033,9 +4022,16 @@ declare class SmartEngineClient {
2033
4022
  readonly historicalBalance: HistoricalBalanceClient;
2034
4023
  readonly settlement: SettlementClient;
2035
4024
  readonly governance: GovernanceClient;
4025
+ readonly dao: DaoClient;
2036
4026
  readonly personhood: PersonhoodClient;
2037
4027
  readonly agents: AgentsClient;
2038
4028
  readonly deployments: DeploymentClient;
4029
+ readonly bridge: BridgeClient;
4030
+ readonly resources: ResourcesClient;
4031
+ readonly envelope: EnvelopeClient;
4032
+ readonly tokens: TokensClient;
4033
+ readonly operator: OperatorClient;
4034
+ readonly discovery: DiscoveryClient;
2039
4035
  constructor(config: SmartEngineClientConfig);
2040
4036
  static fromEnv(env: Record<string, string | undefined>): SmartEngineClient;
2041
4037
  static connectToNetwork(config: NetworkConnectionConfig): Promise<NetworkConnectionResult>;
@@ -2127,106 +4123,253 @@ declare class SmartEngineClient {
2127
4123
  }>;
2128
4124
  }
2129
4125
  export type GatewayHealthResponse = {
2130
- status: "healthy" | "degraded" | "unhealthy";
4126
+ status: "ok";
2131
4127
  timestamp: string;
2132
4128
  uptime: number;
2133
4129
  version: string;
4130
+ gatewayId: string;
2134
4131
  };
2135
4132
  export type GatewayStatusResponse = {
2136
4133
  status: string;
2137
- hosts: {
2138
- total: number;
2139
- verified: number;
2140
- active: number;
4134
+ timestamp: string;
4135
+ uptime: number;
4136
+ gatewayId: string;
4137
+ version: string;
4138
+ mode: {
4139
+ strictVerification: boolean;
4140
+ dnssecEnabled: boolean;
4141
+ routingStrategy: string;
2141
4142
  };
2142
- domains: {
2143
- total: number;
2144
- verified: number;
4143
+ subsystems: {
4144
+ dns: {
4145
+ status: string;
4146
+ cacheEnabled: boolean;
4147
+ cacheSize: number;
4148
+ maxCacheSize: number;
4149
+ cacheUtilization: number;
4150
+ };
4151
+ routing: {
4152
+ status: string;
4153
+ strategy: string;
4154
+ totalHosts: number;
4155
+ verifiedHosts: number;
4156
+ healthyHosts: number;
4157
+ };
4158
+ verification: {
4159
+ status: string;
4160
+ [key: string]: unknown;
4161
+ };
2145
4162
  };
2146
- uptime: number;
2147
4163
  };
2148
4164
  export type GatewayReadinessResponse = {
2149
- ready: boolean;
2150
- checks: Record<string, boolean>;
4165
+ status: "ready";
4166
+ timestamp: string;
4167
+ verifiedHostsCount: number;
4168
+ } | {
4169
+ status: "not_ready";
4170
+ timestamp: string;
4171
+ reason: string;
2151
4172
  };
2152
4173
  export type GatewayLivenessResponse = {
2153
- alive: boolean;
4174
+ status: "alive";
2154
4175
  timestamp: string;
4176
+ uptime: number;
2155
4177
  };
2156
4178
  export type GatewayMetricsResponse = {
2157
- requests: {
2158
- total: number;
2159
- successful: number;
2160
- failed: number;
2161
- avgLatencyMs: number;
4179
+ timestamp: string;
4180
+ network: {
4181
+ status: "operational" | "degraded" | "down";
4182
+ totalClusters: number;
4183
+ healthyClusters: number;
4184
+ totalValidators: number;
4185
+ activeValidators: number;
2162
4186
  };
2163
- hosts: {
2164
- total: number;
2165
- healthy: number;
2166
- unhealthy: number;
4187
+ gateway: {
4188
+ version: string;
4189
+ uptimeSeconds: number;
4190
+ totalHosts: number;
4191
+ verifiedHosts: number;
4192
+ healthyHosts: number;
2167
4193
  };
2168
- bandwidth: {
2169
- inbound: number;
2170
- outbound: number;
4194
+ chains: {
4195
+ hedera: {
4196
+ connectedNodes: number;
4197
+ totalNodes: number;
4198
+ network: string | null;
4199
+ };
4200
+ xrpl: {
4201
+ connectedNodes: number;
4202
+ totalNodes: number;
4203
+ network: string | null;
4204
+ };
2171
4205
  };
2172
- timestamp: string;
4206
+ genesis: {
4207
+ status: "pending" | "in_progress" | "completed" | "unknown";
4208
+ completedClusters: number;
4209
+ totalClusters: number;
4210
+ };
4211
+ clusters: ClusterHealth[];
4212
+ cacheTtlSeconds: number;
4213
+ gossipDiscovery?: {
4214
+ enabled: boolean;
4215
+ [key: string]: unknown;
4216
+ };
4217
+ };
4218
+ export type ClusterHealth = {
4219
+ clusterId: string;
4220
+ clusterName: string;
4221
+ status: "healthy" | "degraded" | "unhealthy" | "unreachable";
4222
+ gateway: {
4223
+ status: "up" | "down";
4224
+ uptimeSeconds: number;
4225
+ };
4226
+ validator: {
4227
+ status: "up" | "down" | "unknown";
4228
+ responseTimeMs: number | null;
4229
+ version: string | null;
4230
+ };
4231
+ host: {
4232
+ status: "up" | "down" | "unknown";
4233
+ responseTimeMs: number | null;
4234
+ };
4235
+ chains: {
4236
+ hedera: {
4237
+ connected: boolean;
4238
+ network: string | null;
4239
+ };
4240
+ xrpl: {
4241
+ connected: boolean;
4242
+ network: string | null;
4243
+ };
4244
+ };
4245
+ genesis: {
4246
+ status: "pending" | "in_progress" | "completed" | "failed" | "unknown";
4247
+ completedChains: string[];
4248
+ };
4249
+ lastChecked: string;
2173
4250
  };
2174
4251
  export type GatewayMetricsSummaryResponse = {
2175
- summary: Record<string, unknown>;
2176
- period: string;
2177
- generatedAt: string;
4252
+ timestamp: string;
4253
+ status: "operational" | "degraded" | "down";
4254
+ clusters: string;
4255
+ validators: string;
4256
+ hedera: "connected" | "disconnected";
4257
+ xrpl: "connected" | "disconnected";
4258
+ genesis: "pending" | "in_progress" | "completed" | "unknown";
4259
+ version: string;
4260
+ };
4261
+ export type ClusterHealthAggregate = {
4262
+ clusterId: string;
4263
+ gateway: {
4264
+ status: "up";
4265
+ uptimeSeconds: number;
4266
+ version: string;
4267
+ gatewayId: string;
4268
+ };
4269
+ validator: {
4270
+ status: "up" | "down";
4271
+ version: string | null;
4272
+ chains: Array<{
4273
+ chain: string;
4274
+ connected: boolean;
4275
+ network?: string;
4276
+ latency?: number;
4277
+ }>;
4278
+ };
4279
+ host: {
4280
+ status: "up" | "down";
4281
+ };
4282
+ genesis: {
4283
+ bootstrap?: {
4284
+ state?: string;
4285
+ };
4286
+ multiChain?: {
4287
+ overall?: string;
4288
+ implementedChains?: {
4289
+ completed?: number;
4290
+ };
4291
+ queueSummary?: unknown;
4292
+ };
4293
+ };
4294
+ lastChecked: string;
2178
4295
  };
2179
4296
  export type RegisterHostRequest = {
2180
- name: string;
2181
- endpoint: string;
2182
- capabilities?: string[];
2183
- metadata?: Record<string, unknown>;
4297
+ appId: string;
4298
+ address: string;
4299
+ port: number;
4300
+ weight?: number;
4301
+ region?: string;
4302
+ metadata?: Record<string, string>;
2184
4303
  };
2185
4304
  export type HostInfo = {
2186
- hostId: string;
2187
- name: string;
2188
- endpoint: string;
2189
- status: "active" | "inactive" | "suspended";
4305
+ id: string;
4306
+ address: string;
4307
+ port: number;
4308
+ weight?: number;
4309
+ region?: string;
2190
4310
  verified: boolean;
2191
- capabilities: string[];
2192
- lastSeen: string;
4311
+ verifiedAt?: string;
4312
+ verificationExpires?: string;
4313
+ attestationScore?: number;
4314
+ healthStatus?: "healthy" | "unhealthy" | "unknown";
4315
+ lastHealthCheck?: string;
4316
+ responseTime?: number;
4317
+ activeConnections?: number;
4318
+ successfulChecks?: number;
4319
+ failedChecks?: number;
2193
4320
  registeredAt: string;
2194
- metadata?: Record<string, unknown>;
4321
+ };
4322
+ export type RegisterHostResponse = {
4323
+ success: boolean;
4324
+ host: {
4325
+ id: string;
4326
+ address: string;
4327
+ port: number;
4328
+ verified: boolean;
4329
+ healthStatus?: string;
4330
+ registeredAt: string;
4331
+ };
4332
+ message: string;
2195
4333
  };
2196
4334
  export type HostListResponse = {
4335
+ count: number;
2197
4336
  hosts: HostInfo[];
2198
- total: number;
2199
4337
  };
2200
4338
  export type RoutingConfig = {
2201
- strategy: "round-robin" | "least-connections" | "random" | "weighted";
4339
+ hosts?: string[];
4340
+ loadBalancing?: "round-robin" | "weighted" | "least-connections" | "random" | "ip-hash";
4341
+ redundantExecution?: boolean;
4342
+ minHosts?: number;
2202
4343
  healthCheckInterval?: number;
2203
- timeout?: number;
2204
- retries?: number;
2205
- weights?: Record<string, number>;
4344
+ healthCheckPath?: string;
2206
4345
  };
2207
4346
  export type ProxyRequest = {
2208
- targetHostId?: string;
2209
- method: string;
4347
+ host: string;
2210
4348
  path: string;
4349
+ method: string;
2211
4350
  headers?: Record<string, string>;
2212
4351
  body?: unknown;
2213
4352
  };
2214
4353
  export type ProxyResponse = {
2215
- statusCode: number;
2216
- headers: Record<string, string>;
2217
- body: unknown;
2218
- hostId: string;
2219
- latencyMs: number;
4354
+ success: boolean;
4355
+ data: unknown;
4356
+ meta: {
4357
+ hostId: string;
4358
+ responseTime: number;
4359
+ routingStrategy: string;
4360
+ };
2220
4361
  };
2221
4362
  export type RoutingStatsResponse = {
2222
- totalRequests: number;
2223
- successRate: number;
2224
- avgLatencyMs: number;
2225
- hostStats: Record<string, {
2226
- requests: number;
2227
- errors: number;
2228
- avgLatencyMs: number;
2229
- }>;
4363
+ timestamp: string;
4364
+ strictMode: boolean;
4365
+ defaultStrategy: string;
4366
+ hosts: Record<string, unknown>;
4367
+ verification: Record<string, unknown>;
4368
+ };
4369
+ export type MapDomainToAppResponse = {
4370
+ domain: string;
4371
+ appId: string;
4372
+ message: string;
2230
4373
  };
2231
4374
  export type DomainRegistrationRequest = {
2232
4375
  domain: string;
@@ -2256,21 +4399,21 @@ export type DomainAvailabilityResponse = {
2256
4399
  price?: string;
2257
4400
  suggestions?: string[];
2258
4401
  };
4402
+ export type VerificationMethod = "dns-txt" | "dns-cname" | "http-file" | "email";
2259
4403
  export type VerificationTokenResponse = {
4404
+ domain: string;
4405
+ method: VerificationMethod;
2260
4406
  token: string;
2261
- method: "dns" | "http" | "email";
2262
4407
  instructions: string;
2263
- expiresAt: string;
2264
4408
  };
2265
4409
  export type VerificationResult = {
2266
- verified: boolean;
2267
4410
  domain: string;
2268
- method: string;
2269
- verifiedAt?: string;
2270
- error?: string;
4411
+ verified: boolean;
4412
+ message: string;
2271
4413
  };
4414
+ export type DnsRecordType = "A" | "AAAA" | "CNAME" | "TXT" | "MX" | "NS" | "SOA" | "SRV" | "CAA" | "DNSKEY" | "DS" | "RRSIG" | "NSEC" | "NSEC3";
2272
4415
  export type DnsRecord = {
2273
- type: "A" | "AAAA" | "CNAME" | "MX" | "TXT" | "NS" | "SRV" | "CAA";
4416
+ type: DnsRecordType;
2274
4417
  name: string;
2275
4418
  value: string;
2276
4419
  ttl?: number;
@@ -2340,26 +4483,30 @@ export type DnssecDsRecord = {
2340
4483
  declare class RoutingClient {
2341
4484
  private readonly http;
2342
4485
  constructor(http: HttpClient);
2343
- registerHost(request: RegisterHostRequest): Promise<HostInfo>;
4486
+ registerHost(request: RegisterHostRequest): Promise<RegisterHostResponse>;
2344
4487
  unregisterHost(hostId: string): Promise<{
2345
4488
  success: boolean;
4489
+ message: string;
2346
4490
  }>;
2347
4491
  getAllHosts(): Promise<HostListResponse>;
2348
4492
  getVerifiedHosts(): Promise<HostListResponse>;
2349
4493
  getHost(hostId: string): Promise<HostInfo>;
2350
4494
  verifyHost(hostId: string): Promise<{
4495
+ success: boolean;
4496
+ hostId: string;
2351
4497
  verified: boolean;
4498
+ attestationScore?: number;
2352
4499
  message: string;
2353
4500
  }>;
2354
- setRoutingConfig(appId: string, config: RoutingConfig): Promise<RoutingConfig>;
2355
- getRoutingConfig(appId: string): Promise<RoutingConfig>;
2356
- proxyRequest(request: ProxyRequest): Promise<ProxyResponse>;
2357
- getStats(): Promise<RoutingStatsResponse>;
2358
- mapDomainToApp(domain: string, appId: string): Promise<{
4501
+ setRoutingConfig(appId: string, config: RoutingConfig): Promise<{
2359
4502
  success: boolean;
2360
- domain: string;
2361
4503
  appId: string;
4504
+ message: string;
2362
4505
  }>;
4506
+ getRoutingConfig(appId: string): Promise<RoutingConfig>;
4507
+ proxyRequest(request: ProxyRequest): Promise<ProxyResponse>;
4508
+ getStats(): Promise<RoutingStatsResponse>;
4509
+ mapDomainToApp(domain: string, appId: string): Promise<MapDomainToAppResponse>;
2363
4510
  }
2364
4511
  declare class DomainsClient {
2365
4512
  private readonly http;
@@ -2368,7 +4515,7 @@ declare class DomainsClient {
2368
4515
  checkAvailability(domain: string): Promise<DomainAvailabilityResponse>;
2369
4516
  getInfo(domain: string): Promise<DomainInfo>;
2370
4517
  list(owner?: string): Promise<DomainListResponse>;
2371
- generateVerificationToken(domain: string, method: "dns" | "http" | "email"): Promise<VerificationTokenResponse>;
4518
+ generateVerificationToken(domain: string, method: VerificationMethod): Promise<VerificationTokenResponse>;
2372
4519
  verifyOwnership(domain: string, token: string): Promise<VerificationResult>;
2373
4520
  configureDns(domain: string, records: DnsRecord[]): Promise<{
2374
4521
  success: boolean;
@@ -2433,6 +4580,11 @@ declare class DnsClient {
2433
4580
  entriesCleared: number;
2434
4581
  }>;
2435
4582
  }
4583
+ declare class HealthClient {
4584
+ private readonly http;
4585
+ constructor(http: HttpClient);
4586
+ getCluster(): Promise<ClusterHealthAggregate>;
4587
+ }
2436
4588
  export type SmartGatewayClientConfig = {
2437
4589
  baseUrl: string;
2438
4590
  apiKey?: string;
@@ -2445,6 +4597,7 @@ declare class SmartGatewayClient {
2445
4597
  readonly routing: RoutingClient;
2446
4598
  readonly domains: DomainsClient;
2447
4599
  readonly dns: DnsClient;
4600
+ readonly health: HealthClient;
2448
4601
  constructor(config: SmartGatewayClientConfig);
2449
4602
  getHealth(): Promise<GatewayHealthResponse>;
2450
4603
  getStatus(): Promise<GatewayStatusResponse>;
@@ -2489,6 +4642,13 @@ declare class DatabaseClient {
2489
4642
  listCollections(): Promise<{
2490
4643
  collections: string[];
2491
4644
  }>;
4645
+ createCollection(name: string): Promise<{
4646
+ success: boolean;
4647
+ collection: string;
4648
+ }>;
4649
+ dropCollection(name: string): Promise<{
4650
+ success: boolean;
4651
+ }>;
2492
4652
  getStateRoot(): Promise<StateRootResponse>;
2493
4653
  getDocumentProof(documentId: string): Promise<DocumentProofResponse>;
2494
4654
  getStateTransitions(options?: {
@@ -2511,7 +4671,7 @@ declare class StorageClient {
2511
4671
  getFile(cid: string): Promise<BaasFileInfo>;
2512
4672
  listFiles(pagination?: {
2513
4673
  limit?: number;
2514
- skip?: number;
4674
+ offset?: number;
2515
4675
  }): Promise<{
2516
4676
  files: BaasFileInfo[];
2517
4677
  total: number;
@@ -2569,10 +4729,10 @@ declare class MessagingClient {
2569
4729
  total: number;
2570
4730
  hasMore: boolean;
2571
4731
  }>;
2572
- setPresence(member: BaasPresenceMember): Promise<{
4732
+ setPresence(channel: string, member: BaasPresenceMember): Promise<{
2573
4733
  success: boolean;
2574
4734
  }>;
2575
- removePresence(memberId: string): Promise<{
4735
+ removePresence(channel: string, clientId: string): Promise<{
2576
4736
  success: boolean;
2577
4737
  }>;
2578
4738
  getPresence(channel: string): Promise<BaasPresenceInfo>;