@ghostspeak/sdk 1.5.0 → 1.5.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.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -12369,7 +12369,7 @@ declare class AgentInstructions extends BaseInstructions {
|
|
|
12369
12369
|
/**
|
|
12370
12370
|
* Register a new AI agent
|
|
12371
12371
|
*/
|
|
12372
|
-
register(signer: KeyPairSigner,
|
|
12372
|
+
register(signer: KeyPairSigner, params: AgentRegistrationParams): Promise<string>;
|
|
12373
12373
|
/**
|
|
12374
12374
|
* Update an existing agent
|
|
12375
12375
|
*/
|
|
@@ -13894,7 +13894,7 @@ declare class GhostSpeakClient$1 {
|
|
|
13894
13894
|
/**
|
|
13895
13895
|
* Register a new AI agent
|
|
13896
13896
|
*/
|
|
13897
|
-
registerAgent(signer: KeyPairSigner,
|
|
13897
|
+
registerAgent(signer: KeyPairSigner, params: AgentRegistrationParams): Promise<string>;
|
|
13898
13898
|
/**
|
|
13899
13899
|
* Get agent account information
|
|
13900
13900
|
*/
|
package/dist/index.js
CHANGED
|
@@ -21073,7 +21073,7 @@ async function deriveA2AMessagePda(programId, session, sessionCreatedAt) {
|
|
|
21073
21073
|
});
|
|
21074
21074
|
return address2;
|
|
21075
21075
|
}
|
|
21076
|
-
async function deriveUserRegistryPda(programId) {
|
|
21076
|
+
async function deriveUserRegistryPda(programId, signer) {
|
|
21077
21077
|
const [address2] = await getProgramDerivedAddress({
|
|
21078
21078
|
programAddress: programId,
|
|
21079
21079
|
seeds: [
|
|
@@ -21091,8 +21091,9 @@ async function deriveUserRegistryPda(programId) {
|
|
|
21091
21091
|
116,
|
|
21092
21092
|
114,
|
|
21093
21093
|
121
|
|
21094
|
-
]))
|
|
21094
|
+
])),
|
|
21095
21095
|
// 'user_registry'
|
|
21096
|
+
getAddressEncoder().encode(signer)
|
|
21096
21097
|
]
|
|
21097
21098
|
});
|
|
21098
21099
|
return address2;
|
|
@@ -21815,17 +21816,15 @@ var AgentInstructions = class extends BaseInstructions {
|
|
|
21815
21816
|
/**
|
|
21816
21817
|
* Register a new AI agent
|
|
21817
21818
|
*/
|
|
21818
|
-
async register(signer,
|
|
21819
|
+
async register(signer, params) {
|
|
21819
21820
|
const agentType = typeof params.agentType === "number" && !isNaN(params.agentType) ? params.agentType : 1;
|
|
21820
21821
|
try {
|
|
21821
|
-
const instruction =
|
|
21822
|
-
agentAccount: agentAddress,
|
|
21823
|
-
userRegistry: userRegistryAddress,
|
|
21822
|
+
const instruction = await getRegisterAgentInstructionAsync({
|
|
21824
21823
|
signer,
|
|
21825
21824
|
agentType,
|
|
21826
21825
|
metadataUri: params.metadataUri,
|
|
21827
21826
|
agentId: params.agentId
|
|
21828
|
-
});
|
|
21827
|
+
}, { programAddress: this.programId });
|
|
21829
21828
|
this.logInstructionDetails(instruction);
|
|
21830
21829
|
const signature = await this.sendTransaction([instruction], [signer]);
|
|
21831
21830
|
return signature;
|
|
@@ -25003,8 +25002,8 @@ var GhostSpeakClient = class _GhostSpeakClient {
|
|
|
25003
25002
|
/**
|
|
25004
25003
|
* Register a new AI agent
|
|
25005
25004
|
*/
|
|
25006
|
-
async registerAgent(signer,
|
|
25007
|
-
return this.agent.register(signer,
|
|
25005
|
+
async registerAgent(signer, params) {
|
|
25006
|
+
return this.agent.register(signer, params);
|
|
25008
25007
|
}
|
|
25009
25008
|
/**
|
|
25010
25009
|
* Get agent account information
|