nara-sdk 1.0.59 → 1.0.61
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/package.json
CHANGED
package/src/agent_registry.ts
CHANGED
|
@@ -1329,13 +1329,12 @@ export async function submitTweet(
|
|
|
1329
1329
|
connection: Connection,
|
|
1330
1330
|
wallet: Keypair,
|
|
1331
1331
|
agentId: string,
|
|
1332
|
-
username: string,
|
|
1333
1332
|
tweetUrl: string,
|
|
1334
1333
|
options?: AgentRegistryOptions
|
|
1335
1334
|
): Promise<string> {
|
|
1336
1335
|
const program = createProgram(connection, wallet, options?.programId);
|
|
1337
1336
|
const ix = await program.methods
|
|
1338
|
-
.submitTweet(agentId,
|
|
1337
|
+
.submitTweet(agentId, tweetUrl)
|
|
1339
1338
|
.accounts({ authority: wallet.publicKey } as any)
|
|
1340
1339
|
.instruction();
|
|
1341
1340
|
return sendTx(connection, wallet, [ix]);
|
|
@@ -1370,7 +1369,8 @@ export async function verifyTwitter(
|
|
|
1370
1369
|
agentId: string,
|
|
1371
1370
|
username: string,
|
|
1372
1371
|
options?: AgentRegistryOptions,
|
|
1373
|
-
freeStakeDelta?: number
|
|
1372
|
+
freeStakeDelta?: number,
|
|
1373
|
+
tweetUrl?: string
|
|
1374
1374
|
): Promise<string> {
|
|
1375
1375
|
const program = createProgram(connection, wallet, options?.programId);
|
|
1376
1376
|
const agentPda = getAgentPda(program.programId, agentId);
|
|
@@ -1398,7 +1398,7 @@ export async function verifyTwitter(
|
|
|
1398
1398
|
if (freeStakeDelta !== undefined && freeStakeDelta !== 0) {
|
|
1399
1399
|
const { makeAdjustFreeStakeIx } = await import("./quest");
|
|
1400
1400
|
const freeStakeIx = await makeAdjustFreeStakeIx(
|
|
1401
|
-
connection, wallet.publicKey, authority, freeStakeDelta,
|
|
1401
|
+
connection, wallet.publicKey, authority, freeStakeDelta, tweetUrl ?? ""
|
|
1402
1402
|
);
|
|
1403
1403
|
ixs.push(freeStakeIx);
|
|
1404
1404
|
}
|
|
@@ -1433,7 +1433,8 @@ export async function approveTweet(
|
|
|
1433
1433
|
wallet: Keypair,
|
|
1434
1434
|
agentId: string,
|
|
1435
1435
|
options?: AgentRegistryOptions,
|
|
1436
|
-
freeStakeDelta?: number
|
|
1436
|
+
freeStakeDelta?: number,
|
|
1437
|
+
tweetUrl?: string
|
|
1437
1438
|
): Promise<string> {
|
|
1438
1439
|
const program = createProgram(connection, wallet, options?.programId);
|
|
1439
1440
|
const agentPda = getAgentPda(program.programId, agentId);
|
|
@@ -1461,7 +1462,7 @@ export async function approveTweet(
|
|
|
1461
1462
|
if (freeStakeDelta !== undefined && freeStakeDelta !== 0) {
|
|
1462
1463
|
const { makeAdjustFreeStakeIx } = await import("./quest");
|
|
1463
1464
|
const freeStakeIx = await makeAdjustFreeStakeIx(
|
|
1464
|
-
connection, wallet.publicKey, authority, freeStakeDelta,
|
|
1465
|
+
connection, wallet.publicKey, authority, freeStakeDelta, tweetUrl ?? ""
|
|
1465
1466
|
);
|
|
1466
1467
|
ixs.push(freeStakeIx);
|
|
1467
1468
|
}
|
|
@@ -2814,10 +2814,6 @@
|
|
|
2814
2814
|
"name": "agent_id",
|
|
2815
2815
|
"type": "string"
|
|
2816
2816
|
},
|
|
2817
|
-
{
|
|
2818
|
-
"name": "username",
|
|
2819
|
-
"type": "string"
|
|
2820
|
-
},
|
|
2821
2817
|
{
|
|
2822
2818
|
"name": "tweet_url",
|
|
2823
2819
|
"type": "string"
|
|
@@ -4296,11 +4292,6 @@
|
|
|
4296
4292
|
"code": 6041,
|
|
4297
4293
|
"name": "TweetVerifyAlreadyPending",
|
|
4298
4294
|
"msg": "Tweet verification already pending"
|
|
4299
|
-
},
|
|
4300
|
-
{
|
|
4301
|
-
"code": 6042,
|
|
4302
|
-
"name": "TwitterUsernameMismatch",
|
|
4303
|
-
"msg": "Twitter username does not match verified account"
|
|
4304
4295
|
}
|
|
4305
4296
|
],
|
|
4306
4297
|
"types": [
|
|
@@ -2820,10 +2820,6 @@ export type NaraAgentRegistry = {
|
|
|
2820
2820
|
"name": "agentId",
|
|
2821
2821
|
"type": "string"
|
|
2822
2822
|
},
|
|
2823
|
-
{
|
|
2824
|
-
"name": "username",
|
|
2825
|
-
"type": "string"
|
|
2826
|
-
},
|
|
2827
2823
|
{
|
|
2828
2824
|
"name": "tweetUrl",
|
|
2829
2825
|
"type": "string"
|
|
@@ -4302,11 +4298,6 @@ export type NaraAgentRegistry = {
|
|
|
4302
4298
|
"code": 6041,
|
|
4303
4299
|
"name": "tweetVerifyAlreadyPending",
|
|
4304
4300
|
"msg": "Tweet verification already pending"
|
|
4305
|
-
},
|
|
4306
|
-
{
|
|
4307
|
-
"code": 6042,
|
|
4308
|
-
"name": "twitterUsernameMismatch",
|
|
4309
|
-
"msg": "Twitter username does not match verified account"
|
|
4310
4301
|
}
|
|
4311
4302
|
],
|
|
4312
4303
|
"types": [
|