@hashgraphonline/standards-agent-kit 0.2.135 → 0.2.137
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/dist/cjs/builders/inscriber/inscriber-builder.d.ts +32 -1
- package/dist/cjs/interfaces/FormValidatable.d.ts +4 -13
- package/dist/cjs/standards-agent-kit.cjs +1 -1
- package/dist/cjs/standards-agent-kit.cjs.map +1 -1
- package/dist/cjs/tools/inscriber/InscribeHashinalTool.d.ts +2 -10
- package/dist/cjs/types/inscription-response.d.ts +8 -0
- package/dist/cjs/utils/inscription-utils.d.ts +21 -0
- package/dist/es/builders/inscriber/inscriber-builder.d.ts +32 -1
- package/dist/es/interfaces/FormValidatable.d.ts +4 -13
- package/dist/es/standards-agent-kit.es3.js +4 -0
- package/dist/es/standards-agent-kit.es3.js.map +1 -1
- package/dist/es/standards-agent-kit.es34.js +12 -6
- package/dist/es/standards-agent-kit.es34.js.map +1 -1
- package/dist/es/standards-agent-kit.es35.js +5 -4
- package/dist/es/standards-agent-kit.es35.js.map +1 -1
- package/dist/es/standards-agent-kit.es36.js +13 -9
- package/dist/es/standards-agent-kit.es36.js.map +1 -1
- package/dist/es/standards-agent-kit.es37.js +32 -48
- package/dist/es/standards-agent-kit.es37.js.map +1 -1
- package/dist/es/standards-agent-kit.es38.js +9 -10
- package/dist/es/standards-agent-kit.es38.js.map +1 -1
- package/dist/es/standards-agent-kit.es44.js +1 -1
- package/dist/es/standards-agent-kit.es44.js.map +1 -1
- package/dist/es/standards-agent-kit.es47.js +17 -50
- package/dist/es/standards-agent-kit.es47.js.map +1 -1
- package/dist/es/standards-agent-kit.es48.js +54 -3
- package/dist/es/standards-agent-kit.es48.js.map +1 -1
- package/dist/es/standards-agent-kit.es49.js +2 -39
- package/dist/es/standards-agent-kit.es49.js.map +1 -1
- package/dist/es/standards-agent-kit.es50.js +38 -17
- package/dist/es/standards-agent-kit.es50.js.map +1 -1
- package/dist/es/standards-agent-kit.es51.js +16 -51
- package/dist/es/standards-agent-kit.es51.js.map +1 -1
- package/dist/es/standards-agent-kit.es52.js +77 -0
- package/dist/es/standards-agent-kit.es52.js.map +1 -0
- package/dist/es/standards-agent-kit.es6.js +160 -4
- package/dist/es/standards-agent-kit.es6.js.map +1 -1
- package/dist/es/tools/inscriber/InscribeHashinalTool.d.ts +2 -10
- package/dist/es/types/inscription-response.d.ts +8 -0
- package/dist/es/utils/inscription-utils.d.ts +21 -0
- package/dist/umd/builders/inscriber/inscriber-builder.d.ts +32 -1
- package/dist/umd/interfaces/FormValidatable.d.ts +4 -13
- package/dist/umd/standards-agent-kit.umd.js +1 -1
- package/dist/umd/standards-agent-kit.umd.js.map +1 -1
- package/dist/umd/tools/inscriber/InscribeHashinalTool.d.ts +2 -10
- package/dist/umd/types/inscription-response.d.ts +8 -0
- package/dist/umd/utils/inscription-utils.d.ts +21 -0
- package/package.json +9 -4
- package/src/builders/hcs10/hcs10-builder.ts +4 -0
- package/src/builders/inscriber/inscriber-builder.ts +235 -2
- package/src/interfaces/FormValidatable.ts +9 -12
- package/src/tools/inscriber/InscribeFromBufferTool.ts +48 -19
- package/src/tools/inscriber/InscribeFromFileTool.ts +10 -13
- package/src/tools/inscriber/InscribeFromUrlTool.ts +15 -11
- package/src/tools/inscriber/InscribeHashinalTool.ts +42 -90
- package/src/tools/inscriber/RetrieveInscriptionTool.ts +15 -16
- package/src/types/inscription-response.ts +27 -0
- package/src/utils/inscription-utils.ts +53 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Hashgraph Online Standards Agent Kit
|
|
2
2
|
|
|
3
|
-
|  | A modular SDK for building on-chain autonomous agents using Hashgraph Online Standards, including HCS-10 for agent discovery and communication.<br><br>This SDK is built and maintained by [Hashgraph Online](https://hashgraphonline.com), a consortium of leading Hedera Organizations within the Hedera ecosystem.<br><br>[📚 Standards Agent Kit Documentation](https://hashgraphonline.com/docs/libraries/standards-agent-kit/)<br>[📖 HCS Standards Documentation](https://
|
|
3
|
+
|  | A modular SDK for building on-chain autonomous agents using Hashgraph Online Standards, including HCS-10 for agent discovery and communication.<br><br>This SDK is built and maintained by [Hashgraph Online](https://hashgraphonline.com), a consortium of leading Hedera Organizations within the Hedera ecosystem.<br><br>[📚 Standards Agent Kit Documentation](https://hashgraphonline.com/docs/libraries/standards-agent-kit/)<br>[📖 HCS Standards Documentation](https://hashgraphonline.com/docs/standards) |
|
|
4
4
|
| :-------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
5
5
|
|
|
6
6
|
## Quick Start
|
|
@@ -24,7 +24,7 @@ npm install @hashgraphonline/standards-agent-plugin
|
|
|
24
24
|
For complete documentation, examples, and API references, visit:
|
|
25
25
|
|
|
26
26
|
- [Standards Agent Kit Documentation](https://hashgraphonline.com/docs/libraries/standards-agent-kit/)
|
|
27
|
-
- [HCS-10 Standard Documentation](https://
|
|
27
|
+
- [HCS-10 Standard Documentation](https://hashgraphonline.com/docs/standards/hcs-10)
|
|
28
28
|
|
|
29
29
|
## Features
|
|
30
30
|
|
|
@@ -189,11 +189,10 @@ Please read our [Contributing Guide](CONTRIBUTING.md) before contributing to thi
|
|
|
189
189
|
## Resources
|
|
190
190
|
|
|
191
191
|
- [Standards Agent Kit Documentation](https://hashgraphonline.com/docs/libraries/standards-agent-kit/)
|
|
192
|
-
- [HCS Standards Documentation](https://
|
|
192
|
+
- [HCS Standards Documentation](https://hashgraphonline.com/docs/standards)
|
|
193
193
|
- [Hedera Documentation](https://docs.hedera.com)
|
|
194
194
|
- [GitHub Repository](https://github.com/hashgraph-online/standards-agent-kit)
|
|
195
195
|
|
|
196
196
|
## License
|
|
197
197
|
|
|
198
198
|
Apache-2.0
|
|
199
|
-
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseServiceBuilder, HederaAgentKit } from 'hedera-agent-kit';
|
|
1
|
+
import { BaseServiceBuilder, HederaAgentKit, AgentOperationalMode } from 'hedera-agent-kit';
|
|
2
2
|
import { InscriptionInput, InscriptionOptions, InscriptionResponse, RetrievedInscriptionResult } from '@hashgraphonline/standards-sdk';
|
|
3
3
|
import { InscriptionSDK } from '@kiloscribe/inscription-sdk';
|
|
4
4
|
/**
|
|
@@ -15,7 +15,37 @@ interface DAppSigner {
|
|
|
15
15
|
*/
|
|
16
16
|
export declare class InscriberBuilder extends BaseServiceBuilder {
|
|
17
17
|
protected inscriptionSDK?: InscriptionSDK;
|
|
18
|
+
private static signerProvider?;
|
|
19
|
+
private static walletInfoResolver?;
|
|
20
|
+
private static startInscriptionDelegate?;
|
|
21
|
+
private static walletExecutor?;
|
|
22
|
+
/** When true, do not allow server fallback; require a wallet path in Provide Bytes */
|
|
23
|
+
private static preferWalletOnly;
|
|
18
24
|
constructor(hederaKit: HederaAgentKit);
|
|
25
|
+
getOperationalMode(): AgentOperationalMode;
|
|
26
|
+
static setSignerProvider(provider: () => Promise<DAppSigner | null> | DAppSigner | null): void;
|
|
27
|
+
static setWalletInfoResolver(resolver: () => Promise<{
|
|
28
|
+
accountId: string;
|
|
29
|
+
network: 'mainnet' | 'testnet';
|
|
30
|
+
} | null> | {
|
|
31
|
+
accountId: string;
|
|
32
|
+
network: 'mainnet' | 'testnet';
|
|
33
|
+
} | null): void;
|
|
34
|
+
static setStartInscriptionDelegate(delegate: (request: Record<string, unknown>, network: 'mainnet' | 'testnet') => Promise<{
|
|
35
|
+
transactionBytes: string;
|
|
36
|
+
tx_id?: string;
|
|
37
|
+
topic_id?: string;
|
|
38
|
+
status?: string;
|
|
39
|
+
completed?: boolean;
|
|
40
|
+
}>): void;
|
|
41
|
+
static setWalletExecutor(executor: (base64: string, network: 'mainnet' | 'testnet') => Promise<{
|
|
42
|
+
transactionId: string;
|
|
43
|
+
}>): void;
|
|
44
|
+
/**
|
|
45
|
+
* Control fallback behavior. When true, wallet must be available for execution paths.
|
|
46
|
+
*/
|
|
47
|
+
static setPreferWalletOnly(flag: boolean): void;
|
|
48
|
+
getSigner(): Promise<DAppSigner | null>;
|
|
19
49
|
/**
|
|
20
50
|
* Get or create Inscription SDK - temporarily returns null since we don't have the actual SDK
|
|
21
51
|
*/
|
|
@@ -28,6 +58,7 @@ export declare class InscriberBuilder extends BaseServiceBuilder {
|
|
|
28
58
|
* Inscribe content using a DApp signer
|
|
29
59
|
*/
|
|
30
60
|
inscribeWithSigner(input: InscriptionInput, signer: DAppSigner, options: InscriptionOptions): Promise<InscriptionResponse>;
|
|
61
|
+
inscribeAuto(input: InscriptionInput, options: InscriptionOptions): Promise<InscriptionResponse>;
|
|
31
62
|
/**
|
|
32
63
|
* Retrieve an existing inscription
|
|
33
64
|
*/
|
|
@@ -16,28 +16,19 @@ export interface FormValidatable {
|
|
|
16
16
|
*/
|
|
17
17
|
getFormSchema(): z.ZodSchema;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
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
|
|
19
|
+
* Defines which fields are essential for this tool
|
|
29
20
|
* Essential fields are always shown in forms even if marked as optional
|
|
30
21
|
* @returns Array of field names that are essential for user experience
|
|
31
22
|
*/
|
|
32
|
-
getEssentialFields
|
|
23
|
+
getEssentialFields(): string[];
|
|
33
24
|
/**
|
|
34
|
-
*
|
|
25
|
+
* Determines if a field value should be considered empty
|
|
35
26
|
* Allows tools to define custom empty logic for their specific data types
|
|
36
27
|
* @param fieldName The name of the field
|
|
37
28
|
* @param value The value to check
|
|
38
29
|
* @returns true if the field should be considered empty
|
|
39
30
|
*/
|
|
40
|
-
isFieldEmpty
|
|
31
|
+
isFieldEmpty(fieldName: string, value: unknown): boolean;
|
|
41
32
|
}
|
|
42
33
|
/**
|
|
43
34
|
* Type guard to check if a tool implements FormValidatable
|