@hashgraphonline/standards-agent-kit 0.2.131 → 0.2.134

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.
Files changed (168) hide show
  1. package/dist/cjs/builders/hcs10/hcs10-builder.d.ts +0 -2
  2. package/dist/cjs/builders/inscriber/inscriber-builder.d.ts +4 -10
  3. package/dist/cjs/index.d.ts +2 -0
  4. package/dist/cjs/interfaces/FormValidatable.d.ts +45 -0
  5. package/dist/cjs/interfaces/index.d.ts +1 -0
  6. package/dist/cjs/lib/index.d.ts +1 -0
  7. package/dist/cjs/lib/zod-render/config-extractor.d.ts +50 -0
  8. package/dist/cjs/lib/zod-render/index.d.ts +6 -0
  9. package/dist/cjs/lib/zod-render/schema-extension.d.ts +94 -0
  10. package/dist/cjs/lib/zod-render/types.d.ts +286 -0
  11. package/dist/cjs/standards-agent-kit.cjs +1 -1
  12. package/dist/cjs/standards-agent-kit.cjs.map +1 -1
  13. package/dist/cjs/tools/hcs10/natural-language-mapper.d.ts +6 -1
  14. package/dist/cjs/tools/hcs2/CreateRegistryTool.d.ts +1 -16
  15. package/dist/cjs/tools/hcs2/DeleteEntryTool.d.ts +1 -13
  16. package/dist/cjs/tools/hcs2/RegisterEntryTool.d.ts +1 -16
  17. package/dist/cjs/tools/hcs2/UpdateEntryTool.d.ts +1 -19
  18. package/dist/cjs/tools/hcs6/CreateDynamicRegistryTool.d.ts +1 -10
  19. package/dist/cjs/tools/inscriber/InscribeHashinalTool.d.ts +82 -132
  20. package/dist/cjs/tools/inscriber/RetrieveInscriptionTool.d.ts +20 -1
  21. package/dist/cjs/types/inscription-response.d.ts +172 -0
  22. package/dist/cjs/validation/hip412-schemas.d.ts +1 -1
  23. package/dist/es/builders/hcs10/hcs10-builder.d.ts +0 -2
  24. package/dist/es/builders/inscriber/inscriber-builder.d.ts +4 -10
  25. package/dist/es/index.d.ts +2 -0
  26. package/dist/es/interfaces/FormValidatable.d.ts +45 -0
  27. package/dist/es/interfaces/index.d.ts +1 -0
  28. package/dist/es/lib/index.d.ts +1 -0
  29. package/dist/es/lib/zod-render/config-extractor.d.ts +50 -0
  30. package/dist/es/lib/zod-render/index.d.ts +6 -0
  31. package/dist/es/lib/zod-render/schema-extension.d.ts +94 -0
  32. package/dist/es/lib/zod-render/types.d.ts +286 -0
  33. package/dist/es/standards-agent-kit.es.js +24 -1
  34. package/dist/es/standards-agent-kit.es.js.map +1 -1
  35. package/dist/es/standards-agent-kit.es10.js +3 -1
  36. package/dist/es/standards-agent-kit.es10.js.map +1 -1
  37. package/dist/es/standards-agent-kit.es14.js +3 -1
  38. package/dist/es/standards-agent-kit.es14.js.map +1 -1
  39. package/dist/es/standards-agent-kit.es20.js +3 -20
  40. package/dist/es/standards-agent-kit.es20.js.map +1 -1
  41. package/dist/es/standards-agent-kit.es22.js.map +1 -1
  42. package/dist/es/standards-agent-kit.es23.js.map +1 -1
  43. package/dist/es/standards-agent-kit.es24.js.map +1 -1
  44. package/dist/es/standards-agent-kit.es25.js.map +1 -1
  45. package/dist/es/standards-agent-kit.es29.js.map +1 -1
  46. package/dist/es/standards-agent-kit.es3.js +0 -4
  47. package/dist/es/standards-agent-kit.es3.js.map +1 -1
  48. package/dist/es/standards-agent-kit.es30.js.map +1 -1
  49. package/dist/es/standards-agent-kit.es31.js.map +1 -1
  50. package/dist/es/standards-agent-kit.es32.js.map +1 -1
  51. package/dist/es/standards-agent-kit.es33.js +0 -4
  52. package/dist/es/standards-agent-kit.es33.js.map +1 -1
  53. package/dist/es/standards-agent-kit.es34.js +13 -17
  54. package/dist/es/standards-agent-kit.es34.js.map +1 -1
  55. package/dist/es/standards-agent-kit.es35.js +2 -8
  56. package/dist/es/standards-agent-kit.es35.js.map +1 -1
  57. package/dist/es/standards-agent-kit.es36.js +2 -2
  58. package/dist/es/standards-agent-kit.es37.js +451 -92
  59. package/dist/es/standards-agent-kit.es37.js.map +1 -1
  60. package/dist/es/standards-agent-kit.es38.js +12 -11
  61. package/dist/es/standards-agent-kit.es38.js.map +1 -1
  62. package/dist/es/standards-agent-kit.es39.js +1 -1
  63. package/dist/es/standards-agent-kit.es39.js.map +1 -1
  64. package/dist/es/standards-agent-kit.es40.js +7 -7
  65. package/dist/es/standards-agent-kit.es40.js.map +1 -1
  66. package/dist/es/standards-agent-kit.es41.js.map +1 -1
  67. package/dist/es/standards-agent-kit.es42.js +423 -24
  68. package/dist/es/standards-agent-kit.es42.js.map +1 -1
  69. package/dist/es/standards-agent-kit.es43.js +185 -3
  70. package/dist/es/standards-agent-kit.es43.js.map +1 -1
  71. package/dist/es/standards-agent-kit.es44.js +3 -53
  72. package/dist/es/standards-agent-kit.es44.js.map +1 -1
  73. package/dist/es/standards-agent-kit.es45.js +25 -3
  74. package/dist/es/standards-agent-kit.es45.js.map +1 -1
  75. package/dist/es/standards-agent-kit.es46.js +3 -39
  76. package/dist/es/standards-agent-kit.es46.js.map +1 -1
  77. package/dist/es/standards-agent-kit.es47.js +51 -9
  78. package/dist/es/standards-agent-kit.es47.js.map +1 -1
  79. package/dist/es/standards-agent-kit.es48.js +6 -0
  80. package/dist/es/standards-agent-kit.es48.js.map +1 -0
  81. package/dist/es/standards-agent-kit.es49.js +43 -0
  82. package/dist/es/standards-agent-kit.es49.js.map +1 -0
  83. package/dist/es/standards-agent-kit.es50.js +22 -0
  84. package/dist/es/standards-agent-kit.es50.js.map +1 -0
  85. package/dist/es/standards-agent-kit.es51.js +57 -0
  86. package/dist/es/standards-agent-kit.es51.js.map +1 -0
  87. package/dist/es/standards-agent-kit.es6.js +1 -1
  88. package/dist/es/standards-agent-kit.es6.js.map +1 -1
  89. package/dist/es/standards-agent-kit.es7.js +1 -1
  90. package/dist/es/standards-agent-kit.es7.js.map +1 -1
  91. package/dist/es/standards-agent-kit.es9.js +6 -2
  92. package/dist/es/standards-agent-kit.es9.js.map +1 -1
  93. package/dist/es/tools/hcs10/natural-language-mapper.d.ts +6 -1
  94. package/dist/es/tools/hcs2/CreateRegistryTool.d.ts +1 -16
  95. package/dist/es/tools/hcs2/DeleteEntryTool.d.ts +1 -13
  96. package/dist/es/tools/hcs2/RegisterEntryTool.d.ts +1 -16
  97. package/dist/es/tools/hcs2/UpdateEntryTool.d.ts +1 -19
  98. package/dist/es/tools/hcs6/CreateDynamicRegistryTool.d.ts +1 -10
  99. package/dist/es/tools/inscriber/InscribeHashinalTool.d.ts +82 -132
  100. package/dist/es/tools/inscriber/RetrieveInscriptionTool.d.ts +20 -1
  101. package/dist/es/types/inscription-response.d.ts +172 -0
  102. package/dist/es/validation/hip412-schemas.d.ts +1 -1
  103. package/dist/umd/builders/hcs10/hcs10-builder.d.ts +0 -2
  104. package/dist/umd/builders/inscriber/inscriber-builder.d.ts +4 -10
  105. package/dist/umd/index.d.ts +2 -0
  106. package/dist/umd/interfaces/FormValidatable.d.ts +45 -0
  107. package/dist/umd/interfaces/index.d.ts +1 -0
  108. package/dist/umd/lib/index.d.ts +1 -0
  109. package/dist/umd/lib/zod-render/config-extractor.d.ts +50 -0
  110. package/dist/umd/lib/zod-render/index.d.ts +6 -0
  111. package/dist/umd/lib/zod-render/schema-extension.d.ts +94 -0
  112. package/dist/umd/lib/zod-render/types.d.ts +286 -0
  113. package/dist/umd/standards-agent-kit.umd.js +1 -1
  114. package/dist/umd/standards-agent-kit.umd.js.map +1 -1
  115. package/dist/umd/tools/hcs10/natural-language-mapper.d.ts +6 -1
  116. package/dist/umd/tools/hcs2/CreateRegistryTool.d.ts +1 -16
  117. package/dist/umd/tools/hcs2/DeleteEntryTool.d.ts +1 -13
  118. package/dist/umd/tools/hcs2/RegisterEntryTool.d.ts +1 -16
  119. package/dist/umd/tools/hcs2/UpdateEntryTool.d.ts +1 -19
  120. package/dist/umd/tools/hcs6/CreateDynamicRegistryTool.d.ts +1 -10
  121. package/dist/umd/tools/inscriber/InscribeHashinalTool.d.ts +82 -132
  122. package/dist/umd/tools/inscriber/RetrieveInscriptionTool.d.ts +20 -1
  123. package/dist/umd/types/inscription-response.d.ts +172 -0
  124. package/dist/umd/validation/hip412-schemas.d.ts +1 -1
  125. package/package.json +5 -4
  126. package/src/builders/hcs10/hcs10-builder.ts +0 -4
  127. package/src/builders/inscriber/inscriber-builder.ts +5 -12
  128. package/src/hcs10/HCS10Client.ts +2 -5
  129. package/src/hcs10/types.ts +1 -15
  130. package/src/index.ts +2 -0
  131. package/src/init/init.ts +7 -10
  132. package/src/interfaces/FormValidatable.ts +57 -0
  133. package/src/interfaces/index.ts +1 -0
  134. package/src/lib/index.ts +1 -0
  135. package/src/lib/zod-render/config-extractor.ts +351 -0
  136. package/src/lib/zod-render/index.ts +36 -0
  137. package/src/lib/zod-render/schema-extension.ts +544 -0
  138. package/src/lib/zod-render/types.ts +333 -0
  139. package/src/plugins/PluginInterface.ts +1 -2
  140. package/src/plugins/PluginRegistry.ts +1 -1
  141. package/src/plugins/hedera/HbarPricePlugin.ts +1 -1
  142. package/src/plugins/weather/index.ts +15 -4
  143. package/src/state/open-convai-state.ts +1 -11
  144. package/src/tools/hcs10/FindRegistrationsTool.ts +1 -1
  145. package/src/tools/hcs10/RegisterAgentTool.ts +3 -3
  146. package/src/tools/hcs10/SendMessageToConnectionTool.ts +4 -1
  147. package/src/tools/hcs10/natural-language-mapper.ts +35 -53
  148. package/src/tools/hcs2/CreateRegistryTool.ts +1 -1
  149. package/src/tools/hcs2/DeleteEntryTool.ts +1 -1
  150. package/src/tools/hcs2/RegisterEntryTool.ts +1 -1
  151. package/src/tools/hcs2/UpdateEntryTool.ts +1 -1
  152. package/src/tools/hcs6/CreateDynamicRegistryTool.ts +2 -2
  153. package/src/tools/hcs6/QueryDynamicRegistryTool.ts +1 -1
  154. package/src/tools/hcs6/RegisterDynamicHashinalTool.ts +1 -1
  155. package/src/tools/hcs6/UpdateDynamicHashinalTool.ts +2 -2
  156. package/src/tools/inscriber/InscribeFromFileTool.ts +2 -11
  157. package/src/tools/inscriber/InscribeFromUrlTool.ts +15 -19
  158. package/src/tools/inscriber/InscribeHashinalTool.ts +681 -153
  159. package/src/tools/inscriber/RetrieveInscriptionTool.ts +34 -12
  160. package/src/tools/inscriber/base-inscriber-tools.ts +2 -24
  161. package/src/types/content-resolver.ts +3 -3
  162. package/src/types/inscription-response.ts +234 -0
  163. package/src/utils/Encryption.ts +1 -1
  164. package/src/utils/HederaClient.ts +1 -2
  165. package/src/utils/metadata-defaults.ts +15 -4
  166. package/src/utils/state-tools.ts +1 -2
  167. package/src/validation/content-ref-schemas.ts +2 -2
  168. package/src/validation/hip412-schemas.ts +1 -1
@@ -1,62 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  import { BaseInscriberQueryTool } from './base-inscriber-tools';
3
3
  import { CallbackManagerForToolRun } from '@langchain/core/callbacks/manager';
4
+ import { InscriptionResponse } from '../../types/inscription-response';
5
+ import { FormValidatable } from '../../interfaces/FormValidatable';
4
6
  /**
5
7
  * Schema for inscribing Hashinal NFT
6
8
  */
7
- declare const inscribeHashinalSchema: z.ZodObject<{
8
- url: z.ZodOptional<z.ZodString>;
9
- contentRef: z.ZodOptional<z.ZodString>;
10
- base64Data: z.ZodOptional<z.ZodString>;
11
- fileName: z.ZodOptional<z.ZodString>;
12
- mimeType: z.ZodOptional<z.ZodString>;
13
- name: z.ZodOptional<z.ZodString>;
14
- creator: z.ZodOptional<z.ZodString>;
15
- description: z.ZodOptional<z.ZodString>;
16
- type: z.ZodOptional<z.ZodString>;
17
- attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
18
- trait_type: z.ZodString;
19
- value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
20
- }, "strip", z.ZodTypeAny, {
21
- value: string | number;
22
- trait_type: string;
23
- }, {
24
- value: string | number;
25
- trait_type: string;
26
- }>, "many">>;
27
- properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
28
- jsonFileURL: z.ZodOptional<z.ZodString>;
29
- fileStandard: z.ZodDefault<z.ZodOptional<z.ZodEnum<["1", "6"]>>>;
30
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
31
- chunkSize: z.ZodOptional<z.ZodNumber>;
32
- waitForConfirmation: z.ZodOptional<z.ZodBoolean>;
33
- timeoutMs: z.ZodOptional<z.ZodNumber>;
34
- apiKey: z.ZodOptional<z.ZodString>;
35
- quoteOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
36
- }, "strip", z.ZodTypeAny, {
37
- quoteOnly: boolean;
38
- fileStandard: "1" | "6";
39
- url?: string | undefined;
40
- type?: string | undefined;
41
- name?: string | undefined;
42
- description?: string | undefined;
43
- tags?: string[] | undefined;
44
- creator?: string | undefined;
45
- properties?: Record<string, unknown> | undefined;
46
- mimeType?: string | undefined;
47
- chunkSize?: number | undefined;
48
- waitForConfirmation?: boolean | undefined;
49
- timeoutMs?: number | undefined;
50
- apiKey?: string | undefined;
51
- fileName?: string | undefined;
52
- base64Data?: string | undefined;
53
- attributes?: {
54
- value: string | number;
55
- trait_type: string;
56
- }[] | undefined;
57
- contentRef?: string | undefined;
58
- jsonFileURL?: string | undefined;
59
- }, {
9
+ declare const inscribeHashinalSchema: import('../..').ZodSchemaWithRender<{
60
10
  url?: string | undefined;
61
11
  type?: string | undefined;
62
12
  name?: string | undefined;
@@ -68,7 +18,6 @@ declare const inscribeHashinalSchema: z.ZodObject<{
68
18
  chunkSize?: number | undefined;
69
19
  waitForConfirmation?: boolean | undefined;
70
20
  timeoutMs?: number | undefined;
71
- apiKey?: string | undefined;
72
21
  quoteOnly?: boolean | undefined;
73
22
  fileName?: string | undefined;
74
23
  base64Data?: string | undefined;
@@ -79,91 +28,92 @@ declare const inscribeHashinalSchema: z.ZodObject<{
79
28
  contentRef?: string | undefined;
80
29
  jsonFileURL?: string | undefined;
81
30
  fileStandard?: "1" | "6" | undefined;
31
+ withHashLinkBlocks?: boolean | undefined;
32
+ renderForm?: boolean | undefined;
82
33
  }>;
83
34
  /**
84
35
  * Tool for inscribing Hashinal NFTs
85
36
  */
86
- export declare class InscribeHashinalTool extends BaseInscriberQueryTool<typeof inscribeHashinalSchema> {
37
+ export declare class InscribeHashinalTool extends BaseInscriberQueryTool implements FormValidatable {
87
38
  name: string;
88
39
  description: string;
89
- get specificInputSchema(): z.ZodObject<{
90
- url: z.ZodOptional<z.ZodString>;
91
- contentRef: z.ZodOptional<z.ZodString>;
92
- base64Data: z.ZodOptional<z.ZodString>;
93
- fileName: z.ZodOptional<z.ZodString>;
94
- mimeType: z.ZodOptional<z.ZodString>;
95
- name: z.ZodOptional<z.ZodString>;
96
- creator: z.ZodOptional<z.ZodString>;
97
- description: z.ZodOptional<z.ZodString>;
98
- type: z.ZodOptional<z.ZodString>;
99
- attributes: z.ZodOptional<z.ZodArray<z.ZodObject<{
100
- trait_type: z.ZodString;
101
- value: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
102
- }, "strip", z.ZodTypeAny, {
103
- value: string | number;
104
- trait_type: string;
105
- }, {
106
- value: string | number;
107
- trait_type: string;
108
- }>, "many">>;
109
- properties: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
110
- jsonFileURL: z.ZodOptional<z.ZodString>;
111
- fileStandard: z.ZodDefault<z.ZodOptional<z.ZodEnum<["1", "6"]>>>;
112
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
113
- chunkSize: z.ZodOptional<z.ZodNumber>;
114
- waitForConfirmation: z.ZodOptional<z.ZodBoolean>;
115
- timeoutMs: z.ZodOptional<z.ZodNumber>;
116
- apiKey: z.ZodOptional<z.ZodString>;
117
- quoteOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
118
- }, "strip", z.ZodTypeAny, {
119
- quoteOnly: boolean;
120
- fileStandard: "1" | "6";
121
- url?: string | undefined;
122
- type?: string | undefined;
123
- name?: string | undefined;
124
- description?: string | undefined;
125
- tags?: string[] | undefined;
126
- creator?: string | undefined;
127
- properties?: Record<string, unknown> | undefined;
128
- mimeType?: string | undefined;
129
- chunkSize?: number | undefined;
130
- waitForConfirmation?: boolean | undefined;
131
- timeoutMs?: number | undefined;
132
- apiKey?: string | undefined;
133
- fileName?: string | undefined;
134
- base64Data?: string | undefined;
135
- attributes?: {
136
- value: string | number;
137
- trait_type: string;
138
- }[] | undefined;
139
- contentRef?: string | undefined;
140
- jsonFileURL?: string | undefined;
141
- }, {
142
- url?: string | undefined;
143
- type?: string | undefined;
144
- name?: string | undefined;
145
- description?: string | undefined;
146
- tags?: string[] | undefined;
147
- creator?: string | undefined;
148
- properties?: Record<string, unknown> | undefined;
149
- mimeType?: string | undefined;
150
- chunkSize?: number | undefined;
151
- waitForConfirmation?: boolean | undefined;
152
- timeoutMs?: number | undefined;
153
- apiKey?: string | undefined;
154
- quoteOnly?: boolean | undefined;
155
- fileName?: string | undefined;
156
- base64Data?: string | undefined;
157
- attributes?: {
158
- value: string | number;
159
- trait_type: string;
160
- }[] | undefined;
161
- contentRef?: string | undefined;
162
- jsonFileURL?: string | undefined;
163
- fileStandard?: "1" | "6" | undefined;
164
- }>;
165
- protected executeQuery(params: z.infer<typeof inscribeHashinalSchema>, _runManager?: CallbackManagerForToolRun): Promise<unknown>;
40
+ get specificInputSchema(): z.ZodObject<z.ZodRawShape>;
41
+ private _schemaWithRenderConfig?;
42
+ get schema(): z.ZodObject<z.ZodRawShape>;
43
+ /**
44
+ * Implementation of FormValidatable interface
45
+ * Determines if a form should be generated for the given input
46
+ */
47
+ shouldGenerateForm(input: unknown): boolean;
48
+ /**
49
+ * Implementation of FormValidatable interface
50
+ * Returns the focused schema for form generation
51
+ */
52
+ getFormSchema(): z.ZodObject<z.ZodRawShape>;
53
+ /**
54
+ * Implementation of FormValidatable interface
55
+ * Validates metadata quality and provides detailed feedback
56
+ */
57
+ validateMetadataQuality(input: unknown): {
58
+ needsForm: boolean;
59
+ reason: string;
60
+ };
61
+ protected executeQuery(params: z.infer<typeof inscribeHashinalSchema>, _runManager?: CallbackManagerForToolRun): Promise<InscriptionResponse>;
62
+ /**
63
+ * Creates HashLink block configuration for Hashinal inscriptions.
64
+ * Automatically detects network and selects appropriate block ID configuration.
65
+ * Uses testnet block as fallback for unknown networks or undeployed mainnet blocks.
66
+ *
67
+ * @param response The inscription response containing metadata and network information
68
+ * @param _mimeType Optional MIME type (currently unused, preserved for compatibility)
69
+ * @returns HCS12BlockResult with network-specific block configuration
70
+ *
71
+ * @example
72
+ * ```typescript
73
+ * // Testnet usage (automatic detection from client)
74
+ * const testnetClient = Client.forTestnet();
75
+ * const tool = new InscribeHashinalTool(testnetClient);
76
+ * const block = await tool.createHashLinkBlock(inscriptionResponse);
77
+ * console.log(block.blockId); // '0.0.6617393'
78
+ * console.log(block.hashLink); // 'hcs://12/0.0.6617393'
79
+ *
80
+ * // Mainnet usage (automatic detection from client)
81
+ * const mainnetClient = Client.forMainnet();
82
+ * const tool = new InscribeHashinalTool(mainnetClient);
83
+ * const block = await tool.createHashLinkBlock(inscriptionResponse);
84
+ * console.log(block.blockId); // Network-specific mainnet block ID
85
+ *
86
+ * // HashLink Block Response Structure:
87
+ * {
88
+ * blockId: string; // Hedera account ID format (e.g., '0.0.6617393')
89
+ * hashLink: string; // HCS-12 URL format: 'hcs://12/{blockId}'
90
+ * template: string; // Block template reference matching blockId
91
+ * attributes: { // Metadata for client-side processing
92
+ * name: string; // Content display name
93
+ * creator: string; // Creator account ID
94
+ * topicId: string; // HCS topic containing the inscription
95
+ * hrl: string; // Hedera Resource Locator
96
+ * network: string; // Network type: 'testnet' | 'mainnet'
97
+ * }
98
+ * }
99
+ *
100
+ * // Render function usage in HashLink blocks:
101
+ * // The block's JavaScript render function receives this structure
102
+ * // and can access network-specific resources through attributes.network
103
+ * ```
104
+ */
105
+ private createHashLinkBlock;
166
106
  private resolveContent;
167
107
  private handleDirectContent;
108
+ /**
109
+ * Implementation of FormValidatable interface
110
+ * Returns essential fields that should always be shown in forms
111
+ */
112
+ getEssentialFields(): string[];
113
+ /**
114
+ * Implementation of FormValidatable interface
115
+ * Determines if a field value should be considered empty for this tool
116
+ */
117
+ isFieldEmpty(fieldName: string, value: unknown): boolean;
168
118
  }
169
119
  export {};
@@ -14,6 +14,25 @@ declare const retrieveInscriptionSchema: z.ZodObject<{
14
14
  transactionId: string;
15
15
  apiKey?: string | undefined;
16
16
  }>;
17
+ /**
18
+ * Type definition for inscription retrieval result
19
+ */
20
+ interface InscriptionRetrievalResult {
21
+ inscriptionId?: string;
22
+ transactionId: string;
23
+ topicId?: string;
24
+ status?: string;
25
+ holderId?: string;
26
+ metadata?: unknown;
27
+ tags?: unknown;
28
+ mode?: string;
29
+ chunks?: unknown;
30
+ createdAt?: string;
31
+ completedAt?: string;
32
+ fileUrl?: string;
33
+ mimeType?: string;
34
+ fileSize?: number;
35
+ }
17
36
  /**
18
37
  * Tool for retrieving inscriptions
19
38
  */
@@ -30,6 +49,6 @@ export declare class RetrieveInscriptionTool extends BaseInscriberQueryTool<type
30
49
  transactionId: string;
31
50
  apiKey?: string | undefined;
32
51
  }>;
33
- protected executeQuery(params: z.infer<typeof retrieveInscriptionSchema>, _runManager?: CallbackManagerForToolRun): Promise<unknown>;
52
+ protected executeQuery(params: z.infer<typeof retrieveInscriptionSchema>, _runManager?: CallbackManagerForToolRun): Promise<InscriptionRetrievalResult>;
34
53
  }
35
54
  export {};
@@ -0,0 +1,172 @@
1
+ /**
2
+ * Structured response interface for inscription tools
3
+ * Provides a consistent, user-friendly format for inscription results
4
+ */
5
+ export interface InscriptionSuccessResponse {
6
+ success: true;
7
+ type: 'inscription';
8
+ title: string;
9
+ message: string;
10
+ inscription: {
11
+ /** The HRL (Hashinal Reference Link) for minting - e.g., "hcs://1/0.0.123456" */
12
+ hrl: string;
13
+ /** Topic ID where the inscription was stored */
14
+ topicId: string;
15
+ /** Type of Hashinal - Static (HCS-5) or Dynamic (HCS-6) */
16
+ standard: 'Static' | 'Dynamic';
17
+ /** CDN URL for direct access to the inscribed content */
18
+ cdnUrl?: string;
19
+ /** Transaction ID of the inscription */
20
+ transactionId?: string;
21
+ };
22
+ metadata: {
23
+ /** Name/title of the inscribed content */
24
+ name?: string;
25
+ /** Creator of the content */
26
+ creator?: string;
27
+ /** Description of the content */
28
+ description?: string;
29
+ /** Content type (image, text, etc.) */
30
+ type?: string;
31
+ /** Additional attributes */
32
+ attributes?: Array<{
33
+ trait_type: string;
34
+ value: string | number;
35
+ }>;
36
+ };
37
+ nextSteps: {
38
+ /** Primary action the user should take next */
39
+ primary: string;
40
+ /** Additional context or options */
41
+ context?: string;
42
+ /** Specific metadata value to use for minting */
43
+ mintingMetadata: string;
44
+ };
45
+ /** HashLink block data (only present when withHashLinkBlocks=true) */
46
+ hashLinkBlock?: {
47
+ /** Block topic ID on HCS */
48
+ blockId: string;
49
+ /** HashLink reference to the block */
50
+ hashLink: string;
51
+ /** Template topic ID */
52
+ template: string;
53
+ /** Block attributes for rendering */
54
+ attributes: BlockAttributes;
55
+ };
56
+ }
57
+ export interface InscriptionQuoteResponse {
58
+ success: true;
59
+ type: 'quote';
60
+ title: string;
61
+ message: string;
62
+ quote: {
63
+ /** Total cost in HBAR */
64
+ totalCostHbar: string;
65
+ /** When the quote expires */
66
+ validUntil: string;
67
+ /** Cost breakdown details */
68
+ breakdown?: CostBreakdown;
69
+ };
70
+ content: {
71
+ /** Name of the content to be inscribed */
72
+ name?: string;
73
+ /** Creator of the content */
74
+ creator?: string;
75
+ /** Type of content */
76
+ type?: string;
77
+ };
78
+ }
79
+ export interface InscriptionErrorResponse {
80
+ success: false;
81
+ type: 'error';
82
+ title: string;
83
+ message: string;
84
+ error: {
85
+ /** Error code for programmatic handling */
86
+ code: string;
87
+ /** Detailed error message */
88
+ details: string;
89
+ /** Suggestions for fixing the error */
90
+ suggestions?: string[];
91
+ };
92
+ }
93
+ export type InscriptionResponse = InscriptionSuccessResponse | InscriptionQuoteResponse | InscriptionErrorResponse;
94
+ /**
95
+ * Helper function to create a successful inscription response
96
+ */
97
+ export declare function createInscriptionSuccess(params: {
98
+ hrl: string;
99
+ topicId: string;
100
+ standard: 'Static' | 'Dynamic';
101
+ cdnUrl?: string;
102
+ transactionId?: string;
103
+ metadata: {
104
+ name?: string;
105
+ creator?: string;
106
+ description?: string;
107
+ type?: string;
108
+ attributes?: Array<{
109
+ trait_type: string;
110
+ value: string | number;
111
+ }>;
112
+ };
113
+ }): InscriptionSuccessResponse;
114
+ /**
115
+ * Block attributes for HashLink rendering
116
+ */
117
+ interface BlockAttributes {
118
+ /** Display name */
119
+ name?: string;
120
+ /** Description text */
121
+ description?: string;
122
+ /** Image URL */
123
+ image?: string;
124
+ /** Content type */
125
+ contentType?: string;
126
+ /** Size in bytes */
127
+ size?: number;
128
+ /** Custom metadata */
129
+ metadata?: Record<string, string | number | boolean>;
130
+ }
131
+ /**
132
+ * Transfer details in cost breakdown
133
+ */
134
+ interface TransferDetails {
135
+ to: string;
136
+ amount: string;
137
+ description: string;
138
+ }
139
+ /**
140
+ * Cost breakdown details for inscription quote
141
+ */
142
+ interface CostBreakdown {
143
+ transfers: TransferDetails[];
144
+ baseFee?: number;
145
+ sizeFee?: number;
146
+ networkFee?: number;
147
+ serviceFee?: number;
148
+ totalFee?: number;
149
+ currency?: string;
150
+ }
151
+ /**
152
+ * Helper function to create a quote response
153
+ */
154
+ export declare function createInscriptionQuote(params: {
155
+ totalCostHbar: string;
156
+ validUntil: string;
157
+ breakdown?: CostBreakdown;
158
+ content: {
159
+ name?: string;
160
+ creator?: string;
161
+ type?: string;
162
+ };
163
+ }): InscriptionQuoteResponse;
164
+ /**
165
+ * Helper function to create an error response
166
+ */
167
+ export declare function createInscriptionError(params: {
168
+ code: string;
169
+ details: string;
170
+ suggestions?: string[];
171
+ }): InscriptionErrorResponse;
172
+ export {};
@@ -122,4 +122,4 @@ export declare const hip412MetadataSchema: z.ZodObject<{
122
122
  /**
123
123
  * Validates metadata against HIP-412 standard
124
124
  */
125
- export declare function validateHIP412Metadata(metadata: any): z.infer<typeof hip412MetadataSchema>;
125
+ export declare function validateHIP412Metadata(metadata: unknown): z.infer<typeof hip412MetadataSchema>;
@@ -87,8 +87,6 @@ export declare class HCS10Builder extends BaseServiceBuilder {
87
87
  private standardClient;
88
88
  private stateManager;
89
89
  private executeResult?;
90
- private useEncryption;
91
- private guardedRegistryBaseUrl;
92
90
  private network;
93
91
  private sdkLogger;
94
92
  constructor(hederaKit: HederaAgentKit, stateManager?: IStateManager, options?: {
@@ -1,20 +1,14 @@
1
1
  import { BaseServiceBuilder, HederaAgentKit } from 'hedera-agent-kit';
2
2
  import { InscriptionInput, InscriptionOptions, InscriptionResponse, RetrievedInscriptionResult } from '@hashgraphonline/standards-sdk';
3
+ import { InscriptionSDK } from '@kiloscribe/inscription-sdk';
3
4
  /**
4
- * Type definition for DAppSigner since we don't have the actual package
5
+ * Type definition for DAppSigner interface compatible with inscription SDK
5
6
  */
6
7
  interface DAppSigner {
7
8
  getAccountId(): {
8
9
  toString(): string;
9
10
  };
10
- }
11
- /**
12
- * Type definition for InscriptionSDK since we don't have the actual package
13
- */
14
- interface InscriptionSDK {
15
- inscribeAndExecute(request: any, config: any): Promise<any>;
16
- inscribe(request: any, signer: any): Promise<any>;
17
- waitForInscription(txId: string, maxAttempts: number, intervalMs: number, checkCompletion: boolean, progressCallback?: Function): Promise<any>;
11
+ [key: string]: unknown;
18
12
  }
19
13
  /**
20
14
  * Builder for Inscription operations
@@ -25,7 +19,7 @@ export declare class InscriberBuilder extends BaseServiceBuilder {
25
19
  /**
26
20
  * Get or create Inscription SDK - temporarily returns null since we don't have the actual SDK
27
21
  */
28
- protected getInscriptionSDK(options: InscriptionOptions): Promise<InscriptionSDK | null>;
22
+ protected getInscriptionSDK(_options: InscriptionOptions): Promise<InscriptionSDK | null>;
29
23
  /**
30
24
  * Inscribe content using server-side authentication
31
25
  */
@@ -2,6 +2,8 @@ export * from './tools';
2
2
  export * from './state';
3
3
  export * from './init';
4
4
  export * from './plugins';
5
+ export * from './lib';
6
+ export * from './interfaces';
5
7
  export { HCS10Builder, HCS2Builder, HCS6Builder, InscriberBuilder } from './builders';
6
8
  export type { ExecuteResult } from './builders';
7
9
  export { HCS10Client } from './hcs10';
@@ -0,0 +1,45 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Interface for tools that can provide custom form validation logic
4
+ */
5
+ export interface FormValidatable {
6
+ /**
7
+ * Determines if a form should be generated for the given input
8
+ * @param input The input data to validate
9
+ * @returns true if a form should be generated, false if the tool can execute
10
+ */
11
+ shouldGenerateForm(input: unknown): boolean;
12
+ /**
13
+ * Returns the schema to use for form generation
14
+ * This allows tools to provide a focused schema for forms
15
+ * @returns The schema to use for generating forms
16
+ */
17
+ getFormSchema(): z.ZodSchema;
18
+ /**
19
+ * Optional method to validate metadata quality and provide detailed feedback
20
+ * @param input The input data to analyze
21
+ * @returns Object indicating if form is needed and the reason
22
+ */
23
+ validateMetadataQuality?(input: unknown): {
24
+ needsForm: boolean;
25
+ reason: string;
26
+ };
27
+ /**
28
+ * Optional method to define which fields are essential for this tool
29
+ * Essential fields are always shown in forms even if marked as optional
30
+ * @returns Array of field names that are essential for user experience
31
+ */
32
+ getEssentialFields?(): string[];
33
+ /**
34
+ * Optional method to determine if a field value should be considered empty
35
+ * Allows tools to define custom empty logic for their specific data types
36
+ * @param fieldName The name of the field
37
+ * @param value The value to check
38
+ * @returns true if the field should be considered empty
39
+ */
40
+ isFieldEmpty?(fieldName: string, value: unknown): boolean;
41
+ }
42
+ /**
43
+ * Type guard to check if a tool implements FormValidatable
44
+ */
45
+ export declare function isFormValidatable(tool: unknown): tool is FormValidatable;
@@ -0,0 +1 @@
1
+ export * from './FormValidatable';
@@ -0,0 +1 @@
1
+ export * from './zod-render';
@@ -0,0 +1,50 @@
1
+ import { ZodType } from 'zod';
2
+ import { RenderConfigSchema, ExtractedRenderConfig, FieldMetadata, FormFieldType } from './types';
3
+ /**
4
+ * Type definition for field config map entries
5
+ */
6
+ interface FieldConfigMapEntry {
7
+ renderConfig: RenderConfigSchema;
8
+ metadata: FieldMetadata;
9
+ path: string[];
10
+ }
11
+ /**
12
+ * Type definition for simple field configuration
13
+ */
14
+ interface SimpleFieldConfig {
15
+ name: string;
16
+ type: FormFieldType;
17
+ label: string;
18
+ required: boolean;
19
+ placeholder?: string;
20
+ options?: Array<{
21
+ value: unknown;
22
+ label: string;
23
+ }>;
24
+ }
25
+ /**
26
+ * Extracts render configurations from a Zod schema and all nested schemas
27
+ */
28
+ export declare function extractRenderConfigs(schema: ZodType<unknown>): ExtractedRenderConfig;
29
+ /**
30
+ * Generates field ordering metadata for complex forms
31
+ */
32
+ export declare function generateFieldOrdering(schema: ZodType<unknown>): {
33
+ sections: Record<string, {
34
+ title: string;
35
+ fields: string[];
36
+ order: number;
37
+ }>;
38
+ fieldOrder: string[];
39
+ };
40
+ /**
41
+ * Creates a field configuration map for form builders
42
+ */
43
+ export declare function createFieldConfigMap(schema: ZodType<unknown>): Record<string, FieldConfigMapEntry>;
44
+ /**
45
+ * Creates a simplified configuration for basic form rendering
46
+ */
47
+ export declare function createSimpleConfig(schema: ZodType<unknown>): {
48
+ fields: Array<SimpleFieldConfig>;
49
+ };
50
+ export {};
@@ -0,0 +1,6 @@
1
+ export * from './types';
2
+ export * from './schema-extension';
3
+ export * from './config-extractor';
4
+ export { extendZodSchema, hasRenderConfig, getRenderConfig, renderConfigs } from './schema-extension';
5
+ export { extractRenderConfigs, generateFieldOrdering, createFieldConfigMap, createSimpleConfig } from './config-extractor';
6
+ export type { FormFieldType, RenderContext, RenderFunction, RenderConfigSchema, ZodSchemaWithRender, FormGenerationOptions, ValidationError, FormState, FormActions, UseFormReturn, ComponentRegistry, FieldComponentProps, SelectOption, FileUploadResult, FieldMetadata, ExtractedRenderConfig } from './types';