tenzro-sdk 0.1.0
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/LICENSE +201 -0
- package/README.md +107 -0
- package/dist/agent-payments.d.ts +47 -0
- package/dist/agent-payments.d.ts.map +1 -0
- package/dist/agent-payments.js +76 -0
- package/dist/agent-payments.js.map +1 -0
- package/dist/agent.d.ts +177 -0
- package/dist/agent.d.ts.map +1 -0
- package/dist/agent.js +300 -0
- package/dist/agent.js.map +1 -0
- package/dist/ap2.d.ts +54 -0
- package/dist/ap2.d.ts.map +1 -0
- package/dist/ap2.js +88 -0
- package/dist/ap2.js.map +1 -0
- package/dist/app.d.ts +186 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +317 -0
- package/dist/app.js.map +1 -0
- package/dist/bridge.d.ts +64 -0
- package/dist/bridge.d.ts.map +1 -0
- package/dist/bridge.js +93 -0
- package/dist/bridge.js.map +1 -0
- package/dist/canton.d.ts +36 -0
- package/dist/canton.d.ts.map +1 -0
- package/dist/canton.js +46 -0
- package/dist/canton.js.map +1 -0
- package/dist/circuit-breaker.d.ts +35 -0
- package/dist/circuit-breaker.d.ts.map +1 -0
- package/dist/circuit-breaker.js +53 -0
- package/dist/circuit-breaker.js.map +1 -0
- package/dist/client.d.ts +134 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +265 -0
- package/dist/client.js.map +1 -0
- package/dist/compliance.d.ts +83 -0
- package/dist/compliance.d.ts.map +1 -0
- package/dist/compliance.js +74 -0
- package/dist/compliance.js.map +1 -0
- package/dist/config.d.ts +10 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +24 -0
- package/dist/config.js.map +1 -0
- package/dist/contract.d.ts +68 -0
- package/dist/contract.d.ts.map +1 -0
- package/dist/contract.js +59 -0
- package/dist/contract.js.map +1 -0
- package/dist/crypto.d.ts +112 -0
- package/dist/crypto.d.ts.map +1 -0
- package/dist/crypto.js +97 -0
- package/dist/crypto.js.map +1 -0
- package/dist/custody.d.ts +114 -0
- package/dist/custody.d.ts.map +1 -0
- package/dist/custody.js +96 -0
- package/dist/custody.js.map +1 -0
- package/dist/debridge.d.ts +129 -0
- package/dist/debridge.d.ts.map +1 -0
- package/dist/debridge.js +93 -0
- package/dist/debridge.js.map +1 -0
- package/dist/erc7802.d.ts +36 -0
- package/dist/erc7802.d.ts.map +1 -0
- package/dist/erc7802.js +52 -0
- package/dist/erc7802.js.map +1 -0
- package/dist/events.d.ts +112 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +70 -0
- package/dist/events.js.map +1 -0
- package/dist/governance.d.ts +55 -0
- package/dist/governance.d.ts.map +1 -0
- package/dist/governance.js +77 -0
- package/dist/governance.js.map +1 -0
- package/dist/identity.d.ts +102 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +147 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +67 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +85 -0
- package/dist/index.js.map +1 -0
- package/dist/inference.d.ts +27 -0
- package/dist/inference.d.ts.map +1 -0
- package/dist/inference.js +43 -0
- package/dist/inference.js.map +1 -0
- package/dist/marketplace.d.ts +44 -0
- package/dist/marketplace.d.ts.map +1 -0
- package/dist/marketplace.js +74 -0
- package/dist/marketplace.js.map +1 -0
- package/dist/nanopayment.d.ts +53 -0
- package/dist/nanopayment.d.ts.map +1 -0
- package/dist/nanopayment.js +81 -0
- package/dist/nanopayment.js.map +1 -0
- package/dist/nft.d.ts +127 -0
- package/dist/nft.d.ts.map +1 -0
- package/dist/nft.js +99 -0
- package/dist/nft.js.map +1 -0
- package/dist/payment.d.ts +71 -0
- package/dist/payment.d.ts.map +1 -0
- package/dist/payment.js +105 -0
- package/dist/payment.js.map +1 -0
- package/dist/provider.d.ts +351 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +368 -0
- package/dist/provider.js.map +1 -0
- package/dist/rpc.d.ts +35 -0
- package/dist/rpc.d.ts.map +1 -0
- package/dist/rpc.js +127 -0
- package/dist/rpc.js.map +1 -0
- package/dist/settlement.d.ts +52 -0
- package/dist/settlement.d.ts.map +1 -0
- package/dist/settlement.js +86 -0
- package/dist/settlement.js.map +1 -0
- package/dist/skill.d.ts +55 -0
- package/dist/skill.d.ts.map +1 -0
- package/dist/skill.js +79 -0
- package/dist/skill.js.map +1 -0
- package/dist/staking.d.ts +42 -0
- package/dist/staking.d.ts.map +1 -0
- package/dist/staking.js +62 -0
- package/dist/staking.js.map +1 -0
- package/dist/streaming.d.ts +83 -0
- package/dist/streaming.d.ts.map +1 -0
- package/dist/streaming.js +193 -0
- package/dist/streaming.js.map +1 -0
- package/dist/task.d.ts +46 -0
- package/dist/task.d.ts.map +1 -0
- package/dist/task.js +76 -0
- package/dist/task.js.map +1 -0
- package/dist/tee.d.ts +88 -0
- package/dist/tee.d.ts.map +1 -0
- package/dist/tee.js +62 -0
- package/dist/tee.js.map +1 -0
- package/dist/token.d.ts +165 -0
- package/dist/token.d.ts.map +1 -0
- package/dist/token.js +80 -0
- package/dist/token.js.map +1 -0
- package/dist/tool.d.ts +55 -0
- package/dist/tool.d.ts.map +1 -0
- package/dist/tool.js +79 -0
- package/dist/tool.js.map +1 -0
- package/dist/types.d.ts +1318 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +117 -0
- package/dist/types.js.map +1 -0
- package/dist/wallet.d.ts +44 -0
- package/dist/wallet.d.ts.map +1 -0
- package/dist/wallet.js +75 -0
- package/dist/wallet.js.map +1 -0
- package/dist/zk.d.ts +66 -0
- package/dist/zk.d.ts.map +1 -0
- package/dist/zk.js +58 -0
- package/dist/zk.js.map +1 -0
- package/package.json +41 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { RpcClient } from "./rpc";
|
|
2
|
+
import { IdentityInfo, IdentityType, DidDocument, JoinAsMicroNodeResponse, UsernameResult } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Client for Tenzro Decentralized Identity Protocol (TDIP) operations.
|
|
5
|
+
* Supports both human and machine identities with W3C DID documents.
|
|
6
|
+
*/
|
|
7
|
+
export declare class IdentityClient {
|
|
8
|
+
private rpc;
|
|
9
|
+
constructor(rpc: RpcClient);
|
|
10
|
+
/**
|
|
11
|
+
* Register a new human identity.
|
|
12
|
+
* @param displayName - Human-readable display name
|
|
13
|
+
* @param publicKey - Optional public key (hex-encoded)
|
|
14
|
+
* @param keyType - Optional key type ("ed25519" or "secp256k1")
|
|
15
|
+
* @returns Identity information with DID and private key
|
|
16
|
+
*/
|
|
17
|
+
registerHuman(displayName: string, publicKey?: string, keyType?: "ed25519" | "secp256k1"): Promise<IdentityInfo & {
|
|
18
|
+
private_key?: string;
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* Register a new machine identity.
|
|
22
|
+
* @param controllerDid - DID of the controlling identity (optional for autonomous machines)
|
|
23
|
+
* @param capabilities - List of machine capabilities
|
|
24
|
+
* @param publicKey - Optional public key (hex-encoded)
|
|
25
|
+
* @param keyType - Optional key type ("ed25519" or "secp256k1")
|
|
26
|
+
* @returns Identity information with DID and private key
|
|
27
|
+
*/
|
|
28
|
+
registerMachine(controllerDid?: string, capabilities?: string[], publicKey?: string, keyType?: "ed25519" | "secp256k1"): Promise<IdentityInfo & {
|
|
29
|
+
private_key?: string;
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* Resolve a DID to get identity information.
|
|
33
|
+
* @param did - The DID to resolve (e.g., "did:tenzro:human:..." or "did:pdis:...")
|
|
34
|
+
* @returns Identity information
|
|
35
|
+
*/
|
|
36
|
+
resolve(did: string): Promise<IdentityInfo>;
|
|
37
|
+
/**
|
|
38
|
+
* Resolve a DID to get the full W3C DID Document.
|
|
39
|
+
* @param did - The DID to resolve
|
|
40
|
+
* @returns W3C DID Document
|
|
41
|
+
*/
|
|
42
|
+
resolveDidDocument(did: string): Promise<DidDocument>;
|
|
43
|
+
/**
|
|
44
|
+
* List all identities (optionally filtered by type).
|
|
45
|
+
* @param identityType - Optional filter: "Human" or "Machine"
|
|
46
|
+
* @returns Array of identity information
|
|
47
|
+
*/
|
|
48
|
+
listIdentities(identityType?: IdentityType): Promise<IdentityInfo[]>;
|
|
49
|
+
/**
|
|
50
|
+
* Add a verifiable credential to an identity.
|
|
51
|
+
* @param did - The identity DID
|
|
52
|
+
* @param credentialType - Type of credential (e.g., "KYC", "Attestation")
|
|
53
|
+
* @param issuerDid - DID of the issuing authority
|
|
54
|
+
* @returns Credential ID
|
|
55
|
+
*/
|
|
56
|
+
addCredential(did: string, credentialType: string, issuerDid: string): Promise<string>;
|
|
57
|
+
/**
|
|
58
|
+
* Add a service endpoint to an identity.
|
|
59
|
+
* @param did - The identity DID
|
|
60
|
+
* @param serviceType - Type of service (e.g., "MessagingService", "A2AEndpoint")
|
|
61
|
+
* @param endpoint - Service endpoint URL
|
|
62
|
+
*/
|
|
63
|
+
addService(did: string, serviceType: string, endpoint: string): Promise<void>;
|
|
64
|
+
/**
|
|
65
|
+
* Register a new machine identity with a name and controller.
|
|
66
|
+
* Convenience wrapper around `registerMachine` with a display name.
|
|
67
|
+
* @param name - Human-readable name for the machine identity
|
|
68
|
+
* @param controller - DID of the controlling identity
|
|
69
|
+
* @returns Identity information with DID and private key
|
|
70
|
+
*/
|
|
71
|
+
registerMachineIdentity(name: string, controller: string): Promise<IdentityInfo & {
|
|
72
|
+
private_key?: string;
|
|
73
|
+
}>;
|
|
74
|
+
/**
|
|
75
|
+
* Set a human-readable username for a DID.
|
|
76
|
+
* Usernames are unique across the network and provide an easy way to
|
|
77
|
+
* discover identities without memorizing DIDs.
|
|
78
|
+
* @param did - The DID to associate the username with
|
|
79
|
+
* @param username - The desired username
|
|
80
|
+
* @returns The username and associated DID
|
|
81
|
+
*/
|
|
82
|
+
setUsername(did: string, username: string): Promise<UsernameResult>;
|
|
83
|
+
/**
|
|
84
|
+
* Resolve a username to its associated DID.
|
|
85
|
+
* @param username - The username to look up
|
|
86
|
+
* @returns The username and associated DID
|
|
87
|
+
*/
|
|
88
|
+
resolveUsername(username: string): Promise<UsernameResult>;
|
|
89
|
+
/**
|
|
90
|
+
* Join the Tenzro Network as a MicroNode participant.
|
|
91
|
+
* Zero-install — no P2P binary required.
|
|
92
|
+
* Auto-provisions a TDIP DID and MPC wallet.
|
|
93
|
+
* @param params - Optional display name, origin hint, and participant type
|
|
94
|
+
* @returns Full MicroNode identity, wallet, capabilities, and network endpoints
|
|
95
|
+
*/
|
|
96
|
+
joinAsMicroNode(params?: {
|
|
97
|
+
display_name?: string;
|
|
98
|
+
origin?: string;
|
|
99
|
+
participant_type?: string;
|
|
100
|
+
}): Promise<JoinAsMicroNodeResponse>;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=identity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE3G;;;GAGG;AACH,qBAAa,cAAc;IACb,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,SAAS;IAElC;;;;;;OAMG;IACG,aAAa,CACjB,WAAW,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAChC,OAAO,CAAC,YAAY,GAAG;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAWnD;;;;;;;OAOG;IACG,eAAe,CACnB,aAAa,CAAC,EAAE,MAAM,EACtB,YAAY,GAAE,MAAM,EAAO,EAC3B,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAChC,OAAO,CAAC,YAAY,GAAG;QAAE,WAAW,CAAC,EAAE,MA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dentityClient = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Client for Tenzro Decentralized Identity Protocol (TDIP) operations.
|
|
6
|
+
* Supports both human and machine identities with W3C DID documents.
|
|
7
|
+
*/
|
|
8
|
+
class IdentityClient {
|
|
9
|
+
rpc;
|
|
10
|
+
constructor(rpc) {
|
|
11
|
+
this.rpc = rpc;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Register a new human identity.
|
|
15
|
+
* @param displayName - Human-readable display name
|
|
16
|
+
* @param publicKey - Optional public key (hex-encoded)
|
|
17
|
+
* @param keyType - Optional key type ("ed25519" or "secp256k1")
|
|
18
|
+
* @returns Identity information with DID and private key
|
|
19
|
+
*/
|
|
20
|
+
async registerHuman(displayName, publicKey, keyType) {
|
|
21
|
+
return this.rpc.call("tenzro_registerIdentity", [
|
|
22
|
+
{
|
|
23
|
+
display_name: displayName,
|
|
24
|
+
identity_type: "human",
|
|
25
|
+
public_key: publicKey,
|
|
26
|
+
key_type: keyType,
|
|
27
|
+
},
|
|
28
|
+
]);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Register a new machine identity.
|
|
32
|
+
* @param controllerDid - DID of the controlling identity (optional for autonomous machines)
|
|
33
|
+
* @param capabilities - List of machine capabilities
|
|
34
|
+
* @param publicKey - Optional public key (hex-encoded)
|
|
35
|
+
* @param keyType - Optional key type ("ed25519" or "secp256k1")
|
|
36
|
+
* @returns Identity information with DID and private key
|
|
37
|
+
*/
|
|
38
|
+
async registerMachine(controllerDid, capabilities = [], publicKey, keyType) {
|
|
39
|
+
return this.rpc.call("tenzro_registerIdentity", [
|
|
40
|
+
{
|
|
41
|
+
identity_type: "machine",
|
|
42
|
+
controller_did: controllerDid,
|
|
43
|
+
capabilities,
|
|
44
|
+
public_key: publicKey,
|
|
45
|
+
key_type: keyType,
|
|
46
|
+
},
|
|
47
|
+
]);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Resolve a DID to get identity information.
|
|
51
|
+
* @param did - The DID to resolve (e.g., "did:tenzro:human:..." or "did:pdis:...")
|
|
52
|
+
* @returns Identity information
|
|
53
|
+
*/
|
|
54
|
+
async resolve(did) {
|
|
55
|
+
return this.rpc.call("tenzro_resolveIdentity", [{ did }]);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Resolve a DID to get the full W3C DID Document.
|
|
59
|
+
* @param did - The DID to resolve
|
|
60
|
+
* @returns W3C DID Document
|
|
61
|
+
*/
|
|
62
|
+
async resolveDidDocument(did) {
|
|
63
|
+
return this.rpc.call("tenzro_resolveDidDocument", [{ did }]);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* List all identities (optionally filtered by type).
|
|
67
|
+
* @param identityType - Optional filter: "Human" or "Machine"
|
|
68
|
+
* @returns Array of identity information
|
|
69
|
+
*/
|
|
70
|
+
async listIdentities(identityType) {
|
|
71
|
+
return this.rpc.call("tenzro_listIdentities", [
|
|
72
|
+
{ identity_type: identityType },
|
|
73
|
+
]);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Add a verifiable credential to an identity.
|
|
77
|
+
* @param did - The identity DID
|
|
78
|
+
* @param credentialType - Type of credential (e.g., "KYC", "Attestation")
|
|
79
|
+
* @param issuerDid - DID of the issuing authority
|
|
80
|
+
* @returns Credential ID
|
|
81
|
+
*/
|
|
82
|
+
async addCredential(did, credentialType, issuerDid) {
|
|
83
|
+
return this.rpc.call("tenzro_addCredential", [
|
|
84
|
+
{ did, credential_type: credentialType, issuer: issuerDid },
|
|
85
|
+
]);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Add a service endpoint to an identity.
|
|
89
|
+
* @param did - The identity DID
|
|
90
|
+
* @param serviceType - Type of service (e.g., "MessagingService", "A2AEndpoint")
|
|
91
|
+
* @param endpoint - Service endpoint URL
|
|
92
|
+
*/
|
|
93
|
+
async addService(did, serviceType, endpoint) {
|
|
94
|
+
await this.rpc.call("tenzro_addService", [
|
|
95
|
+
{ did, service_type: serviceType, service_endpoint: endpoint },
|
|
96
|
+
]);
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Register a new machine identity with a name and controller.
|
|
100
|
+
* Convenience wrapper around `registerMachine` with a display name.
|
|
101
|
+
* @param name - Human-readable name for the machine identity
|
|
102
|
+
* @param controller - DID of the controlling identity
|
|
103
|
+
* @returns Identity information with DID and private key
|
|
104
|
+
*/
|
|
105
|
+
async registerMachineIdentity(name, controller) {
|
|
106
|
+
return this.rpc.call("tenzro_registerMachineIdentity", [
|
|
107
|
+
{ name, controller },
|
|
108
|
+
]);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Set a human-readable username for a DID.
|
|
112
|
+
* Usernames are unique across the network and provide an easy way to
|
|
113
|
+
* discover identities without memorizing DIDs.
|
|
114
|
+
* @param did - The DID to associate the username with
|
|
115
|
+
* @param username - The desired username
|
|
116
|
+
* @returns The username and associated DID
|
|
117
|
+
*/
|
|
118
|
+
async setUsername(did, username) {
|
|
119
|
+
return this.rpc.call("tenzro_setUsername", [
|
|
120
|
+
{ did, username },
|
|
121
|
+
]);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Resolve a username to its associated DID.
|
|
125
|
+
* @param username - The username to look up
|
|
126
|
+
* @returns The username and associated DID
|
|
127
|
+
*/
|
|
128
|
+
async resolveUsername(username) {
|
|
129
|
+
return this.rpc.call("tenzro_resolveUsername", [
|
|
130
|
+
{ username },
|
|
131
|
+
]);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Join the Tenzro Network as a MicroNode participant.
|
|
135
|
+
* Zero-install — no P2P binary required.
|
|
136
|
+
* Auto-provisions a TDIP DID and MPC wallet.
|
|
137
|
+
* @param params - Optional display name, origin hint, and participant type
|
|
138
|
+
* @returns Full MicroNode identity, wallet, capabilities, and network endpoints
|
|
139
|
+
*/
|
|
140
|
+
async joinAsMicroNode(params) {
|
|
141
|
+
return this.rpc.call("tenzro_joinAsMicroNode", [
|
|
142
|
+
params ?? {},
|
|
143
|
+
]);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
exports.IdentityClient = IdentityClient;
|
|
147
|
+
//# sourceMappingURL=identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../src/identity.ts"],"names":[],"mappings":";;;AAGA;;;GAGG;AACH,MAAa,cAAc;IACL;IAApB,YAAoB,GAAc;QAAd,QAAG,GAAH,GAAG,CAAW;IAAG,CAAC;IAEtC;;;;;;OAMG;IACH,KAAK,CAAC,aAAa,CACjB,WAAmB,EACnB,SAAkB,EAClB,OAAiC;QAEjC,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,yBAAyB,EAAE;YAC9C;gBACE,YAAY,EAAE,WAAW;gBACzB,aAAa,EAAE,OAAO;gBACtB,UAAU,EAAE,SAAS;gBACrB,QAAQ,EAAE,OAAO;aAClB;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,eAAe,CACnB,aAAsB,EACtB,eAAyB,EAAE,EAC3B,SAAkB,EAClB,OAAiC;QAEjC,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,yBAAyB,EAAE;YAC9C;gBACE,aAAa,EAAE,SAAS;gBACxB,cAAc,EAAE,aAAa;gBAC7B,YAAY;gBACZ,UAAU,EAAE,SAAS;gBACrB,QAAQ,EAAE,OAAO;aAClB;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,OAAO,CAAC,GAAW;QACvB,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAe,wBAAwB,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,kBAAkB,CAAC,GAAW;QAClC,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAc,2BAA2B,EA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AE;YAC7D,EAAE,QAAQ,EAAE;SACb,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,eAAe,CAAC,MAIrB;QACC,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAA0B,wBAAwB,EAAE;YACtE,MAAM,IAAI,EAAE;SACb,CAAC,CAAC;IACL,CAAC;CACF;AAzKD,wCAyKC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export { TenzroClient } from "./client";
|
|
2
|
+
export { AppClient } from "./app";
|
|
3
|
+
export { WalletClient } from "./wallet";
|
|
4
|
+
export { InferenceClient } from "./inference";
|
|
5
|
+
export { SettlementClient } from "./settlement";
|
|
6
|
+
export { AgentClient } from "./agent";
|
|
7
|
+
export { GovernanceClient } from "./governance";
|
|
8
|
+
export { IdentityClient } from "./identity";
|
|
9
|
+
export { PaymentClient } from "./payment";
|
|
10
|
+
export { ProviderClient } from "./provider";
|
|
11
|
+
export { TaskClient } from "./task";
|
|
12
|
+
export { MarketplaceClient } from "./marketplace";
|
|
13
|
+
export { SkillClient } from "./skill";
|
|
14
|
+
export { ToolClient } from "./tool";
|
|
15
|
+
export { CantonClient } from "./canton";
|
|
16
|
+
export { StakingClient } from "./staking";
|
|
17
|
+
export { TokenClient } from "./token";
|
|
18
|
+
export { ContractClient } from "./contract";
|
|
19
|
+
export { CryptoClient } from "./crypto";
|
|
20
|
+
export { CustodyClient } from "./custody";
|
|
21
|
+
export { TeeClient } from "./tee";
|
|
22
|
+
export { ZkClient } from "./zk";
|
|
23
|
+
export { StreamingClient } from "./streaming";
|
|
24
|
+
export { Ap2Client } from "./ap2";
|
|
25
|
+
export { BridgeClient } from "./bridge";
|
|
26
|
+
export { AgentPaymentClient } from "./agent-payments";
|
|
27
|
+
export { CircuitBreakerClient } from "./circuit-breaker";
|
|
28
|
+
export { NanopaymentClient } from "./nanopayment";
|
|
29
|
+
export { Erc7802Client } from "./erc7802";
|
|
30
|
+
export { NftClient } from "./nft";
|
|
31
|
+
export { ComplianceClient } from "./compliance";
|
|
32
|
+
export { EventsClient } from "./events";
|
|
33
|
+
export { DebridgeClient } from "./debridge";
|
|
34
|
+
export { TenzroConfig, MAINNET_CONFIG, TESTNET_CONFIG, LOCAL_CONFIG, } from "./config";
|
|
35
|
+
export { RpcClient, RpcCallError } from "./rpc";
|
|
36
|
+
export type { MicroNodeCapabilities, MicroNodeNetworkEndpoints, JoinAsMicroNodeResponse, } from "./types";
|
|
37
|
+
export type { Hash, Address, Signature, BlockHeight, Nonce, Timestamp, ChainId, AccountInfo, WalletInfo, WalletType, ModelInfo, ModelModality, ModelParameters, ModelStatus, InferenceRequest, InferenceResponse, InferenceResult, InferenceParameters, InferenceMetadata, InferenceProvider, ProviderCapacity, ProviderStatus, PricingConfig, PricingModel, SettlementParams, SettlementRequest, SettlementReceipt, SettlementStatus, ServiceType, PaymentIntent, ServiceProof, AgentIdentity, AgentConfig, AgentMessage, AgentMessageType, Capability, RegisterAgentResponse, AgentMessageResponse, DelegateTaskResponse, SpawnAgentResponse, RunAgentTaskResponse, CreateSwarmResponse, SwarmMemberInfo, SwarmStatus, TerminateSwarmResponse, GovernanceProposal, GovernanceVote, VoteType, ProposalType, ProposalStatus, VoteReceipt, VotingPower, BridgeMessage, BridgeTransfer, BridgeProtocol, Block, BlockHeader, Transaction, TransactionType, Account, AccountState, NetworkInfo, NodeInfo, NodeStatus, PeerInfo, FaucetResponse, HealthResponse, VerificationResponse, IdentityInfo, IdentityType, DidDocument, VerificationMethod, DidService, PaymentChallenge, PaymentReceipt, PaymentSessionInfo, GatewayInfo, ModelLoadInfo, ModelEndpoint, UsernameResult, } from "./types";
|
|
38
|
+
export type { ParticipateResponse, ProviderStats, ChatMessage, ChatResponse, DownloadProgress, HardwareProfile, } from "./provider";
|
|
39
|
+
export type { TaskInfo, TaskStatus, TaskType, TaskPriority, TaskQuote, TaskFilter, PostTaskParams, } from "./types";
|
|
40
|
+
export type { AgentTemplate, AgentTemplateStatus, AgentTemplateType, AgentPricingModel, AgentCapabilityDef, AgentRuntimeRequirements, AgentExample, AgentTemplateFilter, RegisterAgentTemplateParams, UpdateAgentTemplateParams, AgentTemplateStats, } from "./types";
|
|
41
|
+
export type { SpawnAgentTemplateResponse, RunAgentTemplateReport, } from "./types";
|
|
42
|
+
export type { SkillInfo, SkillFilter, RegisterSkillParams, UpdateSkillParams, SkillExecutionResult, SkillUsage, } from "./types";
|
|
43
|
+
export type { ToolInfo, ToolFilter, RegisterToolParams, UpdateToolParams, ToolExecutionResult, ToolUsage, } from "./types";
|
|
44
|
+
export type { CantonDomain, DamlContract, ListDamlContractsParams, DamlCommandParams, DamlCommandResult, DamlEvent, } from "./types";
|
|
45
|
+
export type { StakingRole, StakeResult, UnstakeResult, StakingBalance, StakingRewards, UnbondingEntry, } from "./types";
|
|
46
|
+
export type { Ap2Session, Ap2Authorization, CancelResult, } from "./types";
|
|
47
|
+
export type { BridgeRoute, BridgeAdapter, BridgeFee, TransferStatus, } from "./types";
|
|
48
|
+
export type { SpendingPolicy, PolicyResult, AgentPaymentReceipt, DailySpend, AgentTransaction, } from "./types";
|
|
49
|
+
export type { ProviderHealth, CircuitBreakerStatus, CircuitBreakerConfig, ConfigResult, ResetResult, } from "./types";
|
|
50
|
+
export type { ChannelInfo, NanopaymentReceipt, BatchSettlement, CloseResult, } from "./types";
|
|
51
|
+
export type { MintResult, BurnResult, CrossChainSupply, } from "./types";
|
|
52
|
+
export type { GasPolicy, } from "./types";
|
|
53
|
+
export type { AssignTaskResult, CompleteTaskResult, } from "./types";
|
|
54
|
+
export type { CollectionInfo, NftMintResult, NftInfo, NftTransferResult, NftPointerResult, } from "./nft";
|
|
55
|
+
export type { ComplianceRules, ComplianceResult, FreezeResult, } from "./compliance";
|
|
56
|
+
export type { BlockchainEvent, GetEventsParams, Subscription, WebhookRegistration, UnsubscribeResult, WebhookRemoveResult, } from "./events";
|
|
57
|
+
export type { DebridgeChain, DebridgeToken, DebridgeOrder, DebridgeSwapResult, DebridgeInstructions, } from "./debridge";
|
|
58
|
+
export type { CreateTokenParams, GetTokenInfoParams, ListTokensParams, CrossVmTransferParams, TokenInfo, TokenListResult, TokenBalance, WrapResult, TransferResult, } from "./token";
|
|
59
|
+
export { WTNZO_EVM_ADDRESS } from "./token";
|
|
60
|
+
export type { DeployContractParams, DeployResult, CallResult, } from "./contract";
|
|
61
|
+
export type { MasterWallet, UserWallet, FundResult as AppFundResult, SpendingPolicy as AppSpendingPolicy, SessionKey as AppSessionKey, UsageStats, InferenceResult as AppInferenceResult, AgentResult as AppAgentResult, BridgeResult as AppBridgeResult, TaskResult as AppTaskResult, TxResult as AppTxResult, } from "./app";
|
|
62
|
+
export type { SignatureResult, VerifyResult, EncryptResult, DecryptResult, DerivedKey, KeyPair, SharedSecret, } from "./crypto";
|
|
63
|
+
export type { TeeInfo, AttestationResult, TeeVerifyResult, SealedData, UnsealedData, TeeProvider, } from "./tee";
|
|
64
|
+
export type { ZkProof, ZkVerifyResult, ProvingKey, CircuitInfo, } from "./zk";
|
|
65
|
+
export type { MpcWallet, EncryptedKeystore, KeyShare, RotationResult, SpendingPolicy as CustodySpendingPolicy, SessionKey as CustodySessionKey, } from "./custody";
|
|
66
|
+
export type { StreamResult, SubscriptionHandle as StreamSubscriptionHandle, SseConnection, StreamEvent, } from "./streaming";
|
|
67
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,WA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,WAAW,IAAI,cAAc,EAC7B,YAAY,IAAI,eAAe,EAC/B,UAAU,IAAI,aAAa,EAC3B,QAAQ,IAAI,WAAW,GACxB,MAAM,OAAO,CAAC;AAGf,YAAY,EACV,eAAe,EACf,YAAY,EACZ,aAAa,EACb,aAAa,EACb,UAAU,EACV,OAAO,EACP,YAAY,GACb,MAAM,UAAU,CAAC;AAGlB,YAAY,EACV,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,WAAW,GACZ,MAAM,OAAO,CAAC;AAGf,YAAY,EACV,OAAO,EACP,cAAc,EACd,UAAU,EACV,WAAW,GACZ,MAAM,MAAM,CAAC;AAGd,YAAY,EACV,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,cAAc,IAAI,qBAAqB,EACvC,UAAU,IAAI,iBAAiB,GAChC,MAAM,WAAW,CAAC;AAGnB,YAAY,EACV,YAAY,EACZ,kBAAkB,IAAI,wBAAwB,EAC9C,aAAa,EACb,WAAW,GACZ,MAAM,aAAa,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WTNZO_EVM_ADDRESS = exports.RpcCallError = exports.RpcClient = exports.LOCAL_CONFIG = exports.TESTNET_CONFIG = exports.MAINNET_CONFIG = exports.DebridgeClient = exports.EventsClient = exports.ComplianceClient = exports.NftClient = exports.Erc7802Client = exports.NanopaymentClient = exports.CircuitBreakerClient = exports.AgentPaymentClient = exports.BridgeClient = exports.Ap2Client = exports.StreamingClient = exports.ZkClient = exports.TeeClient = exports.CustodyClient = exports.CryptoClient = exports.ContractClient = exports.TokenClient = exports.StakingClient = exports.CantonClient = exports.ToolClient = exports.SkillClient = exports.MarketplaceClient = exports.TaskClient = exports.ProviderClient = exports.PaymentClient = exports.IdentityClient = exports.GovernanceClient = exports.AgentClient = exports.SettlementClient = exports.InferenceClient = exports.WalletClient = exports.AppClient = exports.TenzroClient = void 0;
|
|
4
|
+
// Main client
|
|
5
|
+
var client_1 = require("./client");
|
|
6
|
+
Object.defineProperty(exports, "TenzroClient", { enumerable: true, get: function () { return client_1.TenzroClient; } });
|
|
7
|
+
// App client (developer-funded app pattern / paymaster)
|
|
8
|
+
var app_1 = require("./app");
|
|
9
|
+
Object.defineProperty(exports, "AppClient", { enumerable: true, get: function () { return app_1.AppClient; } });
|
|
10
|
+
// Sub-clients
|
|
11
|
+
var wallet_1 = require("./wallet");
|
|
12
|
+
Object.defineProperty(exports, "WalletClient", { enumerable: true, get: function () { return wallet_1.WalletClient; } });
|
|
13
|
+
var inference_1 = require("./inference");
|
|
14
|
+
Object.defineProperty(exports, "InferenceClient", { enumerable: true, get: function () { return inference_1.InferenceClient; } });
|
|
15
|
+
var settlement_1 = require("./settlement");
|
|
16
|
+
Object.defineProperty(exports, "SettlementClient", { enumerable: true, get: function () { return settlement_1.SettlementClient; } });
|
|
17
|
+
var agent_1 = require("./agent");
|
|
18
|
+
Object.defineProperty(exports, "AgentClient", { enumerable: true, get: function () { return agent_1.AgentClient; } });
|
|
19
|
+
var governance_1 = require("./governance");
|
|
20
|
+
Object.defineProperty(exports, "GovernanceClient", { enumerable: true, get: function () { return governance_1.GovernanceClient; } });
|
|
21
|
+
var identity_1 = require("./identity");
|
|
22
|
+
Object.defineProperty(exports, "IdentityClient", { enumerable: true, get: function () { return identity_1.IdentityClient; } });
|
|
23
|
+
var payment_1 = require("./payment");
|
|
24
|
+
Object.defineProperty(exports, "PaymentClient", { enumerable: true, get: function () { return payment_1.PaymentClient; } });
|
|
25
|
+
var provider_1 = require("./provider");
|
|
26
|
+
Object.defineProperty(exports, "ProviderClient", { enumerable: true, get: function () { return provider_1.ProviderClient; } });
|
|
27
|
+
var task_1 = require("./task");
|
|
28
|
+
Object.defineProperty(exports, "TaskClient", { enumerable: true, get: function () { return task_1.TaskClient; } });
|
|
29
|
+
var marketplace_1 = require("./marketplace");
|
|
30
|
+
Object.defineProperty(exports, "MarketplaceClient", { enumerable: true, get: function () { return marketplace_1.MarketplaceClient; } });
|
|
31
|
+
var skill_1 = require("./skill");
|
|
32
|
+
Object.defineProperty(exports, "SkillClient", { enumerable: true, get: function () { return skill_1.SkillClient; } });
|
|
33
|
+
var tool_1 = require("./tool");
|
|
34
|
+
Object.defineProperty(exports, "ToolClient", { enumerable: true, get: function () { return tool_1.ToolClient; } });
|
|
35
|
+
var canton_1 = require("./canton");
|
|
36
|
+
Object.defineProperty(exports, "CantonClient", { enumerable: true, get: function () { return canton_1.CantonClient; } });
|
|
37
|
+
var staking_1 = require("./staking");
|
|
38
|
+
Object.defineProperty(exports, "StakingClient", { enumerable: true, get: function () { return staking_1.StakingClient; } });
|
|
39
|
+
var token_1 = require("./token");
|
|
40
|
+
Object.defineProperty(exports, "TokenClient", { enumerable: true, get: function () { return token_1.TokenClient; } });
|
|
41
|
+
var contract_1 = require("./contract");
|
|
42
|
+
Object.defineProperty(exports, "ContractClient", { enumerable: true, get: function () { return contract_1.ContractClient; } });
|
|
43
|
+
var crypto_1 = require("./crypto");
|
|
44
|
+
Object.defineProperty(exports, "CryptoClient", { enumerable: true, get: function () { return crypto_1.CryptoClient; } });
|
|
45
|
+
var custody_1 = require("./custody");
|
|
46
|
+
Object.defineProperty(exports, "CustodyClient", { enumerable: true, get: function () { return custody_1.CustodyClient; } });
|
|
47
|
+
var tee_1 = require("./tee");
|
|
48
|
+
Object.defineProperty(exports, "TeeClient", { enumerable: true, get: function () { return tee_1.TeeClient; } });
|
|
49
|
+
var zk_1 = require("./zk");
|
|
50
|
+
Object.defineProperty(exports, "ZkClient", { enumerable: true, get: function () { return zk_1.ZkClient; } });
|
|
51
|
+
var streaming_1 = require("./streaming");
|
|
52
|
+
Object.defineProperty(exports, "StreamingClient", { enumerable: true, get: function () { return streaming_1.StreamingClient; } });
|
|
53
|
+
var ap2_1 = require("./ap2");
|
|
54
|
+
Object.defineProperty(exports, "Ap2Client", { enumerable: true, get: function () { return ap2_1.Ap2Client; } });
|
|
55
|
+
var bridge_1 = require("./bridge");
|
|
56
|
+
Object.defineProperty(exports, "BridgeClient", { enumerable: true, get: function () { return bridge_1.BridgeClient; } });
|
|
57
|
+
var agent_payments_1 = require("./agent-payments");
|
|
58
|
+
Object.defineProperty(exports, "AgentPaymentClient", { enumerable: true, get: function () { return agent_payments_1.AgentPaymentClient; } });
|
|
59
|
+
var circuit_breaker_1 = require("./circuit-breaker");
|
|
60
|
+
Object.defineProperty(exports, "CircuitBreakerClient", { enumerable: true, get: function () { return circuit_breaker_1.CircuitBreakerClient; } });
|
|
61
|
+
var nanopayment_1 = require("./nanopayment");
|
|
62
|
+
Object.defineProperty(exports, "NanopaymentClient", { enumerable: true, get: function () { return nanopayment_1.NanopaymentClient; } });
|
|
63
|
+
var erc7802_1 = require("./erc7802");
|
|
64
|
+
Object.defineProperty(exports, "Erc7802Client", { enumerable: true, get: function () { return erc7802_1.Erc7802Client; } });
|
|
65
|
+
var nft_1 = require("./nft");
|
|
66
|
+
Object.defineProperty(exports, "NftClient", { enumerable: true, get: function () { return nft_1.NftClient; } });
|
|
67
|
+
var compliance_1 = require("./compliance");
|
|
68
|
+
Object.defineProperty(exports, "ComplianceClient", { enumerable: true, get: function () { return compliance_1.ComplianceClient; } });
|
|
69
|
+
var events_1 = require("./events");
|
|
70
|
+
Object.defineProperty(exports, "EventsClient", { enumerable: true, get: function () { return events_1.EventsClient; } });
|
|
71
|
+
var debridge_1 = require("./debridge");
|
|
72
|
+
Object.defineProperty(exports, "DebridgeClient", { enumerable: true, get: function () { return debridge_1.DebridgeClient; } });
|
|
73
|
+
// Configuration
|
|
74
|
+
var config_1 = require("./config");
|
|
75
|
+
Object.defineProperty(exports, "MAINNET_CONFIG", { enumerable: true, get: function () { return config_1.MAINNET_CONFIG; } });
|
|
76
|
+
Object.defineProperty(exports, "TESTNET_CONFIG", { enumerable: true, get: function () { return config_1.TESTNET_CONFIG; } });
|
|
77
|
+
Object.defineProperty(exports, "LOCAL_CONFIG", { enumerable: true, get: function () { return config_1.LOCAL_CONFIG; } });
|
|
78
|
+
// RPC
|
|
79
|
+
var rpc_1 = require("./rpc");
|
|
80
|
+
Object.defineProperty(exports, "RpcClient", { enumerable: true, get: function () { return rpc_1.RpcClient; } });
|
|
81
|
+
Object.defineProperty(exports, "RpcCallError", { enumerable: true, get: function () { return rpc_1.RpcCallError; } });
|
|
82
|
+
// Token constants
|
|
83
|
+
var token_2 = require("./token");
|
|
84
|
+
Object.defineProperty(exports, "WTNZO_EVM_ADDRESS", { enumerable: true, get: function () { return token_2.WTNZO_EVM_ADDRESS; } });
|
|
85
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,cAAc;AACd,mCAAwC;AAA/B,sGAAA,YAAY,OAAA;AAErB,wDAAwD;AACxD,6BAAkC;AAAzB,gGAAA,SAAS,OAAA;AAElB,cAAc;AACd,mCAAwC;AAA/B,sGAAA,YAAY,OAAA;AACrB,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AACxB,2CAAgD;AAAvC,8GAAA,gBAAgB,OAAA;AACzB,iCAAsC;AAA7B,oGAAA,WAAW,OAAA;AACpB,2CAAgD;AAAvC,8GAAA,gBAAgB,OAAA;AACzB,uCAA4C;AAAnC,0GAAA,cAAc,OAAA;AACvB,qCAA0C;AAAjC,wGAAA,aAAa,OAAA;AACtB,uCAA4C;AAAnC,0GAAA,cAAc,OAAA;AACvB,+BAAoC;AAA3B,kGAAA,UAAU,OAAA;AACnB,6CAAkD;AAAzC,gHAAA,iBAAiB,OAAA;AAC1B,iCAAsC;AAA7B,oGAAA,WAAW,OAAA;AACpB,+BAAoC;AAA3B,kGAAA,UAAU,OAAA;AACnB,mCAAwC;AAA/B,sGAAA,YAAY,OAAA;AACrB,qCAA0C;AAAjC,wGAAA,aAAa,OAAA;AACtB,iCAAsC;AAA7B,oGAAA,WAAW,OAAA;AACpB,uCAA4C;AAAnC,0GAAA,cAAc,OAAA;AACvB,mCAAwC;AAA/B,sGAAA,YAAY,OAAA;AACrB,qCAA0C;AAAjC,wGAAA,aAAa,OAAA;AACtB,6BAAkC;AAAzB,gGAAA,SAAS,OAAA;AAClB,2BAAgC;AAAvB,8FAAA,QAAQ,OAAA;AACjB,yCAA8C;AAArC,4GAAA,eAAe,OAAA;AACxB,6BAAkC;AAAzB,gGAAA,SAAS,OAAA;AAClB,mCAAwC;AAA/B,sGAAA,YAAY,OAAA;AACrB,mDAAsD;AAA7C,oHAAA,kBAAkB,OAAA;AAC3B,qDAAyD;AAAhD,uHAAA,oBAAoB,OAAA;AAC7B,6CAAkD;AAAzC,gHAAA,iBAAiB,OAAA;AAC1B,qCAA0C;AAAjC,wGAAA,aAAa,OAAA;AACtB,6BAAkC;AAAzB,gGAAA,SAAS,OAAA;AAClB,2CAAgD;AAAvC,8GAAA,gBAAgB,OAAA;AACzB,mCAAwC;AAA/B,sGAAA,YAAY,OAAA;AACrB,uCAA4C;AAAnC,0GAAA,cAAc,OAAA;AAEvB,gBAAgB;AAChB,mCAKkB;AAHhB,wGAAA,cAAc,OAAA;AACd,wGAAA,cAAc,OAAA;AACd,sGAAA,YAAY,OAAA;AAGd,MAAM;AACN,6BAAgD;AAAvC,gGAAA,SAAS,OAAA;AAAE,mGAAA,YAAY,OAAA;AAyRhC,kBAAkB;AAClB,iCAA4C;AAAnC,0GAAA,iBAAiB,OAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { RpcClient } from "./rpc";
|
|
2
|
+
import { ModelInfo, InferenceResult, ModelEndpoint } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Client for AI inference operations.
|
|
5
|
+
* Supports model discovery and inference requests.
|
|
6
|
+
*/
|
|
7
|
+
export declare class InferenceClient {
|
|
8
|
+
private rpc;
|
|
9
|
+
constructor(rpc: RpcClient);
|
|
10
|
+
/**
|
|
11
|
+
* List all available models on the network.
|
|
12
|
+
*/
|
|
13
|
+
listModels(): Promise<ModelInfo[]>;
|
|
14
|
+
/**
|
|
15
|
+
* Request inference from a specific model.
|
|
16
|
+
* @param modelId - The model identifier
|
|
17
|
+
* @param input - The input text/data
|
|
18
|
+
* @param maxTokens - Optional maximum tokens to generate (default: 1024)
|
|
19
|
+
* @returns Inference result with output, cost, and metadata
|
|
20
|
+
*/
|
|
21
|
+
request(modelId: string, input: string, maxTokens?: number): Promise<InferenceResult>;
|
|
22
|
+
/**
|
|
23
|
+
* List all model service endpoints with load information.
|
|
24
|
+
*/
|
|
25
|
+
listModelEndpoints(): Promise<ModelEndpoint[]>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=inference.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inference.d.ts","sourceRoot":"","sources":["../src/inference.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEpE;;;GAGG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,SAAS;IAElC;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IAIxC;;;;;;OAMG;IACG,OAAO,CACX,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,EACb,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,eAAe,CAAC;IAU3B;;OAEG;IACG,kBAAkB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;CAGrD"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InferenceClient = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Client for AI inference operations.
|
|
6
|
+
* Supports model discovery and inference requests.
|
|
7
|
+
*/
|
|
8
|
+
class InferenceClient {
|
|
9
|
+
rpc;
|
|
10
|
+
constructor(rpc) {
|
|
11
|
+
this.rpc = rpc;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* List all available models on the network.
|
|
15
|
+
*/
|
|
16
|
+
async listModels() {
|
|
17
|
+
return this.rpc.call("tenzro_listModels");
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Request inference from a specific model.
|
|
21
|
+
* @param modelId - The model identifier
|
|
22
|
+
* @param input - The input text/data
|
|
23
|
+
* @param maxTokens - Optional maximum tokens to generate (default: 1024)
|
|
24
|
+
* @returns Inference result with output, cost, and metadata
|
|
25
|
+
*/
|
|
26
|
+
async request(modelId, input, maxTokens) {
|
|
27
|
+
return this.rpc.call("tenzro_inferenceRequest", [
|
|
28
|
+
{
|
|
29
|
+
model_id: modelId,
|
|
30
|
+
input,
|
|
31
|
+
max_tokens: maxTokens ?? 1024,
|
|
32
|
+
},
|
|
33
|
+
]);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* List all model service endpoints with load information.
|
|
37
|
+
*/
|
|
38
|
+
async listModelEndpoints() {
|
|
39
|
+
return this.rpc.call("tenzro_listModelEndpoints");
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.InferenceClient = InferenceClient;
|
|
43
|
+
//# sourceMappingURL=inference.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inference.js","sourceRoot":"","sources":["../src/inference.ts"],"names":[],"mappings":";;;AAGA;;;GAGG;AACH,MAAa,eAAe;IACN;IAApB,YAAoB,GAAc;QAAd,QAAG,GAAH,GAAG,CAAW;IAAG,CAAC;IAEtC;;OAEG;IACH,KAAK,CAAC,UAAU;QACd,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAc,mBAAmB,CAAC,CAAC;IACzD,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,OAAO,CACX,OAAe,EACf,KAAa,EACb,SAAkB;QAElB,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAkB,yBAAyB,EAAE;YAC/D;gBACE,QAAQ,EAAE,OAAO;gBACjB,KAAK;gBACL,UAAU,EAAE,SAAS,IAAI,IAAI;aAC9B;SACF,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,kBAAkB;QACtB,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAkB,2BAA2B,CAAC,CAAC;IACrE,CAAC;CACF;AArCD,0CAqCC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { RpcClient } from './rpc';
|
|
2
|
+
import type { AgentTemplate, AgentTemplateFilter, RegisterAgentTemplateParams, UpdateAgentTemplateParams, AgentTemplateStats } from './types';
|
|
3
|
+
export declare class MarketplaceClient {
|
|
4
|
+
private readonly rpc;
|
|
5
|
+
constructor(rpc: RpcClient);
|
|
6
|
+
listAgentTemplates(filter?: AgentTemplateFilter): Promise<AgentTemplate[]>;
|
|
7
|
+
registerAgentTemplate(params: RegisterAgentTemplateParams): Promise<AgentTemplate>;
|
|
8
|
+
getAgentTemplate(templateId: string): Promise<AgentTemplate>;
|
|
9
|
+
/**
|
|
10
|
+
* Update a registered agent template (must be the creator).
|
|
11
|
+
* @param templateId - The template to update
|
|
12
|
+
* @param params - Fields to update (partial)
|
|
13
|
+
* @returns Updated agent template
|
|
14
|
+
*/
|
|
15
|
+
updateAgentTemplate(templateId: string, params: UpdateAgentTemplateParams): Promise<AgentTemplate>;
|
|
16
|
+
/**
|
|
17
|
+
* Spawn a new agent instance from a template.
|
|
18
|
+
* @param templateId - The template to spawn from
|
|
19
|
+
* @param name - Name for the new agent instance
|
|
20
|
+
* @returns Spawn result with agent ID
|
|
21
|
+
*/
|
|
22
|
+
spawnAgentFromTemplate(templateId: string, name: string): Promise<any>;
|
|
23
|
+
/**
|
|
24
|
+
* Rate an agent template.
|
|
25
|
+
* @param templateId - The template to rate
|
|
26
|
+
* @param rating - Rating value (1-5)
|
|
27
|
+
* @param review - Optional review text
|
|
28
|
+
* @returns Rating result
|
|
29
|
+
*/
|
|
30
|
+
rateAgentTemplate(templateId: string, rating: number, review?: string): Promise<any>;
|
|
31
|
+
/**
|
|
32
|
+
* Search agent templates by free-text query.
|
|
33
|
+
* @param query - Search query string
|
|
34
|
+
* @returns Array of matching agent templates ranked by relevance
|
|
35
|
+
*/
|
|
36
|
+
searchAgentTemplates(query: string): Promise<AgentTemplate[]>;
|
|
37
|
+
/**
|
|
38
|
+
* Get usage and rating statistics for an agent template.
|
|
39
|
+
* @param templateId - The template identifier
|
|
40
|
+
* @returns Template statistics including spawns, ratings, and downloads
|
|
41
|
+
*/
|
|
42
|
+
getAgentTemplateStats(templateId: string): Promise<AgentTemplateStats>;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=marketplace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketplace.d.ts","sourceRoot":"","sources":["../src/marketplace.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE9I,qBAAa,iBAAiB;IAChB,OAAO,CAAC,QAAQ,CAAC,GAAG;gBAAH,GAAG,EAAE,SAAS;IAErC,kBAAkB,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAI1E,qBAAqB,CAAC,MAAM,EAAE,2BAA2B,GAAG,OAAO,CAAC,aAAa,CAAC;IAIlF,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAIlE;;;;;OAKG;IACG,mBAAmB,CACvB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,yBAAyB,GAChC,OAAO,CAAC,aAAa,CAAC;IAMzB;;;;;OAKG;IACG,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAM5E;;;;;;OAMG;IACG,iBAAiB,CACrB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,GAAG,CAAC;IAMf;;;;OAIG;IACG,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAMnE;;;;OAIG;IACG,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAK7E"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MarketplaceClient = void 0;
|
|
4
|
+
class MarketplaceClient {
|
|
5
|
+
rpc;
|
|
6
|
+
constructor(rpc) {
|
|
7
|
+
this.rpc = rpc;
|
|
8
|
+
}
|
|
9
|
+
async listAgentTemplates(filter) {
|
|
10
|
+
return this.rpc.call('tenzro_listAgentTemplates', [filter ?? {}]);
|
|
11
|
+
}
|
|
12
|
+
async registerAgentTemplate(params) {
|
|
13
|
+
return this.rpc.call('tenzro_registerAgentTemplate', [params]);
|
|
14
|
+
}
|
|
15
|
+
async getAgentTemplate(templateId) {
|
|
16
|
+
return this.rpc.call('tenzro_getAgentTemplate', [{ template_id: templateId }]);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Update a registered agent template (must be the creator).
|
|
20
|
+
* @param templateId - The template to update
|
|
21
|
+
* @param params - Fields to update (partial)
|
|
22
|
+
* @returns Updated agent template
|
|
23
|
+
*/
|
|
24
|
+
async updateAgentTemplate(templateId, params) {
|
|
25
|
+
return this.rpc.call('tenzro_updateAgentTemplate', [
|
|
26
|
+
{ template_id: templateId, ...params },
|
|
27
|
+
]);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Spawn a new agent instance from a template.
|
|
31
|
+
* @param templateId - The template to spawn from
|
|
32
|
+
* @param name - Name for the new agent instance
|
|
33
|
+
* @returns Spawn result with agent ID
|
|
34
|
+
*/
|
|
35
|
+
async spawnAgentFromTemplate(templateId, name) {
|
|
36
|
+
return this.rpc.call('tenzro_spawnAgentFromTemplate', [
|
|
37
|
+
{ template_id: templateId, name },
|
|
38
|
+
]);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Rate an agent template.
|
|
42
|
+
* @param templateId - The template to rate
|
|
43
|
+
* @param rating - Rating value (1-5)
|
|
44
|
+
* @param review - Optional review text
|
|
45
|
+
* @returns Rating result
|
|
46
|
+
*/
|
|
47
|
+
async rateAgentTemplate(templateId, rating, review) {
|
|
48
|
+
return this.rpc.call('tenzro_rateAgentTemplate', [
|
|
49
|
+
{ template_id: templateId, rating, review },
|
|
50
|
+
]);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Search agent templates by free-text query.
|
|
54
|
+
* @param query - Search query string
|
|
55
|
+
* @returns Array of matching agent templates ranked by relevance
|
|
56
|
+
*/
|
|
57
|
+
async searchAgentTemplates(query) {
|
|
58
|
+
return this.rpc.call('tenzro_searchAgentTemplates', [
|
|
59
|
+
{ query },
|
|
60
|
+
]);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Get usage and rating statistics for an agent template.
|
|
64
|
+
* @param templateId - The template identifier
|
|
65
|
+
* @returns Template statistics including spawns, ratings, and downloads
|
|
66
|
+
*/
|
|
67
|
+
async getAgentTemplateStats(templateId) {
|
|
68
|
+
return this.rpc.call('tenzro_getAgentTemplateStats', [
|
|
69
|
+
{ template_id: templateId },
|
|
70
|
+
]);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.MarketplaceClient = MarketplaceClient;
|
|
74
|
+
//# sourceMappingURL=marketplace.js.map
|
|
@@ -0,0 +1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